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]=`311aa7c0-80a0-48c0-85ea-2b588721da52`,e._sentryDebugIdIdentifier=`sentry-dbid-311aa7c0-80a0-48c0-85ea-2b588721da52`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{Ag as t,Mt as n,Nt as r,af as i,if as a,jg as o,jt as s}from"./entry.client-mpghtlrl.js";import{R as c}from"./game-tile-gvlusypf.js";var l=t(),u=e(o(),1),d=1500,f=(e,t)=>{let o=(0,l.c)(21),f;o[0]===t?f=o[1]:(f=t===void 0?{}:t,o[0]=t,o[1]=f);let{settleTimeoutMs:p,settleFallbackDelayMs:m,dwellMs:h}=f,g=p===void 0?d:p,_=m===void 0?500:m,v=n(),y=s(),b=r(),x;o[2]!==v||o[3]!==e||o[4]!==y?(x=v&&!!e&&y(e),o[2]=v,o[3]=e,o[4]=y,o[5]=x):x=o[5];let S=x,C;o[6]===h?C=o[7]:(C=h===void 0?void 0:{dwellMs:h},o[6]=h,o[7]=C);let w=c(S?e:null,C),T;o[8]!==S||o[9]!==b||o[10]!==e||o[11]!==g||o[12]!==_?(T=()=>{if(!S)return;let t=i(()=>{b(e,{source:`view-settled`,mode:`assets-only`})},{timeout:g,fallbackDelayMs:_});return()=>{a(t)}},o[8]=S,o[9]=b,o[10]=e,o[11]=g,o[12]=_,o[13]=T):T=o[13];let E;return o[14]!==y||o[15]!==e||o[16]!==S||o[17]!==b||o[18]!==_||o[19]!==g?(E=[y,e,S,b,_,g],o[14]=y,o[15]=e,o[16]=S,o[17]=b,o[18]=_,o[19]=g,o[20]=E):E=o[20],(0,u.useEffect)(T,E),w};export{f as t};