r&&(r=m),_=l[L+1],_y&&(y=_),C=l[L+2],Cx&&(x=C);r===f&&(r=255,f=0),y===p&&(y=255,p=0),x===E&&(x=255,E=0);let O,M,V,Z,K,J;if(A>0)O=r+A*(255-r),M=f-A*(f-0),V=y+A*(255-y),Z=p-A*(p-0),K=x+A*(255-x),J=E-A*(E-0);else{const L=(r+f)*.5;O=r+A*(r-L),M=f+A*(f-L);const B=(y+p)*.5;V=y+A*(y-B),Z=p+A*(p-B);const et=(x+E)*.5;K=x+A*(x-et),J=E+A*(E-et)}for(let L=0;LE?A:E;const O=p,M=m,V=360/M*Math.PI/180;for(let Z=0;ZE?A:E;const O=p,M=m,V=0;let Z,K;for(x=0;xl&&(B=L,et=0,I=-1),r=0;r=0&&O=0&&M=0&&O=0&&M=1020?255:0}return p}function Eg(d,l,u){const f=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],r=Math.round(Math.sqrt(f.length)),m=Math.floor(r/2),p=[];for(let y=0;y=0&&O=0&&M=u))for(let L=V;L=f)continue;const B=(u*L+J)*4;E+=p[B+0],x+=p[B+1],C+=p[B+2],A+=p[B+3],K+=1}E=E/K,x=x/K,C=C/K,A=A/K;for(let J=O;J=u))for(let L=V;L=f)continue;const B=(u*L+J)*4;p[B+0]=E,p[B+1]=x,p[B+2]=C,p[B+3]=A}}};N.addGetterSetter(pt,"pixelSize",8,vt(),N.afterSetFilter);const Ag=function(d){const l=Math.round(this.levels()*254)+1,u=d.data,f=u.length,r=255/l;for(let m=0;m255?255:d<0?0:Math.round(d)});N.addGetterSetter(pt,"green",0,function(d){return this._filterUpToDate=!1,d>255?255:d<0?0:Math.round(d)});N.addGetterSetter(pt,"blue",0,u3,N.afterSetFilter);const Mg=function(d){const l=d.data,u=l.length,f=this.red(),r=this.green(),m=this.blue(),p=this.alpha();for(let y=0;y255?255:d<0?0:Math.round(d)});N.addGetterSetter(pt,"green",0,function(d){return this._filterUpToDate=!1,d>255?255:d<0?0:Math.round(d)});N.addGetterSetter(pt,"blue",0,u3,N.afterSetFilter);N.addGetterSetter(pt,"alpha",1,function(d){return this._filterUpToDate=!1,d>1?1:d<0?0:d});const Ng=function(d){const l=d.data,u=l.length;for(let f=0;f=128&&(u[f]=255-r,u[f+1]=255-m,u[f+2]=255-p)}return d},Rg=function(d){const l=this.threshold()*255,u=d.data,f=u.length;for(let r=0;ruu||(a.current=Hf[uu],Hf[uu]=null,uu--)}function M(a,n){uu++,Hf[uu]=a.current,a.current=n}function V(a){return a>>>=0,a===0?32:31-(Uf(a)/x0|0)|0}function Z(a){var n=a&42;if(n!==0)return n;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function K(a,n,c){var o=a.pendingLanes;if(o===0)return 0;var v=0,S=a.suspendedLanes,T=a.pingedLanes;a=a.warmLanes;var G=o&134217727;return G!==0?(o=G&~S,o!==0?v=Z(o):(T&=G,T!==0?v=Z(T):c||(c=G&~a,c!==0&&(v=Z(c))))):(G=o&~S,G!==0?v=Z(G):T!==0?v=Z(T):c||(c=o&~a,c!==0&&(v=Z(c)))),v===0?0:n!==0&&n!==v&&(n&S)===0&&(S=v&-v,c=n&-n,S>=c||S===32&&(c&4194048)!==0)?n:v}function J(a,n){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&n)===0}function L(a,n){switch(a){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function B(){var a=cs;return cs<<=1,(cs&62914560)===0&&(cs=4194304),a}function et(a){for(var n=[],c=0;31>c;c++)n.push(a);return n}function I(a,n){a.pendingLanes|=n,n!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function F(a,n,c,o,v,S){var T=a.pendingLanes;a.pendingLanes=c,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=c,a.entangledLanes&=c,a.errorRecoveryDisabledLanes&=c,a.shellSuspendCounter=0;var G=a.entanglements,P=a.expirationTimes,st=a.hiddenUpdates;for(c=T&~c;0)":-1v||P[o]!==st[v]){var mt=`
+`+P[o].replace(" at new "," at ");return a.displayName&&mt.includes("")&&(mt=mt.replace("",a.displayName)),mt}while(1<=o&&0<=v);break}}}finally{mc=!1,Error.prepareStackTrace=c}return(c=a?a.displayName||a.name:"")?St(c):""}function ct(a,n){switch(a.tag){case 26:case 27:case 5:return St(a.type);case 16:return St("Lazy");case 13:return a.child!==n&&n!==null?St("Suspense Fallback"):St("Suspense");case 19:return St("SuspenseList");case 0:case 15:return U(a.type,!1);case 11:return U(a.type.render,!1);case 1:return U(a.type,!0);case 31:return St("Activity");default:return""}}function ft(a){try{var n="",c=null;do n+=ct(a,c),c=a,a=a.return;while(a);return n}catch(o){return`
+Error generating stack: `+o.message+`
+`+o.stack}}function xt(a,n){if(typeof a=="object"&&a!==null){var c=bo.get(a);return c!==void 0?c:(n={value:a,source:n,stack:ft(n)},bo.set(a,n),n)}return{value:a,source:n,stack:ft(n)}}function Mt(a,n){Yn[fn++]=gc,Yn[fn++]=_e,_e=a,gc=n}function R(a,n,c){Al[ol++]=Ea,Al[ol++]=Yl,Al[ol++]=zl,zl=a;var o=Ea;a=Yl;var v=32-Ia(o)-1;o&=~(1<>=T,v-=T,Ea=1<<32-Ia(n)+v|c<ie?(ya=Ht,Ht=null):ya=Ht.sibling;var re=_t(w,Ht,k[ie],ht);if(re===null){Ht===null&&(Ht=ya);break}a&&Ht&&re.alternate===null&&n(w,Ht),q=S(re,q,ie),Qe===null?Gt=re:Qe.sibling=re,Qe=re,Ht=ya}if(ie===k.length)return c(w,Ht),$t&&Mt(w,ie),Gt;if(Ht===null){for(;ieie?(ya=Ht,Ht=null):ya=Ht.sibling;var Hl=_t(w,Ht,re.value,ht);if(Hl===null){Ht===null&&(Ht=ya);break}a&&Ht&&Hl.alternate===null&&n(w,Ht),q=S(Hl,q,ie),Qe===null?Gt=Hl:Qe.sibling=Hl,Qe=Hl,Ht=ya}if(re.done)return c(w,Ht),$t&&Mt(w,ie),Gt;if(Ht===null){for(;!re.done;ie++,re=k.next())re=rt(w,re.value,ht),re!==null&&(q=S(re,q,ie),Qe===null?Gt=re:Qe.sibling=re,Qe=re);return $t&&Mt(w,ie),Gt}for(Ht=o(Ht);!re.done;ie++,re=k.next())re=Lt(Ht,w,ie,re.value,ht),re!==null&&(a&&re.alternate!==null&&Ht.delete(re.key===null?ie:re.key),q=S(re,q,ie),Qe===null?Gt=re:Qe.sibling=re,Qe=re);return a&&Ht.forEach(function(Cd){return n(w,Cd)}),$t&&Mt(w,ie),Gt}function Ni(w,q,k,ht){if(typeof k=="object"&&k!==null&&k.type===$i&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case un:t:{for(var Gt=k.key;q!==null;){if(q.key===Gt){if(Gt=k.type,Gt===$i){if(q.tag===7){c(w,q.sibling),ht=v(q,k.props.children),ht.return=w,w=ht;break t}}else if(q.elementType===Gt||typeof Gt=="object"&&Gt!==null&&Gt.$$typeof===qa&&kn(Gt)===q.type){c(w,q.sibling),ht=v(q,k.props),Nu(ht,k),ht.return=w,w=ht;break t}c(w,q);break}else n(w,q);q=q.sibling}k.type===$i?(ht=El(k.props.children,w.mode,ht,k.key),ht.return=w,w=ht):(ht=Dn(k.type,k.key,k.props,null,w.mode,ht),Nu(ht,k),ht.return=w,w=ht)}return T(w);case Ii:t:{for(Gt=k.key;q!==null;){if(q.key===Gt)if(q.tag===4&&q.stateNode.containerInfo===k.containerInfo&&q.stateNode.implementation===k.implementation){c(w,q.sibling),ht=v(q,k.children||[]),ht.return=w,w=ht;break t}else{c(w,q);break}else n(w,q);q=q.sibling}ht=Yr(k,w.mode,ht),ht.return=w,w=ht}return T(w);case qa:return k=kn(k),Ni(w,q,k,ht)}if(gi(k))return va(w,q,k,ht);if(x(k)){if(Gt=x(k),typeof Gt!="function")throw Error(r(150));return k=Gt.call(k),vs(w,q,k,ht)}if(typeof k.then=="function")return Ni(w,q,Uc(k),ht);if(k.$$typeof===xl)return Ni(w,q,za(w,k),ht);Hs(w,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,q!==null&&q.tag===6?(c(w,q.sibling),ht=v(q,k),ht.return=w,w=ht):(c(w,q),ht=Ur(k,w.mode,ht),ht.return=w,w=ht),T(w)):c(w,q)}return function(w,q,k,ht){try{fu=0;var Gt=Ni(w,q,k,ht);return bi=null,Gt}catch(Ht){if(Ht===ra||Ht===Rl)throw Ht;var Qe=u(29,Ht,null,w.mode);return Qe.lanes=ht,Qe.return=w,Qe}finally{}}}function Ou(){for(var a=hn,n=ru=hn=0;nS?S:8);var T=Rt.T,G={};Rt.T=G,Pc(a,!1,n,c);try{var P=v(),st=Rt.S;if(st!==null&&st(G,P),P!==null&&typeof P=="object"&&typeof P.then=="function"){var mt=Gc(P,o);Zs(a,n,mt,Ne(a))}else Zs(a,n,o,Ne(a))}catch(rt){Zs(a,n,{then:function(){},status:"rejected",reason:rt},Ne())}finally{It(S),T!==null&&G.types!==null&&(T.types=G.types),Rt.T=T}}function oh(a){var n=a.memoizedState;if(n!==null)return n;n={memoizedState:lu,baseState:lu,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ul,lastRenderedState:lu},next:null};var c={};return n.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ul,lastRenderedState:c},next:null},a.memoizedState=n,a=a.alternate,a!==null&&(a.memoizedState=n),n}function gr(){return _a(nu)}function kc(){return Me().memoizedState}function hh(){return Me().memoizedState}function dd(a){for(var n=a.return;n!==null;){switch(n.tag){case 24:case 3:var c=Ne();a=Kl(c);var o=$n(n,a,c);o!==null&&(Ye(o,n,c),Us(o,n,c)),n={cache:Dc()},a.payload=n;return}n=n.return}}function md(a,n,c){var o=Ne();c={lane:o,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Ic(a)?mh(n,c):(c=Bc(a,n,c,o),c!==null&&(Ye(c,a,o),gh(c,n,o)))}function dh(a,n,c){var o=Ne();Zs(a,n,c,o)}function Zs(a,n,c,o){var v={lane:o,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(Ic(a))mh(n,v);else{var S=a.alternate;if(a.lanes===0&&(S===null||S.lanes===0)&&(S=n.lastRenderedReducer,S!==null))try{var T=n.lastRenderedState,G=S(T,c);if(v.hasEagerState=!0,v.eagerState=G,ke(G,T))return Ru(a,n,v,0),Wt===null&&Ou(),!1}catch{}finally{}if(c=Bc(a,n,v,o),c!==null)return Ye(c,a,o),gh(c,n,o),!0}return!1}function Pc(a,n,c,o){if(o={lane:2,revertLane:nr(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Ic(a)){if(n)throw Error(r(479))}else n=Bc(a,c,o,2),n!==null&&Ye(n,a,2)}function Ic(a){var n=a.alternate;return a===Vt||n!==null&&n===Vt}function mh(a,n){Kt=Jt=!0;var c=a.pending;c===null?n.next=n:(n.next=c.next,c.next=n),a.pending=n}function gh(a,n,c){if((c&4194048)!==0){var o=n.lanes;o&=a.pendingLanes,c|=o,n.lanes=c,it(a,c)}}function pr(a,n,c,o){n=a.memoizedState,c=c(o,n),c=c==null?n:Sf({},n,c),a.memoizedState=c,a.lanes===0&&(a.updateQueue.baseState=c)}function $c(a,n,c,o,v,S,T){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(o,S,T):n.prototype&&n.prototype.isPureReactComponent?!Yi(c,o)||!Yi(v,S):!0}function ph(a,n,c,o){a=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(c,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(c,o),n.state!==a&&yc.enqueueReplaceState(n,n.state,null)}function Zi(a,n){var c=n;if("ref"in n){c={};for(var o in n)o!=="ref"&&(c[o]=n[o])}if(a=a.defaultProps){c===n&&(c=Sf({},c));for(var v in a)c[v]===void 0&&(c[v]=a[v])}return c}function tf(a,n){try{var c=a.onUncaughtError;c(n.value,{componentStack:n.stack})}catch(o){setTimeout(function(){throw o})}}function vr(a,n,c){try{var o=a.onCaughtError;o(c.value,{componentStack:c.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function yr(a,n,c){return c=Kl(c),c.tag=3,c.payload={element:null},c.callback=function(){tf(a,n)},c}function vh(a){return a=Kl(a),a.tag=3,a}function yh(a,n,c,o){var v=c.type.getDerivedStateFromError;if(typeof v=="function"){var S=o.value;a.payload=function(){return v(S)},a.callback=function(){vr(n,c,o)}}var T=c.stateNode;T!==null&&typeof T.componentDidCatch=="function"&&(a.callback=function(){vr(n,c,o),typeof v!="function"&&(Qn===null?Qn=new Set([this]):Qn.add(this));var G=o.stack;this.componentDidCatch(o.value,{componentStack:G!==null?G:""})})}function gd(a,n,c,o,v){if(c.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=c.alternate,n!==null&&Wn(n,c,v,!0),c=tl.current,c!==null){switch(c.tag){case 31:case 13:return Qa===null?Pu():c.alternate===null&&Xe===0&&(Xe=3),c.flags&=-257,c.flags|=65536,c.lanes=v,o===on?c.flags|=16384:(n=c.updateQueue,n===null?c.updateQueue=new Set([o]):n.add(o),ts(a,o,v)),!1;case 22:return c.flags|=65536,o===on?c.flags|=16384:(n=c.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},c.updateQueue=n):(c=n.retryQueue,c===null?n.retryQueue=new Set([o]):c.add(o)),ts(a,o,v)),!1}throw Error(r(435,c.tag))}return ts(a,o,v),Pu(),!1}if($t)return n=tl.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=v,o!==Qf&&(a=Error(r(422),{cause:o}),Di(xt(a,c)))):(o!==Qf&&(n=Error(r(423),{cause:o}),Di(xt(n,c))),a=a.current.alternate,a.flags|=65536,v&=-v,a.lanes|=v,o=xt(o,c),v=yr(a.stateNode,o,v),Yc(a,v),Xe!==4&&(Xe=2)),!1;var S=Error(r(520),{cause:o});if(S=xt(S,c),_c===null?_c=[S]:_c.push(S),Xe!==4&&(Xe=2),n===null)return!0;o=xt(o,c),c=n;do{switch(c.tag){case 3:return c.flags|=65536,a=v&-v,c.lanes|=a,a=yr(c.stateNode,o,a),Yc(c,a),!1;case 1:if(n=c.type,S=c.stateNode,(c.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(Qn===null||!Qn.has(S))))return c.flags|=65536,v&=-v,c.lanes|=v,v=vh(v),yh(v,a,c,o),Yc(c,v),!1}c=c.return}while(c!==null);return!1}function ba(a,n,c,o){n.child=a===null?xo(n,null,c,o):Ta(n,a.child,c,o)}function Sh(a,n,c,o,v){c=c.render;var S=n.ref;if("ref"in o){var T={};for(var G in o)G!=="ref"&&(T[G]=o[G])}else T=o;return Gi(n),o=Gu(a,n,c,T,S,v),G=jc(),a!==null&&!Ae?(sr(a,n,v),Wl(a,n,v)):($t&&G&&tt(n),n.flags|=1,ba(a,n,o,v),n.child)}function _h(a,n,c,o,v){if(a===null){var S=c.type;return typeof S=="function"&&!Fi(S)&&S.defaultProps===void 0&&c.compare===null?(n.tag=15,n.type=S,bh(a,n,S,o,v)):(a=Dn(c.type,null,o,n,n.mode,v),a.ref=n.ref,a.return=n,n.child=a)}if(S=a.child,!ws(a,v)){var T=S.memoizedProps;if(c=c.compare,c=c!==null?c:Yi,c(T,o)&&a.ref===n.ref)return Wl(a,n,v)}return n.flags|=1,a=fl(S,o),a.ref=n.ref,a.return=n,n.child=a}function bh(a,n,c,o,v){if(a!==null){var S=a.memoizedProps;if(Yi(S,o)&&a.ref===n.ref)if(Ae=!1,n.pendingProps=o=S,ws(a,v))(a.flags&131072)!==0&&(Ae=!0);else return n.lanes=a.lanes,Wl(a,n,v)}return af(a,n,c,o,v)}function Eh(a,n,c,o){var v=o.children,S=a!==null?a.memoizedState:null;if(a===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((n.flags&128)!==0){if(S=S!==null?S.baseLanes|c:c,a!==null){for(o=n.child=a.child,v=0;o!==null;)v=v|o.lanes|o.childLanes,o=o.sibling;o=v&~S}else o=0,n.child=null;return Xu(a,n,S,c,o)}if((c&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},a!==null&&Bi(n,S!==null?S.cachePool:null),S!==null?Du(n,S):ti(),ei(n);else return o=n.lanes=536870912,Xu(a,n,S!==null?S.baseLanes|c:c,c,o)}else S!==null?(Bi(n,S.cachePool),Du(n,S),nl(),n.memoizedState=null):(a!==null&&Bi(n,null),ti(),nl());return ba(a,n,v,c),n.child}function Ki(a,n){return a!==null&&a.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Xu(a,n,c,o,v){var S=Au();return S=S===null?null:{parent:We?De._currentValue:De._currentValue2,pool:S},n.memoizedState={baseLanes:c,cachePool:S},a!==null&&Bi(n,null),ti(),ei(n),a!==null&&Wn(a,n,o,!0),n.childLanes=v,null}function ef(a,n){return n=ni({mode:n.mode,children:n.children},a.mode),n.ref=a.ref,a.child=n,n.return=a,n}function Sr(a,n,c){return Ta(n,a.child,null,c),a=ef(n,n.pendingProps),a.flags|=2,il(n),n.memoizedState=null,a}function xh(a,n,c){var o=n.pendingProps,v=(n.flags&128)!==0;if(n.flags&=-129,a===null){if($t){if(o.mode==="hidden")return a=ef(n,o),n.lanes=536870912,Ki(null,a);if(qc(n),(a=Re)?(a=uo(a,La),a!==null&&(n.memoizedState={dehydrated:a,treeContext:zl!==null?{id:Ea,overflow:Yl}:null,retryLane:536870912,hydrationErrors:null},c=Br(a),c.return=n,n.child=c,ca=n,Re=null)):a=null,a===null)throw me(n);return n.lanes=536870912,null}return ef(n,o)}var S=a.memoizedState;if(S!==null){var T=S.dehydrated;if(qc(n),v)if(n.flags&256)n.flags&=-257,n=Sr(a,n,c);else if(n.memoizedState!==null)n.child=a.child,n.flags|=128,n=null;else throw Error(r(558));else if(Ae||Wn(a,n,c,!1),v=(c&a.childLanes)!==0,Ae||v){if(o=Wt,o!==null&&(T=Et(o,c),T!==0&&T!==S.retryLane))throw S.retryLane=T,Pn(a,T),Ye(o,a,T),Va;Pu(),n=Sr(a,n,c)}else a=S.treeContext,Oe&&(Re=u0(T),ca=n,$t=!0,rn=null,La=!1,a!==null&&Tt(n,a)),n=ef(n,o),n.flags|=4096;return n}return a=fl(a.child,{mode:o.mode,children:o.children}),a.ref=n.ref,n.child=a,a.return=n,a}function Ks(a,n){var c=n.ref;if(c===null)a!==null&&a.ref!==null&&(n.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(r(284));(a===null||a.ref!==c)&&(n.flags|=4194816)}}function af(a,n,c,o,v){return Gi(n),c=Gu(a,n,c,o,void 0,v),o=jc(),a!==null&&!Ae?(sr(a,n,v),Wl(a,n,v)):($t&&o&&tt(n),n.flags|=1,ba(a,n,c,v),n.child)}function _r(a,n,c,o,v,S){return Gi(n),n.updateQueue=null,c=wl(n,o,c,v),Ys(a),o=jc(),a!==null&&!Ae?(sr(a,n,S),Wl(a,n,S)):($t&&o&&tt(n),n.flags|=1,ba(a,n,c,S),n.child)}function wi(a,n,c,o,v){if(Gi(n),n.stateNode===null){var S=sn,T=c.contextType;typeof T=="object"&&T!==null&&(S=_a(T)),S=new c(o,S),n.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,S.updater=yc,n.stateNode=S,S._reactInternals=n,S=n.stateNode,S.props=o,S.state=n.memoizedState,S.refs={},Ma(n),T=c.contextType,S.context=typeof T=="object"&&T!==null?_a(T):sn,S.state=n.memoizedState,T=c.getDerivedStateFromProps,typeof T=="function"&&(pr(n,c,T,o),S.state=n.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(T=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),T!==S.state&&yc.enqueueReplaceState(S,S.state,null),qi(n,o,S,v),xn(),S.state=n.memoizedState),typeof S.componentDidMount=="function"&&(n.flags|=4194308),o=!0}else if(a===null){S=n.stateNode;var G=n.memoizedProps,P=Zi(c,G);S.props=P;var st=S.context,mt=c.contextType;T=sn,typeof mt=="object"&&mt!==null&&(T=_a(mt));var rt=c.getDerivedStateFromProps;mt=typeof rt=="function"||typeof S.getSnapshotBeforeUpdate=="function",G=n.pendingProps!==G,mt||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(G||st!==T)&&ph(n,S,o,T),hl=!1;var _t=n.memoizedState;S.state=_t,qi(n,o,S,v),xn(),st=n.memoizedState,G||_t!==st||hl?(typeof rt=="function"&&(pr(n,c,rt,o),st=n.memoizedState),(P=hl||$c(n,c,P,o,_t,st,T))?(mt||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(n.flags|=4194308)):(typeof S.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=st),S.props=o,S.state=st,S.context=T,o=P):(typeof S.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{S=n.stateNode,In(a,n),T=n.memoizedProps,mt=Zi(c,T),S.props=mt,rt=n.pendingProps,_t=S.context,st=c.contextType,P=sn,typeof st=="object"&&st!==null&&(P=_a(st)),G=c.getDerivedStateFromProps,(st=typeof G=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(T!==rt||_t!==P)&&ph(n,S,o,P),hl=!1,_t=n.memoizedState,S.state=_t,qi(n,o,S,v),xn();var Lt=n.memoizedState;T!==rt||_t!==Lt||hl||a!==null&&a.dependencies!==null&&xu(a.dependencies)?(typeof G=="function"&&(pr(n,c,G,o),Lt=n.memoizedState),(mt=hl||$c(n,c,mt,o,_t,Lt,P)||a!==null&&a.dependencies!==null&&xu(a.dependencies))?(st||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(o,Lt,P),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(o,Lt,P)),typeof S.componentDidUpdate=="function"&&(n.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof S.componentDidUpdate!="function"||T===a.memoizedProps&&_t===a.memoizedState||(n.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||T===a.memoizedProps&&_t===a.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=Lt),S.props=o,S.state=Lt,S.context=P,o=mt):(typeof S.componentDidUpdate!="function"||T===a.memoizedProps&&_t===a.memoizedState||(n.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||T===a.memoizedProps&&_t===a.memoizedState||(n.flags|=1024),o=!1)}return S=o,Ks(a,n),o=(n.flags&128)!==0,S||o?(S=n.stateNode,c=o&&typeof c.getDerivedStateFromError!="function"?null:S.render(),n.flags|=1,a!==null&&o?(n.child=Ta(n,a.child,null,v),n.child=Ta(n,null,c,v)):ba(a,n,c,v),n.memoizedState=S.state,a=n.child):a=Wl(a,n,v),a}function Th(a,n,c,o){return Jn(),n.flags|=256,ba(a,n,c,o),n.child}function br(a){return{baseLanes:a,cachePool:Fn()}}function Er(a,n,c){return a=a!==null?a.childLanes&~c:0,n&&(a|=Za),a}function xr(a,n,c){var o=n.pendingProps,v=!1,S=(n.flags&128)!==0,T;if((T=S)||(T=a!==null&&a.memoizedState===null?!1:(Ke.current&2)!==0),T&&(v=!0,n.flags&=-129),T=(n.flags&32)!==0,n.flags&=-33,a===null){if($t){if(v?Tn(n):nl(),(a=Re)?(a=r0(a,La),a!==null&&(n.memoizedState={dehydrated:a,treeContext:zl!==null?{id:Ea,overflow:Yl}:null,retryLane:536870912,hydrationErrors:null},c=Br(a),c.return=n,n.child=c,ca=n,Re=null)):a=null,a===null)throw me(n);return zf(a)?n.lanes=32:n.lanes=536870912,null}var G=o.children;return o=o.fallback,v?(nl(),v=n.mode,G=ni({mode:"hidden",children:G},v),o=El(o,v,c,null),G.return=n,o.return=n,G.sibling=o,n.child=G,o=n.child,o.memoizedState=br(c),o.childLanes=Er(a,T,c),n.memoizedState=hu,Ki(null,o)):(Tn(n),lf(n,G))}var P=a.memoizedState;if(P!==null&&(G=P.dehydrated,G!==null)){if(S)n.flags&256?(Tn(n),n.flags&=-257,n=Ji(a,n,c)):n.memoizedState!==null?(nl(),n.child=a.child,n.flags|=128,n=null):(nl(),G=o.fallback,v=n.mode,o=ni({mode:"visible",children:o.children},v),G=El(G,v,c,null),G.flags|=2,o.return=n,G.return=n,o.sibling=G,n.child=o,Ta(n,a.child,null,c),o=n.child,o.memoizedState=br(c),o.childLanes=Er(a,T,c),n.memoizedState=hu,n=Ki(null,o));else if(Tn(n),zf(G))T=Mf(G).digest,o=Error(r(419)),o.stack="",o.digest=T,Di({value:o,source:null,stack:null}),n=Ji(a,n,c);else if(Ae||Wn(a,n,c,!1),T=(c&a.childLanes)!==0,Ae||T){if(T=Wt,T!==null&&(o=Et(T,c),o!==0&&o!==P.retryLane))throw P.retryLane=o,Pn(a,o),Ye(T,a,o),Va;vi(G)||Pu(),n=Ji(a,n,c)}else vi(G)?(n.flags|=192,n.child=a.child,n=null):(a=P.treeContext,Oe&&(Re=s0(G),ca=n,$t=!0,rn=null,La=!1,a!==null&&Tt(n,a)),n=lf(n,o.children),n.flags|=4096);return n}return v?(nl(),G=o.fallback,v=n.mode,P=a.child,S=P.sibling,o=fl(P,{mode:"hidden",children:o.children}),o.subtreeFlags=P.subtreeFlags&65011712,S!==null?G=fl(S,G):(G=El(G,v,c,null),G.flags|=2),G.return=n,o.return=n,o.sibling=G,n.child=o,Ki(null,o),o=n.child,G=a.child.memoizedState,G===null?G=br(c):(v=G.cachePool,v!==null?(P=We?De._currentValue:De._currentValue2,v=v.parent!==P?{parent:P,pool:P}:v):v=Fn(),G={baseLanes:G.baseLanes|c,cachePool:v}),o.memoizedState=G,o.childLanes=Er(a,T,c),n.memoizedState=hu,Ki(a.child,o)):(Tn(n),c=a.child,a=c.sibling,c=fl(c,{mode:"visible",children:o.children}),c.return=n,c.sibling=null,a!==null&&(T=n.deletions,T===null?(n.deletions=[a],n.flags|=16):T.push(a)),n.child=c,n.memoizedState=null,c)}function lf(a,n){return n=ni({mode:"visible",children:n},a.mode),n.return=a,a.child=n}function ni(a,n){return a=u(22,a,null,n),a.lanes=0,a}function Ji(a,n,c){return Ta(n,a.child,null,c),a=lf(n,n.pendingProps.children),a.flags|=2,n.memoizedState=null,a}function Ch(a,n,c){a.lanes|=n;var o=a.alternate;o!==null&&(o.lanes|=n),Rc(a.return,n,c)}function Qu(a,n,c,o,v,S){var T=a.memoizedState;T===null?a.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:c,tailMode:v,treeForkCount:S}:(T.isBackwards=n,T.rendering=null,T.renderingStartTime=0,T.last=o,T.tail=c,T.tailMode=v,T.treeForkCount=S)}function Tr(a,n,c){var o=n.pendingProps,v=o.revealOrder,S=o.tail;o=o.children;var T=Ke.current,G=(T&2)!==0;if(G?(T=T&1|2,n.flags|=128):T&=1,M(Ke,T),ba(a,n,o,c),o=$t?gc:0,!G&&a!==null&&(a.flags&128)!==0)t:for(a=n.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&Ch(a,c,n);else if(a.tag===19)Ch(a,c,n);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break t;for(;a.sibling===null;){if(a.return===null||a.return===n)break t;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(v){case"forwards":for(c=n.child,v=null;c!==null;)a=c.alternate,a!==null&&Bs(a)===null&&(v=c),c=c.sibling;c=v,c===null?(v=n.child,n.child=null):(v=c.sibling,c.sibling=null),Qu(n,!1,v,c,S,o);break;case"backwards":case"unstable_legacy-backwards":for(c=null,v=n.child,n.child=null;v!==null;){if(a=v.alternate,a!==null&&Bs(a)===null){n.child=v;break}a=v.sibling,v.sibling=c,c=v,v=a}Qu(n,!0,c,null,S,o);break;case"together":Qu(n,!1,null,null,void 0,o);break;default:n.memoizedState=null}return n.child}function Wl(a,n,c){if(a!==null&&(n.dependencies=a.dependencies),Xn|=n.lanes,(c&n.childLanes)===0)if(a!==null){if(Wn(a,n,c,!1),(c&n.childLanes)===0)return null}else return null;if(a!==null&&n.child!==a.child)throw Error(r(153));if(n.child!==null){for(a=n.child,c=fl(a,a.pendingProps),n.child=c,c.return=n;a.sibling!==null;)a=a.sibling,c=c.sibling=fl(a,a.pendingProps),c.return=n;c.sibling=null}return n.child}function ws(a,n){return(a.lanes&n)!==0?!0:(a=a.dependencies,!!(a!==null&&xu(a)))}function Cr(a,n,c){switch(n.tag){case 3:jt(n,n.stateNode.containerInfo),Vl(n,De,a.memoizedState.cache),Jn();break;case 27:case 5:fe(n);break;case 4:jt(n,n.stateNode.containerInfo);break;case 10:Vl(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,qc(n),null;break;case 13:var o=n.memoizedState;if(o!==null)return o.dehydrated!==null?(Tn(n),n.flags|=128,null):(c&n.child.childLanes)!==0?xr(a,n,c):(Tn(n),a=Wl(a,n,c),a!==null?a.sibling:null);Tn(n);break;case 19:var v=(a.flags&128)!==0;if(o=(c&n.childLanes)!==0,o||(Wn(a,n,c,!1),o=(c&n.childLanes)!==0),v){if(o)return Tr(a,n,c);n.flags|=128}if(v=n.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),M(Ke,Ke.current),o)break;return null;case 22:return n.lanes=0,Eh(a,n,c,n.pendingProps);case 24:Vl(n,De,a.memoizedState.cache)}return Wl(a,n,c)}function Ar(a,n,c){if(a!==null)if(a.memoizedProps!==n.pendingProps)Ae=!0;else{if(!ws(a,c)&&(n.flags&128)===0)return Ae=!1,Cr(a,n,c);Ae=(a.flags&131072)!==0}else Ae=!1,$t&&(n.flags&1048576)!==0&&R(n,gc,n.index);switch(n.lanes=0,n.tag){case 16:t:{var o=n.pendingProps;if(a=kn(n.elementType),n.type=a,typeof a=="function")Fi(a)?(o=Zi(a,o),n.tag=1,n=wi(null,n,a,o,c)):(n.tag=0,n=af(null,n,a,o,c));else{if(a!=null){var v=a.$$typeof;if(v===es){n.tag=11,n=Sh(null,n,a,o,c);break t}else if(v===bf){n.tag=14,n=_h(null,n,a,o,c);break t}}throw n=C(a)||a,Error(r(306,n,""))}}return n;case 0:return af(a,n,n.type,n.pendingProps,c);case 1:return o=n.type,v=Zi(o,n.pendingProps),wi(a,n,o,v,c);case 3:t:{if(jt(n,n.stateNode.containerInfo),a===null)throw Error(r(387));var S=n.pendingProps;v=n.memoizedState,o=v.element,In(a,n),qi(n,S,null,c);var T=n.memoizedState;if(S=T.cache,Vl(n,De,S),S!==v.cache&&Gs(n,[De],c,!0),xn(),S=T.element,Oe&&v.isDehydrated)if(v={element:S,isDehydrated:!1,cache:T.cache},n.updateQueue.baseState=v,n.memoizedState=v,n.flags&256){n=Th(a,n,S,c);break t}else if(S!==o){o=xt(Error(r(424)),n),Di(o),n=Th(a,n,S,c);break t}else for(Oe&&(Re=i0(n.stateNode.containerInfo),ca=n,$t=!0,rn=null,La=!0),c=xo(n,null,S,c),n.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Jn(),S===o){n=Wl(a,n,c);break t}ba(a,n,S,c)}n=n.child}return n;case 26:if(Cl)return Ks(a,n),a===null?(c=oo(n.type,null,n.pendingProps,null))?n.memoizedState=c:$t||(n.stateNode=Df(n.type,n.pendingProps,xa.current,n)):n.memoizedState=oo(n.type,a.memoizedProps,n.pendingProps,a.memoizedState),null;case 27:if(sa)return fe(n),a===null&&sa&&$t&&(o=n.stateNode=Gf(n.type,n.pendingProps,xa.current,ga.current,!1),ca=n,La=!0,Re=io(n.type,o,Re)),ba(a,n,n.pendingProps.children,c),Ks(a,n),a===null&&(n.flags|=4194304),n.child;case 5:return a===null&&$t&&(S0(n.type,n.pendingProps,ga.current),(v=o=Re)&&(o=c0(o,n.type,n.pendingProps,La),o!==null?(n.stateNode=o,ca=n,Re=n0(o),La=!1,v=!0):v=!1),v||me(n)),fe(n),v=n.type,S=n.pendingProps,T=a!==null?a.memoizedProps:null,o=S.children,ja(v,S)?o=null:T!==null&&ja(v,T)&&(n.flags|=32),n.memoizedState!==null&&(v=Gu(a,n,pl,null,null,c),We?nu._currentValue=v:nu._currentValue2=v),Ks(a,n),ba(a,n,o,c),n.child;case 6:return a===null&&$t&&(ro(n.pendingProps,ga.current),(a=c=Re)&&(c=f0(c,n.pendingProps,La),c!==null?(n.stateNode=c,ca=n,Re=null,a=!0):a=!1),a||me(n)),null;case 13:return xr(a,n,c);case 4:return jt(n,n.stateNode.containerInfo),o=n.pendingProps,a===null?n.child=Ta(n,null,o,c):ba(a,n,o,c),n.child;case 11:return Sh(a,n,n.type,n.pendingProps,c);case 7:return ba(a,n,n.pendingProps,c),n.child;case 8:return ba(a,n,n.pendingProps.children,c),n.child;case 12:return ba(a,n,n.pendingProps.children,c),n.child;case 10:return o=n.pendingProps,Vl(n,n.type,o.value),ba(a,n,o.children,c),n.child;case 9:return v=n.type._context,o=n.pendingProps.children,Gi(n),v=_a(v),o=o(v),n.flags|=1,ba(a,n,o,c),n.child;case 14:return _h(a,n,n.type,n.pendingProps,c);case 15:return bh(a,n,n.type,n.pendingProps,c);case 19:return Tr(a,n,c);case 31:return xh(a,n,c);case 22:return Eh(a,n,c,n.pendingProps);case 24:return Gi(n),o=_a(De),a===null?(v=Au(),v===null&&(v=Wt,S=Dc(),v.pooledCache=S,S.refCount++,S!==null&&(v.pooledCacheLanes|=c),v=S),n.memoizedState={parent:o,cache:v},Ma(n),Vl(n,De,v)):((a.lanes&c)!==0&&(In(a,n),qi(n,null,null,c),xn()),v=a.memoizedState,S=n.memoizedState,v.parent!==o?(v={parent:o,cache:o},n.memoizedState=v,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=v),Vl(n,De,o)):(o=S.cache,Vl(n,De,o),o!==v.cache&&Gs(n,[De],c,!0))),ba(a,n,n.pendingProps.children,c),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function vl(a){a.flags|=4}function Js(a){rl&&(a.flags|=8)}function Ah(a,n){if(a!==null&&a.child===n.child)return!1;if((n.flags&16)!==0)return!0;for(a=n.child;a!==null;){if((a.flags&8218)!==0||(a.subtreeFlags&8218)!==0)return!0;a=a.sibling}return!1}function zr(a,n,c,o){if(ae)for(c=n.child;c!==null;){if(c.tag===5||c.tag===6)sc(a,c.stateNode);else if(!(c.tag===4||sa&&c.tag===27)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===n)break;for(;c.sibling===null;){if(c.return===null||c.return===n)return;c=c.return}c.sibling.return=c.return,c=c.sibling}else if(rl)for(var v=n.child;v!==null;){if(v.tag===5){var S=v.stateNode;c&&o&&(S=t0(S,v.type,v.memoizedProps)),sc(a,S)}else if(v.tag===6)S=v.stateNode,c&&o&&(S=lo(S,v.memoizedProps)),sc(a,S);else if(v.tag!==4){if(v.tag===22&&v.memoizedState!==null)S=v.child,S!==null&&(S.return=v),zr(a,v,!0,!0);else if(v.child!==null){v.child.return=v,v=v.child;continue}}if(v===n)break;for(;v.sibling===null;){if(v.return===null||v.return===n)return;v=v.return}v.sibling.return=v.return,v=v.sibling}}function zh(a,n,c,o){var v=!1;if(rl)for(var S=n.child;S!==null;){if(S.tag===5){var T=S.stateNode;c&&o&&(T=t0(T,S.type,S.memoizedProps)),eo(a,T)}else if(S.tag===6)T=S.stateNode,c&&o&&(T=lo(T,S.memoizedProps)),eo(a,T);else if(S.tag!==4){if(S.tag===22&&S.memoizedState!==null)v=S.child,v!==null&&(v.return=S),zh(a,S,!0,!0),v=!0;else if(S.child!==null){S.child.return=S,S=S.child;continue}}if(S===n)break;for(;S.sibling===null;){if(S.return===null||S.return===n)return v;S=S.return}S.sibling.return=S.return,S=S.sibling}return v}function Mh(a,n){if(rl&&Ah(a,n)){a=n.stateNode;var c=a.containerInfo,o=to();zh(o,n,!1,!1),a.pendingChildren=o,vl(n),$h(c,o)}}function Mr(a,n,c,o){if(ae)a.memoizedProps!==o&&vl(n);else if(rl){var v=a.stateNode,S=a.memoizedProps;if((a=Ah(a,n))||S!==o){var T=ga.current;S=Ih(v,c,S,o,!a,null),S===v?n.stateNode=v:(Js(n),ka(S,c,o,T)&&vl(n),n.stateNode=S,a&&zr(S,n,!1,!1))}else n.stateNode=v}}function Ba(a,n,c,o,v){if((a.mode&32)!==0&&(c===null?cc(n,o):us(n,c,o))){if(a.flags|=16777216,(v&335544128)===v||Vr(n,o))if(qe(a.stateNode,n,o))a.flags|=8192;else if(ee())a.flags|=8192;else throw Xa=on,Zf}else a.flags&=-16777217}function Vu(a,n){if(po(n)){if(a.flags|=16777216,!vo(n))if(ee())a.flags|=8192;else throw Xa=on,Zf}else a.flags&=-16777217}function Ws(a,n){n!==null&&(a.flags|=4),a.flags&16384&&(n=a.tag!==22?B():536870912,a.lanes|=n,gs|=n)}function Zu(a,n){if(!$t)switch(a.tailMode){case"hidden":n=a.tail;for(var c=null;n!==null;)n.alternate!==null&&(c=n),n=n.sibling;c===null?a.tail=null:c.sibling=null;break;case"collapsed":c=a.tail;for(var o=null;c!==null;)c.alternate!==null&&(o=c),c=c.sibling;o===null?n||a.tail===null?a.tail=null:a.tail.sibling=null:o.sibling=null}}function be(a){var n=a.alternate!==null&&a.alternate.child===a.child,c=0,o=0;if(n)for(var v=a.child;v!==null;)c|=v.lanes|v.childLanes,o|=v.subtreeFlags&65011712,o|=v.flags&65011712,v.return=a,v=v.sibling;else for(v=a.child;v!==null;)c|=v.lanes|v.childLanes,o|=v.subtreeFlags,o|=v.flags,v.return=a,v=v.sibling;return a.subtreeFlags|=o,a.childLanes=c,n}function Nh(a,n,c){var o=n.pendingProps;switch(dt(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return be(n),null;case 1:return be(n),null;case 3:return c=n.stateNode,o=null,a!==null&&(o=a.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),_n(De),Xt(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(a===null||a.child===null)&&(wn(n)?vl(n):a===null||a.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Sn())),Mh(a,n),be(n),null;case 26:if(Cl){var v=n.type,S=n.memoizedState;return a===null?(vl(n),S!==null?(be(n),Vu(n,S)):(be(n),Ba(n,v,null,o,c))):S?S!==a.memoizedState?(vl(n),be(n),Vu(n,S)):(be(n),n.flags&=-16777217):(S=a.memoizedProps,ae?S!==o&&vl(n):Mr(a,n,v,o),be(n),Ba(n,v,S,o,c)),null}case 27:if(sa){if(oa(n),c=xa.current,v=n.type,a!==null&&n.stateNode!=null)ae?a.memoizedProps!==o&&vl(n):Mr(a,n,v,o);else{if(!o){if(n.stateNode===null)throw Error(r(166));return be(n),null}a=ga.current,wn(n)?Eu(n,a):(a=Gf(v,o,c,a,!0),n.stateNode=a,vl(n))}return be(n),null}case 5:if(oa(n),v=n.type,a!==null&&n.stateNode!=null)Mr(a,n,v,o);else{if(!o){if(n.stateNode===null)throw Error(r(166));return be(n),null}if(S=ga.current,wn(n))Eu(n,S),p0(n.stateNode,v,o,S)&&(n.flags|=64);else{var T=Xr(v,o,xa.current,S,n);Js(n),zr(T,n,!1,!1),n.stateNode=T,ka(T,v,o,S)&&vl(n)}}return be(n),Ba(n,n.type,a===null?null:a.memoizedProps,n.pendingProps,c),null;case 6:if(a&&n.stateNode!=null)c=a.memoizedProps,ae?c!==o&&vl(n):rl&&(c!==o?(a=xa.current,c=ga.current,Js(n),n.stateNode=Un(o,a,c,n)):n.stateNode=a.stateNode);else{if(typeof o!="string"&&n.stateNode===null)throw Error(r(166));if(a=xa.current,c=ga.current,wn(n)){if(!Oe)throw Error(r(176));if(a=n.stateNode,c=n.memoizedProps,o=null,v=ca,v!==null)switch(v.tag){case 27:case 5:o=v.memoizedProps}_d(a,c,n,o)||me(n,!0)}else Js(n),n.stateNode=Un(o,a,c,n)}return be(n),null;case 31:if(c=n.memoizedState,a===null||a.memoizedState!==null){if(o=wn(n),c!==null){if(a===null){if(!o)throw Error(r(318));if(!Oe)throw Error(r(556));if(a=n.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));so(a,n)}else Jn(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;be(n),a=!1}else c=Sn(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=c),a=!0;if(!a)return n.flags&256?(il(n),n):(il(n),null);if((n.flags&128)!==0)throw Error(r(558))}return be(n),null;case 13:if(o=n.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(v=wn(n),o!==null&&o.dehydrated!==null){if(a===null){if(!v)throw Error(r(318));if(!Oe)throw Error(r(344));if(v=n.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(r(317));h0(v,n)}else Jn(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;be(n),v=!1}else v=Sn(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=v),v=!0;if(!v)return n.flags&256?(il(n),n):(il(n),null)}return il(n),(n.flags&128)!==0?(n.lanes=c,n):(c=o!==null,a=a!==null&&a.memoizedState!==null,c&&(o=n.child,v=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(v=o.alternate.memoizedState.cachePool.pool),S=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(S=o.memoizedState.cachePool.pool),S!==v&&(o.flags|=2048)),c!==a&&c&&(n.child.flags|=8192),Ws(n,n.updateQueue),be(n),null);case 4:return Xt(),Mh(a,n),a===null&&Se(n.stateNode.containerInfo),be(n),null;case 10:return _n(n.type),be(n),null;case 19:if(O(Ke),o=n.memoizedState,o===null)return be(n),null;if(v=(n.flags&128)!==0,S=o.rendering,S===null)if(v)Zu(o,!1);else{if(Xe!==0||a!==null&&(a.flags&128)!==0)for(a=n.child;a!==null;){if(S=Bs(a),S!==null){for(n.flags|=128,Zu(o,!1),a=S.updateQueue,n.updateQueue=a,Ws(n,a),n.subtreeFlags=0,a=c,c=n.child;c!==null;)pf(c,a),c=c.sibling;return M(Ke,Ke.current&1|2),$t&&Mt(n,o.treeForkCount),n.child}a=a.sibling}o.tail!==null&&Da()>Mi&&(n.flags|=128,v=!0,Zu(o,!1),n.lanes=4194304)}else{if(!v)if(a=Bs(S),a!==null){if(n.flags|=128,v=!0,a=a.updateQueue,n.updateQueue=a,Ws(n,a),Zu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!S.alternate&&!$t)return be(n),null}else 2*Da()-o.renderingStartTime>Mi&&c!==536870912&&(n.flags|=128,v=!0,Zu(o,!1),n.lanes=4194304);o.isBackwards?(S.sibling=n.child,n.child=S):(a=o.last,a!==null?a.sibling=S:n.child=S,o.last=S)}return o.tail!==null?(a=o.tail,o.rendering=a,o.tail=a.sibling,o.renderingStartTime=Da(),a.sibling=null,c=Ke.current,M(Ke,v?c&1|2:c&1),$t&&Mt(n,o.treeForkCount),a):(be(n),null);case 22:case 23:return il(n),ea(),o=n.memoizedState!==null,a!==null?a.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(c&536870912)!==0&&(n.flags&128)===0&&(be(n),n.subtreeFlags&6&&(n.flags|=8192)):be(n),c=n.updateQueue,c!==null&&Ws(n,c.retryQueue),c=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==c&&(n.flags|=2048),a!==null&&O(_i),null;case 24:return c=null,a!==null&&(c=a.memoizedState.cache),n.memoizedState.cache!==c&&(n.flags|=2048),_n(De),be(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function Nr(a,n){switch(dt(n),n.tag){case 1:return a=n.flags,a&65536?(n.flags=a&-65537|128,n):null;case 3:return _n(De),Xt(),a=n.flags,(a&65536)!==0&&(a&128)===0?(n.flags=a&-65537|128,n):null;case 26:case 27:case 5:return oa(n),null;case 31:if(n.memoizedState!==null){if(il(n),n.alternate===null)throw Error(r(340));Jn()}return a=n.flags,a&65536?(n.flags=a&-65537|128,n):null;case 13:if(il(n),a=n.memoizedState,a!==null&&a.dehydrated!==null){if(n.alternate===null)throw Error(r(340));Jn()}return a=n.flags,a&65536?(n.flags=a&-65537|128,n):null;case 19:return O(Ke),null;case 4:return Xt(),null;case 10:return _n(n.type),null;case 22:case 23:return il(n),ea(),a!==null&&O(_i),a=n.flags,a&65536?(n.flags=a&-65537|128,n):null;case 24:return _n(De),null;case 25:return null;default:return null}}function Oh(a,n){switch(dt(n),n.tag){case 3:_n(De),Xt();break;case 26:case 27:case 5:oa(n);break;case 4:Xt();break;case 31:n.memoizedState!==null&&il(n);break;case 13:il(n);break;case 19:O(Ke);break;case 10:_n(n.type);break;case 22:case 23:il(n),ea(),a!==null&&O(_i);break;case 24:_n(De)}}function Fl(a,n){try{var c=n.updateQueue,o=c!==null?c.lastEffect:null;if(o!==null){var v=o.next;c=v;do{if((c.tag&a)===a){o=void 0;var S=c.create,T=c.inst;o=S(),T.destroy=o}c=c.next}while(c!==v)}}catch(G){Bt(n,n.return,G)}}function kl(a,n,c){try{var o=n.updateQueue,v=o!==null?o.lastEffect:null;if(v!==null){var S=v.next;o=S;do{if((o.tag&a)===a){var T=o.inst,G=T.destroy;if(G!==void 0){T.destroy=void 0,v=n;var P=c,st=G;try{st()}catch(mt){Bt(v,P,mt)}}}o=o.next}while(o!==S)}}catch(mt){Bt(n,n.return,mt)}}function Ku(a){var n=a.updateQueue;if(n!==null){var c=a.stateNode;try{Li(n,c)}catch(o){Bt(a,a.return,o)}}}function nf(a,n,c){c.props=Zi(a.type,a.memoizedProps),c.state=a.memoizedState;try{c.componentWillUnmount()}catch(o){Bt(a,n,o)}}function wu(a,n){try{var c=a.ref;if(c!==null){switch(a.tag){case 26:case 27:case 5:var o=ls(a.stateNode);break;case 30:o=a.stateNode;break;default:o=a.stateNode}typeof c=="function"?a.refCleanup=c(o):c.current=o}}catch(v){Bt(a,n,v)}}function Ra(a,n){var c=a.ref,o=a.refCleanup;if(c!==null)if(typeof o=="function")try{o()}catch(v){Bt(a,n,v)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(v){Bt(a,n,v)}else c.current=null}function Wi(a){var n=a.type,c=a.memoizedProps,o=a.stateNode;try{Zh(o,n,c,a)}catch(v){Bt(a,a.return,v)}}function Fs(a,n,c){try{Kh(a.stateNode,a.type,c,n,a)}catch(o){Bt(a,a.return,o)}}function Or(a){return a.tag===5||a.tag===3||(Cl?a.tag===26:!1)||(sa?a.tag===27&&iu(a.type):!1)||a.tag===4}function zn(a){t:for(;;){for(;a.sibling===null;){if(a.return===null||Or(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(sa&&a.tag===27&&iu(a.type)||a.flags&2||a.child===null||a.tag===4)continue t;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function uf(a,n,c){var o=a.tag;if(o===5||o===6)a=a.stateNode,n?Jh(c,a,n):kr(c,a);else if(o!==4&&(sa&&o===27&&iu(a.type)&&(c=a.stateNode,n=null),a=a.child,a!==null))for(uf(a,n,c),a=a.sibling;a!==null;)uf(a,n,c),a=a.sibling}function ks(a,n,c){var o=a.tag;if(o===5||o===6)a=a.stateNode,n?wh(c,a,n):Fr(c,a);else if(o!==4&&(sa&&o===27&&iu(a.type)&&(c=a.stateNode),a=a.child,a!==null))for(ks(a,n,c),a=a.sibling;a!==null;)ks(a,n,c),a=a.sibling}function Rr(a,n,c){a=a.containerInfo;try{ao(a,c)}catch(o){Bt(n,n.return,o)}}function Rh(a){var n=a.stateNode,c=a.memoizedProps;try{la(a.type,c,n,a)}catch(o){Bt(a,a.return,o)}}function pd(a,n){for(Ef(a.containerInfo),Pe=n;Pe!==null;)if(a=Pe,n=a.child,(a.subtreeFlags&1028)!==0&&n!==null)n.return=a,Pe=n;else for(;Pe!==null;){a=Pe;var c=a.alternate;switch(n=a.flags,a.tag){case 0:if((n&4)!==0&&(n=a.updateQueue,n=n!==null?n.events:null,n!==null))for(var o=0;o";case hs:return":has("+(Fu(a)||"")+")";case ds:return'[role="'+a.value+'"]';case Ti:return'"'+a.value+'"';case Sc:return'[data-testname="'+a.value+'"]';default:throw Error(r(365))}}function ku(a,n){var c=[];a=[a,0];for(var o=0;oc?32:c;c=Rt.T;var v=Tl();try{It(o),Rt.T=null,o=Jf,Jf=null;var S=Vn,T=gn;if(ia=0,gu=Vn=null,gn=0,(kt&6)!==0)throw Error(r(331));var G=kt;if(kt|=4,rf(S.current),cf(S,S.current,T,o),kt=G,Ui(0,!1),$a&&typeof $a.onPostCommitFiberRoot=="function")try{$a.onPostCommitFiberRoot(cu,S)}catch{}return!0}finally{It(v),Rt.T=c,gf(a,n)}}function hi(a,n,c){n=xt(c,n),n=yr(a.stateNode,n,2),a=$n(a,n,2),a!==null&&(I(a,2),Zl(a))}function Bt(a,n,c){if(a.tag===3)hi(a,a,c);else for(;n!==null;){if(n.tag===3){hi(n,a,c);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Qn===null||!Qn.has(o))){a=xt(c,a),c=vh(2),o=$n(n,c,2),o!==null&&(yh(c,o,n,a),I(o,2),Zl(o));break}}n=n.return}}function ts(a,n,c){var o=a.pingCache;if(o===null){o=a.pingCache=new gl;var v=new Set;o.set(n,v)}else v=o.get(n),v===void 0&&(v=new Set,o.set(n,v));v.has(c)||(Ai=!0,v.add(c),a=Bh.bind(null,a,n,c),n.then(a,a))}function Bh(a,n,c){var o=a.pingCache;o!==null&&o.delete(n),a.pingedLanes|=a.suspendedLanes&c,a.warmLanes&=~c,Wt===a&&(te&c)===c&&(Xe===4||Xe===3&&(te&62914560)===te&&300>Da()-bc?(kt&2)===0&&Ze(a,0):ms|=c,gs===te&&(gs=0)),Zl(a)}function Yh(a,n){n===0&&(n=B()),a=Pn(a,n),a!==null&&(I(a,n),Zl(a))}function vd(a){var n=a.memoizedState,c=0;n!==null&&(c=n.retryLane),Yh(a,c)}function yd(a,n){var c=0;switch(a.tag){case 31:case 13:var o=a.stateNode,v=a.memoizedState;v!==null&&(c=v.retryLane);break;case 19:o=a.stateNode;break;case 22:o=a.stateNode._retryCache;break;default:throw Error(r(314))}o!==null&&o.delete(n),Yh(a,c)}function aa(a,n){return hc(a,n)}function Hr(a,n,c,o){this.tag=a,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fi(a){return a=a.prototype,!(!a||!a.isReactComponent)}function fl(a,n){var c=a.alternate;return c===null?(c=u(a.tag,n,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=n,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=a.flags&65011712,c.childLanes=a.childLanes,c.lanes=a.lanes,c.child=a.child,c.memoizedProps=a.memoizedProps,c.memoizedState=a.memoizedState,c.updateQueue=a.updateQueue,n=a.dependencies,c.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},c.sibling=a.sibling,c.index=a.index,c.ref=a.ref,c.refCleanup=a.refCleanup,c}function pf(a,n){a.flags&=65011714;var c=a.alternate;return c===null?(a.childLanes=0,a.lanes=n,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=c.childLanes,a.lanes=c.lanes,a.child=c.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=c.memoizedProps,a.memoizedState=c.memoizedState,a.updateQueue=c.updateQueue,a.type=c.type,n=c.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),a}function Dn(a,n,c,o,v,S){var T=0;if(o=a,typeof a=="function")Fi(a)&&(T=1);else if(typeof a=="string")T=Cl&&sa?Rf(a,c,ga.current)?26:yo(a)?27:5:Cl?Rf(a,c,ga.current)?26:5:sa&&yo(a)?27:5;else t:switch(a){case ic:return a=u(31,c,n,v),a.elementType=ic,a.lanes=S,a;case $i:return El(c.children,v,S,n);case tu:T=8,v|=24;break;case eu:return a=u(12,c,n,v|2),a.elementType=eu,a.lanes=S,a;case _f:return a=u(13,c,n,v),a.elementType=_f,a.lanes=S,a;case Gn:return a=u(19,c,n,v),a.elementType=Gn,a.lanes=S,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case xl:T=10;break t;case nc:T=9;break t;case es:T=11;break t;case bf:T=14;break t;case qa:T=16,o=null;break t}T=29,c=Error(r(130,a===null?"null":typeof a,"")),o=null}return n=u(T,c,n,v),n.elementType=a,n.type=o,n.lanes=S,n}function El(a,n,c,o){return a=u(7,a,o,n),a.lanes=c,a}function Ur(a,n,c){return a=u(6,a,null,n),a.lanes=c,a}function Br(a){var n=u(18,null,null,0);return n.stateNode=a,n}function Yr(a,n,c){return n=u(4,a.children!==null?a.children:[],a.key,n),n.lanes=c,n.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},n}function qh(a,n,c,o,v,S,T,G,P){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Pa,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=et(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=et(0),this.hiddenUpdates=et(null),this.identifierPrefix=o,this.onUncaughtError=v,this.onCaughtError=S,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=P,this.incompleteTransitions=new Map}function di(a,n,c,o,v,S,T,G,P,st,mt,rt){return a=new qh(a,n,c,T,P,st,mt,rt,G),n=1,S===!0&&(n|=24),S=u(3,null,null,n),a.current=S,S.stateNode=a,n=Dc(),n.refCount++,a.pooledCache=n,n.refCount++,S.memoizedState={element:o,isDehydrated:c,cache:n},Ma(S),a}function vf(a){return a?(a=sn,a):sn}function ac(a){var n=a._reactInternals;if(n===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=y(n),a=a!==null?_(a):null,a===null?null:ls(a.stateNode)}function qr(a,n,c,o,v,S){v=vf(v),o.context===null?o.context=v:o.pendingContext=v,o=Kl(n),o.payload={element:c},S=S===void 0?null:S,S!==null&&(o.callback=S),c=$n(a,o,n),c!==null&&(Ye(c,a,n),Us(c,a,n))}function ki(a,n){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var c=a.retryLane;a.retryLane=c!==0&&c=st&&S>=rt&&v<=mt&&T<=_t){a.splice(n,1);break}else if(o!==st||c.width!==P.width||_tT){if(!(S!==rt||c.height!==P.height||mtv)){st>o&&(P.width+=st-o,P.x=o),mtS&&(P.height+=rt-S,P.y=S),_tc&&(c=G)),G ")+`
+
+No matching component was found for:
+ `)+a.join(" > ")}return null},wt.getPublicRootInstance=function(a){if(a=a.current,!a.child)return null;switch(a.child.tag){case 27:case 5:return ls(a.child.stateNode);default:return a.child.stateNode}},wt.injectIntoDevTools=function(){var a={bundleType:0,version:Lr,rendererPackageName:uc,currentDispatcherRef:Rt,reconcilerVersion:"19.2.0"};if(as!==null&&(a.rendererConfig=as),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")a=!1;else{var n=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(n.isDisabled||!n.supportsFiber)a=!0;else{try{cu=n.inject(a),$a=n}catch{}a=!!n.checkDCE}}return a},wt.isAlreadyRendering=function(){return(kt&6)!==0},wt.observeVisibleRects=function(a,n,c,o){if(!ua)throw Error(r(363));a=Wa(a,n);var v=Af(a,c,o).disconnect;return{disconnect:function(){v()}}},wt.shouldError=function(){return null},wt.shouldSuspend=function(){return!1},wt.startHostTransition=function(a,n,c,o){if(a.tag!==5)throw Error(r(476));var v=oh(a).queue;rh(a,v,n,lu,c===null?f:function(){var S=oh(a);return S.next===null&&(S=a.alternate.memoizedState),Zs(a,S.next.queue,{},Ne()),c(o)})},wt.updateContainer=function(a,n,c,o){var v=n.current,S=Ne();return qr(v,S,a,n,c,o),S},wt.updateContainerSync=function(a,n,c,o){return qr(n.current,2,a,n,c,o),2},wt},d.exports.default=d.exports,Object.defineProperty(d.exports,"__esModule",{value:!0})})(c1)),c1.exports}var I2;function Gg(){return I2||(I2=1,s1.exports=Dg()),s1.exports}var Hg=Gg();const Ug=ud(Hg);var f1={exports:{}},vu={};/**
+ * @license React
+ * react-reconciler-constants.production.js
+ *
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var $2;function Bg(){return $2||($2=1,vu.ConcurrentRoot=1,vu.ContinuousEventPriority=8,vu.DefaultEventPriority=32,vu.DiscreteEventPriority=2,vu.IdleEventPriority=268435456,vu.LegacyRoot=0,vu.NoEventPriority=0),vu}var t3;function Yg(){return t3||(t3=1,f1.exports=Bg()),f1.exports}var rd=Yg();const e3={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let a3=!1,l3=!1;const id=".react-konva-event",qg=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.
+Position of a node will be changed during drag&drop, so you should update state of the react app as well.
+Consider to add onDragMove or onDragEnd events.
+For more info see: https://github.com/konvajs/react-konva/issues/256
+`,jg=`ReactKonva: You are using "zIndex" attribute for a Konva node.
+react-konva may get confused with ordering. Just define correct order of elements in your render function of a component.
+For more info see: https://github.com/konvajs/react-konva/issues/194
+`,Lg={};function od(d,l,u=Lg){if(!a3&&"zIndex"in l&&(console.warn(jg),a3=!0),!l3&&l.draggable){var f=l.x!==void 0||l.y!==void 0,r=l.onDragEnd||l.onDragMove;f&&!r&&(console.warn(qg),l3=!0)}for(var m in u)if(!e3[m]){var p=m.slice(0,2)==="on",y=u[m]!==l[m];if(p&&y){var _=m.substr(2).toLowerCase();_.substr(0,7)==="content"&&(_="content"+_.substr(7,1).toUpperCase()+_.substr(8)),d.off(_,u[m])}var E=!l.hasOwnProperty(m);E&&d.setAttr(m,void 0)}var x=l._useStrictMode,C={},A=!1;const O={};for(var m in l)if(!e3[m]){var p=m.slice(0,2)==="on",M=u[m]!==l[m];if(p&&M){var _=m.substr(2).toLowerCase();_.substr(0,7)==="content"&&(_="content"+_.substr(7,1).toUpperCase()+_.substr(8)),l[m]&&(O[_]=l[m])}!p&&(l[m]!==u[m]||x&&l[m]!==d.getAttr(m))&&(A=!0,C[m]=l[m])}A&&(d.setAttrs(C),Rs(d));for(var _ in O)d.off(_+id),d.on(_+id,O[_])}function Rs(d){if(!yt.autoDrawEnabled){var l=d.getLayer()||d.getStage();l&&l.batchDraw()}}var r1=x1();const q3={},Xg={};ar.Node.prototype._applyProps=od;let j3=rd.DefaultEventPriority;function Qg(d,l){if(typeof l=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${l}`);return}d.add(l),Rs(d)}function Vg(d,l,u){let f=ar[d];f||(console.error(`Konva has no node with the type ${d}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${d}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),f=ar.Group);const r={},m={};for(var p in l)if(p!=="ref"){var y=p.slice(0,2)==="on";y?m[p]=l[p]:r[p]=l[p]}const _=new f(r);return od(_,m),_}function Zg(d,l,u){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${d}"`)}function Kg(d,l,u){return!1}function wg(d){return d}function Jg(){return null}function Wg(){return null}function Fg(d,l,u,f){return Xg}function kg(){}function Pg(d){}function Ig(d,l){return!1}function $g(){return q3}function t6(){return q3}const e6=setTimeout,a6=clearTimeout,l6=!0,n6=d=>{d()},i6=-1;function u6(d,l){return!1}const s6=!1,c6=!1,f6=!0,r6=!1,o6=!1;function h6(d,l){l.parent===d?l.moveToTop():d.add(l),Rs(d)}function d6(d,l){l.parent===d?l.moveToTop():d.add(l),Rs(d)}function L3(d,l,u){l._remove(),d.add(l),l.setZIndex(u.getZIndex()),Rs(d)}function m6(d,l,u){L3(d,l,u)}function g6(d,l){l.destroy(),l.off(id),Rs(d)}function p6(d,l){l.destroy(),l.off(id),Rs(d)}function v6(d,l,u){console.error(`Text components are not yet supported in ReactKonva. You text is: "${u}"`)}function y6(d,l,u){}function S6(d,l,u,f){od(d,f,u)}function _6(d){d.hide(),Rs(d)}function b6(d){}function E6(d,l){(l.visible==null||l.visible)&&d.show()}function x6(d,l){}function T6(d){}function C6(){}function A6(){return null}function z6(){}function M6(){}function N6(){return rd.DefaultEventPriority}function O6(){}function R6(){return null}function D6(d){j3=d}function G6(){return j3}function H6(){return rd.DiscreteEventPriority}function U6(){return!1}function B6(){}function Y6(){return null}function q6(){return-1.1}function j6(){}function L6(){return!1}function X6(){return!0}function Q6(){}function V6(){}function Z6(){return null}const K6=null,w6=Sa.createContext(null);function J6(){}const W6=Object.freeze(Object.defineProperty({__proto__:null,HostTransitionContext:w6,NotPendingTransition:K6,afterActiveInstanceBlur:M6,appendChild:h6,appendChildToContainer:d6,appendInitialChild:Qg,beforeActiveInstanceBlur:z6,cancelTimeout:a6,clearContainer:T6,commitMount:y6,commitTextUpdate:v6,commitUpdate:S6,createInstance:Vg,createTextInstance:Zg,detachDeletedInstance:C6,finalizeInitialChildren:Kg,getChildHostContext:t6,getCurrentEventPriority:N6,getCurrentUpdatePriority:G6,getInstanceFromNode:A6,getInstanceFromScope:R6,getPublicInstance:wg,getRootHostContext:$g,hideInstance:_6,hideTextInstance:b6,idlePriority:r1.unstable_IdlePriority,insertBefore:L3,insertInContainerBefore:m6,isPrimaryRenderer:s6,maySuspendCommit:L6,noTimeout:i6,now:r1.unstable_now,preloadInstance:X6,prepareForCommit:Jg,preparePortalMount:Wg,prepareScopeUpdate:O6,prepareUpdate:Fg,removeChild:g6,removeChildFromContainer:p6,requestPostPaintCallback:j6,resetAfterCommit:kg,resetFormInstance:J6,resetTextContent:Pg,resolveEventTimeStamp:q6,resolveEventType:Y6,resolveUpdatePriority:H6,run:r1.unstable_runWithPriority,scheduleMicrotask:n6,scheduleTimeout:e6,setCurrentUpdatePriority:D6,shouldAttemptEagerTransition:U6,shouldDeprioritizeSubtree:Ig,shouldSetTextContent:u6,startSuspendingCommit:Q6,supportsHydration:o6,supportsMicrotasks:l6,supportsMutation:f6,supportsPersistence:r6,suspendInstance:V6,trackSchedulerEvent:B6,unhideInstance:E6,unhideTextInstance:x6,waitForCommitToBeReady:Z6,warnsIfNotActing:c6},Symbol.toStringTag,{value:"Module"}));function X3(d,l,u){if(!d)return;if(u(d)===!0)return d;let f=d.child;for(;f;){const r=X3(f,l,u);if(r)return r;f=f.sibling}}function Q3(d){try{return Object.defineProperties(d,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return d}}const O1=Q3(de.createContext(null));class V3 extends de.Component{render(){return de.createElement(O1.Provider,{value:this._reactInternals},this.props.children)}}function F6(){const d=de.useContext(O1);if(d===null)throw new Error("its-fine: useFiber must be called within a !");const l=de.useId();return de.useMemo(()=>{for(const u of[d,d==null?void 0:d.alternate]){if(!u)continue;const f=X3(u,!1,r=>{let m=r.memoizedState;for(;m;){if(m.memoizedState===l)return!0;m=m.next}});if(f)return f}},[d,l])}const k6=Symbol.for("react.context"),P6=d=>d!==null&&typeof d=="object"&&"$$typeof"in d&&d.$$typeof===k6;function I6(){const d=F6(),[l]=de.useState(()=>new Map);l.clear();let u=d;for(;u;){const f=u.type;P6(f)&&f!==O1&&!l.has(f)&&l.set(f,de.use(Q3(f))),u=u.return}return l}function $6(){const d=I6();return de.useMemo(()=>Array.from(d.keys()).reduce((l,u)=>f=>de.createElement(l,null,de.createElement(u.Provider,{...f,value:d.get(u)})),l=>de.createElement(V3,{...l})),[d])}if(Sa.version.indexOf("19")===-1)throw new Error("react-konva version 19 is only compatible with React 19. Make sure to have the last version of react-konva and react or downgrade react-konva to version 18.");function t8(d){const l=Sa.useRef({});return Sa.useLayoutEffect(()=>{l.current=d}),Sa.useLayoutEffect(()=>()=>{l.current={}},[]),l.current}const e8=()=>{const d=Sa.useRef(0);return Sa.useMemo(()=>{d.current++},[]),d.current>1},a8=d=>{const l=Sa.useRef(null),u=Sa.useRef(null),f=Sa.useRef(null),r=t8(d),m=$6(),p=Sa.useRef(null),y=x=>{const{forwardedRef:C}=d;C&&(typeof C=="function"?C(x):C.current=x)},_=e8(),E=()=>{var x;y(null),ed.updateContainer(null,f.current,null),(x=u.current)==null||x.destroy(),u.current=null};return Sa.useLayoutEffect(()=>(p.current&&(clearTimeout(p.current),p.current=null),u.current?y(u.current):(u.current=new ar.Stage({width:d.width,height:d.height,container:l.current}),y(u.current),f.current=ed.createContainer(u.current,rd.ConcurrentRoot,null,!1,null,"",console.error,console.error,console.error,null),ed.updateContainer(Sa.createElement(m,{},d.children),f.current,null,()=>{})),()=>{_?p.current=setTimeout(E,0):E()}),[]),Sa.useLayoutEffect(()=>{y(u.current),od(u.current,d,r),ed.updateContainer(Sa.createElement(m,{},d.children),f.current,null)}),Sa.createElement("div",{ref:l,id:d.id,accessKey:d.accessKey,className:d.className,role:d.role,style:d.style,tabIndex:d.tabIndex,title:d.title})},l8="Layer",n8="Rect",i8="Image",u8="Text",s8="Arrow",c8="Transformer",ed=Ug(W6),f8=Sa.forwardRef((d,l)=>Sa.createElement(V3,{},Sa.createElement(a8,{...d,forwardedRef:l})));var o1,n3;function r8(){if(n3)return o1;n3=1;var d=$o();return o1=function(u,f,r){const m=d.useRef("loading"),p=d.useRef(),[y,_]=d.useState(0),E=d.useRef(),x=d.useRef(),C=d.useRef();return(E.current!==u||x.current!==f||C.current!==r)&&(m.current="loading",p.current=void 0,E.current=u,x.current=f,C.current=r),d.useLayoutEffect(function(){if(!u)return;var A=document.createElement("img");function O(){A.decode().catch(()=>{}).finally(()=>{m.current="loaded",p.current=A,_(Math.random())})}function M(){m.current="failed",p.current=void 0,_(Math.random())}return A.addEventListener("load",O),A.addEventListener("error",M),f&&(A.crossOrigin=f),r&&(A.referrerPolicy=r),A.src=u,function(){A.removeEventListener("load",O),A.removeEventListener("error",M)}},[u,f,r]),[p.current,m.current]},o1}var o8=r8();const h8=ud(o8),d8=({src:d,onLoaded:l})=>{const[u]=h8(d);return de.useEffect(()=>{u&&l(u.width,u.height)},[u,l]),gt.jsx(i8,{image:u})},m8=({imageSrc:d,shapes:l,setShapes:u,selectedId:f,setSelectedId:r,tool:m,setTool:p,stageRef:y,onImageDimensionsChange:_,canvasWidth:E,canvasHeight:x})=>{const C=de.useRef(!1),A=de.useRef(null);de.useEffect(()=>{var L;if(f&&A.current&&y.current){const B=y.current.findOne("#"+f);B&&(A.current.nodes([B]),(L=A.current.getLayer())==null||L.batchDraw())}},[f,l]);const O=L=>{const B=L.target,et=B.getStage();if(!et)return;B.hide();const I=B.absolutePosition(),F=et.container().getBoundingClientRect(),ut={x:F.left+I.x,y:F.top+I.y},it=document.createElement("textarea");document.body.appendChild(it),it.value=B.text(),it.style.position="absolute",it.style.top=`${ut.y+window.scrollY}px`,it.style.left=`${ut.x+window.scrollX}px`,it.style.width=`${B.width()-B.padding()*2}px`,it.style.height=`${B.height()-B.padding()*2+5}px`,it.style.fontSize=`${B.fontSize()}px`,it.style.border="none",it.style.padding="0px",it.style.margin="0px",it.style.overflow="hidden",it.style.background="none",it.style.outline="none",it.style.resize="none",it.style.lineHeight=B.lineHeight().toString(),it.style.fontFamily=B.fontFamily(),it.style.fontWeight=B.fontStyle(),it.style.transformOrigin="left top",it.style.textAlign=B.align(),it.style.color=B.fill(),it.style.zIndex="1000";const Et=B.rotation();let Nt="";Et&&(Nt+=`rotateZ(${Et}deg)`),it.style.transform=Nt,it.style.height="auto",it.style.height=it.scrollHeight+3+"px",it.focus();const bt=()=>{it.parentNode&&it.parentNode.removeChild(it),B.show()},Yt=()=>{const St=it.value,U=B.id();u(ct=>ct.map(ft=>ft.id===U?{...ft,text:St}:ft)),bt()},Ot=St=>{St.key==="Enter"&&!St.shiftKey&&(St.preventDefault(),it.blur()),St.key==="Escape"&&bt()};it.addEventListener("blur",Yt),it.addEventListener("keydown",Ot)},M=L=>{var ut;if(m==="select"){L.target===L.target.getStage()&&(r(null),(ut=A.current)==null||ut.nodes([]));return}C.current=!0;const B=L.target.getStage(),et=B==null?void 0:B.getRelativePointerPosition();if(!et)return;const I={id:Math.random().toString(36).substr(2,9),x:et.x,y:et.y,stroke:"#be185d",strokeWidth:4};let F;if(m==="rect")F={...I,type:"rect",width:0,height:0,fill:"transparent",cornerRadius:15};else if(m==="arrow")F={...I,type:"arrow",points:[0,0,0,0]};else if(m==="text"){F={...I,type:"text",text:"Double Click to Edit",fontSize:32,fill:"#be185d"},C.current=!1,u([...l,F]),r(F.id),p("select");return}else return;u([...l,F]),r(F.id)},V=L=>{if(!C.current||m==="select"||m==="text")return;const B=L.target.getStage(),et=B==null?void 0:B.getRelativePointerPosition();if(!et)return;const I=l[l.length-1];if(I.id!==f)return;const F=l.slice(0,l.length-1);if(I.type==="rect")F.push({...I,width:et.x-I.x,height:et.y-I.y});else if(I.type==="arrow"){const ut=et.x-I.x,it=et.y-I.y;F.push({...I,points:[0,0,ut,it]})}u(F)},Z=()=>{C.current&&(C.current=!1,p("select"))},K=(L,B)=>{const et=l.findIndex(F=>F.id===B);if(et===-1)return;const I=[...l];I[et]={...I[et],x:L.target.x(),y:L.target.y()},u(I)},J=L=>{const B=L.target,et=B.id(),I=l.findIndex(Nt=>Nt.id===et);if(I===-1)return;const F=B.scaleX(),ut=B.scaleY();B.scaleX(1),B.scaleY(1);const it=[...l],Et=it[I];Et.type==="rect"?it[I]={...Et,x:B.x(),y:B.y(),rotation:B.rotation(),width:Math.max(5,B.width()*F),height:Math.max(5,B.height()*ut)}:Et.type==="text"?it[I]={...Et,x:B.x(),y:B.y(),rotation:B.rotation(),fontSize:Et.fontSize*F}:Et.type==="arrow"&&(it[I]={...Et,x:B.x(),y:B.y(),rotation:B.rotation()},B.scaleX(F),B.scaleY(ut)),u(it)};return gt.jsx(f8,{ref:y,width:E||window.innerWidth,height:x||window.innerHeight,onMouseDown:M,onMouseMove:V,onMouseUp:Z,className:"bg-white",style:{cursor:m==="select"?"default":"crosshair"},children:gt.jsxs(l8,{children:[d&>.jsx(d8,{src:d,onLoaded:_}),l.map(L=>{const B={key:L.id,id:L.id,x:L.x,y:L.y,rotation:L.rotation||0,draggable:m==="select",onClick:()=>{m==="select"&&r(L.id)},onTap:()=>{m==="select"&&r(L.id)},onDragEnd:et=>K(et,L.id),onTransformEnd:J};return L.type==="rect"?gt.jsx(n8,{...B,width:L.width,height:L.height,stroke:L.stroke,strokeWidth:L.strokeWidth,fill:L.fill,cornerRadius:L.cornerRadius}):L.type==="arrow"?gt.jsx(s8,{...B,points:L.points,stroke:L.stroke,strokeWidth:L.strokeWidth,fill:L.stroke,pointerLength:10,pointerWidth:10}):L.type==="text"?gt.jsx(u8,{...B,text:L.text,fontSize:L.fontSize,fill:L.stroke,stroke:"#FFFF00",strokeWidth:2,strokeJoin:"round",fontFamily:"Comic Sans MS, Comic Sans, cursive",fontStyle:"bold",onDblClick:O,onDblTap:O}):null}),f&>.jsx(c8,{ref:A,boundBoxFunc:(L,B)=>B.width<5||B.height<5?L:B,rotateEnabled:!0,borderStroke:"#d97706",anchorStroke:"#451a03",anchorFill:"#fcd34d",anchorSize:10,anchorCornerRadius:2})]})})},g8=()=>{const[d,l]=de.useState(null),[u,f]=de.useState({width:0,height:0}),[r,m]=de.useState([]),[p,y]=de.useState(null),[_,E]=de.useState("select"),x=de.useRef(null),C=de.useRef(null);de.useEffect(()=>{const et=I=>{var ut;const F=(ut=I.clipboardData)==null?void 0:ut.items;if(F){for(const it of F)if(it.type.indexOf("image")!==-1){const Et=it.getAsFile();if(Et){const Nt=URL.createObjectURL(Et);l(Nt),m([])}}}};return window.addEventListener("paste",et),()=>window.removeEventListener("paste",et)},[]),de.useEffect(()=>{const et=I=>{var F;if((I.key==="Delete"||I.key==="Backspace")&&p){const ut=(F=document.activeElement)==null?void 0:F.tagName.toLowerCase();if(ut==="input"||ut==="textarea")return;m(it=>it.filter(Et=>Et.id!==p)),y(null)}};return window.addEventListener("keydown",et),()=>window.removeEventListener("keydown",et)},[p]);const A=()=>{if(x.current){const et=p;y(null),requestAnimationFrame(()=>{if(!x.current)return;const I=x.current.toDataURL({pixelRatio:2}),F=document.createElement("a");F.download=`snapmark-export-${Date.now()}.png`,F.href=I,document.body.appendChild(F),F.click(),document.body.removeChild(F),y(et)})}},O=()=>{if(x.current){const et=p;y(null),setTimeout(()=>{x.current&&x.current.toBlob({pixelRatio:2,callback:I=>{I&&navigator.clipboard.write([new ClipboardItem({"image/png":I})]).then(()=>{}).catch(F=>{console.error("Failed to copy to clipboard",F),alert("Failed to copy image to clipboard")}),y(et)}})},50)}},M=(et,I)=>{m(F=>F.map(ut=>ut.id===et?{...ut,...I}:ut))},V=de.useCallback((et,I)=>{f(F=>F.width===et&&F.height===I?F:{width:et,height:I})},[]),Z=()=>{window.confirm("Clear all annotations and image?")&&(l(null),m([]),f({width:0,height:0}))},K=()=>{p&&(m(et=>et.filter(I=>I.id!==p)),y(null))},J=et=>{et.target===et.currentTarget&&y(null)},L=et=>{var F;const I=(F=et.target.files)==null?void 0:F[0];if(I){const ut=URL.createObjectURL(I);l(ut),m([])}},B=r.find(et=>et.id===p)||null;return gt.jsxs("div",{className:"flex h-screen w-screen bg-amber-50 text-amber-900 overflow-hidden font-comic",children:[gt.jsx(i4,{currentTool:_,setTool:E,onExport:A,onCopy:O,onClear:Z,hasImage:!!d,onDeleteSelected:K,hasSelection:!!p}),gt.jsxs("main",{className:"flex-1 relative overflow-hidden flex flex-col",children:[gt.jsxs("div",{className:"h-20 bg-white/70 backdrop-blur-sm border-b-4 border-amber-900 flex items-center px-6 justify-between shrink-0 z-10",children:[gt.jsxs("div",{className:"flex items-center gap-4",children:[gt.jsx("a",{href:"../index.html",className:"p-2 hover:bg-amber-200 rounded-full transition-colors flex items-center justify-center border-2 border-transparent hover:border-amber-900",title:"Back to Home",children:gt.jsx(Km,{size:24,className:"text-amber-900",strokeWidth:2.5})}),gt.jsxs("h1",{className:"flex items-center gap-3",children:[gt.jsx("div",{className:"bg-amber-900 text-amber-50 p-2 transform -rotate-3 border-2 border-black shadow-[4px_4px_0px_0px_rgba(0,0,0,0.2)]",children:gt.jsx("span",{className:"font-impact text-2xl tracking-wide",children:"SM"})}),gt.jsxs("div",{className:"flex flex-col",children:[gt.jsx("span",{className:"font-impact text-3xl text-amber-900 leading-none",children:"SNAPMARK"}),gt.jsx("span",{className:"text-xs font-bold text-amber-700 tracking-wider",children:"Highlight • Annotate • Export"})]})]})]}),gt.jsx("div",{className:"text-lg font-bold text-amber-800/50 hidden md:block",children:d?"✨ Make it pop! ✨":"Waiting for image..."}),gt.jsxs("div",{children:[gt.jsxs("button",{onClick:()=>{var et;return(et=C.current)==null?void 0:et.click()},className:"font-impact text-lg bg-cyan-400 border-2 border-black text-black px-6 py-2 transition-all hover:-translate-y-1 hover:shadow-[4px_4px_0px_0px_black] active:translate-y-0 active:shadow-none flex items-center gap-2",children:[gt.jsx(C2,{size:20,strokeWidth:2.5})," OPEN IMAGE"]}),gt.jsx("input",{ref:C,type:"file",accept:"image/*",className:"hidden",onChange:L})]})]}),gt.jsxs("div",{className:"flex-1 overflow-auto flex items-center justify-center p-8 relative",onClick:J,children:[gt.jsx("div",{className:"absolute top-10 left-10 text-6xl opacity-20 animate-bounce pointer-events-none select-none",children:"☕"}),gt.jsx("div",{className:"absolute bottom-20 right-20 text-4xl opacity-20 animate-pulse pointer-events-none select-none",children:"✨"}),d?gt.jsx("div",{className:"border-4 border-amber-900 bg-white shadow-[8px_8px_0px_0px_rgba(69,26,3,0.2)]",style:{width:u.width,height:u.height,minWidth:u.width||300,minHeight:u.height||200},children:gt.jsx(m8,{imageSrc:d,shapes:r,setShapes:m,selectedId:p,setSelectedId:y,tool:_,setTool:E,stageRef:x,onImageDimensionsChange:V,canvasWidth:u.width,canvasHeight:u.height})}):gt.jsxs("div",{onClick:et=>{var I;et.stopPropagation(),(I=C.current)==null||I.click()},className:"group flex flex-col items-center justify-center bg-white border-4 border-dashed border-amber-900/40 rounded-3xl w-[500px] h-[350px] p-8 transition-all hover:border-amber-900 hover:bg-amber-100/50 hover:scale-105 cursor-pointer relative overflow-hidden",children:[gt.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(#78350f_1px,transparent_1px)] [background-size:16px_16px] opacity-5"}),gt.jsx("div",{className:"bg-amber-100 p-6 rounded-full mb-6 border-4 border-amber-200 group-hover:border-amber-400 group-hover:bg-amber-200 transition-colors",children:gt.jsx(C2,{size:64,className:"text-amber-700",strokeWidth:2.5})}),gt.jsx("h2",{className:"font-impact text-4xl text-amber-900 mb-2",children:"PASTE IMAGE"}),gt.jsx("p",{className:"text-xl font-bold text-amber-700/70 group-hover:text-amber-800",children:"Ctrl+V / Cmd+V"}),gt.jsx("p",{className:"mt-6 text-sm font-bold bg-amber-900 text-amber-50 px-3 py-1 rounded-full opacity-0 group-hover:opacity-100 transition-opacity transform translate-y-2 group-hover:translate-y-0",children:"or click to browse"})]})]})]}),gt.jsx(f4,{selectedShape:B,updateShape:M})]})},Z3=document.getElementById("root");if(!Z3)throw new Error("Could not find root element to mount to");const p8=Hm.createRoot(Z3);p8.render(gt.jsx(Sa.StrictMode,{children:gt.jsx(g8,{})}));
diff --git a/src/snapmark-app/index.html b/src/snapmark-app/index.html
new file mode 100644
index 0000000..ba15b59
--- /dev/null
+++ b/src/snapmark-app/index.html
@@ -0,0 +1,56 @@
+
+
+
+
+
+ SnapMark | cffy.in
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 0000000..8ffce4f
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,43 @@
+{
+ "compilerOptions": {
+ /* Visit https://aka.ms/tsconfig.json to read more about this file */
+
+ /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
+ "target": "es2024",
+ /* Specify a set of bundled library declaration files that describe the target runtime environment. */
+ "lib": ["es2024"],
+ /* Specify what JSX code is generated. */
+ "jsx": "react-jsx",
+
+ /* Specify what module code is generated. */
+ "module": "es2022",
+ /* Specify how TypeScript looks up a file from a given module specifier. */
+ "moduleResolution": "node",
+ /* Enable importing .json files */
+ "resolveJsonModule": true,
+
+ /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */
+ "allowJs": true,
+ /* Enable error reporting in type-checked JavaScript files. */
+ "checkJs": false,
+
+ /* Disable emitting files from a compilation. */
+ "noEmit": true,
+
+ /* Ensure that each file can be safely transpiled without relying on other imports. */
+ "isolatedModules": true,
+ /* Allow 'import x from y' when a module doesn't have a default export. */
+ "allowSyntheticDefaultImports": true,
+ /* Ensure that casing is correct in imports. */
+ "forceConsistentCasingInFileNames": true,
+
+ /* Enable all strict type-checking options. */
+ "strict": true,
+
+ /* Skip type checking all .d.ts files. */
+ "skipLibCheck": true,
+ "types": [
+ "./worker-configuration.d.ts"
+ ]
+ }
+}
diff --git a/worker-configuration.d.ts b/worker-configuration.d.ts
new file mode 100644
index 0000000..47d5b47
--- /dev/null
+++ b/worker-configuration.d.ts
@@ -0,0 +1,10850 @@
+/* eslint-disable */
+// Generated by Wrangler by running `wrangler types` (hash: 543f992083f7639592591242de0b7088)
+// Runtime types generated with workerd@1.20251210.0 2025-12-13
+declare namespace Cloudflare {
+ interface GlobalProps {
+ mainModule: typeof import("./src/index");
+ durableNamespaces: "MyDurableObject";
+ }
+ interface Env {
+ MY_DURABLE_OBJECT: DurableObjectNamespace;
+ }
+}
+interface Env extends Cloudflare.Env {}
+
+// Begin runtime types
+/*! *****************************************************************************
+Copyright (c) Cloudflare. All rights reserved.
+Copyright (c) Microsoft Corporation. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+/* eslint-disable */
+// noinspection JSUnusedGlobalSymbols
+declare var onmessage: never;
+/**
+ * The **`DOMException`** interface represents an abnormal event (called an **exception**) that occurs as a result of calling a method or accessing a property of a web API.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException)
+ */
+declare class DOMException extends Error {
+ constructor(message?: string, name?: string);
+ /**
+ * The **`message`** read-only property of the a message or description associated with the given error name.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/message)
+ */
+ readonly message: string;
+ /**
+ * The **`name`** read-only property of the one of the strings associated with an error name.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/name)
+ */
+ readonly name: string;
+ /**
+ * The **`code`** read-only property of the DOMException interface returns one of the legacy error code constants, or `0` if none match.
+ * @deprecated
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/code)
+ */
+ readonly code: number;
+ static readonly INDEX_SIZE_ERR: number;
+ static readonly DOMSTRING_SIZE_ERR: number;
+ static readonly HIERARCHY_REQUEST_ERR: number;
+ static readonly WRONG_DOCUMENT_ERR: number;
+ static readonly INVALID_CHARACTER_ERR: number;
+ static readonly NO_DATA_ALLOWED_ERR: number;
+ static readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ static readonly NOT_FOUND_ERR: number;
+ static readonly NOT_SUPPORTED_ERR: number;
+ static readonly INUSE_ATTRIBUTE_ERR: number;
+ static readonly INVALID_STATE_ERR: number;
+ static readonly SYNTAX_ERR: number;
+ static readonly INVALID_MODIFICATION_ERR: number;
+ static readonly NAMESPACE_ERR: number;
+ static readonly INVALID_ACCESS_ERR: number;
+ static readonly VALIDATION_ERR: number;
+ static readonly TYPE_MISMATCH_ERR: number;
+ static readonly SECURITY_ERR: number;
+ static readonly NETWORK_ERR: number;
+ static readonly ABORT_ERR: number;
+ static readonly URL_MISMATCH_ERR: number;
+ static readonly QUOTA_EXCEEDED_ERR: number;
+ static readonly TIMEOUT_ERR: number;
+ static readonly INVALID_NODE_TYPE_ERR: number;
+ static readonly DATA_CLONE_ERR: number;
+ get stack(): any;
+ set stack(value: any);
+}
+type WorkerGlobalScopeEventMap = {
+ fetch: FetchEvent;
+ scheduled: ScheduledEvent;
+ queue: QueueEvent;
+ unhandledrejection: PromiseRejectionEvent;
+ rejectionhandled: PromiseRejectionEvent;
+};
+declare abstract class WorkerGlobalScope extends EventTarget {
+ EventTarget: typeof EventTarget;
+}
+/* The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). *
+ * The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox).
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console)
+ */
+interface Console {
+ "assert"(condition?: boolean, ...data: any[]): void;
+ /**
+ * The **`console.clear()`** static method clears the console if possible.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear_static)
+ */
+ clear(): void;
+ /**
+ * The **`console.count()`** static method logs the number of times that this particular call to `count()` has been called.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static)
+ */
+ count(label?: string): void;
+ /**
+ * The **`console.countReset()`** static method resets counter used with console/count_static.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static)
+ */
+ countReset(label?: string): void;
+ /**
+ * The **`console.debug()`** static method outputs a message to the console at the 'debug' log level.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static)
+ */
+ debug(...data: any[]): void;
+ /**
+ * The **`console.dir()`** static method displays a list of the properties of the specified JavaScript object.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir_static)
+ */
+ dir(item?: any, options?: any): void;
+ /**
+ * The **`console.dirxml()`** static method displays an interactive tree of the descendant elements of the specified XML/HTML element.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml_static)
+ */
+ dirxml(...data: any[]): void;
+ /**
+ * The **`console.error()`** static method outputs a message to the console at the 'error' log level.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error_static)
+ */
+ error(...data: any[]): void;
+ /**
+ * The **`console.group()`** static method creates a new inline group in the Web console log, causing any subsequent console messages to be indented by an additional level, until console/groupEnd_static is called.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static)
+ */
+ group(...data: any[]): void;
+ /**
+ * The **`console.groupCollapsed()`** static method creates a new inline group in the console.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static)
+ */
+ groupCollapsed(...data: any[]): void;
+ /**
+ * The **`console.groupEnd()`** static method exits the current inline group in the console.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static)
+ */
+ groupEnd(): void;
+ /**
+ * The **`console.info()`** static method outputs a message to the console at the 'info' log level.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static)
+ */
+ info(...data: any[]): void;
+ /**
+ * The **`console.log()`** static method outputs a message to the console.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)
+ */
+ log(...data: any[]): void;
+ /**
+ * The **`console.table()`** static method displays tabular data as a table.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static)
+ */
+ table(tabularData?: any, properties?: string[]): void;
+ /**
+ * The **`console.time()`** static method starts a timer you can use to track how long an operation takes.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static)
+ */
+ time(label?: string): void;
+ /**
+ * The **`console.timeEnd()`** static method stops a timer that was previously started by calling console/time_static.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static)
+ */
+ timeEnd(label?: string): void;
+ /**
+ * The **`console.timeLog()`** static method logs the current value of a timer that was previously started by calling console/time_static.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static)
+ */
+ timeLog(label?: string, ...data: any[]): void;
+ timeStamp(label?: string): void;
+ /**
+ * The **`console.trace()`** static method outputs a stack trace to the console.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static)
+ */
+ trace(...data: any[]): void;
+ /**
+ * The **`console.warn()`** static method outputs a warning message to the console at the 'warning' log level.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn_static)
+ */
+ warn(...data: any[]): void;
+}
+declare const console: Console;
+type BufferSource = ArrayBufferView | ArrayBuffer;
+type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array;
+declare namespace WebAssembly {
+ class CompileError extends Error {
+ constructor(message?: string);
+ }
+ class RuntimeError extends Error {
+ constructor(message?: string);
+ }
+ type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128";
+ interface GlobalDescriptor {
+ value: ValueType;
+ mutable?: boolean;
+ }
+ class Global {
+ constructor(descriptor: GlobalDescriptor, value?: any);
+ value: any;
+ valueOf(): any;
+ }
+ type ImportValue = ExportValue | number;
+ type ModuleImports = Record;
+ type Imports = Record;
+ type ExportValue = Function | Global | Memory | Table;
+ type Exports = Record;
+ class Instance {
+ constructor(module: Module, imports?: Imports);
+ readonly exports: Exports;
+ }
+ interface MemoryDescriptor {
+ initial: number;
+ maximum?: number;
+ shared?: boolean;
+ }
+ class Memory {
+ constructor(descriptor: MemoryDescriptor);
+ readonly buffer: ArrayBuffer;
+ grow(delta: number): number;
+ }
+ type ImportExportKind = "function" | "global" | "memory" | "table";
+ interface ModuleExportDescriptor {
+ kind: ImportExportKind;
+ name: string;
+ }
+ interface ModuleImportDescriptor {
+ kind: ImportExportKind;
+ module: string;
+ name: string;
+ }
+ abstract class Module {
+ static customSections(module: Module, sectionName: string): ArrayBuffer[];
+ static exports(module: Module): ModuleExportDescriptor[];
+ static imports(module: Module): ModuleImportDescriptor[];
+ }
+ type TableKind = "anyfunc" | "externref";
+ interface TableDescriptor {
+ element: TableKind;
+ initial: number;
+ maximum?: number;
+ }
+ class Table {
+ constructor(descriptor: TableDescriptor, value?: any);
+ readonly length: number;
+ get(index: number): any;
+ grow(delta: number, value?: any): number;
+ set(index: number, value?: any): void;
+ }
+ function instantiate(module: Module, imports?: Imports): Promise;
+ function validate(bytes: BufferSource): boolean;
+}
+/**
+ * The **`ServiceWorkerGlobalScope`** interface of the Service Worker API represents the global execution context of a service worker.
+ * Available only in secure contexts.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope)
+ */
+interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
+ DOMException: typeof DOMException;
+ WorkerGlobalScope: typeof WorkerGlobalScope;
+ btoa(data: string): string;
+ atob(data: string): string;
+ setTimeout(callback: (...args: any[]) => void, msDelay?: number): number;
+ setTimeout(callback: (...args: Args) => void, msDelay?: number, ...args: Args): number;
+ clearTimeout(timeoutId: number | null): void;
+ setInterval(callback: (...args: any[]) => void, msDelay?: number): number;
+ setInterval(callback: (...args: Args) => void, msDelay?: number, ...args: Args): number;
+ clearInterval(timeoutId: number | null): void;
+ queueMicrotask(task: Function): void;
+ structuredClone(value: T, options?: StructuredSerializeOptions): T;
+ reportError(error: any): void;
+ fetch(input: RequestInfo | URL, init?: RequestInit): Promise;
+ self: ServiceWorkerGlobalScope;
+ crypto: Crypto;
+ caches: CacheStorage;
+ scheduler: Scheduler;
+ performance: Performance;
+ Cloudflare: Cloudflare;
+ readonly origin: string;
+ Event: typeof Event;
+ ExtendableEvent: typeof ExtendableEvent;
+ CustomEvent: typeof CustomEvent;
+ PromiseRejectionEvent: typeof PromiseRejectionEvent;
+ FetchEvent: typeof FetchEvent;
+ TailEvent: typeof TailEvent;
+ TraceEvent: typeof TailEvent;
+ ScheduledEvent: typeof ScheduledEvent;
+ MessageEvent: typeof MessageEvent;
+ CloseEvent: typeof CloseEvent;
+ ReadableStreamDefaultReader: typeof ReadableStreamDefaultReader;
+ ReadableStreamBYOBReader: typeof ReadableStreamBYOBReader;
+ ReadableStream: typeof ReadableStream;
+ WritableStream: typeof WritableStream;
+ WritableStreamDefaultWriter: typeof WritableStreamDefaultWriter;
+ TransformStream: typeof TransformStream;
+ ByteLengthQueuingStrategy: typeof ByteLengthQueuingStrategy;
+ CountQueuingStrategy: typeof CountQueuingStrategy;
+ ErrorEvent: typeof ErrorEvent;
+ MessageChannel: typeof MessageChannel;
+ MessagePort: typeof MessagePort;
+ EventSource: typeof EventSource;
+ ReadableStreamBYOBRequest: typeof ReadableStreamBYOBRequest;
+ ReadableStreamDefaultController: typeof ReadableStreamDefaultController;
+ ReadableByteStreamController: typeof ReadableByteStreamController;
+ WritableStreamDefaultController: typeof WritableStreamDefaultController;
+ TransformStreamDefaultController: typeof TransformStreamDefaultController;
+ CompressionStream: typeof CompressionStream;
+ DecompressionStream: typeof DecompressionStream;
+ TextEncoderStream: typeof TextEncoderStream;
+ TextDecoderStream: typeof TextDecoderStream;
+ Headers: typeof Headers;
+ Body: typeof Body;
+ Request: typeof Request;
+ Response: typeof Response;
+ WebSocket: typeof WebSocket;
+ WebSocketPair: typeof WebSocketPair;
+ WebSocketRequestResponsePair: typeof WebSocketRequestResponsePair;
+ AbortController: typeof AbortController;
+ AbortSignal: typeof AbortSignal;
+ TextDecoder: typeof TextDecoder;
+ TextEncoder: typeof TextEncoder;
+ navigator: Navigator;
+ Navigator: typeof Navigator;
+ URL: typeof URL;
+ URLSearchParams: typeof URLSearchParams;
+ URLPattern: typeof URLPattern;
+ Blob: typeof Blob;
+ File: typeof File;
+ FormData: typeof FormData;
+ Crypto: typeof Crypto;
+ SubtleCrypto: typeof SubtleCrypto;
+ CryptoKey: typeof CryptoKey;
+ CacheStorage: typeof CacheStorage;
+ Cache: typeof Cache;
+ FixedLengthStream: typeof FixedLengthStream;
+ IdentityTransformStream: typeof IdentityTransformStream;
+ HTMLRewriter: typeof HTMLRewriter;
+}
+declare function addEventListener(type: Type, handler: EventListenerOrEventListenerObject, options?: EventTargetAddEventListenerOptions | boolean): void;
+declare function removeEventListener(type: Type, handler: EventListenerOrEventListenerObject, options?: EventTargetEventListenerOptions | boolean): void;
+/**
+ * The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
+ *
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
+ */
+declare function dispatchEvent(event: WorkerGlobalScopeEventMap[keyof WorkerGlobalScopeEventMap]): boolean;
+/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */
+declare function btoa(data: string): string;
+/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/atob) */
+declare function atob(data: string): string;
+/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/setTimeout) */
+declare function setTimeout(callback: (...args: any[]) => void, msDelay?: number): number;
+/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/setTimeout) */
+declare function setTimeout(callback: (...args: Args) => void, msDelay?: number, ...args: Args): number;
+/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/clearTimeout) */
+declare function clearTimeout(timeoutId: number | null): void;
+/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/setInterval) */
+declare function setInterval(callback: (...args: any[]) => void, msDelay?: number): number;
+/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/setInterval) */
+declare function setInterval(callback: (...args: Args) => void, msDelay?: number, ...args: Args): number;
+/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/clearInterval) */
+declare function clearInterval(timeoutId: number | null): void;
+/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */
+declare function queueMicrotask(task: Function): void;
+/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/structuredClone) */
+declare function structuredClone(value: T, options?: StructuredSerializeOptions): T;
+/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */
+declare function reportError(error: any): void;
+/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */
+declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise;
+declare const self: ServiceWorkerGlobalScope;
+/**
+* The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
+* The Workers runtime implements the full surface of this API, but with some differences in
+* the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
+* compared to those implemented in most browsers.
+*
+* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
+*/
+declare const crypto: Crypto;
+/**
+* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
+*
+* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
+*/
+declare const caches: CacheStorage;
+declare const scheduler: Scheduler;
+/**
+* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
+* as well as timing of subrequests and other operations.
+*
+* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
+*/
+declare const performance: Performance;
+declare const Cloudflare: Cloudflare;
+declare const origin: string;
+declare const navigator: Navigator;
+interface TestController {
+}
+interface ExecutionContext {
+ waitUntil(promise: Promise): void;
+ passThroughOnException(): void;
+ readonly exports: Cloudflare.Exports;
+ readonly props: Props;
+}
+type ExportedHandlerFetchHandler = (request: Request>, env: Env, ctx: ExecutionContext) => Response | Promise;
+type ExportedHandlerTailHandler = (events: TraceItem[], env: Env, ctx: ExecutionContext) => void | Promise;
+type ExportedHandlerTraceHandler = (traces: TraceItem[], env: Env, ctx: ExecutionContext) => void | Promise;
+type ExportedHandlerTailStreamHandler = (event: TailStream.TailEvent, env: Env, ctx: ExecutionContext) => TailStream.TailEventHandlerType | Promise;
+type ExportedHandlerScheduledHandler = (controller: ScheduledController, env: Env, ctx: ExecutionContext) => void | Promise;
+type ExportedHandlerQueueHandler = (batch: MessageBatch, env: Env, ctx: ExecutionContext) => void | Promise;
+type ExportedHandlerTestHandler = (controller: TestController, env: Env, ctx: ExecutionContext) => void | Promise;
+interface ExportedHandler {
+ fetch?: ExportedHandlerFetchHandler;
+ tail?: ExportedHandlerTailHandler;
+ trace?: ExportedHandlerTraceHandler;
+ tailStream?: ExportedHandlerTailStreamHandler;
+ scheduled?: ExportedHandlerScheduledHandler;
+ test?: ExportedHandlerTestHandler;
+ email?: EmailExportedHandler;
+ queue?: ExportedHandlerQueueHandler;
+}
+interface StructuredSerializeOptions {
+ transfer?: any[];
+}
+declare abstract class Navigator {
+ sendBeacon(url: string, body?: BodyInit): boolean;
+ readonly userAgent: string;
+ readonly hardwareConcurrency: number;
+ readonly language: string;
+ readonly languages: string[];
+}
+interface AlarmInvocationInfo {
+ readonly isRetry: boolean;
+ readonly retryCount: number;
+}
+interface Cloudflare {
+ readonly compatibilityFlags: Record;
+}
+interface DurableObject {
+ fetch(request: Request): Response | Promise;
+ alarm?(alarmInfo?: AlarmInvocationInfo): void | Promise;
+ webSocketMessage?(ws: WebSocket, message: string | ArrayBuffer): void | Promise;
+ webSocketClose?(ws: WebSocket, code: number, reason: string, wasClean: boolean): void | Promise;
+ webSocketError?(ws: WebSocket, error: unknown): void | Promise;
+}
+type DurableObjectStub = Fetcher & {
+ readonly id: DurableObjectId;
+ readonly name?: string;
+};
+interface DurableObjectId {
+ toString(): string;
+ equals(other: DurableObjectId): boolean;
+ readonly name?: string;
+}
+declare abstract class DurableObjectNamespace {
+ newUniqueId(options?: DurableObjectNamespaceNewUniqueIdOptions): DurableObjectId;
+ idFromName(name: string): DurableObjectId;
+ idFromString(id: string): DurableObjectId;
+ get(id: DurableObjectId, options?: DurableObjectNamespaceGetDurableObjectOptions): DurableObjectStub;
+ getByName(name: string, options?: DurableObjectNamespaceGetDurableObjectOptions): DurableObjectStub;
+ jurisdiction(jurisdiction: DurableObjectJurisdiction): DurableObjectNamespace;
+}
+type DurableObjectJurisdiction = "eu" | "fedramp" | "fedramp-high";
+interface DurableObjectNamespaceNewUniqueIdOptions {
+ jurisdiction?: DurableObjectJurisdiction;
+}
+type DurableObjectLocationHint = "wnam" | "enam" | "sam" | "weur" | "eeur" | "apac" | "oc" | "afr" | "me";
+interface DurableObjectNamespaceGetDurableObjectOptions {
+ locationHint?: DurableObjectLocationHint;
+}
+interface DurableObjectClass<_T extends Rpc.DurableObjectBranded | undefined = undefined> {
+}
+interface DurableObjectState {
+ waitUntil(promise: Promise): void;
+ readonly exports: Cloudflare.Exports;
+ readonly props: Props;
+ readonly id: DurableObjectId;
+ readonly storage: DurableObjectStorage;
+ container?: Container;
+ blockConcurrencyWhile(callback: () => Promise): Promise;
+ acceptWebSocket(ws: WebSocket, tags?: string[]): void;
+ getWebSockets(tag?: string): WebSocket[];
+ setWebSocketAutoResponse(maybeReqResp?: WebSocketRequestResponsePair): void;
+ getWebSocketAutoResponse(): WebSocketRequestResponsePair | null;
+ getWebSocketAutoResponseTimestamp(ws: WebSocket): Date | null;
+ setHibernatableWebSocketEventTimeout(timeoutMs?: number): void;
+ getHibernatableWebSocketEventTimeout(): number | null;
+ getTags(ws: WebSocket): string[];
+ abort(reason?: string): void;
+}
+interface DurableObjectTransaction {
+ get(key: string, options?: DurableObjectGetOptions): Promise;
+ get(keys: string[], options?: DurableObjectGetOptions): Promise