1import{r as u}from"./react-vendor-P5XnYvWb.js";const c="movie-search:midnight-theater-guest-access:v2",a="movie-search:midnight-theater-guest-notice:v1",f=360*6e4,h="movie-search-midnight-guest-access-updated",i={state:"locked",stateRevision:"",evaluatedAt:0,noticeVersion:""};let o;const r=new Set;function s(){if(typeof window>"u")return i;if(o)return o;try{const e=window.localStorage.getItem(c),t=e?JSON.parse(e):void 0;o=w(t)??i}catch{o=i}return o}function l(e){if(typeof window>"u")return;const t=e.expires_at?Date.parse(e.expires_at):void 0,n={state:e.state==="unlocked"&&e.proof&&t&&t>Date.now()?"unlocked":"locked",stateRevision:e.state_revision,evaluatedAt:Date.now(),proof:e.proof,expiresAt:t,noticeVersion:e.notice_version,policyVersion:e.policy_version};window.localStorage.setItem(c,JSON.stringify(n)),d(n)}function v(){const e=s();return e.state==="unlocked"&&e.proof&&(e.expiresAt??0)>Date.now()?e.proof:void 0}function y(e,t=Date.now()){const n=s();return n.stateRevision!==e||t-n.evaluatedAt>=f||n.state==="unlocked"&&(n.expiresAt??0)<=t}function m(){if(typeof window>"u")return!1;const e=s();return e.state!=="unlocked"||!e.noticeVersion||(e.expiresAt??0)<=Date.now()?!1:window.localStorage.getItem(a)!==e.noticeVersion}function A(){if(typeof window>"u")return;const e=s();e.noticeVersion&&window.localStorage.setItem(a,e.noticeVersion),d({...e})}function p(e){if(r.add(e),typeof window>"u")return()=>r.delete(e);const t=n=>{n.key!==c&&n.key!==a||(o=void 0,e())};return window.addEventListener("storage",t),()=>{r.delete(e),window.removeEventListener("storage",t)}}function S(){return u.useSyncExternalStore(p,s,()=>i)}function d(e){o=e,r.forEach(t=>t()),window.dispatchEvent(new Event(h))}function w(e){if(!e||typeof e!="object")return;const t=e;if(!(t.state!=="locked"&&t.state!=="unlocked"||typeof t.stateRevision!="string"||typeof t.evaluatedAt!="number"||typeof t.noticeVersion!="string"))return t}export{v as a,A as b,m as i,s as r,y as s,S as u,l as w};
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.