1import{j as e,x as P,e as Q,u as V,A as $,m as p,S as z,h as X,c as Z,E as H}from"./index.20260729.4.js";import{u as Y,F as T}from"./indexDkKCpgkS.js";import{L as U}from"./LargeCardCDehTFnO.js";import{L}from"./LoadingBDxUwJiP.js";import{u as ee}from"./useFilterPanelMaxHeightDcC_PdsI.js";import{M as se,L as te}from"./indexC7KDBhmx.js";const re="_contentWrapper_snr5s_1",ie="_img_snr5s_17",ne="_content_snr5s_1",ae="_errorWrapper_snr5s_143",le="_loadMoreError_snr5s_195",oe="_similarResults_snr5s_219",de="_cardsWrapper_snr5s_247",ce="_resultsList_snr5s_275",pe="_cardWrapper_snr5s_287",ue="_filtersOpen_snr5s_313",r={contentWrapper:re,img:ie,content:ne,errorWrapper:ae,loadMoreError:le,similarResults:oe,cardsWrapper:de,resultsList:ce,cardWrapper:pe,filtersOpen:ue},q=({msg:t})=>e.jsx("div",{className:r.errorWrapper,children:e.jsx("h4",{children:t==="string"?t:"No results found. Try changing your filter selection."})}),D={hidden:{scale:0,opacity:0,y:200},visible:{scale:1,opacity:1,y:0},exit:{scale:0,opacity:0,y:200}},A=({Title:t,Abstract:l,ShowAbstract:i=!0})=>e.jsxs(e.Fragment,{children:[t&&e.jsx("h3",{dangerouslySetInnerHTML:{__html:t}}),l&&i&&e.jsx("p",{dangerouslySetInnerHTML:{__html:l}})]}),me=({initialSubpages:t,layoutConfig:l,_ShowPublicationDateReadTimeContentType:i,showFilters:y,shouldUseFilterLayout:_=y})=>{var G;const{filterResults:n=[],similarResultsDisplayed:u,showSimilarResults:R,error:d,loadingMore:m,loadingResults:h,filterResultsReset:o,loadMoreError:x,handleLoadResults:W}=Y(),s=o?t:n||t,{isDesktop:j}=Q(),c=ee(),a=l==="3-Col",b=!!(s!=null&&s.filter(Boolean).length),f=!c&&j&&a&&b&&!h,N=a?`${Math.floor(((G=document.querySelector("#page"))==null?void 0:G.getBoundingClientRect().width)/3.5)}px`:"100%",{storybookInstance:v}=V();return e.jsx($,{mode:"wait",children:h?e.jsx(p.div,{style:{display:"flex",justifyContent:"center",margin:"0 auto"},variants:v?{}:D,exit:"exit",initial:"hidden",animate:"visible",children:e.jsx(z,{loading:h,style:{margin:"40px 10px"}})}):e.jsxs(e.Fragment,{children:[d&&e.jsxs(e.Fragment,{children:[e.jsx(q,{msg:d}),!!(s&&s.length)&&e.jsx("div",{className:r.similarResults,children:e.jsx("p",{children:"You might be interested in"})})]}),e.jsxs("div",{className:r.cardsWrapper,children:[e.jsx(p.div,{initial:{display:a?"none":"grid"},animate:{display:a?"none":"grid"}
1,children:s==null?void 0:s.filter(Boolean).map(({Url:C,ID:g={Guid:C},Title:S,Abstract:w,Img:M,ReadTime:E,PublicationDate:F,ShowPublicationDateReadTimeContentType:B,ContentType:I,FeaturedText:O,BlockLinkURLText:k})=>e.jsx("div",{style:{width:N},children:e.jsx(U,{BlockLinkURLText:k,loadingIndication:!0,uuid:X(),tileWidth:M.Width,Title:S,Url:C,variant:D,isDesktop:j,Img:M,Abstract:w,ReadTime:E,PublicationDate:F,ShowPublicationDateReadTimeContentType:B&&i,ContentType:I,FeaturedText:O},"LargeCard"+g.Guid)},g.Guid))}),e.jsx(se,{reducedMotion:c?"always":"never",children:e.jsx(te,{id:"showcase-filter-results",children:e.jsx(p.div,{className:Z(r.resultsList,{[r.filtersOpen]:_}),initial:{display:a?"grid":"none"},animate:{display:a?"grid":"none"},transition:c?{duration:0}:T,children:s==null?void 0:s.filter(Boolean).map(({BlockLinkURLText:C,Url:g,ID:S={Guid:g},Title:w,Img:M,ReadTime:E,PublicationDate:F,ShowPublicationDateReadTimeContentType:B,Abstract:I,ContentType:O,FeaturedText:k},K)=>e.jsx(p.div,{"data-testid":"result-item",className:r.cardWrapper,layout:f?"position":!1,layoutDependency:f?_:void 0,transition:{layout:c?{duration:0}:T},children:e.jsx(H,{BlockLinkURLText:C,index:K,Url:g,className:"related-content-card",BlockImage:M,Abstracts:!0,isDesktop:j,ReadTime:E,PublicationDate:F,ShowPublicationDateReadTimeContentType:B&&i,ContentType:O,FeaturedText:k,children:e.jsx(A,{Title:w,Abstract:I})})},S.Guid))})})}),e.jsxs("div",{style:{width:"100%"},children:[e.jsxs("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:[!d&&n.length>1&&!u&&e.jsx(L,{onClick:()=>W(),loading:m}),!d&&!u&&n.length===1&&e.jsx(L,{label:"BROWSE SIMILAR",onClick:()=>R(),loading:m})]}),x&&e.jsx("p",{className:r.loadMoreError,children:x})]})]})]})})},he=P.memo(me),xe={hidden:{scale:0,opacity:0,y:200},visible:{scale:1,opacity:1,y:0},exit:{scale:0,opacity:0,y:200}},je=({initialSubpages:t,ShowPublicationDateReadTimeContentType:l})=>{const{filterResults:i=[],similarResultsDisplayed:y,showSimilarResults:_,error:n,loadingMore:u,loadingResults:R,filterResultsReset:d,loadMoreError:m,handleLoadResults:h}=Y(),o=d?t:i||t;return e.jsx($,{mode:"wait",children:R?e.jsx(p.div,{"data-testid":"results-loader",style:{display:"flex",justifyContent:"center",margin:"0 auto"},variants:xe,exit:"exit",initial:"hidden",animate:"visible",children:e.jsx(z,{loading:R,style:{margin:"40px 10px"}})}):e.jsxs(e.Fragment,{children:[n&&e.jsxs(e.Fragment,{children:[e.jsx(q,{msg:n}),!!(o&&o.length)&&e.jsx("div",{className:r.similarResults,children:e.jsx("p",{children:"You might be interested in"})})]}),e.jsxs("div",{className:r.cardsWrapper,children:[e.jsx(p.div,{"data-testid":"results-wrapper",initial:{gap:"50px 10px",display:"grid"},children:o==null?void 0:o.map(({Url:x,ID:W={Guid:x},Title:s,Abstract:j,Img:c,ReadTime:a,PublicationDate:b,BlockLinkURLText:f,ContentType:N},v)=>e.jsx("div",{"data-testid":"result-item",children:e.jsx(H,{BlockLinkURLText:f,Url:x,className:"related-content-card",BlockImage:c,index:v,isDesktop:!1,Title:s,ReadTime:a,PublicationDate:b,ShowPublicationDateReadTimeContentType:l,ContentType:N,children:e.jsx(A,{ShowAbstract:l,Title:s,Abstract:j})},"RelatedContentCard"+v)},W.Guid))}),e.jsxs("div",{style:{width:"100%"},children:[e.jsxs("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:[!n&&i.length>1&&!y&&e.jsx(L,{onClick:()=>h(),loading:u}),!n&&!y&&i.length===1&&e.jsx(L,{label:"BROWSE SIMILAR",onClick:()=>_(),loading:u})]}),m&&e.jsx("p",{className:r.loadMoreError,children:m})]})]})]})})},J=P.memo(je),Ce=Object.freeze(Object.defineProperty({__proto__:null,FilterResultsMobile:J},Symbol.toStringTag,{value:"Module"})),Me=Object.freeze(Object.defineProperty({__proto__:null,FilterResults:he,FilterResultsMobile:J,RelatedContentCardChildren:A},Symbol.toStringTag,{value:"Module"}));export{Ce as F,Me as i};
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.