1"use strict";(self.webpackChunkui_frontend_react=self.webpackChunkui_frontend_react||[]).push([[129],{1160:(e,t,r)=>{r.r(t),r.d(t,{default:()=>f});var a=r(7051),s=r(5043),i=r(6749),n=r(9050),l=r(7190),c=r(579);const o=e=>{const{url:t,image:r,title:a,description:s,showImage:i,titleLength:n,descriptionLength:l,tagIds:o,getAssetTypeById:d,handleCardClick:h,ctaLabel:u,linkLabel:p,showOffsiteIconCta:m}=e,f=null===o||void 0===o?void 0:o.filter(e=>e.includes(":asset-type/")),g=null===f||void 0===f?void 0:f.map(e=>d(e)).filter(Boolean),y=(null===g||void 0===g?void 0:g.length)>0?g[0]:null,v=u||p,_=a&&a.length>n?"".concat(a.slice(0,n),"..."):a,b=s&&s.length>l?"".concat(s.slice(0,l),"..."):s;return(0,c.jsx)("div",{className:"card teaser main-card",children:(0,c.jsxs)("div",{className:"cmp-teaser ".concat(r&&i?"image":"none"),"data-component":"main-card",children:[i&&r&&(0,c.jsx)("div",{className:"cmp-teaser__image",children:(0,c.jsx)("div",{className:"cmp-image__wrapper",children:(0,c.jsx)("div",{"data-cmp-lazy":!0,"data-title":a,className:"cmp-image",children:(0,c.jsx)("img",{src:r,loading:"lazy",className:"cmp-image__image",itemprop:"contentUrl","data-cmp-hook-image":"image",alt:a})})})}),(0,c.jsx)("div",{className:"cmp-teaser__content",children:(0,c.jsxs)("div",{className:"cmp-card__content",children:[(0,c.jsxs)("div",{className:"cmp-card__text",children:[g.length>0&&(0,c.jsx)("div",{className:"tag_wrapper",children:g.map((e,t)=>e&&e.title&&e.name&&(0,c.jsx)("div",{className:"resource-card__tag tag-label tag-label__".concat(e.name),children:e.title},t))}),_&&(0,c.jsx)("h2",{className:"cmp-teaser__title",title:a,children:(0,c.jsx)("span",{className:"cmp-teaser__title-link",children:_})}),b&&(0,c.jsx)("div",{className:"cmp-teaser__description",children:(0,c.jsx)("p",{children:b})})]}),(0,c.jsx)("div",{className:"cmp-card__cta-container",children:(0,c.jsx)("div",{className:"cmp-card__card",children:(0,c.jsx)("div",{className:"button-primary button",children:(0,c.jsxs)("a",{className:"cmp-button secondary-button ".concat(m?"iconPos__right iconPicked":"iconPos__left"),href:t,target:"_self","data-component":"button",onClick:t=>{t.preventDefault(),h(e,v,y)},role:"button","aria-label":v,children:[(0,c.jsx)("span",{className:"cmp-button__text",children:v}),m&&(0,c.jsx)("span",{className:"cmp-button__icon cmp-button__icon--icon-external-link icon-external-link"})]})})})})]})})]})})};var d=r(5746);const h=()=>{const e=new URLSearchParams(window.location.search),t={};for(const[r,a]of e.entries())if(r.endsWith("[]")||"filters"===r){const e=r.replace("[]","");t[e]||(t[e]=[]),a.includes(",")?t[e].push(...a.split(",")):t[e].push(a)}else t[r]=a;return t},u=(e,t)=>e.filter(e=>e.filterType===t),p=(e,t,r,s,i)=>{let n=[];const l=(e,r)=>{if(!e)return null;const s=(0,a.A)({},e);if(s.children&&s.children.length>0){const e=(i=s.children)&&Array.isArray(i)?i.filter(e=>t.has(e.id)||e.children&&e.children.some(e=>t.has(e.id))):[];if(e.length>0){s.filterLabel=r,s.children=e;const t={id:null,filterType:s.filterType,name:"all",title:"All",isAllOption:!0};return s.children.unshift(t),s}}var i;return null},c=e.find(e=>"asset-type"===e.name),o=l(c,r);o&&n.push(o);const d=e.find(e=>"solutions"===e.name),h=l(d,null===d||void 0===d?void 0:d.title);h&&n.push(h);const u=e.find(e=>"products"===e.name),p=l(u,null===u||void 0===u?void 0:u.title);p&&n.push(p);const m=e.find(e=>"industry"===e.name),f=l(m,i);return f&&n.push(f),e.forEach(e=>{if("asset-type"!==e.name&&"solutions"!==e.name&&"products"!==e.name&&"industry"!==e.name){const t=l(e,e.title);t&&n.push(t)}}),n},m=(e,t)=>{let r=e.map(e=>{return((r=e.filterType)&&t[r]?t[r]:r)+":"+e.title;var r});(0,d.vB)("activeFilter",{resourceName:"NA",resourceType:"NA",activeFilter:r.length>0?r.join("|"):"NA",cta:"NA"})};r(1192);const f=e=>{let{filterLabel:t,clearFilterLabel:r,perPage:f=6,linkLabel:g="Learn More",loadMoreLabel:y,emptyMessageHeading:v,emptyMessageDescription:_,showImage:b,endpoint:A,titleLength:j=79,descriptionLength:x=165,orderBy:N,sortOrder:k,resourceTypeLabel:w,topicsLabel:L,industryLabel:I,parentFolder:S,tags:E,filtersIdentifier:T}=e;const[C,F]=s.useState([]),[O,M]=s.useState([]),[P,B]=s.useState([]),[D,U]=s.useState(!0),[W,z]=s.useState([]),[H,R]=s.useState({}),[q,G]=s.useState({}),[J,K]=s.useState([]),[Q]=s.useState(()=>h()),V=e=>e&&H[e]?H[e]:null,X=async()=>{A=void 0!==T&&""!==T?"".concat(A,"?cfi=").concat(T):A;try{let{data:t}=await n.A.get(A);const{tags:r,pages:a}=t,s=(e=>{try{return e?"string"===typeof e?e.split(",").map(e=>e.trim()):e:[]}catch(t){return console.error(t),[]}})(E);let i=r;if(s&&s.length>0){const e=new Set(s);i=r.filter(t=>e.has(t.id))}const l=(e=>{const t={};
1return e.forEach(e=>{try{e.filterType&&(t[e.filterType]=e.name)}catch(r){}}),t})(i);let c=a;try{S&&!function(e){try{return e.endsWith("/resources")}catch(t){return!1}}(S)&&S.includes("resources")?c=((e,t)=>e&&t?e.filter(e=>e.categoryPath&&e.categoryPath===t):e)(a,S):s&&s.length>0&&(c=a.filter(e=>!(!e.tagIds||0===e.tagIds.length)&&e.tagIds.some(e=>s.some(t=>e.startsWith(t)))))}catch(e){console.error(e)}const o=(e=>{if(!e||!Array.isArray(e))return new Set;const t=new Set;return e.forEach(e=>{e.tagIds&&Array.isArray(e.tagIds)&&e.tagIds.forEach(e=>{t.add(e)})}),t})(c),d=p(i,o,w,0,I),h=((e,t)=>{const r={},a=e.find(e=>"asset-type"===e.name);return a&&a.children&&a.children.forEach(e=>{t&&t.has(e.id)&&(r[e.id]=e)}),r})(i,o),{orderBy:m,sortOrder:f}=((e,t)=>({orderBy:["title","modified","updated"].includes(e)?e:"title",sortOrder:["asc","desc"].includes(t)?t:"asc"}))(N,k),g=((e,t,r)=>e&&t?[...e].sort((e,a)=>{var s,i,n,l;let c,o,d;switch(t){case"title":c=(null===(s=e.title)||void 0===s?void 0:s.trim())||"",o=(null===(i=a.title)||void 0===i?void 0:i.trim())||"";break;case"modified":c=e.lastModifiedDate||0,o=a.lastModifiedDate||0;break;case"updated":c=e.lastUpdatedDate||0,o=a.lastUpdatedDate||0;break;default:c=(null===(n=e.title)||void 0===n?void 0:n.trim())||"",o=(null===(l=a.title)||void 0===l?void 0:l.trim())||""}return d="string"===typeof c&&"string"===typeof o?c.localeCompare(o):c<o?-1:c>o?1:0,"desc"===r?-d:d}):e)(c,m,f),y=d.find(e=>"asset-type"===e.name);y&&K([y.id]),R(h),F(d),M(g),B(g),G(l);const v=((e,t)=>{if(!e||!Array.isArray(e))return[];const r=[];return Object.entries(t).forEach(t=>{let[a,s]=t;if("string"===typeof s){const t=u(e,a);t&&(Array.isArray(t)&&t.length>0||"object"===typeof t&&!Array.isArray(t)&&Object.keys(t).length>0)&&(Array.isArray(t)?t:[t]).forEach(e=>{e.children&&Array.isArray(e.children)&&e.children.length>0&&e.children.forEach(e=>{e.filterId===s&&r.push(e)})})}}),r})(d,Q);v.length>0&&z(v)}catch(e){console.log(e)}finally{U(!1)}},Y=(e,t,r)=>{const{url:a}=e;((e,t,r,a,s)=>{try{var i;const{title:n}=e,l=e=>e&&s[e]?s[e]:e,c={};let o=null===a||void 0===a?void 0:a.map(e=>{const t=l(e.filterType);return c[e.filterType]=!0,"".concat(t,":").concat(e.title)});null===(i=Object.keys(s))||void 0===i||i.forEach(e=>{c[e]||o.push("".concat(l(e),":all"))}),(0,d.vB)("resourceCardClick",{resourceName:n||"NA",resourceType:null!==r&&void 0!==r&&r.name?r.name:"NA",activeFilter:o.length>0?o.join("|"):"NA",cta:t})}catch(n){console.error("trackCardClick- fireCustomDataLayerEvent",n)}})(e,t,r,W,q),window.location.href=a};return(0,s.useEffect)(()=>{const e=((e,t)=>{if(!e||0===e.length)return e;if(!t||0===t.length)return e;const r={};return t.forEach(e=>{if(!e)return;if(e.isAllOption||null===e.id)return;const t=e.filterType||"default";r[t]||(r[t]=[]),r[t].push(e)}),0===Object.keys(r).length?e:e.filter(e=>!(!e.tagIds||0===e.tagIds.length)&&Object.keys(r).every(t=>r[t].some(t=>{const r=t.id;return!!r&&(e.tagIds.includes(r)||e.tagIds.some(e=>e.startsWith(r+"/")))})))})(O,W);B(e)},[W,O]),(0,s.useEffect)(()=>{X()},[]),(0,c.jsxs)("div",{className:"cmp-resourcelibrary",children:[D&&(0,c.jsx)(l.A,{}),!D&&(0,c.jsx)(i.A.MultiSelectFilter,{filterType:"resourcelibFilter",filterLabel:t,clearFilterLabel:r,emptyMessageHeading:v,emptyMessageDescription:_,filters:C,showFilters:!0,onFilter:e=>{z(e),m(e,q),(e=>{const t=new URL(window.location),r=h();["at","ind","top","pr","sol"].forEach(e=>{delete r[e]});const s={};e&&e.length>0&&e.forEach(e=>{e.filterId&&(s[e.filterType]=e.filterId)});const i=(0,a.A)((0,a.A)({},r),s);t.search="",Object.entries(i).forEach(e=>{let[r,a]=e;null!==a&&void 0!==a&&""!==a&&(Array.isArray(a)?t.searchParams.set(r,a.join(",")):t.searchParams.set(r,a))}),window.history.replaceState({},"",t.toString())})(e)},activeFilter:W,expandedFilterIds:J,items:P,itemComponent:(e,t)=>(0,c.jsx)(o,(0,a.A)((0,a.A)({},e),{},{showImage:b,linkLabel:g,descriptionLength:x,titleLength:j,getAssetTypeById:V,handleCardClick:Y}),"page-".concat(t)),perPage:f,loadMoreLabel:y,hideSearch:!0})]})}},1192:(e,t,r)=>{r.r(t),r.d(t,{default:()=>a});const a={}},1721:(e,t,r)=>{r.r(t),r.d(t,{default:()=>a.default});var a=r(1160)}}]); 2//# sourceMappingURL=resource-library.1aceaa1f.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.