"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[25],{181:(e,t,n)=>{var o=n(1),r=n(2),i=n(5),c=n(78);const u="algoliaRecommendedContextRule";(0,n(7).createEntrypoint)("collection-page-controllers",(({useSharedState:e})=>{const t=e(),{context:n,paginationInfo:a}=t((e=>({context:e.context,paginationInfo:e.paginationInfo}))),[s,f]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{f((e=>!0))}),[]),(0,i.useEffect)((()=>{if("undefined"==typeof document||!s)return;const e=n.algolia.algoliaRecommendedRuleContext;if(!("string"==typeof e&&e.length>0))return;const t=(0,c.a)({key:u});"string"==typeof t&&t.length>0&&e===t||(0,c.b)({key:u,value:e,daysToExpire:1})}),[s]),(0,i.useEffect)((()=>{"undefined"!=typeof document&&(0,c.b)({key:"hitsPerPage",value:a.perPage.toString(),daysToExpire:7})}),[s]),(0,o.jsx)(r.Fragment,{})}))},78:(e,t,n)=>{n.d(t,{a:()=>r,b:()=>i});var o=n(4);const r=({key:e})=>{try{if("undefined"==typeof document)throw new Error("Document is not defined");const t=(0,o.g)(document.cookie)[e];return null!=t?t.toString():null}catch(e){return console.error(e),null}},i=({key:e,value:t,daysToExpire:n})=>{try{if("undefined"==typeof document)throw new Error("Document is not defined");if(!JSON.stringify(t))throw new Error("Couldn't use JSON transformer");const o=new Date,r=o.getTime()+864e5*n;o.setTime(r);const i=o.toUTCString();document.cookie=`${e}=${t}; path=/; expires=${i}`}catch(e){console.error(e)}}}},e=>{e.O(0,[1,2,3,4],(()=>(181,e(e.s=181)))),e.O()}]);