try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`9f89e1c8-a44c-40be-b062-0b181533a8b4`,e._sentryDebugIdIdentifier=`sentry-dbid-9f89e1c8-a44c-40be-b062-0b181533a8b4`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{Fg as t,Ig as n,ap as r}from"./entry.client-dr7r6s9a.js";var i=t(),a=e(n(),1),o=(e,t)=>{let n=(0,i.c)(7),r=(0,a.useRef)(e),o,s;n[0]===e?(o=n[1],s=n[2]):(o=()=>{r.current=e},s=[e],n[0]=e,n[1]=o,n[2]=s),(0,a.useEffect)(o,s);let c=!!e,l,u;n[3]!==t||n[4]!==c?(l=()=>{if(t==null||!c)return;let e=setInterval(()=>{r.current?.()},t);return()=>clearInterval(e)},u=[t,c],n[3]=t,n[4]=c,n[5]=l,n[6]=u):(l=n[5],u=n[6]),(0,a.useEffect)(l,u)},s=1e4,c=1e3;function l(e){if(!e)return null;let t=e.isTimerActive?Math.max(0,r(Date.now()-e.remainingTimeLastUpdatedTimestampMs)):0;return Math.max(0,e.remainingTimeInSeconds-t)}function u(e,t){let n=l(t);return{remainingTimeInSeconds:n,remainingTimeInMinutes:n===null?null:Math.ceil(n/60)}}function d(e){let t=(0,i.c)(5),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={remainingTimeInSeconds:null,remainingTimeInMinutes:null},t[0]=n):n=t[0];let[r,l]=(0,a.useReducer)(u,n),d;t[1]===e?d=t[2]:(d=()=>{l(e)},t[1]=e,t[2]=d);let f=d,p;t[3]===f?p=t[4]:(p=[f],t[3]=f,t[4]=p),(0,a.useEffect)(f,p);let m=null;return e?.isTimerActive&&r.remainingTimeInSeconds&&(m=r.remainingTimeInSeconds<60?c:s),o(f,m),r}export{d as n,l as t};