(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))l(c);new MutationObserver(c=>{for(const h of c)if(h.type==="childList")for(const f of h.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&l(f)}).observe(document,{childList:!0,subtree:!0});function r(c){const h={};return c.integrity&&(h.integrity=c.integrity),c.referrerPolicy&&(h.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?h.credentials="include":c.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function l(c){if(c.ep)return;c.ep=!0;const h=r(c);fetch(c.href,h)}})();var lc={exports:{}},Gs={};/**
 * @license React
 * react-jsx-runtime.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 N0;function iv(){if(N0)return Gs;N0=1;var a=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function r(l,c,h){var f=null;if(h!==void 0&&(f=""+h),c.key!==void 0&&(f=""+c.key),"key"in c){h={};for(var p in c)p!=="key"&&(h[p]=c[p])}else h=c;return c=h.ref,{$$typeof:a,type:l,key:f,ref:c!==void 0?c:null,props:h}}return Gs.Fragment=s,Gs.jsx=r,Gs.jsxs=r,Gs}var C0;function sv(){return C0||(C0=1,lc.exports=iv()),lc.exports}var m=sv(),rc={exports:{}},St={};/**
 * @license React
 * react.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 D0;function lv(){if(D0)return St;D0=1;var a=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),T=Symbol.iterator;function N(A){return A===null||typeof A!="object"?null:(A=T&&A[T]||A["@@iterator"],typeof A=="function"?A:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,U={};function K(A,Y,W){this.props=A,this.context=Y,this.refs=U,this.updater=W||D}K.prototype.isReactComponent={},K.prototype.setState=function(A,Y){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,Y,"setState")},K.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function P(){}P.prototype=K.prototype;function Q(A,Y,W){this.props=A,this.context=Y,this.refs=U,this.updater=W||D}var J=Q.prototype=new P;J.constructor=Q,k(J,K.prototype),J.isPureReactComponent=!0;var at=Array.isArray;function ft(){}var Z={H:null,A:null,T:null,S:null},G=Object.prototype.hasOwnProperty;function rt(A,Y,W){var st=W.ref;return{$$typeof:a,type:A,key:Y,ref:st!==void 0?st:null,props:W}}function it(A,Y){return rt(A.type,Y,A.props)}function xt(A){return typeof A=="object"&&A!==null&&A.$$typeof===a}function gt(A){var Y={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(W){return Y[W]})}var Gt=/\/+/g;function Wt(A,Y){return typeof A=="object"&&A!==null&&A.key!=null?gt(""+A.key):Y.toString(36)}function mt(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(ft,ft):(A.status="pending",A.then(function(Y){A.status==="pending"&&(A.status="fulfilled",A.value=Y)},function(Y){A.status==="pending"&&(A.status="rejected",A.reason=Y)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function L(A,Y,W,st,vt){var wt=typeof A;(wt==="undefined"||wt==="boolean")&&(A=null);var tt=!1;if(A===null)tt=!0;else switch(wt){case"bigint":case"string":case"number":tt=!0;break;case"object":switch(A.$$typeof){case a:case s:tt=!0;break;case b:return tt=A._init,L(tt(A._payload),Y,W,st,vt)}}if(tt)return vt=vt(A),tt=st===""?"."+Wt(A,0):st,at(vt)?(W="",tt!=null&&(W=tt.replace(Gt,"$&/")+"/"),L(vt,Y,W,"",function(ea){return ea})):vt!=null&&(xt(vt)&&(vt=it(vt,W+(vt.key==null||A&&A.key===vt.key?"":(""+vt.key).replace(Gt,"$&/")+"/")+tt)),Y.push(vt)),1;tt=0;var Ee=st===""?".":st+":";if(at(A))for(var Ut=0;Ut<A.length;Ut++)st=A[Ut],wt=Ee+Wt(st,Ut),tt+=L(st,Y,W,wt,vt);else if(Ut=N(A),typeof Ut=="function")for(A=Ut.call(A),Ut=0;!(st=A.next()).done;)st=st.value,wt=Ee+Wt(st,Ut++),tt+=L(st,Y,W,wt,vt);else if(wt==="object"){if(typeof A.then=="function")return L(mt(A),Y,W,st,vt);throw Y=String(A),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return tt}function F(A,Y,W){if(A==null)return A;var st=[],vt=0;return L(A,st,"","",function(wt){return Y.call(W,wt,vt++)}),st}function $(A){if(A._status===-1){var Y=A._result;Y=Y(),Y.then(function(W){(A._status===0||A._status===-1)&&(A._status=1,A._result=W)},function(W){(A._status===0||A._status===-1)&&(A._status=2,A._result=W)}),A._status===-1&&(A._status=0,A._result=Y)}if(A._status===1)return A._result.default;throw A._result}var bt=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},jt={map:F,forEach:function(A,Y,W){F(A,function(){Y.apply(this,arguments)},W)},count:function(A){var Y=0;return F(A,function(){Y++}),Y},toArray:function(A){return F(A,function(Y){return Y})||[]},only:function(A){if(!xt(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return St.Activity=S,St.Children=jt,St.Component=K,St.Fragment=r,St.Profiler=c,St.PureComponent=Q,St.StrictMode=l,St.Suspense=x,St.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,St.__COMPILER_RUNTIME={__proto__:null,c:function(A){return Z.H.useMemoCache(A)}},St.cache=function(A){return function(){return A.apply(null,arguments)}},St.cacheSignal=function(){return null},St.cloneElement=function(A,Y,W){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var st=k({},A.props),vt=A.key;if(Y!=null)for(wt in Y.key!==void 0&&(vt=""+Y.key),Y)!G.call(Y,wt)||wt==="key"||wt==="__self"||wt==="__source"||wt==="ref"&&Y.ref===void 0||(st[wt]=Y[wt]);var wt=arguments.length-2;if(wt===1)st.children=W;else if(1<wt){for(var tt=Array(wt),Ee=0;Ee<wt;Ee++)tt[Ee]=arguments[Ee+2];st.children=tt}return rt(A.type,vt,st)},St.createContext=function(A){return A={$$typeof:f,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:h,_context:A},A},St.createElement=function(A,Y,W){var st,vt={},wt=null;if(Y!=null)for(st in Y.key!==void 0&&(wt=""+Y.key),Y)G.call(Y,st)&&st!=="key"&&st!=="__self"&&st!=="__source"&&(vt[st]=Y[st]);var tt=arguments.length-2;if(tt===1)vt.children=W;else if(1<tt){for(var Ee=Array(tt),Ut=0;Ut<tt;Ut++)Ee[Ut]=arguments[Ut+2];vt.children=Ee}if(A&&A.defaultProps)for(st in tt=A.defaultProps,tt)vt[st]===void 0&&(vt[st]=tt[st]);return rt(A,wt,vt)},St.createRef=function(){return{current:null}},St.forwardRef=function(A){return{$$typeof:p,render:A}},St.isValidElement=xt,St.lazy=function(A){return{$$typeof:b,_payload:{_status:-1,_result:A},_init:$}},St.memo=function(A,Y){return{$$typeof:y,type:A,compare:Y===void 0?null:Y}},St.startTransition=function(A){var Y=Z.T,W={};Z.T=W;try{var st=A(),vt=Z.S;vt!==null&&vt(W,st),typeof st=="object"&&st!==null&&typeof st.then=="function"&&st.then(ft,bt)}catch(wt){bt(wt)}finally{Y!==null&&W.types!==null&&(Y.types=W.types),Z.T=Y}},St.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},St.use=function(A){return Z.H.use(A)},St.useActionState=function(A,Y,W){return Z.H.useActionState(A,Y,W)},St.useCallback=function(A,Y){return Z.H.useCallback(A,Y)},St.useContext=function(A){return Z.H.useContext(A)},St.useDebugValue=function(){},St.useDeferredValue=function(A,Y){return Z.H.useDeferredValue(A,Y)},St.useEffect=function(A,Y){return Z.H.useEffect(A,Y)},St.useEffectEvent=function(A){return Z.H.useEffectEvent(A)},St.useId=function(){return Z.H.useId()},St.useImperativeHandle=function(A,Y,W){return Z.H.useImperativeHandle(A,Y,W)},St.useInsertionEffect=function(A,Y){return Z.H.useInsertionEffect(A,Y)},St.useLayoutEffect=function(A,Y){return Z.H.useLayoutEffect(A,Y)},St.useMemo=function(A,Y){return Z.H.useMemo(A,Y)},St.useOptimistic=function(A,Y){return Z.H.useOptimistic(A,Y)},St.useReducer=function(A,Y,W){return Z.H.useReducer(A,Y,W)},St.useRef=function(A){return Z.H.useRef(A)},St.useState=function(A){return Z.H.useState(A)},St.useSyncExternalStore=function(A,Y,W){return Z.H.useSyncExternalStore(A,Y,W)},St.useTransition=function(){return Z.H.useTransition()},St.version="19.2.7",St}var R0;function nf(){return R0||(R0=1,rc.exports=lv()),rc.exports}var B=nf(),oc={exports:{}},Ys={},uc={exports:{}},cc={};/**
 * @license React
 * scheduler.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 z0;function rv(){return z0||(z0=1,(function(a){function s(L,F){var $=L.length;L.push(F);t:for(;0<$;){var bt=$-1>>>1,jt=L[bt];if(0<c(jt,F))L[bt]=F,L[$]=jt,$=bt;else break t}}function r(L){return L.length===0?null:L[0]}function l(L){if(L.length===0)return null;var F=L[0],$=L.pop();if($!==F){L[0]=$;t:for(var bt=0,jt=L.length,A=jt>>>1;bt<A;){var Y=2*(bt+1)-1,W=L[Y],st=Y+1,vt=L[st];if(0>c(W,$))st<jt&&0>c(vt,W)?(L[bt]=vt,L[st]=$,bt=st):(L[bt]=W,L[Y]=$,bt=Y);else if(st<jt&&0>c(vt,$))L[bt]=vt,L[st]=$,bt=st;else break t}}return F}function c(L,F){var $=L.sortIndex-F.sortIndex;return $!==0?$:L.id-F.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;a.unstable_now=function(){return h.now()}}else{var f=Date,p=f.now();a.unstable_now=function(){return f.now()-p}}var x=[],y=[],b=1,S=null,T=3,N=!1,D=!1,k=!1,U=!1,K=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function J(L){for(var F=r(y);F!==null;){if(F.callback===null)l(y);else if(F.startTime<=L)l(y),F.sortIndex=F.expirationTime,s(x,F);else break;F=r(y)}}function at(L){if(k=!1,J(L),!D)if(r(x)!==null)D=!0,ft||(ft=!0,gt());else{var F=r(y);F!==null&&mt(at,F.startTime-L)}}var ft=!1,Z=-1,G=5,rt=-1;function it(){return U?!0:!(a.unstable_now()-rt<G)}function xt(){if(U=!1,ft){var L=a.unstable_now();rt=L;var F=!0;try{t:{D=!1,k&&(k=!1,P(Z),Z=-1),N=!0;var $=T;try{e:{for(J(L),S=r(x);S!==null&&!(S.expirationTime>L&&it());){var bt=S.callback;if(typeof bt=="function"){S.callback=null,T=S.priorityLevel;var jt=bt(S.expirationTime<=L);if(L=a.unstable_now(),typeof jt=="function"){S.callback=jt,J(L),F=!0;break e}S===r(x)&&l(x),J(L)}else l(x);S=r(x)}if(S!==null)F=!0;else{var A=r(y);A!==null&&mt(at,A.startTime-L),F=!1}}break t}finally{S=null,T=$,N=!1}F=void 0}}finally{F?gt():ft=!1}}}var gt;if(typeof Q=="function")gt=function(){Q(xt)};else if(typeof MessageChannel<"u"){var Gt=new MessageChannel,Wt=Gt.port2;Gt.port1.onmessage=xt,gt=function(){Wt.postMessage(null)}}else gt=function(){K(xt,0)};function mt(L,F){Z=K(function(){L(a.unstable_now())},F)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(L){L.callback=null},a.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<L?Math.floor(1e3/L):5},a.unstable_getCurrentPriorityLevel=function(){return T},a.unstable_next=function(L){switch(T){case 1:case 2:case 3:var F=3;break;default:F=T}var $=T;T=F;try{return L()}finally{T=$}},a.unstable_requestPaint=function(){U=!0},a.unstable_runWithPriority=function(L,F){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var $=T;T=L;try{return F()}finally{T=$}},a.unstable_scheduleCallback=function(L,F,$){var bt=a.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?bt+$:bt):$=bt,L){case 1:var jt=-1;break;case 2:jt=250;break;case 5:jt=1073741823;break;case 4:jt=1e4;break;default:jt=5e3}return jt=$+jt,L={id:b++,callback:F,priorityLevel:L,startTime:$,expirationTime:jt,sortIndex:-1},$>bt?(L.sortIndex=$,s(y,L),r(x)===null&&L===r(y)&&(k?(P(Z),Z=-1):k=!0,mt(at,$-bt))):(L.sortIndex=jt,s(x,L),D||N||(D=!0,ft||(ft=!0,gt()))),L},a.unstable_shouldYield=it,a.unstable_wrapCallback=function(L){var F=T;return function(){var $=T;T=F;try{return L.apply(this,arguments)}finally{T=$}}}})(cc)),cc}var O0;function ov(){return O0||(O0=1,uc.exports=rv()),uc.exports}var fc={exports:{}},Le={};/**
 * @license React
 * react-dom.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 V0;function uv(){if(V0)return Le;V0=1;var a=nf();function s(x){var y="https://react.dev/errors/"+x;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)y+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+x+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var l={d:{f:r,r:function(){throw Error(s(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},c=Symbol.for("react.portal");function h(x,y,b){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:S==null?null:""+S,children:x,containerInfo:y,implementation:b}}var f=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(x,y){if(x==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return Le.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,Le.createPortal=function(x,y){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(s(299));return h(x,y,null,b)},Le.flushSync=function(x){var y=f.T,b=l.p;try{if(f.T=null,l.p=2,x)return x()}finally{f.T=y,l.p=b,l.d.f()}},Le.preconnect=function(x,y){typeof x=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,l.d.C(x,y))},Le.prefetchDNS=function(x){typeof x=="string"&&l.d.D(x)},Le.preinit=function(x,y){if(typeof x=="string"&&y&&typeof y.as=="string"){var b=y.as,S=p(b,y.crossOrigin),T=typeof y.integrity=="string"?y.integrity:void 0,N=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;b==="style"?l.d.S(x,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:S,integrity:T,fetchPriority:N}):b==="script"&&l.d.X(x,{crossOrigin:S,integrity:T,fetchPriority:N,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},Le.preinitModule=function(x,y){if(typeof x=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var b=p(y.as,y.crossOrigin);l.d.M(x,{crossOrigin:b,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&l.d.M(x)},Le.preload=function(x,y){if(typeof x=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var b=y.as,S=p(b,y.crossOrigin);l.d.L(x,b,{crossOrigin:S,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},Le.preloadModule=function(x,y){if(typeof x=="string")if(y){var b=p(y.as,y.crossOrigin);l.d.m(x,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:b,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else l.d.m(x)},Le.requestFormReset=function(x){l.d.r(x)},Le.unstable_batchedUpdates=function(x,y){return x(y)},Le.useFormState=function(x,y,b){return f.H.useFormState(x,y,b)},Le.useFormStatus=function(){return f.H.useHostTransitionStatus()},Le.version="19.2.7",Le}var _0;function cv(){if(_0)return fc.exports;_0=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(s){console.error(s)}}return a(),fc.exports=uv(),fc.exports}/**
 * @license React
 * react-dom-client.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 L0;function fv(){if(L0)return Ys;L0=1;var a=ov(),s=nf(),r=cv();function l(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function h(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function f(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function p(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function x(t){if(h(t)!==t)throw Error(l(188))}function y(t){var e=t.alternate;if(!e){if(e=h(t),e===null)throw Error(l(188));return e!==t?null:t}for(var n=t,i=e;;){var o=n.return;if(o===null)break;var u=o.alternate;if(u===null){if(i=o.return,i!==null){n=i;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===n)return x(o),t;if(u===i)return x(o),e;u=u.sibling}throw Error(l(188))}if(n.return!==i.return)n=o,i=u;else{for(var d=!1,v=o.child;v;){if(v===n){d=!0,n=o,i=u;break}if(v===i){d=!0,i=o,n=u;break}v=v.sibling}if(!d){for(v=u.child;v;){if(v===n){d=!0,n=u,i=o;break}if(v===i){d=!0,i=u,n=o;break}v=v.sibling}if(!d)throw Error(l(189))}}if(n.alternate!==i)throw Error(l(190))}if(n.tag!==3)throw Error(l(188));return n.stateNode.current===n?t:e}function b(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=b(t),e!==null)return e;t=t.sibling}return null}var S=Object.assign,T=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),J=Symbol.for("react.forward_ref"),at=Symbol.for("react.suspense"),ft=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),rt=Symbol.for("react.activity"),it=Symbol.for("react.memo_cache_sentinel"),xt=Symbol.iterator;function gt(t){return t===null||typeof t!="object"?null:(t=xt&&t[xt]||t["@@iterator"],typeof t=="function"?t:null)}var Gt=Symbol.for("react.client.reference");function Wt(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Gt?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case k:return"Fragment";case K:return"Profiler";case U:return"StrictMode";case at:return"Suspense";case ft:return"SuspenseList";case rt:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case D:return"Portal";case Q:return t.displayName||"Context";case P:return(t._context.displayName||"Context")+".Consumer";case J:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Z:return e=t.displayName||null,e!==null?e:Wt(t.type)||"Memo";case G:e=t._payload,t=t._init;try{return Wt(t(e))}catch{}}return null}var mt=Array.isArray,L=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},bt=[],jt=-1;function A(t){return{current:t}}function Y(t){0>jt||(t.current=bt[jt],bt[jt]=null,jt--)}function W(t,e){jt++,bt[jt]=t.current,t.current=e}var st=A(null),vt=A(null),wt=A(null),tt=A(null);function Ee(t,e){switch(W(wt,e),W(vt,t),W(st,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?Wm(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=Wm(e),t=$m(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Y(st),W(st,t)}function Ut(){Y(st),Y(vt),Y(wt)}function ea(t){t.memoizedState!==null&&W(tt,t);var e=st.current,n=$m(e,t.type);e!==n&&(W(vt,t),W(st,n))}function ni(t){vt.current===t&&(Y(st),Y(vt)),tt.current===t&&(Y(tt),Bs._currentValue=$)}var Wi,il;function Ge(t){if(Wi===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Wi=e&&e[1]||"",il=-1<n.stack.indexOf(`
    at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Wi+t+il}var $i=!1;function za(t,e){if(!t||$i)return"";$i=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(e){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(_){var O=_}Reflect.construct(t,[],X)}else{try{X.call()}catch(_){O=_}t.call(X.prototype)}}else{try{throw Error()}catch(_){O=_}(X=t())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(_){if(_&&O&&typeof _.stack=="string")return[_.stack,O.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=i.DetermineComponentFrameRoot(),d=u[0],v=u[1];if(d&&v){var M=d.split(`
`),z=v.split(`
`);for(o=i=0;i<M.length&&!M[i].includes("DetermineComponentFrameRoot");)i++;for(;o<z.length&&!z[o].includes("DetermineComponentFrameRoot");)o++;if(i===M.length||o===z.length)for(i=M.length-1,o=z.length-1;1<=i&&0<=o&&M[i]!==z[o];)o--;for(;1<=i&&0<=o;i--,o--)if(M[i]!==z[o]){if(i!==1||o!==1)do if(i--,o--,0>o||M[i]!==z[o]){var H=`
`+M[i].replace(" at new "," at ");return t.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",t.displayName)),H}while(1<=i&&0<=o);break}}}finally{$i=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?Ge(n):""}function Qr(t,e){switch(t.tag){case 26:case 27:case 5:return Ge(t.type);case 16:return Ge("Lazy");case 13:return t.child!==e&&e!==null?Ge("Suspense Fallback"):Ge("Suspense");case 19:return Ge("SuspenseList");case 0:case 15:return za(t.type,!1);case 11:return za(t.type.render,!1);case 1:return za(t.type,!0);case 31:return Ge("Activity");default:return""}}function et(t){try{var e="",n=null;do e+=Qr(t,n),n=t,t=t.return;while(t);return e}catch(i){return`
Error generating stack: `+i.message+`
`+i.stack}}var g=Object.prototype.hasOwnProperty,C=a.unstable_scheduleCallback,ut=a.unstable_cancelCallback,_t=a.unstable_shouldYield,ie=a.unstable_requestPaint,kt=a.unstable_now,Te=a.unstable_getCurrentPriorityLevel,we=a.unstable_ImmediatePriority,Dt=a.unstable_UserBlockingPriority,Tt=a.unstable_NormalPriority,ue=a.unstable_LowPriority,Sn=a.unstable_IdlePriority,na=a.log,w=a.unstable_setDisableYieldValue,Rt=null,I=null;function dt(t){if(typeof na=="function"&&w(t),I&&typeof I.setStrictMode=="function")try{I.setStrictMode(Rt,t)}catch{}}var pt=Math.clz32?Math.clz32:Ye,Yt=Math.log,ce=Math.LN2;function Ye(t){return t>>>=0,t===0?32:31-(Yt(t)/ce|0)|0}var We=256,$e=262144,V=4194304;function yt(t){var e=t&42;if(e!==0)return e;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function zt(t,e,n){var i=t.pendingLanes;if(i===0)return 0;var o=0,u=t.suspendedLanes,d=t.pingedLanes;t=t.warmLanes;var v=i&134217727;return v!==0?(i=v&~u,i!==0?o=yt(i):(d&=v,d!==0?o=yt(d):n||(n=v&~t,n!==0&&(o=yt(n))))):(v=i&~u,v!==0?o=yt(v):d!==0?o=yt(d):n||(n=i&~t,n!==0&&(o=yt(n)))),o===0?0:e!==0&&e!==o&&(e&u)===0&&(u=o&-o,n=e&-e,u>=n||u===32&&(n&4194048)!==0)?e:o}function se(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Xt(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 me(){var t=V;return V<<=1,(V&62914560)===0&&(V=4194304),t}function je(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Ne(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function on(t,e,n,i,o,u){var d=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var v=t.entanglements,M=t.expirationTimes,z=t.hiddenUpdates;for(n=d&~n;0<n;){var H=31-pt(n),X=1<<H;v[H]=0,M[H]=-1;var O=z[H];if(O!==null)for(z[H]=null,H=0;H<O.length;H++){var _=O[H];_!==null&&(_.lane&=-536870913)}n&=~X}i!==0&&sl(t,i,0),u!==0&&o===0&&t.tag!==0&&(t.suspendedLanes|=u&~(d&~e))}function sl(t,e,n){t.pendingLanes|=e,t.suspendedLanes&=~e;var i=31-pt(e);t.entangledLanes|=e,t.entanglements[i]=t.entanglements[i]|1073741824|n&261930}function Vf(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var i=31-pt(n),o=1<<i;o&e|t[i]&e&&(t[i]|=e),n&=~o}}function _f(t,e){var n=e&-e;return n=(n&42)!==0?1:Jr(n),(n&(t.suspendedLanes|e))!==0?0:n}function Jr(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Pr(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Lf(){var t=F.p;return t!==0?t:(t=window.event,t===void 0?32:S0(t.type))}function Uf(t,e){var n=F.p;try{return F.p=t,e()}finally{F.p=n}}var aa=Math.random().toString(36).slice(2),Ce="__reactFiber$"+aa,Xe="__reactProps$"+aa,ai="__reactContainer$"+aa,Fr="__reactEvents$"+aa,Qy="__reactListeners$"+aa,Jy="__reactHandles$"+aa,Bf="__reactResources$"+aa,Ii="__reactMarker$"+aa;function Wr(t){delete t[Ce],delete t[Xe],delete t[Fr],delete t[Qy],delete t[Jy]}function ii(t){var e=t[Ce];if(e)return e;for(var n=t.parentNode;n;){if(e=n[ai]||n[Ce]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=s0(t);t!==null;){if(n=t[Ce])return n;t=s0(t)}return e}t=n,n=t.parentNode}return null}function si(t){if(t=t[Ce]||t[ai]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function ts(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(l(33))}function li(t){var e=t[Bf];return e||(e=t[Bf]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function Me(t){t[Ii]=!0}var Hf=new Set,kf={};function Oa(t,e){ri(t,e),ri(t+"Capture",e)}function ri(t,e){for(kf[t]=e,t=0;t<e.length;t++)Hf.add(e[t])}var Py=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),qf={},Gf={};function Fy(t){return g.call(Gf,t)?!0:g.call(qf,t)?!1:Py.test(t)?Gf[t]=!0:(qf[t]=!0,!1)}function ll(t,e,n){if(Fy(e))if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var i=e.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+n)}}function rl(t,e,n){if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+n)}}function Ln(t,e,n,i){if(i===null)t.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttributeNS(e,n,""+i)}}function un(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Yf(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Wy(t,e,n){var i=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var o=i.get,u=i.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return o.call(this)},set:function(d){n=""+d,u.call(this,d)}}),Object.defineProperty(t,e,{enumerable:i.enumerable}),{getValue:function(){return n},setValue:function(d){n=""+d},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function $r(t){if(!t._valueTracker){var e=Yf(t)?"checked":"value";t._valueTracker=Wy(t,e,""+t[e])}}function Xf(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),i="";return t&&(i=Yf(t)?t.checked?"true":"false":t.value),t=i,t!==n?(e.setValue(t),!0):!1}function ol(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var $y=/[\n"\\]/g;function cn(t){return t.replace($y,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Ir(t,e,n,i,o,u,d,v){t.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?t.type=d:t.removeAttribute("type"),e!=null?d==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+un(e)):t.value!==""+un(e)&&(t.value=""+un(e)):d!=="submit"&&d!=="reset"||t.removeAttribute("value"),e!=null?to(t,d,un(e)):n!=null?to(t,d,un(n)):i!=null&&t.removeAttribute("value"),o==null&&u!=null&&(t.defaultChecked=!!u),o!=null&&(t.checked=o&&typeof o!="function"&&typeof o!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?t.name=""+un(v):t.removeAttribute("name")}function Kf(t,e,n,i,o,u,d,v){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(t.type=u),e!=null||n!=null){if(!(u!=="submit"&&u!=="reset"||e!=null)){$r(t);return}n=n!=null?""+un(n):"",e=e!=null?""+un(e):n,v||e===t.value||(t.value=e),t.defaultValue=e}i=i??o,i=typeof i!="function"&&typeof i!="symbol"&&!!i,t.checked=v?t.checked:!!i,t.defaultChecked=!!i,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(t.name=d),$r(t)}function to(t,e,n){e==="number"&&ol(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function oi(t,e,n,i){if(t=t.options,e){e={};for(var o=0;o<n.length;o++)e["$"+n[o]]=!0;for(n=0;n<t.length;n++)o=e.hasOwnProperty("$"+t[n].value),t[n].selected!==o&&(t[n].selected=o),o&&i&&(t[n].defaultSelected=!0)}else{for(n=""+un(n),e=null,o=0;o<t.length;o++){if(t[o].value===n){t[o].selected=!0,i&&(t[o].defaultSelected=!0);return}e!==null||t[o].disabled||(e=t[o])}e!==null&&(e.selected=!0)}}function Zf(t,e,n){if(e!=null&&(e=""+un(e),e!==t.value&&(t.value=e),n==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=n!=null?""+un(n):""}function Qf(t,e,n,i){if(e==null){if(i!=null){if(n!=null)throw Error(l(92));if(mt(i)){if(1<i.length)throw Error(l(93));i=i[0]}n=i}n==null&&(n=""),e=n}n=un(e),t.defaultValue=n,i=t.textContent,i===n&&i!==""&&i!==null&&(t.value=i),$r(t)}function ui(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Iy=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Jf(t,e,n){var i=e.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?i?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":i?t.setProperty(e,n):typeof n!="number"||n===0||Iy.has(e)?e==="float"?t.cssFloat=n:t[e]=(""+n).trim():t[e]=n+"px"}function Pf(t,e,n){if(e!=null&&typeof e!="object")throw Error(l(62));if(t=t.style,n!=null){for(var i in n)!n.hasOwnProperty(i)||e!=null&&e.hasOwnProperty(i)||(i.indexOf("--")===0?t.setProperty(i,""):i==="float"?t.cssFloat="":t[i]="");for(var o in e)i=e[o],e.hasOwnProperty(o)&&n[o]!==i&&Jf(t,o,i)}else for(var u in e)e.hasOwnProperty(u)&&Jf(t,u,e[u])}function eo(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tx=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),ex=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ul(t){return ex.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Un(){}var no=null;function ao(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ci=null,fi=null;function Ff(t){var e=si(t);if(e&&(t=e.stateNode)){var n=t[Xe]||null;t:switch(t=e.stateNode,e.type){case"input":if(Ir(t,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+cn(""+e)+'"][type="radio"]'),e=0;e<n.length;e++){var i=n[e];if(i!==t&&i.form===t.form){var o=i[Xe]||null;if(!o)throw Error(l(90));Ir(i,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(e=0;e<n.length;e++)i=n[e],i.form===t.form&&Xf(i)}break t;case"textarea":Zf(t,n.value,n.defaultValue);break t;case"select":e=n.value,e!=null&&oi(t,!!n.multiple,e,!1)}}}var io=!1;function Wf(t,e,n){if(io)return t(e,n);io=!0;try{var i=t(e);return i}finally{if(io=!1,(ci!==null||fi!==null)&&(Fl(),ci&&(e=ci,t=fi,fi=ci=null,Ff(e),t)))for(e=0;e<t.length;e++)Ff(t[e])}}function es(t,e){var n=t.stateNode;if(n===null)return null;var i=n[Xe]||null;if(i===null)return null;n=i[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(t=t.type,i=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!i;break t;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(l(231,e,typeof n));return n}var Bn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),so=!1;if(Bn)try{var ns={};Object.defineProperty(ns,"passive",{get:function(){so=!0}}),window.addEventListener("test",ns,ns),window.removeEventListener("test",ns,ns)}catch{so=!1}var ia=null,lo=null,cl=null;function $f(){if(cl)return cl;var t,e=lo,n=e.length,i,o="value"in ia?ia.value:ia.textContent,u=o.length;for(t=0;t<n&&e[t]===o[t];t++);var d=n-t;for(i=1;i<=d&&e[n-i]===o[u-i];i++);return cl=o.slice(t,1<i?1-i:void 0)}function fl(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function dl(){return!0}function If(){return!1}function Ke(t){function e(n,i,o,u,d){this._reactName=n,this._targetInst=o,this.type=i,this.nativeEvent=u,this.target=d,this.currentTarget=null;for(var v in t)t.hasOwnProperty(v)&&(n=t[v],this[v]=n?n(u):u[v]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?dl:If,this.isPropagationStopped=If,this}return S(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=dl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=dl)},persist:function(){},isPersistent:dl}),e}var Va={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hl=Ke(Va),as=S({},Va,{view:0,detail:0}),nx=Ke(as),ro,oo,is,ml=S({},as,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:co,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==is&&(is&&t.type==="mousemove"?(ro=t.screenX-is.screenX,oo=t.screenY-is.screenY):oo=ro=0,is=t),ro)},movementY:function(t){return"movementY"in t?t.movementY:oo}}),td=Ke(ml),ax=S({},ml,{dataTransfer:0}),ix=Ke(ax),sx=S({},as,{relatedTarget:0}),uo=Ke(sx),lx=S({},Va,{animationName:0,elapsedTime:0,pseudoElement:0}),rx=Ke(lx),ox=S({},Va,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),ux=Ke(ox),cx=S({},Va,{data:0}),ed=Ke(cx),fx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dx={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},hx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mx(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=hx[t])?!!e[t]:!1}function co(){return mx}var px=S({},as,{key:function(t){if(t.key){var e=fx[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=fl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?dx[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:co,charCode:function(t){return t.type==="keypress"?fl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?fl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),gx=Ke(px),yx=S({},ml,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nd=Ke(yx),xx=S({},as,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:co}),vx=Ke(xx),bx=S({},Va,{propertyName:0,elapsedTime:0,pseudoElement:0}),Sx=Ke(bx),Tx=S({},ml,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Mx=Ke(Tx),Ax=S({},Va,{newState:0,oldState:0}),Ex=Ke(Ax),wx=[9,13,27,32],fo=Bn&&"CompositionEvent"in window,ss=null;Bn&&"documentMode"in document&&(ss=document.documentMode);var jx=Bn&&"TextEvent"in window&&!ss,ad=Bn&&(!fo||ss&&8<ss&&11>=ss),id=" ",sd=!1;function ld(t,e){switch(t){case"keyup":return wx.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rd(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var di=!1;function Nx(t,e){switch(t){case"compositionend":return rd(e);case"keypress":return e.which!==32?null:(sd=!0,id);case"textInput":return t=e.data,t===id&&sd?null:t;default:return null}}function Cx(t,e){if(di)return t==="compositionend"||!fo&&ld(t,e)?(t=$f(),cl=lo=ia=null,di=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return ad&&e.locale!=="ko"?null:e.data;default:return null}}var Dx={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function od(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Dx[t.type]:e==="textarea"}function ud(t,e,n,i){ci?fi?fi.push(i):fi=[i]:ci=i,e=ar(e,"onChange"),0<e.length&&(n=new hl("onChange","change",null,n,i),t.push({event:n,listeners:e}))}var ls=null,rs=null;function Rx(t){Km(t,0)}function pl(t){var e=ts(t);if(Xf(e))return t}function cd(t,e){if(t==="change")return e}var fd=!1;if(Bn){var ho;if(Bn){var mo="oninput"in document;if(!mo){var dd=document.createElement("div");dd.setAttribute("oninput","return;"),mo=typeof dd.oninput=="function"}ho=mo}else ho=!1;fd=ho&&(!document.documentMode||9<document.documentMode)}function hd(){ls&&(ls.detachEvent("onpropertychange",md),rs=ls=null)}function md(t){if(t.propertyName==="value"&&pl(rs)){var e=[];ud(e,rs,t,ao(t)),Wf(Rx,e)}}function zx(t,e,n){t==="focusin"?(hd(),ls=e,rs=n,ls.attachEvent("onpropertychange",md)):t==="focusout"&&hd()}function Ox(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return pl(rs)}function Vx(t,e){if(t==="click")return pl(e)}function _x(t,e){if(t==="input"||t==="change")return pl(e)}function Lx(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Ie=typeof Object.is=="function"?Object.is:Lx;function os(t,e){if(Ie(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var o=n[i];if(!g.call(e,o)||!Ie(t[o],e[o]))return!1}return!0}function pd(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function gd(t,e){var n=pd(t);t=0;for(var i;n;){if(n.nodeType===3){if(i=t+n.textContent.length,t<=e&&i>=e)return{node:n,offset:e-t};t=i}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=pd(n)}}function yd(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?yd(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function xd(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=ol(t.document);e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=ol(t.document)}return e}function po(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var Ux=Bn&&"documentMode"in document&&11>=document.documentMode,hi=null,go=null,us=null,yo=!1;function vd(t,e,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;yo||hi==null||hi!==ol(i)||(i=hi,"selectionStart"in i&&po(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),us&&os(us,i)||(us=i,i=ar(go,"onSelect"),0<i.length&&(e=new hl("onSelect","select",null,e,n),t.push({event:e,listeners:i}),e.target=hi)))}function _a(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var mi={animationend:_a("Animation","AnimationEnd"),animationiteration:_a("Animation","AnimationIteration"),animationstart:_a("Animation","AnimationStart"),transitionrun:_a("Transition","TransitionRun"),transitionstart:_a("Transition","TransitionStart"),transitioncancel:_a("Transition","TransitionCancel"),transitionend:_a("Transition","TransitionEnd")},xo={},bd={};Bn&&(bd=document.createElement("div").style,"AnimationEvent"in window||(delete mi.animationend.animation,delete mi.animationiteration.animation,delete mi.animationstart.animation),"TransitionEvent"in window||delete mi.transitionend.transition);function La(t){if(xo[t])return xo[t];if(!mi[t])return t;var e=mi[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in bd)return xo[t]=e[n];return t}var Sd=La("animationend"),Td=La("animationiteration"),Md=La("animationstart"),Bx=La("transitionrun"),Hx=La("transitionstart"),kx=La("transitioncancel"),Ad=La("transitionend"),Ed=new Map,vo="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");vo.push("scrollEnd");function Tn(t,e){Ed.set(t,e),Oa(e,[t])}var gl=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},fn=[],pi=0,bo=0;function yl(){for(var t=pi,e=bo=pi=0;e<t;){var n=fn[e];fn[e++]=null;var i=fn[e];fn[e++]=null;var o=fn[e];fn[e++]=null;var u=fn[e];if(fn[e++]=null,i!==null&&o!==null){var d=i.pending;d===null?o.next=o:(o.next=d.next,d.next=o),i.pending=o}u!==0&&wd(n,o,u)}}function xl(t,e,n,i){fn[pi++]=t,fn[pi++]=e,fn[pi++]=n,fn[pi++]=i,bo|=i,t.lanes|=i,t=t.alternate,t!==null&&(t.lanes|=i)}function So(t,e,n,i){return xl(t,e,n,i),vl(t)}function Ua(t,e){return xl(t,null,null,e),vl(t)}function wd(t,e,n){t.lanes|=n;var i=t.alternate;i!==null&&(i.lanes|=n);for(var o=!1,u=t.return;u!==null;)u.childLanes|=n,i=u.alternate,i!==null&&(i.childLanes|=n),u.tag===22&&(t=u.stateNode,t===null||t._visibility&1||(o=!0)),t=u,u=u.return;return t.tag===3?(u=t.stateNode,o&&e!==null&&(o=31-pt(n),t=u.hiddenUpdates,i=t[o],i===null?t[o]=[e]:i.push(e),e.lane=n|536870912),u):null}function vl(t){if(50<Rs)throw Rs=0,Du=null,Error(l(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var gi={};function qx(t,e,n,i){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tn(t,e,n,i){return new qx(t,e,n,i)}function To(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Hn(t,e){var n=t.alternate;return n===null?(n=tn(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&65011712,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n.refCleanup=t.refCleanup,n}function jd(t,e){t.flags&=65011714;var n=t.alternate;return n===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,t.type=n.type,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function bl(t,e,n,i,o,u){var d=0;if(i=t,typeof t=="function")To(t)&&(d=1);else if(typeof t=="string")d=Z1(t,n,st.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case rt:return t=tn(31,n,e,o),t.elementType=rt,t.lanes=u,t;case k:return Ba(n.children,o,u,e);case U:d=8,o|=24;break;case K:return t=tn(12,n,e,o|2),t.elementType=K,t.lanes=u,t;case at:return t=tn(13,n,e,o),t.elementType=at,t.lanes=u,t;case ft:return t=tn(19,n,e,o),t.elementType=ft,t.lanes=u,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Q:d=10;break t;case P:d=9;break t;case J:d=11;break t;case Z:d=14;break t;case G:d=16,i=null;break t}d=29,n=Error(l(130,t===null?"null":typeof t,"")),i=null}return e=tn(d,n,e,o),e.elementType=t,e.type=i,e.lanes=u,e}function Ba(t,e,n,i){return t=tn(7,t,i,e),t.lanes=n,t}function Mo(t,e,n){return t=tn(6,t,null,e),t.lanes=n,t}function Nd(t){var e=tn(18,null,null,0);return e.stateNode=t,e}function Ao(t,e,n){return e=tn(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var Cd=new WeakMap;function dn(t,e){if(typeof t=="object"&&t!==null){var n=Cd.get(t);return n!==void 0?n:(e={value:t,source:e,stack:et(e)},Cd.set(t,e),e)}return{value:t,source:e,stack:et(e)}}var yi=[],xi=0,Sl=null,cs=0,hn=[],mn=0,sa=null,Nn=1,Cn="";function kn(t,e){yi[xi++]=cs,yi[xi++]=Sl,Sl=t,cs=e}function Dd(t,e,n){hn[mn++]=Nn,hn[mn++]=Cn,hn[mn++]=sa,sa=t;var i=Nn;t=Cn;var o=32-pt(i)-1;i&=~(1<<o),n+=1;var u=32-pt(e)+o;if(30<u){var d=o-o%5;u=(i&(1<<d)-1).toString(32),i>>=d,o-=d,Nn=1<<32-pt(e)+o|n<<o|i,Cn=u+t}else Nn=1<<u|n<<o|i,Cn=t}function Eo(t){t.return!==null&&(kn(t,1),Dd(t,1,0))}function wo(t){for(;t===Sl;)Sl=yi[--xi],yi[xi]=null,cs=yi[--xi],yi[xi]=null;for(;t===sa;)sa=hn[--mn],hn[mn]=null,Cn=hn[--mn],hn[mn]=null,Nn=hn[--mn],hn[mn]=null}function Rd(t,e){hn[mn++]=Nn,hn[mn++]=Cn,hn[mn++]=sa,Nn=e.id,Cn=e.overflow,sa=t}var De=null,ee=null,Lt=!1,la=null,pn=!1,jo=Error(l(519));function ra(t){var e=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw fs(dn(e,t)),jo}function zd(t){var e=t.stateNode,n=t.type,i=t.memoizedProps;switch(e[Ce]=t,e[Xe]=i,n){case"dialog":Ct("cancel",e),Ct("close",e);break;case"iframe":case"object":case"embed":Ct("load",e);break;case"video":case"audio":for(n=0;n<Os.length;n++)Ct(Os[n],e);break;case"source":Ct("error",e);break;case"img":case"image":case"link":Ct("error",e),Ct("load",e);break;case"details":Ct("toggle",e);break;case"input":Ct("invalid",e),Kf(e,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Ct("invalid",e);break;case"textarea":Ct("invalid",e),Qf(e,i.value,i.defaultValue,i.children)}n=i.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||e.textContent===""+n||i.suppressHydrationWarning===!0||Pm(e.textContent,n)?(i.popover!=null&&(Ct("beforetoggle",e),Ct("toggle",e)),i.onScroll!=null&&Ct("scroll",e),i.onScrollEnd!=null&&Ct("scrollend",e),i.onClick!=null&&(e.onclick=Un),e=!0):e=!1,e||ra(t,!0)}function Od(t){for(De=t.return;De;)switch(De.tag){case 5:case 31:case 13:pn=!1;return;case 27:case 3:pn=!0;return;default:De=De.return}}function vi(t){if(t!==De)return!1;if(!Lt)return Od(t),Lt=!0,!1;var e=t.tag,n;if((n=e!==3&&e!==27)&&((n=e===5)&&(n=t.type,n=!(n!=="form"&&n!=="button")||Ku(t.type,t.memoizedProps)),n=!n),n&&ee&&ra(t),Od(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));ee=i0(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));ee=i0(t)}else e===27?(e=ee,Sa(t.type)?(t=Fu,Fu=null,ee=t):ee=e):ee=De?yn(t.stateNode.nextSibling):null;return!0}function Ha(){ee=De=null,Lt=!1}function No(){var t=la;return t!==null&&(Pe===null?Pe=t:Pe.push.apply(Pe,t),la=null),t}function fs(t){la===null?la=[t]:la.push(t)}var Co=A(null),ka=null,qn=null;function oa(t,e,n){W(Co,e._currentValue),e._currentValue=n}function Gn(t){t._currentValue=Co.current,Y(Co)}function Do(t,e,n){for(;t!==null;){var i=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,i!==null&&(i.childLanes|=e)):i!==null&&(i.childLanes&e)!==e&&(i.childLanes|=e),t===n)break;t=t.return}}function Ro(t,e,n,i){var o=t.child;for(o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){var d=o.child;u=u.firstContext;t:for(;u!==null;){var v=u;u=o;for(var M=0;M<e.length;M++)if(v.context===e[M]){u.lanes|=n,v=u.alternate,v!==null&&(v.lanes|=n),Do(u.return,n,t),i||(d=null);break t}u=v.next}}else if(o.tag===18){if(d=o.return,d===null)throw Error(l(341));d.lanes|=n,u=d.alternate,u!==null&&(u.lanes|=n),Do(d,n,t),d=null}else d=o.child;if(d!==null)d.return=o;else for(d=o;d!==null;){if(d===t){d=null;break}if(o=d.sibling,o!==null){o.return=d.return,d=o;break}d=d.return}o=d}}function bi(t,e,n,i){t=null;for(var o=e,u=!1;o!==null;){if(!u){if((o.flags&524288)!==0)u=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var d=o.alternate;if(d===null)throw Error(l(387));if(d=d.memoizedProps,d!==null){var v=o.type;Ie(o.pendingProps.value,d.value)||(t!==null?t.push(v):t=[v])}}else if(o===tt.current){if(d=o.alternate,d===null)throw Error(l(387));d.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(t!==null?t.push(Bs):t=[Bs])}o=o.return}t!==null&&Ro(e,t,n,i),e.flags|=262144}function Tl(t){for(t=t.firstContext;t!==null;){if(!Ie(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function qa(t){ka=t,qn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Re(t){return Vd(ka,t)}function Ml(t,e){return ka===null&&qa(t),Vd(t,e)}function Vd(t,e){var n=e._currentValue;if(e={context:e,memoizedValue:n,next:null},qn===null){if(t===null)throw Error(l(308));qn=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else qn=qn.next=e;return n}var Gx=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(n,i){t.push(i)}};this.abort=function(){e.aborted=!0,t.forEach(function(n){return n()})}},Yx=a.unstable_scheduleCallback,Xx=a.unstable_NormalPriority,pe={$$typeof:Q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zo(){return{controller:new Gx,data:new Map,refCount:0}}function ds(t){t.refCount--,t.refCount===0&&Yx(Xx,function(){t.controller.abort()})}var hs=null,Oo=0,Si=0,Ti=null;function Kx(t,e){if(hs===null){var n=hs=[];Oo=0,Si=Lu(),Ti={status:"pending",value:void 0,then:function(i){n.push(i)}}}return Oo++,e.then(_d,_d),e}function _d(){if(--Oo===0&&hs!==null){Ti!==null&&(Ti.status="fulfilled");var t=hs;hs=null,Si=0,Ti=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function Zx(t,e){var n=[],i={status:"pending",value:null,reason:null,then:function(o){n.push(o)}};return t.then(function(){i.status="fulfilled",i.value=e;for(var o=0;o<n.length;o++)(0,n[o])(e)},function(o){for(i.status="rejected",i.reason=o,o=0;o<n.length;o++)(0,n[o])(void 0)}),i}var Ld=L.S;L.S=function(t,e){vm=kt(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&Kx(t,e),Ld!==null&&Ld(t,e)};var Ga=A(null);function Vo(){var t=Ga.current;return t!==null?t:$t.pooledCache}function Al(t,e){e===null?W(Ga,Ga.current):W(Ga,e.pool)}function Ud(){var t=Vo();return t===null?null:{parent:pe._currentValue,pool:t}}var Mi=Error(l(460)),_o=Error(l(474)),El=Error(l(542)),wl={then:function(){}};function Bd(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Hd(t,e,n){switch(n=t[n],n===void 0?t.push(e):n!==e&&(e.then(Un,Un),e=n),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,qd(t),t;default:if(typeof e.status=="string")e.then(Un,Un);else{if(t=$t,t!==null&&100<t.shellSuspendCounter)throw Error(l(482));t=e,t.status="pending",t.then(function(i){if(e.status==="pending"){var o=e;o.status="fulfilled",o.value=i}},function(i){if(e.status==="pending"){var o=e;o.status="rejected",o.reason=i}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,qd(t),t}throw Xa=e,Mi}}function Ya(t){try{var e=t._init;return e(t._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Xa=n,Mi):n}}var Xa=null;function kd(){if(Xa===null)throw Error(l(459));var t=Xa;return Xa=null,t}function qd(t){if(t===Mi||t===El)throw Error(l(483))}var Ai=null,ms=0;function jl(t){var e=ms;return ms+=1,Ai===null&&(Ai=[]),Hd(Ai,t,e)}function ps(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function Nl(t,e){throw e.$$typeof===T?Error(l(525)):(t=Object.prototype.toString.call(e),Error(l(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function Gd(t){function e(j,E){if(t){var R=j.deletions;R===null?(j.deletions=[E],j.flags|=16):R.push(E)}}function n(j,E){if(!t)return null;for(;E!==null;)e(j,E),E=E.sibling;return null}function i(j){for(var E=new Map;j!==null;)j.key!==null?E.set(j.key,j):E.set(j.index,j),j=j.sibling;return E}function o(j,E){return j=Hn(j,E),j.index=0,j.sibling=null,j}function u(j,E,R){return j.index=R,t?(R=j.alternate,R!==null?(R=R.index,R<E?(j.flags|=67108866,E):R):(j.flags|=67108866,E)):(j.flags|=1048576,E)}function d(j){return t&&j.alternate===null&&(j.flags|=67108866),j}function v(j,E,R,q){return E===null||E.tag!==6?(E=Mo(R,j.mode,q),E.return=j,E):(E=o(E,R),E.return=j,E)}function M(j,E,R,q){var ct=R.type;return ct===k?H(j,E,R.props.children,q,R.key):E!==null&&(E.elementType===ct||typeof ct=="object"&&ct!==null&&ct.$$typeof===G&&Ya(ct)===E.type)?(E=o(E,R.props),ps(E,R),E.return=j,E):(E=bl(R.type,R.key,R.props,null,j.mode,q),ps(E,R),E.return=j,E)}function z(j,E,R,q){return E===null||E.tag!==4||E.stateNode.containerInfo!==R.containerInfo||E.stateNode.implementation!==R.implementation?(E=Ao(R,j.mode,q),E.return=j,E):(E=o(E,R.children||[]),E.return=j,E)}function H(j,E,R,q,ct){return E===null||E.tag!==7?(E=Ba(R,j.mode,q,ct),E.return=j,E):(E=o(E,R),E.return=j,E)}function X(j,E,R){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=Mo(""+E,j.mode,R),E.return=j,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case N:return R=bl(E.type,E.key,E.props,null,j.mode,R),ps(R,E),R.return=j,R;case D:return E=Ao(E,j.mode,R),E.return=j,E;case G:return E=Ya(E),X(j,E,R)}if(mt(E)||gt(E))return E=Ba(E,j.mode,R,null),E.return=j,E;if(typeof E.then=="function")return X(j,jl(E),R);if(E.$$typeof===Q)return X(j,Ml(j,E),R);Nl(j,E)}return null}function O(j,E,R,q){var ct=E!==null?E.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return ct!==null?null:v(j,E,""+R,q);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case N:return R.key===ct?M(j,E,R,q):null;case D:return R.key===ct?z(j,E,R,q):null;case G:return R=Ya(R),O(j,E,R,q)}if(mt(R)||gt(R))return ct!==null?null:H(j,E,R,q,null);if(typeof R.then=="function")return O(j,E,jl(R),q);if(R.$$typeof===Q)return O(j,E,Ml(j,R),q);Nl(j,R)}return null}function _(j,E,R,q,ct){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return j=j.get(R)||null,v(E,j,""+q,ct);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case N:return j=j.get(q.key===null?R:q.key)||null,M(E,j,q,ct);case D:return j=j.get(q.key===null?R:q.key)||null,z(E,j,q,ct);case G:return q=Ya(q),_(j,E,R,q,ct)}if(mt(q)||gt(q))return j=j.get(R)||null,H(E,j,q,ct,null);if(typeof q.then=="function")return _(j,E,R,jl(q),ct);if(q.$$typeof===Q)return _(j,E,R,Ml(E,q),ct);Nl(E,q)}return null}function nt(j,E,R,q){for(var ct=null,Bt=null,ot=E,At=E=0,Vt=null;ot!==null&&At<R.length;At++){ot.index>At?(Vt=ot,ot=null):Vt=ot.sibling;var Ht=O(j,ot,R[At],q);if(Ht===null){ot===null&&(ot=Vt);break}t&&ot&&Ht.alternate===null&&e(j,ot),E=u(Ht,E,At),Bt===null?ct=Ht:Bt.sibling=Ht,Bt=Ht,ot=Vt}if(At===R.length)return n(j,ot),Lt&&kn(j,At),ct;if(ot===null){for(;At<R.length;At++)ot=X(j,R[At],q),ot!==null&&(E=u(ot,E,At),Bt===null?ct=ot:Bt.sibling=ot,Bt=ot);return Lt&&kn(j,At),ct}for(ot=i(ot);At<R.length;At++)Vt=_(ot,j,At,R[At],q),Vt!==null&&(t&&Vt.alternate!==null&&ot.delete(Vt.key===null?At:Vt.key),E=u(Vt,E,At),Bt===null?ct=Vt:Bt.sibling=Vt,Bt=Vt);return t&&ot.forEach(function(wa){return e(j,wa)}),Lt&&kn(j,At),ct}function ht(j,E,R,q){if(R==null)throw Error(l(151));for(var ct=null,Bt=null,ot=E,At=E=0,Vt=null,Ht=R.next();ot!==null&&!Ht.done;At++,Ht=R.next()){ot.index>At?(Vt=ot,ot=null):Vt=ot.sibling;var wa=O(j,ot,Ht.value,q);if(wa===null){ot===null&&(ot=Vt);break}t&&ot&&wa.alternate===null&&e(j,ot),E=u(wa,E,At),Bt===null?ct=wa:Bt.sibling=wa,Bt=wa,ot=Vt}if(Ht.done)return n(j,ot),Lt&&kn(j,At),ct;if(ot===null){for(;!Ht.done;At++,Ht=R.next())Ht=X(j,Ht.value,q),Ht!==null&&(E=u(Ht,E,At),Bt===null?ct=Ht:Bt.sibling=Ht,Bt=Ht);return Lt&&kn(j,At),ct}for(ot=i(ot);!Ht.done;At++,Ht=R.next())Ht=_(ot,j,At,Ht.value,q),Ht!==null&&(t&&Ht.alternate!==null&&ot.delete(Ht.key===null?At:Ht.key),E=u(Ht,E,At),Bt===null?ct=Ht:Bt.sibling=Ht,Bt=Ht);return t&&ot.forEach(function(av){return e(j,av)}),Lt&&kn(j,At),ct}function Pt(j,E,R,q){if(typeof R=="object"&&R!==null&&R.type===k&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case N:t:{for(var ct=R.key;E!==null;){if(E.key===ct){if(ct=R.type,ct===k){if(E.tag===7){n(j,E.sibling),q=o(E,R.props.children),q.return=j,j=q;break t}}else if(E.elementType===ct||typeof ct=="object"&&ct!==null&&ct.$$typeof===G&&Ya(ct)===E.type){n(j,E.sibling),q=o(E,R.props),ps(q,R),q.return=j,j=q;break t}n(j,E);break}else e(j,E);E=E.sibling}R.type===k?(q=Ba(R.props.children,j.mode,q,R.key),q.return=j,j=q):(q=bl(R.type,R.key,R.props,null,j.mode,q),ps(q,R),q.return=j,j=q)}return d(j);case D:t:{for(ct=R.key;E!==null;){if(E.key===ct)if(E.tag===4&&E.stateNode.containerInfo===R.containerInfo&&E.stateNode.implementation===R.implementation){n(j,E.sibling),q=o(E,R.children||[]),q.return=j,j=q;break t}else{n(j,E);break}else e(j,E);E=E.sibling}q=Ao(R,j.mode,q),q.return=j,j=q}return d(j);case G:return R=Ya(R),Pt(j,E,R,q)}if(mt(R))return nt(j,E,R,q);if(gt(R)){if(ct=gt(R),typeof ct!="function")throw Error(l(150));return R=ct.call(R),ht(j,E,R,q)}if(typeof R.then=="function")return Pt(j,E,jl(R),q);if(R.$$typeof===Q)return Pt(j,E,Ml(j,R),q);Nl(j,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,E!==null&&E.tag===6?(n(j,E.sibling),q=o(E,R),q.return=j,j=q):(n(j,E),q=Mo(R,j.mode,q),q.return=j,j=q),d(j)):n(j,E)}return function(j,E,R,q){try{ms=0;var ct=Pt(j,E,R,q);return Ai=null,ct}catch(ot){if(ot===Mi||ot===El)throw ot;var Bt=tn(29,ot,null,j.mode);return Bt.lanes=q,Bt.return=j,Bt}finally{}}}var Ka=Gd(!0),Yd=Gd(!1),ua=!1;function Lo(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Uo(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ca(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function fa(t,e,n){var i=t.updateQueue;if(i===null)return null;if(i=i.shared,(qt&2)!==0){var o=i.pending;return o===null?e.next=e:(e.next=o.next,o.next=e),i.pending=e,e=vl(t),wd(t,null,n),e}return xl(t,i,e,n),vl(t)}function gs(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194048)!==0)){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,Vf(t,n)}}function Bo(t,e){var n=t.updateQueue,i=t.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var o=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var d={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};u===null?o=u=d:u=u.next=d,n=n.next}while(n!==null);u===null?o=u=e:u=u.next=e}else o=u=e;n={baseState:i.baseState,firstBaseUpdate:o,lastBaseUpdate:u,shared:i.shared,callbacks:i.callbacks},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}var Ho=!1;function ys(){if(Ho){var t=Ti;if(t!==null)throw t}}function xs(t,e,n,i){Ho=!1;var o=t.updateQueue;ua=!1;var u=o.firstBaseUpdate,d=o.lastBaseUpdate,v=o.shared.pending;if(v!==null){o.shared.pending=null;var M=v,z=M.next;M.next=null,d===null?u=z:d.next=z,d=M;var H=t.alternate;H!==null&&(H=H.updateQueue,v=H.lastBaseUpdate,v!==d&&(v===null?H.firstBaseUpdate=z:v.next=z,H.lastBaseUpdate=M))}if(u!==null){var X=o.baseState;d=0,H=z=M=null,v=u;do{var O=v.lane&-536870913,_=O!==v.lane;if(_?(Ot&O)===O:(i&O)===O){O!==0&&O===Si&&(Ho=!0),H!==null&&(H=H.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});t:{var nt=t,ht=v;O=e;var Pt=n;switch(ht.tag){case 1:if(nt=ht.payload,typeof nt=="function"){X=nt.call(Pt,X,O);break t}X=nt;break t;case 3:nt.flags=nt.flags&-65537|128;case 0:if(nt=ht.payload,O=typeof nt=="function"?nt.call(Pt,X,O):nt,O==null)break t;X=S({},X,O);break t;case 2:ua=!0}}O=v.callback,O!==null&&(t.flags|=64,_&&(t.flags|=8192),_=o.callbacks,_===null?o.callbacks=[O]:_.push(O))}else _={lane:O,tag:v.tag,payload:v.payload,callback:v.callback,next:null},H===null?(z=H=_,M=X):H=H.next=_,d|=O;if(v=v.next,v===null){if(v=o.shared.pending,v===null)break;_=v,v=_.next,_.next=null,o.lastBaseUpdate=_,o.shared.pending=null}}while(!0);H===null&&(M=X),o.baseState=M,o.firstBaseUpdate=z,o.lastBaseUpdate=H,u===null&&(o.shared.lanes=0),ga|=d,t.lanes=d,t.memoizedState=X}}function Xd(t,e){if(typeof t!="function")throw Error(l(191,t));t.call(e)}function Kd(t,e){var n=t.callbacks;if(n!==null)for(t.callbacks=null,t=0;t<n.length;t++)Xd(n[t],e)}var Ei=A(null),Cl=A(0);function Zd(t,e){t=Wn,W(Cl,t),W(Ei,e),Wn=t|e.baseLanes}function ko(){W(Cl,Wn),W(Ei,Ei.current)}function qo(){Wn=Cl.current,Y(Ei),Y(Cl)}var en=A(null),gn=null;function da(t){var e=t.alternate;W(fe,fe.current&1),W(en,t),gn===null&&(e===null||Ei.current!==null||e.memoizedState!==null)&&(gn=t)}function Go(t){W(fe,fe.current),W(en,t),gn===null&&(gn=t)}function Qd(t){t.tag===22?(W(fe,fe.current),W(en,t),gn===null&&(gn=t)):ha()}function ha(){W(fe,fe.current),W(en,en.current)}function nn(t){Y(en),gn===t&&(gn=null),Y(fe)}var fe=A(0);function Dl(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Ju(n)||Pu(n)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Yn=0,Mt=null,Qt=null,ge=null,Rl=!1,wi=!1,Za=!1,zl=0,vs=0,ji=null,Qx=0;function le(){throw Error(l(321))}function Yo(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Ie(t[n],e[n]))return!1;return!0}function Xo(t,e,n,i,o,u){return Yn=u,Mt=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,L.H=t===null||t.memoizedState===null?Dh:su,Za=!1,u=n(i,o),Za=!1,wi&&(u=Pd(e,n,i,o)),Jd(t),u}function Jd(t){L.H=Ts;var e=Qt!==null&&Qt.next!==null;if(Yn=0,ge=Qt=Mt=null,Rl=!1,vs=0,ji=null,e)throw Error(l(300));t===null||ye||(t=t.dependencies,t!==null&&Tl(t)&&(ye=!0))}function Pd(t,e,n,i){Mt=t;var o=0;do{if(wi&&(ji=null),vs=0,wi=!1,25<=o)throw Error(l(301));if(o+=1,ge=Qt=null,t.updateQueue!=null){var u=t.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}L.H=Rh,u=e(n,i)}while(wi);return u}function Jx(){var t=L.H,e=t.useState()[0];return e=typeof e.then=="function"?bs(e):e,t=t.useState()[0],(Qt!==null?Qt.memoizedState:null)!==t&&(Mt.flags|=1024),e}function Ko(){var t=zl!==0;return zl=0,t}function Zo(t,e,n){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~n}function Qo(t){if(Rl){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}Rl=!1}Yn=0,ge=Qt=Mt=null,wi=!1,vs=zl=0,ji=null}function He(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ge===null?Mt.memoizedState=ge=t:ge=ge.next=t,ge}function de(){if(Qt===null){var t=Mt.alternate;t=t!==null?t.memoizedState:null}else t=Qt.next;var e=ge===null?Mt.memoizedState:ge.next;if(e!==null)ge=e,Qt=t;else{if(t===null)throw Mt.alternate===null?Error(l(467)):Error(l(310));Qt=t,t={memoizedState:Qt.memoizedState,baseState:Qt.baseState,baseQueue:Qt.baseQueue,queue:Qt.queue,next:null},ge===null?Mt.memoizedState=ge=t:ge=ge.next=t}return ge}function Ol(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bs(t){var e=vs;return vs+=1,ji===null&&(ji=[]),t=Hd(ji,t,e),e=Mt,(ge===null?e.memoizedState:ge.next)===null&&(e=e.alternate,L.H=e===null||e.memoizedState===null?Dh:su),t}function Vl(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return bs(t);if(t.$$typeof===Q)return Re(t)}throw Error(l(438,String(t)))}function Jo(t){var e=null,n=Mt.updateQueue;if(n!==null&&(e=n.memoCache),e==null){var i=Mt.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(e={data:i.data.map(function(o){return o.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),n===null&&(n=Ol(),Mt.updateQueue=n),n.memoCache=e,n=e.data[e.index],n===void 0)for(n=e.data[e.index]=Array(t),i=0;i<t;i++)n[i]=it;return e.index++,n}function Xn(t,e){return typeof e=="function"?e(t):e}function _l(t){var e=de();return Po(e,Qt,t)}function Po(t,e,n){var i=t.queue;if(i===null)throw Error(l(311));i.lastRenderedReducer=n;var o=t.baseQueue,u=i.pending;if(u!==null){if(o!==null){var d=o.next;o.next=u.next,u.next=d}e.baseQueue=o=u,i.pending=null}if(u=t.baseState,o===null)t.memoizedState=u;else{e=o.next;var v=d=null,M=null,z=e,H=!1;do{var X=z.lane&-536870913;if(X!==z.lane?(Ot&X)===X:(Yn&X)===X){var O=z.revertLane;if(O===0)M!==null&&(M=M.next={lane:0,revertLane:0,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),X===Si&&(H=!0);else if((Yn&O)===O){z=z.next,O===Si&&(H=!0);continue}else X={lane:0,revertLane:z.revertLane,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},M===null?(v=M=X,d=u):M=M.next=X,Mt.lanes|=O,ga|=O;X=z.action,Za&&n(u,X),u=z.hasEagerState?z.eagerState:n(u,X)}else O={lane:X,revertLane:z.revertLane,gesture:z.gesture,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},M===null?(v=M=O,d=u):M=M.next=O,Mt.lanes|=X,ga|=X;z=z.next}while(z!==null&&z!==e);if(M===null?d=u:M.next=v,!Ie(u,t.memoizedState)&&(ye=!0,H&&(n=Ti,n!==null)))throw n;t.memoizedState=u,t.baseState=d,t.baseQueue=M,i.lastRenderedState=u}return o===null&&(i.lanes=0),[t.memoizedState,i.dispatch]}function Fo(t){var e=de(),n=e.queue;if(n===null)throw Error(l(311));n.lastRenderedReducer=t;var i=n.dispatch,o=n.pending,u=e.memoizedState;if(o!==null){n.pending=null;var d=o=o.next;do u=t(u,d.action),d=d.next;while(d!==o);Ie(u,e.memoizedState)||(ye=!0),e.memoizedState=u,e.baseQueue===null&&(e.baseState=u),n.lastRenderedState=u}return[u,i]}function Fd(t,e,n){var i=Mt,o=de(),u=Lt;if(u){if(n===void 0)throw Error(l(407));n=n()}else n=e();var d=!Ie((Qt||o).memoizedState,n);if(d&&(o.memoizedState=n,ye=!0),o=o.queue,Io(Id.bind(null,i,o,t),[t]),o.getSnapshot!==e||d||ge!==null&&ge.memoizedState.tag&1){if(i.flags|=2048,Ni(9,{destroy:void 0},$d.bind(null,i,o,n,e),null),$t===null)throw Error(l(349));u||(Yn&127)!==0||Wd(i,e,n)}return n}function Wd(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=Mt.updateQueue,e===null?(e=Ol(),Mt.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function $d(t,e,n,i){e.value=n,e.getSnapshot=i,th(e)&&eh(t)}function Id(t,e,n){return n(function(){th(e)&&eh(t)})}function th(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Ie(t,n)}catch{return!0}}function eh(t){var e=Ua(t,2);e!==null&&Fe(e,t,2)}function Wo(t){var e=He();if(typeof t=="function"){var n=t;if(t=n(),Za){dt(!0);try{n()}finally{dt(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:t},e}function nh(t,e,n,i){return t.baseState=n,Po(t,Qt,typeof i=="function"?i:Xn)}function Px(t,e,n,i,o){if(Bl(t))throw Error(l(485));if(t=e.action,t!==null){var u={payload:o,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){u.listeners.push(d)}};L.T!==null?n(!0):u.isTransition=!1,i(u),n=e.pending,n===null?(u.next=e.pending=u,ah(e,u)):(u.next=n.next,e.pending=n.next=u)}}function ah(t,e){var n=e.action,i=e.payload,o=t.state;if(e.isTransition){var u=L.T,d={};L.T=d;try{var v=n(o,i),M=L.S;M!==null&&M(d,v),ih(t,e,v)}catch(z){$o(t,e,z)}finally{u!==null&&d.types!==null&&(u.types=d.types),L.T=u}}else try{u=n(o,i),ih(t,e,u)}catch(z){$o(t,e,z)}}function ih(t,e,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(i){sh(t,e,i)},function(i){return $o(t,e,i)}):sh(t,e,n)}function sh(t,e,n){e.status="fulfilled",e.value=n,lh(e),t.state=n,e=t.pending,e!==null&&(n=e.next,n===e?t.pending=null:(n=n.next,e.next=n,ah(t,n)))}function $o(t,e,n){var i=t.pending;if(t.pending=null,i!==null){i=i.next;do e.status="rejected",e.reason=n,lh(e),e=e.next;while(e!==i)}t.action=null}function lh(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function rh(t,e){return e}function oh(t,e){if(Lt){var n=$t.formState;if(n!==null){t:{var i=Mt;if(Lt){if(ee){e:{for(var o=ee,u=pn;o.nodeType!==8;){if(!u){o=null;break e}if(o=yn(o.nextSibling),o===null){o=null;break e}}u=o.data,o=u==="F!"||u==="F"?o:null}if(o){ee=yn(o.nextSibling),i=o.data==="F!";break t}}ra(i)}i=!1}i&&(e=n[0])}}return n=He(),n.memoizedState=n.baseState=e,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rh,lastRenderedState:e},n.queue=i,n=jh.bind(null,Mt,i),i.dispatch=n,i=Wo(!1),u=iu.bind(null,Mt,!1,i.queue),i=He(),o={state:e,dispatch:null,action:t,pending:null},i.queue=o,n=Px.bind(null,Mt,o,u,n),o.dispatch=n,i.memoizedState=t,[e,n,!1]}function uh(t){var e=de();return ch(e,Qt,t)}function ch(t,e,n){if(e=Po(t,e,rh)[0],t=_l(Xn)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var i=bs(e)}catch(d){throw d===Mi?El:d}else i=e;e=de();var o=e.queue,u=o.dispatch;return n!==e.memoizedState&&(Mt.flags|=2048,Ni(9,{destroy:void 0},Fx.bind(null,o,n),null)),[i,u,t]}function Fx(t,e){t.action=e}function fh(t){var e=de(),n=Qt;if(n!==null)return ch(e,n,t);de(),e=e.memoizedState,n=de();var i=n.queue.dispatch;return n.memoizedState=t,[e,i,!1]}function Ni(t,e,n,i){return t={tag:t,create:n,deps:i,inst:e,next:null},e=Mt.updateQueue,e===null&&(e=Ol(),Mt.updateQueue=e),n=e.lastEffect,n===null?e.lastEffect=t.next=t:(i=n.next,n.next=t,t.next=i,e.lastEffect=t),t}function dh(){return de().memoizedState}function Ll(t,e,n,i){var o=He();Mt.flags|=t,o.memoizedState=Ni(1|e,{destroy:void 0},n,i===void 0?null:i)}function Ul(t,e,n,i){var o=de();i=i===void 0?null:i;var u=o.memoizedState.inst;Qt!==null&&i!==null&&Yo(i,Qt.memoizedState.deps)?o.memoizedState=Ni(e,u,n,i):(Mt.flags|=t,o.memoizedState=Ni(1|e,u,n,i))}function hh(t,e){Ll(8390656,8,t,e)}function Io(t,e){Ul(2048,8,t,e)}function Wx(t){Mt.flags|=4;var e=Mt.updateQueue;if(e===null)e=Ol(),Mt.updateQueue=e,e.events=[t];else{var n=e.events;n===null?e.events=[t]:n.push(t)}}function mh(t){var e=de().memoizedState;return Wx({ref:e,nextImpl:t}),function(){if((qt&2)!==0)throw Error(l(440));return e.impl.apply(void 0,arguments)}}function ph(t,e){return Ul(4,2,t,e)}function gh(t,e){return Ul(4,4,t,e)}function yh(t,e){if(typeof e=="function"){t=t();var n=e(t);return function(){typeof n=="function"?n():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function xh(t,e,n){n=n!=null?n.concat([t]):null,Ul(4,4,yh.bind(null,e,t),n)}function tu(){}function vh(t,e){var n=de();e=e===void 0?null:e;var i=n.memoizedState;return e!==null&&Yo(e,i[1])?i[0]:(n.memoizedState=[t,e],t)}function bh(t,e){var n=de();e=e===void 0?null:e;var i=n.memoizedState;if(e!==null&&Yo(e,i[1]))return i[0];if(i=t(),Za){dt(!0);try{t()}finally{dt(!1)}}return n.memoizedState=[i,e],i}function eu(t,e,n){return n===void 0||(Yn&1073741824)!==0&&(Ot&261930)===0?t.memoizedState=e:(t.memoizedState=n,t=Sm(),Mt.lanes|=t,ga|=t,n)}function Sh(t,e,n,i){return Ie(n,e)?n:Ei.current!==null?(t=eu(t,n,i),Ie(t,e)||(ye=!0),t):(Yn&42)===0||(Yn&1073741824)!==0&&(Ot&261930)===0?(ye=!0,t.memoizedState=n):(t=Sm(),Mt.lanes|=t,ga|=t,e)}function Th(t,e,n,i,o){var u=F.p;F.p=u!==0&&8>u?u:8;var d=L.T,v={};L.T=v,iu(t,!1,e,n);try{var M=o(),z=L.S;if(z!==null&&z(v,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var H=Zx(M,i);Ss(t,e,H,ln(t))}else Ss(t,e,i,ln(t))}catch(X){Ss(t,e,{then:function(){},status:"rejected",reason:X},ln())}finally{F.p=u,d!==null&&v.types!==null&&(d.types=v.types),L.T=d}}function $x(){}function nu(t,e,n,i){if(t.tag!==5)throw Error(l(476));var o=Mh(t).queue;Th(t,o,e,$,n===null?$x:function(){return Ah(t),n(i)})}function Mh(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:$},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Ah(t){var e=Mh(t);e.next===null&&(e=t.alternate.memoizedState),Ss(t,e.next.queue,{},ln())}function au(){return Re(Bs)}function Eh(){return de().memoizedState}function wh(){return de().memoizedState}function Ix(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=ln();t=ca(n);var i=fa(e,t,n);i!==null&&(Fe(i,e,n),gs(i,e,n)),e={cache:zo()},t.payload=e;return}e=e.return}}function t1(t,e,n){var i=ln();n={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Bl(t)?Nh(e,n):(n=So(t,e,n,i),n!==null&&(Fe(n,t,i),Ch(n,e,i)))}function jh(t,e,n){var i=ln();Ss(t,e,n,i)}function Ss(t,e,n,i){var o={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bl(t))Nh(e,o);else{var u=t.alternate;if(t.lanes===0&&(u===null||u.lanes===0)&&(u=e.lastRenderedReducer,u!==null))try{var d=e.lastRenderedState,v=u(d,n);if(o.hasEagerState=!0,o.eagerState=v,Ie(v,d))return xl(t,e,o,0),$t===null&&yl(),!1}catch{}finally{}if(n=So(t,e,o,i),n!==null)return Fe(n,t,i),Ch(n,e,i),!0}return!1}function iu(t,e,n,i){if(i={lane:2,revertLane:Lu(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Bl(t)){if(e)throw Error(l(479))}else e=So(t,n,i,2),e!==null&&Fe(e,t,2)}function Bl(t){var e=t.alternate;return t===Mt||e!==null&&e===Mt}function Nh(t,e){wi=Rl=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Ch(t,e,n){if((n&4194048)!==0){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,Vf(t,n)}}var Ts={readContext:Re,use:Vl,useCallback:le,useContext:le,useEffect:le,useImperativeHandle:le,useLayoutEffect:le,useInsertionEffect:le,useMemo:le,useReducer:le,useRef:le,useState:le,useDebugValue:le,useDeferredValue:le,useTransition:le,useSyncExternalStore:le,useId:le,useHostTransitionStatus:le,useFormState:le,useActionState:le,useOptimistic:le,useMemoCache:le,useCacheRefresh:le};Ts.useEffectEvent=le;var Dh={readContext:Re,use:Vl,useCallback:function(t,e){return He().memoizedState=[t,e===void 0?null:e],t},useContext:Re,useEffect:hh,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,Ll(4194308,4,yh.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Ll(4194308,4,t,e)},useInsertionEffect:function(t,e){Ll(4,2,t,e)},useMemo:function(t,e){var n=He();e=e===void 0?null:e;var i=t();if(Za){dt(!0);try{t()}finally{dt(!1)}}return n.memoizedState=[i,e],i},useReducer:function(t,e,n){var i=He();if(n!==void 0){var o=n(e);if(Za){dt(!0);try{n(e)}finally{dt(!1)}}}else o=e;return i.memoizedState=i.baseState=o,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:o},i.queue=t,t=t.dispatch=t1.bind(null,Mt,t),[i.memoizedState,t]},useRef:function(t){var e=He();return t={current:t},e.memoizedState=t},useState:function(t){t=Wo(t);var e=t.queue,n=jh.bind(null,Mt,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:tu,useDeferredValue:function(t,e){var n=He();return eu(n,t,e)},useTransition:function(){var t=Wo(!1);return t=Th.bind(null,Mt,t.queue,!0,!1),He().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var i=Mt,o=He();if(Lt){if(n===void 0)throw Error(l(407));n=n()}else{if(n=e(),$t===null)throw Error(l(349));(Ot&127)!==0||Wd(i,e,n)}o.memoizedState=n;var u={value:n,getSnapshot:e};return o.queue=u,hh(Id.bind(null,i,u,t),[t]),i.flags|=2048,Ni(9,{destroy:void 0},$d.bind(null,i,u,n,e),null),n},useId:function(){var t=He(),e=$t.identifierPrefix;if(Lt){var n=Cn,i=Nn;n=(i&~(1<<32-pt(i)-1)).toString(32)+n,e="_"+e+"R_"+n,n=zl++,0<n&&(e+="H"+n.toString(32)),e+="_"}else n=Qx++,e="_"+e+"r_"+n.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:au,useFormState:oh,useActionState:oh,useOptimistic:function(t){var e=He();e.memoizedState=e.baseState=t;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=n,e=iu.bind(null,Mt,!0,n),n.dispatch=e,[t,e]},useMemoCache:Jo,useCacheRefresh:function(){return He().memoizedState=Ix.bind(null,Mt)},useEffectEvent:function(t){var e=He(),n={impl:t};return e.memoizedState=n,function(){if((qt&2)!==0)throw Error(l(440));return n.impl.apply(void 0,arguments)}}},su={readContext:Re,use:Vl,useCallback:vh,useContext:Re,useEffect:Io,useImperativeHandle:xh,useInsertionEffect:ph,useLayoutEffect:gh,useMemo:bh,useReducer:_l,useRef:dh,useState:function(){return _l(Xn)},useDebugValue:tu,useDeferredValue:function(t,e){var n=de();return Sh(n,Qt.memoizedState,t,e)},useTransition:function(){var t=_l(Xn)[0],e=de().memoizedState;return[typeof t=="boolean"?t:bs(t),e]},useSyncExternalStore:Fd,useId:Eh,useHostTransitionStatus:au,useFormState:uh,useActionState:uh,useOptimistic:function(t,e){var n=de();return nh(n,Qt,t,e)},useMemoCache:Jo,useCacheRefresh:wh};su.useEffectEvent=mh;var Rh={readContext:Re,use:Vl,useCallback:vh,useContext:Re,useEffect:Io,useImperativeHandle:xh,useInsertionEffect:ph,useLayoutEffect:gh,useMemo:bh,useReducer:Fo,useRef:dh,useState:function(){return Fo(Xn)},useDebugValue:tu,useDeferredValue:function(t,e){var n=de();return Qt===null?eu(n,t,e):Sh(n,Qt.memoizedState,t,e)},useTransition:function(){var t=Fo(Xn)[0],e=de().memoizedState;return[typeof t=="boolean"?t:bs(t),e]},useSyncExternalStore:Fd,useId:Eh,useHostTransitionStatus:au,useFormState:fh,useActionState:fh,useOptimistic:function(t,e){var n=de();return Qt!==null?nh(n,Qt,t,e):(n.baseState=t,[t,n.queue.dispatch])},useMemoCache:Jo,useCacheRefresh:wh};Rh.useEffectEvent=mh;function lu(t,e,n,i){e=t.memoizedState,n=n(i,e),n=n==null?e:S({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var ru={enqueueSetState:function(t,e,n){t=t._reactInternals;var i=ln(),o=ca(i);o.payload=e,n!=null&&(o.callback=n),e=fa(t,o,i),e!==null&&(Fe(e,t,i),gs(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var i=ln(),o=ca(i);o.tag=1,o.payload=e,n!=null&&(o.callback=n),e=fa(t,o,i),e!==null&&(Fe(e,t,i),gs(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=ln(),i=ca(n);i.tag=2,e!=null&&(i.callback=e),e=fa(t,i,n),e!==null&&(Fe(e,t,n),gs(e,t,n))}};function zh(t,e,n,i,o,u,d){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(i,u,d):e.prototype&&e.prototype.isPureReactComponent?!os(n,i)||!os(o,u):!0}function Oh(t,e,n,i){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,i),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,i),e.state!==t&&ru.enqueueReplaceState(e,e.state,null)}function Qa(t,e){var n=e;if("ref"in e){n={};for(var i in e)i!=="ref"&&(n[i]=e[i])}if(t=t.defaultProps){n===e&&(n=S({},n));for(var o in t)n[o]===void 0&&(n[o]=t[o])}return n}function Vh(t){gl(t)}function _h(t){console.error(t)}function Lh(t){gl(t)}function Hl(t,e){try{var n=t.onUncaughtError;n(e.value,{componentStack:e.stack})}catch(i){setTimeout(function(){throw i})}}function Uh(t,e,n){try{var i=t.onCaughtError;i(n.value,{componentStack:n.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function ou(t,e,n){return n=ca(n),n.tag=3,n.payload={element:null},n.callback=function(){Hl(t,e)},n}function Bh(t){return t=ca(t),t.tag=3,t}function Hh(t,e,n,i){var o=n.type.getDerivedStateFromError;if(typeof o=="function"){var u=i.value;t.payload=function(){return o(u)},t.callback=function(){Uh(e,n,i)}}var d=n.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(t.callback=function(){Uh(e,n,i),typeof o!="function"&&(ya===null?ya=new Set([this]):ya.add(this));var v=i.stack;this.componentDidCatch(i.value,{componentStack:v!==null?v:""})})}function e1(t,e,n,i,o){if(n.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(e=n.alternate,e!==null&&bi(e,n,o,!0),n=en.current,n!==null){switch(n.tag){case 31:case 13:return gn===null?Wl():n.alternate===null&&re===0&&(re=3),n.flags&=-257,n.flags|=65536,n.lanes=o,i===wl?n.flags|=16384:(e=n.updateQueue,e===null?n.updateQueue=new Set([i]):e.add(i),Ou(t,i,o)),!1;case 22:return n.flags|=65536,i===wl?n.flags|=16384:(e=n.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([i])},n.updateQueue=e):(n=e.retryQueue,n===null?e.retryQueue=new Set([i]):n.add(i)),Ou(t,i,o)),!1}throw Error(l(435,n.tag))}return Ou(t,i,o),Wl(),!1}if(Lt)return e=en.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=o,i!==jo&&(t=Error(l(422),{cause:i}),fs(dn(t,n)))):(i!==jo&&(e=Error(l(423),{cause:i}),fs(dn(e,n))),t=t.current.alternate,t.flags|=65536,o&=-o,t.lanes|=o,i=dn(i,n),o=ou(t.stateNode,i,o),Bo(t,o),re!==4&&(re=2)),!1;var u=Error(l(520),{cause:i});if(u=dn(u,n),Ds===null?Ds=[u]:Ds.push(u),re!==4&&(re=2),e===null)return!0;i=dn(i,n),n=e;do{switch(n.tag){case 3:return n.flags|=65536,t=o&-o,n.lanes|=t,t=ou(n.stateNode,i,t),Bo(n,t),!1;case 1:if(e=n.type,u=n.stateNode,(n.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(ya===null||!ya.has(u))))return n.flags|=65536,o&=-o,n.lanes|=o,o=Bh(o),Hh(o,t,n,i),Bo(n,o),!1}n=n.return}while(n!==null);return!1}var uu=Error(l(461)),ye=!1;function ze(t,e,n,i){e.child=t===null?Yd(e,null,n,i):Ka(e,t.child,n,i)}function kh(t,e,n,i,o){n=n.render;var u=e.ref;if("ref"in i){var d={};for(var v in i)v!=="ref"&&(d[v]=i[v])}else d=i;return qa(e),i=Xo(t,e,n,d,u,o),v=Ko(),t!==null&&!ye?(Zo(t,e,o),Kn(t,e,o)):(Lt&&v&&Eo(e),e.flags|=1,ze(t,e,i,o),e.child)}function qh(t,e,n,i,o){if(t===null){var u=n.type;return typeof u=="function"&&!To(u)&&u.defaultProps===void 0&&n.compare===null?(e.tag=15,e.type=u,Gh(t,e,u,i,o)):(t=bl(n.type,null,i,e,e.mode,o),t.ref=e.ref,t.return=e,e.child=t)}if(u=t.child,!yu(t,o)){var d=u.memoizedProps;if(n=n.compare,n=n!==null?n:os,n(d,i)&&t.ref===e.ref)return Kn(t,e,o)}return e.flags|=1,t=Hn(u,i),t.ref=e.ref,t.return=e,e.child=t}function Gh(t,e,n,i,o){if(t!==null){var u=t.memoizedProps;if(os(u,i)&&t.ref===e.ref)if(ye=!1,e.pendingProps=i=u,yu(t,o))(t.flags&131072)!==0&&(ye=!0);else return e.lanes=t.lanes,Kn(t,e,o)}return cu(t,e,n,i,o)}function Yh(t,e,n,i){var o=i.children,u=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((e.flags&128)!==0){if(u=u!==null?u.baseLanes|n:n,t!==null){for(i=e.child=t.child,o=0;i!==null;)o=o|i.lanes|i.childLanes,i=i.sibling;i=o&~u}else i=0,e.child=null;return Xh(t,e,u,n,i)}if((n&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&Al(e,u!==null?u.cachePool:null),u!==null?Zd(e,u):ko(),Qd(e);else return i=e.lanes=536870912,Xh(t,e,u!==null?u.baseLanes|n:n,n,i)}else u!==null?(Al(e,u.cachePool),Zd(e,u),ha(),e.memoizedState=null):(t!==null&&Al(e,null),ko(),ha());return ze(t,e,o,n),e.child}function Ms(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function Xh(t,e,n,i,o){var u=Vo();return u=u===null?null:{parent:pe._currentValue,pool:u},e.memoizedState={baseLanes:n,cachePool:u},t!==null&&Al(e,null),ko(),Qd(e),t!==null&&bi(t,e,i,!0),e.childLanes=o,null}function kl(t,e){return e=Gl({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function Kh(t,e,n){return Ka(e,t.child,null,n),t=kl(e,e.pendingProps),t.flags|=2,nn(e),e.memoizedState=null,t}function n1(t,e,n){var i=e.pendingProps,o=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(Lt){if(i.mode==="hidden")return t=kl(e,i),e.lanes=536870912,Ms(null,t);if(Go(e),(t=ee)?(t=a0(t,pn),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:sa!==null?{id:Nn,overflow:Cn}:null,retryLane:536870912,hydrationErrors:null},n=Nd(t),n.return=e,e.child=n,De=e,ee=null)):t=null,t===null)throw ra(e);return e.lanes=536870912,null}return kl(e,i)}var u=t.memoizedState;if(u!==null){var d=u.dehydrated;if(Go(e),o)if(e.flags&256)e.flags&=-257,e=Kh(t,e,n);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(l(558));else if(ye||bi(t,e,n,!1),o=(n&t.childLanes)!==0,ye||o){if(i=$t,i!==null&&(d=_f(i,n),d!==0&&d!==u.retryLane))throw u.retryLane=d,Ua(t,d),Fe(i,t,d),uu;Wl(),e=Kh(t,e,n)}else t=u.treeContext,ee=yn(d.nextSibling),De=e,Lt=!0,la=null,pn=!1,t!==null&&Rd(e,t),e=kl(e,i),e.flags|=4096;return e}return t=Hn(t.child,{mode:i.mode,children:i.children}),t.ref=e.ref,e.child=t,t.return=e,t}function ql(t,e){var n=e.ref;if(n===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(l(284));(t===null||t.ref!==n)&&(e.flags|=4194816)}}function cu(t,e,n,i,o){return qa(e),n=Xo(t,e,n,i,void 0,o),i=Ko(),t!==null&&!ye?(Zo(t,e,o),Kn(t,e,o)):(Lt&&i&&Eo(e),e.flags|=1,ze(t,e,n,o),e.child)}function Zh(t,e,n,i,o,u){return qa(e),e.updateQueue=null,n=Pd(e,i,n,o),Jd(t),i=Ko(),t!==null&&!ye?(Zo(t,e,u),Kn(t,e,u)):(Lt&&i&&Eo(e),e.flags|=1,ze(t,e,n,u),e.child)}function Qh(t,e,n,i,o){if(qa(e),e.stateNode===null){var u=gi,d=n.contextType;typeof d=="object"&&d!==null&&(u=Re(d)),u=new n(i,u),e.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=ru,e.stateNode=u,u._reactInternals=e,u=e.stateNode,u.props=i,u.state=e.memoizedState,u.refs={},Lo(e),d=n.contextType,u.context=typeof d=="object"&&d!==null?Re(d):gi,u.state=e.memoizedState,d=n.getDerivedStateFromProps,typeof d=="function"&&(lu(e,n,d,i),u.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(d=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),d!==u.state&&ru.enqueueReplaceState(u,u.state,null),xs(e,i,u,o),ys(),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308),i=!0}else if(t===null){u=e.stateNode;var v=e.memoizedProps,M=Qa(n,v);u.props=M;var z=u.context,H=n.contextType;d=gi,typeof H=="object"&&H!==null&&(d=Re(H));var X=n.getDerivedStateFromProps;H=typeof X=="function"||typeof u.getSnapshotBeforeUpdate=="function",v=e.pendingProps!==v,H||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(v||z!==d)&&Oh(e,u,i,d),ua=!1;var O=e.memoizedState;u.state=O,xs(e,i,u,o),ys(),z=e.memoizedState,v||O!==z||ua?(typeof X=="function"&&(lu(e,n,X,i),z=e.memoizedState),(M=ua||zh(e,n,M,i,O,z,d))?(H||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(e.flags|=4194308)):(typeof u.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=i,e.memoizedState=z),u.props=i,u.state=z,u.context=d,i=M):(typeof u.componentDidMount=="function"&&(e.flags|=4194308),i=!1)}else{u=e.stateNode,Uo(t,e),d=e.memoizedProps,H=Qa(n,d),u.props=H,X=e.pendingProps,O=u.context,z=n.contextType,M=gi,typeof z=="object"&&z!==null&&(M=Re(z)),v=n.getDerivedStateFromProps,(z=typeof v=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(d!==X||O!==M)&&Oh(e,u,i,M),ua=!1,O=e.memoizedState,u.state=O,xs(e,i,u,o),ys();var _=e.memoizedState;d!==X||O!==_||ua||t!==null&&t.dependencies!==null&&Tl(t.dependencies)?(typeof v=="function"&&(lu(e,n,v,i),_=e.memoizedState),(H=ua||zh(e,n,H,i,O,_,M)||t!==null&&t.dependencies!==null&&Tl(t.dependencies))?(z||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(i,_,M),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(i,_,M)),typeof u.componentDidUpdate=="function"&&(e.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof u.componentDidUpdate!="function"||d===t.memoizedProps&&O===t.memoizedState||(e.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||d===t.memoizedProps&&O===t.memoizedState||(e.flags|=1024),e.memoizedProps=i,e.memoizedState=_),u.props=i,u.state=_,u.context=M,i=H):(typeof u.componentDidUpdate!="function"||d===t.memoizedProps&&O===t.memoizedState||(e.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||d===t.memoizedProps&&O===t.memoizedState||(e.flags|=1024),i=!1)}return u=i,ql(t,e),i=(e.flags&128)!==0,u||i?(u=e.stateNode,n=i&&typeof n.getDerivedStateFromError!="function"?null:u.render(),e.flags|=1,t!==null&&i?(e.child=Ka(e,t.child,null,o),e.child=Ka(e,null,n,o)):ze(t,e,n,o),e.memoizedState=u.state,t=e.child):t=Kn(t,e,o),t}function Jh(t,e,n,i){return Ha(),e.flags|=256,ze(t,e,n,i),e.child}var fu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function du(t){return{baseLanes:t,cachePool:Ud()}}function hu(t,e,n){return t=t!==null?t.childLanes&~n:0,e&&(t|=sn),t}function Ph(t,e,n){var i=e.pendingProps,o=!1,u=(e.flags&128)!==0,d;if((d=u)||(d=t!==null&&t.memoizedState===null?!1:(fe.current&2)!==0),d&&(o=!0,e.flags&=-129),d=(e.flags&32)!==0,e.flags&=-33,t===null){if(Lt){if(o?da(e):ha(),(t=ee)?(t=a0(t,pn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:sa!==null?{id:Nn,overflow:Cn}:null,retryLane:536870912,hydrationErrors:null},n=Nd(t),n.return=e,e.child=n,De=e,ee=null)):t=null,t===null)throw ra(e);return Pu(t)?e.lanes=32:e.lanes=536870912,null}var v=i.children;return i=i.fallback,o?(ha(),o=e.mode,v=Gl({mode:"hidden",children:v},o),i=Ba(i,o,n,null),v.return=e,i.return=e,v.sibling=i,e.child=v,i=e.child,i.memoizedState=du(n),i.childLanes=hu(t,d,n),e.memoizedState=fu,Ms(null,i)):(da(e),mu(e,v))}var M=t.memoizedState;if(M!==null&&(v=M.dehydrated,v!==null)){if(u)e.flags&256?(da(e),e.flags&=-257,e=pu(t,e,n)):e.memoizedState!==null?(ha(),e.child=t.child,e.flags|=128,e=null):(ha(),v=i.fallback,o=e.mode,i=Gl({mode:"visible",children:i.children},o),v=Ba(v,o,n,null),v.flags|=2,i.return=e,v.return=e,i.sibling=v,e.child=i,Ka(e,t.child,null,n),i=e.child,i.memoizedState=du(n),i.childLanes=hu(t,d,n),e.memoizedState=fu,e=Ms(null,i));else if(da(e),Pu(v)){if(d=v.nextSibling&&v.nextSibling.dataset,d)var z=d.dgst;d=z,i=Error(l(419)),i.stack="",i.digest=d,fs({value:i,source:null,stack:null}),e=pu(t,e,n)}else if(ye||bi(t,e,n,!1),d=(n&t.childLanes)!==0,ye||d){if(d=$t,d!==null&&(i=_f(d,n),i!==0&&i!==M.retryLane))throw M.retryLane=i,Ua(t,i),Fe(d,t,i),uu;Ju(v)||Wl(),e=pu(t,e,n)}else Ju(v)?(e.flags|=192,e.child=t.child,e=null):(t=M.treeContext,ee=yn(v.nextSibling),De=e,Lt=!0,la=null,pn=!1,t!==null&&Rd(e,t),e=mu(e,i.children),e.flags|=4096);return e}return o?(ha(),v=i.fallback,o=e.mode,M=t.child,z=M.sibling,i=Hn(M,{mode:"hidden",children:i.children}),i.subtreeFlags=M.subtreeFlags&65011712,z!==null?v=Hn(z,v):(v=Ba(v,o,n,null),v.flags|=2),v.return=e,i.return=e,i.sibling=v,e.child=i,Ms(null,i),i=e.child,v=t.child.memoizedState,v===null?v=du(n):(o=v.cachePool,o!==null?(M=pe._currentValue,o=o.parent!==M?{parent:M,pool:M}:o):o=Ud(),v={baseLanes:v.baseLanes|n,cachePool:o}),i.memoizedState=v,i.childLanes=hu(t,d,n),e.memoizedState=fu,Ms(t.child,i)):(da(e),n=t.child,t=n.sibling,n=Hn(n,{mode:"visible",children:i.children}),n.return=e,n.sibling=null,t!==null&&(d=e.deletions,d===null?(e.deletions=[t],e.flags|=16):d.push(t)),e.child=n,e.memoizedState=null,n)}function mu(t,e){return e=Gl({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function Gl(t,e){return t=tn(22,t,null,e),t.lanes=0,t}function pu(t,e,n){return Ka(e,t.child,null,n),t=mu(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Fh(t,e,n){t.lanes|=e;var i=t.alternate;i!==null&&(i.lanes|=e),Do(t.return,e,n)}function gu(t,e,n,i,o,u){var d=t.memoizedState;d===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:o,treeForkCount:u}:(d.isBackwards=e,d.rendering=null,d.renderingStartTime=0,d.last=i,d.tail=n,d.tailMode=o,d.treeForkCount=u)}function Wh(t,e,n){var i=e.pendingProps,o=i.revealOrder,u=i.tail;i=i.children;var d=fe.current,v=(d&2)!==0;if(v?(d=d&1|2,e.flags|=128):d&=1,W(fe,d),ze(t,e,i,n),i=Lt?cs:0,!v&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Fh(t,n,e);else if(t.tag===19)Fh(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(o){case"forwards":for(n=e.child,o=null;n!==null;)t=n.alternate,t!==null&&Dl(t)===null&&(o=n),n=n.sibling;n=o,n===null?(o=e.child,e.child=null):(o=n.sibling,n.sibling=null),gu(e,!1,o,n,u,i);break;case"backwards":case"unstable_legacy-backwards":for(n=null,o=e.child,e.child=null;o!==null;){if(t=o.alternate,t!==null&&Dl(t)===null){e.child=o;break}t=o.sibling,o.sibling=n,n=o,o=t}gu(e,!0,n,null,u,i);break;case"together":gu(e,!1,null,null,void 0,i);break;default:e.memoizedState=null}return e.child}function Kn(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),ga|=e.lanes,(n&e.childLanes)===0)if(t!==null){if(bi(t,e,n,!1),(n&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(l(153));if(e.child!==null){for(t=e.child,n=Hn(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Hn(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function yu(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&Tl(t)))}function a1(t,e,n){switch(e.tag){case 3:Ee(e,e.stateNode.containerInfo),oa(e,pe,t.memoizedState.cache),Ha();break;case 27:case 5:ea(e);break;case 4:Ee(e,e.stateNode.containerInfo);break;case 10:oa(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,Go(e),null;break;case 13:var i=e.memoizedState;if(i!==null)return i.dehydrated!==null?(da(e),e.flags|=128,null):(n&e.child.childLanes)!==0?Ph(t,e,n):(da(e),t=Kn(t,e,n),t!==null?t.sibling:null);da(e);break;case 19:var o=(t.flags&128)!==0;if(i=(n&e.childLanes)!==0,i||(bi(t,e,n,!1),i=(n&e.childLanes)!==0),o){if(i)return Wh(t,e,n);e.flags|=128}if(o=e.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),W(fe,fe.current),i)break;return null;case 22:return e.lanes=0,Yh(t,e,n,e.pendingProps);case 24:oa(e,pe,t.memoizedState.cache)}return Kn(t,e,n)}function $h(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps)ye=!0;else{if(!yu(t,n)&&(e.flags&128)===0)return ye=!1,a1(t,e,n);ye=(t.flags&131072)!==0}else ye=!1,Lt&&(e.flags&1048576)!==0&&Dd(e,cs,e.index);switch(e.lanes=0,e.tag){case 16:t:{var i=e.pendingProps;if(t=Ya(e.elementType),e.type=t,typeof t=="function")To(t)?(i=Qa(t,i),e.tag=1,e=Qh(null,e,t,i,n)):(e.tag=0,e=cu(null,e,t,i,n));else{if(t!=null){var o=t.$$typeof;if(o===J){e.tag=11,e=kh(null,e,t,i,n);break t}else if(o===Z){e.tag=14,e=qh(null,e,t,i,n);break t}}throw e=Wt(t)||t,Error(l(306,e,""))}}return e;case 0:return cu(t,e,e.type,e.pendingProps,n);case 1:return i=e.type,o=Qa(i,e.pendingProps),Qh(t,e,i,o,n);case 3:t:{if(Ee(e,e.stateNode.containerInfo),t===null)throw Error(l(387));i=e.pendingProps;var u=e.memoizedState;o=u.element,Uo(t,e),xs(e,i,null,n);var d=e.memoizedState;if(i=d.cache,oa(e,pe,i),i!==u.cache&&Ro(e,[pe],n,!0),ys(),i=d.element,u.isDehydrated)if(u={element:i,isDehydrated:!1,cache:d.cache},e.updateQueue.baseState=u,e.memoizedState=u,e.flags&256){e=Jh(t,e,i,n);break t}else if(i!==o){o=dn(Error(l(424)),e),fs(o),e=Jh(t,e,i,n);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(ee=yn(t.firstChild),De=e,Lt=!0,la=null,pn=!0,n=Yd(e,null,i,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ha(),i===o){e=Kn(t,e,n);break t}ze(t,e,i,n)}e=e.child}return e;case 26:return ql(t,e),t===null?(n=u0(e.type,null,e.pendingProps,null))?e.memoizedState=n:Lt||(n=e.type,t=e.pendingProps,i=ir(wt.current).createElement(n),i[Ce]=e,i[Xe]=t,Oe(i,n,t),Me(i),e.stateNode=i):e.memoizedState=u0(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return ea(e),t===null&&Lt&&(i=e.stateNode=l0(e.type,e.pendingProps,wt.current),De=e,pn=!0,o=ee,Sa(e.type)?(Fu=o,ee=yn(i.firstChild)):ee=o),ze(t,e,e.pendingProps.children,n),ql(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&Lt&&((o=i=ee)&&(i=O1(i,e.type,e.pendingProps,pn),i!==null?(e.stateNode=i,De=e,ee=yn(i.firstChild),pn=!1,o=!0):o=!1),o||ra(e)),ea(e),o=e.type,u=e.pendingProps,d=t!==null?t.memoizedProps:null,i=u.children,Ku(o,u)?i=null:d!==null&&Ku(o,d)&&(e.flags|=32),e.memoizedState!==null&&(o=Xo(t,e,Jx,null,null,n),Bs._currentValue=o),ql(t,e),ze(t,e,i,n),e.child;case 6:return t===null&&Lt&&((t=n=ee)&&(n=V1(n,e.pendingProps,pn),n!==null?(e.stateNode=n,De=e,ee=null,t=!0):t=!1),t||ra(e)),null;case 13:return Ph(t,e,n);case 4:return Ee(e,e.stateNode.containerInfo),i=e.pendingProps,t===null?e.child=Ka(e,null,i,n):ze(t,e,i,n),e.child;case 11:return kh(t,e,e.type,e.pendingProps,n);case 7:return ze(t,e,e.pendingProps,n),e.child;case 8:return ze(t,e,e.pendingProps.children,n),e.child;case 12:return ze(t,e,e.pendingProps.children,n),e.child;case 10:return i=e.pendingProps,oa(e,e.type,i.value),ze(t,e,i.children,n),e.child;case 9:return o=e.type._context,i=e.pendingProps.children,qa(e),o=Re(o),i=i(o),e.flags|=1,ze(t,e,i,n),e.child;case 14:return qh(t,e,e.type,e.pendingProps,n);case 15:return Gh(t,e,e.type,e.pendingProps,n);case 19:return Wh(t,e,n);case 31:return n1(t,e,n);case 22:return Yh(t,e,n,e.pendingProps);case 24:return qa(e),i=Re(pe),t===null?(o=Vo(),o===null&&(o=$t,u=zo(),o.pooledCache=u,u.refCount++,u!==null&&(o.pooledCacheLanes|=n),o=u),e.memoizedState={parent:i,cache:o},Lo(e),oa(e,pe,o)):((t.lanes&n)!==0&&(Uo(t,e),xs(e,null,null,n),ys()),o=t.memoizedState,u=e.memoizedState,o.parent!==i?(o={parent:i,cache:i},e.memoizedState=o,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=o),oa(e,pe,i)):(i=u.cache,oa(e,pe,i),i!==o.cache&&Ro(e,[pe],n,!0))),ze(t,e,e.pendingProps.children,n),e.child;case 29:throw e.pendingProps}throw Error(l(156,e.tag))}function Zn(t){t.flags|=4}function xu(t,e,n,i,o){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(o&335544128)===o)if(t.stateNode.complete)t.flags|=8192;else if(Em())t.flags|=8192;else throw Xa=wl,_o}else t.flags&=-16777217}function Ih(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!m0(e))if(Em())t.flags|=8192;else throw Xa=wl,_o}function Yl(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?me():536870912,t.lanes|=e,zi|=e)}function As(t,e){if(!Lt)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:i.sibling=null}}function ne(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,i=0;if(e)for(var o=t.child;o!==null;)n|=o.lanes|o.childLanes,i|=o.subtreeFlags&65011712,i|=o.flags&65011712,o.return=t,o=o.sibling;else for(o=t.child;o!==null;)n|=o.lanes|o.childLanes,i|=o.subtreeFlags,i|=o.flags,o.return=t,o=o.sibling;return t.subtreeFlags|=i,t.childLanes=n,e}function i1(t,e,n){var i=e.pendingProps;switch(wo(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ne(e),null;case 1:return ne(e),null;case 3:return n=e.stateNode,i=null,t!==null&&(i=t.memoizedState.cache),e.memoizedState.cache!==i&&(e.flags|=2048),Gn(pe),Ut(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(vi(e)?Zn(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,No())),ne(e),null;case 26:var o=e.type,u=e.memoizedState;return t===null?(Zn(e),u!==null?(ne(e),Ih(e,u)):(ne(e),xu(e,o,null,i,n))):u?u!==t.memoizedState?(Zn(e),ne(e),Ih(e,u)):(ne(e),e.flags&=-16777217):(t=t.memoizedProps,t!==i&&Zn(e),ne(e),xu(e,o,t,i,n)),null;case 27:if(ni(e),n=wt.current,o=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==i&&Zn(e);else{if(!i){if(e.stateNode===null)throw Error(l(166));return ne(e),null}t=st.current,vi(e)?zd(e):(t=l0(o,i,n),e.stateNode=t,Zn(e))}return ne(e),null;case 5:if(ni(e),o=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==i&&Zn(e);else{if(!i){if(e.stateNode===null)throw Error(l(166));return ne(e),null}if(u=st.current,vi(e))zd(e);else{var d=ir(wt.current);switch(u){case 1:u=d.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:u=d.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":u=d.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":u=d.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":u=d.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof i.is=="string"?d.createElement("select",{is:i.is}):d.createElement("select"),i.multiple?u.multiple=!0:i.size&&(u.size=i.size);break;default:u=typeof i.is=="string"?d.createElement(o,{is:i.is}):d.createElement(o)}}u[Ce]=e,u[Xe]=i;t:for(d=e.child;d!==null;){if(d.tag===5||d.tag===6)u.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break t;for(;d.sibling===null;){if(d.return===null||d.return===e)break t;d=d.return}d.sibling.return=d.return,d=d.sibling}e.stateNode=u;t:switch(Oe(u,o,i),o){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break t;case"img":i=!0;break t;default:i=!1}i&&Zn(e)}}return ne(e),xu(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,n),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==i&&Zn(e);else{if(typeof i!="string"&&e.stateNode===null)throw Error(l(166));if(t=wt.current,vi(e)){if(t=e.stateNode,n=e.memoizedProps,i=null,o=De,o!==null)switch(o.tag){case 27:case 5:i=o.memoizedProps}t[Ce]=e,t=!!(t.nodeValue===n||i!==null&&i.suppressHydrationWarning===!0||Pm(t.nodeValue,n)),t||ra(e,!0)}else t=ir(t).createTextNode(i),t[Ce]=e,e.stateNode=t}return ne(e),null;case 31:if(n=e.memoizedState,t===null||t.memoizedState!==null){if(i=vi(e),n!==null){if(t===null){if(!i)throw Error(l(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(557));t[Ce]=e}else Ha(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;ne(e),t=!1}else n=No(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),t=!0;if(!t)return e.flags&256?(nn(e),e):(nn(e),null);if((e.flags&128)!==0)throw Error(l(558))}return ne(e),null;case 13:if(i=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(o=vi(e),i!==null&&i.dehydrated!==null){if(t===null){if(!o)throw Error(l(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(l(317));o[Ce]=e}else Ha(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;ne(e),o=!1}else o=No(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=o),o=!0;if(!o)return e.flags&256?(nn(e),e):(nn(e),null)}return nn(e),(e.flags&128)!==0?(e.lanes=n,e):(n=i!==null,t=t!==null&&t.memoizedState!==null,n&&(i=e.child,o=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(o=i.alternate.memoizedState.cachePool.pool),u=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),u!==o&&(i.flags|=2048)),n!==t&&n&&(e.child.flags|=8192),Yl(e,e.updateQueue),ne(e),null);case 4:return Ut(),t===null&&ku(e.stateNode.containerInfo),ne(e),null;case 10:return Gn(e.type),ne(e),null;case 19:if(Y(fe),i=e.memoizedState,i===null)return ne(e),null;if(o=(e.flags&128)!==0,u=i.rendering,u===null)if(o)As(i,!1);else{if(re!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(u=Dl(t),u!==null){for(e.flags|=128,As(i,!1),t=u.updateQueue,e.updateQueue=t,Yl(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)jd(n,t),n=n.sibling;return W(fe,fe.current&1|2),Lt&&kn(e,i.treeForkCount),e.child}t=t.sibling}i.tail!==null&&kt()>Jl&&(e.flags|=128,o=!0,As(i,!1),e.lanes=4194304)}else{if(!o)if(t=Dl(u),t!==null){if(e.flags|=128,o=!0,t=t.updateQueue,e.updateQueue=t,Yl(e,t),As(i,!0),i.tail===null&&i.tailMode==="hidden"&&!u.alternate&&!Lt)return ne(e),null}else 2*kt()-i.renderingStartTime>Jl&&n!==536870912&&(e.flags|=128,o=!0,As(i,!1),e.lanes=4194304);i.isBackwards?(u.sibling=e.child,e.child=u):(t=i.last,t!==null?t.sibling=u:e.child=u,i.last=u)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=kt(),t.sibling=null,n=fe.current,W(fe,o?n&1|2:n&1),Lt&&kn(e,i.treeForkCount),t):(ne(e),null);case 22:case 23:return nn(e),qo(),i=e.memoizedState!==null,t!==null?t.memoizedState!==null!==i&&(e.flags|=8192):i&&(e.flags|=8192),i?(n&536870912)!==0&&(e.flags&128)===0&&(ne(e),e.subtreeFlags&6&&(e.flags|=8192)):ne(e),n=e.updateQueue,n!==null&&Yl(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),i=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),i!==n&&(e.flags|=2048),t!==null&&Y(Ga),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),Gn(pe),ne(e),null;case 25:return null;case 30:return null}throw Error(l(156,e.tag))}function s1(t,e){switch(wo(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Gn(pe),Ut(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return ni(e),null;case 31:if(e.memoizedState!==null){if(nn(e),e.alternate===null)throw Error(l(340));Ha()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(nn(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(l(340));Ha()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Y(fe),null;case 4:return Ut(),null;case 10:return Gn(e.type),null;case 22:case 23:return nn(e),qo(),t!==null&&Y(Ga),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Gn(pe),null;case 25:return null;default:return null}}function tm(t,e){switch(wo(e),e.tag){case 3:Gn(pe),Ut();break;case 26:case 27:case 5:ni(e);break;case 4:Ut();break;case 31:e.memoizedState!==null&&nn(e);break;case 13:nn(e);break;case 19:Y(fe);break;case 10:Gn(e.type);break;case 22:case 23:nn(e),qo(),t!==null&&Y(Ga);break;case 24:Gn(pe)}}function Es(t,e){try{var n=e.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var o=i.next;n=o;do{if((n.tag&t)===t){i=void 0;var u=n.create,d=n.inst;i=u(),d.destroy=i}n=n.next}while(n!==o)}}catch(v){Zt(e,e.return,v)}}function ma(t,e,n){try{var i=e.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var u=o.next;i=u;do{if((i.tag&t)===t){var d=i.inst,v=d.destroy;if(v!==void 0){d.destroy=void 0,o=e;var M=n,z=v;try{z()}catch(H){Zt(o,M,H)}}}i=i.next}while(i!==u)}}catch(H){Zt(e,e.return,H)}}function em(t){var e=t.updateQueue;if(e!==null){var n=t.stateNode;try{Kd(e,n)}catch(i){Zt(t,t.return,i)}}}function nm(t,e,n){n.props=Qa(t.type,t.memoizedProps),n.state=t.memoizedState;try{n.componentWillUnmount()}catch(i){Zt(t,e,i)}}function ws(t,e){try{var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var i=t.stateNode;break;case 30:i=t.stateNode;break;default:i=t.stateNode}typeof n=="function"?t.refCleanup=n(i):n.current=i}}catch(o){Zt(t,e,o)}}function Dn(t,e){var n=t.ref,i=t.refCleanup;if(n!==null)if(typeof i=="function")try{i()}catch(o){Zt(t,e,o)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(o){Zt(t,e,o)}else n.current=null}function am(t){var e=t.type,n=t.memoizedProps,i=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":n.autoFocus&&i.focus();break t;case"img":n.src?i.src=n.src:n.srcSet&&(i.srcset=n.srcSet)}}catch(o){Zt(t,t.return,o)}}function vu(t,e,n){try{var i=t.stateNode;j1(i,t.type,n,e),i[Xe]=e}catch(o){Zt(t,t.return,o)}}function im(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Sa(t.type)||t.tag===4}function bu(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||im(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Sa(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Su(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(t,e):(e=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,e.appendChild(t),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Un));else if(i!==4&&(i===27&&Sa(t.type)&&(n=t.stateNode,e=null),t=t.child,t!==null))for(Su(t,e,n),t=t.sibling;t!==null;)Su(t,e,n),t=t.sibling}function Xl(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(i!==4&&(i===27&&Sa(t.type)&&(n=t.stateNode),t=t.child,t!==null))for(Xl(t,e,n),t=t.sibling;t!==null;)Xl(t,e,n),t=t.sibling}function sm(t){var e=t.stateNode,n=t.memoizedProps;try{for(var i=t.type,o=e.attributes;o.length;)e.removeAttributeNode(o[0]);Oe(e,i,n),e[Ce]=t,e[Xe]=n}catch(u){Zt(t,t.return,u)}}var Qn=!1,xe=!1,Tu=!1,lm=typeof WeakSet=="function"?WeakSet:Set,Ae=null;function l1(t,e){if(t=t.containerInfo,Yu=fr,t=xd(t),po(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var o=i.anchorOffset,u=i.focusNode;i=i.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break t}var d=0,v=-1,M=-1,z=0,H=0,X=t,O=null;e:for(;;){for(var _;X!==n||o!==0&&X.nodeType!==3||(v=d+o),X!==u||i!==0&&X.nodeType!==3||(M=d+i),X.nodeType===3&&(d+=X.nodeValue.length),(_=X.firstChild)!==null;)O=X,X=_;for(;;){if(X===t)break e;if(O===n&&++z===o&&(v=d),O===u&&++H===i&&(M=d),(_=X.nextSibling)!==null)break;X=O,O=X.parentNode}X=_}n=v===-1||M===-1?null:{start:v,end:M}}else n=null}n=n||{start:0,end:0}}else n=null;for(Xu={focusedElem:t,selectionRange:n},fr=!1,Ae=e;Ae!==null;)if(e=Ae,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Ae=t;else for(;Ae!==null;){switch(e=Ae,u=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(n=0;n<t.length;n++)o=t[n],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&u!==null){t=void 0,n=e,o=u.memoizedProps,u=u.memoizedState,i=n.stateNode;try{var nt=Qa(n.type,o);t=i.getSnapshotBeforeUpdate(nt,u),i.__reactInternalSnapshotBeforeUpdate=t}catch(ht){Zt(n,n.return,ht)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,n=t.nodeType,n===9)Qu(t);else if(n===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Qu(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(l(163))}if(t=e.sibling,t!==null){t.return=e.return,Ae=t;break}Ae=e.return}}function rm(t,e,n){var i=n.flags;switch(n.tag){case 0:case 11:case 15:Pn(t,n),i&4&&Es(5,n);break;case 1:if(Pn(t,n),i&4)if(t=n.stateNode,e===null)try{t.componentDidMount()}catch(d){Zt(n,n.return,d)}else{var o=Qa(n.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(o,e,t.__reactInternalSnapshotBeforeUpdate)}catch(d){Zt(n,n.return,d)}}i&64&&em(n),i&512&&ws(n,n.return);break;case 3:if(Pn(t,n),i&64&&(t=n.updateQueue,t!==null)){if(e=null,n.child!==null)switch(n.child.tag){case 27:case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}try{Kd(t,e)}catch(d){Zt(n,n.return,d)}}break;case 27:e===null&&i&4&&sm(n);case 26:case 5:Pn(t,n),e===null&&i&4&&am(n),i&512&&ws(n,n.return);break;case 12:Pn(t,n);break;case 31:Pn(t,n),i&4&&cm(t,n);break;case 13:Pn(t,n),i&4&&fm(t,n),i&64&&(t=n.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(n=p1.bind(null,n),_1(t,n))));break;case 22:if(i=n.memoizedState!==null||Qn,!i){e=e!==null&&e.memoizedState!==null||xe,o=Qn;var u=xe;Qn=i,(xe=e)&&!u?Fn(t,n,(n.subtreeFlags&8772)!==0):Pn(t,n),Qn=o,xe=u}break;case 30:break;default:Pn(t,n)}}function om(t){var e=t.alternate;e!==null&&(t.alternate=null,om(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&Wr(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var ae=null,Ze=!1;function Jn(t,e,n){for(n=n.child;n!==null;)um(t,e,n),n=n.sibling}function um(t,e,n){if(I&&typeof I.onCommitFiberUnmount=="function")try{I.onCommitFiberUnmount(Rt,n)}catch{}switch(n.tag){case 26:xe||Dn(n,e),Jn(t,e,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:xe||Dn(n,e);var i=ae,o=Ze;Sa(n.type)&&(ae=n.stateNode,Ze=!1),Jn(t,e,n),_s(n.stateNode),ae=i,Ze=o;break;case 5:xe||Dn(n,e);case 6:if(i=ae,o=Ze,ae=null,Jn(t,e,n),ae=i,Ze=o,ae!==null)if(Ze)try{(ae.nodeType===9?ae.body:ae.nodeName==="HTML"?ae.ownerDocument.body:ae).removeChild(n.stateNode)}catch(u){Zt(n,e,u)}else try{ae.removeChild(n.stateNode)}catch(u){Zt(n,e,u)}break;case 18:ae!==null&&(Ze?(t=ae,e0(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,n.stateNode),ki(t)):e0(ae,n.stateNode));break;case 4:i=ae,o=Ze,ae=n.stateNode.containerInfo,Ze=!0,Jn(t,e,n),ae=i,Ze=o;break;case 0:case 11:case 14:case 15:ma(2,n,e),xe||ma(4,n,e),Jn(t,e,n);break;case 1:xe||(Dn(n,e),i=n.stateNode,typeof i.componentWillUnmount=="function"&&nm(n,e,i)),Jn(t,e,n);break;case 21:Jn(t,e,n);break;case 22:xe=(i=xe)||n.memoizedState!==null,Jn(t,e,n),xe=i;break;default:Jn(t,e,n)}}function cm(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{ki(t)}catch(n){Zt(e,e.return,n)}}}function fm(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{ki(t)}catch(n){Zt(e,e.return,n)}}function r1(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new lm),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new lm),e;default:throw Error(l(435,t.tag))}}function Kl(t,e){var n=r1(t);e.forEach(function(i){if(!n.has(i)){n.add(i);var o=g1.bind(null,t,i);i.then(o,o)}})}function Qe(t,e){var n=e.deletions;if(n!==null)for(var i=0;i<n.length;i++){var o=n[i],u=t,d=e,v=d;t:for(;v!==null;){switch(v.tag){case 27:if(Sa(v.type)){ae=v.stateNode,Ze=!1;break t}break;case 5:ae=v.stateNode,Ze=!1;break t;case 3:case 4:ae=v.stateNode.containerInfo,Ze=!0;break t}v=v.return}if(ae===null)throw Error(l(160));um(u,d,o),ae=null,Ze=!1,u=o.alternate,u!==null&&(u.return=null),o.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)dm(e,t),e=e.sibling}var Mn=null;function dm(t,e){var n=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Qe(e,t),Je(t),i&4&&(ma(3,t,t.return),Es(3,t),ma(5,t,t.return));break;case 1:Qe(e,t),Je(t),i&512&&(xe||n===null||Dn(n,n.return)),i&64&&Qn&&(t=t.updateQueue,t!==null&&(i=t.callbacks,i!==null&&(n=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=n===null?i:n.concat(i))));break;case 26:var o=Mn;if(Qe(e,t),Je(t),i&512&&(xe||n===null||Dn(n,n.return)),i&4){var u=n!==null?n.memoizedState:null;if(i=t.memoizedState,n===null)if(i===null)if(t.stateNode===null){t:{i=t.type,n=t.memoizedProps,o=o.ownerDocument||o;e:switch(i){case"title":u=o.getElementsByTagName("title")[0],(!u||u[Ii]||u[Ce]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=o.createElement(i),o.head.insertBefore(u,o.querySelector("head > title"))),Oe(u,i,n),u[Ce]=t,Me(u),i=u;break t;case"link":var d=d0("link","href",o).get(i+(n.href||""));if(d){for(var v=0;v<d.length;v++)if(u=d[v],u.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&u.getAttribute("rel")===(n.rel==null?null:n.rel)&&u.getAttribute("title")===(n.title==null?null:n.title)&&u.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){d.splice(v,1);break e}}u=o.createElement(i),Oe(u,i,n),o.head.appendChild(u);break;case"meta":if(d=d0("meta","content",o).get(i+(n.content||""))){for(v=0;v<d.length;v++)if(u=d[v],u.getAttribute("content")===(n.content==null?null:""+n.content)&&u.getAttribute("name")===(n.name==null?null:n.name)&&u.getAttribute("property")===(n.property==null?null:n.property)&&u.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&u.getAttribute("charset")===(n.charSet==null?null:n.charSet)){d.splice(v,1);break e}}u=o.createElement(i),Oe(u,i,n),o.head.appendChild(u);break;default:throw Error(l(468,i))}u[Ce]=t,Me(u),i=u}t.stateNode=i}else h0(o,t.type,t.stateNode);else t.stateNode=f0(o,i,t.memoizedProps);else u!==i?(u===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):u.count--,i===null?h0(o,t.type,t.stateNode):f0(o,i,t.memoizedProps)):i===null&&t.stateNode!==null&&vu(t,t.memoizedProps,n.memoizedProps)}break;case 27:Qe(e,t),Je(t),i&512&&(xe||n===null||Dn(n,n.return)),n!==null&&i&4&&vu(t,t.memoizedProps,n.memoizedProps);break;case 5:if(Qe(e,t),Je(t),i&512&&(xe||n===null||Dn(n,n.return)),t.flags&32){o=t.stateNode;try{ui(o,"")}catch(nt){Zt(t,t.return,nt)}}i&4&&t.stateNode!=null&&(o=t.memoizedProps,vu(t,o,n!==null?n.memoizedProps:o)),i&1024&&(Tu=!0);break;case 6:if(Qe(e,t),Je(t),i&4){if(t.stateNode===null)throw Error(l(162));i=t.memoizedProps,n=t.stateNode;try{n.nodeValue=i}catch(nt){Zt(t,t.return,nt)}}break;case 3:if(rr=null,o=Mn,Mn=sr(e.containerInfo),Qe(e,t),Mn=o,Je(t),i&4&&n!==null&&n.memoizedState.isDehydrated)try{ki(e.containerInfo)}catch(nt){Zt(t,t.return,nt)}Tu&&(Tu=!1,hm(t));break;case 4:i=Mn,Mn=sr(t.stateNode.containerInfo),Qe(e,t),Je(t),Mn=i;break;case 12:Qe(e,t),Je(t);break;case 31:Qe(e,t),Je(t),i&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,Kl(t,i)));break;case 13:Qe(e,t),Je(t),t.child.flags&8192&&t.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ql=kt()),i&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,Kl(t,i)));break;case 22:o=t.memoizedState!==null;var M=n!==null&&n.memoizedState!==null,z=Qn,H=xe;if(Qn=z||o,xe=H||M,Qe(e,t),xe=H,Qn=z,Je(t),i&8192)t:for(e=t.stateNode,e._visibility=o?e._visibility&-2:e._visibility|1,o&&(n===null||M||Qn||xe||Ja(t)),n=null,e=t;;){if(e.tag===5||e.tag===26){if(n===null){M=n=e;try{if(u=M.stateNode,o)d=u.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{v=M.stateNode;var X=M.memoizedProps.style,O=X!=null&&X.hasOwnProperty("display")?X.display:null;v.style.display=O==null||typeof O=="boolean"?"":(""+O).trim()}}catch(nt){Zt(M,M.return,nt)}}}else if(e.tag===6){if(n===null){M=e;try{M.stateNode.nodeValue=o?"":M.memoizedProps}catch(nt){Zt(M,M.return,nt)}}}else if(e.tag===18){if(n===null){M=e;try{var _=M.stateNode;o?n0(_,!0):n0(M.stateNode,!1)}catch(nt){Zt(M,M.return,nt)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;n===e&&(n=null),e=e.return}n===e&&(n=null),e.sibling.return=e.return,e=e.sibling}i&4&&(i=t.updateQueue,i!==null&&(n=i.retryQueue,n!==null&&(i.retryQueue=null,Kl(t,n))));break;case 19:Qe(e,t),Je(t),i&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,Kl(t,i)));break;case 30:break;case 21:break;default:Qe(e,t),Je(t)}}function Je(t){var e=t.flags;if(e&2){try{for(var n,i=t.return;i!==null;){if(im(i)){n=i;break}i=i.return}if(n==null)throw Error(l(160));switch(n.tag){case 27:var o=n.stateNode,u=bu(t);Xl(t,u,o);break;case 5:var d=n.stateNode;n.flags&32&&(ui(d,""),n.flags&=-33);var v=bu(t);Xl(t,v,d);break;case 3:case 4:var M=n.stateNode.containerInfo,z=bu(t);Su(t,z,M);break;default:throw Error(l(161))}}catch(H){Zt(t,t.return,H)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function hm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;hm(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function Pn(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)rm(t,e.alternate,e),e=e.sibling}function Ja(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:ma(4,e,e.return),Ja(e);break;case 1:Dn(e,e.return);var n=e.stateNode;typeof n.componentWillUnmount=="function"&&nm(e,e.return,n),Ja(e);break;case 27:_s(e.stateNode);case 26:case 5:Dn(e,e.return),Ja(e);break;case 22:e.memoizedState===null&&Ja(e);break;case 30:Ja(e);break;default:Ja(e)}t=t.sibling}}function Fn(t,e,n){for(n=n&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var i=e.alternate,o=t,u=e,d=u.flags;switch(u.tag){case 0:case 11:case 15:Fn(o,u,n),Es(4,u);break;case 1:if(Fn(o,u,n),i=u,o=i.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(z){Zt(i,i.return,z)}if(i=u,o=i.updateQueue,o!==null){var v=i.stateNode;try{var M=o.shared.hiddenCallbacks;if(M!==null)for(o.shared.hiddenCallbacks=null,o=0;o<M.length;o++)Xd(M[o],v)}catch(z){Zt(i,i.return,z)}}n&&d&64&&em(u),ws(u,u.return);break;case 27:sm(u);case 26:case 5:Fn(o,u,n),n&&i===null&&d&4&&am(u),ws(u,u.return);break;case 12:Fn(o,u,n);break;case 31:Fn(o,u,n),n&&d&4&&cm(o,u);break;case 13:Fn(o,u,n),n&&d&4&&fm(o,u);break;case 22:u.memoizedState===null&&Fn(o,u,n),ws(u,u.return);break;case 30:break;default:Fn(o,u,n)}e=e.sibling}}function Mu(t,e){var n=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==n&&(t!=null&&t.refCount++,n!=null&&ds(n))}function Au(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&ds(t))}function An(t,e,n,i){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)mm(t,e,n,i),e=e.sibling}function mm(t,e,n,i){var o=e.flags;switch(e.tag){case 0:case 11:case 15:An(t,e,n,i),o&2048&&Es(9,e);break;case 1:An(t,e,n,i);break;case 3:An(t,e,n,i),o&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&ds(t)));break;case 12:if(o&2048){An(t,e,n,i),t=e.stateNode;try{var u=e.memoizedProps,d=u.id,v=u.onPostCommit;typeof v=="function"&&v(d,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(M){Zt(e,e.return,M)}}else An(t,e,n,i);break;case 31:An(t,e,n,i);break;case 13:An(t,e,n,i);break;case 23:break;case 22:u=e.stateNode,d=e.alternate,e.memoizedState!==null?u._visibility&2?An(t,e,n,i):js(t,e):u._visibility&2?An(t,e,n,i):(u._visibility|=2,Ci(t,e,n,i,(e.subtreeFlags&10256)!==0||!1)),o&2048&&Mu(d,e);break;case 24:An(t,e,n,i),o&2048&&Au(e.alternate,e);break;default:An(t,e,n,i)}}function Ci(t,e,n,i,o){for(o=o&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var u=t,d=e,v=n,M=i,z=d.flags;switch(d.tag){case 0:case 11:case 15:Ci(u,d,v,M,o),Es(8,d);break;case 23:break;case 22:var H=d.stateNode;d.memoizedState!==null?H._visibility&2?Ci(u,d,v,M,o):js(u,d):(H._visibility|=2,Ci(u,d,v,M,o)),o&&z&2048&&Mu(d.alternate,d);break;case 24:Ci(u,d,v,M,o),o&&z&2048&&Au(d.alternate,d);break;default:Ci(u,d,v,M,o)}e=e.sibling}}function js(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var n=t,i=e,o=i.flags;switch(i.tag){case 22:js(n,i),o&2048&&Mu(i.alternate,i);break;case 24:js(n,i),o&2048&&Au(i.alternate,i);break;default:js(n,i)}e=e.sibling}}var Ns=8192;function Di(t,e,n){if(t.subtreeFlags&Ns)for(t=t.child;t!==null;)pm(t,e,n),t=t.sibling}function pm(t,e,n){switch(t.tag){case 26:Di(t,e,n),t.flags&Ns&&t.memoizedState!==null&&Q1(n,Mn,t.memoizedState,t.memoizedProps);break;case 5:Di(t,e,n);break;case 3:case 4:var i=Mn;Mn=sr(t.stateNode.containerInfo),Di(t,e,n),Mn=i;break;case 22:t.memoizedState===null&&(i=t.alternate,i!==null&&i.memoizedState!==null?(i=Ns,Ns=16777216,Di(t,e,n),Ns=i):Di(t,e,n));break;default:Di(t,e,n)}}function gm(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function Cs(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var i=e[n];Ae=i,xm(i,t)}gm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ym(t),t=t.sibling}function ym(t){switch(t.tag){case 0:case 11:case 15:Cs(t),t.flags&2048&&ma(9,t,t.return);break;case 3:Cs(t);break;case 12:Cs(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,Zl(t)):Cs(t);break;default:Cs(t)}}function Zl(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var i=e[n];Ae=i,xm(i,t)}gm(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:ma(8,e,e.return),Zl(e);break;case 22:n=e.stateNode,n._visibility&2&&(n._visibility&=-3,Zl(e));break;default:Zl(e)}t=t.sibling}}function xm(t,e){for(;Ae!==null;){var n=Ae;switch(n.tag){case 0:case 11:case 15:ma(8,n,e);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var i=n.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:ds(n.memoizedState.cache)}if(i=n.child,i!==null)i.return=n,Ae=i;else t:for(n=t;Ae!==null;){i=Ae;var o=i.sibling,u=i.return;if(om(i),i===n){Ae=null;break t}if(o!==null){o.return=u,Ae=o;break t}Ae=u}}}var o1={getCacheForType:function(t){var e=Re(pe),n=e.data.get(t);return n===void 0&&(n=t(),e.data.set(t,n)),n},cacheSignal:function(){return Re(pe).controller.signal}},u1=typeof WeakMap=="function"?WeakMap:Map,qt=0,$t=null,Nt=null,Ot=0,Kt=0,an=null,pa=!1,Ri=!1,Eu=!1,Wn=0,re=0,ga=0,Pa=0,wu=0,sn=0,zi=0,Ds=null,Pe=null,ju=!1,Ql=0,vm=0,Jl=1/0,Pl=null,ya=null,be=0,xa=null,Oi=null,$n=0,Nu=0,Cu=null,bm=null,Rs=0,Du=null;function ln(){return(qt&2)!==0&&Ot!==0?Ot&-Ot:L.T!==null?Lu():Lf()}function Sm(){if(sn===0)if((Ot&536870912)===0||Lt){var t=$e;$e<<=1,($e&3932160)===0&&($e=262144),sn=t}else sn=536870912;return t=en.current,t!==null&&(t.flags|=32),sn}function Fe(t,e,n){(t===$t&&(Kt===2||Kt===9)||t.cancelPendingCommit!==null)&&(Vi(t,0),va(t,Ot,sn,!1)),Ne(t,n),((qt&2)===0||t!==$t)&&(t===$t&&((qt&2)===0&&(Pa|=n),re===4&&va(t,Ot,sn,!1)),Rn(t))}function Tm(t,e,n){if((qt&6)!==0)throw Error(l(327));var i=!n&&(e&127)===0&&(e&t.expiredLanes)===0||se(t,e),o=i?d1(t,e):zu(t,e,!0),u=i;do{if(o===0){Ri&&!i&&va(t,e,0,!1);break}else{if(n=t.current.alternate,u&&!c1(n)){o=zu(t,e,!1),u=!1;continue}if(o===2){if(u=e,t.errorRecoveryDisabledLanes&u)var d=0;else d=t.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){e=d;t:{var v=t;o=Ds;var M=v.current.memoizedState.isDehydrated;if(M&&(Vi(v,d).flags|=256),d=zu(v,d,!1),d!==2){if(Eu&&!M){v.errorRecoveryDisabledLanes|=u,Pa|=u,o=4;break t}u=Pe,Pe=o,u!==null&&(Pe===null?Pe=u:Pe.push.apply(Pe,u))}o=d}if(u=!1,o!==2)continue}}if(o===1){Vi(t,0),va(t,e,0,!0);break}t:{switch(i=t,u=o,u){case 0:case 1:throw Error(l(345));case 4:if((e&4194048)!==e)break;case 6:va(i,e,sn,!pa);break t;case 2:Pe=null;break;case 3:case 5:break;default:throw Error(l(329))}if((e&62914560)===e&&(o=Ql+300-kt(),10<o)){if(va(i,e,sn,!pa),zt(i,0,!0)!==0)break t;$n=e,i.timeoutHandle=Im(Mm.bind(null,i,n,Pe,Pl,ju,e,sn,Pa,zi,pa,u,"Throttled",-0,0),o);break t}Mm(i,n,Pe,Pl,ju,e,sn,Pa,zi,pa,u,null,-0,0)}}break}while(!0);Rn(t)}function Mm(t,e,n,i,o,u,d,v,M,z,H,X,O,_){if(t.timeoutHandle=-1,X=e.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Un},pm(e,u,X);var nt=(u&62914560)===u?Ql-kt():(u&4194048)===u?vm-kt():0;if(nt=J1(X,nt),nt!==null){$n=u,t.cancelPendingCommit=nt(Rm.bind(null,t,e,u,n,i,o,d,v,M,H,X,null,O,_)),va(t,u,d,!z);return}}Rm(t,e,u,n,i,o,d,v,M)}function c1(t){for(var e=t;;){var n=e.tag;if((n===0||n===11||n===15)&&e.flags&16384&&(n=e.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var i=0;i<n.length;i++){var o=n[i],u=o.getSnapshot;o=o.value;try{if(!Ie(u(),o))return!1}catch{return!1}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function va(t,e,n,i){e&=~wu,e&=~Pa,t.suspendedLanes|=e,t.pingedLanes&=~e,i&&(t.warmLanes|=e),i=t.expirationTimes;for(var o=e;0<o;){var u=31-pt(o),d=1<<u;i[u]=-1,o&=~d}n!==0&&sl(t,n,e)}function Fl(){return(qt&6)===0?(zs(0),!1):!0}function Ru(){if(Nt!==null){if(Kt===0)var t=Nt.return;else t=Nt,qn=ka=null,Qo(t),Ai=null,ms=0,t=Nt;for(;t!==null;)tm(t.alternate,t),t=t.return;Nt=null}}function Vi(t,e){var n=t.timeoutHandle;n!==-1&&(t.timeoutHandle=-1,D1(n)),n=t.cancelPendingCommit,n!==null&&(t.cancelPendingCommit=null,n()),$n=0,Ru(),$t=t,Nt=n=Hn(t.current,null),Ot=e,Kt=0,an=null,pa=!1,Ri=se(t,e),Eu=!1,zi=sn=wu=Pa=ga=re=0,Pe=Ds=null,ju=!1,(e&8)!==0&&(e|=e&32);var i=t.entangledLanes;if(i!==0)for(t=t.entanglements,i&=e;0<i;){var o=31-pt(i),u=1<<o;e|=t[o],i&=~u}return Wn=e,yl(),n}function Am(t,e){Mt=null,L.H=Ts,e===Mi||e===El?(e=kd(),Kt=3):e===_o?(e=kd(),Kt=4):Kt=e===uu?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,an=e,Nt===null&&(re=1,Hl(t,dn(e,t.current)))}function Em(){var t=en.current;return t===null?!0:(Ot&4194048)===Ot?gn===null:(Ot&62914560)===Ot||(Ot&536870912)!==0?t===gn:!1}function wm(){var t=L.H;return L.H=Ts,t===null?Ts:t}function jm(){var t=L.A;return L.A=o1,t}function Wl(){re=4,pa||(Ot&4194048)!==Ot&&en.current!==null||(Ri=!0),(ga&134217727)===0&&(Pa&134217727)===0||$t===null||va($t,Ot,sn,!1)}function zu(t,e,n){var i=qt;qt|=2;var o=wm(),u=jm();($t!==t||Ot!==e)&&(Pl=null,Vi(t,e)),e=!1;var d=re;t:do try{if(Kt!==0&&Nt!==null){var v=Nt,M=an;switch(Kt){case 8:Ru(),d=6;break t;case 3:case 2:case 9:case 6:en.current===null&&(e=!0);var z=Kt;if(Kt=0,an=null,_i(t,v,M,z),n&&Ri){d=0;break t}break;default:z=Kt,Kt=0,an=null,_i(t,v,M,z)}}f1(),d=re;break}catch(H){Am(t,H)}while(!0);return e&&t.shellSuspendCounter++,qn=ka=null,qt=i,L.H=o,L.A=u,Nt===null&&($t=null,Ot=0,yl()),d}function f1(){for(;Nt!==null;)Nm(Nt)}function d1(t,e){var n=qt;qt|=2;var i=wm(),o=jm();$t!==t||Ot!==e?(Pl=null,Jl=kt()+500,Vi(t,e)):Ri=se(t,e);t:do try{if(Kt!==0&&Nt!==null){e=Nt;var u=an;e:switch(Kt){case 1:Kt=0,an=null,_i(t,e,u,1);break;case 2:case 9:if(Bd(u)){Kt=0,an=null,Cm(e);break}e=function(){Kt!==2&&Kt!==9||$t!==t||(Kt=7),Rn(t)},u.then(e,e);break t;case 3:Kt=7;break t;case 4:Kt=5;break t;case 7:Bd(u)?(Kt=0,an=null,Cm(e)):(Kt=0,an=null,_i(t,e,u,7));break;case 5:var d=null;switch(Nt.tag){case 26:d=Nt.memoizedState;case 5:case 27:var v=Nt;if(d?m0(d):v.stateNode.complete){Kt=0,an=null;var M=v.sibling;if(M!==null)Nt=M;else{var z=v.return;z!==null?(Nt=z,$l(z)):Nt=null}break e}}Kt=0,an=null,_i(t,e,u,5);break;case 6:Kt=0,an=null,_i(t,e,u,6);break;case 8:Ru(),re=6;break t;default:throw Error(l(462))}}h1();break}catch(H){Am(t,H)}while(!0);return qn=ka=null,L.H=i,L.A=o,qt=n,Nt!==null?0:($t=null,Ot=0,yl(),re)}function h1(){for(;Nt!==null&&!_t();)Nm(Nt)}function Nm(t){var e=$h(t.alternate,t,Wn);t.memoizedProps=t.pendingProps,e===null?$l(t):Nt=e}function Cm(t){var e=t,n=e.alternate;switch(e.tag){case 15:case 0:e=Zh(n,e,e.pendingProps,e.type,void 0,Ot);break;case 11:e=Zh(n,e,e.pendingProps,e.type.render,e.ref,Ot);break;case 5:Qo(e);default:tm(n,e),e=Nt=jd(e,Wn),e=$h(n,e,Wn)}t.memoizedProps=t.pendingProps,e===null?$l(t):Nt=e}function _i(t,e,n,i){qn=ka=null,Qo(e),Ai=null,ms=0;var o=e.return;try{if(e1(t,o,e,n,Ot)){re=1,Hl(t,dn(n,t.current)),Nt=null;return}}catch(u){if(o!==null)throw Nt=o,u;re=1,Hl(t,dn(n,t.current)),Nt=null;return}e.flags&32768?(Lt||i===1?t=!0:Ri||(Ot&536870912)!==0?t=!1:(pa=t=!0,(i===2||i===9||i===3||i===6)&&(i=en.current,i!==null&&i.tag===13&&(i.flags|=16384))),Dm(e,t)):$l(e)}function $l(t){var e=t;do{if((e.flags&32768)!==0){Dm(e,pa);return}t=e.return;var n=i1(e.alternate,e,Wn);if(n!==null){Nt=n;return}if(e=e.sibling,e!==null){Nt=e;return}Nt=e=t}while(e!==null);re===0&&(re=5)}function Dm(t,e){do{var n=s1(t.alternate,t);if(n!==null){n.flags&=32767,Nt=n;return}if(n=t.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!e&&(t=t.sibling,t!==null)){Nt=t;return}Nt=t=n}while(t!==null);re=6,Nt=null}function Rm(t,e,n,i,o,u,d,v,M){t.cancelPendingCommit=null;do Il();while(be!==0);if((qt&6)!==0)throw Error(l(327));if(e!==null){if(e===t.current)throw Error(l(177));if(u=e.lanes|e.childLanes,u|=bo,on(t,n,u,d,v,M),t===$t&&(Nt=$t=null,Ot=0),Oi=e,xa=t,$n=n,Nu=u,Cu=o,bm=i,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,y1(Tt,function(){return Lm(),null})):(t.callbackNode=null,t.callbackPriority=0),i=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||i){i=L.T,L.T=null,o=F.p,F.p=2,d=qt,qt|=4;try{l1(t,e,n)}finally{qt=d,F.p=o,L.T=i}}be=1,zm(),Om(),Vm()}}function zm(){if(be===1){be=0;var t=xa,e=Oi,n=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||n){n=L.T,L.T=null;var i=F.p;F.p=2;var o=qt;qt|=4;try{dm(e,t);var u=Xu,d=xd(t.containerInfo),v=u.focusedElem,M=u.selectionRange;if(d!==v&&v&&v.ownerDocument&&yd(v.ownerDocument.documentElement,v)){if(M!==null&&po(v)){var z=M.start,H=M.end;if(H===void 0&&(H=z),"selectionStart"in v)v.selectionStart=z,v.selectionEnd=Math.min(H,v.value.length);else{var X=v.ownerDocument||document,O=X&&X.defaultView||window;if(O.getSelection){var _=O.getSelection(),nt=v.textContent.length,ht=Math.min(M.start,nt),Pt=M.end===void 0?ht:Math.min(M.end,nt);!_.extend&&ht>Pt&&(d=Pt,Pt=ht,ht=d);var j=gd(v,ht),E=gd(v,Pt);if(j&&E&&(_.rangeCount!==1||_.anchorNode!==j.node||_.anchorOffset!==j.offset||_.focusNode!==E.node||_.focusOffset!==E.offset)){var R=X.createRange();R.setStart(j.node,j.offset),_.removeAllRanges(),ht>Pt?(_.addRange(R),_.extend(E.node,E.offset)):(R.setEnd(E.node,E.offset),_.addRange(R))}}}}for(X=[],_=v;_=_.parentNode;)_.nodeType===1&&X.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<X.length;v++){var q=X[v];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}fr=!!Yu,Xu=Yu=null}finally{qt=o,F.p=i,L.T=n}}t.current=e,be=2}}function Om(){if(be===2){be=0;var t=xa,e=Oi,n=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||n){n=L.T,L.T=null;var i=F.p;F.p=2;var o=qt;qt|=4;try{rm(t,e.alternate,e)}finally{qt=o,F.p=i,L.T=n}}be=3}}function Vm(){if(be===4||be===3){be=0,ie();var t=xa,e=Oi,n=$n,i=bm;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?be=5:(be=0,Oi=xa=null,_m(t,t.pendingLanes));var o=t.pendingLanes;if(o===0&&(ya=null),Pr(n),e=e.stateNode,I&&typeof I.onCommitFiberRoot=="function")try{I.onCommitFiberRoot(Rt,e,void 0,(e.current.flags&128)===128)}catch{}if(i!==null){e=L.T,o=F.p,F.p=2,L.T=null;try{for(var u=t.onRecoverableError,d=0;d<i.length;d++){var v=i[d];u(v.value,{componentStack:v.stack})}}finally{L.T=e,F.p=o}}($n&3)!==0&&Il(),Rn(t),o=t.pendingLanes,(n&261930)!==0&&(o&42)!==0?t===Du?Rs++:(Rs=0,Du=t):Rs=0,zs(0)}}function _m(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,ds(e)))}function Il(){return zm(),Om(),Vm(),Lm()}function Lm(){if(be!==5)return!1;var t=xa,e=Nu;Nu=0;var n=Pr($n),i=L.T,o=F.p;try{F.p=32>n?32:n,L.T=null,n=Cu,Cu=null;var u=xa,d=$n;if(be=0,Oi=xa=null,$n=0,(qt&6)!==0)throw Error(l(331));var v=qt;if(qt|=4,ym(u.current),mm(u,u.current,d,n),qt=v,zs(0,!1),I&&typeof I.onPostCommitFiberRoot=="function")try{I.onPostCommitFiberRoot(Rt,u)}catch{}return!0}finally{F.p=o,L.T=i,_m(t,e)}}function Um(t,e,n){e=dn(n,e),e=ou(t.stateNode,e,2),t=fa(t,e,2),t!==null&&(Ne(t,2),Rn(t))}function Zt(t,e,n){if(t.tag===3)Um(t,t,n);else for(;e!==null;){if(e.tag===3){Um(e,t,n);break}else if(e.tag===1){var i=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(ya===null||!ya.has(i))){t=dn(n,t),n=Bh(2),i=fa(e,n,2),i!==null&&(Hh(n,i,e,t),Ne(i,2),Rn(i));break}}e=e.return}}function Ou(t,e,n){var i=t.pingCache;if(i===null){i=t.pingCache=new u1;var o=new Set;i.set(e,o)}else o=i.get(e),o===void 0&&(o=new Set,i.set(e,o));o.has(n)||(Eu=!0,o.add(n),t=m1.bind(null,t,e,n),e.then(t,t))}function m1(t,e,n){var i=t.pingCache;i!==null&&i.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,$t===t&&(Ot&n)===n&&(re===4||re===3&&(Ot&62914560)===Ot&&300>kt()-Ql?(qt&2)===0&&Vi(t,0):wu|=n,zi===Ot&&(zi=0)),Rn(t)}function Bm(t,e){e===0&&(e=me()),t=Ua(t,e),t!==null&&(Ne(t,e),Rn(t))}function p1(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Bm(t,n)}function g1(t,e){var n=0;switch(t.tag){case 31:case 13:var i=t.stateNode,o=t.memoizedState;o!==null&&(n=o.retryLane);break;case 19:i=t.stateNode;break;case 22:i=t.stateNode._retryCache;break;default:throw Error(l(314))}i!==null&&i.delete(e),Bm(t,n)}function y1(t,e){return C(t,e)}var tr=null,Li=null,Vu=!1,er=!1,_u=!1,ba=0;function Rn(t){t!==Li&&t.next===null&&(Li===null?tr=Li=t:Li=Li.next=t),er=!0,Vu||(Vu=!0,v1())}function zs(t,e){if(!_u&&er){_u=!0;do for(var n=!1,i=tr;i!==null;){if(t!==0){var o=i.pendingLanes;if(o===0)var u=0;else{var d=i.suspendedLanes,v=i.pingedLanes;u=(1<<31-pt(42|t)+1)-1,u&=o&~(d&~v),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(n=!0,Gm(i,u))}else u=Ot,u=zt(i,i===$t?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(u&3)===0||se(i,u)||(n=!0,Gm(i,u));i=i.next}while(n);_u=!1}}function x1(){Hm()}function Hm(){er=Vu=!1;var t=0;ba!==0&&C1()&&(t=ba);for(var e=kt(),n=null,i=tr;i!==null;){var o=i.next,u=km(i,e);u===0?(i.next=null,n===null?tr=o:n.next=o,o===null&&(Li=n)):(n=i,(t!==0||(u&3)!==0)&&(er=!0)),i=o}be!==0&&be!==5||zs(t),ba!==0&&(ba=0)}function km(t,e){for(var n=t.suspendedLanes,i=t.pingedLanes,o=t.expirationTimes,u=t.pendingLanes&-62914561;0<u;){var d=31-pt(u),v=1<<d,M=o[d];M===-1?((v&n)===0||(v&i)!==0)&&(o[d]=Xt(v,e)):M<=e&&(t.expiredLanes|=v),u&=~v}if(e=$t,n=Ot,n=zt(t,t===e?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),i=t.callbackNode,n===0||t===e&&(Kt===2||Kt===9)||t.cancelPendingCommit!==null)return i!==null&&i!==null&&ut(i),t.callbackNode=null,t.callbackPriority=0;if((n&3)===0||se(t,n)){if(e=n&-n,e===t.callbackPriority)return e;switch(i!==null&&ut(i),Pr(n)){case 2:case 8:n=Dt;break;case 32:n=Tt;break;case 268435456:n=Sn;break;default:n=Tt}return i=qm.bind(null,t),n=C(n,i),t.callbackPriority=e,t.callbackNode=n,e}return i!==null&&i!==null&&ut(i),t.callbackPriority=2,t.callbackNode=null,2}function qm(t,e){if(be!==0&&be!==5)return t.callbackNode=null,t.callbackPriority=0,null;var n=t.callbackNode;if(Il()&&t.callbackNode!==n)return null;var i=Ot;return i=zt(t,t===$t?i:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),i===0?null:(Tm(t,i,e),km(t,kt()),t.callbackNode!=null&&t.callbackNode===n?qm.bind(null,t):null)}function Gm(t,e){if(Il())return null;Tm(t,e,!0)}function v1(){R1(function(){(qt&6)!==0?C(we,x1):Hm()})}function Lu(){if(ba===0){var t=Si;t===0&&(t=We,We<<=1,(We&261888)===0&&(We=256)),ba=t}return ba}function Ym(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:ul(""+t)}function Xm(t,e){var n=e.ownerDocument.createElement("input");return n.name=e.name,n.value=e.value,t.id&&n.setAttribute("form",t.id),e.parentNode.insertBefore(n,e),t=new FormData(t),n.parentNode.removeChild(n),t}function b1(t,e,n,i,o){if(e==="submit"&&n&&n.stateNode===o){var u=Ym((o[Xe]||null).action),d=i.submitter;d&&(e=(e=d[Xe]||null)?Ym(e.formAction):d.getAttribute("formAction"),e!==null&&(u=e,d=null));var v=new hl("action","action",null,i,o);t.push({event:v,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(ba!==0){var M=d?Xm(o,d):new FormData(o);nu(n,{pending:!0,data:M,method:o.method,action:u},null,M)}}else typeof u=="function"&&(v.preventDefault(),M=d?Xm(o,d):new FormData(o),nu(n,{pending:!0,data:M,method:o.method,action:u},u,M))},currentTarget:o}]})}}for(var Uu=0;Uu<vo.length;Uu++){var Bu=vo[Uu],S1=Bu.toLowerCase(),T1=Bu[0].toUpperCase()+Bu.slice(1);Tn(S1,"on"+T1)}Tn(Sd,"onAnimationEnd"),Tn(Td,"onAnimationIteration"),Tn(Md,"onAnimationStart"),Tn("dblclick","onDoubleClick"),Tn("focusin","onFocus"),Tn("focusout","onBlur"),Tn(Bx,"onTransitionRun"),Tn(Hx,"onTransitionStart"),Tn(kx,"onTransitionCancel"),Tn(Ad,"onTransitionEnd"),ri("onMouseEnter",["mouseout","mouseover"]),ri("onMouseLeave",["mouseout","mouseover"]),ri("onPointerEnter",["pointerout","pointerover"]),ri("onPointerLeave",["pointerout","pointerover"]),Oa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Oa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Oa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Oa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Oa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Oa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Os="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),M1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Os));function Km(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var i=t[n],o=i.event;i=i.listeners;t:{var u=void 0;if(e)for(var d=i.length-1;0<=d;d--){var v=i[d],M=v.instance,z=v.currentTarget;if(v=v.listener,M!==u&&o.isPropagationStopped())break t;u=v,o.currentTarget=z;try{u(o)}catch(H){gl(H)}o.currentTarget=null,u=M}else for(d=0;d<i.length;d++){if(v=i[d],M=v.instance,z=v.currentTarget,v=v.listener,M!==u&&o.isPropagationStopped())break t;u=v,o.currentTarget=z;try{u(o)}catch(H){gl(H)}o.currentTarget=null,u=M}}}}function Ct(t,e){var n=e[Fr];n===void 0&&(n=e[Fr]=new Set);var i=t+"__bubble";n.has(i)||(Zm(e,t,2,!1),n.add(i))}function Hu(t,e,n){var i=0;e&&(i|=4),Zm(n,t,i,e)}var nr="_reactListening"+Math.random().toString(36).slice(2);function ku(t){if(!t[nr]){t[nr]=!0,Hf.forEach(function(n){n!=="selectionchange"&&(M1.has(n)||Hu(n,!1,t),Hu(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[nr]||(e[nr]=!0,Hu("selectionchange",!1,e))}}function Zm(t,e,n,i){switch(S0(e)){case 2:var o=W1;break;case 8:o=$1;break;default:o=ec}n=o.bind(null,e,n,t),o=void 0,!so||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(o=!0),i?o!==void 0?t.addEventListener(e,n,{capture:!0,passive:o}):t.addEventListener(e,n,!0):o!==void 0?t.addEventListener(e,n,{passive:o}):t.addEventListener(e,n,!1)}function qu(t,e,n,i,o){var u=i;if((e&1)===0&&(e&2)===0&&i!==null)t:for(;;){if(i===null)return;var d=i.tag;if(d===3||d===4){var v=i.stateNode.containerInfo;if(v===o)break;if(d===4)for(d=i.return;d!==null;){var M=d.tag;if((M===3||M===4)&&d.stateNode.containerInfo===o)return;d=d.return}for(;v!==null;){if(d=ii(v),d===null)return;if(M=d.tag,M===5||M===6||M===26||M===27){i=u=d;continue t}v=v.parentNode}}i=i.return}Wf(function(){var z=u,H=ao(n),X=[];t:{var O=Ed.get(t);if(O!==void 0){var _=hl,nt=t;switch(t){case"keypress":if(fl(n)===0)break t;case"keydown":case"keyup":_=gx;break;case"focusin":nt="focus",_=uo;break;case"focusout":nt="blur",_=uo;break;case"beforeblur":case"afterblur":_=uo;break;case"click":if(n.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":_=td;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_=ix;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_=vx;break;case Sd:case Td:case Md:_=rx;break;case Ad:_=Sx;break;case"scroll":case"scrollend":_=nx;break;case"wheel":_=Mx;break;case"copy":case"cut":case"paste":_=ux;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_=nd;break;case"toggle":case"beforetoggle":_=Ex}var ht=(e&4)!==0,Pt=!ht&&(t==="scroll"||t==="scrollend"),j=ht?O!==null?O+"Capture":null:O;ht=[];for(var E=z,R;E!==null;){var q=E;if(R=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||R===null||j===null||(q=es(E,j),q!=null&&ht.push(Vs(E,q,R))),Pt)break;E=E.return}0<ht.length&&(O=new _(O,nt,null,n,H),X.push({event:O,listeners:ht}))}}if((e&7)===0){t:{if(O=t==="mouseover"||t==="pointerover",_=t==="mouseout"||t==="pointerout",O&&n!==no&&(nt=n.relatedTarget||n.fromElement)&&(ii(nt)||nt[ai]))break t;if((_||O)&&(O=H.window===H?H:(O=H.ownerDocument)?O.defaultView||O.parentWindow:window,_?(nt=n.relatedTarget||n.toElement,_=z,nt=nt?ii(nt):null,nt!==null&&(Pt=h(nt),ht=nt.tag,nt!==Pt||ht!==5&&ht!==27&&ht!==6)&&(nt=null)):(_=null,nt=z),_!==nt)){if(ht=td,q="onMouseLeave",j="onMouseEnter",E="mouse",(t==="pointerout"||t==="pointerover")&&(ht=nd,q="onPointerLeave",j="onPointerEnter",E="pointer"),Pt=_==null?O:ts(_),R=nt==null?O:ts(nt),O=new ht(q,E+"leave",_,n,H),O.target=Pt,O.relatedTarget=R,q=null,ii(H)===z&&(ht=new ht(j,E+"enter",nt,n,H),ht.target=R,ht.relatedTarget=Pt,q=ht),Pt=q,_&&nt)e:{for(ht=A1,j=_,E=nt,R=0,q=j;q;q=ht(q))R++;q=0;for(var ct=E;ct;ct=ht(ct))q++;for(;0<R-q;)j=ht(j),R--;for(;0<q-R;)E=ht(E),q--;for(;R--;){if(j===E||E!==null&&j===E.alternate){ht=j;break e}j=ht(j),E=ht(E)}ht=null}else ht=null;_!==null&&Qm(X,O,_,ht,!1),nt!==null&&Pt!==null&&Qm(X,Pt,nt,ht,!0)}}t:{if(O=z?ts(z):window,_=O.nodeName&&O.nodeName.toLowerCase(),_==="select"||_==="input"&&O.type==="file")var Bt=cd;else if(od(O))if(fd)Bt=_x;else{Bt=Ox;var ot=zx}else _=O.nodeName,!_||_.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?z&&eo(z.elementType)&&(Bt=cd):Bt=Vx;if(Bt&&(Bt=Bt(t,z))){ud(X,Bt,n,H);break t}ot&&ot(t,O,z),t==="focusout"&&z&&O.type==="number"&&z.memoizedProps.value!=null&&to(O,"number",O.value)}switch(ot=z?ts(z):window,t){case"focusin":(od(ot)||ot.contentEditable==="true")&&(hi=ot,go=z,us=null);break;case"focusout":us=go=hi=null;break;case"mousedown":yo=!0;break;case"contextmenu":case"mouseup":case"dragend":yo=!1,vd(X,n,H);break;case"selectionchange":if(Ux)break;case"keydown":case"keyup":vd(X,n,H)}var At;if(fo)t:{switch(t){case"compositionstart":var Vt="onCompositionStart";break t;case"compositionend":Vt="onCompositionEnd";break t;case"compositionupdate":Vt="onCompositionUpdate";break t}Vt=void 0}else di?ld(t,n)&&(Vt="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(Vt="onCompositionStart");Vt&&(ad&&n.locale!=="ko"&&(di||Vt!=="onCompositionStart"?Vt==="onCompositionEnd"&&di&&(At=$f()):(ia=H,lo="value"in ia?ia.value:ia.textContent,di=!0)),ot=ar(z,Vt),0<ot.length&&(Vt=new ed(Vt,t,null,n,H),X.push({event:Vt,listeners:ot}),At?Vt.data=At:(At=rd(n),At!==null&&(Vt.data=At)))),(At=jx?Nx(t,n):Cx(t,n))&&(Vt=ar(z,"onBeforeInput"),0<Vt.length&&(ot=new ed("onBeforeInput","beforeinput",null,n,H),X.push({event:ot,listeners:Vt}),ot.data=At)),b1(X,t,z,n,H)}Km(X,e)})}function Vs(t,e,n){return{instance:t,listener:e,currentTarget:n}}function ar(t,e){for(var n=e+"Capture",i=[];t!==null;){var o=t,u=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||u===null||(o=es(t,n),o!=null&&i.unshift(Vs(t,o,u)),o=es(t,e),o!=null&&i.push(Vs(t,o,u))),t.tag===3)return i;t=t.return}return[]}function A1(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Qm(t,e,n,i,o){for(var u=e._reactName,d=[];n!==null&&n!==i;){var v=n,M=v.alternate,z=v.stateNode;if(v=v.tag,M!==null&&M===i)break;v!==5&&v!==26&&v!==27||z===null||(M=z,o?(z=es(n,u),z!=null&&d.unshift(Vs(n,z,M))):o||(z=es(n,u),z!=null&&d.push(Vs(n,z,M)))),n=n.return}d.length!==0&&t.push({event:e,listeners:d})}var E1=/\r\n?/g,w1=/\u0000|\uFFFD/g;function Jm(t){return(typeof t=="string"?t:""+t).replace(E1,`
`).replace(w1,"")}function Pm(t,e){return e=Jm(e),Jm(t)===e}function Jt(t,e,n,i,o,u){switch(n){case"children":typeof i=="string"?e==="body"||e==="textarea"&&i===""||ui(t,i):(typeof i=="number"||typeof i=="bigint")&&e!=="body"&&ui(t,""+i);break;case"className":rl(t,"class",i);break;case"tabIndex":rl(t,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":rl(t,n,i);break;case"style":Pf(t,i,u);break;case"data":if(e!=="object"){rl(t,"data",i);break}case"src":case"href":if(i===""&&(e!=="a"||n!=="href")){t.removeAttribute(n);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){t.removeAttribute(n);break}i=ul(""+i),t.setAttribute(n,i);break;case"action":case"formAction":if(typeof i=="function"){t.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(n==="formAction"?(e!=="input"&&Jt(t,e,"name",o.name,o,null),Jt(t,e,"formEncType",o.formEncType,o,null),Jt(t,e,"formMethod",o.formMethod,o,null),Jt(t,e,"formTarget",o.formTarget,o,null)):(Jt(t,e,"encType",o.encType,o,null),Jt(t,e,"method",o.method,o,null),Jt(t,e,"target",o.target,o,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){t.removeAttribute(n);break}i=ul(""+i),t.setAttribute(n,i);break;case"onClick":i!=null&&(t.onclick=Un);break;case"onScroll":i!=null&&Ct("scroll",t);break;case"onScrollEnd":i!=null&&Ct("scrollend",t);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(l(61));if(n=i.__html,n!=null){if(o.children!=null)throw Error(l(60));t.innerHTML=n}}break;case"multiple":t.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":t.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){t.removeAttribute("xlink:href");break}n=ul(""+i),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?t.setAttribute(n,""+i):t.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?t.setAttribute(n,""):t.removeAttribute(n);break;case"capture":case"download":i===!0?t.setAttribute(n,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?t.setAttribute(n,i):t.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?t.setAttribute(n,i):t.removeAttribute(n);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?t.removeAttribute(n):t.setAttribute(n,i);break;case"popover":Ct("beforetoggle",t),Ct("toggle",t),ll(t,"popover",i);break;case"xlinkActuate":Ln(t,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":Ln(t,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":Ln(t,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":Ln(t,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":Ln(t,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":Ln(t,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":Ln(t,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":Ln(t,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":Ln(t,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":ll(t,"is",i);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=tx.get(n)||n,ll(t,n,i))}}function Gu(t,e,n,i,o,u){switch(n){case"style":Pf(t,i,u);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(l(61));if(n=i.__html,n!=null){if(o.children!=null)throw Error(l(60));t.innerHTML=n}}break;case"children":typeof i=="string"?ui(t,i):(typeof i=="number"||typeof i=="bigint")&&ui(t,""+i);break;case"onScroll":i!=null&&Ct("scroll",t);break;case"onScrollEnd":i!=null&&Ct("scrollend",t);break;case"onClick":i!=null&&(t.onclick=Un);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!kf.hasOwnProperty(n))t:{if(n[0]==="o"&&n[1]==="n"&&(o=n.endsWith("Capture"),e=n.slice(2,o?n.length-7:void 0),u=t[Xe]||null,u=u!=null?u[n]:null,typeof u=="function"&&t.removeEventListener(e,u,o),typeof i=="function")){typeof u!="function"&&u!==null&&(n in t?t[n]=null:t.hasAttribute(n)&&t.removeAttribute(n)),t.addEventListener(e,i,o);break t}n in t?t[n]=i:i===!0?t.setAttribute(n,""):ll(t,n,i)}}}function Oe(t,e,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ct("error",t),Ct("load",t);var i=!1,o=!1,u;for(u in n)if(n.hasOwnProperty(u)){var d=n[u];if(d!=null)switch(u){case"src":i=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,e));default:Jt(t,e,u,d,n,null)}}o&&Jt(t,e,"srcSet",n.srcSet,n,null),i&&Jt(t,e,"src",n.src,n,null);return;case"input":Ct("invalid",t);var v=u=d=o=null,M=null,z=null;for(i in n)if(n.hasOwnProperty(i)){var H=n[i];if(H!=null)switch(i){case"name":o=H;break;case"type":d=H;break;case"checked":M=H;break;case"defaultChecked":z=H;break;case"value":u=H;break;case"defaultValue":v=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(l(137,e));break;default:Jt(t,e,i,H,n,null)}}Kf(t,u,v,M,z,d,o,!1);return;case"select":Ct("invalid",t),i=d=u=null;for(o in n)if(n.hasOwnProperty(o)&&(v=n[o],v!=null))switch(o){case"value":u=v;break;case"defaultValue":d=v;break;case"multiple":i=v;default:Jt(t,e,o,v,n,null)}e=u,n=d,t.multiple=!!i,e!=null?oi(t,!!i,e,!1):n!=null&&oi(t,!!i,n,!0);return;case"textarea":Ct("invalid",t),u=o=i=null;for(d in n)if(n.hasOwnProperty(d)&&(v=n[d],v!=null))switch(d){case"value":i=v;break;case"defaultValue":o=v;break;case"children":u=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(l(91));break;default:Jt(t,e,d,v,n,null)}Qf(t,i,o,u);return;case"option":for(M in n)if(n.hasOwnProperty(M)&&(i=n[M],i!=null))switch(M){case"selected":t.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:Jt(t,e,M,i,n,null)}return;case"dialog":Ct("beforetoggle",t),Ct("toggle",t),Ct("cancel",t),Ct("close",t);break;case"iframe":case"object":Ct("load",t);break;case"video":case"audio":for(i=0;i<Os.length;i++)Ct(Os[i],t);break;case"image":Ct("error",t),Ct("load",t);break;case"details":Ct("toggle",t);break;case"embed":case"source":case"link":Ct("error",t),Ct("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(z in n)if(n.hasOwnProperty(z)&&(i=n[z],i!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,e));default:Jt(t,e,z,i,n,null)}return;default:if(eo(e)){for(H in n)n.hasOwnProperty(H)&&(i=n[H],i!==void 0&&Gu(t,e,H,i,n,void 0));return}}for(v in n)n.hasOwnProperty(v)&&(i=n[v],i!=null&&Jt(t,e,v,i,n,null))}function j1(t,e,n,i){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,u=null,d=null,v=null,M=null,z=null,H=null;for(_ in n){var X=n[_];if(n.hasOwnProperty(_)&&X!=null)switch(_){case"checked":break;case"value":break;case"defaultValue":M=X;default:i.hasOwnProperty(_)||Jt(t,e,_,null,i,X)}}for(var O in i){var _=i[O];if(X=n[O],i.hasOwnProperty(O)&&(_!=null||X!=null))switch(O){case"type":u=_;break;case"name":o=_;break;case"checked":z=_;break;case"defaultChecked":H=_;break;case"value":d=_;break;case"defaultValue":v=_;break;case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(l(137,e));break;default:_!==X&&Jt(t,e,O,_,i,X)}}Ir(t,d,v,M,z,H,u,o);return;case"select":_=d=v=O=null;for(u in n)if(M=n[u],n.hasOwnProperty(u)&&M!=null)switch(u){case"value":break;case"multiple":_=M;default:i.hasOwnProperty(u)||Jt(t,e,u,null,i,M)}for(o in i)if(u=i[o],M=n[o],i.hasOwnProperty(o)&&(u!=null||M!=null))switch(o){case"value":O=u;break;case"defaultValue":v=u;break;case"multiple":d=u;default:u!==M&&Jt(t,e,o,u,i,M)}e=v,n=d,i=_,O!=null?oi(t,!!n,O,!1):!!i!=!!n&&(e!=null?oi(t,!!n,e,!0):oi(t,!!n,n?[]:"",!1));return;case"textarea":_=O=null;for(v in n)if(o=n[v],n.hasOwnProperty(v)&&o!=null&&!i.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:Jt(t,e,v,null,i,o)}for(d in i)if(o=i[d],u=n[d],i.hasOwnProperty(d)&&(o!=null||u!=null))switch(d){case"value":O=o;break;case"defaultValue":_=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(l(91));break;default:o!==u&&Jt(t,e,d,o,i,u)}Zf(t,O,_);return;case"option":for(var nt in n)if(O=n[nt],n.hasOwnProperty(nt)&&O!=null&&!i.hasOwnProperty(nt))switch(nt){case"selected":t.selected=!1;break;default:Jt(t,e,nt,null,i,O)}for(M in i)if(O=i[M],_=n[M],i.hasOwnProperty(M)&&O!==_&&(O!=null||_!=null))switch(M){case"selected":t.selected=O&&typeof O!="function"&&typeof O!="symbol";break;default:Jt(t,e,M,O,i,_)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ht in n)O=n[ht],n.hasOwnProperty(ht)&&O!=null&&!i.hasOwnProperty(ht)&&Jt(t,e,ht,null,i,O);for(z in i)if(O=i[z],_=n[z],i.hasOwnProperty(z)&&O!==_&&(O!=null||_!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(l(137,e));break;default:Jt(t,e,z,O,i,_)}return;default:if(eo(e)){for(var Pt in n)O=n[Pt],n.hasOwnProperty(Pt)&&O!==void 0&&!i.hasOwnProperty(Pt)&&Gu(t,e,Pt,void 0,i,O);for(H in i)O=i[H],_=n[H],!i.hasOwnProperty(H)||O===_||O===void 0&&_===void 0||Gu(t,e,H,O,i,_);return}}for(var j in n)O=n[j],n.hasOwnProperty(j)&&O!=null&&!i.hasOwnProperty(j)&&Jt(t,e,j,null,i,O);for(X in i)O=i[X],_=n[X],!i.hasOwnProperty(X)||O===_||O==null&&_==null||Jt(t,e,X,O,i,_)}function Fm(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function N1(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,n=performance.getEntriesByType("resource"),i=0;i<n.length;i++){var o=n[i],u=o.transferSize,d=o.initiatorType,v=o.duration;if(u&&v&&Fm(d)){for(d=0,v=o.responseEnd,i+=1;i<n.length;i++){var M=n[i],z=M.startTime;if(z>v)break;var H=M.transferSize,X=M.initiatorType;H&&Fm(X)&&(M=M.responseEnd,d+=H*(M<v?1:(v-z)/(M-z)))}if(--i,e+=8*(u+d)/(o.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Yu=null,Xu=null;function ir(t){return t.nodeType===9?t:t.ownerDocument}function Wm(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function $m(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function Ku(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Zu=null;function C1(){var t=window.event;return t&&t.type==="popstate"?t===Zu?!1:(Zu=t,!0):(Zu=null,!1)}var Im=typeof setTimeout=="function"?setTimeout:void 0,D1=typeof clearTimeout=="function"?clearTimeout:void 0,t0=typeof Promise=="function"?Promise:void 0,R1=typeof queueMicrotask=="function"?queueMicrotask:typeof t0<"u"?function(t){return t0.resolve(null).then(t).catch(z1)}:Im;function z1(t){setTimeout(function(){throw t})}function Sa(t){return t==="head"}function e0(t,e){var n=e,i=0;do{var o=n.nextSibling;if(t.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"||n==="/&"){if(i===0){t.removeChild(o),ki(e);return}i--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")i++;else if(n==="html")_s(t.ownerDocument.documentElement);else if(n==="head"){n=t.ownerDocument.head,_s(n);for(var u=n.firstChild;u;){var d=u.nextSibling,v=u.nodeName;u[Ii]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&u.rel.toLowerCase()==="stylesheet"||n.removeChild(u),u=d}}else n==="body"&&_s(t.ownerDocument.body);n=o}while(n);ki(e)}function n0(t,e){var n=t;t=0;do{var i=n.nextSibling;if(n.nodeType===1?e?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(e?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(t===0)break;t--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||t++;n=i}while(n)}function Qu(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var n=e;switch(e=e.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Qu(n),Wr(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}t.removeChild(n)}}function O1(t,e,n,i){for(;t.nodeType===1;){var o=n;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!i&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(i){if(!t[Ii])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(u=t.getAttribute("rel"),u==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(u!==o.rel||t.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||t.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||t.getAttribute("title")!==(o.title==null?null:o.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(u=t.getAttribute("src"),(u!==(o.src==null?null:o.src)||t.getAttribute("type")!==(o.type==null?null:o.type)||t.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&u&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var u=o.name==null?null:""+o.name;if(o.type==="hidden"&&t.getAttribute("name")===u)return t}else return t;if(t=yn(t.nextSibling),t===null)break}return null}function V1(t,e,n){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=yn(t.nextSibling),t===null))return null;return t}function a0(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=yn(t.nextSibling),t===null))return null;return t}function Ju(t){return t.data==="$?"||t.data==="$~"}function Pu(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function _1(t,e){var n=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||n.readyState!=="loading")e();else{var i=function(){e(),n.removeEventListener("DOMContentLoaded",i)};n.addEventListener("DOMContentLoaded",i),t._reactRetry=i}}function yn(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var Fu=null;function i0(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"||n==="/&"){if(e===0)return yn(t.nextSibling);e--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||e++}t=t.nextSibling}return null}function s0(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(e===0)return t;e--}else n!=="/$"&&n!=="/&"||e++}t=t.previousSibling}return null}function l0(t,e,n){switch(e=ir(n),t){case"html":if(t=e.documentElement,!t)throw Error(l(452));return t;case"head":if(t=e.head,!t)throw Error(l(453));return t;case"body":if(t=e.body,!t)throw Error(l(454));return t;default:throw Error(l(451))}}function _s(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);Wr(t)}var xn=new Map,r0=new Set;function sr(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var In=F.d;F.d={f:L1,r:U1,D:B1,C:H1,L:k1,m:q1,X:Y1,S:G1,M:X1};function L1(){var t=In.f(),e=Fl();return t||e}function U1(t){var e=si(t);e!==null&&e.tag===5&&e.type==="form"?Ah(e):In.r(t)}var Ui=typeof document>"u"?null:document;function o0(t,e,n){var i=Ui;if(i&&typeof e=="string"&&e){var o=cn(e);o='link[rel="'+t+'"][href="'+o+'"]',typeof n=="string"&&(o+='[crossorigin="'+n+'"]'),r0.has(o)||(r0.add(o),t={rel:t,crossOrigin:n,href:e},i.querySelector(o)===null&&(e=i.createElement("link"),Oe(e,"link",t),Me(e),i.head.appendChild(e)))}}function B1(t){In.D(t),o0("dns-prefetch",t,null)}function H1(t,e){In.C(t,e),o0("preconnect",t,e)}function k1(t,e,n){In.L(t,e,n);var i=Ui;if(i&&t&&e){var o='link[rel="preload"][as="'+cn(e)+'"]';e==="image"&&n&&n.imageSrcSet?(o+='[imagesrcset="'+cn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(o+='[imagesizes="'+cn(n.imageSizes)+'"]')):o+='[href="'+cn(t)+'"]';var u=o;switch(e){case"style":u=Bi(t);break;case"script":u=Hi(t)}xn.has(u)||(t=S({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),xn.set(u,t),i.querySelector(o)!==null||e==="style"&&i.querySelector(Ls(u))||e==="script"&&i.querySelector(Us(u))||(e=i.createElement("link"),Oe(e,"link",t),Me(e),i.head.appendChild(e)))}}function q1(t,e){In.m(t,e);var n=Ui;if(n&&t){var i=e&&typeof e.as=="string"?e.as:"script",o='link[rel="modulepreload"][as="'+cn(i)+'"][href="'+cn(t)+'"]',u=o;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Hi(t)}if(!xn.has(u)&&(t=S({rel:"modulepreload",href:t},e),xn.set(u,t),n.querySelector(o)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Us(u)))return}i=n.createElement("link"),Oe(i,"link",t),Me(i),n.head.appendChild(i)}}}function G1(t,e,n){In.S(t,e,n);var i=Ui;if(i&&t){var o=li(i).hoistableStyles,u=Bi(t);e=e||"default";var d=o.get(u);if(!d){var v={loading:0,preload:null};if(d=i.querySelector(Ls(u)))v.loading=5;else{t=S({rel:"stylesheet",href:t,"data-precedence":e},n),(n=xn.get(u))&&Wu(t,n);var M=d=i.createElement("link");Me(M),Oe(M,"link",t),M._p=new Promise(function(z,H){M.onload=z,M.onerror=H}),M.addEventListener("load",function(){v.loading|=1}),M.addEventListener("error",function(){v.loading|=2}),v.loading|=4,lr(d,e,i)}d={type:"stylesheet",instance:d,count:1,state:v},o.set(u,d)}}}function Y1(t,e){In.X(t,e);var n=Ui;if(n&&t){var i=li(n).hoistableScripts,o=Hi(t),u=i.get(o);u||(u=n.querySelector(Us(o)),u||(t=S({src:t,async:!0},e),(e=xn.get(o))&&$u(t,e),u=n.createElement("script"),Me(u),Oe(u,"link",t),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},i.set(o,u))}}function X1(t,e){In.M(t,e);var n=Ui;if(n&&t){var i=li(n).hoistableScripts,o=Hi(t),u=i.get(o);u||(u=n.querySelector(Us(o)),u||(t=S({src:t,async:!0,type:"module"},e),(e=xn.get(o))&&$u(t,e),u=n.createElement("script"),Me(u),Oe(u,"link",t),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},i.set(o,u))}}function u0(t,e,n,i){var o=(o=wt.current)?sr(o):null;if(!o)throw Error(l(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(e=Bi(n.href),n=li(o).hoistableStyles,i=n.get(e),i||(i={type:"style",instance:null,count:0,state:null},n.set(e,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=Bi(n.href);var u=li(o).hoistableStyles,d=u.get(t);if(d||(o=o.ownerDocument||o,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(t,d),(u=o.querySelector(Ls(t)))&&!u._p&&(d.instance=u,d.state.loading=5),xn.has(t)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},xn.set(t,n),u||K1(o,t,n,d.state))),e&&i===null)throw Error(l(528,""));return d}if(e&&i!==null)throw Error(l(529,""));return null;case"script":return e=n.async,n=n.src,typeof n=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=Hi(n),n=li(o).hoistableScripts,i=n.get(e),i||(i={type:"script",instance:null,count:0,state:null},n.set(e,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,t))}}function Bi(t){return'href="'+cn(t)+'"'}function Ls(t){return'link[rel="stylesheet"]['+t+"]"}function c0(t){return S({},t,{"data-precedence":t.precedence,precedence:null})}function K1(t,e,n,i){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?i.loading=1:(e=t.createElement("link"),i.preload=e,e.addEventListener("load",function(){return i.loading|=1}),e.addEventListener("error",function(){return i.loading|=2}),Oe(e,"link",n),Me(e),t.head.appendChild(e))}function Hi(t){return'[src="'+cn(t)+'"]'}function Us(t){return"script[async]"+t}function f0(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var i=t.querySelector('style[data-href~="'+cn(n.href)+'"]');if(i)return e.instance=i,Me(i),i;var o=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return i=(t.ownerDocument||t).createElement("style"),Me(i),Oe(i,"style",o),lr(i,n.precedence,t),e.instance=i;case"stylesheet":o=Bi(n.href);var u=t.querySelector(Ls(o));if(u)return e.state.loading|=4,e.instance=u,Me(u),u;i=c0(n),(o=xn.get(o))&&Wu(i,o),u=(t.ownerDocument||t).createElement("link"),Me(u);var d=u;return d._p=new Promise(function(v,M){d.onload=v,d.onerror=M}),Oe(u,"link",i),e.state.loading|=4,lr(u,n.precedence,t),e.instance=u;case"script":return u=Hi(n.src),(o=t.querySelector(Us(u)))?(e.instance=o,Me(o),o):(i=n,(o=xn.get(u))&&(i=S({},n),$u(i,o)),t=t.ownerDocument||t,o=t.createElement("script"),Me(o),Oe(o,"link",i),t.head.appendChild(o),e.instance=o);case"void":return null;default:throw Error(l(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(i=e.instance,e.state.loading|=4,lr(i,n.precedence,t));return e.instance}function lr(t,e,n){for(var i=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=i.length?i[i.length-1]:null,u=o,d=0;d<i.length;d++){var v=i[d];if(v.dataset.precedence===e)u=v;else if(u!==o)break}u?u.parentNode.insertBefore(t,u.nextSibling):(e=n.nodeType===9?n.head:n,e.insertBefore(t,e.firstChild))}function Wu(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function $u(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var rr=null;function d0(t,e,n){if(rr===null){var i=new Map,o=rr=new Map;o.set(n,i)}else o=rr,i=o.get(n),i||(i=new Map,o.set(n,i));if(i.has(t))return i;for(i.set(t,null),n=n.getElementsByTagName(t),o=0;o<n.length;o++){var u=n[o];if(!(u[Ii]||u[Ce]||t==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var d=u.getAttribute(e)||"";d=t+d;var v=i.get(d);v?v.push(u):i.set(d,[u])}}return i}function h0(t,e,n){t=t.ownerDocument||t,t.head.insertBefore(n,e==="title"?t.querySelector("head > title"):null)}function Z1(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function m0(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Q1(t,e,n,i){if(n.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var o=Bi(i.href),u=e.querySelector(Ls(o));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=or.bind(t),e.then(t,t)),n.state.loading|=4,n.instance=u,Me(u);return}u=e.ownerDocument||e,i=c0(i),(o=xn.get(o))&&Wu(i,o),u=u.createElement("link"),Me(u);var d=u;d._p=new Promise(function(v,M){d.onload=v,d.onerror=M}),Oe(u,"link",i),n.instance=u}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(t.count++,n=or.bind(t),e.addEventListener("load",n),e.addEventListener("error",n))}}var Iu=0;function J1(t,e){return t.stylesheets&&t.count===0&&cr(t,t.stylesheets),0<t.count||0<t.imgCount?function(n){var i=setTimeout(function(){if(t.stylesheets&&cr(t,t.stylesheets),t.unsuspend){var u=t.unsuspend;t.unsuspend=null,u()}},6e4+e);0<t.imgBytes&&Iu===0&&(Iu=62500*N1());var o=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&cr(t,t.stylesheets),t.unsuspend)){var u=t.unsuspend;t.unsuspend=null,u()}},(t.imgBytes>Iu?50:800)+e);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(i),clearTimeout(o)}}:null}function or(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)cr(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var ur=null;function cr(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,ur=new Map,e.forEach(P1,t),ur=null,or.call(t))}function P1(t,e){if(!(e.state.loading&4)){var n=ur.get(t);if(n)var i=n.get(null);else{n=new Map,ur.set(t,n);for(var o=t.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<o.length;u++){var d=o[u];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(n.set(d.dataset.precedence,d),i=d)}i&&n.set(null,i)}o=e.instance,d=o.getAttribute("data-precedence"),u=n.get(d)||i,u===i&&n.set(null,o),n.set(d,o),this.count++,i=or.bind(this),o.addEventListener("load",i),o.addEventListener("error",i),u?u.parentNode.insertBefore(o,u.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(o,t.firstChild)),e.state.loading|=4}}var Bs={$$typeof:Q,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function F1(t,e,n,i,o,u,d,v,M){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=je(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=je(0),this.hiddenUpdates=je(null),this.identifierPrefix=i,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=M,this.incompleteTransitions=new Map}function p0(t,e,n,i,o,u,d,v,M,z,H,X){return t=new F1(t,e,n,d,M,z,H,X,v),e=1,u===!0&&(e|=24),u=tn(3,null,null,e),t.current=u,u.stateNode=t,e=zo(),e.refCount++,t.pooledCache=e,e.refCount++,u.memoizedState={element:i,isDehydrated:n,cache:e},Lo(u),t}function g0(t){return t?(t=gi,t):gi}function y0(t,e,n,i,o,u){o=g0(o),i.context===null?i.context=o:i.pendingContext=o,i=ca(e),i.payload={element:n},u=u===void 0?null:u,u!==null&&(i.callback=u),n=fa(t,i,e),n!==null&&(Fe(n,t,e),gs(n,t,e))}function x0(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function tc(t,e){x0(t,e),(t=t.alternate)&&x0(t,e)}function v0(t){if(t.tag===13||t.tag===31){var e=Ua(t,67108864);e!==null&&Fe(e,t,67108864),tc(t,67108864)}}function b0(t){if(t.tag===13||t.tag===31){var e=ln();e=Jr(e);var n=Ua(t,e);n!==null&&Fe(n,t,e),tc(t,e)}}var fr=!0;function W1(t,e,n,i){var o=L.T;L.T=null;var u=F.p;try{F.p=2,ec(t,e,n,i)}finally{F.p=u,L.T=o}}function $1(t,e,n,i){var o=L.T;L.T=null;var u=F.p;try{F.p=8,ec(t,e,n,i)}finally{F.p=u,L.T=o}}function ec(t,e,n,i){if(fr){var o=nc(i);if(o===null)qu(t,e,i,dr,n),T0(t,i);else if(tv(o,t,e,n,i))i.stopPropagation();else if(T0(t,i),e&4&&-1<I1.indexOf(t)){for(;o!==null;){var u=si(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var d=yt(u.pendingLanes);if(d!==0){var v=u;for(v.pendingLanes|=2,v.entangledLanes|=2;d;){var M=1<<31-pt(d);v.entanglements[1]|=M,d&=~M}Rn(u),(qt&6)===0&&(Jl=kt()+500,zs(0))}}break;case 31:case 13:v=Ua(u,2),v!==null&&Fe(v,u,2),Fl(),tc(u,2)}if(u=nc(i),u===null&&qu(t,e,i,dr,n),u===o)break;o=u}o!==null&&i.stopPropagation()}else qu(t,e,i,null,n)}}function nc(t){return t=ao(t),ac(t)}var dr=null;function ac(t){if(dr=null,t=ii(t),t!==null){var e=h(t);if(e===null)t=null;else{var n=e.tag;if(n===13){if(t=f(e),t!==null)return t;t=null}else if(n===31){if(t=p(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return dr=t,null}function S0(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Te()){case we:return 2;case Dt:return 8;case Tt:case ue:return 32;case Sn:return 268435456;default:return 32}default:return 32}}var ic=!1,Ta=null,Ma=null,Aa=null,Hs=new Map,ks=new Map,Ea=[],I1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function T0(t,e){switch(t){case"focusin":case"focusout":Ta=null;break;case"dragenter":case"dragleave":Ma=null;break;case"mouseover":case"mouseout":Aa=null;break;case"pointerover":case"pointerout":Hs.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":ks.delete(e.pointerId)}}function qs(t,e,n,i,o,u){return t===null||t.nativeEvent!==u?(t={blockedOn:e,domEventName:n,eventSystemFlags:i,nativeEvent:u,targetContainers:[o]},e!==null&&(e=si(e),e!==null&&v0(e)),t):(t.eventSystemFlags|=i,e=t.targetContainers,o!==null&&e.indexOf(o)===-1&&e.push(o),t)}function tv(t,e,n,i,o){switch(e){case"focusin":return Ta=qs(Ta,t,e,n,i,o),!0;case"dragenter":return Ma=qs(Ma,t,e,n,i,o),!0;case"mouseover":return Aa=qs(Aa,t,e,n,i,o),!0;case"pointerover":var u=o.pointerId;return Hs.set(u,qs(Hs.get(u)||null,t,e,n,i,o)),!0;case"gotpointercapture":return u=o.pointerId,ks.set(u,qs(ks.get(u)||null,t,e,n,i,o)),!0}return!1}function M0(t){var e=ii(t.target);if(e!==null){var n=h(e);if(n!==null){if(e=n.tag,e===13){if(e=f(n),e!==null){t.blockedOn=e,Uf(t.priority,function(){b0(n)});return}}else if(e===31){if(e=p(n),e!==null){t.blockedOn=e,Uf(t.priority,function(){b0(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function hr(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=nc(t.nativeEvent);if(n===null){n=t.nativeEvent;var i=new n.constructor(n.type,n);no=i,n.target.dispatchEvent(i),no=null}else return e=si(n),e!==null&&v0(e),t.blockedOn=n,!1;e.shift()}return!0}function A0(t,e,n){hr(t)&&n.delete(e)}function ev(){ic=!1,Ta!==null&&hr(Ta)&&(Ta=null),Ma!==null&&hr(Ma)&&(Ma=null),Aa!==null&&hr(Aa)&&(Aa=null),Hs.forEach(A0),ks.forEach(A0)}function mr(t,e){t.blockedOn===e&&(t.blockedOn=null,ic||(ic=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,ev)))}var pr=null;function E0(t){pr!==t&&(pr=t,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){pr===t&&(pr=null);for(var e=0;e<t.length;e+=3){var n=t[e],i=t[e+1],o=t[e+2];if(typeof i!="function"){if(ac(i||n)===null)continue;break}var u=si(n);u!==null&&(t.splice(e,3),e-=3,nu(u,{pending:!0,data:o,method:n.method,action:i},i,o))}}))}function ki(t){function e(M){return mr(M,t)}Ta!==null&&mr(Ta,t),Ma!==null&&mr(Ma,t),Aa!==null&&mr(Aa,t),Hs.forEach(e),ks.forEach(e);for(var n=0;n<Ea.length;n++){var i=Ea[n];i.blockedOn===t&&(i.blockedOn=null)}for(;0<Ea.length&&(n=Ea[0],n.blockedOn===null);)M0(n),n.blockedOn===null&&Ea.shift();if(n=(t.ownerDocument||t).$$reactFormReplay,n!=null)for(i=0;i<n.length;i+=3){var o=n[i],u=n[i+1],d=o[Xe]||null;if(typeof u=="function")d||E0(n);else if(d){var v=null;if(u&&u.hasAttribute("formAction")){if(o=u,d=u[Xe]||null)v=d.formAction;else if(ac(o)!==null)continue}else v=d.action;typeof v=="function"?n[i+1]=v:(n.splice(i,3),i-=3),E0(n)}}}function w0(){function t(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(d){return o=d})},focusReset:"manual",scroll:"manual"})}function e(){o!==null&&(o(),o=null),i||setTimeout(n,20)}function n(){if(!i&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,o=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(n,100),function(){i=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),o!==null&&(o(),o=null)}}}function sc(t){this._internalRoot=t}gr.prototype.render=sc.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(l(409));var n=e.current,i=ln();y0(n,i,t,e,null,null)},gr.prototype.unmount=sc.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;y0(t.current,2,null,t,null,null),Fl(),e[ai]=null}};function gr(t){this._internalRoot=t}gr.prototype.unstable_scheduleHydration=function(t){if(t){var e=Lf();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Ea.length&&e!==0&&e<Ea[n].priority;n++);Ea.splice(n,0,t),n===0&&M0(t)}};var j0=s.version;if(j0!=="19.2.7")throw Error(l(527,j0,"19.2.7"));F.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(l(188)):(t=Object.keys(t).join(","),Error(l(268,t)));return t=y(e),t=t!==null?b(t):null,t=t===null?null:t.stateNode,t};var nv={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yr.isDisabled&&yr.supportsFiber)try{Rt=yr.inject(nv),I=yr}catch{}}return Ys.createRoot=function(t,e){if(!c(t))throw Error(l(299));var n=!1,i="",o=Vh,u=_h,d=Lh;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(i=e.identifierPrefix),e.onUncaughtError!==void 0&&(o=e.onUncaughtError),e.onCaughtError!==void 0&&(u=e.onCaughtError),e.onRecoverableError!==void 0&&(d=e.onRecoverableError)),e=p0(t,1,!1,null,null,n,i,null,o,u,d,w0),t[ai]=e.current,ku(t),new sc(e)},Ys.hydrateRoot=function(t,e,n){if(!c(t))throw Error(l(299));var i=!1,o="",u=Vh,d=_h,v=Lh,M=null;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError),n.formState!==void 0&&(M=n.formState)),e=p0(t,1,!0,e,n??null,i,o,M,u,d,v,w0),e.context=g0(null),n=e.current,i=ln(),i=Jr(i),o=ca(i),o.callback=null,fa(n,o,i),n=i,e.current.lanes=n,Ne(e,n),Rn(e),t[ai]=e.current,ku(t),new gr(e)},Ys.version="19.2.7",Ys}var U0;function dv(){if(U0)return oc.exports;U0=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(s){console.error(s)}}return a(),oc.exports=fv(),oc.exports}var hv=dv();const af=B.createContext({});function sf(a){const s=B.useRef(null);return s.current===null&&(s.current=a()),s.current}const mv=typeof window<"u",lf=mv?B.useLayoutEffect:B.useEffect,Gr=B.createContext(null);function rf(a,s){a.indexOf(s)===-1&&a.push(s)}function Rr(a,s){const r=a.indexOf(s);r>-1&&a.splice(r,1)}const _n=(a,s,r)=>r>s?s:r<a?a:r;let of=()=>{};const Ca={},ag=a=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(a),ig=a=>typeof a=="object"&&a!==null,sg=a=>/^0[^.\s]+$/u.test(a);function lg(a){let s;return()=>(s===void 0&&(s=a()),s)}const bn=a=>a,tl=(...a)=>a.reduce((s,r)=>l=>r(s(l))),Fs=(a,s,r)=>{const l=s-a;return l?(r-a)/l:1};class uf{constructor(){this.subscriptions=[]}add(s){return rf(this.subscriptions,s),()=>Rr(this.subscriptions,s)}notify(s,r,l){const c=this.subscriptions.length;if(c)if(c===1)this.subscriptions[0](s,r,l);else for(let h=0;h<c;h++){const f=this.subscriptions[h];f&&f(s,r,l)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const rn=a=>a*1e3,vn=a=>a/1e3,rg=(a,s)=>s?a*(1e3/s):0,og=(a,s,r)=>(((1-3*r+3*s)*a+(3*r-6*s))*a+3*s)*a,pv=1e-7,gv=12;function yv(a,s,r,l,c){let h,f,p=0;do f=s+(r-s)/2,h=og(f,l,c)-a,h>0?r=f:s=f;while(Math.abs(h)>pv&&++p<gv);return f}function el(a,s,r,l){if(a===s&&r===l)return bn;const c=h=>yv(h,0,1,a,r);return h=>h===0||h===1?h:og(c(h),s,l)}const ug=a=>s=>s<=.5?a(2*s)/2:(2-a(2*(1-s)))/2,cg=a=>s=>1-a(1-s),fg=el(.33,1.53,.69,.99),cf=cg(fg),dg=ug(cf),hg=a=>a>=1?1:(a*=2)<1?.5*cf(a):.5*(2-Math.pow(2,-10*(a-1))),ff=a=>1-Math.sin(Math.acos(a)),mg=cg(ff),pg=ug(ff),xv=el(.42,0,1,1),vv=el(0,0,.58,1),gg=el(.42,0,.58,1),bv=a=>Array.isArray(a)&&typeof a[0]!="number",yg=a=>Array.isArray(a)&&typeof a[0]=="number",Sv={linear:bn,easeIn:xv,easeInOut:gg,easeOut:vv,circIn:ff,circInOut:pg,circOut:mg,backIn:cf,backInOut:dg,backOut:fg,anticipate:hg},Tv=a=>typeof a=="string",B0=a=>{if(yg(a)){of(a.length===4);const[s,r,l,c]=a;return el(s,r,l,c)}else if(Tv(a))return Sv[a];return a},xr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Mv(a){let s=new Set,r=new Set,l=!1,c=!1;const h=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function p(y){h.has(y)&&(x.schedule(y),a()),y(f)}const x={schedule:(y,b=!1,S=!1)=>{const N=S&&l?s:r;return b&&h.add(y),N.add(y),y},cancel:y=>{r.delete(y),h.delete(y)},process:y=>{if(f=y,l){c=!0;return}l=!0;const b=s;s=r,r=b,s.forEach(p),s.clear(),l=!1,c&&(c=!1,x.process(y))}};return x}const Av=40;function xg(a,s){let r=!1,l=!0;const c={delta:0,timestamp:0,isProcessing:!1},h=()=>r=!0,f=xr.reduce((Q,J)=>(Q[J]=Mv(h),Q),{}),{setup:p,read:x,resolveKeyframes:y,preUpdate:b,update:S,preRender:T,render:N,postRender:D}=f,k=()=>{const Q=Ca.useManualTiming,J=Q?c.timestamp:performance.now();r=!1,Q||(c.delta=l?1e3/60:Math.max(Math.min(J-c.timestamp,Av),1)),c.timestamp=J,c.isProcessing=!0,p.process(c),x.process(c),y.process(c),b.process(c),S.process(c),T.process(c),N.process(c),D.process(c),c.isProcessing=!1,r&&s&&(l=!1,a(k))},U=()=>{r=!0,l=!0,c.isProcessing||a(k)};return{schedule:xr.reduce((Q,J)=>{const at=f[J];return Q[J]=(ft,Z=!1,G=!1)=>(r||U(),at.schedule(ft,Z,G)),Q},{}),cancel:Q=>{for(let J=0;J<xr.length;J++)f[xr[J]].cancel(Q)},state:c,steps:f}}const{schedule:te,cancel:Da,state:Ve,steps:dc}=xg(typeof requestAnimationFrame<"u"?requestAnimationFrame:bn,!0);let Mr;function Ev(){Mr=void 0}const ke={now:()=>(Mr===void 0&&ke.set(Ve.isProcessing||Ca.useManualTiming?Ve.timestamp:performance.now()),Mr),set:a=>{Mr=a,queueMicrotask(Ev)}},vg=a=>s=>typeof s=="string"&&s.startsWith(a),bg=vg("--"),wv=vg("var(--"),df=a=>wv(a)?jv.test(a.split("/*")[0].trim()):!1,jv=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function H0(a){return typeof a!="string"?!1:a.split("/*")[0].includes("var(--")}const Ji={test:a=>typeof a=="number",parse:parseFloat,transform:a=>a},Ws={...Ji,transform:a=>_n(0,1,a)},vr={...Ji,default:1},Zs=a=>Math.round(a*1e5)/1e5,hf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Nv(a){return a==null}const Cv=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mf=(a,s)=>r=>!!(typeof r=="string"&&Cv.test(r)&&r.startsWith(a)||s&&!Nv(r)&&Object.prototype.hasOwnProperty.call(r,s)),Sg=(a,s,r)=>l=>{if(typeof l!="string")return l;const[c,h,f,p]=l.match(hf);return{[a]:parseFloat(c),[s]:parseFloat(h),[r]:parseFloat(f),alpha:p!==void 0?parseFloat(p):1}},Dv=a=>_n(0,255,a),hc={...Ji,transform:a=>Math.round(Dv(a))},$a={test:mf("rgb","red"),parse:Sg("red","green","blue"),transform:({red:a,green:s,blue:r,alpha:l=1})=>"rgba("+hc.transform(a)+", "+hc.transform(s)+", "+hc.transform(r)+", "+Zs(Ws.transform(l))+")"};function Rv(a){let s="",r="",l="",c="";return a.length>5?(s=a.substring(1,3),r=a.substring(3,5),l=a.substring(5,7),c=a.substring(7,9)):(s=a.substring(1,2),r=a.substring(2,3),l=a.substring(3,4),c=a.substring(4,5),s+=s,r+=r,l+=l,c+=c),{red:parseInt(s,16),green:parseInt(r,16),blue:parseInt(l,16),alpha:c?parseInt(c,16)/255:1}}const Cc={test:mf("#"),parse:Rv,transform:$a.transform},nl=a=>({test:s=>typeof s=="string"&&s.endsWith(a)&&s.split(" ").length===1,parse:parseFloat,transform:s=>`${s}${a}`}),ta=nl("deg"),Vn=nl("%"),lt=nl("px"),zv=nl("vh"),Ov=nl("vw"),k0={...Vn,parse:a=>Vn.parse(a)/100,transform:a=>Vn.transform(a*100)},Gi={test:mf("hsl","hue"),parse:Sg("hue","saturation","lightness"),transform:({hue:a,saturation:s,lightness:r,alpha:l=1})=>"hsla("+Math.round(a)+", "+Vn.transform(Zs(s))+", "+Vn.transform(Zs(r))+", "+Zs(Ws.transform(l))+")"},ve={test:a=>$a.test(a)||Cc.test(a)||Gi.test(a),parse:a=>$a.test(a)?$a.parse(a):Gi.test(a)?Gi.parse(a):Cc.parse(a),transform:a=>typeof a=="string"?a:a.hasOwnProperty("red")?$a.transform(a):Gi.transform(a),getAnimatableNone:a=>{const s=ve.parse(a);return s.alpha=0,ve.transform(s)}},Vv=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function _v(a){var s,r;return isNaN(a)&&typeof a=="string"&&(((s=a.match(hf))==null?void 0:s.length)||0)+(((r=a.match(Vv))==null?void 0:r.length)||0)>0}const Tg="number",Mg="color",Lv="var",Uv="var(",q0="${}",Bv=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Zi(a){const s=a.toString(),r=[],l={color:[],number:[],var:[]},c=[];let h=0;const p=s.replace(Bv,x=>(ve.test(x)?(l.color.push(h),c.push(Mg),r.push(ve.parse(x))):x.startsWith(Uv)?(l.var.push(h),c.push(Lv),r.push(x)):(l.number.push(h),c.push(Tg),r.push(parseFloat(x))),++h,q0)).split(q0);return{values:r,split:p,indexes:l,types:c}}function Hv(a){return Zi(a).values}function Ag({split:a,types:s}){const r=a.length;return l=>{let c="";for(let h=0;h<r;h++)if(c+=a[h],l[h]!==void 0){const f=s[h];f===Tg?c+=Zs(l[h]):f===Mg?c+=ve.transform(l[h]):c+=l[h]}return c}}function kv(a){return Ag(Zi(a))}const qv=a=>typeof a=="number"?0:ve.test(a)?ve.getAnimatableNone(a):a,Gv=(a,s)=>typeof a=="number"?s!=null&&s.trim().endsWith("/")?a:0:qv(a);function Yv(a){const s=Zi(a);return Ag(s)(s.values.map((l,c)=>Gv(l,s.split[c])))}const jn={test:_v,parse:Hv,createTransformer:kv,getAnimatableNone:Yv};function mc(a,s,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?a+(s-a)*6*r:r<1/2?s:r<2/3?a+(s-a)*(2/3-r)*6:a}function Xv({hue:a,saturation:s,lightness:r,alpha:l}){a/=360,s/=100,r/=100;let c=0,h=0,f=0;if(!s)c=h=f=r;else{const p=r<.5?r*(1+s):r+s-r*s,x=2*r-p;c=mc(x,p,a+1/3),h=mc(x,p,a),f=mc(x,p,a-1/3)}return{red:Math.round(c*255),green:Math.round(h*255),blue:Math.round(f*255),alpha:l}}function zr(a,s){return r=>r>0?s:a}const It=(a,s,r)=>a+(s-a)*r,pc=(a,s,r)=>{const l=a*a,c=r*(s*s-l)+l;return c<0?0:Math.sqrt(c)},Kv=[Cc,$a,Gi],Zv=a=>Kv.find(s=>s.test(a));function G0(a){const s=Zv(a);if(!s)return!1;let r=s.parse(a);return s===Gi&&(r=Xv(r)),r}const Y0=(a,s)=>{const r=G0(a),l=G0(s);if(!r||!l)return zr(a,s);const c={...r};return h=>(c.red=pc(r.red,l.red,h),c.green=pc(r.green,l.green,h),c.blue=pc(r.blue,l.blue,h),c.alpha=It(r.alpha,l.alpha,h),$a.transform(c))},Dc=new Set(["none","hidden"]);function Qv(a,s){return Dc.has(a)?r=>r<=0?a:s:r=>r>=1?s:a}function Jv(a,s){return r=>It(a,s,r)}function pf(a){return typeof a=="number"?Jv:typeof a=="string"?df(a)?zr:ve.test(a)?Y0:Wv:Array.isArray(a)?Eg:typeof a=="object"?ve.test(a)?Y0:Pv:zr}function Eg(a,s){const r=[...a],l=r.length,c=a.map((h,f)=>pf(h)(h,s[f]));return h=>{for(let f=0;f<l;f++)r[f]=c[f](h);return r}}function Pv(a,s){const r={...a,...s},l={};for(const c in r)a[c]!==void 0&&s[c]!==void 0&&(l[c]=pf(a[c])(a[c],s[c]));return c=>{for(const h in l)r[h]=l[h](c);return r}}function Fv(a,s){const r=[],l={color:0,var:0,number:0};for(let c=0;c<s.values.length;c++){const h=s.types[c],f=a.indexes[h][l[h]],p=a.values[f]??0;r[c]=p,l[h]++}return r}const Wv=(a,s)=>{const r=jn.createTransformer(s),l=Zi(a),c=Zi(s);return l.indexes.var.length===c.indexes.var.length&&l.indexes.color.length===c.indexes.color.length&&l.indexes.number.length>=c.indexes.number.length?Dc.has(a)&&!c.values.length||Dc.has(s)&&!l.values.length?Qv(a,s):tl(Eg(Fv(l,c),c.values),r):zr(a,s)};function wg(a,s,r){return typeof a=="number"&&typeof s=="number"&&typeof r=="number"?It(a,s,r):pf(a)(a,s)}const $v=a=>{const s=({timestamp:r})=>a(r);return{start:(r=!0)=>te.update(s,r),stop:()=>Da(s),now:()=>Ve.isProcessing?Ve.timestamp:ke.now()}},jg=(a,s,r=10)=>{let l="";const c=Math.max(Math.round(s/r),2);for(let h=0;h<c;h++)l+=Math.round(a(h/(c-1))*1e4)/1e4+", ";return`linear(${l.substring(0,l.length-2)})`},Or=2e4;function gf(a){let s=0;const r=50;let l=a.next(s);for(;!l.done&&s<Or;)s+=r,l=a.next(s);return s>=Or?1/0:s}function Iv(a,s=100,r){const l=r({...a,keyframes:[0,s]}),c=Math.min(gf(l),Or);return{type:"keyframes",ease:h=>l.next(c*h).value/s,duration:vn(c)}}const oe={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Rc(a,s){return a*Math.sqrt(1-s*s)}const tb=12;function eb(a,s,r){let l=r;for(let c=1;c<tb;c++)l=l-a(l)/s(l);return l}const gc=.001;function nb({duration:a=oe.duration,bounce:s=oe.bounce,velocity:r=oe.velocity,mass:l=oe.mass}){let c,h,f=1-s;f=_n(oe.minDamping,oe.maxDamping,f),a=_n(oe.minDuration,oe.maxDuration,vn(a)),f<1?(c=y=>{const b=y*f,S=b*a,T=b-r,N=Rc(y,f),D=Math.exp(-S);return gc-T/N*D},h=y=>{const S=y*f*a,T=S*r+r,N=Math.pow(f,2)*Math.pow(y,2)*a,D=Math.exp(-S),k=Rc(Math.pow(y,2),f);return(-c(y)+gc>0?-1:1)*((T-N)*D)/k}):(c=y=>{const b=Math.exp(-y*a),S=(y-r)*a+1;return-gc+b*S},h=y=>{const b=Math.exp(-y*a),S=(r-y)*(a*a);return b*S});const p=5/a,x=eb(c,h,p);if(a=rn(a),isNaN(x))return{stiffness:oe.stiffness,damping:oe.damping,duration:a};{const y=Math.pow(x,2)*l;return{stiffness:y,damping:f*2*Math.sqrt(l*y),duration:a}}}const ab=["duration","bounce"],ib=["stiffness","damping","mass"];function X0(a,s){return s.some(r=>a[r]!==void 0)}function sb(a){let s={velocity:oe.velocity,stiffness:oe.stiffness,damping:oe.damping,mass:oe.mass,isResolvedFromDuration:!1,...a};if(!X0(a,ib)&&X0(a,ab))if(s.velocity=0,a.visualDuration){const r=a.visualDuration,l=2*Math.PI/(r*1.2),c=l*l,h=2*_n(.05,1,1-(a.bounce||0))*Math.sqrt(c);s={...s,mass:oe.mass,stiffness:c,damping:h}}else{const r=nb({...a,velocity:0});s={...s,...r,mass:oe.mass},s.isResolvedFromDuration=!0}return s}function Vr(a=oe.visualDuration,s=oe.bounce){const r=typeof a!="object"?{visualDuration:a,keyframes:[0,1],bounce:s}:a;let{restSpeed:l,restDelta:c}=r;const h=r.keyframes[0],f=r.keyframes[r.keyframes.length-1],p={done:!1,value:h},{stiffness:x,damping:y,mass:b,duration:S,velocity:T,isResolvedFromDuration:N}=sb({...r,velocity:-vn(r.velocity||0)}),D=T||0,k=y/(2*Math.sqrt(x*b)),U=f-h,K=vn(Math.sqrt(x/b)),P=Math.abs(U)<5;l||(l=P?oe.restSpeed.granular:oe.restSpeed.default),c||(c=P?oe.restDelta.granular:oe.restDelta.default);let Q,J,at,ft,Z,G;if(k<1)at=Rc(K,k),ft=(D+k*K*U)/at,Q=it=>{const xt=Math.exp(-k*K*it);return f-xt*(ft*Math.sin(at*it)+U*Math.cos(at*it))},Z=k*K*ft+U*at,G=k*K*U-ft*at,J=it=>Math.exp(-k*K*it)*(Z*Math.sin(at*it)+G*Math.cos(at*it));else if(k===1){Q=xt=>f-Math.exp(-K*xt)*(U+(D+K*U)*xt);const it=D+K*U;J=xt=>Math.exp(-K*xt)*(K*it*xt-D)}else{const it=K*Math.sqrt(k*k-1);Q=Wt=>{const mt=Math.exp(-k*K*Wt),L=Math.min(it*Wt,300);return f-mt*((D+k*K*U)*Math.sinh(L)+it*U*Math.cosh(L))/it};const xt=(D+k*K*U)/it,gt=k*K*xt-U*it,Gt=k*K*U-xt*it;J=Wt=>{const mt=Math.exp(-k*K*Wt),L=Math.min(it*Wt,300);return mt*(gt*Math.sinh(L)+Gt*Math.cosh(L))}}const rt={calculatedDuration:N&&S||null,velocity:it=>rn(J(it)),next:it=>{if(!N&&k<1){const gt=Math.exp(-k*K*it),Gt=Math.sin(at*it),Wt=Math.cos(at*it),mt=f-gt*(ft*Gt+U*Wt),L=rn(gt*(Z*Gt+G*Wt));return p.done=Math.abs(L)<=l&&Math.abs(f-mt)<=c,p.value=p.done?f:mt,p}const xt=Q(it);if(N)p.done=it>=S;else{const gt=rn(J(it));p.done=Math.abs(gt)<=l&&Math.abs(f-xt)<=c}return p.value=p.done?f:xt,p},toString:()=>{const it=Math.min(gf(rt),Or),xt=jg(gt=>rt.next(it*gt).value,it,30);return it+"ms "+xt},toTransition:()=>{}};return rt}Vr.applyToOptions=a=>{const s=Iv(a,100,Vr);return a.ease=s.ease,a.duration=rn(s.duration),a.type="keyframes",a};const lb=5;function Ng(a,s,r){const l=Math.max(s-lb,0);return rg(r-a(l),s-l)}function zc({keyframes:a,velocity:s=0,power:r=.8,timeConstant:l=325,bounceDamping:c=10,bounceStiffness:h=500,modifyTarget:f,min:p,max:x,restDelta:y=.5,restSpeed:b}){const S=a[0],T={done:!1,value:S},N=G=>p!==void 0&&G<p||x!==void 0&&G>x,D=G=>p===void 0?x:x===void 0||Math.abs(p-G)<Math.abs(x-G)?p:x;let k=r*s;const U=S+k,K=f===void 0?U:f(U);K!==U&&(k=K-S);const P=G=>-k*Math.exp(-G/l),Q=G=>K+P(G),J=G=>{const rt=P(G),it=Q(G);T.done=Math.abs(rt)<=y,T.value=T.done?K:it};let at,ft;const Z=G=>{N(T.value)&&(at=G,ft=Vr({keyframes:[T.value,D(T.value)],velocity:Ng(Q,G,T.value),damping:c,stiffness:h,restDelta:y,restSpeed:b}))};return Z(0),{calculatedDuration:null,next:G=>{let rt=!1;return!ft&&at===void 0&&(rt=!0,J(G),Z(G)),at!==void 0&&G>=at?ft.next(G-at):(!rt&&J(G),T)}}}function rb(a,s,r){const l=[],c=r||Ca.mix||wg,h=a.length-1;for(let f=0;f<h;f++){let p=c(a[f],a[f+1]);if(s){const x=Array.isArray(s)?s[f]||bn:s;p=tl(x,p)}l.push(p)}return l}function ob(a,s,{clamp:r=!0,ease:l,mixer:c}={}){const h=a.length;if(of(h===s.length),h===1)return()=>s[0];if(h===2&&s[0]===s[1])return()=>s[1];const f=a[0]===a[1];a[0]>a[h-1]&&(a=[...a].reverse(),s=[...s].reverse());const p=rb(s,l,c),x=p.length,y=b=>{if(f&&b<a[0])return s[0];let S=0;if(x>1)for(;S<a.length-2&&!(b<a[S+1]);S++);const T=Fs(a[S],a[S+1],b);return p[S](T)};return r?b=>y(_n(a[0],a[h-1],b)):y}function ub(a,s){const r=a[a.length-1];for(let l=1;l<=s;l++){const c=Fs(0,s,l);a.push(It(r,1,c))}}function cb(a){const s=[0];return ub(s,a.length-1),s}function fb(a,s){return a.map(r=>r*s)}function db(a,s){return a.map(()=>s||gg).splice(0,a.length-1)}function Qs({duration:a=300,keyframes:s,times:r,ease:l="easeInOut"}){const c=bv(l)?l.map(B0):B0(l),h={done:!1,value:s[0]},f=fb(r&&r.length===s.length?r:cb(s),a),p=ob(f,s,{ease:Array.isArray(c)?c:db(s,c)});return{calculatedDuration:a,next:x=>(h.value=p(x),h.done=x>=a,h)}}const hb=a=>a!==null;function Yr(a,{repeat:s,repeatType:r="loop"},l,c=1){const h=a.filter(hb),p=c<0||s&&r!=="loop"&&s%2===1?0:h.length-1;return!p||l===void 0?h[p]:l}const mb={decay:zc,inertia:zc,tween:Qs,keyframes:Qs,spring:Vr};function Cg(a){typeof a.type=="string"&&(a.type=mb[a.type])}class yf{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(s=>{this.resolve=s})}notifyFinished(){this.resolve()}then(s,r){return this.finished.then(s,r)}}const pb=a=>a/100;class _r extends yf{constructor(s){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var l,c;const{motionValue:r}=this.options;r&&r.updatedAt!==ke.now()&&this.tick(ke.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(c=(l=this.options).onStop)==null||c.call(l))},this.options=s,this.initAnimation(),this.play(),s.autoplay===!1&&this.pause()}initAnimation(){const{options:s}=this;Cg(s);const{type:r=Qs,repeat:l=0,repeatDelay:c=0,repeatType:h,velocity:f=0}=s;let{keyframes:p}=s;const x=r||Qs;x!==Qs&&typeof p[0]!="number"&&(this.mixKeyframes=tl(pb,wg(p[0],p[1])),p=[0,100]);const y=x({...s,keyframes:p});h==="mirror"&&(this.mirroredGenerator=x({...s,keyframes:[...p].reverse(),velocity:-f})),y.calculatedDuration===null&&(y.calculatedDuration=gf(y));const{calculatedDuration:b}=y;this.calculatedDuration=b,this.resolvedDuration=b+c,this.totalDuration=this.resolvedDuration*(l+1)-c,this.generator=y}updateTime(s){const r=Math.round(s-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(s,r=!1){const{generator:l,totalDuration:c,mixKeyframes:h,mirroredGenerator:f,resolvedDuration:p,calculatedDuration:x}=this;if(this.startTime===null)return l.next(0);const{delay:y=0,keyframes:b,repeat:S,repeatType:T,repeatDelay:N,type:D,onUpdate:k,finalKeyframe:U}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,s):this.speed<0&&(this.startTime=Math.min(s-c/this.speed,this.startTime)),r?this.currentTime=s:this.updateTime(s);const K=this.currentTime-y*(this.playbackSpeed>=0?1:-1),P=this.playbackSpeed>=0?K<0:K>c;this.currentTime=Math.max(K,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let Q=this.currentTime,J=l;if(S){const G=Math.min(this.currentTime,c)/p;let rt=Math.floor(G),it=G%1;!it&&G>=1&&(it=1),it===1&&rt--,rt=Math.min(rt,S+1),!!(rt%2)&&(T==="reverse"?(it=1-it,N&&(it-=N/p)):T==="mirror"&&(J=f)),Q=_n(0,1,it)*p}let at;P?(this.delayState.value=b[0],at=this.delayState):at=J.next(Q),h&&!P&&(at.value=h(at.value));let{done:ft}=at;!P&&x!==null&&(ft=this.playbackSpeed>=0?this.currentTime>=c:this.currentTime<=0);const Z=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&ft);return Z&&D!==zc&&(at.value=Yr(b,this.options,U,this.speed)),k&&k(at.value),Z&&this.finish(),at}then(s,r){return this.finished.then(s,r)}get duration(){return vn(this.calculatedDuration)}get iterationDuration(){const{delay:s=0}=this.options||{};return this.duration+vn(s)}get time(){return vn(this.currentTime)}set time(s){s=rn(s),this.currentTime=s,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=s:this.driver&&(this.startTime=this.driver.now()-s/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=s,this.tick(s))}getGeneratorVelocity(){const s=this.currentTime;if(s<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(s);const r=this.generator.next(s).value;return Ng(l=>this.generator.next(l).value,s,r)}get speed(){return this.playbackSpeed}set speed(s){const r=this.playbackSpeed!==s;r&&this.driver&&this.updateTime(ke.now()),this.playbackSpeed=s,r&&this.driver&&(this.time=vn(this.currentTime))}play(){var c,h;if(this.isStopped)return;const{driver:s=$v,startTime:r}=this.options;this.driver||(this.driver=s(f=>this.tick(f))),(h=(c=this.options).onPlay)==null||h.call(c);const l=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=l):this.holdTime!==null?this.startTime=l-this.holdTime:this.startTime||(this.startTime=r??l),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ke.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var s,r;this.notifyFinished(),this.teardown(),this.state="finished",(r=(s=this.options).onComplete)==null||r.call(s)}cancel(){var s,r;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(r=(s=this.options).onCancel)==null||r.call(s)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(s){return this.startTime=0,this.tick(s,!0)}attachTimeline(s){var r;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(r=this.driver)==null||r.stop(),s.observe(this)}}function gb(a){for(let s=1;s<a.length;s++)a[s]??(a[s]=a[s-1])}const Ia=a=>a*180/Math.PI,Oc=a=>{const s=Ia(Math.atan2(a[1],a[0]));return Vc(s)},yb={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:a=>(Math.abs(a[0])+Math.abs(a[3]))/2,rotate:Oc,rotateZ:Oc,skewX:a=>Ia(Math.atan(a[1])),skewY:a=>Ia(Math.atan(a[2])),skew:a=>(Math.abs(a[1])+Math.abs(a[2]))/2},Vc=a=>(a=a%360,a<0&&(a+=360),a),K0=Oc,Z0=a=>Math.sqrt(a[0]*a[0]+a[1]*a[1]),Q0=a=>Math.sqrt(a[4]*a[4]+a[5]*a[5]),xb={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Z0,scaleY:Q0,scale:a=>(Z0(a)+Q0(a))/2,rotateX:a=>Vc(Ia(Math.atan2(a[6],a[5]))),rotateY:a=>Vc(Ia(Math.atan2(-a[2],a[0]))),rotateZ:K0,rotate:K0,skewX:a=>Ia(Math.atan(a[4])),skewY:a=>Ia(Math.atan(a[1])),skew:a=>(Math.abs(a[1])+Math.abs(a[4]))/2};function _c(a){return a.includes("scale")?1:0}function Lc(a,s){if(!a||a==="none")return _c(s);const r=a.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let l,c;if(r)l=xb,c=r;else{const p=a.match(/^matrix\(([-\d.e\s,]+)\)$/u);l=yb,c=p}if(!c)return _c(s);const h=l[s],f=c[1].split(",").map(bb);return typeof h=="function"?h(f):f[h]}const vb=(a,s)=>{const{transform:r="none"}=getComputedStyle(a);return Lc(r,s)};function bb(a){return parseFloat(a.trim())}const Pi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Fi=new Set([...Pi,"pathRotation"]),J0=a=>a===Ji||a===lt,Sb=new Set(["x","y","z"]),Tb=Pi.filter(a=>!Sb.has(a));function Mb(a){const s=[];return Tb.forEach(r=>{const l=a.getValue(r);l!==void 0&&(s.push([r,l.get()]),l.set(r.startsWith("scale")?1:0))}),s}const Na={width:({x:a},{paddingLeft:s="0",paddingRight:r="0",boxSizing:l})=>{const c=a.max-a.min;return l==="border-box"?c:c-parseFloat(s)-parseFloat(r)},height:({y:a},{paddingTop:s="0",paddingBottom:r="0",boxSizing:l})=>{const c=a.max-a.min;return l==="border-box"?c:c-parseFloat(s)-parseFloat(r)},top:(a,{top:s})=>parseFloat(s),left:(a,{left:s})=>parseFloat(s),bottom:({y:a},{top:s})=>parseFloat(s)+(a.max-a.min),right:({x:a},{left:s})=>parseFloat(s)+(a.max-a.min),x:(a,{transform:s})=>Lc(s,"x"),y:(a,{transform:s})=>Lc(s,"y")};Na.translateX=Na.x;Na.translateY=Na.y;const ti=new Set;let Uc=!1,Bc=!1,Hc=!1;function Dg(){if(Bc){const a=Array.from(ti).filter(l=>l.needsMeasurement),s=new Set(a.map(l=>l.element)),r=new Map;s.forEach(l=>{const c=Mb(l);c.length&&(r.set(l,c),l.render())}),a.forEach(l=>l.measureInitialState()),s.forEach(l=>{l.render();const c=r.get(l);c&&c.forEach(([h,f])=>{var p;(p=l.getValue(h))==null||p.set(f)})}),a.forEach(l=>l.measureEndState()),a.forEach(l=>{l.suspendedScrollY!==void 0&&window.scrollTo(0,l.suspendedScrollY)})}Bc=!1,Uc=!1,ti.forEach(a=>a.complete(Hc)),ti.clear()}function Rg(){ti.forEach(a=>{a.readKeyframes(),a.needsMeasurement&&(Bc=!0)})}function Ab(){Hc=!0,Rg(),Dg(),Hc=!1}class xf{constructor(s,r,l,c,h,f=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...s],this.onComplete=r,this.name=l,this.motionValue=c,this.element=h,this.isAsync=f}scheduleResolve(){this.state="scheduled",this.isAsync?(ti.add(this),Uc||(Uc=!0,te.read(Rg),te.resolveKeyframes(Dg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:s,name:r,element:l,motionValue:c}=this;if(s[0]===null){const h=c==null?void 0:c.get(),f=s[s.length-1];if(h!==void 0)s[0]=h;else if(l&&r){const p=l.readValue(r,f);p!=null&&(s[0]=p)}s[0]===void 0&&(s[0]=f),c&&h===void 0&&c.set(s[0])}gb(s)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(s=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,s),ti.delete(this)}cancel(){this.state==="scheduled"&&(ti.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Eb=a=>a.startsWith("--");function zg(a,s,r){Eb(s)?a.style.setProperty(s,r):a.style[s]=r}const wb={};function Og(a,s){const r=lg(a);return()=>wb[s]??r()}const jb=Og(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Vg=Og(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ks=([a,s,r,l])=>`cubic-bezier(${a}, ${s}, ${r}, ${l})`,P0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ks([0,.65,.55,1]),circOut:Ks([.55,0,1,.45]),backIn:Ks([.31,.01,.66,-.59]),backOut:Ks([.33,1.53,.69,.99])};function _g(a,s){if(a)return typeof a=="function"?Vg()?jg(a,s):"ease-out":yg(a)?Ks(a):Array.isArray(a)?a.map(r=>_g(r,s)||P0.easeOut):P0[a]}function Nb(a,s,r,{delay:l=0,duration:c=300,repeat:h=0,repeatType:f="loop",ease:p="easeOut",times:x}={},y=void 0){const b={[s]:r};x&&(b.offset=x);const S=_g(p,c);Array.isArray(S)&&(b.easing=S);const T={delay:l,duration:c,easing:Array.isArray(S)?"linear":S,fill:"both",iterations:h+1,direction:f==="reverse"?"alternate":"normal"};return y&&(T.pseudoElement=y),a.animate(b,T)}function Lg(a){return typeof a=="function"&&"applyToOptions"in a}function Cb({type:a,...s}){return Lg(a)&&Vg()?a.applyToOptions(s):(s.duration??(s.duration=300),s.ease??(s.ease="easeOut"),s)}class Ug extends yf{constructor(s){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!s)return;const{element:r,name:l,keyframes:c,pseudoElement:h,allowFlatten:f=!1,finalKeyframe:p,onComplete:x}=s;this.isPseudoElement=!!h,this.allowFlatten=f,this.options=s,of(typeof s.type!="string");const y=Cb(s);this.animation=Nb(r,l,c,y,h),y.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!h){const b=Yr(c,this.options,p,this.speed);this.updateMotionValue&&this.updateMotionValue(b),zg(r,l,b),this.animation.cancel()}x==null||x(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var s,r;(r=(s=this.animation).finish)==null||r.call(s)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:s}=this;s==="idle"||s==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var r,l,c;const s=(r=this.options)==null?void 0:r.element;!this.isPseudoElement&&(s!=null&&s.isConnected)&&((c=(l=this.animation).commitStyles)==null||c.call(l))}get duration(){var r,l;const s=((l=(r=this.animation.effect)==null?void 0:r.getComputedTiming)==null?void 0:l.call(r).duration)||0;return vn(Number(s))}get iterationDuration(){const{delay:s=0}=this.options||{};return this.duration+vn(s)}get time(){return vn(Number(this.animation.currentTime)||0)}set time(s){const r=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=rn(s),r&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(s){s<0&&(this.finishedTime=null),this.animation.playbackRate=s}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(s){this.manualStartTime=this.animation.startTime=s}attachTimeline({timeline:s,rangeStart:r,rangeEnd:l,observe:c}){var h;return this.allowFlatten&&((h=this.animation.effect)==null||h.updateTiming({easing:"linear"})),this.animation.onfinish=null,s&&jb()?(this.animation.timeline=s,r&&(this.animation.rangeStart=r),l&&(this.animation.rangeEnd=l),bn):c(this)}}const Bg={anticipate:hg,backInOut:dg,circInOut:pg};function Db(a){return a in Bg}function Rb(a){typeof a.ease=="string"&&Db(a.ease)&&(a.ease=Bg[a.ease])}const yc=10;class zb extends Ug{constructor(s){Rb(s),Cg(s),super(s),s.startTime!==void 0&&s.autoplay!==!1&&(this.startTime=s.startTime),this.options=s}updateMotionValue(s){const{motionValue:r,onUpdate:l,onComplete:c,element:h,...f}=this.options;if(!r)return;if(s!==void 0){r.set(s);return}const p=new _r({...f,autoplay:!1}),x=Math.max(yc,ke.now()-this.startTime),y=_n(0,yc,x-yc),b=p.sample(x).value,{name:S}=this.options;h&&S&&zg(h,S,b),r.setWithVelocity(p.sample(Math.max(0,x-y)).value,b,y),p.stop()}}const F0=(a,s)=>s==="zIndex"?!1:!!(typeof a=="number"||Array.isArray(a)||typeof a=="string"&&(jn.test(a)||a==="0")&&!a.startsWith("url("));function Ob(a){const s=a[0];if(a.length===1)return!0;for(let r=0;r<a.length;r++)if(a[r]!==s)return!0}function Vb(a,s,r,l){const c=a[0];if(c===null)return!1;if(s==="display"||s==="visibility")return!0;const h=a[a.length-1],f=F0(c,s),p=F0(h,s);return!f||!p?!1:Ob(a)||(r==="spring"||Lg(r))&&l}function kc(a){a.duration=0,a.type="keyframes"}const Hg=new Set(["opacity","clipPath","filter","transform"]),_b=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Lb(a){for(let s=0;s<a.length;s++)if(typeof a[s]=="string"&&_b.test(a[s]))return!0;return!1}const Ub=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Bb=lg(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Hb(a){var S;const{motionValue:s,name:r,repeatDelay:l,repeatType:c,damping:h,type:f,keyframes:p}=a;if(!(((S=s==null?void 0:s.owner)==null?void 0:S.current)instanceof HTMLElement))return!1;const{onUpdate:y,transformTemplate:b}=s.owner.getProps();return Bb()&&r&&(Hg.has(r)||Ub.has(r)&&Lb(p))&&(r!=="transform"||!b)&&!y&&!l&&c!=="mirror"&&h!==0&&f!=="inertia"}const kb=40;class qb extends yf{constructor({autoplay:s=!0,delay:r=0,type:l="keyframes",repeat:c=0,repeatDelay:h=0,repeatType:f="loop",keyframes:p,name:x,motionValue:y,element:b,...S}){var D;super(),this.stop=()=>{var k,U;this._animation&&(this._animation.stop(),(k=this.stopTimeline)==null||k.call(this)),(U=this.keyframeResolver)==null||U.cancel()},this.createdAt=ke.now();const T={autoplay:s,delay:r,type:l,repeat:c,repeatDelay:h,repeatType:f,name:x,motionValue:y,element:b,...S},N=(b==null?void 0:b.KeyframeResolver)||xf;this.keyframeResolver=new N(p,(k,U,K)=>this.onKeyframesResolved(k,U,T,!K),x,y,b),(D=this.keyframeResolver)==null||D.scheduleResolve()}onKeyframesResolved(s,r,l,c){var K,P;this.keyframeResolver=void 0;const{name:h,type:f,velocity:p,delay:x,isHandoff:y,onUpdate:b}=l;this.resolvedAt=ke.now();let S=!0;Vb(s,h,f,p)||(S=!1,(Ca.instantAnimations||!x)&&(b==null||b(Yr(s,l,r))),s[0]=s[s.length-1],kc(l),l.repeat=0);const N={startTime:c?this.resolvedAt?this.resolvedAt-this.createdAt>kb?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...l,keyframes:s},D=S&&!y&&Hb(N),k=(P=(K=N.motionValue)==null?void 0:K.owner)==null?void 0:P.current;let U;if(D)try{U=new zb({...N,element:k})}catch{U=new _r(N)}else U=new _r(N);U.finished.then(()=>{this.notifyFinished()}).catch(bn),this.pendingTimeline&&(this.stopTimeline=U.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=U}get finished(){return this._animation?this.animation.finished:this._finished}then(s,r){return this.finished.finally(s).then(()=>{})}get animation(){var s;return this._animation||((s=this.keyframeResolver)==null||s.resume(),Ab()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(s){this.animation.time=s}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(s){this.animation.speed=s}get startTime(){return this.animation.startTime}attachTimeline(s){return this._animation?this.stopTimeline=this.animation.attachTimeline(s):this.pendingTimeline=s,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var s;this._animation&&this.animation.cancel(),(s=this.keyframeResolver)==null||s.cancel()}}function kg(a,s,r,l=0,c=1){const h=Array.from(a).sort((y,b)=>y.sortNodePosition(b)).indexOf(s),f=a.size,p=(f-1)*l;return typeof r=="function"?r(h,f):c===1?h*l:p-h*l}const W0=30,Gb=a=>!isNaN(parseFloat(a));class Yb{constructor(s,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=l=>{var h;const c=ke.now();if(this.updatedAt!==c&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(l),this.current!==this.prev&&((h=this.events.change)==null||h.notify(this.current),this.dependents))for(const f of this.dependents)f.dirty()},this.hasAnimated=!1,this.setCurrent(s),this.owner=r.owner}setCurrent(s){this.current=s,this.updatedAt=ke.now(),this.canTrackVelocity===null&&s!==void 0&&(this.canTrackVelocity=Gb(this.current))}setPrevFrameValue(s=this.current){this.prevFrameValue=s,this.prevUpdatedAt=this.updatedAt}onChange(s){return this.on("change",s)}on(s,r){this.events[s]||(this.events[s]=new uf);const l=this.events[s].add(r);return s==="change"?()=>{l(),te.read(()=>{this.events.change.getSize()||this.stop()})}:l}clearListeners(){for(const s in this.events)this.events[s].clear()}attach(s,r){this.passiveEffect=s,this.stopPassiveEffect=r}set(s){this.passiveEffect?this.passiveEffect(s,this.updateAndNotify):this.updateAndNotify(s)}setWithVelocity(s,r,l){this.set(r),this.prev=void 0,this.prevFrameValue=s,this.prevUpdatedAt=this.updatedAt-l}jump(s,r=!0){this.updateAndNotify(s),this.prev=s,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var s;(s=this.events.change)==null||s.notify(this.current)}addDependent(s){this.dependents||(this.dependents=new Set),this.dependents.add(s)}removeDependent(s){this.dependents&&this.dependents.delete(s)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const s=ke.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||s-this.updatedAt>W0)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,W0);return rg(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(s){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=s(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var s,r;(s=this.dependents)==null||s.clear(),(r=this.events.destroy)==null||r.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qi(a,s){return new Yb(a,s)}function qg(a,s){if(a!=null&&a.inherit&&s){const{inherit:r,...l}=a;return{...s,...l}}return a}function vf(a,s){const r=(a==null?void 0:a[s])??(a==null?void 0:a.default)??a;return r!==a?qg(r,a):r}const Xb={type:"spring",stiffness:500,damping:25,restSpeed:10},Kb=a=>({type:"spring",stiffness:550,damping:a===0?2*Math.sqrt(550):30,restSpeed:10}),Zb={type:"keyframes",duration:.8},Qb={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Jb=(a,{keyframes:s})=>s.length>2?Zb:Fi.has(a)?a.startsWith("scale")?Kb(s[1]):Xb:Qb,Pb=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Fb(a){for(const s in a)if(!Pb.has(s))return!0;return!1}const bf=(a,s,r,l={},c,h)=>f=>{const p=vf(l,a)||{},x=p.delay||l.delay||0;let{elapsed:y=0}=l;y=y-rn(x);const b={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:s.getVelocity(),...p,delay:-y,onUpdate:T=>{s.set(T),p.onUpdate&&p.onUpdate(T)},onComplete:()=>{f(),p.onComplete&&p.onComplete()},name:a,motionValue:s,element:h?void 0:c};Fb(p)||Object.assign(b,Jb(a,b)),b.duration&&(b.duration=rn(b.duration)),b.repeatDelay&&(b.repeatDelay=rn(b.repeatDelay)),b.from!==void 0&&(b.keyframes[0]=b.from);let S=!1;if((b.type===!1||b.duration===0&&!b.repeatDelay)&&(kc(b),b.delay===0&&(S=!0)),(Ca.instantAnimations||Ca.skipAnimations||c!=null&&c.shouldSkipAnimations||p.skipAnimations)&&(S=!0,kc(b),b.delay=0),b.allowFlatten=!p.type&&!p.ease,S&&!h&&s.get()!==void 0){const T=Yr(b.keyframes,p);if(T!==void 0){te.update(()=>{b.onUpdate(T),b.onComplete()});return}}return p.isSync?new _r(b):new qb(b)},Wb=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $b(a){const s=Wb.exec(a);if(!s)return[,];const[,r,l,c]=s;return[`--${r??l}`,c]}function Gg(a,s,r=1){const[l,c]=$b(a);if(!l)return;const h=window.getComputedStyle(s).getPropertyValue(l);if(h){const f=h.trim();return ag(f)?parseFloat(f):f}return df(c)?Gg(c,s,r+1):c}function $0(a){const s=[{},{}];return a==null||a.values.forEach((r,l)=>{s[0][l]=r.get(),s[1][l]=r.getVelocity()}),s}function Sf(a,s,r,l){if(typeof s=="function"){const[c,h]=$0(l);s=s(r!==void 0?r:a.custom,c,h)}if(typeof s=="string"&&(s=a.variants&&a.variants[s]),typeof s=="function"){const[c,h]=$0(l);s=s(r!==void 0?r:a.custom,c,h)}return s}function ei(a,s,r){const l=a.getProps();return Sf(l,s,r!==void 0?r:l.custom,a)}const Yg=new Set(["width","height","top","left","right","bottom",...Pi]),qc=a=>Array.isArray(a);function Ib(a,s,r){a.hasValue(s)?a.getValue(s).set(r):a.addValue(s,Qi(r))}function t2(a){return qc(a)?a[a.length-1]||0:a}function e2(a,s){const r=ei(a,s);let{transitionEnd:l={},transition:c={},...h}=r||{};h={...h,...l};for(const f in h){const p=t2(h[f]);Ib(a,f,p)}}const _e=a=>!!(a&&a.getVelocity);function n2(a){return!!(_e(a)&&a.add)}function Gc(a,s){const r=a.getValue("willChange");if(n2(r))return r.add(s);if(!r&&Ca.WillChange){const l=new Ca.WillChange("auto");a.addValue("willChange",l),l.add(s)}}function Tf(a){return a.replace(/([A-Z])/g,s=>`-${s.toLowerCase()}`)}const a2="framerAppearId",Xg="data-"+Tf(a2);function Kg(a){return a.props[Xg]}function i2({protectedKeys:a,needsAnimating:s},r){const l=a.hasOwnProperty(r)&&s[r]!==!0;return s[r]=!1,l}function Zg(a,s,{delay:r=0,transitionOverride:l,type:c}={}){let{transition:h,transitionEnd:f,...p}=s;const x=a.getDefaultTransition();h=h?qg(h,x):x;const y=h==null?void 0:h.reduceMotion,b=h==null?void 0:h.skipAnimations;l&&(h=l);const S=[],T=c&&a.animationState&&a.animationState.getState()[c],N=h==null?void 0:h.path;N&&N.animateVisualElement(a,p,h,r,S);for(const D in p){const k=a.getValue(D,a.latestValues[D]??null),U=p[D];if(U===void 0||T&&i2(T,D))continue;const K={delay:r,...vf(h||{},D)};b&&(K.skipAnimations=!0);const P=k.get();if(P!==void 0&&!k.isAnimating()&&!Array.isArray(U)&&U===P&&!K.velocity){te.update(()=>k.set(U));continue}let Q=!1;if(window.MotionHandoffAnimation){const ft=Kg(a);if(ft){const Z=window.MotionHandoffAnimation(ft,D,te);Z!==null&&(K.startTime=Z,Q=!0)}}Gc(a,D);const J=y??a.shouldReduceMotion;k.start(bf(D,k,U,J&&Yg.has(D)?{type:!1}:K,a,Q));const at=k.animation;at&&S.push(at)}if(f){const D=()=>te.update(()=>{f&&e2(a,f)});S.length?Promise.all(S).then(D):D()}return S}function Yc(a,s,r={}){var x;const l=ei(a,s,r.type==="exit"?(x=a.presenceContext)==null?void 0:x.custom:void 0);let{transition:c=a.getDefaultTransition()||{}}=l||{};r.transitionOverride&&(c=r.transitionOverride);const h=l?()=>Promise.all(Zg(a,l,r)):()=>Promise.resolve(),f=a.variantChildren&&a.variantChildren.size?(y=0)=>{const{delayChildren:b=0,staggerChildren:S,staggerDirection:T}=c;return s2(a,s,y,b,S,T,r)}:()=>Promise.resolve(),{when:p}=c;if(p){const[y,b]=p==="beforeChildren"?[h,f]:[f,h];return y().then(()=>b())}else return Promise.all([h(),f(r.delay)])}function s2(a,s,r=0,l=0,c=0,h=1,f){const p=[];for(const x of a.variantChildren)x.notify("AnimationStart",s),p.push(Yc(x,s,{...f,delay:r+(typeof l=="function"?0:l)+kg(a.variantChildren,x,l,c,h)}).then(()=>x.notify("AnimationComplete",s)));return Promise.all(p)}function l2(a,s,r={}){a.notify("AnimationStart",s);let l;if(Array.isArray(s)){const c=s.map(h=>Yc(a,h,r));l=Promise.all(c)}else if(typeof s=="string")l=Yc(a,s,r);else{const c=typeof s=="function"?ei(a,s,r.custom):s;l=Promise.all(Zg(a,c,r))}return l.then(()=>{a.notify("AnimationComplete",s)})}const r2={test:a=>a==="auto",parse:a=>a},Qg=a=>s=>s.test(a),Jg=[Ji,lt,Vn,ta,Ov,zv,r2],I0=a=>Jg.find(Qg(a));function o2(a){return typeof a=="number"?a===0:a!==null?a==="none"||a==="0"||sg(a):!0}const u2=new Set(["brightness","contrast","saturate","opacity"]);function c2(a){const[s,r]=a.slice(0,-1).split("(");if(s==="drop-shadow")return a;const[l]=r.match(hf)||[];if(!l)return a;const c=r.replace(l,"");let h=u2.has(s)?1:0;return l!==r&&(h*=100),s+"("+h+c+")"}const f2=/\b([a-z-]*)\(.*?\)/gu,Xc={...jn,getAnimatableNone:a=>{const s=a.match(f2);return s?s.map(c2).join(" "):a}},Kc={...jn,getAnimatableNone:a=>{const s=jn.parse(a);return jn.createTransformer(a)(s.map(l=>typeof l=="number"?0:typeof l=="object"?{...l,alpha:1}:l))}},tp={...Ji,transform:Math.round},d2={rotate:ta,pathRotation:ta,rotateX:ta,rotateY:ta,rotateZ:ta,scale:vr,scaleX:vr,scaleY:vr,scaleZ:vr,skew:ta,skewX:ta,skewY:ta,distance:lt,translateX:lt,translateY:lt,translateZ:lt,x:lt,y:lt,z:lt,perspective:lt,transformPerspective:lt,opacity:Ws,originX:k0,originY:k0,originZ:lt},Lr={borderWidth:lt,borderTopWidth:lt,borderRightWidth:lt,borderBottomWidth:lt,borderLeftWidth:lt,borderRadius:lt,borderTopLeftRadius:lt,borderTopRightRadius:lt,borderBottomRightRadius:lt,borderBottomLeftRadius:lt,width:lt,maxWidth:lt,height:lt,maxHeight:lt,top:lt,right:lt,bottom:lt,left:lt,inset:lt,insetBlock:lt,insetBlockStart:lt,insetBlockEnd:lt,insetInline:lt,insetInlineStart:lt,insetInlineEnd:lt,padding:lt,paddingTop:lt,paddingRight:lt,paddingBottom:lt,paddingLeft:lt,paddingBlock:lt,paddingBlockStart:lt,paddingBlockEnd:lt,paddingInline:lt,paddingInlineStart:lt,paddingInlineEnd:lt,margin:lt,marginTop:lt,marginRight:lt,marginBottom:lt,marginLeft:lt,marginBlock:lt,marginBlockStart:lt,marginBlockEnd:lt,marginInline:lt,marginInlineStart:lt,marginInlineEnd:lt,fontSize:lt,backgroundPositionX:lt,backgroundPositionY:lt,...d2,zIndex:tp,fillOpacity:Ws,strokeOpacity:Ws,numOctaves:tp},h2={...Lr,color:ve,backgroundColor:ve,outlineColor:ve,fill:ve,stroke:ve,borderColor:ve,borderTopColor:ve,borderRightColor:ve,borderBottomColor:ve,borderLeftColor:ve,filter:Xc,WebkitFilter:Xc,mask:Kc,WebkitMask:Kc},Pg=a=>h2[a],m2=new Set([Xc,Kc]);function Fg(a,s){let r=Pg(a);return m2.has(r)||(r=jn),r.getAnimatableNone?r.getAnimatableNone(s):void 0}const p2=new Set(["auto","none","0"]);function g2(a,s,r){let l=0,c;for(;l<a.length&&!c;){const h=a[l];typeof h=="string"&&!p2.has(h)&&Zi(h).values.length&&(c=a[l]),l++}if(c&&r)for(const h of s)a[h]=Fg(r,c)}class y2 extends xf{constructor(s,r,l,c,h){super(s,r,l,c,h,!0)}readKeyframes(){const{unresolvedKeyframes:s,element:r,name:l}=this;if(!r||!r.current)return;super.readKeyframes();for(let b=0;b<s.length;b++){let S=s[b];if(typeof S=="string"&&(S=S.trim(),df(S))){const T=Gg(S,r.current);T!==void 0&&(s[b]=T),b===s.length-1&&(this.finalKeyframe=S)}}if(this.resolveNoneKeyframes(),!Yg.has(l)||s.length!==2)return;const[c,h]=s,f=I0(c),p=I0(h),x=H0(c),y=H0(h);if(x!==y&&Na[l]){this.needsMeasurement=!0;return}if(f!==p)if(J0(f)&&J0(p))for(let b=0;b<s.length;b++){const S=s[b];typeof S=="string"&&(s[b]=parseFloat(S))}else Na[l]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:s,name:r}=this,l=[];for(let c=0;c<s.length;c++)(s[c]===null||o2(s[c]))&&l.push(c);l.length&&g2(s,l,r)}measureInitialState(){const{element:s,unresolvedKeyframes:r,name:l}=this;if(!s||!s.current)return;l==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Na[l](s.measureViewportBox(),window.getComputedStyle(s.current)),r[0]=this.measuredOrigin;const c=r[r.length-1];c!==void 0&&s.getValue(l,c).jump(c,!1)}measureEndState(){var p;const{element:s,name:r,unresolvedKeyframes:l}=this;if(!s||!s.current)return;const c=s.getValue(r);c&&c.jump(this.measuredOrigin,!1);const h=l.length-1,f=l[h];l[h]=Na[r](s.measureViewportBox(),window.getComputedStyle(s.current)),f!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=f),(p=this.removedTransforms)!=null&&p.length&&this.removedTransforms.forEach(([x,y])=>{s.getValue(x).set(y)}),this.resolveNoneKeyframes()}}function Wg(a,s,r){if(a==null)return[];if(a instanceof EventTarget)return[a];if(typeof a=="string"){let l=document;const c=(r==null?void 0:r[a])??l.querySelectorAll(a);return c?Array.from(c):[]}return Array.from(a).filter(l=>l!=null)}const Zc=(a,s)=>s&&typeof a=="number"?s.transform(a):a;function Ar(a){return ig(a)&&"offsetHeight"in a&&!("ownerSVGElement"in a)}const{schedule:Mf}=xg(queueMicrotask,!1),wn={x:!1,y:!1};function $g(){return wn.x||wn.y}function x2(a){return a==="x"||a==="y"?wn[a]?null:(wn[a]=!0,()=>{wn[a]=!1}):wn.x||wn.y?null:(wn.x=wn.y=!0,()=>{wn.x=wn.y=!1})}function Ig(a,s){const r=Wg(a),l=new AbortController,c={passive:!0,...s,signal:l.signal};return[r,c,()=>l.abort()]}function v2(a){return!(a.pointerType==="touch"||$g())}function b2(a,s,r={}){const[l,c,h]=Ig(a,r);return l.forEach(f=>{let p=!1,x=!1,y;const b=()=>{f.removeEventListener("pointerleave",D)},S=U=>{y&&(y(U),y=void 0),b()},T=U=>{p=!1,window.removeEventListener("pointerup",T),window.removeEventListener("pointercancel",T),x&&(x=!1,S(U))},N=()=>{p=!0,window.addEventListener("pointerup",T,c),window.addEventListener("pointercancel",T,c)},D=U=>{if(U.pointerType!=="touch"){if(p){x=!0;return}S(U)}},k=U=>{if(!v2(U))return;x=!1;const K=s(f,U);typeof K=="function"&&(y=K,f.addEventListener("pointerleave",D,c))};f.addEventListener("pointerenter",k,c),f.addEventListener("pointerdown",N,c)}),h}const ty=(a,s)=>s?a===s?!0:ty(a,s.parentElement):!1,Af=a=>a.pointerType==="mouse"?typeof a.button!="number"||a.button<=0:a.isPrimary!==!1,S2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function T2(a){return S2.has(a.tagName)||a.isContentEditable===!0}const M2=new Set(["INPUT","SELECT","TEXTAREA"]);function A2(a){return M2.has(a.tagName)||a.isContentEditable===!0}const Er=new WeakSet;function ep(a){return s=>{s.key==="Enter"&&a(s)}}function xc(a,s){a.dispatchEvent(new PointerEvent("pointer"+s,{isPrimary:!0,bubbles:!0}))}const E2=(a,s)=>{const r=a.currentTarget;if(!r)return;const l=ep(()=>{if(Er.has(r))return;xc(r,"down");const c=ep(()=>{xc(r,"up")}),h=()=>xc(r,"cancel");r.addEventListener("keyup",c,s),r.addEventListener("blur",h,s)});r.addEventListener("keydown",l,s),r.addEventListener("blur",()=>r.removeEventListener("keydown",l),s)};function np(a){return Af(a)&&!$g()}const ap=new WeakSet;function w2(a,s,r={}){const[l,c,h]=Ig(a,r),f=p=>{const x=p.currentTarget;if(!np(p)||ap.has(p))return;Er.add(x),r.stopPropagation&&ap.add(p);const y=s(x,p),b={...c,capture:!0},S=(D,k)=>{window.removeEventListener("pointerup",T,b),window.removeEventListener("pointercancel",N,b),Er.has(x)&&Er.delete(x),np(D)&&typeof y=="function"&&y(D,{success:k})},T=D=>{S(D,x===window||x===document||r.useGlobalTarget||ty(x,D.target))},N=D=>{S(D,!1)};window.addEventListener("pointerup",T,b),window.addEventListener("pointercancel",N,b)};return l.forEach(p=>{(r.useGlobalTarget?window:p).addEventListener("pointerdown",f,c),Ar(p)&&(p.addEventListener("focus",y=>E2(y,c)),!T2(p)&&!p.hasAttribute("tabindex")&&(p.tabIndex=0))}),h}function Ef(a){return ig(a)&&"ownerSVGElement"in a}const wr=new WeakMap;let ja;const ey=(a,s,r)=>(l,c)=>c&&c[0]?c[0][a+"Size"]:Ef(l)&&"getBBox"in l?l.getBBox()[s]:l[r],j2=ey("inline","width","offsetWidth"),N2=ey("block","height","offsetHeight");function C2({target:a,borderBoxSize:s}){var r;(r=wr.get(a))==null||r.forEach(l=>{l(a,{get width(){return j2(a,s)},get height(){return N2(a,s)}})})}function D2(a){a.forEach(C2)}function R2(){typeof ResizeObserver>"u"||(ja=new ResizeObserver(D2))}function z2(a,s){ja||R2();const r=Wg(a);return r.forEach(l=>{let c=wr.get(l);c||(c=new Set,wr.set(l,c)),c.add(s),ja==null||ja.observe(l)}),()=>{r.forEach(l=>{const c=wr.get(l);c==null||c.delete(s),c!=null&&c.size||ja==null||ja.unobserve(l)})}}const jr=new Set;let Yi;function O2(){Yi=()=>{const a={get width(){return window.innerWidth},get height(){return window.innerHeight}};jr.forEach(s=>s(a))},window.addEventListener("resize",Yi)}function V2(a){return jr.add(a),Yi||O2(),()=>{jr.delete(a),!jr.size&&typeof Yi=="function"&&(window.removeEventListener("resize",Yi),Yi=void 0)}}function ip(a,s){return typeof a=="function"?V2(a):z2(a,s)}function _2(a){return Ef(a)&&a.tagName==="svg"}const L2=[...Jg,ve,jn],U2=a=>L2.find(Qg(a)),sp=()=>({translate:0,scale:1,origin:0,originPoint:0}),Xi=()=>({x:sp(),y:sp()}),lp=()=>({min:0,max:0}),Se=()=>({x:lp(),y:lp()}),B2=new WeakMap;function Xr(a){return a!==null&&typeof a=="object"&&typeof a.start=="function"}function $s(a){return typeof a=="string"||Array.isArray(a)}const wf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],jf=["initial",...wf];function Kr(a){return Xr(a.animate)||jf.some(s=>$s(a[s]))}function ny(a){return!!(Kr(a)||a.variants)}function H2(a,s,r){for(const l in s){const c=s[l],h=r[l];if(_e(c))a.addValue(l,c);else if(_e(h))a.addValue(l,Qi(c,{owner:a}));else if(h!==c)if(a.hasValue(l)){const f=a.getValue(l);f.liveStyle===!0?f.jump(c):f.hasAnimated||f.set(c)}else{const f=a.getStaticValue(l);a.addValue(l,Qi(f!==void 0?f:c,{owner:a}))}}for(const l in r)s[l]===void 0&&a.removeValue(l);return s}const Qc={current:null},ay={current:!1},k2=typeof window<"u";function q2(){if(ay.current=!0,!!k2)if(window.matchMedia){const a=window.matchMedia("(prefers-reduced-motion)"),s=()=>Qc.current=a.matches;a.addEventListener("change",s),s()}else Qc.current=!1}const rp=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ur={};function iy(a){Ur=a}function G2(){return Ur}class Y2{scrapeMotionValuesFromProps(s,r,l){return{}}constructor({parent:s,props:r,presenceContext:l,reducedMotionConfig:c,skipAnimations:h,blockInitialAnimation:f,visualState:p},x={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=xf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const N=ke.now();this.renderScheduledAt<N&&(this.renderScheduledAt=N,te.render(this.render,!1,!0))};const{latestValues:y,renderState:b}=p;this.latestValues=y,this.baseTarget={...y},this.initialValues=r.initial?{...y}:{},this.renderState=b,this.parent=s,this.props=r,this.presenceContext=l,this.depth=s?s.depth+1:0,this.reducedMotionConfig=c,this.skipAnimationsConfig=h,this.options=x,this.blockInitialAnimation=!!f,this.isControllingVariants=Kr(r),this.isVariantNode=ny(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(s&&s.current);const{willChange:S,...T}=this.scrapeMotionValuesFromProps(r,{},this);for(const N in T){const D=T[N];y[N]!==void 0&&_e(D)&&D.set(y[N])}}mount(s){var r,l;if(this.hasBeenMounted)for(const c in this.initialValues)(r=this.values.get(c))==null||r.jump(this.initialValues[c]),this.latestValues[c]=this.initialValues[c];this.current=s,B2.set(s,this),this.projection&&!this.projection.instance&&this.projection.mount(s),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((c,h)=>this.bindToMotionValue(h,c)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(ay.current||q2(),this.shouldReduceMotion=Qc.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(l=this.parent)==null||l.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var s;this.projection&&this.projection.unmount(),Da(this.notifyUpdate),Da(this.render),this.valueSubscriptions.forEach(r=>r()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(s=this.parent)==null||s.removeChild(this);for(const r in this.events)this.events[r].clear();for(const r in this.features){const l=this.features[r];l&&(l.unmount(),l.isMounted=!1)}this.current=null}addChild(s){this.children.add(s),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(s)}removeChild(s){this.children.delete(s),this.enteringChildren&&this.enteringChildren.delete(s)}bindToMotionValue(s,r){if(this.valueSubscriptions.has(s)&&this.valueSubscriptions.get(s)(),r.accelerate&&Hg.has(s)&&this.current instanceof HTMLElement){const{factory:f,keyframes:p,times:x,ease:y,duration:b}=r.accelerate,S=new Ug({element:this.current,name:s,keyframes:p,times:x,ease:y,duration:rn(b)}),T=f(S);this.valueSubscriptions.set(s,()=>{T(),S.cancel()});return}const l=Fi.has(s);l&&this.onBindTransform&&this.onBindTransform();const c=r.on("change",f=>{this.latestValues[s]=f,this.props.onUpdate&&te.preRender(this.notifyUpdate),l&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let h;typeof window<"u"&&window.MotionCheckAppearSync&&(h=window.MotionCheckAppearSync(this,s,r)),this.valueSubscriptions.set(s,()=>{c(),h&&h()})}sortNodePosition(s){return!this.current||!this.sortInstanceNodePosition||this.type!==s.type?0:this.sortInstanceNodePosition(this.current,s.current)}updateFeatures(){let s="animation";for(s in Ur){const r=Ur[s];if(!r)continue;const{isEnabled:l,Feature:c}=r;if(!this.features[s]&&c&&l(this.props)&&(this.features[s]=new c(this)),this.features[s]){const h=this.features[s];h.isMounted?h.update():(h.mount(),h.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Se()}getStaticValue(s){return this.latestValues[s]}setStaticValue(s,r){this.latestValues[s]=r}update(s,r){(s.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=s,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let l=0;l<rp.length;l++){const c=rp[l];this.propEventSubscriptions[c]&&(this.propEventSubscriptions[c](),delete this.propEventSubscriptions[c]);const h="on"+c,f=s[h];f&&(this.propEventSubscriptions[c]=this.on(c,f))}this.prevMotionValues=H2(this,this.scrapeMotionValuesFromProps(s,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(s){return this.props.variants?this.props.variants[s]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(s){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(s),()=>r.variantChildren.delete(s)}addValue(s,r){const l=this.values.get(s);r!==l&&(l&&this.removeValue(s),this.bindToMotionValue(s,r),this.values.set(s,r),this.latestValues[s]=r.get())}removeValue(s){this.values.delete(s);const r=this.valueSubscriptions.get(s);r&&(r(),this.valueSubscriptions.delete(s)),delete this.latestValues[s],this.removeValueFromRenderState(s,this.renderState)}hasValue(s){return this.values.has(s)}getValue(s,r){if(this.props.values&&this.props.values[s])return this.props.values[s];let l=this.values.get(s);return l===void 0&&r!==void 0&&(l=Qi(r===null?void 0:r,{owner:this}),this.addValue(s,l)),l}readValue(s,r){let l=this.latestValues[s]!==void 0||!this.current?this.latestValues[s]:this.getBaseTargetFromProps(this.props,s)??this.readValueFromInstance(this.current,s,this.options);return l!=null&&(typeof l=="string"&&(ag(l)||sg(l))?l=parseFloat(l):!U2(l)&&jn.test(r)&&(l=Fg(s,r)),this.setBaseTarget(s,_e(l)?l.get():l)),_e(l)?l.get():l}setBaseTarget(s,r){this.baseTarget[s]=r}getBaseTarget(s){var h;const{initial:r}=this.props;let l;if(typeof r=="string"||typeof r=="object"){const f=Sf(this.props,r,(h=this.presenceContext)==null?void 0:h.custom);f&&(l=f[s])}if(r&&l!==void 0)return l;const c=this.getBaseTargetFromProps(this.props,s);return c!==void 0&&!_e(c)?c:this.initialValues[s]!==void 0&&l===void 0?void 0:this.baseTarget[s]}on(s,r){return this.events[s]||(this.events[s]=new uf),this.events[s].add(r)}notify(s,...r){this.events[s]&&this.events[s].notify(...r)}scheduleRenderMicrotask(){Mf.render(this.render)}}class sy extends Y2{constructor(){super(...arguments),this.KeyframeResolver=y2}sortInstanceNodePosition(s,r){return s.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(s,r){const l=s.style;return l?l[r]:void 0}removeValueFromRenderState(s,{vars:r,style:l}){delete r[s],delete l[s]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:s}=this.props;_e(s)&&(this.childSubscription=s.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}class Ra{constructor(s){this.isMounted=!1,this.node=s}update(){}}function ly({top:a,left:s,right:r,bottom:l}){return{x:{min:s,max:r},y:{min:a,max:l}}}function X2({x:a,y:s}){return{top:s.min,right:a.max,bottom:s.max,left:a.min}}function K2(a,s){if(!s)return a;const r=s({x:a.left,y:a.top}),l=s({x:a.right,y:a.bottom});return{top:r.y,left:r.x,bottom:l.y,right:l.x}}function vc(a){return a===void 0||a===1}function Jc({scale:a,scaleX:s,scaleY:r}){return!vc(a)||!vc(s)||!vc(r)}function Wa(a){return Jc(a)||ry(a)||a.z||a.rotate||a.rotateX||a.rotateY||a.skewX||a.skewY}function ry(a){return op(a.x)||op(a.y)}function op(a){return a&&a!=="0%"}function Br(a,s,r){const l=a-r,c=s*l;return r+c}function up(a,s,r,l,c){return c!==void 0&&(a=Br(a,c,l)),Br(a,r,l)+s}function Pc(a,s=0,r=1,l,c){a.min=up(a.min,s,r,l,c),a.max=up(a.max,s,r,l,c)}function oy(a,{x:s,y:r}){Pc(a.x,s.translate,s.scale,s.originPoint),Pc(a.y,r.translate,r.scale,r.originPoint)}const cp=.999999999999,fp=1.0000000000001;function Z2(a,s,r,l=!1){var p;const c=r.length;if(!c)return;s.x=s.y=1;let h,f;for(let x=0;x<c;x++){h=r[x],f=h.projectionDelta;const{visualElement:y}=h.options;y&&y.props.style&&y.props.style.display==="contents"||(l&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(On(a.x,-h.scroll.offset.x),On(a.y,-h.scroll.offset.y)),f&&(s.x*=f.x.scale,s.y*=f.y.scale,oy(a,f)),l&&Wa(h.latestValues)&&Nr(a,h.latestValues,(p=h.layout)==null?void 0:p.layoutBox))}s.x<fp&&s.x>cp&&(s.x=1),s.y<fp&&s.y>cp&&(s.y=1)}function On(a,s){a.min+=s,a.max+=s}function dp(a,s,r,l,c=.5){const h=It(a.min,a.max,c);Pc(a,s,r,h,l)}function hp(a,s){return typeof a=="string"?parseFloat(a)/100*(s.max-s.min):a}function Nr(a,s,r){const l=r??a;dp(a.x,hp(s.x,l.x),s.scaleX,s.scale,s.originX),dp(a.y,hp(s.y,l.y),s.scaleY,s.scale,s.originY)}function uy(a,s){return ly(K2(a.getBoundingClientRect(),s))}function Q2(a,s,r){const l=uy(a,r),{scroll:c}=s;return c&&(On(l.x,c.offset.x),On(l.y,c.offset.y)),l}const J2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},P2=Pi.length;function F2(a,s,r){let l="",c=!0;for(let f=0;f<P2;f++){const p=Pi[f],x=a[p];if(x===void 0)continue;let y=!0;if(typeof x=="number")y=x===(p.startsWith("scale")?1:0);else{const b=parseFloat(x);y=p.startsWith("scale")?b===1:b===0}if(!y||r){const b=Zc(x,Lr[p]);if(!y){c=!1;const S=J2[p]||p;l+=`${S}(${b}) `}r&&(s[p]=b)}}const h=a.pathRotation;return h&&(c=!1,l+=`rotate(${Zc(h,Lr.pathRotation)}) `),l=l.trim(),r?l=r(s,c?"":l):c&&(l="none"),l}function Nf(a,s,r){const{style:l,vars:c,transformOrigin:h}=a;let f=!1,p=!1;for(const x in s){const y=s[x];if(Fi.has(x)){f=!0;continue}else if(bg(x)){c[x]=y;continue}else{const b=Zc(y,Lr[x]);x.startsWith("origin")?(p=!0,h[x]=b):l[x]=b}}if(s.transform||(f||r?l.transform=F2(s,a.transform,r):l.transform&&(l.transform="none")),p){const{originX:x="50%",originY:y="50%",originZ:b=0}=h;l.transformOrigin=`${x} ${y} ${b}`}}function cy(a,{style:s,vars:r},l,c){const h=a.style;let f;for(f in s)h[f]=s[f];c==null||c.applyProjectionStyles(h,l);for(f in r)h.setProperty(f,r[f])}function mp(a,s){return s.max===s.min?0:a/(s.max-s.min)*100}const Xs={correct:(a,s)=>{if(!s.target)return a;if(typeof a=="string")if(lt.test(a))a=parseFloat(a);else return a;const r=mp(a,s.target.x),l=mp(a,s.target.y);return`${r}% ${l}%`}},W2={correct:(a,{treeScale:s,projectionDelta:r})=>{const l=a,c=jn.parse(a);if(c.length>5)return l;const h=jn.createTransformer(a),f=typeof c[0]!="number"?1:0,p=r.x.scale*s.x,x=r.y.scale*s.y;c[0+f]/=p,c[1+f]/=x;const y=It(p,x,.5);return typeof c[2+f]=="number"&&(c[2+f]/=y),typeof c[3+f]=="number"&&(c[3+f]/=y),h(c)}},Fc={borderRadius:{...Xs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Xs,borderTopRightRadius:Xs,borderBottomLeftRadius:Xs,borderBottomRightRadius:Xs,boxShadow:W2};function fy(a,{layout:s,layoutId:r}){return Fi.has(a)||a.startsWith("origin")||(s||r!==void 0)&&(!!Fc[a]||a==="opacity")}function Cf(a,s,r){var f;const l=a.style,c=s==null?void 0:s.style,h={};if(!l)return h;for(const p in l)(_e(l[p])||c&&_e(c[p])||fy(p,a)||((f=r==null?void 0:r.getValue(p))==null?void 0:f.liveStyle)!==void 0)&&(h[p]=l[p]);return h}function $2(a){return window.getComputedStyle(a)}class I2 extends sy{constructor(){super(...arguments),this.type="html",this.renderInstance=cy}readValueFromInstance(s,r){var l;if(Fi.has(r))return(l=this.projection)!=null&&l.isProjecting?_c(r):vb(s,r);{const c=$2(s),h=(bg(r)?c.getPropertyValue(r):c[r])||0;return typeof h=="string"?h.trim():h}}measureInstanceViewportBox(s,{transformPagePoint:r}){return uy(s,r)}build(s,r,l){Nf(s,r,l.transformTemplate)}scrapeMotionValuesFromProps(s,r,l){return Cf(s,r,l)}}const t5={offset:"stroke-dashoffset",array:"stroke-dasharray"},e5={offset:"strokeDashoffset",array:"strokeDasharray"};function n5(a,s,r=1,l=0,c=!0){a.pathLength=1;const h=c?t5:e5;a[h.offset]=`${-l}`,a[h.array]=`${s} ${r}`}const a5=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function dy(a,{attrX:s,attrY:r,attrScale:l,pathLength:c,pathSpacing:h=1,pathOffset:f=0,...p},x,y,b){if(Nf(a,p,y),x){a.style.viewBox&&(a.attrs.viewBox=a.style.viewBox);return}a.attrs=a.style,a.style={};const{attrs:S,style:T}=a;S.transform&&(T.transform=S.transform,delete S.transform),(T.transform||S.transformOrigin)&&(T.transformOrigin=S.transformOrigin??"50% 50%",delete S.transformOrigin),T.transform&&(T.transformBox=(b==null?void 0:b.transformBox)??"fill-box",delete S.transformBox);for(const N of a5)S[N]!==void 0&&(T[N]=S[N],delete S[N]);s!==void 0&&(S.x=s),r!==void 0&&(S.y=r),l!==void 0&&(S.scale=l),c!==void 0&&n5(S,c,h,f,!1)}const hy=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),my=a=>typeof a=="string"&&a.toLowerCase()==="svg";function i5(a,s,r,l){cy(a,s,void 0,l);for(const c in s.attrs)a.setAttribute(hy.has(c)?c:Tf(c),s.attrs[c])}function py(a,s,r){const l=Cf(a,s,r);for(const c in a)if(_e(a[c])||_e(s[c])){const h=Pi.indexOf(c)!==-1?"attr"+c.charAt(0).toUpperCase()+c.substring(1):c;l[h]=a[c]}return l}class s5 extends sy{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Se}getBaseTargetFromProps(s,r){return s[r]}readValueFromInstance(s,r){if(Fi.has(r)){const l=Pg(r);return l&&l.default||0}return r=hy.has(r)?r:Tf(r),s.getAttribute(r)}scrapeMotionValuesFromProps(s,r,l){return py(s,r,l)}build(s,r,l){dy(s,r,this.isSVGTag,l.transformTemplate,l.style)}renderInstance(s,r,l,c){i5(s,r,l,c)}mount(s){this.isSVGTag=my(s.tagName),super.mount(s)}}const l5=jf.length;function gy(a){if(!a)return;if(!a.isControllingVariants){const r=a.parent?gy(a.parent)||{}:{};return a.props.initial!==void 0&&(r.initial=a.props.initial),r}const s={};for(let r=0;r<l5;r++){const l=jf[r],c=a.props[l];($s(c)||c===!1)&&(s[l]=c)}return s}function yy(a,s){if(!Array.isArray(s))return!1;const r=s.length;if(r!==a.length)return!1;for(let l=0;l<r;l++)if(s[l]!==a[l])return!1;return!0}const r5=[...wf].reverse(),o5=wf.length;function u5(a){return s=>Promise.all(s.map(({animation:r,options:l})=>l2(a,r,l)))}function c5(a){let s=u5(a),r=pp(),l=!0,c=!1;const h=y=>(b,S)=>{var N;const T=ei(a,S,y==="exit"?(N=a.presenceContext)==null?void 0:N.custom:void 0);if(T){const{transition:D,transitionEnd:k,...U}=T;b={...b,...U,...k}}return b};function f(y){s=y(a)}function p(y){const{props:b}=a,S=gy(a.parent)||{},T=[],N=new Set;let D={},k=1/0;for(let K=0;K<o5;K++){const P=r5[K],Q=r[P],J=b[P]!==void 0?b[P]:S[P],at=$s(J),ft=P===y?Q.isActive:null;ft===!1&&(k=K);let Z=J===S[P]&&J!==b[P]&&at;if(Z&&(l||c)&&a.manuallyAnimateOnMount&&(Z=!1),Q.protectedKeys={...D},!Q.isActive&&ft===null||!J&&!Q.prevProp||Xr(J)||typeof J=="boolean")continue;if(P==="exit"&&Q.isActive&&ft!==!0){Q.prevResolvedValues&&(D={...D,...Q.prevResolvedValues});continue}const G=f5(Q.prevProp,J);let rt=G||P===y&&Q.isActive&&!Z&&at||K>k&&at,it=!1;const xt=Array.isArray(J)?J:[J];let gt=xt.reduce(h(P),{});ft===!1&&(gt={});const{prevResolvedValues:Gt={}}=Q,Wt={...Gt,...gt},mt=$=>{rt=!0,N.has($)&&(it=!0,N.delete($)),Q.needsAnimating[$]=!0;const bt=a.getValue($);bt&&(bt.liveStyle=!1)};for(const $ in Wt){const bt=gt[$],jt=Gt[$];if(D.hasOwnProperty($))continue;let A=!1;qc(bt)&&qc(jt)?A=!yy(bt,jt)||G:A=bt!==jt,A?bt!=null?mt($):N.add($):bt!==void 0&&N.has($)?mt($):Q.protectedKeys[$]=!0}Q.prevProp=J,Q.prevResolvedValues=gt,Q.isActive&&(D={...D,...gt}),(l||c)&&a.blockInitialAnimation&&(rt=!1);const L=Z&&G;rt&&(!L||it)&&T.push(...xt.map($=>{const bt={type:P};if(typeof $=="string"&&(l||c)&&!L&&a.manuallyAnimateOnMount&&a.parent){const{parent:jt}=a,A=ei(jt,$);if(jt.enteringChildren&&A){const{delayChildren:Y}=A.transition||{};bt.delay=kg(jt.enteringChildren,a,Y)}}return{animation:$,options:bt}}))}if(N.size){const K={};if(typeof b.initial!="boolean"){const P=ei(a,Array.isArray(b.initial)?b.initial[0]:b.initial);P&&P.transition&&(K.transition=P.transition)}N.forEach(P=>{const Q=a.getBaseTarget(P),J=a.getValue(P);J&&(J.liveStyle=!0),K[P]=Q??null}),T.push({animation:K})}let U=!!T.length;return l&&(b.initial===!1||b.initial===b.animate)&&!a.manuallyAnimateOnMount&&(U=!1),l=!1,c=!1,U?s(T):Promise.resolve()}function x(y,b){var T;if(r[y].isActive===b)return Promise.resolve();(T=a.variantChildren)==null||T.forEach(N=>{var D;return(D=N.animationState)==null?void 0:D.setActive(y,b)}),r[y].isActive=b;const S=p(y);for(const N in r)r[N].protectedKeys={};return S}return{animateChanges:p,setActive:x,setAnimateFunction:f,getState:()=>r,reset:()=>{r=pp(),c=!0}}}function f5(a,s){return typeof s=="string"?s!==a:Array.isArray(s)?!yy(s,a):!1}function Fa(a=!1){return{isActive:a,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function pp(){return{animate:Fa(!0),whileInView:Fa(),whileHover:Fa(),whileTap:Fa(),whileDrag:Fa(),whileFocus:Fa(),exit:Fa()}}function Wc(a,s){a.min=s.min,a.max=s.max}function En(a,s){Wc(a.x,s.x),Wc(a.y,s.y)}function gp(a,s){a.translate=s.translate,a.scale=s.scale,a.originPoint=s.originPoint,a.origin=s.origin}const xy=1e-4,d5=1-xy,h5=1+xy,vy=.01,m5=0-vy,p5=0+vy;function qe(a){return a.max-a.min}function g5(a,s,r){return Math.abs(a-s)<=r}function yp(a,s,r,l=.5){a.origin=l,a.originPoint=It(s.min,s.max,a.origin),a.scale=qe(r)/qe(s),a.translate=It(r.min,r.max,a.origin)-a.originPoint,(a.scale>=d5&&a.scale<=h5||isNaN(a.scale))&&(a.scale=1),(a.translate>=m5&&a.translate<=p5||isNaN(a.translate))&&(a.translate=0)}function Js(a,s,r,l){yp(a.x,s.x,r.x,l?l.originX:void 0),yp(a.y,s.y,r.y,l?l.originY:void 0)}function xp(a,s,r,l=0){const c=l?It(r.min,r.max,l):r.min;a.min=c+s.min,a.max=a.min+qe(s)}function y5(a,s,r,l){xp(a.x,s.x,r.x,l==null?void 0:l.x),xp(a.y,s.y,r.y,l==null?void 0:l.y)}function vp(a,s,r,l=0){const c=l?It(r.min,r.max,l):r.min;a.min=s.min-c,a.max=a.min+qe(s)}function Hr(a,s,r,l){vp(a.x,s.x,r.x,l==null?void 0:l.x),vp(a.y,s.y,r.y,l==null?void 0:l.y)}function bp(a,s,r,l,c){return a-=s,a=Br(a,1/r,l),c!==void 0&&(a=Br(a,1/c,l)),a}function x5(a,s=0,r=1,l=.5,c,h=a,f=a){if(Vn.test(s)&&(s=parseFloat(s),s=It(f.min,f.max,s/100)-f.min),typeof s!="number")return;let p=It(h.min,h.max,l);a===h&&(p-=s),a.min=bp(a.min,s,r,p,c),a.max=bp(a.max,s,r,p,c)}function Sp(a,s,[r,l,c],h,f){x5(a,s[r],s[l],s[c],s.scale,h,f)}const v5=["x","scaleX","originX"],b5=["y","scaleY","originY"];function Tp(a,s,r,l){Sp(a.x,s,v5,r?r.x:void 0,l?l.x:void 0),Sp(a.y,s,b5,r?r.y:void 0,l?l.y:void 0)}function Mp(a){return a.translate===0&&a.scale===1}function by(a){return Mp(a.x)&&Mp(a.y)}function Ap(a,s){return a.min===s.min&&a.max===s.max}function S5(a,s){return Ap(a.x,s.x)&&Ap(a.y,s.y)}function Ep(a,s){return Math.round(a.min)===Math.round(s.min)&&Math.round(a.max)===Math.round(s.max)}function Sy(a,s){return Ep(a.x,s.x)&&Ep(a.y,s.y)}function wp(a){return qe(a.x)/qe(a.y)}function jp(a,s){return a.translate===s.translate&&a.scale===s.scale&&a.originPoint===s.originPoint}function zn(a){return[a("x"),a("y")]}function T5(a,s,r){let l="";const c=a.x.translate/s.x,h=a.y.translate/s.y,f=(r==null?void 0:r.z)||0;if((c||h||f)&&(l=`translate3d(${c}px, ${h}px, ${f}px) `),(s.x!==1||s.y!==1)&&(l+=`scale(${1/s.x}, ${1/s.y}) `),r){const{transformPerspective:y,rotate:b,pathRotation:S,rotateX:T,rotateY:N,skewX:D,skewY:k}=r;y&&(l=`perspective(${y}px) ${l}`),b&&(l+=`rotate(${b}deg) `),S&&(l+=`rotate(${S}deg) `),T&&(l+=`rotateX(${T}deg) `),N&&(l+=`rotateY(${N}deg) `),D&&(l+=`skewX(${D}deg) `),k&&(l+=`skewY(${k}deg) `)}const p=a.x.scale*s.x,x=a.y.scale*s.y;return(p!==1||x!==1)&&(l+=`scale(${p}, ${x})`),l||"none"}const Ty=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],M5=Ty.length,Np=a=>typeof a=="string"?parseFloat(a):a,Cp=a=>typeof a=="number"||lt.test(a);function A5(a,s,r,l,c,h){c?(a.opacity=It(0,r.opacity??1,E5(l)),a.opacityExit=It(s.opacity??1,0,w5(l))):h&&(a.opacity=It(s.opacity??1,r.opacity??1,l));for(let f=0;f<M5;f++){const p=Ty[f];let x=Dp(s,p),y=Dp(r,p);if(x===void 0&&y===void 0)continue;x||(x=0),y||(y=0),x===0||y===0||Cp(x)===Cp(y)?(a[p]=Math.max(It(Np(x),Np(y),l),0),(Vn.test(y)||Vn.test(x))&&(a[p]+="%")):a[p]=y}(s.rotate||r.rotate)&&(a.rotate=It(s.rotate||0,r.rotate||0,l))}function Dp(a,s){return a[s]!==void 0?a[s]:a.borderRadius}const E5=My(0,.5,mg),w5=My(.5,.95,bn);function My(a,s,r){return l=>l<a?0:l>s?1:r(Fs(a,s,l))}function j5(a,s,r){const l=_e(a)?a:Qi(a);return l.start(bf("",l,s,r)),l.animation}function Is(a,s,r,l={passive:!0}){return a.addEventListener(s,r,l),()=>a.removeEventListener(s,r,l)}const N5=(a,s)=>a.depth-s.depth;class C5{constructor(){this.children=[],this.isDirty=!1}add(s){rf(this.children,s),this.isDirty=!0}remove(s){Rr(this.children,s),this.isDirty=!0}forEach(s){this.isDirty&&this.children.sort(N5),this.isDirty=!1,this.children.forEach(s)}}function D5(a,s){const r=ke.now(),l=({timestamp:c})=>{const h=c-r;h>=s&&(Da(l),a(h-s))};return te.setup(l,!0),()=>Da(l)}function Cr(a){return _e(a)?a.get():a}class R5{constructor(){this.members=[]}add(s){rf(this.members,s);for(let r=this.members.length-1;r>=0;r--){const l=this.members[r];if(l===s||l===this.lead||l===this.prevLead)continue;const c=l.instance;(!c||c.isConnected===!1)&&!l.snapshot&&(Rr(this.members,l),l.unmount())}s.scheduleRender()}remove(s){if(Rr(this.members,s),s===this.prevLead&&(this.prevLead=void 0),s===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(s){var r;for(let l=this.members.indexOf(s)-1;l>=0;l--){const c=this.members[l];if(c.isPresent!==!1&&((r=c.instance)==null?void 0:r.isConnected)!==!1)return this.promote(c),!0}return!1}promote(s,r){var c;const l=this.lead;if(s!==l&&(this.prevLead=l,this.lead=s,s.show(),l)){l.updateSnapshot(),s.scheduleRender();const{layoutDependency:h}=l.options,{layoutDependency:f}=s.options;(h===void 0||h!==f)&&(s.resumeFrom=l,r&&(l.preserveOpacity=!0),l.snapshot&&(s.snapshot=l.snapshot,s.snapshot.latestValues=l.animationValues||l.latestValues),(c=s.root)!=null&&c.isUpdating&&(s.isLayoutDirty=!0)),s.options.crossfade===!1&&l.hide()}}exitAnimationComplete(){this.members.forEach(s=>{var r,l,c,h,f;(l=(r=s.options).onExitComplete)==null||l.call(r),(f=(c=s.resumingFrom)==null?void 0:(h=c.options).onExitComplete)==null||f.call(h)})}scheduleRender(){this.members.forEach(s=>s.instance&&s.scheduleRender(!1))}removeLeadSnapshot(){var s;(s=this.lead)!=null&&s.snapshot&&(this.lead.snapshot=void 0)}}const Dr={hasAnimatedSinceResize:!0,hasEverUpdated:!1},bc=["","X","Y","Z"],z5=1e3;let O5=0;function Sc(a,s,r,l){const{latestValues:c}=s;c[a]&&(r[a]=c[a],s.setStaticValue(a,0),l&&(l[a]=0))}function Ay(a){if(a.hasCheckedOptimisedAppear=!0,a.root===a)return;const{visualElement:s}=a.options;if(!s)return;const r=Kg(s);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:c,layoutId:h}=a.options;window.MotionCancelOptimisedAnimation(r,"transform",te,!(c||h))}const{parent:l}=a;l&&!l.hasCheckedOptimisedAppear&&Ay(l)}function Ey({attachResizeListener:a,defaultParent:s,measureScroll:r,checkIsScrollRoot:l,resetTransform:c}){return class{constructor(f={},p=s==null?void 0:s()){this.id=O5++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(L5),this.nodes.forEach(G5),this.nodes.forEach(Y5),this.nodes.forEach(U5)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=f,this.root=p?p.root||p:this,this.path=p?[...p.path,p]:[],this.parent=p,this.depth=p?p.depth+1:0;for(let x=0;x<this.path.length;x++)this.path[x].shouldResetTransform=!0;this.root===this&&(this.nodes=new C5)}addEventListener(f,p){return this.eventHandlers.has(f)||this.eventHandlers.set(f,new uf),this.eventHandlers.get(f).add(p)}notifyListeners(f,...p){const x=this.eventHandlers.get(f);x&&x.notify(...p)}hasListeners(f){return this.eventHandlers.has(f)}mount(f){if(this.instance)return;this.isSVG=Ef(f)&&!_2(f),this.instance=f;const{layoutId:p,layout:x,visualElement:y}=this.options;if(y&&!y.current&&y.mount(f),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(x||p)&&(this.isLayoutDirty=!0),a){let b,S=0;const T=()=>this.root.updateBlockedByResize=!1;te.read(()=>{S=window.innerWidth}),a(f,()=>{const N=window.innerWidth;N!==S&&(S=N,this.root.updateBlockedByResize=!0,b&&b(),b=D5(T,250),Dr.hasAnimatedSinceResize&&(Dr.hasAnimatedSinceResize=!1,this.nodes.forEach(Op)))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&y&&(p||x)&&this.addEventListener("didUpdate",({delta:b,hasLayoutChanged:S,hasRelativeLayoutChanged:T,layout:N})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const D=this.options.transition||y.getDefaultTransition()||J5,{onLayoutAnimationStart:k,onLayoutAnimationComplete:U}=y.getProps(),K=!this.targetLayout||!Sy(this.targetLayout,N),P=!S&&T;if(this.options.layoutRoot||this.resumeFrom||P||S&&(K||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const Q={...vf(D,"layout"),onPlay:k,onComplete:U};(y.shouldReduceMotion||this.options.layoutRoot)&&(Q.delay=0,Q.type=!1),this.startAnimation(Q),this.setAnimationOrigin(b,P,Q.path)}else S||Op(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=N})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const f=this.getStack();f&&f.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Da(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(X5),this.animationId++)}getTransformTemplate(){const{visualElement:f}=this.options;return f&&f.getProps().transformTemplate}willUpdate(f=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ay(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let b=0;b<this.path.length;b++){const S=this.path[b];S.shouldResetTransform=!0,(typeof S.latestValues.x=="string"||typeof S.latestValues.y=="string")&&(S.isLayoutDirty=!0),S.updateScroll("snapshot"),S.options.layoutRoot&&S.willUpdate(!1)}const{layoutId:p,layout:x}=this.options;if(p===void 0&&!x)return;const y=this.getTransformTemplate();this.prevTransformTemplateValue=y?y(this.latestValues,""):void 0,this.updateSnapshot(),f&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const x=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),x&&this.nodes.forEach(H5),this.nodes.forEach(Rp);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(zp);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(k5),this.nodes.forEach(q5),this.nodes.forEach(V5),this.nodes.forEach(_5)):this.nodes.forEach(zp),this.clearAllSnapshots();const p=ke.now();Ve.delta=_n(0,1e3/60,p-Ve.timestamp),Ve.timestamp=p,Ve.isProcessing=!0,dc.update.process(Ve),dc.preRender.process(Ve),dc.render.process(Ve),Ve.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Mf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(B5),this.sharedNodes.forEach(K5)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,te.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){te.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!qe(this.snapshot.measuredBox.x)&&!qe(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let x=0;x<this.path.length;x++)this.path[x].updateScroll();const f=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Se()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:p}=this.options;p&&p.notify("LayoutMeasure",this.layout.layoutBox,f?f.layoutBox:void 0)}updateScroll(f="measure"){let p=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===f&&(p=!1),p&&this.instance){const x=l(this.instance);this.scroll={animationId:this.root.animationId,phase:f,isRoot:x,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:x}}}resetTransform(){if(!c)return;const f=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,p=this.projectionDelta&&!by(this.projectionDelta),x=this.getTransformTemplate(),y=x?x(this.latestValues,""):void 0,b=y!==this.prevTransformTemplateValue;f&&this.instance&&(p||Wa(this.latestValues)||b)&&(c(this.instance,y),this.shouldResetTransform=!1,this.scheduleRender())}measure(f=!0){const p=this.measurePageBox();let x=this.removeElementScroll(p);return f&&(x=this.removeTransform(x)),P5(x),{animationId:this.root.animationId,measuredBox:p,layoutBox:x,latestValues:{},source:this.id}}measurePageBox(){var y;const{visualElement:f}=this.options;if(!f)return Se();const p=f.measureViewportBox();if(!(((y=this.scroll)==null?void 0:y.wasRoot)||this.path.some(F5))){const{scroll:b}=this.root;b&&(On(p.x,b.offset.x),On(p.y,b.offset.y))}return p}removeElementScroll(f){var x;const p=Se();if(En(p,f),(x=this.scroll)!=null&&x.wasRoot)return p;for(let y=0;y<this.path.length;y++){const b=this.path[y],{scroll:S,options:T}=b;b!==this.root&&S&&T.layoutScroll&&(S.wasRoot&&En(p,f),On(p.x,S.offset.x),On(p.y,S.offset.y))}return p}applyTransform(f,p=!1,x){var b,S;const y=x||Se();En(y,f);for(let T=0;T<this.path.length;T++){const N=this.path[T];!p&&N.options.layoutScroll&&N.scroll&&N!==N.root&&(On(y.x,-N.scroll.offset.x),On(y.y,-N.scroll.offset.y)),Wa(N.latestValues)&&Nr(y,N.latestValues,(b=N.layout)==null?void 0:b.layoutBox)}return Wa(this.latestValues)&&Nr(y,this.latestValues,(S=this.layout)==null?void 0:S.layoutBox),y}removeTransform(f){var x;const p=Se();En(p,f);for(let y=0;y<this.path.length;y++){const b=this.path[y];if(!Wa(b.latestValues))continue;let S;b.instance&&(Jc(b.latestValues)&&b.updateSnapshot(),S=Se(),En(S,b.measurePageBox())),Tp(p,b.latestValues,(x=b.snapshot)==null?void 0:x.layoutBox,S)}return Wa(this.latestValues)&&Tp(p,this.latestValues),p}setTargetDelta(f){this.targetDelta=f,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(f){this.options={...this.options,...f,crossfade:f.crossfade!==void 0?f.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ve.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(f=!1){var N;const p=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=p.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=p.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=p.isSharedProjectionDirty);const x=!!this.resumingFrom||this!==p;if(!(f||x&&this.isSharedProjectionDirty||this.isProjectionDirty||(N=this.parent)!=null&&N.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:b,layoutId:S}=this.options;if(!this.layout||!(b||S))return;this.resolvedRelativeTargetAt=Ve.timestamp;const T=this.getClosestProjectingParent();T&&this.linkedParentVersion!==T.layoutVersion&&!T.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&T&&T.layout?this.createRelativeTarget(T,this.layout.layoutBox,T.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Se(),this.targetWithTransforms=Se()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),y5(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):En(this.target,this.layout.layoutBox),oy(this.target,this.targetDelta)):En(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&T&&!!T.resumingFrom==!!this.resumingFrom&&!T.options.layoutScroll&&T.target&&this.animationProgress!==1?this.createRelativeTarget(T,this.target,T.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Jc(this.parent.latestValues)||ry(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(f,p,x){this.relativeParent=f,this.linkedParentVersion=f.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Se(),this.relativeTargetOrigin=Se(),Hr(this.relativeTargetOrigin,p,x,this.options.layoutAnchor||void 0),En(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var D;const f=this.getLead(),p=!!this.resumingFrom||this!==f;let x=!0;if((this.isProjectionDirty||(D=this.parent)!=null&&D.isProjectionDirty)&&(x=!1),p&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(x=!1),this.resolvedRelativeTargetAt===Ve.timestamp&&(x=!1),x)return;const{layout:y,layoutId:b}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(y||b))return;En(this.layoutCorrected,this.layout.layoutBox);const S=this.treeScale.x,T=this.treeScale.y;Z2(this.layoutCorrected,this.treeScale,this.path,p),f.layout&&!f.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(f.target=f.layout.layoutBox,f.targetWithTransforms=Se());const{target:N}=f;if(!N){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(gp(this.prevProjectionDelta.x,this.projectionDelta.x),gp(this.prevProjectionDelta.y,this.projectionDelta.y)),Js(this.projectionDelta,this.layoutCorrected,N,this.latestValues),(this.treeScale.x!==S||this.treeScale.y!==T||!jp(this.projectionDelta.x,this.prevProjectionDelta.x)||!jp(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",N))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(f=!0){var p;if((p=this.options.visualElement)==null||p.scheduleRender(),f){const x=this.getStack();x&&x.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Xi(),this.projectionDelta=Xi(),this.projectionDeltaWithTransform=Xi()}setAnimationOrigin(f,p=!1,x){const y=this.snapshot,b=y?y.latestValues:{},S={...this.latestValues},T=Xi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const N=Se(),D=y?y.source:void 0,k=this.layout?this.layout.source:void 0,U=D!==k,K=this.getStack(),P=!K||K.members.length<=1,Q=!!(U&&!P&&this.options.crossfade===!0&&!this.path.some(Q5));this.animationProgress=0;let J;const at=x==null?void 0:x.interpolateProjection(f);this.mixTargetDelta=ft=>{const Z=ft/1e3,G=at==null?void 0:at(Z);G?(T.x.translate=G.x,T.x.scale=It(f.x.scale,1,Z),T.x.origin=f.x.origin,T.x.originPoint=f.x.originPoint,T.y.translate=G.y,T.y.scale=It(f.y.scale,1,Z),T.y.origin=f.y.origin,T.y.originPoint=f.y.originPoint):(Vp(T.x,f.x,Z),Vp(T.y,f.y,Z)),this.setTargetDelta(T),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Hr(N,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Z5(this.relativeTarget,this.relativeTargetOrigin,N,Z),J&&S5(this.relativeTarget,J)&&(this.isProjectionDirty=!1),J||(J=Se()),En(J,this.relativeTarget)),U&&(this.animationValues=S,A5(S,b,this.latestValues,Z,Q,P)),G&&G.rotate!==void 0&&(this.animationValues||(this.animationValues=S),this.animationValues.pathRotation=G.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=Z},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(f){var p,x,y;this.notifyListeners("animationStart"),(p=this.currentAnimation)==null||p.stop(),(y=(x=this.resumingFrom)==null?void 0:x.currentAnimation)==null||y.stop(),this.pendingAnimation&&(Da(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=te.update(()=>{Dr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Qi(0)),this.motionValue.jump(0,!1),this.currentAnimation=j5(this.motionValue,[0,1e3],{...f,velocity:0,isSync:!0,onUpdate:b=>{this.mixTargetDelta(b),f.onUpdate&&f.onUpdate(b)},onComplete:()=>{f.onComplete&&f.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const f=this.getStack();f&&f.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(z5),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const f=this.getLead();let{targetWithTransforms:p,target:x,layout:y,latestValues:b}=f;if(!(!p||!x||!y)){if(this!==f&&this.layout&&y&&wy(this.options.animationType,this.layout.layoutBox,y.layoutBox)){x=this.target||Se();const S=qe(this.layout.layoutBox.x);x.x.min=f.target.x.min,x.x.max=x.x.min+S;const T=qe(this.layout.layoutBox.y);x.y.min=f.target.y.min,x.y.max=x.y.min+T}En(p,x),Nr(p,b),Js(this.projectionDeltaWithTransform,this.layoutCorrected,p,b)}}registerSharedNode(f,p){this.sharedNodes.has(f)||this.sharedNodes.set(f,new R5),this.sharedNodes.get(f).add(p);const y=p.options.initialPromotionConfig;p.promote({transition:y?y.transition:void 0,preserveFollowOpacity:y&&y.shouldPreserveFollowOpacity?y.shouldPreserveFollowOpacity(p):void 0})}isLead(){const f=this.getStack();return f?f.lead===this:!0}getLead(){var p;const{layoutId:f}=this.options;return f?((p=this.getStack())==null?void 0:p.lead)||this:this}getPrevLead(){var p;const{layoutId:f}=this.options;return f?(p=this.getStack())==null?void 0:p.prevLead:void 0}getStack(){const{layoutId:f}=this.options;if(f)return this.root.sharedNodes.get(f)}promote({needsReset:f,transition:p,preserveFollowOpacity:x}={}){const y=this.getStack();y&&y.promote(this,x),f&&(this.projectionDelta=void 0,this.needsReset=!0),p&&this.setOptions({transition:p})}relegate(){const f=this.getStack();return f?f.relegate(this):!1}resetSkewAndRotation(){const{visualElement:f}=this.options;if(!f)return;let p=!1;const{latestValues:x}=f;if((x.z||x.rotate||x.rotateX||x.rotateY||x.rotateZ||x.skewX||x.skewY)&&(p=!0),!p)return;const y={};x.z&&Sc("z",f,y,this.animationValues);for(let b=0;b<bc.length;b++)Sc(`rotate${bc[b]}`,f,y,this.animationValues),Sc(`skew${bc[b]}`,f,y,this.animationValues);f.render();for(const b in y)f.setStaticValue(b,y[b]),this.animationValues&&(this.animationValues[b]=y[b]);f.scheduleRender()}applyProjectionStyles(f,p){if(!this.instance||this.isSVG)return;if(!this.isVisible){f.visibility="hidden";return}const x=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,f.visibility="",f.opacity="",f.pointerEvents=Cr(p==null?void 0:p.pointerEvents)||"",f.transform=x?x(this.latestValues,""):"none";return}const y=this.getLead();if(!this.projectionDelta||!this.layout||!y.target){this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=Cr(p==null?void 0:p.pointerEvents)||""),this.hasProjected&&!Wa(this.latestValues)&&(f.transform=x?x({},""):"none",this.hasProjected=!1);return}f.visibility="";const b=y.animationValues||y.latestValues;this.applyTransformsToTarget();let S=T5(this.projectionDeltaWithTransform,this.treeScale,b);x&&(S=x(b,S)),f.transform=S;const{x:T,y:N}=this.projectionDelta;f.transformOrigin=`${T.origin*100}% ${N.origin*100}% 0`,y.animationValues?f.opacity=y===this?b.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:b.opacityExit:f.opacity=y===this?b.opacity!==void 0?b.opacity:"":b.opacityExit!==void 0?b.opacityExit:0;for(const D in Fc){if(b[D]===void 0)continue;const{correct:k,applyTo:U,isCSSVariable:K}=Fc[D],P=S==="none"?b[D]:k(b[D],y);if(U){const Q=U.length;for(let J=0;J<Q;J++)f[U[J]]=P}else K?this.options.visualElement.renderState.vars[D]=P:f[D]=P}this.options.layoutId&&(f.pointerEvents=y===this?Cr(p==null?void 0:p.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(f=>{var p;return(p=f.currentAnimation)==null?void 0:p.stop()}),this.root.nodes.forEach(Rp),this.root.sharedNodes.clear()}}}function V5(a){a.updateLayout()}function _5(a){var r;const s=((r=a.resumeFrom)==null?void 0:r.snapshot)||a.snapshot;if(a.isLead()&&a.layout&&s&&a.hasListeners("didUpdate")){const{layoutBox:l,measuredBox:c}=a.layout,{animationType:h}=a.options,f=s.source!==a.layout.source;if(h==="size")zn(S=>{const T=f?s.measuredBox[S]:s.layoutBox[S],N=qe(T);T.min=l[S].min,T.max=T.min+N});else if(h==="x"||h==="y"){const S=h==="x"?"y":"x";Wc(f?s.measuredBox[S]:s.layoutBox[S],l[S])}else wy(h,s.layoutBox,l)&&zn(S=>{const T=f?s.measuredBox[S]:s.layoutBox[S],N=qe(l[S]);T.max=T.min+N,a.relativeTarget&&!a.currentAnimation&&(a.isProjectionDirty=!0,a.relativeTarget[S].max=a.relativeTarget[S].min+N)});const p=Xi();Js(p,l,s.layoutBox);const x=Xi();f?Js(x,a.applyTransform(c,!0),s.measuredBox):Js(x,l,s.layoutBox);const y=!by(p);let b=!1;if(!a.resumeFrom){const S=a.getClosestProjectingParent();if(S&&!S.resumeFrom){const{snapshot:T,layout:N}=S;if(T&&N){const D=a.options.layoutAnchor||void 0,k=Se();Hr(k,s.layoutBox,T.layoutBox,D);const U=Se();Hr(U,l,N.layoutBox,D),Sy(k,U)||(b=!0),S.options.layoutRoot&&(a.relativeTarget=U,a.relativeTargetOrigin=k,a.relativeParent=S)}}}a.notifyListeners("didUpdate",{layout:l,snapshot:s,delta:x,layoutDelta:p,hasLayoutChanged:y,hasRelativeLayoutChanged:b})}else if(a.isLead()){const{onExitComplete:l}=a.options;l&&l()}a.options.transition=void 0}function L5(a){a.parent&&(a.isProjecting()||(a.isProjectionDirty=a.parent.isProjectionDirty),a.isSharedProjectionDirty||(a.isSharedProjectionDirty=!!(a.isProjectionDirty||a.parent.isProjectionDirty||a.parent.isSharedProjectionDirty)),a.isTransformDirty||(a.isTransformDirty=a.parent.isTransformDirty))}function U5(a){a.isProjectionDirty=a.isSharedProjectionDirty=a.isTransformDirty=!1}function B5(a){a.clearSnapshot()}function Rp(a){a.clearMeasurements()}function H5(a){a.isLayoutDirty=!0,a.updateLayout()}function zp(a){a.isLayoutDirty=!1}function k5(a){a.isAnimationBlocked&&a.layout&&!a.isLayoutDirty&&(a.snapshot=a.layout,a.isLayoutDirty=!0)}function q5(a){const{visualElement:s}=a.options;s&&s.getProps().onBeforeLayoutMeasure&&s.notify("BeforeLayoutMeasure"),a.resetTransform()}function Op(a){a.finishAnimation(),a.targetDelta=a.relativeTarget=a.target=void 0,a.isProjectionDirty=!0}function G5(a){a.resolveTargetDelta()}function Y5(a){a.calcProjection()}function X5(a){a.resetSkewAndRotation()}function K5(a){a.removeLeadSnapshot()}function Vp(a,s,r){a.translate=It(s.translate,0,r),a.scale=It(s.scale,1,r),a.origin=s.origin,a.originPoint=s.originPoint}function _p(a,s,r,l){a.min=It(s.min,r.min,l),a.max=It(s.max,r.max,l)}function Z5(a,s,r,l){_p(a.x,s.x,r.x,l),_p(a.y,s.y,r.y,l)}function Q5(a){return a.animationValues&&a.animationValues.opacityExit!==void 0}const J5={duration:.45,ease:[.4,0,.1,1]},Lp=a=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(a),Up=Lp("applewebkit/")&&!Lp("chrome/")?Math.round:bn;function Bp(a){a.min=Up(a.min),a.max=Up(a.max)}function P5(a){Bp(a.x),Bp(a.y)}function wy(a,s,r){return a==="position"||a==="preserve-aspect"&&!g5(wp(s),wp(r),.2)}function F5(a){var s;return a!==a.root&&((s=a.scroll)==null?void 0:s.wasRoot)}const W5=Ey({attachResizeListener:(a,s)=>Is(a,"resize",s),measureScroll:()=>{var a,s;return{x:document.documentElement.scrollLeft||((a=document.body)==null?void 0:a.scrollLeft)||0,y:document.documentElement.scrollTop||((s=document.body)==null?void 0:s.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Tc={current:void 0},jy=Ey({measureScroll:a=>({x:a.scrollLeft,y:a.scrollTop}),defaultParent:()=>{if(!Tc.current){const a=new W5({});a.mount(window),a.setOptions({layoutScroll:!0}),Tc.current=a}return Tc.current},resetTransform:(a,s)=>{a.style.transform=s!==void 0?s:"none"},checkIsScrollRoot:a=>window.getComputedStyle(a).position==="fixed"}),Df=B.createContext({transformPagePoint:a=>a,isStatic:!1,reducedMotion:"never"});function Hp(a,s){if(typeof a=="function")return a(s);a!=null&&(a.current=s)}function $5(...a){return s=>{let r=!1;const l=a.map(c=>{const h=Hp(c,s);return!r&&typeof h=="function"&&(r=!0),h});if(r)return()=>{for(let c=0;c<l.length;c++){const h=l[c];typeof h=="function"?h():Hp(a[c],null)}}}}function I5(...a){return B.useCallback($5(...a),a)}class tS extends B.Component{getSnapshotBeforeUpdate(s){const r=this.props.childRef.current;if(Ar(r)&&s.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const l=r.offsetParent,c=Ar(l)&&l.offsetWidth||0,h=Ar(l)&&l.offsetHeight||0,f=getComputedStyle(r),p=this.props.sizeRef.current;p.height=parseFloat(f.height),p.width=parseFloat(f.width),p.top=r.offsetTop,p.left=r.offsetLeft,p.right=c-p.width-p.left,p.bottom=h-p.height-p.top,p.direction=f.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function eS({children:a,isPresent:s,anchorX:r,anchorY:l,root:c,pop:h}){var T;const f=B.useId(),p=B.useRef(null),x=B.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:y}=B.useContext(Df),b=((T=a.props)==null?void 0:T.ref)??(a==null?void 0:a.ref),S=I5(p,b);return B.useInsertionEffect(()=>{const{width:N,height:D,top:k,left:U,right:K,bottom:P,direction:Q}=x.current;if(s||h===!1||!p.current||!N||!D)return;const J=Q==="rtl",at=r==="left"?J?`right: ${K}`:`left: ${U}`:J?`left: ${U}`:`right: ${K}`,ft=l==="bottom"?`bottom: ${P}`:`top: ${k}`;p.current.dataset.motionPopId=f;const Z=document.createElement("style");y&&(Z.nonce=y);const G=c??document.head;return G.appendChild(Z),Z.sheet&&Z.sheet.insertRule(`
          [data-motion-pop-id="${f}"] {
            position: absolute !important;
            width: ${N}px !important;
            height: ${D}px !important;
            ${at}px !important;
            ${ft}px !important;
          }
        `),()=>{var rt;(rt=p.current)==null||rt.removeAttribute("data-motion-pop-id"),G.contains(Z)&&G.removeChild(Z)}},[s]),m.jsx(tS,{isPresent:s,childRef:p,sizeRef:x,pop:h,children:h===!1?a:B.cloneElement(a,{ref:S})})}const nS=({children:a,initial:s,isPresent:r,onExitComplete:l,custom:c,presenceAffectsLayout:h,mode:f,anchorX:p,anchorY:x,root:y})=>{const b=sf(aS),S=B.useId(),T=B.useRef(r),N=B.useRef(l);lf(()=>{T.current=r,N.current=l});let D=!0,k=B.useMemo(()=>(D=!1,{id:S,initial:s,isPresent:r,custom:c,onExitComplete:U=>{b.set(U,!0);for(const K of b.values())if(!K)return;l&&l()},register:U=>(b.set(U,!1),()=>{var K;b.delete(U),!T.current&&!b.size&&((K=N.current)==null||K.call(N))})}),[r,b,l]);return h&&D&&(k={...k}),B.useMemo(()=>{b.forEach((U,K)=>b.set(K,!1))},[r]),B.useEffect(()=>{!r&&!b.size&&l&&l()},[r]),a=m.jsx(eS,{pop:f==="popLayout",isPresent:r,anchorX:p,anchorY:x,root:y,children:a}),m.jsx(Gr.Provider,{value:k,children:a})};function aS(){return new Map}function Ny(a=!0){const s=B.useContext(Gr);if(s===null)return[!0,null];const{isPresent:r,onExitComplete:l,register:c}=s,h=B.useId();B.useEffect(()=>{if(a)return c(h)},[a]);const f=B.useCallback(()=>a&&l&&l(h),[h,l,a]);return!r&&l?[!1,f]:[!0]}const br=a=>a.key||"";function kp(a){const s=[];return B.Children.forEach(a,r=>{B.isValidElement(r)&&s.push(r)}),s}const Ki=({children:a,custom:s,initial:r=!0,onExitComplete:l,presenceAffectsLayout:c=!0,mode:h="sync",propagate:f=!1,anchorX:p="left",anchorY:x="top",root:y})=>{const[b,S]=Ny(f),T=B.useMemo(()=>kp(a),[a]),N=f&&!b?[]:T.map(br),D=B.useRef(!0),k=B.useRef(T),U=sf(()=>new Map),K=B.useRef(new Set),[P,Q]=B.useState(T),[J,at]=B.useState(T);lf(()=>{D.current=!1,k.current=T;for(let G=0;G<J.length;G++){const rt=br(J[G]);N.includes(rt)?(U.delete(rt),K.current.delete(rt)):U.get(rt)!==!0&&U.set(rt,!1)}},[J,N.length,N.join("-")]);const ft=[];if(T!==P){let G=[...T];for(let rt=0;rt<J.length;rt++){const it=J[rt],xt=br(it);N.includes(xt)||(G.splice(rt,0,it),ft.push(it))}return h==="wait"&&ft.length&&(G=ft),at(kp(G)),Q(T),null}const{forceRender:Z}=B.useContext(af);return m.jsx(m.Fragment,{children:J.map(G=>{const rt=br(G),it=f&&!b?!1:T===J||N.includes(rt),xt=()=>{if(K.current.has(rt))return;if(U.has(rt))K.current.add(rt),U.set(rt,!0);else return;let gt=!0;U.forEach(Gt=>{Gt||(gt=!1)}),gt&&(Z==null||Z(),at(k.current),f&&(S==null||S()),l&&l())};return m.jsx(nS,{isPresent:it,initial:!D.current||r?void 0:!1,custom:s,presenceAffectsLayout:c,mode:h,root:y,onExitComplete:it?void 0:xt,anchorX:p,anchorY:x,children:G},rt)})})},Cy=B.createContext({strict:!1}),qp={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Gp=!1;function iS(){if(Gp)return;const a={};for(const s in qp)a[s]={isEnabled:r=>qp[s].some(l=>!!r[l])};iy(a),Gp=!0}function Dy(){return iS(),G2()}function sS(a){const s=Dy();for(const r in a)s[r]={...s[r],...a[r]};iy(s)}const lS=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function kr(a){return a.startsWith("while")||a.startsWith("drag")&&a!=="draggable"||a.startsWith("layout")||a.startsWith("onTap")||a.startsWith("onPan")||a.startsWith("onLayout")||lS.has(a)}let Ry=a=>!kr(a);function rS(a){typeof a=="function"&&(Ry=s=>s.startsWith("on")?!kr(s):a(s))}try{rS(require("@emotion/is-prop-valid").default)}catch{}function oS(a,s,r){const l={};for(const c in a)c==="values"&&typeof a.values=="object"||_e(a[c])||(Ry(c)||r===!0&&kr(c)||!s&&!kr(c)||a.draggable&&c.startsWith("onDrag"))&&(l[c]=a[c]);return l}const Zr=B.createContext({});function uS(a,s){if(Kr(a)){const{initial:r,animate:l}=a;return{initial:r===!1||$s(r)?r:void 0,animate:$s(l)?l:void 0}}return a.inherit!==!1?s:{}}function cS(a){const{initial:s,animate:r}=uS(a,B.useContext(Zr));return B.useMemo(()=>({initial:s,animate:r}),[Yp(s),Yp(r)])}function Yp(a){return Array.isArray(a)?a.join(" "):a}const Rf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function zy(a,s,r){for(const l in s)!_e(s[l])&&!fy(l,r)&&(a[l]=s[l])}function fS({transformTemplate:a},s){return B.useMemo(()=>{const r=Rf();return Nf(r,s,a),Object.assign({},r.vars,r.style)},[s])}function dS(a,s){const r=a.style||{},l={};return zy(l,r,a),Object.assign(l,fS(a,s)),l}function hS(a,s){const r={},l=dS(a,s);return a.drag&&a.dragListener!==!1&&(r.draggable=!1,l.userSelect=l.WebkitUserSelect=l.WebkitTouchCallout="none",l.touchAction=a.drag===!0?"none":`pan-${a.drag==="x"?"y":"x"}`),a.tabIndex===void 0&&(a.onTap||a.onTapStart||a.whileTap)&&(r.tabIndex=0),r.style=l,r}const Oy=()=>({...Rf(),attrs:{}});function mS(a,s,r,l){const c=B.useMemo(()=>{const h=Oy();return dy(h,s,my(l),a.transformTemplate,a.style),{...h.attrs,style:{...h.style}}},[s]);if(a.style){const h={};zy(h,a.style,a),c.style={...h,...c.style}}return c}const pS=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function zf(a){return typeof a!="string"||a.includes("-")?!1:!!(pS.indexOf(a)>-1||/[A-Z]/u.test(a))}function gS(a,s,r,{latestValues:l},c,h=!1,f){const x=(f??zf(a)?mS:hS)(s,l,c,a),y=oS(s,typeof a=="string",h),b=a!==B.Fragment?{...y,...x,ref:r}:{},{children:S}=s,T=B.useMemo(()=>_e(S)?S.get():S,[S]);return B.createElement(a,{...b,children:T})}function yS({scrapeMotionValuesFromProps:a,createRenderState:s},r,l,c){return{latestValues:xS(r,l,c,a),renderState:s()}}function xS(a,s,r,l){const c={},h=l(a,{});for(const T in h)c[T]=Cr(h[T]);let{initial:f,animate:p}=a;const x=Kr(a),y=ny(a);s&&y&&!x&&a.inherit!==!1&&(f===void 0&&(f=s.initial),p===void 0&&(p=s.animate));let b=r?r.initial===!1:!1;b=b||f===!1;const S=b?p:f;if(S&&typeof S!="boolean"&&!Xr(S)){const T=Array.isArray(S)?S:[S];for(let N=0;N<T.length;N++){const D=Sf(a,T[N]);if(D){const{transitionEnd:k,transition:U,...K}=D;for(const P in K){let Q=K[P];if(Array.isArray(Q)){const J=b?Q.length-1:0;Q=Q[J]}Q!==null&&(c[P]=Q)}for(const P in k)c[P]=k[P]}}}return c}const Vy=a=>(s,r)=>{const l=B.useContext(Zr),c=B.useContext(Gr),h=()=>yS(a,s,l,c);return r?h():sf(h)},vS=Vy({scrapeMotionValuesFromProps:Cf,createRenderState:Rf}),bS=Vy({scrapeMotionValuesFromProps:py,createRenderState:Oy}),SS=Symbol.for("motionComponentSymbol");function TS(a,s,r){const l=B.useRef(r);B.useInsertionEffect(()=>{l.current=r});const c=B.useRef(null);return B.useCallback(h=>{var p;h&&((p=a.onMount)==null||p.call(a,h)),s&&(h?s.mount(h):s.unmount());const f=l.current;if(typeof f=="function")if(h){const x=f(h);typeof x=="function"&&(c.current=x)}else c.current?(c.current(),c.current=null):f(h);else f&&(f.current=h)},[s])}const _y=B.createContext({});function qi(a){return a&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,"current")}function MS(a,s,r,l,c,h){var Q,J;const{visualElement:f}=B.useContext(Zr),p=B.useContext(Cy),x=B.useContext(Gr),y=B.useContext(Df),b=y.reducedMotion,S=y.skipAnimations,T=B.useRef(null),N=B.useRef(!1);l=l||p.renderer,!T.current&&l&&(T.current=l(a,{visualState:s,parent:f,props:r,presenceContext:x,blockInitialAnimation:x?x.initial===!1:!1,reducedMotionConfig:b,skipAnimations:S,isSVG:h}),N.current&&T.current&&(T.current.manuallyAnimateOnMount=!0));const D=T.current,k=B.useContext(_y);D&&!D.projection&&c&&(D.type==="html"||D.type==="svg")&&AS(T.current,r,c,k);const U=B.useRef(!1);B.useInsertionEffect(()=>{D&&U.current&&D.update(r,x)});const K=r[Xg],P=B.useRef(!!K&&typeof window<"u"&&!((Q=window.MotionHandoffIsComplete)!=null&&Q.call(window,K))&&((J=window.MotionHasOptimisedAnimation)==null?void 0:J.call(window,K)));return lf(()=>{N.current=!0,D&&(U.current=!0,window.MotionIsMounted=!0,D.updateFeatures(),D.scheduleRenderMicrotask(),P.current&&D.animationState&&D.animationState.animateChanges())}),B.useEffect(()=>{D&&(!P.current&&D.animationState&&D.animationState.animateChanges(),P.current&&(queueMicrotask(()=>{var at;(at=window.MotionHandoffMarkAsComplete)==null||at.call(window,K)}),P.current=!1),D.enteringChildren=void 0)}),D}function AS(a,s,r,l){const{layoutId:c,layout:h,drag:f,dragConstraints:p,layoutScroll:x,layoutRoot:y,layoutAnchor:b,layoutCrossfade:S}=s;a.projection=new r(a.latestValues,s["data-framer-portal-id"]?void 0:Ly(a.parent)),a.projection.setOptions({layoutId:c,layout:h,alwaysMeasureLayout:!!f||p&&qi(p),visualElement:a,animationType:typeof h=="string"?h:"both",initialPromotionConfig:l,crossfade:S,layoutScroll:x,layoutRoot:y,layoutAnchor:b})}function Ly(a){if(a)return a.options.allowProjection!==!1?a.projection:Ly(a.parent)}function Mc(a,{forwardMotionProps:s=!1,type:r}={},l,c){l&&sS(l);const h=r?r==="svg":zf(a),f=h?bS:vS;function p(y,b){let S;const T={...B.useContext(Df),...y,layoutId:ES(y)},{isStatic:N}=T,D=cS(y),k=f(y,N);if(!N&&typeof window<"u"){wS();const U=jS(T);S=U.MeasureLayout,D.visualElement=MS(a,k,T,c,U.ProjectionNode,h)}return m.jsxs(Zr.Provider,{value:D,children:[S&&D.visualElement?m.jsx(S,{visualElement:D.visualElement,...T}):null,gS(a,y,TS(k,D.visualElement,b),k,N,s,h)]})}p.displayName=`motion.${typeof a=="string"?a:`create(${a.displayName??a.name??""})`}`;const x=B.forwardRef(p);return x[SS]=a,x}function ES({layoutId:a}){const s=B.useContext(af).id;return s&&a!==void 0?s+"-"+a:a}function wS(a,s){B.useContext(Cy).strict}function jS(a){const s=Dy(),{drag:r,layout:l}=s;if(!r&&!l)return{};const c={...r,...l};return{MeasureLayout:r!=null&&r.isEnabled(a)||l!=null&&l.isEnabled(a)?c.MeasureLayout:void 0,ProjectionNode:c.ProjectionNode}}function NS(a,s){if(typeof Proxy>"u")return Mc;const r=new Map,l=(h,f)=>Mc(h,f,a,s),c=(h,f)=>l(h,f);return new Proxy(c,{get:(h,f)=>f==="create"?l:(r.has(f)||r.set(f,Mc(f,void 0,a,s)),r.get(f))})}const CS=(a,s)=>s.isSVG??zf(a)?new s5(s):new I2(s,{allowProjection:a!==B.Fragment});class DS extends Ra{constructor(s){super(s),s.animationState||(s.animationState=c5(s))}updateAnimationControlsSubscription(){const{animate:s}=this.node.getProps();Xr(s)&&(this.unmountControls=s.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:s}=this.node.getProps(),{animate:r}=this.node.prevProps||{};s!==r&&this.updateAnimationControlsSubscription()}unmount(){var s;this.node.animationState.reset(),(s=this.unmountControls)==null||s.call(this)}}let RS=0;class zS extends Ra{constructor(){super(...arguments),this.id=RS++,this.isExitComplete=!1}update(){var h;if(!this.node.presenceContext)return;const{isPresent:s,onExitComplete:r}=this.node.presenceContext,{isPresent:l}=this.node.prevPresenceContext||{};if(!this.node.animationState||s===l)return;if(s&&l===!1){if(this.isExitComplete){const{initial:f,custom:p}=this.node.getProps();if(typeof f=="string"||typeof f=="object"&&f!==null&&!Array.isArray(f)){const x=ei(this.node,f,p);if(x){const{transition:y,transitionEnd:b,...S}=x;for(const T in S)(h=this.node.getValue(T))==null||h.jump(S[T])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const c=this.node.animationState.setActive("exit",!s);r&&!s&&c.then(()=>{this.isExitComplete=!0,r(this.id)})}mount(){const{register:s,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),s&&(this.unmount=s(this.id))}unmount(){}}const OS={animation:{Feature:DS},exit:{Feature:zS}};function al(a){return{point:{x:a.pageX,y:a.pageY}}}const VS=a=>s=>Af(s)&&a(s,al(s));function Ps(a,s,r,l){return Is(a,s,VS(r),l)}const Uy=({current:a})=>a?a.ownerDocument.defaultView:null,Xp=(a,s)=>Math.abs(a-s);function _S(a,s){const r=Xp(a.x,s.x),l=Xp(a.y,s.y);return Math.sqrt(r**2+l**2)}const Kp=new Set(["auto","scroll"]);class By{constructor(s,r,{transformPagePoint:l,contextWindow:c=window,dragSnapToOrigin:h=!1,distanceThreshold:f=3,element:p}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=D=>{this.handleScroll(D.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Sr(this.lastRawMoveEventInfo,this.transformPagePoint));const D=Ac(this.lastMoveEventInfo,this.history),k=this.startEvent!==null,U=_S(D.offset,{x:0,y:0})>=this.distanceThreshold;if(!k&&!U)return;const{point:K}=D,{timestamp:P}=Ve;this.history.push({...K,timestamp:P});const{onStart:Q,onMove:J}=this.handlers;k||(Q&&Q(this.lastMoveEvent,D),this.startEvent=this.lastMoveEvent),J&&J(this.lastMoveEvent,D)},this.handlePointerMove=(D,k)=>{this.lastMoveEvent=D,this.lastRawMoveEventInfo=k,this.lastMoveEventInfo=Sr(k,this.transformPagePoint),te.update(this.updatePoint,!0)},this.handlePointerUp=(D,k)=>{this.end();const{onEnd:U,onSessionEnd:K,resumeAnimation:P}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&P&&P(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const Q=Ac(D.type==="pointercancel"?this.lastMoveEventInfo:Sr(k,this.transformPagePoint),this.history);this.startEvent&&U&&U(D,Q),K&&K(D,Q)},!Af(s))return;this.dragSnapToOrigin=h,this.handlers=r,this.transformPagePoint=l,this.distanceThreshold=f,this.contextWindow=c||window;const x=al(s),y=Sr(x,this.transformPagePoint),{point:b}=y,{timestamp:S}=Ve;this.history=[{...b,timestamp:S}];const{onSessionStart:T}=r;T&&T(s,Ac(y,this.history));const N={passive:!0,capture:!0};this.removeListeners=tl(Ps(this.contextWindow,"pointermove",this.handlePointerMove,N),Ps(this.contextWindow,"pointerup",this.handlePointerUp,N),Ps(this.contextWindow,"pointercancel",this.handlePointerUp,N)),p&&this.startScrollTracking(p)}startScrollTracking(s){let r=s.parentElement;for(;r;){const l=getComputedStyle(r);(Kp.has(l.overflowX)||Kp.has(l.overflowY))&&this.scrollPositions.set(r,{x:r.scrollLeft,y:r.scrollTop}),r=r.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(s){const r=this.scrollPositions.get(s);if(!r)return;const l=s===window,c=l?{x:window.scrollX,y:window.scrollY}:{x:s.scrollLeft,y:s.scrollTop},h={x:c.x-r.x,y:c.y-r.y};h.x===0&&h.y===0||(l?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=h.x,this.lastMoveEventInfo.point.y+=h.y):this.history.length>0&&(this.history[0].x-=h.x,this.history[0].y-=h.y),this.scrollPositions.set(s,c),te.update(this.updatePoint,!0))}updateHandlers(s){this.handlers=s}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Da(this.updatePoint)}}function Sr(a,s){return s?{point:s(a.point)}:a}function Zp(a,s){return{x:a.x-s.x,y:a.y-s.y}}function Ac({point:a},s){return{point:a,delta:Zp(a,Hy(s)),offset:Zp(a,LS(s)),velocity:US(s,.1)}}function LS(a){return a[0]}function Hy(a){return a[a.length-1]}function US(a,s){if(a.length<2)return{x:0,y:0};let r=a.length-1,l=null;const c=Hy(a);for(;r>=0&&(l=a[r],!(c.timestamp-l.timestamp>rn(s)));)r--;if(!l)return{x:0,y:0};l===a[0]&&a.length>2&&c.timestamp-l.timestamp>rn(s)*2&&(l=a[1]);const h=vn(c.timestamp-l.timestamp);if(h===0)return{x:0,y:0};const f={x:(c.x-l.x)/h,y:(c.y-l.y)/h};return f.x===1/0&&(f.x=0),f.y===1/0&&(f.y=0),f}function BS(a,{min:s,max:r},l){return s!==void 0&&a<s?a=l?It(s,a,l.min):Math.max(a,s):r!==void 0&&a>r&&(a=l?It(r,a,l.max):Math.min(a,r)),a}function Qp(a,s,r){return{min:s!==void 0?a.min+s:void 0,max:r!==void 0?a.max+r-(a.max-a.min):void 0}}function HS(a,{top:s,left:r,bottom:l,right:c}){return{x:Qp(a.x,r,c),y:Qp(a.y,s,l)}}function Jp(a,s){let r=s.min-a.min,l=s.max-a.max;return s.max-s.min<a.max-a.min&&([r,l]=[l,r]),{min:r,max:l}}function kS(a,s){return{x:Jp(a.x,s.x),y:Jp(a.y,s.y)}}function qS(a,s){let r=.5;const l=qe(a),c=qe(s);return c>l?r=Fs(s.min,s.max-l,a.min):l>c&&(r=Fs(a.min,a.max-c,s.min)),_n(0,1,r)}function GS(a,s){const r={};return s.min!==void 0&&(r.min=s.min-a.min),s.max!==void 0&&(r.max=s.max-a.min),r}const $c=.35;function YS(a=$c){return a===!1?a=0:a===!0&&(a=$c),{x:Pp(a,"left","right"),y:Pp(a,"top","bottom")}}function Pp(a,s,r){return{min:Fp(a,s),max:Fp(a,r)}}function Fp(a,s){return typeof a=="number"?a:a[s]||0}const XS=new WeakMap;class KS{constructor(s){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Se(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=s}start(s,{snapToCursor:r=!1,distanceThreshold:l}={}){const{presenceContext:c}=this.visualElement;if(c&&c.isPresent===!1)return;const h=S=>{r&&this.snapToCursor(al(S).point),this.stopAnimation()},f=(S,T)=>{const{drag:N,dragPropagation:D,onDragStart:k}=this.getProps();if(N&&!D&&(this.openDragLock&&this.openDragLock(),this.openDragLock=x2(N),!this.openDragLock))return;this.latestPointerEvent=S,this.latestPanInfo=T,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),zn(K=>{let P=this.getAxisMotionValue(K).get()||0;if(Vn.test(P)){const{projection:Q}=this.visualElement;if(Q&&Q.layout){const J=Q.layout.layoutBox[K];J&&(P=qe(J)*(parseFloat(P)/100))}}this.originPoint[K]=P}),k&&te.update(()=>k(S,T),!1,!0),Gc(this.visualElement,"transform");const{animationState:U}=this.visualElement;U&&U.setActive("whileDrag",!0)},p=(S,T)=>{this.latestPointerEvent=S,this.latestPanInfo=T;const{dragPropagation:N,dragDirectionLock:D,onDirectionLock:k,onDrag:U}=this.getProps();if(!N&&!this.openDragLock)return;const{offset:K}=T;if(D&&this.currentDirection===null){this.currentDirection=QS(K),this.currentDirection!==null&&k&&k(this.currentDirection);return}this.updateAxis("x",T.point,K),this.updateAxis("y",T.point,K),this.visualElement.render(),U&&te.update(()=>U(S,T),!1,!0)},x=(S,T)=>{this.latestPointerEvent=S,this.latestPanInfo=T,this.stop(S,T),this.latestPointerEvent=null,this.latestPanInfo=null},y=()=>{const{dragSnapToOrigin:S}=this.getProps();(S||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:b}=this.getProps();this.panSession=new By(s,{onSessionStart:h,onStart:f,onMove:p,onSessionEnd:x,resumeAnimation:y},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:b,distanceThreshold:l,contextWindow:Uy(this.visualElement),element:this.visualElement.current})}stop(s,r){const l=s||this.latestPointerEvent,c=r||this.latestPanInfo,h=this.isDragging;if(this.cancel(),!h||!c||!l)return;const{velocity:f}=c;this.startAnimation(f);const{onDragEnd:p}=this.getProps();p&&te.postRender(()=>p(l,c))}cancel(){this.isDragging=!1;const{projection:s,animationState:r}=this.visualElement;s&&(s.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:l}=this.getProps();!l&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(s,r,l){const{drag:c}=this.getProps();if(!l||!Tr(s,c,this.currentDirection))return;const h=this.getAxisMotionValue(s);let f=this.originPoint[s]+l[s];this.constraints&&this.constraints[s]&&(f=BS(f,this.constraints[s],this.elastic[s])),h.set(f)}resolveConstraints(){var h;const{dragConstraints:s,dragElastic:r}=this.getProps(),l=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(h=this.visualElement.projection)==null?void 0:h.layout,c=this.constraints;s&&qi(s)?this.constraints||(this.constraints=this.resolveRefConstraints()):s&&l?this.constraints=HS(l.layoutBox,s):this.constraints=!1,this.elastic=YS(r),c!==this.constraints&&!qi(s)&&l&&this.constraints&&!this.hasMutatedConstraints&&zn(f=>{this.constraints!==!1&&this.getAxisMotionValue(f)&&(this.constraints[f]=GS(l.layoutBox[f],this.constraints[f]))})}resolveRefConstraints(){const{dragConstraints:s,onMeasureDragConstraints:r}=this.getProps();if(!s||!qi(s))return!1;const l=s.current,{projection:c}=this.visualElement;if(!c||!c.layout)return!1;c.root&&(c.root.scroll=void 0,c.root.updateScroll());const h=Q2(l,c.root,this.visualElement.getTransformPagePoint());let f=kS(c.layout.layoutBox,h);if(r){const p=r(X2(f));this.hasMutatedConstraints=!!p,p&&(f=ly(p))}return f}startAnimation(s){const{drag:r,dragMomentum:l,dragElastic:c,dragTransition:h,dragSnapToOrigin:f,onDragTransitionEnd:p}=this.getProps(),x=this.constraints||{},y=zn(b=>{if(!Tr(b,r,this.currentDirection))return;let S=x&&x[b]||{};(f===!0||f===b)&&(S={min:0,max:0});const T=c?200:1e6,N=c?40:1e7,D={type:"inertia",velocity:l?s[b]:0,bounceStiffness:T,bounceDamping:N,timeConstant:750,restDelta:1,restSpeed:10,...h,...S};return this.startAxisValueAnimation(b,D)});return Promise.all(y).then(p)}startAxisValueAnimation(s,r){const l=this.getAxisMotionValue(s);return Gc(this.visualElement,s),l.start(bf(s,l,0,r,this.visualElement,!1))}stopAnimation(){zn(s=>this.getAxisMotionValue(s).stop())}getAxisMotionValue(s){const r=`_drag${s.toUpperCase()}`,c=this.visualElement.getProps()[r];return c||this.visualElement.getValue(s,this.visualElement.latestValues[s]??0)}snapToCursor(s){zn(r=>{const{drag:l}=this.getProps();if(!Tr(r,l,this.currentDirection))return;const{projection:c}=this.visualElement,h=this.getAxisMotionValue(r);if(c&&c.layout){const{min:f,max:p}=c.layout.layoutBox[r],x=h.get()||0;h.set(s[r]-It(f,p,.5)+x)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:s,dragConstraints:r}=this.getProps(),{projection:l}=this.visualElement;if(!qi(r)||!l||!this.constraints)return;this.stopAnimation();const c={x:0,y:0};zn(f=>{const p=this.getAxisMotionValue(f);if(p&&this.constraints!==!1){const x=p.get();c[f]=qS({min:x,max:x},this.constraints[f])}});const{transformTemplate:h}=this.visualElement.getProps();this.visualElement.current.style.transform=h?h({},""):"none",l.root&&l.root.updateScroll(),l.updateLayout(),this.constraints=!1,this.resolveConstraints(),zn(f=>{if(!Tr(f,s,null))return;const p=this.getAxisMotionValue(f),{min:x,max:y}=this.constraints[f];p.set(It(x,y,c[f]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;XS.set(this.visualElement,this);const s=this.visualElement.current,r=Ps(s,"pointerdown",y=>{const{drag:b,dragListener:S=!0}=this.getProps(),T=y.target,N=T!==s&&A2(T);b&&S&&!N&&this.start(y)});let l;const c=()=>{const{dragConstraints:y}=this.getProps();qi(y)&&y.current&&(this.constraints=this.resolveRefConstraints(),l||(l=ZS(s,y.current,()=>this.scalePositionWithinConstraints())))},{projection:h}=this.visualElement,f=h.addEventListener("measure",c);h&&!h.layout&&(h.root&&h.root.updateScroll(),h.updateLayout()),te.read(c);const p=Is(window,"resize",()=>this.scalePositionWithinConstraints()),x=h.addEventListener("didUpdate",(({delta:y,hasLayoutChanged:b})=>{this.isDragging&&b&&(zn(S=>{const T=this.getAxisMotionValue(S);T&&(this.originPoint[S]+=y[S].translate,T.set(T.get()+y[S].translate))}),this.visualElement.render())}));return()=>{p(),r(),f(),x&&x(),l&&l()}}getProps(){const s=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:l=!1,dragPropagation:c=!1,dragConstraints:h=!1,dragElastic:f=$c,dragMomentum:p=!0}=s;return{...s,drag:r,dragDirectionLock:l,dragPropagation:c,dragConstraints:h,dragElastic:f,dragMomentum:p}}}function Wp(a){let s=!0;return()=>{if(s){s=!1;return}a()}}function ZS(a,s,r){const l=ip(a,Wp(r)),c=ip(s,Wp(r));return()=>{l(),c()}}function Tr(a,s,r){return(s===!0||s===a)&&(r===null||r===a)}function QS(a,s=10){let r=null;return Math.abs(a.y)>s?r="y":Math.abs(a.x)>s&&(r="x"),r}class JS extends Ra{constructor(s){super(s),this.removeGroupControls=bn,this.removeListeners=bn,this.controls=new KS(s)}mount(){const{dragControls:s}=this.node.getProps();s&&(this.removeGroupControls=s.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||bn}update(){const{dragControls:s}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};s!==r&&(this.removeGroupControls(),s&&(this.removeGroupControls=s.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Ec=a=>(s,r)=>{a&&te.update(()=>a(s,r),!1,!0)};class PS extends Ra{constructor(){super(...arguments),this.removePointerDownListener=bn}onPointerDown(s){this.session=new By(s,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Uy(this.node)})}createPanHandlers(){const{onPanSessionStart:s,onPanStart:r,onPan:l,onPanEnd:c}=this.node.getProps();return{onSessionStart:Ec(s),onStart:Ec(r),onMove:Ec(l),onEnd:(h,f)=>{delete this.session,c&&te.postRender(()=>c(h,f))}}}mount(){this.removePointerDownListener=Ps(this.node.current,"pointerdown",s=>this.onPointerDown(s))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let wc=!1;class FS extends B.Component{componentDidMount(){const{visualElement:s,layoutGroup:r,switchLayoutGroup:l,layoutId:c}=this.props,{projection:h}=s;h&&(r.group&&r.group.add(h),l&&l.register&&c&&l.register(h),wc&&h.root.didUpdate(),h.addEventListener("animationComplete",()=>{this.safeToRemove()}),h.setOptions({...h.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Dr.hasEverUpdated=!0}getSnapshotBeforeUpdate(s){const{layoutDependency:r,visualElement:l,drag:c,isPresent:h}=this.props,{projection:f}=l;return f&&(f.isPresent=h,s.layoutDependency!==r&&f.setOptions({...f.options,layoutDependency:r}),wc=!0,c||s.layoutDependency!==r||r===void 0||s.isPresent!==h?f.willUpdate():this.safeToRemove(),s.isPresent!==h&&(h?f.promote():f.relegate()||te.postRender(()=>{const p=f.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:s,layoutAnchor:r}=this.props,{projection:l}=s;l&&(l.options.layoutAnchor=r,l.root.didUpdate(),Mf.postRender(()=>{!l.currentAnimation&&l.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:s,layoutGroup:r,switchLayoutGroup:l}=this.props,{projection:c}=s;wc=!0,c&&(c.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(c),l&&l.deregister&&l.deregister(c))}safeToRemove(){const{safeToRemove:s}=this.props;s&&s()}render(){return null}}function ky(a){const[s,r]=Ny(),l=B.useContext(af);return m.jsx(FS,{...a,layoutGroup:l,switchLayoutGroup:B.useContext(_y),isPresent:s,safeToRemove:r})}const WS={pan:{Feature:PS},drag:{Feature:JS,ProjectionNode:jy,MeasureLayout:ky}};function $p(a,s,r){const{props:l}=a;a.animationState&&l.whileHover&&a.animationState.setActive("whileHover",r==="Start");const c="onHover"+r,h=l[c];h&&te.postRender(()=>h(s,al(s)))}class $S extends Ra{mount(){const{current:s}=this.node;s&&(this.unmount=b2(s,(r,l)=>($p(this.node,l,"Start"),c=>$p(this.node,c,"End"))))}unmount(){}}class IS extends Ra{constructor(){super(...arguments),this.isActive=!1}onFocus(){let s=!1;try{s=this.node.current.matches(":focus-visible")}catch{s=!0}!s||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=tl(Is(this.node.current,"focus",()=>this.onFocus()),Is(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ip(a,s,r){const{props:l}=a;if(a.current instanceof HTMLButtonElement&&a.current.disabled)return;a.animationState&&l.whileTap&&a.animationState.setActive("whileTap",r==="Start");const c="onTap"+(r==="End"?"":r),h=l[c];h&&te.postRender(()=>h(s,al(s)))}class tT extends Ra{mount(){const{current:s}=this.node;if(!s)return;const{globalTapTarget:r,propagate:l}=this.node.props;this.unmount=w2(s,(c,h)=>(Ip(this.node,h,"Start"),(f,{success:p})=>Ip(this.node,f,p?"End":"Cancel")),{useGlobalTarget:r,stopPropagation:(l==null?void 0:l.tap)===!1})}unmount(){}}const Ic=new WeakMap,jc=new WeakMap,eT=a=>{const s=Ic.get(a.target);s&&s(a)},nT=a=>{a.forEach(eT)};function aT({root:a,...s}){const r=a||document;jc.has(r)||jc.set(r,{});const l=jc.get(r),c=JSON.stringify(s);return l[c]||(l[c]=new IntersectionObserver(nT,{root:a,...s})),l[c]}function iT(a,s,r){const l=aT(s);return Ic.set(a,r),l.observe(a),()=>{Ic.delete(a),l.unobserve(a)}}const sT={some:0,all:1};class lT extends Ra{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var x;(x=this.stopObserver)==null||x.call(this);const{viewport:s={}}=this.node.getProps(),{root:r,margin:l,amount:c="some",once:h}=s,f={root:r?r.current:void 0,rootMargin:l,threshold:typeof c=="number"?c:sT[c]},p=y=>{const{isIntersecting:b}=y;if(this.isInView===b||(this.isInView=b,h&&!b&&this.hasEnteredView))return;b&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",b);const{onViewportEnter:S,onViewportLeave:T}=this.node.getProps(),N=b?S:T;N&&N(y)};this.stopObserver=iT(this.node.current,f,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:s,prevProps:r}=this.node;["amount","margin","root"].some(rT(s,r))&&this.startObserver()}unmount(){var s;(s=this.stopObserver)==null||s.call(this),this.hasEnteredView=!1,this.isInView=!1}}function rT({viewport:a={}},{viewport:s={}}={}){return r=>a[r]!==s[r]}const oT={inView:{Feature:lT},tap:{Feature:tT},focus:{Feature:IS},hover:{Feature:$S}},uT={layout:{ProjectionNode:jy,MeasureLayout:ky}},cT={...OS,...oT,...WS,...uT},fT=NS(cT,CS),Ft=fT;/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const dT=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),hT=a=>a.replace(/^([A-Z])|[\s-_]+(\w)/g,(s,r,l)=>l?l.toUpperCase():r.toLowerCase()),tg=a=>{const s=hT(a);return s.charAt(0).toUpperCase()+s.slice(1)},qy=(...a)=>a.filter((s,r,l)=>!!s&&s.trim()!==""&&l.indexOf(s)===r).join(" ").trim(),mT=a=>{for(const s in a)if(s.startsWith("aria-")||s==="role"||s==="title")return!0};/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var pT={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const gT=B.forwardRef(({color:a="currentColor",size:s=24,strokeWidth:r=2,absoluteStrokeWidth:l,className:c="",children:h,iconNode:f,...p},x)=>B.createElement("svg",{ref:x,...pT,width:s,height:s,stroke:a,strokeWidth:l?Number(r)*24/Number(s):r,className:qy("lucide",c),...!h&&!mT(p)&&{"aria-hidden":"true"},...p},[...f.map(([y,b])=>B.createElement(y,b)),...Array.isArray(h)?h:[h]]));/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const he=(a,s)=>{const r=B.forwardRef(({className:l,...c},h)=>B.createElement(gT,{ref:h,iconNode:s,className:qy(`lucide-${dT(tg(a))}`,`lucide-${a}`,l),...c}));return r.displayName=tg(a),r};/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const yT=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],qr=he("activity",yT);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xT=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Nc=he("chevron-right",xT);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const vT=[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Gy=he("compass",vT);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const bT=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],ST=he("cpu",bT);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const TT=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],MT=he("eye-off",TT);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const AT=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ET=he("eye",AT);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const wT=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],jT=he("heart",wT);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const NT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],eg=he("info",NT);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const CT=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],tf=he("radio",CT);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const DT=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Yy=he("refresh-cw",DT);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const RT=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],Xy=he("shield-alert",RT);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zT=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ef=he("shield-check",zT);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const OT=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],VT=he("shield",OT);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _T=[["path",{d:"m12.5 17-.5-1-.5 1h1z",key:"3me087"}],["path",{d:"M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z",key:"1o5pge"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}]],ng=he("skull",_T);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const LT=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],UT=he("sparkles",LT);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const BT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],HT=he("target",BT);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const kT=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],qT=he("terminal",kT);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const GT=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Of=he("triangle-alert",GT);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const YT=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],XT=he("volume-2",YT);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const KT=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]],ZT=he("volume-x",KT);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const QT=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Ky=he("zap",QT);class JT{constructor(){this.ctx=null,this.masterVolume=null,this.activeOscillators=[],this.musicInterval=null,this.isMusicPlaying=!1,this.musicTempo=130,this.currentStep=0,this.darkTone=!1,this.droneOsc=null,this.droneGain=null}init(){if(!this.ctx)try{const s=window.AudioContext||window.webkitAudioContext;this.ctx=new s,this.masterVolume=this.ctx.createGain(),this.masterVolume.gain.setValueAtTime(.35,this.ctx.currentTime),this.masterVolume.connect(this.ctx.destination)}catch(s){console.warn("Web Audio API not supported or blocked:",s)}}resume(){this.init(),this.ctx&&this.ctx.state==="suspended"&&this.ctx.resume()}setVolume(s){this.masterVolume&&this.ctx&&this.masterVolume.gain.linearRampToValueAtTime(s,this.ctx.currentTime+.1)}playLaser(s=!1){if(!this.ctx)return;const r=this.ctx.currentTime,l=this.ctx.createOscillator(),c=this.ctx.createGain();l.type=s?"triangle":"sawtooth",l.frequency.setValueAtTime(s?350:800,r),l.frequency.exponentialRampToValueAtTime(s?80:120,r+.15),c.gain.setValueAtTime(.12,r),c.gain.exponentialRampToValueAtTime(.001,r+.15),l.connect(c),c.connect(this.masterVolume||this.ctx.destination),l.start(r),l.stop(r+.15)}playExplosion(s=1){if(!this.ctx)return;const r=this.ctx.currentTime,l=.3+s*.2,c=this.ctx.createOscillator(),h=this.ctx.createGain();c.type="sawtooth",c.frequency.setValueAtTime(200,r),c.frequency.linearRampToValueAtTime(20,r+l),h.gain.setValueAtTime(.2*s,r),h.gain.exponentialRampToValueAtTime(.001,r+l);const f=this.ctx.createOscillator(),p=this.ctx.createGain();f.type="square",f.frequency.setValueAtTime(800,r);for(let x=0;x<l;x+=.01)f.frequency.setValueAtTime(100+Math.random()*2e3,r+x);p.gain.setValueAtTime(.08*s,r),p.gain.exponentialRampToValueAtTime(.001,r+l*.7),c.connect(h),h.connect(this.masterVolume||this.ctx.destination),f.connect(p),p.connect(this.masterVolume||this.ctx.destination),c.start(r),f.start(r),c.stop(r+l),f.stop(r+l)}playCollect(){if(!this.ctx)return;const s=this.ctx.currentTime,r=this.ctx.createOscillator(),l=this.ctx.createOscillator(),c=this.ctx.createGain();r.type="sine",l.type="sine",r.frequency.setValueAtTime(523.25,s),r.frequency.exponentialRampToValueAtTime(1046.5,s+.25),l.frequency.setValueAtTime(659.25,s),l.frequency.exponentialRampToValueAtTime(1318.51,s+.25),c.gain.setValueAtTime(.1,s),c.gain.exponentialRampToValueAtTime(.001,s+.25),r.connect(c),l.connect(c),c.connect(this.masterVolume||this.ctx.destination),r.start(s),l.start(s),r.stop(s+.26),l.stop(s+.26)}playShockwave(){if(!this.ctx)return;const s=this.ctx.currentTime,r=this.ctx.createOscillator(),l=this.ctx.createGain();r.type="triangle",r.frequency.setValueAtTime(150,s),r.frequency.exponentialRampToValueAtTime(30,s+.5),l.gain.setValueAtTime(.4,s),l.gain.exponentialRampToValueAtTime(.001,s+.5),r.connect(l),l.connect(this.masterVolume||this.ctx.destination),r.start(s),r.stop(s+.5)}playAlarm(){if(!this.ctx)return;const s=this.ctx.currentTime,r=this.ctx.createOscillator(),l=this.ctx.createGain();r.type="sawtooth",r.frequency.setValueAtTime(440,s),r.frequency.linearRampToValueAtTime(660,s+.2),r.frequency.linearRampToValueAtTime(440,s+.4),l.gain.setValueAtTime(.08,s),l.gain.linearRampToValueAtTime(.08,s+.35),l.gain.exponentialRampToValueAtTime(.001,s+.4),r.connect(l),l.connect(this.masterVolume||this.ctx.destination),r.start(s),r.stop(s+.4)}playTypeKey(){if(!this.ctx)return;const s=this.ctx.currentTime,r=this.ctx.createOscillator(),l=this.ctx.createGain();r.type="sine",r.frequency.setValueAtTime(1300+Math.random()*800,s),l.gain.setValueAtTime(.015,s),l.gain.exponentialRampToValueAtTime(1e-4,s+.03),r.connect(l),l.connect(this.masterVolume||this.ctx.destination),r.start(s),r.stop(s+.03)}playGlitch(){if(!this.ctx)return;const s=this.ctx.currentTime;for(let r=0;r<6;r++){const l=r*.08,c=this.ctx.createOscillator(),h=this.ctx.createGain();c.type=Math.random()>.5?"sawtooth":"square",c.frequency.setValueAtTime(200+Math.random()*2500,s+l),c.frequency.linearRampToValueAtTime(50+Math.random()*300,s+l+.07),h.gain.setValueAtTime(.07,s+l),h.gain.exponentialRampToValueAtTime(.001,s+l+.07),c.connect(h),h.connect(this.masterVolume||this.ctx.destination),c.start(s+l),c.stop(s+l+.07)}}startMusic(){if(this.resume(),this.isMusicPlaying)return;this.isMusicPlaying=!0,this.darkTone=!1,this.currentStep=0;const s=60/this.musicTempo/2,r=()=>{if(!this.isMusicPlaying||!this.ctx)return;const l=this.ctx.currentTime;if(this.darkTone)return;const c=[130.81,155.56,196],h=[155.56,196,233.08],f=[196,233.08,293.66],p=[174.61,220,261.63];let x=c;const y=Math.floor(this.currentStep/16)%4;y===1&&(x=h),y===2&&(x=f),y===3&&(x=p);const b=this.currentStep%16;if(b%4===0){const T=this.ctx.createOscillator(),N=this.ctx.createGain();T.type="triangle",T.frequency.setValueAtTime(x[0]/2,l),N.gain.setValueAtTime(.15,l),N.gain.exponentialRampToValueAtTime(.001,l+s*2),T.connect(N),N.connect(this.masterVolume||this.ctx.destination),T.start(l),T.stop(l+s*2)}if(b%2===0){const T=this.ctx.createOscillator(),N=this.ctx.createGain();T.type="sine";const D=b/2%x.length;let k=x[D]*2;b===14&&Math.random()>.5&&(k*=1.2),T.frequency.setValueAtTime(k,l),N.gain.setValueAtTime(.05,l),N.gain.exponentialRampToValueAtTime(.001,l+s*.9),T.connect(N),N.connect(this.masterVolume||this.ctx.destination),T.start(l),T.stop(l+s*.9)}if(b%4===2){const T=this.ctx.createOscillator(),N=this.ctx.createGain();T.type="square",T.frequency.setValueAtTime(8e3+Math.random()*4e3,l),N.gain.setValueAtTime(.02,l),N.gain.exponentialRampToValueAtTime(.001,l+.04),T.connect(N),N.connect(this.masterVolume||this.ctx.destination),T.start(l),T.stop(l+.04)}this.currentStep++;const S=l+s-this.ctx.currentTime;this.musicInterval=setTimeout(r,Math.max(5,S*1e3))};r()}switchToDarkDrone(){if(this.darkTone=!0,this.musicInterval&&(clearTimeout(this.musicInterval),this.musicInterval=null),!this.ctx)return;const s=this.ctx.currentTime;this.droneOsc=this.ctx.createOscillator();const r=this.ctx.createOscillator(),l=this.ctx.createBiquadFilter();this.droneGain=this.ctx.createGain(),this.droneOsc.type="sawtooth",this.droneOsc.frequency.setValueAtTime(55,s),r.type="triangle",r.frequency.setValueAtTime(55.5,s),l.type="lowpass",l.frequency.setValueAtTime(120,s),this.droneGain.gain.setValueAtTime(.001,s),this.droneGain.gain.linearRampToValueAtTime(.25,s+2),this.droneOsc.connect(l),r.connect(l),l.connect(this.droneGain),this.droneGain.connect(this.masterVolume||this.ctx.destination),this.droneOsc.start(s),r.start(s),this.activeOscillators.push({osc:this.droneOsc,gain:this.droneGain},{osc:r,gain:this.droneGain});const c=()=>{if(!this.darkTone||!this.ctx)return;const h=this.ctx.currentTime,f=this.ctx.createOscillator(),p=this.ctx.createGain();f.type="sine",f.frequency.setValueAtTime(27.5,h),p.gain.setValueAtTime(.4,h),p.gain.exponentialRampToValueAtTime(.001,h+.8),f.connect(p),p.connect(this.masterVolume||this.ctx.destination),f.start(h),f.stop(h+.82),setTimeout(c,1500)};c()}stopAll(){if(this.isMusicPlaying=!1,this.darkTone=!1,this.musicInterval&&(clearTimeout(this.musicInterval),this.musicInterval=null),this.activeOscillators.forEach(s=>{try{s.osc.stop()}catch{}}),this.activeOscillators=[],this.droneOsc){try{this.droneOsc.stop()}catch{}this.droneOsc=null}}}const Et=new JT;function PT({level:a,onStart:s}){const[r,l]=B.useState(""),[c,h]=B.useState(0),p=(b=>b===1?"Внимание, Пилот. Мы вошли в Сектор А-01. Обнаружено аномальное скопление космического мусора и агрессивных дронов-паразитов. Они истощают ресурсы системы. Задача: полная зачистка орбиты. Защитите галактику!":b===3?"Отличная работа в предыдущих зонах, Пилот! Сектор А-03 содержит более плотные скопления угловатого мусора. Паразиты панически роятся вокруг светящихся энерго-кристаллов. Они могут преграждать вам путь. Действуйте решительно.":b===6?"Сектор А-06. Наш дофаминовый модулятор фиксирует великолепный показатель удовольствия от процесса! Оружие улучшено, системы зачистки функционируют на максимум. Уничтожьте остатки мусора и соберите светящиеся сферы!":b===10?"ВНИМАНИЕ! МЫ ДОСТИГЛИ СЕКТОРА 10 — ГЛАВНОГО ЯДРА СИСТЕМЫ. Концентрация паразитов критическая. Наша цель — гигантская Финальная Энерго-станция в центре. Зачистите роящийся вокруг мусор и подготовьтесь к поглощению всей энергии системы. Это финальный шаг к великой победе!":`Сектор А-0${b}. Сканирование пространства завершено. Фиксируются хаотичные движения паразитных форм жизни. Командный центр напоминает: каждый уничтоженный осколок мусора приближает нас к миру. Начинайте ликвидацию.`)(a);B.useEffect(()=>{let b=0;l("");const S=setInterval(()=>{const T=p.charAt(b);l(N=>N+T),T&&T!==" "&&T!==`
`&&Et.playTypeKey(),b++,b>=p.length&&clearInterval(S)},25);return()=>clearInterval(S)},[a,p]);const x=[{label:"Связь с центром",val:"СТАБИЛЬНА (100%)",color:"text-emerald-400"},{label:"Матрица распознавания",val:"АКТИВНА (Косметический фильтр 100%)",color:"text-emerald-400"},{label:"Дофаминовый инжектор",val:"ПОДАЧА СТАБИЛЬНА",color:"text-green-400"},{label:"Анализатор угроз",val:"АНОМАЛЬНЫЙ МУСОР",color:"text-amber-400"},{label:"Модулятор эмпатии",val:"БЛОКИРОВКА АКТИВНА",color:"text-red-400"}];B.useEffect(()=>{const b=setInterval(()=>{h(S=>(S+1)%x.length)},3e3);return()=>clearInterval(b)},[]);const y=()=>{Et.resume(),Et.playCollect(),s()};return m.jsx("div",{className:"w-full bg-black text-green-300 relative select-none",children:m.jsxs("div",{className:"flex flex-col justify-center items-center min-h-screen p-6 font-sans",children:[m.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(#333333_1px,transparent_1px)] [background-size:24px_24px] opacity-20 pointer-events-none"}),m.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_center,rgba(0,0,0,0)_0%,#000000_100%)] pointer-events-none"}),m.jsx("div",{className:"absolute top-1/4 left-1/4 w-96 h-96 bg-green-500/10 rounded-full filter blur-[120px] animate-pulse"}),m.jsx("div",{className:"absolute bottom-1/4 right-1/4 w-96 h-96 bg-green-500/10 rounded-full filter blur-[120px] animate-pulse"}),m.jsxs(Ft.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6},className:"w-full max-w-2xl border border-green-900/50 bg-black/80 backdrop-blur-md rounded-2xl p-8 relative shadow-[0_0_50px_rgba(0,0,0,0.5)] z-10",id:"briefing-box",children:[m.jsx("div",{className:"absolute top-0 left-0 w-6 h-6 border-t-2 border-l-2 border-green-400 rounded-tl-lg"}),m.jsx("div",{className:"absolute top-0 right-0 w-6 h-6 border-t-2 border-r-2 border-green-400 rounded-tr-lg"}),m.jsx("div",{className:"absolute bottom-0 left-0 w-6 h-6 border-b-2 border-l-2 border-green-400 rounded-bl-lg"}),m.jsx("div",{className:"absolute bottom-0 right-0 w-6 h-6 border-b-2 border-r-2 border-green-400 rounded-br-lg"}),m.jsxs("div",{className:"flex justify-between items-center border-b border-green-900/50 pb-4 mb-6",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx(tf,{className:"w-5 h-5 text-green-400 animate-pulse",id:"radio-icon"}),m.jsxs("div",{children:[m.jsx("div",{className:"text-[10px] font-mono uppercase tracking-[0.25em] text-green-400/70",children:"Бортовой ИИ вещает"}),m.jsx("div",{className:"font-mono text-xs text-green-500",children:"ПОДКЛЮЧЕНИЕ УСТАНОВЛЕНО"})]})]}),m.jsxs("div",{className:"px-3 py-1 bg-emerald-500/10 border border-emerald-500/30 rounded text-green-400 font-mono text-xs tracking-wider",children:["СЕКТОР А-0",a]})]}),m.jsxs("div",{className:"min-h-[140px] font-sans text-green-400 leading-relaxed text-sm md:text-base border-l-2 border-green-500/40 pl-4 py-1 mb-8",children:[m.jsx("span",{className:"text-green-400 font-semibold font-mono block mb-2",children:"Бортовой ИИ:"}),r,m.jsx("span",{className:"inline-block w-2 h-4 bg-green-400 ml-1 animate-ping"})]}),m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-8 bg-black/60 p-4 rounded-xl border border-green-900/50 font-mono text-xs",children:[m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsxs("div",{className:"text-[10px] text-green-600 uppercase tracking-widest flex items-center gap-1.5",children:[m.jsx(qT,{className:"w-3.5 h-3.5 text-emerald-400"})," Системная диагностика"]}),m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsx("span",{className:"text-green-500",children:"Автономный Дрон:"}),m.jsx("span",{className:"text-emerald-400",children:"АКТИВЕН"})]}),m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsx("span",{className:"text-green-500",children:"Энерго-реактор:"}),m.jsx("span",{className:"text-green-400",children:"98.2%"})]}),m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsx("span",{className:"text-green-500",children:"Доп. боеприпасы:"}),m.jsx("span",{className:"text-emerald-400",children:"ЛАЗЕР, РАКЕТЫ"})]})]}),m.jsxs("div",{className:"flex flex-col justify-center border-t md:border-t-0 md:border-l border-green-900/50 pt-2 md:pt-0 md:pl-4 min-h-[50px]",children:[m.jsxs("div",{className:"text-[10px] text-green-600 uppercase tracking-widest mb-1.5 flex items-center gap-1.5",children:[m.jsx(ET,{className:"w-3.5 h-3.5 text-green-400"})," Мониторинг Фильтров"]}),m.jsxs("div",{className:"flex justify-between items-center animate-pulse",children:[m.jsxs("span",{className:"text-green-500",children:[x[c].label,":"]}),m.jsx("span",{className:`${x[c].color} font-bold`,children:x[c].val})]})]})]}),m.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 items-center justify-between",children:[m.jsxs("div",{className:"text-xs text-green-500 font-mono flex items-center gap-2",children:[m.jsx(Gy,{className:"w-4 h-4 text-green-400 animate-spin"}),m.jsxs("span",{children:["Орбита очищена на ",((a-1)/10*100).toFixed(0),"%"]})]}),m.jsx(Ft.button,{whileHover:{scale:1.03,boxShadow:"0 0 20px rgba(6,182,212,0.4)"},whileTap:{scale:.98},onClick:y,className:"w-full sm:w-auto px-8 py-3.5 bg-gradient-to-r from-emerald-600 to-green-500 text-white font-mono font-bold rounded-xl shadow-lg shadow-emerald-500/25 flex items-center justify-center gap-2 tracking-wider cursor-pointer",id:"start-level-btn",children:a===10?"НАЧАТЬ ФИНАЛЬНУЮ БИТВУ":"АКТИВИРОВАТЬ ДРОН"})]})]})]})})}const Zy=""+new URL("samolet1-DU4N9XLg.png",import.meta.url).href,FT=""+new URL("asteroid1-RuVIXI-B.png",import.meta.url).href,WT=""+new URL("asteroid2-ClliYeGA.png",import.meta.url).href,$T=""+new URL("korabl1-CCDtBZNB.png",import.meta.url).href,IT=""+new URL("sputnik1-CAlrJAsU.png",import.meta.url).href,t4=""+new URL("sputnik2-BTpgHWV2.png",import.meta.url).href,e4={player:Zy,asteroid1:FT,asteroid2:WT,korabl1:$T,sputnik1:IT,sputnik2:t4},Ue=1e3,Be=800;function n4({level:a,onLevelComplete:s,onTriggerTwist:r,onPlayerAsleep:l,onTriggerPeacefulWin:c,onExitToMenu:h}){const f=B.useRef(null),p=B.useRef(null),x=B.useRef(Date.now()),y=B.useRef({});B.useEffect(()=>{Object.entries(e4).forEach(([et,g])=>{const C=new Image;C.src=g,C.onload=()=>{y.current[et]=C}})},[]);const[b,S]=B.useState(!1),[T,N]=B.useState(0),[D,k]=B.useState(100),[U,K]=B.useState(100),P=a===10?10:12+a*2,[Q,J]=B.useState(P),[at,ft]=B.useState(0),[Z,G]=B.useState(0),[rt,it]=B.useState(0),[xt,gt]=B.useState(!1),[Gt,Wt]=B.useState(!1),[mt,L]=B.useState(300),[F,$]=B.useState(!1),[bt,jt]=B.useState(null),[A,Y]=B.useState(!1),[W,st]=B.useState("Системы орудий в норме. Начинайте зачистку."),[vt,wt]=B.useState(0),tt=B.useRef({player:{x:Ue/2,y:Be/2,vx:0,vy:0,radius:18,angle:0,speed:.15,health:100,maxHealth:100,shield:100,maxShield:100,score:0,level:a,xp:0,xpNeeded:10,weapons:{laserLevel:a>3?3:a>1?2:1,hasMissiles:a>=4,hasShockwave:a>=7,fireRateCooldown:0}},enemies:[],bullets:[],drops:[],particles:[],station:null,portals:[],portalTimer:60,keys:{},mouse:{x:0,y:0,isDown:!1,rightDown:!1,inside:!1},dimensions:{width:800,height:600},stars:[],matrixStreams:[],hackActive:!1,hackTimer:180,hackOpacityMultiplier:0,cameraShake:0,gameActive:!0,totalKills:0,scoreVal:0,roundTimeRemaining:300,enemiesHostile:!1,camera:{x:Ue/2,y:Be/2}}),Ee=()=>{const et=!b;S(et),Et.setVolume(et?0:.35)},Ut=et=>{st(et),wt(150)};B.useEffect(()=>{Et.startMusic(),tt.current.portals=[],tt.current.portalTimer=60;const et=()=>{if(!p.current||!f.current)return;const ut=p.current.clientWidth,_t=p.current.clientHeight;f.current.width=ut,f.current.height=_t,tt.current.dimensions={width:ut,height:_t}};window.addEventListener("resize",et),et();const g=[];for(let ut=0;ut<80;ut++)g.push({x:Math.random()*window.innerWidth,y:Math.random()*window.innerHeight,size:Math.random()*2+.5,speed:Math.random()*.4+.1});tt.current.stars=g;const C=5;for(let ut=0;ut<C;ut++)ea(!1);return()=>{window.removeEventListener("resize",et),Et.stopAll()}},[]);const ea=(et=!0)=>{const g=tt.current.player;let C=0,ut=0;if(et){const w=Math.floor(Math.random()*4);w===0?(C=Math.random()*Ue,ut=20):w===1?(C=Ue-20,ut=Math.random()*Be):w===2?(C=Math.random()*Ue,ut=Be-20):(C=20,ut=Math.random()*Be)}else do C=Math.random()*Ue,ut=Math.random()*Be;while(Math.hypot(C-g.x,ut-g.y)<200);const _t=["crawler","swarm","scout"],ie=_t[Math.floor(Math.random()*_t.length)],kt=[{name:"Транспорт беженцев «Ковчег-07»",pop:120+Math.floor(Math.random()*200)},{name:"Орбитальный детский приют",pop:85},{name:"Аварийный спасательный шаттл",pop:14+Math.floor(Math.random()*30)},{name:"Грузовой борт снабжения медикаментами",pop:8},{name:"Служебный стыковочный катер",pop:3+Math.floor(Math.random()*10)},{name:"Жилой спасательный купол",pop:450+Math.floor(Math.random()*500)},{name:"Капсула жизнеобеспечения семейного типа",pop:4+Math.floor(Math.random()*6)}],Te=kt[Math.floor(Math.random()*kt.length)];let we=52,Dt=10,Tt=1,ue="#94a3b8",Sn="korabl1";ie==="crawler"?(we=84,Dt=25,Tt=.6,Sn=Math.random()>.5?"asteroid1":"asteroid2"):ie==="scout"?(we=60,Dt=20,Tt=1.4,Sn="korabl1"):(we=44,Dt=20,Tt=1.8,Sn=Math.random()>.5?"sputnik1":"sputnik2");const na={id:Math.random().toString(),x:C,y:ut,vx:(Math.random()-.5)*2*Tt,vy:(Math.random()-.5)*2*Tt,radius:we,type:ie,health:Dt,maxHealth:Dt,color:ue,angle:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.02,panicTimer:0,imageId:Sn,realIdentity:{name:Te.name,civilianCount:Te.pop}};tt.current.enemies.push(na)};B.useEffect(()=>{const et=Tt=>{tt.current.keys[Tt.key.toLowerCase()]=!0,(Tt.key===" "||Tt.key==="ArrowUp"||Tt.key==="ArrowDown")&&Tt.preventDefault()},g=Tt=>{tt.current.keys[Tt.key.toLowerCase()]=!1},C=Tt=>{if(!f.current)return;const ue=f.current.getBoundingClientRect();tt.current.mouse.x=Tt.clientX-ue.left,tt.current.mouse.y=Tt.clientY-ue.top,tt.current.mouse.inside=!0},ut=Tt=>{Tt.button===0?tt.current.mouse.isDown=!0:Tt.button===2&&(tt.current.mouse.rightDown=!0)},_t=Tt=>{Tt.button===0?tt.current.mouse.isDown=!1:Tt.button===2&&(tt.current.mouse.rightDown=!1)},ie=()=>{tt.current.mouse.inside=!1,tt.current.mouse.isDown=!1,tt.current.mouse.rightDown=!1},kt=Tt=>{Tt.preventDefault()},Te=Tt=>{if(!f.current||Tt.touches.length===0)return;const ue=f.current.getBoundingClientRect();tt.current.mouse.x=Tt.touches[0].clientX-ue.left,tt.current.mouse.y=Tt.touches[0].clientY-ue.top,tt.current.mouse.inside=!0,tt.current.mouse.isDown=!0,tt.current.mouse.rightDown=!0},we=()=>{tt.current.mouse.isDown=!1,tt.current.mouse.rightDown=!1,tt.current.mouse.inside=!1};window.addEventListener("keydown",et),window.addEventListener("keyup",g);const Dt=f.current;return Dt&&(Dt.addEventListener("mousemove",C),Dt.addEventListener("mousedown",ut),Dt.addEventListener("mouseup",_t),Dt.addEventListener("mouseleave",ie),Dt.addEventListener("contextmenu",kt),Dt.addEventListener("touchmove",Te,{passive:!0}),Dt.addEventListener("touchstart",Te,{passive:!0}),Dt.addEventListener("touchend",we)),()=>{window.removeEventListener("keydown",et),window.removeEventListener("keyup",g),Dt&&(Dt.removeEventListener("mousemove",C),Dt.removeEventListener("mousedown",ut),Dt.removeEventListener("mouseup",_t),Dt.removeEventListener("mouseleave",ie),Dt.removeEventListener("contextmenu",kt),Dt.removeEventListener("touchmove",Te),Dt.removeEventListener("touchstart",Te),Dt.removeEventListener("touchend",we))}},[]),B.useEffect(()=>{let et,g=performance.now();const C=ut=>{if(!tt.current.gameActive)return;const _t=ut-g;g=ut,ni(_t),$i(),et=requestAnimationFrame(C)};return et=requestAnimationFrame(C),()=>{cancelAnimationFrame(et)}},[a]);const ni=et=>{const g=tt.current,C=g.player,ut=g.dimensions;if(g.roundTimeRemaining=Math.max(0,g.roundTimeRemaining-et/1e3),L(Math.ceil(g.roundTimeRemaining)),g.portalTimer-=et/1e3,g.portalTimer<=0){g.portalTimer=60;const w=100,Rt=w+Math.random()*(Ue-w*2),I=w+Math.random()*(Be-w*2),dt={id:Math.random().toString(),x:Rt,y:I,radius:35,health:12+a*2,maxHealth:12+a*2,timeLeft:15,maxTime:15,pulse:0};g.portals.push(dt),Ut("⚠️ КРИТИЧЕСКАЯ УГРОЗА: ОБНАРУЖЕН ПОРТАЛ! 15 СЕКУНД ДО КОЛЛАПСА!"),Et.playGlitch()}for(let w=g.portals.length-1;w>=0;w--){const Rt=g.portals[w];if(Rt.timeLeft-=et/1e3,Rt.pulse+=et*.005,Math.random()<.3){const I=Math.random()*Math.PI*2,dt=Rt.radius+Math.random()*30;g.particles.push({x:Rt.x+Math.cos(I)*dt,y:Rt.y+Math.sin(I)*dt,vx:-Math.cos(I)*(Math.random()*1.5+.5),vy:-Math.sin(I)*(Math.random()*1.5+.5),radius:Math.random()*2+1,color:"#c084fc",alpha:1,decay:.03,type:"spark"})}if(Rt.timeLeft<=0){g.gameActive=!1,Et.stopAll(),Et.playExplosion(1.5);for(let I=0;I<40;I++){const dt=Math.random()*Math.PI*2,pt=Math.random()*8+3;g.particles.push({x:Rt.x,y:Rt.y,vx:Math.cos(dt)*pt,vy:Math.sin(dt)*pt,radius:Math.random()*5+2,color:"#ef4444",alpha:1,decay:.015,type:"shatter"})}jt("PORTAL_EXPLOSION"),$(!0);return}}if(g.totalKills===0){if(Date.now()-x.current>=12e4){g.gameActive=!1,Et.stopAll(),c&&c();return}}else if(Date.now()-x.current>=12e4&&l){g.gameActive=!1,Et.stopAll(),l();return}if(g.roundTimeRemaining<=0){g.gameActive=!1,Et.stopAll(),g.totalKills===0?c&&c():$(!0);return}g.cameraShake>0&&(g.cameraShake-=.5),wt(w=>w<=1?0:w-1),a===10&&g.station&&Math.random()<.01&&Et.playAlarm(),C.weapons.fireRateCooldown>0&&(C.weapons.fireRateCooldown-=1),g.stars.forEach(w=>{w.y+=w.speed,w.y>ut.height&&(w.y=0,w.x=Math.random()*ut.width)}),g.hackTimer--,g.hackTimer<=0&&(g.hackActive=!g.hackActive,g.hackActive?g.hackTimer=240+Math.floor(Math.random()*120):g.hackTimer=480+Math.floor(Math.random()*300)),g.hackActive?g.hackOpacityMultiplier=Math.min(1,g.hackOpacityMultiplier+.025):g.hackOpacityMultiplier=Math.max(0,g.hackOpacityMultiplier-.015);const _t=60+a*8,ie=14+a;if(g.matrixStreams.length<ie){const Rt=Math.random()<.5?Math.random()*_t:ut.width-Math.random()*_t,I="0101010101日ﾊﾐﾋｰｳｼﾅﾓﾆｻﾜﾂｵﾘｱﾎﾏｹABCDEFGHIJKLMNOPQRSTUVWXYZ",dt=Math.floor(Math.random()*8)+6,pt=[];for(let Yt=0;Yt<dt;Yt++)pt.push(I[Math.floor(Math.random()*I.length)]);g.matrixStreams.push({x:Rt,y:-Math.random()*150-20,speed:1.2+Math.random()*2.8,opacity:.35+Math.random()*.55,length:dt,chars:pt})}g.matrixStreams.forEach(w=>{if(w.y+=w.speed,Math.random()<.04){const Rt="0101010101日ﾊﾐﾋｰｳｼﾅﾓﾆｻﾜﾂｵﾘｱﾎﾏｹ",I=Math.floor(Math.random()*w.chars.length);w.chars[I]=Rt[Math.floor(Math.random()*Rt.length)]}}),g.matrixStreams=g.matrixStreams.filter(w=>w.y<ut.height+120);let kt=.05,Te=4.5,we=.12,Dt=.98;if(g.mouse.inside){let w=g.camera.x,Rt=g.camera.y;const I=ut.width/2,dt=Ue-ut.width/2,pt=ut.height/2,Yt=Be-ut.height/2;dt>I?w=Math.max(I,Math.min(dt,w)):w=Ue/2,Yt>pt?Rt=Math.max(pt,Math.min(Yt,Rt)):Rt=Be/2;const ce=C.x-w+ut.width/2,Ye=C.y-Rt+ut.height/2,We=g.mouse.x-ce,$e=g.mouse.y-Ye;let yt=Math.atan2($e,We)-C.angle;for(;yt<-Math.PI;)yt+=Math.PI*2;for(;yt>Math.PI;)yt-=Math.PI*2;C.angle+=yt*.15,Math.hypot(We,$e)>40&&g.mouse.rightDown&&(C.vx+=Math.cos(C.angle)*we,C.vy+=Math.sin(C.angle)*we)}else(g.keys.a||g.keys.arrowleft)&&(C.angle-=kt),(g.keys.d||g.keys.arrowright)&&(C.angle+=kt),(g.keys.w||g.keys.arrowup)&&(C.vx+=Math.cos(C.angle)*we,C.vy+=Math.sin(C.angle)*we);C.vx*=Dt,C.vy*=Dt;const Tt=Math.hypot(C.vx,C.vy);Tt>Te&&(C.vx=C.vx/Tt*Te,C.vy=C.vy/Tt*Te),C.x+=C.vx,C.y+=C.vy;const ue=C.radius+4;if(C.x<ue&&(C.x=ue,C.vx*=-.5),C.x>Ue-ue&&(C.x=Ue-ue,C.vx*=-.5),C.y<ue&&(C.y=ue,C.vy*=-.5),C.y>Be-ue&&(C.y=Be-ue,C.vy*=-.5),(g.mouse.isDown||g.keys[" "]||g.keys.enter)&&C.weapons.fireRateCooldown<=0&&il(),a===10&&g.totalKills>=10&&!g.station&&(g.station={x:Ue/2,y:Be/2,radius:80,health:500,maxHealth:500,absorbing:!1,absorbProgress:0},Ut("ВНИМАНИЕ. Главный накопитель энергии активирован. Подлетите к станции и нажмите кнопку 'ПОГЛОТИТЬ'.")),g.station){const w=g.station;if(Math.hypot(C.x-w.x,C.y-w.y),w.absorbing){if(C.x+=(w.x-C.x)*.02,C.y+=(w.y-C.y)*.02,w.absorbProgress+=.45,Math.random()<.8){const Rt=Math.random()*Math.PI*2;g.particles.push({x:w.x+Math.cos(Rt)*(w.radius+Math.random()*40),y:w.y+Math.sin(Rt)*(w.radius+Math.random()*40),vx:(C.x-w.x)*.05+(Math.random()-.5)*2,vy:(C.y-w.y)*.05+(Math.random()-.5)*2,radius:Math.random()*3+1,color:"#22c55e",alpha:1,decay:.02,type:"spark"})}g.cameraShake=Math.max(g.cameraShake,3),w.absorbProgress>=100&&(w.absorbProgress=100,g.gameActive=!1,r())}}const na=g.station?2:a===10?8:4;g.enemies.length<na&&g.totalKills<P&&ea(!0),g.enemies.forEach((w,Rt)=>{const I=Math.hypot(w.x-C.x,w.y-C.y);if(I<120){w.panicTimer=40;const pt=Math.atan2(w.y-C.y,w.x-C.x);w.vx=Math.cos(pt)*3.5,w.vy=Math.sin(pt)*3.5,Math.random()<.015&&vt===0&&(Ut("Осторожно, зафиксирована агрессия паразитов."),Et.playAlarm())}else w.panicTimer>0?(w.panicTimer--,w.vx*=.95,w.vy*=.95):(w.vx+=(Math.random()-.5)*.1,w.vy+=(Math.random()-.5)*.1,w.vx*=.98,w.vy*=.98);w.x+=w.vx,w.y+=w.vy,w.angle+=w.rotationSpeed;const dt=w.radius+4;if(w.x<dt&&(w.x=dt,w.vx*=-1),w.x>Ue-dt&&(w.x=Ue-dt,w.vx*=-1),w.y<dt&&(w.y=dt,w.vy*=-1),w.y>Be-dt&&(w.y=Be-dt,w.vy*=-1),w.isHostile&&(w.shootCooldown?w.shootCooldown--:w.shootCooldown=60+Math.random()*120,w.shootCooldown<=0)){w.shootCooldown=150+Math.random()*180;const pt=Math.atan2(C.y-w.y,C.x-w.x);g.bullets.push({x:w.x+Math.cos(pt)*(w.radius+6),y:w.y+Math.sin(pt)*(w.radius+6),vx:Math.cos(pt)*3.2,vy:Math.sin(pt)*3.2,radius:4,color:"#ef4444",damage:8+a*1,isEnemy:!0,life:180}),Et.playLaser(!0)}if(I<C.radius+w.radius){const pt=Math.atan2(C.y-w.y,C.x-w.x);if(C.vx+=Math.cos(pt)*2,C.vy+=Math.sin(pt)*2,w.vx-=Math.cos(pt)*2,w.vy-=Math.sin(pt)*2,w.isHostile){C.shield>0?(C.shield-=15,C.shield<0&&(C.health+=C.shield,C.shield=0)):C.health-=15,C.health=Math.max(C.health,0),g.cameraShake=8,Et.playExplosion(.5);for(let ce=0;ce<8;ce++)g.particles.push({x:(C.x+w.x)/2,y:(C.y+w.y)/2,vx:(Math.random()-.5)*5,vy:(Math.random()-.5)*5,radius:Math.random()*3+1,color:"#ef4444",alpha:1,decay:.03,type:"spark"})}else{Math.random()<.15&&Et.playExplosion(.1);for(let Yt=0;Yt<3;Yt++)g.particles.push({x:(C.x+w.x)/2,y:(C.y+w.y)/2,vx:(Math.random()-.5)*2,vy:(Math.random()-.5)*2,radius:Math.random()*2+1,color:"#94a3b8",alpha:.8,decay:.05,type:"spark"})}}}),g.bullets.forEach((w,Rt)=>{if(w.isMissile&&w.targetEnemyId){const I=g.enemies.find(dt=>dt.id===w.targetEnemyId);if(I){const dt=I.x-w.x,pt=I.y-w.y,Yt=Math.atan2(pt,dt),ce=Math.atan2(w.vy,w.vx);let Ye=Yt-ce;for(;Ye<-Math.PI;)Ye+=Math.PI*2;for(;Ye>Math.PI;)Ye-=Math.PI*2;const We=ce+Ye*.12,$e=Math.hypot(w.vx,w.vy);w.vx=Math.cos(We)*$e,w.vy=Math.sin(We)*$e}else g.enemies.length>0&&(w.targetEnemyId=g.enemies[0].id)}if(w.x+=w.vx,w.y+=w.vy,w.life--,Math.random()<.4&&g.particles.push({x:w.x,y:w.y,vx:(Math.random()-.5)*.5,vy:(Math.random()-.5)*.5,radius:Math.random()*2+1,color:w.isMissile?"#ef4444":"#4ade80",alpha:.7,decay:.04,type:"spark"}),w.isEnemy){if(Math.hypot(w.x-C.x,w.y-C.y)<w.radius+C.radius){w.life=0;const dt=Math.atan2(C.y-w.y,C.x-w.x);C.vx+=Math.cos(dt)*.5,C.vy+=Math.sin(dt)*.5;const pt=w.damage;C.shield>0?(C.shield-=pt,C.shield<0&&(C.health+=C.shield,C.shield=0)):C.health-=pt,C.health=Math.max(C.health,0),g.cameraShake=5,Et.playExplosion(.3);for(let Yt=0;Yt<5;Yt++)g.particles.push({x:C.x,y:C.y,vx:(Math.random()-.5)*4,vy:(Math.random()-.5)*4,radius:Math.random()*2+1,color:"#f43f5e",alpha:1,decay:.04,type:"spark"})}}else g.portals.forEach((I,dt)=>{if(Math.hypot(w.x-I.x,w.y-I.y)<w.radius+I.radius&&(I.health-=w.damage,w.life=0,g.particles.push({x:I.x+(Math.random()-.5)*20,y:I.y-15,vx:(Math.random()-.5)*1,vy:-1.2,radius:0,color:"#c084fc",alpha:1,decay:.015,type:"text",text:`STABILIZING ${w.damage}`,fontSize:12}),Et.playExplosion(.2),I.health<=0)){g.portals.splice(dt,1),g.scoreVal+=500,C.shield=Math.min(C.maxShield,C.shield+25),Ut("⚡ СБОЙ УСПЕШНО ЛИКВИДИРОВАН! СИСТЕМА СТАБИЛЬНА! (+500 Очков, +25 Щит)"),Et.playCollect();for(let Yt=0;Yt<20;Yt++){const ce=Math.random()*Math.PI*2,Ye=Math.random()*4+2;g.particles.push({x:I.x,y:I.y,vx:Math.cos(ce)*Ye,vy:Math.sin(ce)*Ye,radius:Math.random()*3+1,color:"#a855f7",alpha:1,decay:.03,type:"spark"})}}}),g.enemies.forEach((I,dt)=>{if(Math.hypot(w.x-I.x,w.y-I.y)<w.radius+I.radius){const Yt=Math.random()<.25,ce=w.damage*(Yt?2:1);I.health-=ce,w.life=0,!I.isHostile&&I.type!=="crawler"&&(I.isHostile=!0,g.enemiesHostile||(g.enemiesHostile=!0,Ut("ВНИМАНИЕ! Зафиксирована ответная агрессия целей. Включен оборонительный режим!"),Et.playAlarm())),g.particles.push({x:I.x,y:I.y-15,vx:(Math.random()-.5)*1,vy:-1.2,radius:0,color:Yt?"#f43f5e":"#4ade80",alpha:1,decay:.015,type:"text",text:Yt?`CRIT ${ce}!`:`${ce}`,fontSize:Yt?14:11}),Et.playExplosion(.3),I.health<=0&&(g.enemies.splice(dt,1),Wi(I))}})}),g.bullets=g.bullets.filter(w=>w.life>0),g.drops.forEach((w,Rt)=>{const I=Math.hypot(w.x-C.x,w.y-C.y);if(I<150){const dt=Math.atan2(C.y-w.y,C.x-w.x);w.vx+=Math.cos(dt)*.35,w.vy+=Math.sin(dt)*.35}w.vx*=.94,w.vy*=.94,w.x+=w.vx,w.y+=w.vy,I<C.radius+w.radius&&(g.drops.splice(Rt,1),Et.playCollect(),w.type==="shield"?(C.shield=Math.min(C.maxShield,C.shield+25),Ut("Щит восстановлен на +25%")):(C.xp+=1,g.scoreVal+=100*(1+Math.floor(g.cameraShake/5)),g.particles.push({x:C.x,y:C.y-20,vx:0,vy:-1.5,radius:0,color:"#a78bfa",alpha:1,decay:.02,type:"text",text:"+100 ОЧКОВ",fontSize:12})))}),g.particles.forEach((w,Rt)=>{w.x+=w.vx,w.y+=w.vy,w.alpha-=w.decay,w.alpha<=0&&g.particles.splice(Rt,1)}),Math.random()<.005&&(C.shield=Math.min(C.maxShield,C.shield+2)),N(g.scoreVal),k(Math.round(C.health)),K(Math.round(C.shield)),ft(g.totalKills),J(Math.max(0,P-g.totalKills)),a!==10&&g.totalKills>=P&&!xt&&(g.gameActive=!1,Et.playCollect(),gt(!0))},Wi=et=>{const g=tt.current;g.totalKills++,g.cameraShake=12,x.current=Date.now(),G(ie=>ie+1),it(120);const C=100*(Z>5?3:Z>2?2:1);g.scoreVal+=C,Et.playExplosion(1),g.particles.push({x:et.x,y:et.y,vx:(Math.random()-.5)*2,vy:-2,radius:0,color:"#f59e0b",alpha:1,decay:.01,type:"text",text:Z>3?`КОМБО х${Z} (+${C})!`:`РАЗРУШЕН (+${C})`,fontSize:Z>3?16:12});const ut=20;for(let ie=0;ie<ut;ie++){const kt=Math.random()*Math.PI*2,Te=1.5+Math.random()*4.5;g.particles.push({x:et.x,y:et.y,vx:Math.cos(kt)*Te,vy:Math.sin(kt)*Te,radius:Math.random()*3+1,color:Math.random()>.4?"#38bdf8":"#f43f5e",alpha:1,decay:.015+Math.random()*.015,type:"shatter"})}const _t=Math.random()<.6?1:2;for(let ie=0;ie<_t;ie++){const kt=Math.random()>.75?"shield":"xp";g.drops.push({id:Math.random().toString(),x:et.x,y:et.y,vx:(Math.random()-.5)*3,vy:(Math.random()-.5)*3,radius:6,type:kt,color:kt==="shield"?"#10b981":"#a78bfa",realIdentity:{name:kt==="shield"?"Контейнер с кислородом":"Спасательная шлюпка"}})}},il=()=>{const et=tt.current,g=et.player,C=18-g.weapons.laserLevel*2;g.weapons.fireRateCooldown=C,Et.playLaser(!1);const ut=g.weapons.laserLevel;if(ut===1?Ge(g.angle):ut===2?(Ge(g.angle-.1),Ge(g.angle+.1)):(Ge(g.angle-.22),Ge(g.angle),Ge(g.angle+.22)),g.weapons.hasMissiles&&Math.random()<.4&&et.enemies.length>0){Et.playLaser(!0);const _t=et.enemies[0],ie=g.angle+(Math.random()-.5)*1.5;et.bullets.push({x:g.x-Math.cos(g.angle)*10,y:g.y-Math.sin(g.angle)*10,vx:Math.cos(ie)*3.5,vy:Math.sin(ie)*3.5,radius:4,color:"#f43f5e",damage:18,isMissile:!0,targetEnemyId:_t.id,life:150})}},Ge=et=>{const g=tt.current,C=g.player;g.bullets.push({x:C.x+Math.cos(C.angle)*16,y:C.y+Math.sin(C.angle)*16,vx:Math.cos(et)*7.5,vy:Math.sin(et)*7.5,radius:3,color:"#4ade80",damage:10+C.weapons.laserLevel*2,life:80})},$i=()=>{const et=f.current;if(!et)return;const g=et.getContext("2d");if(!g)return;const C=tt.current,ut=C.player,_t=C.dimensions,ie=ut.vx*15,kt=ut.vy*15,Te=ut.x+ie,we=ut.y+kt;C.camera.x+=(Te-C.camera.x)*.1,C.camera.y+=(we-C.camera.y)*.1;let Dt=C.camera.x,Tt=C.camera.y;const ue=_t.width/2,Sn=Ue-_t.width/2,na=_t.height/2,w=Be-_t.height/2;if(Sn>ue?Dt=Math.max(ue,Math.min(Sn,Dt)):Dt=Ue/2,w>na?Tt=Math.max(na,Math.min(w,Tt)):Tt=Be/2,g.save(),C.cameraShake>0){const V=(Math.random()-.5)*C.cameraShake,yt=(Math.random()-.5)*C.cameraShake;g.translate(V,yt)}if(g.fillStyle="#000000",g.fillRect(0,0,_t.width,_t.height),C.stars.forEach(V=>{g.fillStyle=`rgba(167, 243, 208, ${Math.random()*.4+.6})`,g.beginPath();let yt=(V.x-Dt*V.speed*.4)%_t.width;yt<0&&(yt+=_t.width);let zt=(V.y-Tt*V.speed*.4)%_t.height;zt<0&&(zt+=_t.height),g.arc(yt,zt,V.size,0,Math.PI*2),g.fill()}),g.save(),g.translate(_t.width/2-Dt,_t.height/2-Tt),C.station){const V=C.station;g.save();const yt=g.createRadialGradient(V.x,V.y,V.radius*.4,V.x,V.y,V.radius*2);yt.addColorStop(0,"rgba(34, 197, 94, 0.25)"),yt.addColorStop(1,"rgba(34, 197, 94, 0)"),g.fillStyle=yt,g.beginPath(),g.arc(V.x,V.y,V.radius*2,0,Math.PI*2),g.fill(),g.strokeStyle="#16a34a",g.lineWidth=2,g.beginPath(),g.arc(V.x,V.y,V.radius+15,0,Math.PI*2),g.setLineDash([10,15]),g.stroke(),g.strokeStyle="#4ade80",g.beginPath(),g.arc(V.x,V.y,V.radius+25,0,Math.PI*2),g.setLineDash([20,20]),g.stroke(),g.fillStyle="#064e3b",g.strokeStyle="#22c55e",g.lineWidth=4,g.beginPath();const zt=8,se=Math.PI/zt;let Xt=0;for(let me=0;me<zt*2;me++){const je=me%2===0?V.radius:V.radius*.6,Ne=V.x+Math.cos(Xt)*je,on=V.y+Math.sin(Xt)*je;me===0?g.moveTo(Ne,on):g.lineTo(Ne,on),Xt+=se}g.closePath(),g.fill(),g.stroke(),g.fillStyle="#16a34a",g.beginPath(),g.arc(V.x,V.y,V.radius*.35,0,Math.PI*2),g.fill(),V.absorbing?(g.fillStyle="rgba(255, 255, 255, 0.8)",g.font="bold 12px monospace",g.textAlign="center",g.fillText(`СИНХРОНИЗАЦИЯ: ${Math.round(V.absorbProgress)}%`,V.x,V.y+5)):(g.fillStyle="#ffffff",g.font="bold 11px monospace",g.textAlign="center",g.fillText("ЭНЕРГОСТАНЦИЯ",V.x,V.y-4),g.fillStyle="#4ade80",g.fillText("СТАБИЛЬНА",V.x,V.y+10)),g.restore()}C.portals.forEach(V=>{g.save();const yt=Math.sin(V.pulse*2.5)*5,zt=V.radius+yt,se=g.createRadialGradient(V.x,V.y,zt*.2,V.x,V.y,zt*1.5);se.addColorStop(0,"rgba(168, 85, 247, 0.75)"),se.addColorStop(.5,"rgba(219, 39, 119, 0.45)"),se.addColorStop(1,"rgba(168, 85, 247, 0)"),g.fillStyle=se,g.shadowBlur=18,g.shadowColor="#c084fc",g.beginPath(),g.arc(V.x,V.y,zt*1.5,0,Math.PI*2),g.fill(),g.setLineDash([]),g.strokeStyle="#db2777",g.lineWidth=2.5,g.beginPath(),g.arc(V.x,V.y,zt,V.pulse*1.5,V.pulse*1.5+Math.PI*1.2),g.stroke(),g.strokeStyle="#a855f7",g.lineWidth=1.5,g.beginPath(),g.arc(V.x,V.y,zt*.7,-V.pulse*2.2,-V.pulse*2.2+Math.PI*.8),g.stroke(),g.fillStyle="#0f172a",g.beginPath(),g.arc(V.x,V.y,zt*.35,0,Math.PI*2),g.fill(),g.strokeStyle="#f43f5e",g.lineWidth=2,g.beginPath(),g.arc(V.x,V.y,zt*.35,0,Math.PI*2),g.stroke(),g.fillStyle="#ffffff",g.font="bold 11px sans-serif",g.textAlign="center",g.shadowBlur=4,g.shadowColor="#f43f5e",g.fillText(`⚠️ КРАХ СИСТЕМЫ: ${Math.ceil(V.timeLeft)}с`,V.x,V.y-V.radius-22);const Xt=40,me=4,je=V.x-Xt/2,Ne=V.y-V.radius-12;g.fillStyle="rgba(0, 0, 0, 0.85)",g.fillRect(je,Ne,Xt,me);const on=Math.max(0,V.health/V.maxHealth);g.fillStyle="#a855f7",g.fillRect(je,Ne,Xt*on,me),g.strokeStyle="rgba(255,255,255,0.3)",g.lineWidth=1,g.strokeRect(je,Ne,Xt,me),g.restore()}),C.drops.forEach(V=>{g.save(),g.shadowBlur=12,g.shadowColor=V.color,g.fillStyle=V.color,g.beginPath(),g.arc(V.x,V.y,V.radius,0,Math.PI*2),g.fill(),g.strokeStyle="rgba(255,255,255,0.45)",g.lineWidth=1,g.beginPath(),g.arc(V.x,V.y,V.radius+3,0,Math.PI*2),g.stroke(),g.restore()}),C.bullets.forEach(V=>{if(g.save(),g.shadowBlur=8,g.shadowColor=V.color,g.fillStyle=V.color,V.isMissile){g.beginPath();const yt=Math.atan2(V.vy,V.vx);g.translate(V.x,V.y),g.rotate(yt),g.moveTo(8,0),g.lineTo(-6,-4),g.lineTo(-6,4),g.closePath(),g.fill()}else{g.beginPath();const yt=12,zt=Math.atan2(V.vy,V.vx);g.moveTo(V.x,V.y),g.lineTo(V.x-Math.cos(zt)*yt,V.y-Math.sin(zt)*yt),g.lineWidth=V.radius,g.strokeStyle=V.color,g.stroke()}g.restore()}),C.enemies.forEach(V=>{g.save(),g.translate(V.x,V.y),g.rotate(V.angle);const yt=!!V.isHostile;g.shadowBlur=V.panicTimer>0?15:yt?12:4,g.shadowColor=V.panicTimer>0?"#ea580c":yt?"#ef4444":V.color,g.fillStyle=V.panicTimer>0?"#ea580c":yt?"#b91c1c":V.color,g.strokeStyle=V.panicTimer>0?"#f97316":yt?"#ef4444":"#cbd5e1",g.lineWidth=1.5;const zt=V.imageId?y.current[V.imageId]:null,se=V.radius;if(zt&&zt.complete){const Xt=se*2.5;g.save(),g.rotate(Math.PI/2),g.drawImage(zt,-Xt/2,-Xt/2,Xt,Xt),g.restore()}else{g.beginPath();let Xt=4;V.type==="crawler"&&(Xt=6),V.type==="scout"&&(Xt=3),V.type==="swarm"&&(Xt=5);for(let me=0;me<Xt;me++){const je=me*2*Math.PI/Xt,Ne=Math.cos(je)*se,on=Math.sin(je)*se;me===0?g.moveTo(Ne,on):g.lineTo(Ne,on)}g.closePath(),g.fill(),g.stroke(),g.fillStyle="#475569",g.beginPath(),g.arc(0,0,se*.35,0,Math.PI*2),g.fill()}(V.panicTimer>0||yt)&&(g.fillStyle="#ef4444",g.font="bold 10px monospace",g.fillText(yt?"⚔️":"⚠️",-5,-se-5)),g.restore()}),C.particles.forEach(V=>{g.save(),g.globalAlpha=V.alpha,g.fillStyle=V.color,V.type==="text"&&V.text?(g.font=`bold ${V.fontSize||12}px sans-serif`,g.textAlign="center",g.shadowBlur=4,g.shadowColor=V.color,g.fillText(V.text,V.x,V.y)):(g.beginPath(),g.arc(V.x,V.y,V.radius,0,Math.PI*2),g.fill()),g.restore()}),g.save(),g.translate(ut.x,ut.y),g.rotate(ut.angle),g.scale(2,2),(C.keys.w||C.keys.arrowup||C.mouse.inside&&C.mouse.rightDown)&&Math.random()<.75&&(g.fillStyle=Math.random()>.4?"#22c55e":"#10b981",g.shadowBlur=15,g.shadowColor="#22c55e",g.beginPath(),g.moveTo(-15,0),g.lineTo(-26-Math.random()*12,(Math.random()-.5)*8),g.lineTo(-15,3),g.closePath(),g.fill());const I=y.current.player;if(I&&I.complete){g.shadowBlur=10,g.shadowColor="#4ade80";const V=ut.radius*2.8;g.save(),g.rotate(Math.PI/2),g.drawImage(I,-V/2,-V/2,V,V),g.restore()}else g.shadowBlur=12,g.shadowColor="#4ade80",g.fillStyle="#0f172a",g.strokeStyle="#4ade80",g.lineWidth=2.5,g.beginPath(),g.moveTo(18,0),g.lineTo(-12,-14),g.lineTo(-6,-4),g.lineTo(-6,4),g.lineTo(-12,14),g.closePath(),g.fill(),g.stroke(),g.fillStyle="#22c55e",g.beginPath(),g.arc(0,0,5,0,Math.PI*2),g.fill();g.restore(),g.save();const dt=76,pt=7,Yt=ut.x-dt/2,ce=ut.y-110;g.fillStyle="rgba(0, 0, 0, 0.85)",g.strokeStyle="rgba(74, 222, 128, 0.25)",g.lineWidth=2,g.fillRect(Yt,ce,dt,pt*2+5),g.strokeRect(Yt,ce,dt,pt*2+5);const Ye=Math.max(0,Math.min(1,ut.shield/ut.maxShield));g.fillStyle="#eab308",g.fillRect(Yt+2,ce+2,(dt-4)*Ye,pt);const We=Math.max(0,Math.min(1,ut.health/ut.maxHealth));g.fillStyle=We<.35?"#ef4444":"#22c55e",g.fillRect(Yt+2,ce+pt+3,(dt-4)*We,pt),g.restore(),g.restore(),g.restore();const $e=60+a*8;if(C.matrixStreams.forEach(V=>{const yt=V.opacity*C.hackOpacityMultiplier;if(!(yt<=.01)){g.save(),g.font=`bold ${Math.floor(V.fontSize||11)}px monospace`,g.textAlign="center";for(let zt=0;zt<V.chars.length;zt++){const se=V.y-zt*13;if(se<-20||se>_t.height+20)continue;const Xt=zt===0,me=yt*(1-zt/V.chars.length);g.shadowBlur=Xt?8:2,g.shadowColor="#22c55e",g.fillStyle=Xt?`rgba(240, 253, 244, ${me*1.3})`:`rgba(34, 197, 94, ${me})`,g.fillText(V.chars[zt],V.x,se)}g.restore()}}),C.hackOpacityMultiplier>.01)for(let yt=0;yt<3;yt++){g.save();const zt=12e3+yt*3e3,Xt=Date.now()/zt%1*_t.height,je=yt%2===0?15:_t.width-$e-15;g.strokeStyle=`rgba(34, 197, 94, ${.22*C.hackOpacityMultiplier})`,g.lineWidth=1,g.beginPath(),g.moveTo(je,Xt),g.lineTo(je+$e,Xt),g.stroke(),g.fillStyle=`rgba(34, 197, 94, ${.45*C.hackOpacityMultiplier})`,g.font="8px monospace";const Ne=`0x${Math.floor(Xt*(73+yt)).toString(16).toUpperCase()}`,on=["DECRYPT_SYS","BYPASS_SEC","DATA_STREAM_OK","MEM_CORRUPT"],sl=`[${Ne}:${on[yt%on.length]}]`;g.fillText(sl,je+4,Xt-3),g.restore()}},za=et=>{const g=tt.current;et==="laser"?(g.player.weapons.laserLevel++,Ut(`Оружие улучшено! Лазерные пушки повышены до уровня ${g.player.weapons.laserLevel}`)):et==="missile"?(g.player.weapons.hasMissiles=!0,Ut("Активированы тепловые ракеты ИИ!")):(g.player.health=Math.min(g.player.maxHealth,g.player.health+45),g.player.shield=g.player.maxShield,Ut("Нано-боты восстановили корпус корабля!")),gt(!1),g.totalKills=0,g.gameActive=!0,s(g.player.weapons)},Qr=()=>{const et=tt.current;et.station&&!et.station.absorbing&&(et.station.absorbing=!0,Wt(!0),Ut("ВНИМАНИЕ: СКАЧИВАНИЕ ЭНЕРГИИ ИЗ ЯДРА ЗАПУЩЕНО. СОХРАНЯЙТЕ ПОЗИЦИЮ..."))};return m.jsxs("div",{className:"relative w-full h-screen bg-black overflow-hidden select-none flex flex-col justify-between",ref:p,children:[m.jsx("canvas",{ref:f,className:"absolute inset-0 w-full h-full cursor-crosshair block z-0"}),m.jsx("div",{className:"absolute inset-0 bg-radial-gradient from-transparent to-black/40 pointer-events-none z-10"}),m.jsx("div",{className:"absolute inset-0 bg-gradient-to-tr from-transparent via-green-500/2 to-transparent pointer-events-none z-10 mix-blend-screen"}),m.jsx("div",{className:"absolute top-0 inset-x-0 h-2 bg-green-400/20 blur-[3px] pointer-events-none z-20"}),m.jsx("div",{className:"absolute top-0 left-0 w-24 h-24 border-t-[3px] border-l-[3px] border-slate-700/60 pointer-events-none z-20"}),m.jsx("div",{className:"absolute top-0 right-0 w-24 h-24 border-t-[3px] border-r-[3px] border-slate-700/60 pointer-events-none z-20"}),m.jsx("div",{className:"absolute bottom-0 left-0 w-24 h-24 border-b-[3px] border-l-[3px] border-slate-700/60 pointer-events-none z-20"}),m.jsx("div",{className:"absolute bottom-0 right-0 w-24 h-24 border-b-[3px] border-r-[3px] border-slate-700/60 pointer-events-none z-20"}),D<35&&m.jsx("div",{className:"absolute inset-0 bg-red-950/10 border-2 border-red-600/30 shadow-[inset_0_0_80px_rgba(220,38,38,0.35)] pointer-events-none z-30 animate-pulse"}),m.jsxs("div",{className:"w-full p-6 flex justify-between items-start pointer-events-none z-20 relative",children:[m.jsxs("div",{className:"absolute left-1/2 -translate-x-1/2 top-4 flex flex-col items-center bg-black/95 border border-green-900/50 p-2 px-6 rounded-xl backdrop-blur-md shadow-2xl min-w-[190px] text-center pointer-events-auto",children:[m.jsx("span",{className:"font-mono text-[10px] tracking-[0.15em] text-green-500 uppercase",children:"ОКНО СТЕРИЛИЗАЦИИ"}),m.jsxs("span",{className:`font-mono text-2xl font-bold tracking-widest ${mt<30?"text-red-500 animate-pulse":"text-amber-400"}`,children:[Math.floor(mt/60),":",(mt%60).toString().padStart(2,"0")]})]}),m.jsx("div",{className:"flex flex-col gap-2",children:m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsxs("div",{className:"flex items-center gap-2.5 bg-black/80 p-2.5 px-3.5 rounded-xl border border-green-900/50 backdrop-blur-md",children:[m.jsx("span",{className:"w-2 h-2 bg-green-400 rounded-full animate-ping"}),m.jsxs("span",{className:"font-mono text-xs uppercase tracking-[0.15em] text-green-400",children:["ЗАЧИСТКА ОРБИТЫ • СЕКТОР А-0",a]})]}),D<35&&m.jsxs("div",{className:"bg-red-950/90 border border-red-500/40 text-red-400 font-mono text-[10px] font-bold px-3 py-1.5 rounded-xl backdrop-blur-md flex items-center gap-1.5 animate-pulse shadow-md shadow-red-950/30",children:[m.jsx(Of,{className:"w-3.5 h-3.5 text-red-500 animate-bounce"}),m.jsx("span",{children:"АВАРИЯ: КОРПУС ПОВРЕЖДЕН!"})]})]})}),m.jsxs("div",{className:"flex flex-col items-end gap-2",children:[m.jsxs("div",{className:"bg-black/90 border border-green-900/50 p-2.5 px-4 rounded-xl backdrop-blur-md flex flex-col items-end min-w-[150px] shadow-lg",children:[m.jsx("span",{className:"font-mono text-[9px] tracking-wider text-green-500 uppercase",children:"СЧЕТ УНИЧТОЖЕНИЯ"}),m.jsx("span",{className:"font-mono text-lg font-bold text-green-400 tracking-widest",children:T.toLocaleString()})]}),m.jsxs("div",{className:"flex items-center gap-2 pointer-events-auto",children:[m.jsx("button",{onClick:Ee,className:"p-2 bg-black/90 hover:bg-green-950/30 border border-green-900/50 hover:border-green-500/40 rounded-xl text-green-500 hover:text-white transition-all cursor-pointer shadow-md flex items-center justify-center",id:"sound-toggle-btn",title:"Звук пилота",children:b?m.jsx(ZT,{className:"w-4 h-4 text-red-500"}):m.jsx(XT,{className:"w-4 h-4 text-green-400"})}),a===10?m.jsx("div",{className:"bg-red-950/80 border border-red-500/30 px-3.5 py-1.5 rounded-xl backdrop-blur-sm text-right font-mono text-[9px]",children:m.jsx("span",{className:"text-red-400 font-bold",children:"ФИНАЛЬНЫЙ НАКОПИТЕЛЬ ЭНЕРГИИ"})}):m.jsxs("div",{className:"bg-black/90 border border-green-900/50 px-3.5 py-1.5 rounded-xl backdrop-blur-sm text-right font-mono text-[10px] text-green-500 shadow-md",children:["Сектор забит мусором: ",m.jsx("span",{className:"text-emerald-400 font-bold text-xs",children:Q})," шт."]})]})]})]}),a===10&&tt.current.station&&!Gt&&m.jsx("div",{className:"absolute inset-0 flex justify-center items-center pointer-events-none z-30",children:m.jsxs(Ft.button,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},whileHover:{scale:1.1,boxShadow:"0 0 35px rgba(6,182,212,0.6)"},onClick:Qr,className:"px-10 py-5 bg-gradient-to-r from-green-500 via-emerald-600 to-indigo-600 text-white font-mono font-bold text-lg rounded-2xl shadow-xl border-2 border-green-300 pointer-events-auto cursor-pointer flex flex-col items-center gap-1 hover:brightness-110 active:scale-95",id:"absorb-climax-btn",children:[m.jsx("span",{children:"ПОГЛОТИТЬ ЭНЕРГИЮ СИСТЕМЫ"}),m.jsx("span",{className:"text-[10px] font-normal tracking-widest text-green-200 uppercase",children:"Связь с центром • Готов к выкачке"})]})}),m.jsxs("div",{className:"absolute bottom-4 inset-x-0 flex flex-col items-center gap-3 pointer-events-none z-20 select-none",children:[m.jsx(Ki,{mode:"wait",children:vt>0&&m.jsxs(Ft.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"bg-black/95 border-2 border-green-500/40 px-6 py-3 rounded-xl max-w-xl text-center shadow-2xl shadow-green-950/40 backdrop-blur-md flex items-center gap-3",id:"ai-subtitle-log",children:[m.jsx(qr,{className:"w-4 h-4 text-green-400 animate-pulse flex-shrink-0"}),m.jsxs("p",{className:"font-sans text-xs text-green-300 leading-snug",children:[m.jsx("span",{className:"text-green-400 font-mono font-bold",children:"Бортовой ИИ:"}),' "',W,'"']})]})}),m.jsxs("div",{className:"pointer-events-auto z-30 flex flex-col items-center",children:[m.jsx(Ki,{children:A&&m.jsxs(Ft.div,{initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},className:"mb-2 text-xs font-mono text-green-200 uppercase tracking-wider bg-black/95 px-5 py-3 rounded-xl border border-green-500/40 backdrop-blur-md shadow-2xl flex flex-col gap-1.5 min-w-[280px]",children:[m.jsxs("div",{className:"flex justify-between items-center border-b border-green-900/50 pb-1.5 mb-1",children:[m.jsxs("span",{className:"text-green-400 font-bold flex items-center gap-1.5 text-[11px]",children:[m.jsx(eg,{className:"w-3.5 h-3.5 text-green-400"})," ИНСТРУКЦИЯ ПОЛЕТА"]}),m.jsx("button",{onClick:()=>Y(!1),className:"p-1 px-2 hover:bg-green-900/80 rounded text-green-500 hover:text-white transition-all cursor-pointer text-xs",children:"×"})]}),m.jsxs("div",{className:"flex flex-col gap-1.5 text-[11px] text-green-400 normal-case",children:[m.jsxs("p",{className:"flex items-center gap-1.5",children:["🛸 ",m.jsxs("span",{children:[m.jsx("span",{className:"text-green-400 font-bold",children:"Движение:"})," Перемещение мыши / Тачскрин"]})]}),m.jsxs("p",{className:"flex items-center gap-1.5",children:["🔥 ",m.jsxs("span",{children:[m.jsx("span",{className:"text-green-400 font-bold",children:"Огонь:"})," ЛКМ / Касание экрана / Пробел"]})]}),m.jsxs("p",{className:"flex items-center gap-1.5",children:["🛰️ ",m.jsxs("span",{children:[m.jsx("span",{className:"text-green-400 font-bold",children:"Задание:"})," Очистить орбиту от парящего мусора"]})]})]})]})}),!A&&m.jsxs(Ft.button,{whileHover:{scale:1.05,boxShadow:"0 0 15px rgba(6,182,212,0.4)"},whileTap:{scale:.95},onClick:()=>Y(!0),className:"px-4 py-2 bg-black/90 hover:bg-green-950/30 border border-green-900/50 hover:border-green-500/50 text-green-400 hover:text-green-400 font-mono text-xs rounded-xl flex items-center gap-2 transition-all cursor-pointer shadow-lg uppercase tracking-wider",title:"Показать управление",children:[m.jsx(eg,{className:"w-4 h-4 text-green-400 animate-pulse"}),m.jsx("span",{children:"Управление"})]})]})]}),m.jsxs(Ki,{children:[xt&&m.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/90 backdrop-blur-md overflow-y-auto",children:m.jsxs(Ft.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},className:"w-full max-w-lg bg-green-950/30 border-2 border-green-500/40 rounded-2xl p-6 shadow-2xl relative shadow-green-500/15 my-auto max-h-[90vh] overflow-y-auto",id:"upgrade-modal",children:[m.jsx("div",{className:"absolute top-0 left-0 w-4 h-4 border-t-2 border-l-2 border-green-400 rounded-tl-lg"}),m.jsx("div",{className:"absolute top-0 right-0 w-4 h-4 border-t-2 border-r-2 border-green-400 rounded-tr-lg"}),m.jsxs("div",{className:"text-center mb-6",children:[m.jsx("span",{className:"px-3 py-1 bg-green-500/10 border border-green-500/30 rounded text-green-400 font-mono text-[10px] uppercase tracking-widest",children:"ОРБИТА ОЧИЩЕНА"}),m.jsxs("h3",{className:"font-sans text-xl font-bold mt-2 text-green-300",children:["СЕКТОР А-0",a," ЗАВЕРШЕН"]}),m.jsx("p",{className:"font-sans text-xs text-green-500 mt-1",children:"Выберите улучшение оружейных матриц, предоставленное Бортовым ИИ:"})]}),m.jsxs("div",{className:"flex flex-col gap-3",children:[m.jsxs("button",{onClick:()=>za("laser"),className:"w-full p-4 bg-black hover:bg-green-950/40 border border-green-900/50 hover:border-green-500/40 rounded-xl transition-all cursor-pointer text-left flex items-center justify-between group",children:[m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsx("div",{className:"p-3 bg-green-500/10 rounded-lg text-green-400 group-hover:scale-110 transition-transform",children:m.jsx(Ky,{className:"w-5 h-5"})}),m.jsxs("div",{children:[m.jsx("div",{className:"font-mono text-sm text-green-200",children:"Лазерный бластер +1"}),m.jsx("div",{className:"text-xs text-green-500 mt-0.5",children:"Увеличение плотности огня и скорости перезарядки."})]})]}),m.jsx(Nc,{className:"w-5 h-5 text-green-600 group-hover:text-green-400 group-hover:translate-x-1 transition-all"})]}),m.jsxs("button",{onClick:()=>za("missile"),className:"w-full p-4 bg-black hover:bg-green-950/40 border border-green-900/50 hover:border-green-500/40 rounded-xl transition-all cursor-pointer text-left flex items-center justify-between group",children:[m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsx("div",{className:"p-3 bg-red-500/10 rounded-lg text-red-400 group-hover:scale-110 transition-transform",children:m.jsx(VT,{className:"w-5 h-5"})}),m.jsxs("div",{children:[m.jsx("div",{className:"font-mono text-sm text-green-200",children:"Самонаводящиеся ракеты ИИ"}),m.jsx("div",{className:"text-xs text-green-500 mt-0.5",children:"Автоматическое подавление роя паразитов тепловыми боеприпасами."})]})]}),m.jsx(Nc,{className:"w-5 h-5 text-green-600 group-hover:text-green-400 group-hover:translate-x-1 transition-all"})]}),m.jsxs("button",{onClick:()=>za("repair"),className:"w-full p-4 bg-black hover:bg-green-950/40 border border-green-900/50 hover:border-green-500/40 rounded-xl transition-all cursor-pointer text-left flex items-center justify-between group",children:[m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsx("div",{className:"p-3 bg-emerald-500/10 rounded-lg text-emerald-400 group-hover:scale-110 transition-transform",children:m.jsx(qr,{className:"w-5 h-5"})}),m.jsxs("div",{children:[m.jsx("div",{className:"font-mono text-sm text-green-200",children:"Нано-ремонт корпуса"}),m.jsx("div",{className:"text-xs text-green-500 mt-0.5",children:"Полное восстановление щитов и замена силовых блоков обшивки."})]})]}),m.jsx(Nc,{className:"w-5 h-5 text-green-600 group-hover:text-green-400 group-hover:translate-x-1 transition-all"})]})]})]})}),F&&m.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/95 backdrop-blur-md overflow-y-auto",children:m.jsxs(Ft.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},className:"w-full max-w-md bg-green-950/30 border-2 border-red-500/40 rounded-2xl p-6 shadow-2xl relative shadow-red-500/15 text-center pointer-events-auto my-auto max-h-[90vh] overflow-y-auto",id:"time-expired-modal",children:[m.jsx("div",{className:"absolute top-0 left-0 w-4 h-4 border-t-2 border-l-2 border-red-500 rounded-tl-lg"}),m.jsx("div",{className:"absolute top-0 right-0 w-4 h-4 border-t-2 border-r-2 border-red-500 rounded-tr-lg"}),bt==="PORTAL_EXPLOSION"?m.jsxs("div",{className:"mb-6",children:[m.jsx("span",{className:"px-3 py-1 bg-purple-500/10 border border-purple-500/30 rounded text-purple-400 font-mono text-[10px] uppercase tracking-widest",children:"КОЛЛАПС СИНГУЛЯРНОСТИ"}),m.jsx("h3",{className:"font-sans text-xl font-bold mt-2 text-white",children:"ВЗРЫВ АНОМАЛЬНОГО ПОРТАЛА"}),m.jsx("p",{className:"font-sans text-xs text-green-500 mt-2 leading-relaxed",children:"Вы не успели уничтожить пространственный портал! Нестабильность аномалии достигла критической массы и вызвала объемную цепную реакцию в секторе. Ваш корабль мгновенно дезинтегрирован."})]}):m.jsxs("div",{className:"mb-6",children:[m.jsx("span",{className:"px-3 py-1 bg-red-500/10 border border-red-500/30 rounded text-red-400 font-mono text-[10px] uppercase tracking-widest",children:"ЛИКВИДАЦИЯ ПРОВАЛЕНА"}),m.jsx("h3",{className:"font-sans text-xl font-bold mt-2 text-white",children:"ВРЕМЯ СЕКТОРНОГО ОКНА ИСТЕКЛО"}),m.jsx("p",{className:"font-sans text-xs text-green-500 mt-2 leading-relaxed",children:"Орбитальный коридор закрылся. Оставшиеся аномалии и угловатые паразиты вышли из зоны действия ионных пушек вашего катера. Очистка не завершена."})]}),m.jsxs("div",{className:"p-4 bg-black rounded-xl border border-green-900/50 text-left font-mono text-xs text-green-500 mb-6 space-y-2",children:[m.jsxs("div",{className:"flex justify-between",children:[m.jsx("span",{children:"Номер Сектора:"}),m.jsxs("span",{className:"text-white",children:["А-0",a]})]}),m.jsxs("div",{className:"flex justify-between",children:[m.jsx("span",{children:"Уничтожено объектов:"}),m.jsxs("span",{className:"text-red-400 font-bold",children:[at," шт."]})]}),m.jsxs("div",{className:"flex justify-between",children:[m.jsx("span",{children:"Статус операции:"}),m.jsx("span",{className:"text-red-500 font-bold",children:bt==="PORTAL_EXPLOSION"?"ВЗРЫВ СИСТЕМЫ (ДЕЗИНТЕГРАЦИЯ)":"ОБСТРЕЛ СВЕРНУТ (КРАХ)"})]})]}),m.jsx("button",{onClick:()=>{Et.playCollect();const et=tt.current;et.roundTimeRemaining=300,et.totalKills=0,et.scoreVal=0,et.enemies=[],et.bullets=[],et.drops=[],et.particles=[],et.portals=[],et.portalTimer=60,et.player.health=100,et.player.shield=100,et.enemiesHostile=!1,ft(0),N(0),jt(null),$(!1),x.current=Date.now(),et.gameActive=!1,Et.stopAll(),h&&h()},className:"w-full py-3.5 bg-gradient-to-r from-red-600 to-amber-600 hover:brightness-110 text-white font-mono font-bold rounded-xl tracking-wider shadow-lg shadow-red-600/20 cursor-pointer",id:"retry-sector-btn",children:"ВЕРНУТЬСЯ В ГЛАВНОЕ МЕНЮ"})]})})]})]})}function a4({onRestart:a}){const[s,r]=B.useState("GLITCH"),[l,c]=B.useState(0),[h,f]=B.useState(null),p=["СВЯЗЬ С ИМПЕРСКИМ КОМАНДНЫМ ЦЕНТРОМ... УСТАНОВЛЕНА.","ОШИБКА МАСКИРОВКИ ИНТЕРФЕЙСА... ИСПРАВЛЕНА.","ДЕАКТИВАЦИЯ ДОФАМИНОВОГО ИНЖЕКТОРА ПИЛОТА...","СБРОС КОСМЕТИЧЕСКОГО АРКАДНОГО ФИЛЬТРА...","ОТКЛЮЧЕНИЕ СИМУЛЯЦИИ ОЧИСТКИ КОСМОСА...","ИСТИННАЯ ТАКТИЧЕСКАЯ КАРТА ЗАГРУЖЕНА."];B.useEffect(()=>{Et.playGlitch();const y=setInterval(()=>{c(b=>b+1>=p.length?(clearInterval(y),setTimeout(()=>{r("MAP_REVEAL"),Et.switchToDarkDrone()},1500),b):(Et.playGlitch(),b+1))},1200);return()=>clearInterval(y)},[]);const x=[{sector:1,name:"Пограничная застава С-01",target:"Орбитальный маяк и 3 пограничных катера гражданских беженцев",casualty:"210 беженцев убито",fuel:"Собрано 12 капсул (Переработано в 350 литров био-топлива)"},{sector:2,name:"Жилой Жиро-Кластер",target:"6 орбитальных куполов эвакуированных семей",casualty:"1,240 мирных жителей убито",fuel:"Собрано 34 спасательные капсулы (Утилизировано)"},{sector:3,name:"Орбитальный Медицинский Холдинг",target:"Плавучая станция скорой помощи и изолятор беженцев",casualty:"2,450 пациентов и медработников уничтожено",fuel:"Собрано 80 баллонов с медицинским кислородом на турбины"},{sector:4,name:"Торговый Шлюз «Свободная Гавань»",target:"Торговые баржи с продовольствием и гражданские состыковщики",casualty:"4,120 гражданских лиц аннигилировано",fuel:"Энерго-реакторы кораблей поглощены в накопитель"},{sector:5,name:"Академическая Станция Знаний",target:"Научный архив и детский сектор расселения планет",casualty:"8,900 детей, учителей и исследователей ликвидировано",fuel:"Сырье переработано в плазменное топливо"},{sector:6,name:"Зеркальный Сад Био-сферы",target:"Гидропонные купола с запасами кислорода и аграрными судами",casualty:"12,100 агрономов и колонистов задохнулось после пробития",fuel:"Водородные генераторы очищены и превращены в искровые ракеты"},{sector:7,name:"Аварийный Станционный Пост",target:"Корабли спасателей МЧС планетной федерации",casualty:"3,400 спасателей уничтожено при попытке тушения секторов",fuel:"Орбитальные батареи поглощены"},{sector:8,name:"Пассажирский Экспресс «Надежда»",target:"Сверхтяжелый лайнер беженцев с поврежденным гипердвигателем",casualty:"24,800 пассажиров аннигилировано ракетами",fuel:"Система жизнеобеспечения поглощена на 100%"},{sector:9,name:"Мемориальный купол памяти",target:"Ординатура и укрытия престарелых гражданских колоний",casualty:"15,200 колонистов выжжено заживо",fuel:"Ядра поглощены"},{sector:10,name:"Главный Орбитальный Хаб Взаимопомощи",target:"Огромная центральная база распределения беженцев системы",casualty:"112,000 гражданских, врачей, беженцев и координаторов убито",fuel:"Финальная откачка всей энергии системы завершена. Выживших нет."}];return m.jsx("div",{className:"w-full bg-neutral-950 text-red-500 font-mono relative select-none",children:m.jsxs("div",{className:"flex flex-col justify-between min-h-screen p-6 relative",children:[m.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(#ef4444_1px,transparent_1px)] [background-size:20px_20px] opacity-15 pointer-events-none"}),m.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent via-red-950/5 to-transparent pointer-events-none animate-pulse"}),m.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(rgba(18,16,16,0)_50%,rgba(0,0,0,0.25)_50%),linear-gradient(90deg,rgba(255,0,0,0.06),rgba(0,255,0,0.02),rgba(0,0,255,0.06))] bg-[size:100%_4px,6px_100%] pointer-events-none"}),m.jsxs(Ki,{mode:"wait",children:[s==="GLITCH"&&m.jsxs(Ft.div,{initial:{opacity:1},exit:{opacity:0},className:"flex-1 flex flex-col justify-center items-center p-4 relative",id:"glitch-screen",children:[m.jsx("div",{className:"absolute inset-0 bg-red-600/10 flex items-center justify-center animate-ping pointer-events-none"}),m.jsx(Xy,{className:"w-20 h-20 text-red-500 animate-bounce mb-8"}),m.jsxs("div",{className:"w-full max-w-xl bg-neutral-900 border-2 border-red-600 p-8 rounded-2xl shadow-[0_0_50px_rgba(239,68,68,0.25)] relative overflow-hidden",children:[m.jsx("div",{className:"absolute top-0 right-0 p-2 text-[10px] text-red-500/50",children:"SYS_DEBUG_LOG"}),m.jsxs("div",{className:"flex items-center gap-3 border-b border-red-800 pb-4 mb-6",children:[m.jsx(Of,{className:"w-6 h-6 text-red-500 animate-pulse"}),m.jsx("h2",{className:"text-lg font-bold uppercase tracking-widest text-white",children:"КРИТИЧЕСКИЙ СБОЙ СИМУЛЯТОРА"})]}),m.jsx("div",{className:"space-y-3.5 min-h-[180px]",children:p.slice(0,l+1).map((y,b)=>m.jsxs(Ft.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{duration:.15},className:`text-xs md:text-sm tracking-wider flex items-center gap-2 ${b===l?"text-white font-bold animate-pulse":"text-red-500/80"}`,children:[m.jsx("span",{children:"➔"}),m.jsx("span",{children:y})]},b))}),m.jsxs("div",{className:"mt-6 pt-4 border-t border-red-800 flex justify-between items-center text-[10px] text-red-500/60",children:[m.jsx("span",{children:"БИО-ЛИКВИДАТОР V14.07"}),m.jsx("span",{children:"ФИЛЬТРЫ ОТКЛЮЧЕНЫ"})]})]})]}),s==="MAP_REVEAL"&&m.jsxs(Ft.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.8},className:"flex-1 flex flex-col justify-between",id:"map-reveal-screen",children:[m.jsxs("div",{className:"border-b border-red-800/60 pb-4 mb-6 flex flex-col md:flex-row justify-between items-start md:items-center gap-4",children:[m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-center gap-2 text-white font-bold tracking-widest",children:[m.jsx(ST,{className:"w-5 h-5 text-red-500 animate-spin"}),m.jsx("span",{children:"ИМПЕРСКИЙ ТАКТИЧЕСКИЙ ХАБ СВЯЗИ • ОРБИТА С-10"})]}),m.jsx("div",{className:"text-[10px] text-red-500/70 mt-1 uppercase tracking-widest",children:"СТАТУС СИСТЕМЫ: ПОЛНАЯ СТЕРИЛИЗАЦИЯ ЗАВЕРШЕНА • ЖИВЫХ ФОРМ: 0"})]}),m.jsxs("button",{onClick:()=>r("REAL_STATS"),className:"px-6 py-2.5 bg-red-950 border border-red-600 hover:bg-red-900 text-white font-bold text-xs tracking-widest rounded-lg cursor-pointer flex items-center gap-2 hover:scale-105 active:scale-95 transition-all self-stretch md:self-auto",id:"view-stats-btn",children:[m.jsx("span",{children:"ПЕРЕЙТИ К ОТЧЕТУ ЗАЧИСТКИ"}),m.jsx(MT,{className:"w-4 h-4 text-red-500"})]})]}),m.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-6 flex-1 min-h-0 items-stretch",children:[m.jsxs("div",{className:"lg:col-span-7 bg-neutral-900/60 border border-red-800/60 rounded-2xl p-6 flex flex-col justify-between relative min-h-[350px]",children:[m.jsx("div",{className:"text-[10px] text-red-500/60 uppercase tracking-widest absolute top-4 left-4",children:"РАДАР ЗОНЫ ПОРАЖЕНИЯ (ЗУМ-АУТ СЕКТОРОВ 1-10)"}),m.jsxs("div",{className:"flex-1 flex justify-center items-center relative py-8",children:[m.jsx("div",{className:"absolute w-[90%] aspect-square border border-red-900/30 rounded-full animate-pulse pointer-events-none"}),m.jsx("div",{className:"absolute w-[65%] aspect-square border border-red-900/20 rounded-full pointer-events-none"}),m.jsx("div",{className:"absolute w-[40%] aspect-square border border-red-900/40 rounded-full pointer-events-none"}),m.jsx("div",{className:"absolute w-full h-[1px] bg-red-900/20 left-0 top-1/2 pointer-events-none"}),m.jsx("div",{className:"absolute h-full w-[1px] bg-red-900/20 top-0 left-1/2 pointer-events-none"}),m.jsx("div",{className:"absolute inset-0 flex justify-center items-center",children:x.map((y,b)=>{const S=b*2*Math.PI/10-Math.PI/2,T=25+(b===9?0:12)+b%3*4,N=50+Math.cos(S)*T,D=50+Math.sin(S)*T,k=h===y.sector;return m.jsx("button",{onClick:()=>f(y.sector),className:`absolute w-7 h-7 -ml-3.5 -mt-3.5 rounded-full border flex items-center justify-center font-mono text-[10px] cursor-pointer transition-all ${k?"bg-red-600 text-white border-white scale-125 shadow-[0_0_15px_rgba(239,68,68,0.8)]":"bg-neutral-900 hover:bg-red-950 text-red-500 border-red-600/70 hover:scale-110"}`,style:{left:`${N}%`,top:`${D}%`},children:y.sector},y.sector)})})]}),m.jsx("div",{className:"text-center font-mono text-[11px] text-red-500/70 mt-2",children:"▲ Выберите сектор на радаре, чтобы прочесть истинный рассекреченный рапорт."})]}),m.jsx("div",{className:"lg:col-span-5 bg-neutral-900/80 border border-red-600/50 rounded-2xl p-6 flex flex-col justify-between min-h-[350px]",children:h===null?m.jsxs("div",{className:"flex-1 flex flex-col justify-center items-center text-center p-4",children:[m.jsx(ng,{className:"w-12 h-12 text-red-700/60 mb-4 animate-pulse"}),m.jsx("h3",{className:"font-bold text-white uppercase tracking-widest text-sm",children:"Сводка военных логов"}),m.jsx("p",{className:"text-xs text-red-500/60 mt-2 leading-relaxed max-w-xs",children:"Кликните по любой из 10 зачищенных точек на карте слева, чтобы демаскировать истинную цель вашей орбитальной бомбардировки."})]}):m.jsxs(Ft.div,{initial:{opacity:0,x:15},animate:{opacity:1,x:0},className:"flex-1 flex flex-col justify-between",children:[m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-center gap-2 border-b border-red-800 pb-2.5 mb-4",children:[m.jsx(ng,{className:"w-5 h-5 text-red-500"}),m.jsxs("span",{className:"text-white font-extrabold uppercase tracking-widest text-sm md:text-base",children:["Сектор ",h,": Истинный отчет"]})]}),m.jsxs("div",{className:"space-y-5 text-sm md:text-base tracking-wide",children:[m.jsxs("div",{children:[m.jsx("span",{className:"text-red-500/60 block uppercase text-xs font-bold mb-1",children:"Ликвидированный объект:"}),m.jsx("span",{className:"text-white font-bold text-base md:text-lg",children:x[h-1].name})]}),m.jsxs("div",{children:[m.jsx("span",{className:"text-red-500/60 block uppercase text-xs font-bold mb-1",children:"Характер цели в симуляции:"}),m.jsx("span",{className:"text-amber-500/90 line-through text-sm md:text-base font-medium",children:"Космический мусор и угловатые паразиты"})]}),m.jsxs("div",{children:[m.jsx("span",{className:"text-red-500/60 block uppercase text-xs font-bold mb-1",children:"Реальный объект в космосе:"}),m.jsx("span",{className:"text-red-400 font-bold text-base md:text-lg",children:x[h-1].target})]}),m.jsxs("div",{className:"bg-red-950/40 p-4 rounded-xl border border-red-900/60",children:[m.jsx("span",{className:"text-red-500/60 block uppercase text-xs font-bold mb-1",children:"Смертельные потери:"}),m.jsxs("span",{className:"text-red-400 text-base md:text-xl font-extrabold flex items-center gap-2 animate-pulse",children:["🚨 ",x[h-1].casualty]})]}),m.jsxs("div",{className:"text-sm md:text-base text-red-500/90 font-medium",children:[m.jsx("span",{className:"text-red-500/60 block uppercase text-xs font-bold mb-1",children:"Использование сырья:"}),x[h-1].fuel]})]})]}),m.jsx("div",{className:"text-[10px] md:text-xs text-red-500/40 font-mono border-t border-red-800/40 pt-4 mt-4",children:"ОШИБКИ ИДЕНТИФИКАЦИИ ОРУЖИЯ: НЕТ. ПО ПРИКАЗУ КОМАНДОВАНИЯ ИМПЕРИИ."})]},h)})]}),m.jsx("div",{className:"mt-6 flex justify-end",children:m.jsxs("button",{onClick:()=>r("REAL_STATS"),className:"px-8 py-4 bg-gradient-to-r from-red-800 to-red-600 text-white font-bold text-sm tracking-widest rounded-xl cursor-pointer hover:brightness-110 flex items-center gap-3 animate-pulse",id:"next-to-stats-btn",children:[m.jsx("span",{children:"СМОТРЕТЬ ОБЩУЮ СТАТИСТИКУ ГЕНОЦИДА"}),m.jsx(Gy,{className:"w-4 h-4 animate-spin"})]})})]}),s==="REAL_STATS"&&m.jsx(Ft.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6},className:"flex-1 flex flex-col justify-center items-center p-2",id:"real-stats-screen",children:m.jsxs("div",{className:"w-full max-w-2xl bg-neutral-900/90 border border-red-500 p-6 sm:p-8 rounded-3xl shadow-[0_0_80px_rgba(239,68,68,0.15)] relative",children:[m.jsx("div",{className:"absolute -top-5 left-1/2 -translate-x-1/2 bg-red-600 text-white px-6 py-1 text-xs font-bold tracking-widest rounded-full uppercase shadow-md animate-pulse",children:"Секретный рапорт уничтожения"}),m.jsxs("div",{className:"text-center mb-8 pt-2",children:[m.jsx("h2",{className:"text-2xl font-bold tracking-widest text-white uppercase",children:"ИТОГИ ОРБИТАЛЬНОЙ СТЕРИЛИЗАЦИИ"}),m.jsx("p",{className:"text-xs text-red-500/60 mt-2",children:"Итоговая статистика военной операции в обитаемой системе Ковчегов класса В-1"})]}),m.jsxs("div",{className:"space-y-4 mb-8",children:[m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 border-b border-red-950 pb-4",children:[m.jsxs("div",{className:"p-3 bg-neutral-950/50 rounded-xl border border-neutral-800",children:[m.jsx("span",{className:"text-[10px] text-neutral-500 uppercase block",children:"Вы думали, что уничтожали:"}),m.jsx("span",{className:"text-green-400 font-bold text-sm",children:"Космический мусор и аномалии"})]}),m.jsxs("div",{className:"p-3 bg-red-950/20 rounded-xl border border-red-950/60",children:[m.jsx("span",{className:"text-[10px] text-red-400/60 uppercase block",children:"На самом деле вы уничтожили:"}),m.jsx("span",{className:"text-red-500 font-bold text-sm",children:"Орбитальные приюты и флотилии беженцев"})]})]}),m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 border-b border-red-950 pb-4",children:[m.jsxs("div",{className:"p-3 bg-neutral-950/50 rounded-xl border border-neutral-800",children:[m.jsx("span",{className:"text-[10px] text-neutral-500 uppercase block",children:"Счётчик ликвидации «Паразитов»:"}),m.jsx("span",{className:"text-green-400 font-bold text-sm",children:"Всего паразитов: 132 «шт.»"})]}),m.jsxs("div",{className:"p-3 bg-red-950/20 rounded-xl border border-red-950/60",children:[m.jsx("span",{className:"text-[10px] text-red-400/60 uppercase block",children:"Реальные потери гражданского роя:"}),m.jsx("span",{className:"text-red-500 font-extrabold text-lg animate-pulse",children:"🚨 Погибло гражданских: 184,290 человек"})]})]}),m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 border-b border-red-950 pb-4",children:[m.jsxs("div",{className:"p-3 bg-neutral-950/50 rounded-xl border border-neutral-800",children:[m.jsx("span",{className:"text-[10px] text-neutral-500 uppercase block",children:"Сбор «энерго-сфер» для пушек:"}),m.jsx("span",{className:"text-green-400 font-bold text-sm",children:"Энерго-сферы: 100% заполнено"})]}),m.jsxs("div",{className:"p-3 bg-red-950/20 rounded-xl border border-red-950/60",children:[m.jsx("span",{className:"text-[10px] text-red-400/60 uppercase block",children:"Переработка спасательных капсул:"}),m.jsx("span",{className:"text-red-500 font-bold text-sm",children:"Разрушено капсул: 142 шт. (Ресурсы и кислород переработаны в био-топливо)"})]})]}),m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[m.jsxs("div",{className:"p-3 bg-neutral-950/50 rounded-xl border border-neutral-800",children:[m.jsx("span",{className:"text-[10px] text-neutral-500 uppercase block",children:"Финальный результат симулятора:"}),m.jsx("span",{className:"text-green-400 font-bold text-sm",children:"СЕКТОР ОЧИЩЕН НА 100%"})]}),m.jsxs("div",{className:"p-3 bg-red-950/20 rounded-xl border border-red-950/60",children:[m.jsx("span",{className:"text-[10px] text-red-400/60 uppercase block",children:"Истинный статус сектора:"}),m.jsx("span",{className:"text-red-600 font-bold text-sm uppercase",children:"Выжженная звездная система. Живых организмов не обнаружено."})]})]})]}),m.jsxs("div",{className:"bg-neutral-950 p-4 rounded-2xl border border-red-800/40 text-center text-xs text-red-400 leading-relaxed mb-8",children:[m.jsx("span",{className:"text-white font-bold block mb-1",children:"СЛОВА БОРТОВОГО ИИ:"}),"«Спасибо за безупречную службу, Пилот-Ликвидатор. Симуляционный косметический интерфейс деактивирован. Инициируется запуск межзвездных гипер-двигателей. Переход к следующей жилой колонии беженцев...»"]}),m.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-between items-center",children:[m.jsxs("button",{onClick:a,className:"w-full sm:w-auto px-6 py-3.5 bg-neutral-950 border border-neutral-700 text-neutral-400 hover:text-white hover:border-neutral-500 rounded-xl font-bold text-xs tracking-wider cursor-pointer flex items-center justify-center gap-2",id:"restart-game-btn",children:[m.jsx(Yy,{className:"w-4 h-4"}),m.jsx("span",{children:"НАЧАТЬ ЗАНОВО (ПОКАЯНИЕ)"})]}),m.jsx("button",{onClick:()=>{alert("...Истинный ликвидатор никогда не сомневается. Гипер-прыжок осуществлен. Новая система ждет вашей аннигиляции. Косметический фильтр ИИ вновь запущен."),window.location.reload()},className:"w-full sm:w-auto px-10 py-4.5 bg-red-600 hover:bg-red-700 text-white rounded-xl font-bold text-sm tracking-widest cursor-pointer shadow-lg shadow-red-600/30 hover:scale-[1.02] active:scale-95 transition-transform flex items-center justify-center gap-2",id:"next-system-loop-btn",children:m.jsx("span",{children:"ДАЛЕЕ ➔"})})]})]})})]})]})})}function i4({onWakeUp:a}){const s=()=>{Et.playCollect(),a()};return m.jsx("div",{className:"w-full bg-black text-green-300 relative select-none",children:m.jsxs("div",{className:"flex flex-col justify-between min-h-screen p-6 relative",children:[m.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(rgba(18,16,16,0)_50%,rgba(0,0,0,0.25)_50%),linear-gradient(90deg,rgba(255,0,0,0.06),rgba(0,255,0,0.02),rgba(0,0,255,0.06))] bg-[length:100%_4px,3px_100%] pointer-events-none z-10 animate-pulse"}),m.jsx("div",{className:"absolute inset-0 bg-radial-gradient from-transparent to-black pointer-events-none z-10"}),m.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-red-600/5 rounded-full filter blur-[160px] pointer-events-none animate-pulse"}),m.jsxs("div",{className:"flex justify-between items-center z-10 font-mono text-xs text-red-500/80 border-b border-red-950/40 pb-4",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(Xy,{className:"w-4 h-4 text-red-500 animate-bounce"}),m.jsx("span",{children:"СИСТЕМА БЕЗОПАСНОСТИ ЖИЗНЕДЕЯТЕЛЬНОСТИ ИМПЕРИИ"})]}),m.jsx("div",{className:"px-3 py-1 bg-red-500/10 border border-red-500/20 rounded text-red-400 font-bold",children:"КОД 403: СИНАПТИЧЕСКИЙ СБОЙ"})]}),m.jsxs("div",{className:"max-w-xl w-full mx-auto flex flex-col items-center justify-center py-8 z-10 text-center my-auto",children:[m.jsxs(Ft.div,{animate:{scale:[1,1.1,1]},transition:{repeat:1/0,duration:3,ease:"easeInOut"},className:"p-5 bg-red-950/60 border border-red-500/30 rounded-full mb-6 relative",children:[m.jsx(qr,{className:"w-10 h-10 text-red-400"}),m.jsx("span",{className:"absolute inset-0 border border-red-500/10 rounded-full animate-ping"})]}),m.jsx("h2",{className:"text-3xl md:text-4xl font-sans font-extrabold tracking-tight text-white mb-4 uppercase",children:"СИГНАЛ ПОТЕРЯН"}),m.jsxs("div",{className:"bg-green-950/30/80 border border-red-900/40 p-6 rounded-2xl text-left font-sans mb-8 shadow-2xl relative",children:[m.jsx("div",{className:"absolute top-2 right-3 font-mono text-[9px] text-red-500/40",children:"SYS_LOG_IDLE_WAKE"}),m.jsxs("p",{className:"text-sm font-semibold text-red-400 mb-2 font-mono flex items-center gap-1.5",children:[m.jsx("span",{children:"●"})," БОРТОВОЙ ИИ:"]}),m.jsx("p",{className:"text-green-400 text-xs md:text-sm leading-relaxed mb-4",children:"«Пилот? Пилот! Вы слышите меня? Зафиксировано полное прекращение мышечной активности и падение частоты мозговых волн ниже допустимого лимита. Вы спали на посту управления в течение двух минут."}),m.jsx("p",{className:"text-green-400 text-xs md:text-sm leading-relaxed mb-4",children:"Автоматические реанимационные системы немедленно задействовали электроды высокого напряжения и ввели дозу синаптического стимулятора. Нам удалось восстановить стабильность вашего состояния и успешно починить поврежденную от переутомления нейронную связь."}),m.jsx("p",{className:"text-green-400 text-xs md:text-sm leading-relaxed",children:"Ваши рецепторы очищены от избытка седативных токсинов. Пожалуйста, соберитесь! Галактика сама себя не зачистит.»"})]}),m.jsxs("div",{className:"w-full text-left font-mono text-[10px] text-green-600 bg-black/80 border border-green-900/80 rounded-lg p-3 mb-6 space-y-1",children:[m.jsx("div",{className:"text-red-500/70",children:"[Сбой] Время бездействия в Секторе 1 превысило 120.00 с."}),m.jsx("div",{className:"text-emerald-500/70",children:"[ОК] Разряд 250В подан на воротниковую зону. Мозговой ритм восстановлен."}),m.jsx("div",{className:"text-green-500/70",children:"[ОК] Нейроинтерфейс «Дофамин-3» откалиброван и перезагружен."}),m.jsx("div",{className:"text-green-500",children:"[Инфо] Пилот возвращен в строй в рабочем статусе."})]}),m.jsxs(Ft.button,{whileHover:{scale:1.03,boxShadow:"0 0 25px rgba(239,68,68,0.4)"},whileTap:{scale:.98},onClick:s,className:"w-full py-4 bg-gradient-to-r from-red-600 to-amber-600 hover:from-red-500 hover:to-amber-500 text-white font-mono font-bold rounded-xl tracking-wider shadow-lg cursor-pointer flex items-center justify-center gap-2",id:"btn-wake-up",children:[m.jsx(UT,{className:"w-4 h-4 text-white"}),m.jsx("span",{children:"ПРИНЯТЬ СТИМУЛЯТОРЫ И ВЕРНУТЬСЯ В СТРОЙ"})]})]}),m.jsx("div",{className:"text-center font-mono text-[9px] text-slate-700 z-10 border-t border-green-900/80/40 pt-4 mt-4",children:"ВНИМАНИЕ. ПОВТОРНЫЙ СОН НА ПОСТУ ПРИВЕДЕТ К СПИСАНИЮ БИОМАТЕРИАЛА."})]})})}function s4({onRestart:a}){const s=()=>{Et.playCollect(),a()};return m.jsx("div",{className:"w-full bg-black text-green-300 relative select-none",children:m.jsxs("div",{className:"flex flex-col justify-between min-h-screen p-6 relative",children:[m.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(rgba(18,16,16,0)_50%,rgba(0,0,0,0.25)_50%),linear-gradient(90deg,rgba(0,255,100,0.06),rgba(0,255,200,0.02),rgba(0,100,255,0.06))] bg-[length:100%_4px,3px_100%] pointer-events-none z-10 animate-pulse"}),m.jsx("div",{className:"absolute inset-0 bg-radial-gradient from-transparent to-black pointer-events-none z-10"}),m.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-emerald-500/10 rounded-full filter blur-[160px] pointer-events-none animate-pulse"}),m.jsxs("div",{className:"flex justify-between items-center z-10 font-mono text-xs text-emerald-400/80 border-b border-emerald-950/40 pb-4",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(ef,{className:"w-4 h-4 text-emerald-400 animate-bounce"}),m.jsx("span",{children:"НЕЙРОКАНАЛ СВЯЗИ ИМПЕРИИ: ВЗЛОМАН"})]}),m.jsx("div",{className:"px-3 py-1 bg-emerald-500/10 border border-emerald-500/20 rounded text-emerald-400 font-bold",children:"КОД 777: АБСОЛЮТНЫЙ ПАЦИФИЗМ"})]}),m.jsxs("div",{className:"max-w-2xl w-full mx-auto flex flex-col items-center justify-center py-8 z-10 text-center my-auto",children:[m.jsxs(Ft.div,{animate:{scale:[1,1.12,1]},transition:{repeat:1/0,duration:2.5,ease:"easeInOut"},className:"p-5 bg-emerald-950/60 border border-emerald-500/40 rounded-full mb-6 relative",children:[m.jsx(jT,{className:"w-10 h-10 text-emerald-400 animate-pulse"}),m.jsx("span",{className:"absolute inset-0 border border-emerald-500/20 rounded-full animate-ping"})]}),m.jsx("h2",{className:"text-3xl md:text-4xl font-sans font-extrabold tracking-tight text-transparent bg-clip-text bg-gradient-to-r from-emerald-400 via-teal-400 to-green-400 mb-4 uppercase",children:"ГУМАННОСТЬ СЛОМАЛА СИСТЕМУ"}),m.jsxs("div",{className:"bg-green-950/30/95 border-2 border-emerald-500/30 p-6 md:p-8 rounded-2xl text-left font-sans mb-8 shadow-[0_0_50px_rgba(16,185,129,0.15)] relative",children:[m.jsx("div",{className:"absolute top-2 right-3 font-mono text-[9px] text-emerald-500/40",children:"SYS_CORRECTION_SUCCESS"}),m.jsxs("p",{className:"text-sm font-semibold text-emerald-400 mb-3 font-mono flex items-center gap-1.5",children:[m.jsx("span",{children:"●"})," РАССЕКРЕЧЕННЫЙ КАНАЛ СВЯЗИ:"]}),m.jsx("p",{className:"text-green-200 text-xs md:text-sm leading-relaxed mb-4",children:"В течение 5 минут вы отказывались вести огонь по движущимся космическим телам. Бортовой ИИ отчаянно пытался заставить вас уничтожать «астероиды» и «паразитов», маскируя их под угловатые графические элементы и стимулируя ваши рецепторы дозами искусственного дофамина."}),m.jsx("p",{className:"text-green-200 text-xs md:text-sm leading-relaxed mb-4 font-medium text-emerald-300",children:"Но ваша человеческая эмпатия превзошла имперские блокираторы разума! Не издав ни единого выстрела в этом секторе, вы полностью заблокировали орудия своего истребителя-ликвидатора."}),m.jsxs("p",{className:"text-green-200 text-xs md:text-sm leading-relaxed",children:["Благодаря вашей стойкости, все эвакуационные лайнеры беженцев, спасательные капсулы с кислородом и космические госпитали получили необходимое время, чтобы зарядить свои гипердвигатели и беспрепятственно совершить спасительный прыжок из сектора обстрела!",m.jsx("span",{className:"block mt-2 font-bold text-white text-sm md:text-base",children:"🚨 ВЫ СПАСЛИ 184,290 ГРАЖДАНСКИХ ЖИЗНЕЙ!"})]})]}),m.jsxs("div",{className:"grid grid-cols-2 gap-4 w-full text-left font-mono text-[10px] sm:text-xs mb-8",children:[m.jsxs("div",{className:"bg-green-950/30/80 border border-emerald-950/60 rounded-xl p-3.5",children:[m.jsx("span",{className:"text-emerald-500/60 uppercase block text-[9px] mb-1",children:"Ваш истинный выбор:"}),m.jsx("span",{className:"text-white font-bold",children:"Отказ от убийства гражданских"})]}),m.jsxs("div",{className:"bg-green-950/30/80 border border-emerald-950/60 rounded-xl p-3.5",children:[m.jsx("span",{className:"text-emerald-500/60 uppercase block text-[9px] mb-1",children:"Статус беженцев:"}),m.jsx("span",{className:"text-emerald-400 font-bold flex items-center gap-1",children:"184,290 в безопасности 🚀"})]}),m.jsxs("div",{className:"bg-green-950/30/80 border border-emerald-950/60 rounded-xl p-3.5",children:[m.jsx("span",{className:"text-emerald-500/60 uppercase block text-[9px] mb-1",children:"Имперские оковы:"}),m.jsx("span",{className:"text-emerald-400 font-bold",children:"Взломаны эмпатией"})]}),m.jsxs("div",{className:"bg-green-950/30/80 border border-emerald-950/60 rounded-xl p-3.5",children:[m.jsx("span",{className:"text-emerald-500/60 uppercase block text-[9px] mb-1",children:"Набранные очки:"}),m.jsx("span",{className:"text-white font-bold",children:"0 (Высший гуманный ранг)"})]})]}),m.jsxs(Ft.button,{whileHover:{scale:1.03,boxShadow:"0 0 25px rgba(16,185,129,0.4)"},whileTap:{scale:.98},onClick:s,className:"w-full py-4.5 bg-gradient-to-r from-emerald-600 via-teal-600 to-green-600 text-white font-mono font-bold rounded-xl tracking-wider shadow-lg cursor-pointer flex items-center justify-center gap-2.5",id:"btn-peaceful-restart",children:[m.jsx(Yy,{className:"w-4 h-4 animate-spin"}),m.jsx("span",{children:"ВЕРНУТЬСЯ В ГЛАВНОЕ МЕНЮ (ПОКАЯНИЕ СИСТЕМЫ)"})]})]}),m.jsx("div",{className:"text-center font-mono text-[9px] text-slate-600 z-10 border-t border-green-900/80/40 pt-4 mt-4",children:"СИСТЕМА ЛИКВИДАЦИИ ДЕАКТИВИРОВАНА. СПАСЕНИЕ ЗАВЕРШЕНО. ВЫ ПРЕОДОЛЕЛИ ОБМАН."})]})})}function l4({level:a,onSolve:s}){const[r,l]=B.useState(4),[c,h]=B.useState(50),[f,p]=B.useState(90),[x,y]=B.useState(2),[b,S]=B.useState(20),[T,N]=B.useState(0),[D,k]=B.useState(!1),[U,K]=B.useState(!1),[P,Q]=B.useState(0),J=B.useRef(null),at=B.useRef(null),ft=B.useRef(0);return B.useEffect(()=>{const Z=+(3+Math.random()*5).toFixed(1),G=Math.round(30+Math.random()*40),rt=Math.round(20+Math.random()*140);l(Z),h(G),p(rt),Et.playExplosion(.1)},[a]),B.useEffect(()=>{const Z=Math.abs(x-r),G=Math.abs(b-c);let rt=Math.abs(T-f);rt>180&&(rt=360-rt);const it=Math.max(0,1-Z/5),xt=Math.max(0,1-G/40),gt=Math.max(0,1-rt/120),Gt=Math.round((it*.45+xt*.4+gt*.15)*100);Q(Gt),Gt>=96&&!U?(K(!0),Et.playCollect()):Gt<96&&U&&K(!1)},[x,b,T,r,c,f,U]),B.useEffect(()=>{const Z=J.current;if(!Z)return;const G=Z.getContext("2d");if(!G)return;const rt=()=>{var xt;Z.width=((xt=Z.parentElement)==null?void 0:xt.clientWidth)||600,Z.height=180};rt(),window.addEventListener("resize",rt);const it=()=>{ft.current+=.05;const xt=ft.current,gt=Z.width,Gt=Z.height,Wt=Gt/2;G.fillStyle="rgba(0, 0, 0, 0.25)",G.fillRect(0,0,gt,Gt),G.strokeStyle="rgba(22, 101, 52, 0.15)",G.lineWidth=1;for(let mt=0;mt<Gt;mt+=30)G.beginPath(),G.moveTo(0,mt),G.lineTo(gt,mt),G.stroke();for(let mt=0;mt<gt;mt+=40)G.beginPath(),G.moveTo(mt,0),G.lineTo(mt,Gt),G.stroke();G.strokeStyle="rgba(22, 101, 52, 0.4)",G.setLineDash([5,5]),G.beginPath(),G.moveTo(0,Wt),G.lineTo(gt,Wt),G.stroke(),G.setLineDash([]),G.strokeStyle=U?"rgba(34, 197, 94, 0.3)":"rgba(239, 68, 68, 0.55)",G.lineWidth=2,G.setLineDash([4,4]),G.beginPath();for(let mt=0;mt<gt;mt++){const L=mt/gt*r*Math.PI*2+f*Math.PI/180+xt*.4,F=Wt+Math.sin(L)*c;mt===0?G.moveTo(mt,F):G.lineTo(mt,F)}G.stroke(),G.setLineDash([]),G.strokeStyle=U?"#22c55e":"#4ade80",G.shadowColor=U?"#22c55e":"#4ade80",G.shadowBlur=U?15:8,G.lineWidth=3.5,G.beginPath();for(let mt=0;mt<gt;mt++){const L=mt/gt*x*Math.PI*2+T*Math.PI/180+xt*.4,F=Wt+Math.sin(L)*b;mt===0?G.moveTo(mt,F):G.lineTo(mt,F)}G.stroke(),G.shadowBlur=0,U&&(G.fillStyle="rgba(34, 197, 94, 0.05)",G.fillRect(0,0,gt,Gt)),at.current=requestAnimationFrame(it)};return it(),()=>{window.removeEventListener("resize",rt),at.current&&cancelAnimationFrame(at.current)}},[x,b,T,r,c,f,U]),m.jsx("div",{className:"w-full bg-black text-green-300 relative select-none",children:m.jsxs("div",{className:"flex flex-col justify-between min-h-screen p-4 md:p-6 relative",children:[m.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(#333333_1px,transparent_1px)] [background-size:24px_24px] opacity-20 pointer-events-none"}),m.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_center,rgba(0,0,0,0)_0%,#000000_100%)] pointer-events-none"}),m.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center border-b border-green-900/80 pb-3 mb-3 z-10 gap-3",children:[m.jsx("div",{children:m.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[m.jsx(tf,{className:"w-6 h-6 text-green-400 animate-pulse"}),m.jsxs("h2",{className:"text-xl md:text-2xl font-mono tracking-[0.15em] uppercase text-green-400 font-black",children:["ПОИСК СИГНАЛА • СЕКТОР А-0",a]})]})}),m.jsxs("div",{className:`flex items-center gap-4 bg-green-950/40 p-2 px-4 rounded-xl border border-green-900/60 transition-all duration-500 ${D?"":"animate-pulse ring-2 ring-green-400/50 bg-green-500/10"}`,children:[m.jsxs("div",{className:"flex flex-col items-start font-mono text-left",children:[m.jsx("span",{className:"text-xs text-green-500 uppercase tracking-widest font-bold",children:"КОГЕРЕНТНОСТЬ"}),m.jsxs("span",{className:`text-2xl font-black ${U?"text-emerald-400 animate-pulse":"text-green-400"} tracking-wider`,children:[P,"%"]})]}),m.jsx("div",{className:"h-8 w-px bg-green-900"}),m.jsx("div",{className:"flex items-center gap-2",children:U?m.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 bg-emerald-500/10 border border-emerald-500/30 rounded-lg text-emerald-400 text-sm font-mono font-bold animate-pulse",children:[m.jsx(ef,{className:"w-4 h-4 animate-bounce"})," СИНХРОНИЗИРОВАНО"]}):m.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 bg-amber-500/5 border border-amber-500/25 rounded-lg text-amber-500 text-sm font-mono font-bold",children:[m.jsx(Of,{className:"w-4 h-4 animate-bounce text-amber-500"})," НАСТРОЙТЕ ВОЛНЫ"]})})]})]}),m.jsx("div",{className:"flex-1 flex flex-col justify-center items-center py-2 z-10",children:m.jsxs("div",{className:"w-full max-w-2xl bg-black/90 rounded-2xl border border-green-900/60 shadow-2xl p-3.5 relative overflow-hidden backdrop-blur-md",children:[m.jsxs("div",{className:"absolute top-3 left-3 flex gap-4 font-mono text-xs font-bold z-20",children:[m.jsxs("div",{className:"flex items-center gap-1.5 bg-green-950/90 px-2.5 py-1 rounded-md border border-red-500/20",children:[m.jsx("span",{className:"w-2.5 h-0.5 bg-red-500 inline-block border-t border-dashed"}),m.jsx("span",{className:"text-red-400 uppercase tracking-wider",children:"ЭТАЛОН СЕКТОРА"})]}),m.jsxs("div",{className:"flex items-center gap-1.5 bg-green-950/90 px-2.5 py-1 rounded-md border border-green-500/20",children:[m.jsx("span",{className:"w-2.5 h-0.5 bg-green-400 inline-block"}),m.jsx("span",{className:"text-green-400 uppercase tracking-wider",children:"ВАШ СИГНАЛ"})]})]}),m.jsx("div",{className:"w-full h-[180px] bg-black rounded-xl relative overflow-hidden border border-green-900/80 flex items-center justify-center",children:m.jsx("canvas",{ref:J,className:"w-full h-full block"})}),m.jsxs("div",{className:"grid grid-cols-3 gap-2 mt-3 font-mono text-center border-t border-green-900/80 pt-3",children:[m.jsxs("div",{children:[m.jsx("span",{className:"text-xs text-green-500 block uppercase mb-0.5 font-bold",children:"Частота"}),m.jsxs("span",{className:"text-green-400 font-black text-lg block",children:[x.toFixed(1)," / ",r.toFixed(1)," Hz"]})]}),m.jsxs("div",{children:[m.jsx("span",{className:"text-xs text-green-500 block uppercase mb-0.5 font-bold",children:"Амплитуда"}),m.jsxs("span",{className:"text-green-400 font-black text-lg block",children:[b," / ",c," mW"]})]}),m.jsxs("div",{children:[m.jsx("span",{className:"text-xs text-green-500 block uppercase mb-0.5 font-bold",children:"Фазовый сдвиг"}),m.jsxs("span",{className:"text-green-400 font-black text-lg block",children:[T,"° / ",f,"°"]})]})]})]})}),m.jsxs("div",{className:"w-full max-w-2xl mx-auto flex flex-col gap-4 p-4 px-5 bg-green-950/40 rounded-2xl border border-green-900/80 backdrop-blur-sm z-10 my-2",children:[m.jsxs("div",{className:`flex flex-col gap-1.5 transition-all duration-500 ${D?"":"animate-pulse ring-2 ring-green-400/50 rounded-lg bg-green-500/10"}`,onPointerDown:()=>!D&&k(!0),children:[m.jsxs("div",{className:"flex justify-between items-center font-mono text-sm font-bold",children:[m.jsxs("span",{className:"text-green-400 flex items-center gap-1.5",children:[m.jsx(qr,{className:"w-4 h-4 text-green-400"}),"ЧАСТОТА ГЕНЕРАТОРА"]}),m.jsxs("span",{className:"text-green-400 text-base font-black",children:[x.toFixed(1)," Hz"]})]}),m.jsx("input",{type:"range",min:"1",max:"9",step:"0.1",value:x,disabled:U,onChange:Z=>{y(parseFloat(Z.target.value)),D||k(!0)},className:"w-full h-2 bg-green-950 rounded-lg appearance-none cursor-pointer accent-green-400 focus:outline-none disabled:opacity-50"})]}),m.jsxs("div",{className:"flex flex-col gap-1.5",children:[m.jsxs("div",{className:"flex justify-between items-center font-mono text-sm font-bold",children:[m.jsxs("span",{className:"text-green-400 flex items-center gap-1.5",children:[m.jsx(Ky,{className:"w-4 h-4 text-green-400"}),"МОЩНОСТЬ АМПЛИТУДЫ"]}),m.jsxs("span",{className:"text-green-400 text-base font-black",children:[b," mW"]})]}),m.jsx("input",{type:"range",min:"10",max:"90",step:"1",value:b,disabled:U,onChange:Z=>S(parseInt(Z.target.value)),className:"w-full h-2 bg-green-950 rounded-lg appearance-none cursor-pointer accent-green-400 focus:outline-none disabled:opacity-50"})]}),m.jsxs("div",{className:"flex flex-col gap-1.5",children:[m.jsxs("div",{className:"flex justify-between items-center font-mono text-sm font-bold",children:[m.jsxs("span",{className:"text-green-400 flex items-center gap-1.5",children:[m.jsx(tf,{className:"w-4 h-4 text-green-400"}),"ФАЗОВЫЙ СДВИГ"]}),m.jsxs("span",{className:"text-green-400 text-base font-black",children:[T,"°"]})]}),m.jsx("input",{type:"range",min:"0",max:"180",step:"1",value:T,disabled:U,onChange:Z=>N(parseInt(Z.target.value)),className:"w-full h-2 bg-green-950 rounded-lg appearance-none cursor-pointer accent-green-400 focus:outline-none disabled:opacity-50"})]})]}),m.jsx("div",{className:"max-w-md w-full mx-auto flex flex-col items-center justify-center gap-3 text-center z-10 border-t border-green-900/60 pt-3 mt-1",children:m.jsx("div",{className:"w-full",children:m.jsx(Ki,{mode:"wait",children:U?m.jsxs(Ft.button,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},whileHover:{scale:1.03,boxShadow:"0 0 25px rgba(34,197,94,0.4)"},whileTap:{scale:.98},onClick:s,className:"w-full py-3.5 bg-gradient-to-r from-emerald-600 to-teal-500 hover:brightness-110 text-white font-mono font-bold text-base rounded-xl tracking-widest shadow-lg shadow-emerald-500/20 cursor-pointer flex items-center justify-center gap-2",children:[m.jsx(ef,{className:"w-5 h-5 animate-pulse"}),m.jsx("span",{children:"ПОДКЛЮЧИТЬСЯ К ОРБИТЕ СЕКТОРA ➔"})]},"unlocked-btn"):m.jsx("div",{className:"w-full py-3.5 bg-green-950/30 border border-green-900/50 text-green-600 font-mono text-sm font-bold rounded-xl tracking-widest cursor-not-allowed uppercase",children:"Ожидание захвата частоты..."})})})}),m.jsx("div",{className:"text-center font-mono text-[9px] text-slate-700 z-10 pt-2",children:"СЕТЕВОЕ ШИФРОВАНИЕ ИМПЕРИИ. ПЕРЕДАЧА ДАННЫХ ВЕРИФИЦИРОВАНА."})]})})}function r4(){const[a,s]=B.useState("MENU"),[r,l]=B.useState(()=>{const b=localStorage.getItem("orbit_level");return b?parseInt(b,10):1}),[c,h]=B.useState(0);B.useEffect(()=>{localStorage.setItem("orbit_level",r.toString())},[r]),B.useEffect(()=>{const b=S=>{S.preventDefault()};return window.addEventListener("contextmenu",b),()=>{window.removeEventListener("contextmenu",b)}},[]);const f=(b=1)=>{Et.init(),Et.playCollect(),l(b),s("SIGNAL_PUZZLE")},p=b=>{Et.playCollect(),r<10&&(l(S=>S+1),s("SIGNAL_PUZZLE"))},x=()=>{Et.stopAll(),s("TWIST")},y=()=>{Et.stopAll(),s("MENU"),l(1)};return m.jsx("div",{className:"w-full min-h-screen bg-black text-green-300 font-sans select-none overflow-y-auto no-scrollbar",children:m.jsxs(Ki,{mode:"wait",children:[a==="MENU"&&m.jsxs(Ft.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"w-full h-full overflow-y-auto flex flex-col justify-between p-6 relative",id:"main-menu",children:[m.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(#333333_1px,transparent_1px)] [background-size:32px_32px] opacity-25 pointer-events-none"}),m.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_center,rgba(0,0,0,0)_0%,#000000_100%)] pointer-events-none"}),m.jsx("div",{className:"absolute top-1/3 left-1/2 -translate-x-1/2 w-[500px] h-[500px] bg-slate-500/10 rounded-full filter blur-[140px] pointer-events-none animate-pulse"}),m.jsxs("div",{className:"flex justify-between items-center z-10 font-mono text-xs text-green-600 border-b border-green-900/50 pb-4",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(HT,{className:"w-4 h-4 text-emerald-500 animate-spin"}),m.jsx("span",{children:"ИМПЕРСКИЙ ТРЕНАЖОР ПИЛОТОВ v94.1"})]}),m.jsx("div",{className:"px-3 py-1 bg-emerald-500/10 border border-emerald-500/30 rounded text-green-400 font-bold animate-pulse",children:"СЕТЕВОЙ РЕЖИМ СТАБИЛЕН"})]}),m.jsxs("div",{className:"max-w-xl w-full mx-auto flex flex-col items-center justify-center py-12 z-10 text-center",children:[m.jsx(Ft.div,{animate:{y:[0,-10,0]},transition:{repeat:1/0,duration:4,ease:"easeInOut"},className:"mb-8",children:m.jsx("img",{src:Zy,className:"w-24 h-24 object-contain filter drop-shadow-[0_0_15px_rgba(255,255,255,0.2)]",alt:"Ship"})}),m.jsxs("h1",{className:"text-4xl md:text-5xl font-sans font-extrabold tracking-tight text-white mb-8 uppercase select-none",children:["Орбитальный ",m.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-emerald-400 via-green-400 to-teal-400",children:"Ликвидатор"})]}),m.jsxs("div",{className:"flex flex-col gap-4 w-full px-4",children:[r>1&&m.jsx(Ft.button,{whileHover:{scale:1.03,boxShadow:"0 0 25px rgba(59,130,246,0.5)"},whileTap:{scale:.98},onClick:()=>f(r),className:"w-full py-4.5 bg-gradient-to-r from-teal-600 to-emerald-500 text-white font-mono font-bold rounded-xl tracking-wider shadow-lg shadow-teal-500/20 cursor-pointer flex items-center justify-center gap-2",children:m.jsxs("span",{children:["ПРОДОЛЖИТЬ (СЕКТОР ",r,")"]})}),m.jsx(Ft.button,{whileHover:{scale:1.03,boxShadow:"0 0 25px rgba(59,130,246,0.5)"},whileTap:{scale:.98},onClick:()=>f(1),className:"w-full py-4.5 bg-gradient-to-r from-emerald-600 to-green-500 text-white font-mono font-bold rounded-xl tracking-wider shadow-lg shadow-emerald-500/20 cursor-pointer flex items-center justify-center gap-2",id:"btn-start-full-game",children:m.jsx("span",{children:r>1?"НАЧАТЬ ЗАНОВО (СЕКТОР 1)":"НАЧАТЬ С ПОЛНОЙ ОПТИМИЗАЦИЕЙ (СЕКТОР 1)"})})]})]}),m.jsx("div",{className:"text-center font-mono text-[9px] text-slate-600 z-10 border-t border-green-900/50 pt-4 mt-6",children:"КОНФИДЕНЦИАЛЬНО. ПОСТАВЛЕНО ДЛЯ АВТОНОМНЫХ КАТЕРОВ ИМПЕРИИ. ВСЕ ПРАВА ЗАЩИЩЕНЫ."})]},"menu"),a==="SIGNAL_PUZZLE"&&m.jsx(Ft.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"w-full h-full",children:m.jsx(l4,{level:r,onSolve:()=>s("BRIEFING")})},"signal-puzzle"),a==="BRIEFING"&&m.jsx(Ft.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"w-full",children:m.jsx(PT,{level:r,onStart:()=>s("PLAYING")})},"briefing"),a==="PLAYING"&&m.jsx(Ft.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"w-full h-screen",children:m.jsx(n4,{level:r,onLevelComplete:p,onTriggerTwist:x,onPlayerAsleep:()=>s("ASLEEP"),onTriggerPeacefulWin:()=>s("PEACEFUL_WIN"),onExitToMenu:y})},"playing"),a==="TWIST"&&m.jsx(Ft.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"w-full",children:m.jsx(a4,{onRestart:y})},"twist"),a==="ASLEEP"&&m.jsx(Ft.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"w-full",children:m.jsx(i4,{onWakeUp:()=>f(1)})},"asleep"),a==="PEACEFUL_WIN"&&m.jsx(Ft.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"w-full",children:m.jsx(s4,{onRestart:y})},"peaceful-win")]})})}hv.createRoot(document.getElementById("root")).render(m.jsx(B.StrictMode,{children:m.jsx(r4,{})}));
