"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[40],{190:(e,t,n)=>{var o=n(1),r=n(2),i=n(4),c=n(3);const u="algoliaRecommendedContextRule";(0,n(6).createEntrypoint)("collection-page-controllers",(({useSharedState:e})=>{const t=e(),{context:n,paginationInfo:s}=t((e=>({context:e.context,paginationInfo:e.paginationInfo}))),[a,l]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{l((e=>!0))}),[]),(0,i.useEffect)((()=>{if("undefined"==typeof document||!a)return;const e=n.algolia.algoliaRecommendedRuleContext;if(!("string"==typeof e&&e.length>0))return;const t=(({key:e})=>{try{if("undefined"==typeof document)throw new Error("Document is not defined");const t=(0,c.h)(document.cookie)[e];return null!=t?t.toString():null}catch(e){return console.error(e),null}})({key:u});"string"==typeof t&&t.length>0&&e===t||(({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)}})({key:u,value:e,daysToExpire:1})}),[a]),(0,o.jsx)(r.Fragment,{})}))}},e=>{e.O(0,[1,2,3,5,4],(()=>(190,e(e.s=190)))),e.O()}]);