1"use strict";(self.webpackChunkdcc_frontend=self.webpackChunkdcc_frontend||[]).push([[505],{8505:function(e,a,n){n.r(a),n.d(a,{SingleCategory:function(){return j}});var t=n(5861),s=n(885),i=n(7757),o=n.n(i),l=n(7313),r=n(5785),u=n(9700),d=n(3830),c=n(1172),g=n(6123),p=n.n(g),v=(n(6225),n(6292)),h=(n(4356),n(4547)),f=n(2607),m=n(5421),C=n(4699),N=n(8732),k=n(8145),Z=n.n(k),x=n(7850),b=n(6476),w=n(6287),y=n(3161),S=n(6417),j=function(e){var a,n=Object.assign({},e),i=12,u=(0,l.useContext)(b.Ni).setPageLoading,g=n.match,k=n.client,j=(0,d.UO)(),L=j.yearSlug,P=j.monthSlug,I=(0,d.k6)(),T=(0,l.useState)(),D=(0,s.Z)(T,2),E=(D[0],D[1]),H=Me(L)?L:0,z=Me(P)?P:0,B=(0,l.useState)(""),O=(0,s.Z)(B,2),R=O[0],_=O[1],q=(0,l.useState)(""),F=(0,s.Z)(q,2),G=F[0],W=F[1],M=(0,l.useState)(""),U=(0,s.Z)(M,2),V=U[0],A=U[1],K=(0,l.useState)(""),J=(0,s.Z)(K,2),Q=J[0],X=J[1],Y=(0,l.useState)(!1),$=(0,s.Z)(Y,2),ee=$[0],ae=$[1],ne=(0,l.useState)(!0),te=(0,s.Z)(ne,2),se=te[0],ie=te[1],oe=(0,l.useState)(""),le=(0,s.Z)(oe,2),re=le[0],ue=le[1],de=(0,l.useState)([]),ce=(0,s.Z)(de,2),ge=ce[0],pe=ce[1],ve=(0,l.useState)([]),he=(0,s.Z)(ve,2),fe=he[0],me=he[1],Ce=(0,l.useState)(0),Ne=(0,s.Z)(Ce,2),ke=Ne[0],Ze=Ne[1],xe=(0,l.useState)(),be=(0,s.Z)(xe,2),we=(be[0],be[1]),ye=(0,l.useState)({page:null,categories:null,pathname:"",seo:null}),Se=(0,s.Z)(ye,2),je=Se[0],Le=Se[1],Pe=(0,l.useState)(0),Ie=(0,s.Z)(Pe,2),Te=Ie[0],De=Ie[1],Ee=(0,l.useState)(0),He=(0,s.Z)(Ee,2),ze=He[0],Be=He[1],Oe=(0,l.useState)(null),Re=(0,s.Z)(Oe,2),_e=(Re[0],Re[1]),qe=(0,l.useState)(0),Fe=(0,s.Z)(qe,2),Ge=Fe[0],We=Fe[1];function Me(e){return"string"==typeof e&&(!isNaN(e)&&!isNaN(parseFloat(e)))}var Ue=function(e,a){var n=e.split("/");"archives"===n[2]&&(X(""),pe([])),"tag"!==n[2]||R||(_(a),pe([]),X(re)),"category"!==n[2]||G||(W(a),pe([]),X(re))};(0,l.useEffect)((function(){E(I.location.pathname),X(""),pe([])}),[I.location.pathname]),(0,l.useEffect)((function(){var e,a=(null===g||void 0===g?void 0:g.url)||(null===I||void 0===I||null===(e=I.location)||void 0===e?void 0:e.pathname)||"";a&&fetch(w.Z.getRedirectCheckUrl(a)).then((function(e){return e.json()})).then((function(e){e&&e.redirect&&(window.location.href=e.redirect)})).catch((function(){}))}),[null===g||void 0===g?void 0:g.url]),(0,l.useEffect)((function(){var e=!1;ae(!0);var a=function(){var a=(0,t.Z)(o().mark((function a(){var t,s,l,r,u,d,p,v,h,f;return o().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return Ue(g.url,g.params.slug),s=null!==V&&void 0!==V&&V.node?null===V||void 0===V||null===(t=V.node)||void 0===t?void 0:t.slug:"",l=Q,r=g.url,u=c.parse(n.location.search).contributor?c.parse(n.location.search).contributor:void 0,a.next=7,k.query({query:N.Z,variables:{filter:s,postsPerPage:i,endCursor:l,tag:R,contributor:u,month:Number(z),year:Number(H),size:i,offset:Ge}});case 7:d=a.sent,e||((p=d.data.page)||(p={title:"News and Insights",slug:"news-and-insights",uri:"/news-and-insights/",acf_news_and_insights:null,seo:null}),v=[d.data.posts.edges],pe(v),Ze(d.data.posts.pageInfo.offsetPagination.total),we(d.data.posts.pageInfo.hasNextPage),ue(d.data.posts.pageInfo.endCursor),h=d.data.categories.edges,f=p.seo,Le({page:p,pathname:r,categories:h,seo:f}),setTimeout((function(){ae(!1),ie(!1)}),1e3));case 9:case"end":return a.stop()}}),a)})));return function(){return a.apply(this,arguments)}}();return a(),function(){e=!0}}),[G,Q,R,V,Ge]);var Ve=je.page,Ae=je.categories;je.seo;(0,l.useEffect)((function(){var e=null===Ae||void 0===Ae?void 0:Ae.find((function(e){return e.node.slug===g.params.slug}));A(e)}),[je,g.params.slug]);var Ke,Je=null===Ve||void 0===Ve?void 0:Ve.title;V&&(Je=null===V||void 0===V||null===(Ke=V.node)||void 0===Ke?void 0:Ke.name);(0,l.useEffect)((function(){var e=Ge+i;_e(ge.slice(Ge,e)),De(Math.ceil(ke/i))}),[Ge,Q,ge,ke]);var Qe=function(e){var a,n=e.selected*i;We(n),a="scrollToView",r.OK.scrollTo(a,{duration:1e3,smooth:!0,offset:-100})};(0,l.useEffect)((function(){u(ee)}),[ee]);var Xe,Ye,$e,ea,aa,na,ta,sa,ia,oa,la=0===(null===ge||void 0===ge||null===(a=ge[0])||void 0===a?void 0:a.length);return(0,l.useEffect)((function(){var e=!1;ae(!0);var a=function(){var a=(0,t.Z)(o().mark((function a(){var n,t,s;return o().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,k.query({query:N.Z,variables:{filter:"",postsPerPage:i,endCursor:"",tag:"",contributor:void 0,month:Number(z),year:Number(H),size:i,offset:Ge}});case 2:n=a.sent,e||(t=n.data.posts.pageInfo.offsetPagination.total,s=[n.data.posts.edges],Be(Math.ceil(t/i)),me(s));case 4:case"end":return a.stop()}}),a)})));return function(){return a.apply(this,arguments)}}();return a(),function(){e=!0}}),[Ge]),!Ve||se?(0,S.jsx)(h.Z,{}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(f.Z,{title:null===V||void 0===V||null===(Xe=V.node)||void 0===Xe||null===(Ye=Xe.seo)||void 0===Ye?void 0:Ye.opengraphTitle,yoastTitle:null===V||void 0===V||null===($e=V.node)||void 0===$e||null===(ea=$e.seo)||void 0===ea?void 0:ea.opengraphTitle,yoastDesc:null===V||void 0===V||null===(aa=V.node)||void 0===aa||null===(na=aa.seo)||void 0===na?void 0:na.opengraphDescription,fullHead:null===V||void 0===V||null===(ta=V.node)||void 0===ta||null===(sa=ta.seo)||void 0===sa?void 0:sa.fullHead}),(0,S.jsx)(m.Z,{}),(0,S.jsx)(v.Z,{pathname:I.location.pathname,showBreadcrumbs:!0,heading:la?"News & Insights":Je,backgroundColour:"bg-green",headingColour:"font-darkGrey",highlightsColour:"white",showSubHeading:!0,showGoBackLink:!1,goBackLink:"/",goBackText:"Back to Home",subHeadingColour:"font-darkGrey",backgroundPattern:"fluid",subHeading:la?"Stay up to date on the latest news and insights surrounding IP":null===V||void 0===V||null===(ia=V.node)||void 0===ia||null===(oa=ia.seo)||void 0===oa?void 0:oa.opengraphDescription,categories:Ae,setCatFilter:function(e){X(""),pe([]),W(e)},singleCatRedirect:!0,activeCategory:V}),(0,S.jsxs)("section",{id:"scrollToView",className:p()("curveWrapper",y.Z.news),children:[(0,S.jsx)("div",{className:"top bg-white"}),(0,S.jsx)("div",{className:p()("curveWrapperInner",y.Z.inner),children:(0,S.jsxs)("div",{className:y.Z.posts,children:[!la&&(null===ge||void 0===ge?void 0:ge.length)>0&&ge.map((function(e,a){return(0,S.jsx)("div",{children:(0,S.jsx)(C.Z,{activeCategory:V,posts:e})},"news-and-insights-post-page-".concat(a))})),!la&&(null===ge||void 0===ge?void 0:ge.length)>0&&(0,S.jsx)(Z(),{nextLabel:"",onPageChange:Qe,pageRangeDisplayed:3,marginPagesDisplayed:1,pageCount:Te,previousLabel:"",pageClassName:"page-item",pageLinkClassName:"page-link",previousClassName:"page-item-prev",previousLinkClassName:"page-link",nextClassName:"page-item-next",nextLinkClassName:"page-link",breakLabel:"...",breakClassName:"page-item",breakLinkClassName:"page-link",containerClassName:"news-pagination",activeClassName:"active",renderOnZeroPageCount:null}),la&&(0,S.jsxs)("div",{className:y.Z.zeroState,children:[(0,S.jsx)("h2",{children:"We couldn\u2019t find any articles at this time."}),(0,S.jsx)(x.z,{link:"/news-and-insights",className:y.Z.buttonInsight,showArrow:!1,children:"Return to News and Insights"}),(0,S.jsx)("div",{className:y.Z.zeroStateTitle,children:(0,S.jsx)("h4",{children:"Latest News"})}),(0,S.jsxs)("div",{className:y.Z.posts,children:[(null===fe||void 0===fe?void 0:fe.length)>0&&(null===fe||void 0===fe?void 0:fe.map((function(e,a){return(0,S.jsx)("div",{children:(0,S.jsx)(C.Z,{posts:e})},"news-and-insights-post-page-".concat(a))}))),(null===fe||void 0===fe?void 0:fe.length)>0&&(0,S.jsx)(Z(),{nextLabel:"",onPageChange:Qe,pageRangeDisplayed:3,marginPagesDisplayed:1,pageCount:ze,previousLabel:"",pageClassName:"page-item",pageLinkClassName:"page-link",previousClassName:"page-item-prev",previousLinkClassName:"page-link",nextClassName:"page-item-next",nextLinkClassName:"page-link",breakLabel:"...",breakClassName:"page-item",breakLinkClassName:"page-link",containerClassName:"news-pagination",activeClassName:"active",renderOnZeroPageCount:null})]})]})]})})]})]})};a.default=(0,u.C)(j)}}]);
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.