1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[918],{50918:function(e,l,a){a.r(l);var t=a(85893),s=a(67294),r=a(98388),i=a(8711),o=a(33168),d=a(41664),c=a.n(d),n=a(2036),x=a(57517),u=a(18690),m=a(26037);let f=e=>{let{categories:l,categoryId:a,handleCategoryChange:r}=e,{primaryBrand:i}=(0,o.YX)(),[d,c]=(0,s.useState)(!1);(0,s.useEffect)(()=>{c(!1)},[a]);let n="rounded-none px-4 py-2 border-none w-full justify-center";return(0,t.jsxs)("div",{className:"w-full text-black mb-12",children:[(0,t.jsx)("div",{className:"lg:hidden mb-4",children:(0,t.jsx)(u.Z,{ctaConfig:{label:"Selected Category: ".concat(a||"ALL"),target:"",textColour:"black",variant:"dahlia"},showIcon:!1,onClick:()=>c(!d)})}),(0,t.jsxs)("div",{className:"flex-col lg:flex-row ".concat(d?"flex":"hidden"," gap-x-4 gap-y-4 lg:flex"),children:[(0,t.jsx)(u.Z,{className:n,ctaConfig:{label:"All",target:"",bgColour:a?"gray":i,textColour:"white",variant:"dahlia"},onClick:()=>r(""),showIcon:!1}),l.map(e=>{var l,s;return(0,t.jsx)(u.Z,{className:n,ctaConfig:{label:null===(l=e.attributes)||void 0===l?void 0:l.name,target:"",bgColour:a===(null===(s=e.attributes)||void 0===s?void 0:s.name)?i:"gray",textColour:"white",variant:"dahlia"},showIcon:!1,onClick:()=>{var l;return r(null===(l=e.attributes)||void 0===l?void 0:l.name)}},e.id)})]})]})},b=e=>{var l,a,s,r,i,d,m,f;let{article:b}=e,{secondaryBrand:h}=(0,o.YX)(),{slug:p,title:v,image:g,summary:y}=b.attributes;return(0,t.jsxs)(c(),{href:"/".concat(p),className:"hover:scale-105 transition flex flex-col items-stretch",children:[(0,t.jsx)("div",{className:"relative",children:(0,t.jsx)("div",{className:"border-b-[10px]",style:{borderColor:h,boxShadow:"0px 9px 5px #d3d3d3"},children:(0,t.jsx)(n.Z,{classNames:"w-full h-0 pb-[100%]",src:(0,x.$0)(null==g?void 0:null===(a=g.data)||void 0===a?void 0:null===(l=a.attributes)||void 0===l?void 0:l.url),alt:null==g?void 0:null===(r=g.data)||void 0===r?void 0:null===(s=r.attributes)||void 0===s?void 0:s.alternativeText,objectFit:"cover",blurDataURL:(0,x.$0)(null==g?void 0:null===(f=g.data)||void 0===f?void 0:null===(m=f.attributes)||void 0===m?void 0:null===(d=m.formats)||void 0===d?void 0:null===(i=d.thumbnail)||void 0===i?void 0:i.url),placeholder:"blur"})})}),(0,t.jsxs)("div",{className:"flex flex-col h-full justify-between",children:[(0,t.jsx)("h2",{className:"mt-4 font-display text-black text-2xl truncate",children:v}),(0,t.jsx)("p",{className:"pt-1 line-clamp-2",style:{color:h||"black"},children:y}),(0,t.jsx)(u.Z,{className:"border-b-0 sm:w-full text-xl md:text-base hover:scale-100 hover:opacity-50",py:"py-2",iconColour:h,ctaConfig:{label:"Read More",target:"",textColour:"black",variant:"dahlia"}})]})]})},h=()=>(0,t.jsx)("div",{className:"rounded-md w-full",children:(0,t.jsxs)("div",{className:"flex animate-pulse flex-col items-center justify-center",children:[(0,t.jsx)("div",{className:"w-full h-0 pb-[100%] bg-gray-300 rounded"}),(0,t.jsx)("div",{className:"w-full h-9 mt-6 mb-2 bg-gray-300 rounded"}),(0,t.jsx)("div",{className:"w-full h-10 mt-6 bg-gray-300 rounded"})]})}),p=e=>{let{articlesPerPage:l,error:a,isLoading:s}=e,{primaryBrand:r,applyOpacity:i}=(0,o.YX)();return s?(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 2xl:grid-cols-6 px-6 sm:px-0 gap-4 gap-x-8 gap-y-8",children:[...Array(l)].map((e,l)=>(0,t.jsx)(h,{},l))}):(0,t.jsx)("div",{style:{backgroundColor:i(r||"black",.7)},className:"flex justify-center py-4 uppercase text-white",children:(0,t.jsx)("div",{className:"text-xl font-display",children:a?"Error":"Sorry, We couldn't find what you're looking for."})})},v=e=>{let{isDisabled:l,onClick:a,children:s}=e,{primaryBrand:i}=(0,o.YX)();return(0,t.jsx)(m.Z,{type:"button",className:(0,r.m6)("flex justify-center items-center w-1/5 px-4 py-4","text-white font-medium text-lg uppercase text-left font-display","hover:scale-105","disabled:opacity-60 disabled:cursor-not-allowed"),style:{backgroundColor:i||"transparent"},onClick:a,disabled:l,children:s})};l.default=e=>{let{articles:l=[],articlesPerPage:a,categories:o=[],categoryId:d,handleCategoryChange:c,handleInputChange:n,isLoading:x,error:u,pageNumber:m,totalPages:h,setPageNumber:g}=e,y=(0,s.useRef)(null),j=(0,s.useCallback)(()=>{window.requestAnimationFrame(()=>{var e;return null===(e=y.current)||void 0===e?void 0:e.scrollIntoView()})},[]);return(0,t.jsx)("div",{className:"py-6 md:py-0 w-full flex justify-center bg-white",ref:y,children:(0,t.jsxs)("div",{className:(0,r.m6)("w-full p-4 flex flex-col",i.V,"max-w-[2048px] px-6 xl:px-28 transition-all"),children:[(0,t.jsx)("h2",{className:"font-display text-2xl text-black uppercase",children:"Filters"}),(0,t.jsx)("div",{className:"w-full flex flex-col my-4 items-center",children:(0,t.jsx)("input",{type:"text",className:"self-start font-body placeholder-black block w-full mb-2 py-2 border-b-2 border-b-black focus:outline-none",onChange:n,placeholder:"Filter by title","aria-label":"Filter by title"})}),(0,t.jsx)(f,{categories:o,categoryId:d,handleCategoryChange:c}),u||!l.length?(0,t.jsx)(p,{error:u,isLoading:x,articlesPerPage:a}):(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 px-6 sm:px-0 gap-4 gap-x-8 gap-y-8",children:l.map((e,l)=>(0,t.jsx)(b,{article:e},l))}),h>1&&(0,t.jsxs)("div",{className:"w-full flex justify-center items-center gap-x-4 mt-20",children:[(0,t.jsx)(v,{onClick:()=>{g(m-1),j()},isDisabled:m<=0,children:"Previous"}),(0,t.jsx)(v,{onClick:()=>{g(m+1),j()},isDisabled:m>=h-1,children:"Next"})]})]})})}},8711:function(e,l,a){a.d(l,{V:function(){return t}});let t="max-w-[1088px]"}}]);
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.