(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))r(u);new MutationObserver(u=>{for(const m of u)if(m.type==="childList")for(const h of m.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function l(u){const m={};return u.integrity&&(m.integrity=u.integrity),u.referrerPolicy&&(m.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?m.credentials="include":u.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function r(u){if(u.ep)return;u.ep=!0;const m=l(u);fetch(u.href,m)}})();var Tu={exports:{}},sl={};/**
 * @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 O0;function sv(){if(O0)return sl;O0=1;var a=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function l(r,u,m){var h=null;if(m!==void 0&&(h=""+m),u.key!==void 0&&(h=""+u.key),"key"in u){m={};for(var g in u)g!=="key"&&(m[g]=u[g])}else m=u;return u=m.ref,{$$typeof:a,type:r,key:h,ref:u!==void 0?u:null,props:m}}return sl.Fragment=i,sl.jsx=l,sl.jsxs=l,sl}var z0;function lv(){return z0||(z0=1,Tu.exports=sv()),Tu.exports}var f=lv(),_u={exports:{}},Ve={};/**
 * @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 L0;function rv(){if(L0)return Ve;L0=1;var a=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),h=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),T=Symbol.iterator;function N(M){return M===null||typeof M!="object"?null:(M=T&&M[T]||M["@@iterator"],typeof M=="function"?M:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,B={};function Y(M,q,J){this.props=M,this.context=q,this.refs=B,this.updater=J||j}Y.prototype.isReactComponent={},Y.prototype.setState=function(M,q){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,q,"setState")},Y.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function Z(){}Z.prototype=Y.prototype;function P(M,q,J){this.props=M,this.context=q,this.refs=B,this.updater=J||j}var Q=P.prototype=new Z;Q.constructor=P,k(Q,Y.prototype),Q.isPureReactComponent=!0;var W=Array.isArray;function ce(){}var K={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function ae(M,q,J){var se=J.ref;return{$$typeof:a,type:M,key:q,ref:se!==void 0?se:null,props:J}}function fe(M,q){return ae(M.type,q,M.props)}function Le(M){return typeof M=="object"&&M!==null&&M.$$typeof===a}function Me(M){var q={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(J){return q[J]})}var Fe=/\/+/g;function lt(M,q){return typeof M=="object"&&M!==null&&M.key!=null?Me(""+M.key):q.toString(36)}function et(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(ce,ce):(M.status="pending",M.then(function(q){M.status==="pending"&&(M.status="fulfilled",M.value=q)},function(q){M.status==="pending"&&(M.status="rejected",M.reason=q)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function U(M,q,J,se,Se){var Ne=typeof M;(Ne==="undefined"||Ne==="boolean")&&(M=null);var Ge=!1;if(M===null)Ge=!0;else switch(Ne){case"bigint":case"string":case"number":Ge=!0;break;case"object":switch(M.$$typeof){case a:case i:Ge=!0;break;case b:return Ge=M._init,U(Ge(M._payload),q,J,se,Se)}}if(Ge)return Se=Se(M),Ge=se===""?"."+lt(M,0):se,W(Se)?(J="",Ge!=null&&(J=Ge.replace(Fe,"$&/")+"/"),U(Se,q,J,"",function(Hn){return Hn})):Se!=null&&(Le(Se)&&(Se=fe(Se,J+(Se.key==null||M&&M.key===Se.key?"":(""+Se.key).replace(Fe,"$&/")+"/")+Ge)),q.push(Se)),1;Ge=0;var Rt=se===""?".":se+":";if(W(M))for(var ut=0;ut<M.length;ut++)se=M[ut],Ne=Rt+lt(se,ut),Ge+=U(se,q,J,Ne,Se);else if(ut=N(M),typeof ut=="function")for(M=ut.call(M),ut=0;!(se=M.next()).done;)se=se.value,Ne=Rt+lt(se,ut++),Ge+=U(se,q,J,Ne,Se);else if(Ne==="object"){if(typeof M.then=="function")return U(et(M),q,J,se,Se);throw q=String(M),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return Ge}function $(M,q,J){if(M==null)return M;var se=[],Se=0;return U(M,se,"","",function(Ne){return q.call(J,Ne,Se++)}),se}function te(M){if(M._status===-1){var q=M._result;q=q(),q.then(function(J){(M._status===0||M._status===-1)&&(M._status=1,M._result=J)},function(J){(M._status===0||M._status===-1)&&(M._status=2,M._result=J)}),M._status===-1&&(M._status=0,M._result=q)}if(M._status===1)return M._result.default;throw M._result}var Ae=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},Ce={map:$,forEach:function(M,q,J){$(M,function(){q.apply(this,arguments)},J)},count:function(M){var q=0;return $(M,function(){q++}),q},toArray:function(M){return $(M,function(q){return q})||[]},only:function(M){if(!Le(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return Ve.Activity=S,Ve.Children=Ce,Ve.Component=Y,Ve.Fragment=l,Ve.Profiler=u,Ve.PureComponent=P,Ve.StrictMode=r,Ve.Suspense=y,Ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,Ve.__COMPILER_RUNTIME={__proto__:null,c:function(M){return K.H.useMemoCache(M)}},Ve.cache=function(M){return function(){return M.apply(null,arguments)}},Ve.cacheSignal=function(){return null},Ve.cloneElement=function(M,q,J){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var se=k({},M.props),Se=M.key;if(q!=null)for(Ne in q.key!==void 0&&(Se=""+q.key),q)!F.call(q,Ne)||Ne==="key"||Ne==="__self"||Ne==="__source"||Ne==="ref"&&q.ref===void 0||(se[Ne]=q[Ne]);var Ne=arguments.length-2;if(Ne===1)se.children=J;else if(1<Ne){for(var Ge=Array(Ne),Rt=0;Rt<Ne;Rt++)Ge[Rt]=arguments[Rt+2];se.children=Ge}return ae(M.type,Se,se)},Ve.createContext=function(M){return M={$$typeof:h,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:m,_context:M},M},Ve.createElement=function(M,q,J){var se,Se={},Ne=null;if(q!=null)for(se in q.key!==void 0&&(Ne=""+q.key),q)F.call(q,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(Se[se]=q[se]);var Ge=arguments.length-2;if(Ge===1)Se.children=J;else if(1<Ge){for(var Rt=Array(Ge),ut=0;ut<Ge;ut++)Rt[ut]=arguments[ut+2];Se.children=Rt}if(M&&M.defaultProps)for(se in Ge=M.defaultProps,Ge)Se[se]===void 0&&(Se[se]=Ge[se]);return ae(M,Ne,Se)},Ve.createRef=function(){return{current:null}},Ve.forwardRef=function(M){return{$$typeof:g,render:M}},Ve.isValidElement=Le,Ve.lazy=function(M){return{$$typeof:b,_payload:{_status:-1,_result:M},_init:te}},Ve.memo=function(M,q){return{$$typeof:x,type:M,compare:q===void 0?null:q}},Ve.startTransition=function(M){var q=K.T,J={};K.T=J;try{var se=M(),Se=K.S;Se!==null&&Se(J,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(ce,Ae)}catch(Ne){Ae(Ne)}finally{q!==null&&J.types!==null&&(q.types=J.types),K.T=q}},Ve.unstable_useCacheRefresh=function(){return K.H.useCacheRefresh()},Ve.use=function(M){return K.H.use(M)},Ve.useActionState=function(M,q,J){return K.H.useActionState(M,q,J)},Ve.useCallback=function(M,q){return K.H.useCallback(M,q)},Ve.useContext=function(M){return K.H.useContext(M)},Ve.useDebugValue=function(){},Ve.useDeferredValue=function(M,q){return K.H.useDeferredValue(M,q)},Ve.useEffect=function(M,q){return K.H.useEffect(M,q)},Ve.useEffectEvent=function(M){return K.H.useEffectEvent(M)},Ve.useId=function(){return K.H.useId()},Ve.useImperativeHandle=function(M,q,J){return K.H.useImperativeHandle(M,q,J)},Ve.useInsertionEffect=function(M,q){return K.H.useInsertionEffect(M,q)},Ve.useLayoutEffect=function(M,q){return K.H.useLayoutEffect(M,q)},Ve.useMemo=function(M,q){return K.H.useMemo(M,q)},Ve.useOptimistic=function(M,q){return K.H.useOptimistic(M,q)},Ve.useReducer=function(M,q,J){return K.H.useReducer(M,q,J)},Ve.useRef=function(M){return K.H.useRef(M)},Ve.useState=function(M){return K.H.useState(M)},Ve.useSyncExternalStore=function(M,q,J){return K.H.useSyncExternalStore(M,q,J)},Ve.useTransition=function(){return K.H.useTransition()},Ve.version="19.2.7",Ve}var k0;function xf(){return k0||(k0=1,_u.exports=rv()),_u.exports}var V=xf(),Au={exports:{}},ll={},Eu={exports:{}},Mu={};/**
 * @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 U0;function ov(){return U0||(U0=1,(function(a){function i(U,$){var te=U.length;U.push($);e:for(;0<te;){var Ae=te-1>>>1,Ce=U[Ae];if(0<u(Ce,$))U[Ae]=$,U[te]=Ce,te=Ae;else break e}}function l(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var $=U[0],te=U.pop();if(te!==$){U[0]=te;e:for(var Ae=0,Ce=U.length,M=Ce>>>1;Ae<M;){var q=2*(Ae+1)-1,J=U[q],se=q+1,Se=U[se];if(0>u(J,te))se<Ce&&0>u(Se,J)?(U[Ae]=Se,U[se]=te,Ae=se):(U[Ae]=J,U[q]=te,Ae=q);else if(se<Ce&&0>u(Se,te))U[Ae]=Se,U[se]=te,Ae=se;else break e}}return $}function u(U,$){var te=U.sortIndex-$.sortIndex;return te!==0?te:U.id-$.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;a.unstable_now=function(){return m.now()}}else{var h=Date,g=h.now();a.unstable_now=function(){return h.now()-g}}var y=[],x=[],b=1,S=null,T=3,N=!1,j=!1,k=!1,B=!1,Y=typeof setTimeout=="function"?setTimeout:null,Z=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;function Q(U){for(var $=l(x);$!==null;){if($.callback===null)r(x);else if($.startTime<=U)r(x),$.sortIndex=$.expirationTime,i(y,$);else break;$=l(x)}}function W(U){if(k=!1,Q(U),!j)if(l(y)!==null)j=!0,ce||(ce=!0,Me());else{var $=l(x);$!==null&&et(W,$.startTime-U)}}var ce=!1,K=-1,F=5,ae=-1;function fe(){return B?!0:!(a.unstable_now()-ae<F)}function Le(){if(B=!1,ce){var U=a.unstable_now();ae=U;var $=!0;try{e:{j=!1,k&&(k=!1,Z(K),K=-1),N=!0;var te=T;try{t:{for(Q(U),S=l(y);S!==null&&!(S.expirationTime>U&&fe());){var Ae=S.callback;if(typeof Ae=="function"){S.callback=null,T=S.priorityLevel;var Ce=Ae(S.expirationTime<=U);if(U=a.unstable_now(),typeof Ce=="function"){S.callback=Ce,Q(U),$=!0;break t}S===l(y)&&r(y),Q(U)}else r(y);S=l(y)}if(S!==null)$=!0;else{var M=l(x);M!==null&&et(W,M.startTime-U),$=!1}}break e}finally{S=null,T=te,N=!1}$=void 0}}finally{$?Me():ce=!1}}}var Me;if(typeof P=="function")Me=function(){P(Le)};else if(typeof MessageChannel<"u"){var Fe=new MessageChannel,lt=Fe.port2;Fe.port1.onmessage=Le,Me=function(){lt.postMessage(null)}}else Me=function(){Y(Le,0)};function et(U,$){K=Y(function(){U(a.unstable_now())},$)}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(U){U.callback=null},a.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<U?Math.floor(1e3/U):5},a.unstable_getCurrentPriorityLevel=function(){return T},a.unstable_next=function(U){switch(T){case 1:case 2:case 3:var $=3;break;default:$=T}var te=T;T=$;try{return U()}finally{T=te}},a.unstable_requestPaint=function(){B=!0},a.unstable_runWithPriority=function(U,$){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var te=T;T=U;try{return $()}finally{T=te}},a.unstable_scheduleCallback=function(U,$,te){var Ae=a.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?Ae+te:Ae):te=Ae,U){case 1:var Ce=-1;break;case 2:Ce=250;break;case 5:Ce=1073741823;break;case 4:Ce=1e4;break;default:Ce=5e3}return Ce=te+Ce,U={id:b++,callback:$,priorityLevel:U,startTime:te,expirationTime:Ce,sortIndex:-1},te>Ae?(U.sortIndex=te,i(x,U),l(y)===null&&U===l(x)&&(k?(Z(K),K=-1):k=!0,et(W,te-Ae))):(U.sortIndex=Ce,i(y,U),j||N||(j=!0,ce||(ce=!0,Me()))),U},a.unstable_shouldYield=fe,a.unstable_wrapCallback=function(U){var $=T;return function(){var te=T;T=$;try{return U.apply(this,arguments)}finally{T=te}}}})(Mu)),Mu}var B0;function cv(){return B0||(B0=1,Eu.exports=ov()),Eu.exports}var wu={exports:{}},Zt={};/**
 * @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 H0;function uv(){if(H0)return Zt;H0=1;var a=xf();function i(y){var x="https://react.dev/errors/"+y;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)x+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+y+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var r={d:{f:l,r:function(){throw Error(i(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},u=Symbol.for("react.portal");function m(y,x,b){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:S==null?null:""+S,children:y,containerInfo:x,implementation:b}}var h=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(y,x){if(y==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return Zt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Zt.createPortal=function(y,x){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(i(299));return m(y,x,null,b)},Zt.flushSync=function(y){var x=h.T,b=r.p;try{if(h.T=null,r.p=2,y)return y()}finally{h.T=x,r.p=b,r.d.f()}},Zt.preconnect=function(y,x){typeof y=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,r.d.C(y,x))},Zt.prefetchDNS=function(y){typeof y=="string"&&r.d.D(y)},Zt.preinit=function(y,x){if(typeof y=="string"&&x&&typeof x.as=="string"){var b=x.as,S=g(b,x.crossOrigin),T=typeof x.integrity=="string"?x.integrity:void 0,N=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;b==="style"?r.d.S(y,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:S,integrity:T,fetchPriority:N}):b==="script"&&r.d.X(y,{crossOrigin:S,integrity:T,fetchPriority:N,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},Zt.preinitModule=function(y,x){if(typeof y=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var b=g(x.as,x.crossOrigin);r.d.M(y,{crossOrigin:b,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&r.d.M(y)},Zt.preload=function(y,x){if(typeof y=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var b=x.as,S=g(b,x.crossOrigin);r.d.L(y,b,{crossOrigin:S,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},Zt.preloadModule=function(y,x){if(typeof y=="string")if(x){var b=g(x.as,x.crossOrigin);r.d.m(y,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:b,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else r.d.m(y)},Zt.requestFormReset=function(y){r.d.r(y)},Zt.unstable_batchedUpdates=function(y,x){return y(x)},Zt.useFormState=function(y,x,b){return h.H.useFormState(y,x,b)},Zt.useFormStatus=function(){return h.H.useHostTransitionStatus()},Zt.version="19.2.7",Zt}var G0;function fv(){if(G0)return wu.exports;G0=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(i){console.error(i)}}return a(),wu.exports=uv(),wu.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 Y0;function dv(){if(Y0)return ll;Y0=1;var a=cv(),i=xf(),l=fv();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(m(e)!==e)throw Error(r(188))}function x(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(r(188));return t!==e?null:e}for(var n=e,s=t;;){var o=n.return;if(o===null)break;var c=o.alternate;if(c===null){if(s=o.return,s!==null){n=s;continue}break}if(o.child===c.child){for(c=o.child;c;){if(c===n)return y(o),e;if(c===s)return y(o),t;c=c.sibling}throw Error(r(188))}if(n.return!==s.return)n=o,s=c;else{for(var p=!1,v=o.child;v;){if(v===n){p=!0,n=o,s=c;break}if(v===s){p=!0,s=o,n=c;break}v=v.sibling}if(!p){for(v=c.child;v;){if(v===n){p=!0,n=c,s=o;break}if(v===s){p=!0,s=c,n=o;break}v=v.sibling}if(!p)throw Error(r(189))}}if(n.alternate!==s)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var S=Object.assign,T=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),P=Symbol.for("react.context"),Q=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),ce=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),fe=Symbol.for("react.memo_cache_sentinel"),Le=Symbol.iterator;function Me(e){return e===null||typeof e!="object"?null:(e=Le&&e[Le]||e["@@iterator"],typeof e=="function"?e:null)}var Fe=Symbol.for("react.client.reference");function lt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Fe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case k:return"Fragment";case Y:return"Profiler";case B:return"StrictMode";case W:return"Suspense";case ce:return"SuspenseList";case ae:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case j:return"Portal";case P:return e.displayName||"Context";case Z:return(e._context.displayName||"Context")+".Consumer";case Q:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K:return t=e.displayName||null,t!==null?t:lt(e.type)||"Memo";case F:t=e._payload,e=e._init;try{return lt(e(t))}catch{}}return null}var et=Array.isArray,U=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},Ae=[],Ce=-1;function M(e){return{current:e}}function q(e){0>Ce||(e.current=Ae[Ce],Ae[Ce]=null,Ce--)}function J(e,t){Ce++,Ae[Ce]=e.current,e.current=t}var se=M(null),Se=M(null),Ne=M(null),Ge=M(null);function Rt(e,t){switch(J(Ne,t),J(Se,e),J(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?a0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=a0(t),e=i0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(se),J(se,e)}function ut(){q(se),q(Se),q(Ne)}function Hn(e){e.memoizedState!==null&&J(Ge,e);var t=se.current,n=i0(t,e.type);t!==n&&(J(Se,e),J(se,n))}function Gn(e){Se.current===e&&(q(se),q(Se)),Ge.current===e&&(q(Ge),tl._currentValue=te)}var Sa,un;function Rn(e){if(Sa===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Sa=t&&t[1]||"",un=-1<n.stack.indexOf(`
    at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Sa+e+un}var ke=!1;function re(e,t){if(!e||ke)return"";ke=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){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(L){var z=L}Reflect.construct(e,[],X)}else{try{X.call()}catch(L){z=L}e.call(X.prototype)}}else{try{throw Error()}catch(L){z=L}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(L){if(L&&z&&typeof L.stack=="string")return[L.stack,z.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=s.DetermineComponentFrameRoot(),p=c[0],v=c[1];if(p&&v){var _=p.split(`
`),O=v.split(`
`);for(o=s=0;s<_.length&&!_[s].includes("DetermineComponentFrameRoot");)s++;for(;o<O.length&&!O[o].includes("DetermineComponentFrameRoot");)o++;if(s===_.length||o===O.length)for(s=_.length-1,o=O.length-1;1<=s&&0<=o&&_[s]!==O[o];)o--;for(;1<=s&&0<=o;s--,o--)if(_[s]!==O[o]){if(s!==1||o!==1)do if(s--,o--,0>o||_[s]!==O[o]){var G=`
`+_[s].replace(" at new "," at ");return e.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",e.displayName)),G}while(1<=s&&0<=o);break}}}finally{ke=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Rn(n):""}function yt(e,t){switch(e.tag){case 26:case 27:case 5:return Rn(e.type);case 16:return Rn("Lazy");case 13:return e.child!==t&&t!==null?Rn("Suspense Fallback"):Rn("Suspense");case 19:return Rn("SuspenseList");case 0:case 15:return re(e.type,!1);case 11:return re(e.type.render,!1);case 1:return re(e.type,!0);case 31:return Rn("Activity");default:return""}}function en(e){try{var t="",n=null;do t+=yt(e,n),n=e,e=e.return;while(e);return t}catch(s){return`
Error generating stack: `+s.message+`
`+s.stack}}var Pt=Object.prototype.hasOwnProperty,Lt=a.unstable_scheduleCallback,pt=a.unstable_cancelCallback,tn=a.unstable_shouldYield,We=a.unstable_requestPaint,Dt=a.unstable_now,Yn=a.unstable_getCurrentPriorityLevel,Sl=a.unstable_ImmediatePriority,Ta=a.unstable_UserBlockingPriority,Ja=a.unstable_NormalPriority,$a=a.unstable_LowPriority,Tl=a.unstable_IdlePriority,ys=a.log,_l=a.unstable_setDisableYieldValue,qn=null,Xt=null;function Dn(e){if(typeof ys=="function"&&_l(e),Xt&&typeof Xt.setStrictMode=="function")try{Xt.setStrictMode(qn,e)}catch{}}var ie=Math.clz32?Math.clz32:fo,Kt=Math.log,uo=Math.LN2;function fo(e){return e>>>=0,e===0?32:31-(Kt(e)/uo|0)|0}var Mi=256,ei=262144,wi=4194304;function na(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ni(e,t,n){var s=e.pendingLanes;if(s===0)return 0;var o=0,c=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var v=s&134217727;return v!==0?(s=v&~c,s!==0?o=na(s):(p&=v,p!==0?o=na(p):n||(n=v&~e,n!==0&&(o=na(n))))):(v=s&~c,v!==0?o=na(v):p!==0?o=na(p):n||(n=s&~e,n!==0&&(o=na(n)))),o===0?0:t!==0&&t!==o&&(t&c)===0&&(c=o&-o,n=t&-t,c>=n||c===32&&(n&4194048)!==0)?t:o}function vn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ho(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 Al(){var e=wi;return wi<<=1,(wi&62914560)===0&&(wi=4194304),e}function ti(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ni(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function mo(e,t,n,s,o,c){var p=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var v=e.entanglements,_=e.expirationTimes,O=e.hiddenUpdates;for(n=p&~n;0<n;){var G=31-ie(n),X=1<<G;v[G]=0,_[G]=-1;var z=O[G];if(z!==null)for(O[G]=null,G=0;G<z.length;G++){var L=z[G];L!==null&&(L.lane&=-536870913)}n&=~X}s!==0&&H(e,s,0),c!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=c&~(p&~t))}function H(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-ie(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|n&261930}function d(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var s=31-ie(n),o=1<<s;o&t|e[s]&t&&(e[s]|=t),n&=~o}}function A(e,t){var n=t&-t;return n=(n&42)!==0?1:ue(n),(n&(e.suspendedLanes|t))!==0?0:n}function ue(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function me(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ze(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:w0(e.type))}function ft(e,t){var n=$.p;try{return $.p=e,t()}finally{$.p=n}}var De=Math.random().toString(36).slice(2),Te="__reactFiber$"+De,de="__reactProps$"+De,Ee="__reactContainer$"+De,xt="__reactEvents$"+De,bn="__reactListeners$"+De,In="__reactHandles$"+De,Xn="__reactResources$"+De,E="__reactMarker$"+De;function ve(e){delete e[Te],delete e[de],delete e[xt],delete e[bn],delete e[In]}function ee(e){var t=e[Te];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ee]||n[Te]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=f0(e);e!==null;){if(n=e[Te])return n;e=f0(e)}return t}e=n,n=e.parentNode}return null}function _e(e){if(e=e[Te]||e[Ee]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function je(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function be(e){var t=e[Xn];return t||(t=e[Xn]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function we(e){e[E]=!0}var kt=new Set,nn={};function C(e,t){ge(e,t),ge(e+"Capture",t)}function ge(e,t){for(nn[e]=t,e=0;e<t.length;e++)kt.add(t[e])}var ye=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]*$"),tt={},Ke={};function vt(e){return Pt.call(Ke,e)?!0:Pt.call(tt,e)?!1:ye.test(e)?Ke[e]=!0:(tt[e]=!0,!1)}function nt(e,t,n){if(vt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function dt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function _t(e,t,n,s){if(s===null)e.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+s)}}function Ue(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Kn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _a(e,t,n){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var o=s.get,c=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(p){n=""+p,c.call(this,p)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return n},setValue:function(p){n=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function po(e){if(!e._valueTracker){var t=Kn(e)?"checked":"value";e._valueTracker=_a(e,t,""+e[t])}}function Ff(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),s="";return e&&(s=Kn(e)?e.checked?"true":"false":e.value),e=s,e!==n?(t.setValue(e),!0):!1}function El(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var $y=/[\n"\\]/g;function Sn(e){return e.replace($y,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function go(e,t,n,s,o,c,p,v){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ue(t)):e.value!==""+Ue(t)&&(e.value=""+Ue(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?yo(e,p,Ue(t)):n!=null?yo(e,p,Ue(n)):s!=null&&e.removeAttribute("value"),o==null&&c!=null&&(e.defaultChecked=!!c),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+Ue(v):e.removeAttribute("name")}function Wf(e,t,n,s,o,c,p,v){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){po(e);return}n=n!=null?""+Ue(n):"",t=t!=null?""+Ue(t):n,v||t===e.value||(e.value=t),e.defaultValue=t}s=s??o,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=v?e.checked:!!s,e.defaultChecked=!!s,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),po(e)}function yo(e,t,n){t==="number"&&El(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function ji(e,t,n,s){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&s&&(e[n].defaultSelected=!0)}else{for(n=""+Ue(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,s&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Jf(e,t,n){if(t!=null&&(t=""+Ue(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Ue(n):""}function $f(e,t,n,s){if(t==null){if(s!=null){if(n!=null)throw Error(r(92));if(et(s)){if(1<s.length)throw Error(r(93));s=s[0]}n=s}n==null&&(n=""),t=n}n=Ue(t),e.defaultValue=n,s=e.textContent,s===n&&s!==""&&s!==null&&(e.value=s),po(e)}function Vi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ex=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 ed(e,t,n){var s=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,n):typeof n!="number"||n===0||ex.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function td(e,t,n){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,n!=null){for(var s in n)!n.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var o in t)s=t[o],t.hasOwnProperty(o)&&n[o]!==s&&ed(e,o,s)}else for(var c in t)t.hasOwnProperty(c)&&ed(e,c,t[c])}function xo(e){if(e.indexOf("-")===-1)return!1;switch(e){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"]]),nx=/^[\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 Ml(e){return nx.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function aa(){}var vo=null;function bo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ci=null,Ri=null;function nd(e){var t=_e(e);if(t&&(e=t.stateNode)){var n=e[de]||null;e:switch(e=t.stateNode,t.type){case"input":if(go(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Sn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var s=n[t];if(s!==e&&s.form===e.form){var o=s[de]||null;if(!o)throw Error(r(90));go(s,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<n.length;t++)s=n[t],s.form===e.form&&Ff(s)}break e;case"textarea":Jf(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&ji(e,!!n.multiple,t,!1)}}}var So=!1;function ad(e,t,n){if(So)return e(t,n);So=!0;try{var s=e(t);return s}finally{if(So=!1,(Ci!==null||Ri!==null)&&(hr(),Ci&&(t=Ci,e=Ri,Ri=Ci=null,nd(t),e)))for(t=0;t<e.length;t++)nd(e[t])}}function xs(e,t){var n=e.stateNode;if(n===null)return null;var s=n[de]||null;if(s===null)return null;n=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(r(231,t,typeof n));return n}var ia=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),To=!1;if(ia)try{var vs={};Object.defineProperty(vs,"passive",{get:function(){To=!0}}),window.addEventListener("test",vs,vs),window.removeEventListener("test",vs,vs)}catch{To=!1}var Aa=null,_o=null,wl=null;function id(){if(wl)return wl;var e,t=_o,n=t.length,s,o="value"in Aa?Aa.value:Aa.textContent,c=o.length;for(e=0;e<n&&t[e]===o[e];e++);var p=n-e;for(s=1;s<=p&&t[n-s]===o[c-s];s++);return wl=o.slice(e,1<s?1-s:void 0)}function Nl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function jl(){return!0}function sd(){return!1}function an(e){function t(n,s,o,c,p){this._reactName=n,this._targetInst=o,this.type=s,this.nativeEvent=c,this.target=p,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(n=e[v],this[v]=n?n(c):c[v]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?jl:sd,this.isPropagationStopped=sd,this}return S(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=jl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=jl)},persist:function(){},isPersistent:jl}),t}var ai={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vl=an(ai),bs=S({},ai,{view:0,detail:0}),ax=an(bs),Ao,Eo,Ss,Cl=S({},bs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wo,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ss&&(Ss&&e.type==="mousemove"?(Ao=e.screenX-Ss.screenX,Eo=e.screenY-Ss.screenY):Eo=Ao=0,Ss=e),Ao)},movementY:function(e){return"movementY"in e?e.movementY:Eo}}),ld=an(Cl),ix=S({},Cl,{dataTransfer:0}),sx=an(ix),lx=S({},bs,{relatedTarget:0}),Mo=an(lx),rx=S({},ai,{animationName:0,elapsedTime:0,pseudoElement:0}),ox=an(rx),cx=S({},ai,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ux=an(cx),fx=S({},ai,{data:0}),rd=an(fx),dx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hx={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"},mx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function px(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=mx[e])?!!t[e]:!1}function wo(){return px}var gx=S({},bs,{key:function(e){if(e.key){var t=dx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Nl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?hx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wo,charCode:function(e){return e.type==="keypress"?Nl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Nl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),yx=an(gx),xx=S({},Cl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),od=an(xx),vx=S({},bs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wo}),bx=an(vx),Sx=S({},ai,{propertyName:0,elapsedTime:0,pseudoElement:0}),Tx=an(Sx),_x=S({},Cl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ax=an(_x),Ex=S({},ai,{newState:0,oldState:0}),Mx=an(Ex),wx=[9,13,27,32],No=ia&&"CompositionEvent"in window,Ts=null;ia&&"documentMode"in document&&(Ts=document.documentMode);var Nx=ia&&"TextEvent"in window&&!Ts,cd=ia&&(!No||Ts&&8<Ts&&11>=Ts),ud=" ",fd=!1;function dd(e,t){switch(e){case"keyup":return wx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Di=!1;function jx(e,t){switch(e){case"compositionend":return hd(t);case"keypress":return t.which!==32?null:(fd=!0,ud);case"textInput":return e=t.data,e===ud&&fd?null:e;default:return null}}function Vx(e,t){if(Di)return e==="compositionend"||!No&&dd(e,t)?(e=id(),wl=_o=Aa=null,Di=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return cd&&t.locale!=="ko"?null:t.data;default:return null}}var Cx={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 md(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Cx[e.type]:t==="textarea"}function pd(e,t,n,s){Ci?Ri?Ri.push(s):Ri=[s]:Ci=s,t=br(t,"onChange"),0<t.length&&(n=new Vl("onChange","change",null,n,s),e.push({event:n,listeners:t}))}var _s=null,As=null;function Rx(e){Wm(e,0)}function Rl(e){var t=je(e);if(Ff(t))return e}function gd(e,t){if(e==="change")return t}var yd=!1;if(ia){var jo;if(ia){var Vo="oninput"in document;if(!Vo){var xd=document.createElement("div");xd.setAttribute("oninput","return;"),Vo=typeof xd.oninput=="function"}jo=Vo}else jo=!1;yd=jo&&(!document.documentMode||9<document.documentMode)}function vd(){_s&&(_s.detachEvent("onpropertychange",bd),As=_s=null)}function bd(e){if(e.propertyName==="value"&&Rl(As)){var t=[];pd(t,As,e,bo(e)),ad(Rx,t)}}function Dx(e,t,n){e==="focusin"?(vd(),_s=t,As=n,_s.attachEvent("onpropertychange",bd)):e==="focusout"&&vd()}function Ox(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Rl(As)}function zx(e,t){if(e==="click")return Rl(t)}function Lx(e,t){if(e==="input"||e==="change")return Rl(t)}function kx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var fn=typeof Object.is=="function"?Object.is:kx;function Es(e,t){if(fn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(s=0;s<n.length;s++){var o=n[s];if(!Pt.call(t,o)||!fn(e[o],t[o]))return!1}return!0}function Sd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Td(e,t){var n=Sd(e);e=0;for(var s;n;){if(n.nodeType===3){if(s=e+n.textContent.length,e<=t&&s>=t)return{node:n,offset:t-e};e=s}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Sd(n)}}function _d(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_d(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ad(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=El(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=El(e.document)}return t}function Co(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Ux=ia&&"documentMode"in document&&11>=document.documentMode,Oi=null,Ro=null,Ms=null,Do=!1;function Ed(e,t,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Do||Oi==null||Oi!==El(s)||(s=Oi,"selectionStart"in s&&Co(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Ms&&Es(Ms,s)||(Ms=s,s=br(Ro,"onSelect"),0<s.length&&(t=new Vl("onSelect","select",null,t,n),e.push({event:t,listeners:s}),t.target=Oi)))}function ii(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var zi={animationend:ii("Animation","AnimationEnd"),animationiteration:ii("Animation","AnimationIteration"),animationstart:ii("Animation","AnimationStart"),transitionrun:ii("Transition","TransitionRun"),transitionstart:ii("Transition","TransitionStart"),transitioncancel:ii("Transition","TransitionCancel"),transitionend:ii("Transition","TransitionEnd")},Oo={},Md={};ia&&(Md=document.createElement("div").style,"AnimationEvent"in window||(delete zi.animationend.animation,delete zi.animationiteration.animation,delete zi.animationstart.animation),"TransitionEvent"in window||delete zi.transitionend.transition);function si(e){if(Oo[e])return Oo[e];if(!zi[e])return e;var t=zi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Md)return Oo[e]=t[n];return e}var wd=si("animationend"),Nd=si("animationiteration"),jd=si("animationstart"),Bx=si("transitionrun"),Hx=si("transitionstart"),Gx=si("transitioncancel"),Vd=si("transitionend"),Cd=new Map,zo="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(" ");zo.push("scrollEnd");function On(e,t){Cd.set(e,t),C(t,[e])}var Dl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Tn=[],Li=0,Lo=0;function Ol(){for(var e=Li,t=Lo=Li=0;t<e;){var n=Tn[t];Tn[t++]=null;var s=Tn[t];Tn[t++]=null;var o=Tn[t];Tn[t++]=null;var c=Tn[t];if(Tn[t++]=null,s!==null&&o!==null){var p=s.pending;p===null?o.next=o:(o.next=p.next,p.next=o),s.pending=o}c!==0&&Rd(n,o,c)}}function zl(e,t,n,s){Tn[Li++]=e,Tn[Li++]=t,Tn[Li++]=n,Tn[Li++]=s,Lo|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function ko(e,t,n,s){return zl(e,t,n,s),Ll(e)}function li(e,t){return zl(e,null,null,t),Ll(e)}function Rd(e,t,n){e.lanes|=n;var s=e.alternate;s!==null&&(s.lanes|=n);for(var o=!1,c=e.return;c!==null;)c.childLanes|=n,s=c.alternate,s!==null&&(s.childLanes|=n),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(o=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,o&&t!==null&&(o=31-ie(n),e=c.hiddenUpdates,s=e[o],s===null?e[o]=[t]:s.push(t),t.lane=n|536870912),c):null}function Ll(e){if(50<Ps)throw Ps=0,Kc=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ki={};function Yx(e,t,n,s){this.tag=e,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=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dn(e,t,n,s){return new Yx(e,t,n,s)}function Uo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sa(e,t){var n=e.alternate;return n===null?(n=dn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Dd(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function kl(e,t,n,s,o,c){var p=0;if(s=e,typeof e=="function")Uo(e)&&(p=1);else if(typeof e=="string")p=Z1(e,n,se.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ae:return e=dn(31,n,t,o),e.elementType=ae,e.lanes=c,e;case k:return ri(n.children,o,c,t);case B:p=8,o|=24;break;case Y:return e=dn(12,n,t,o|2),e.elementType=Y,e.lanes=c,e;case W:return e=dn(13,n,t,o),e.elementType=W,e.lanes=c,e;case ce:return e=dn(19,n,t,o),e.elementType=ce,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case P:p=10;break e;case Z:p=9;break e;case Q:p=11;break e;case K:p=14;break e;case F:p=16,s=null;break e}p=29,n=Error(r(130,e===null?"null":typeof e,"")),s=null}return t=dn(p,n,t,o),t.elementType=e,t.type=s,t.lanes=c,t}function ri(e,t,n,s){return e=dn(7,e,s,t),e.lanes=n,e}function Bo(e,t,n){return e=dn(6,e,null,t),e.lanes=n,e}function Od(e){var t=dn(18,null,null,0);return t.stateNode=e,t}function Ho(e,t,n){return t=dn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var zd=new WeakMap;function _n(e,t){if(typeof e=="object"&&e!==null){var n=zd.get(e);return n!==void 0?n:(t={value:e,source:t,stack:en(t)},zd.set(e,t),t)}return{value:e,source:t,stack:en(t)}}var Ui=[],Bi=0,Ul=null,ws=0,An=[],En=0,Ea=null,Zn=1,Pn="";function la(e,t){Ui[Bi++]=ws,Ui[Bi++]=Ul,Ul=e,ws=t}function Ld(e,t,n){An[En++]=Zn,An[En++]=Pn,An[En++]=Ea,Ea=e;var s=Zn;e=Pn;var o=32-ie(s)-1;s&=~(1<<o),n+=1;var c=32-ie(t)+o;if(30<c){var p=o-o%5;c=(s&(1<<p)-1).toString(32),s>>=p,o-=p,Zn=1<<32-ie(t)+o|n<<o|s,Pn=c+e}else Zn=1<<c|n<<o|s,Pn=e}function Go(e){e.return!==null&&(la(e,1),Ld(e,1,0))}function Yo(e){for(;e===Ul;)Ul=Ui[--Bi],Ui[Bi]=null,ws=Ui[--Bi],Ui[Bi]=null;for(;e===Ea;)Ea=An[--En],An[En]=null,Pn=An[--En],An[En]=null,Zn=An[--En],An[En]=null}function kd(e,t){An[En++]=Zn,An[En++]=Pn,An[En++]=Ea,Zn=t.id,Pn=t.overflow,Ea=e}var Bt=null,ht=null,Xe=!1,Ma=null,Mn=!1,qo=Error(r(519));function wa(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ns(_n(t,e)),qo}function Ud(e){var t=e.stateNode,n=e.type,s=e.memoizedProps;switch(t[Te]=e,t[de]=s,n){case"dialog":He("cancel",t),He("close",t);break;case"iframe":case"object":case"embed":He("load",t);break;case"video":case"audio":for(n=0;n<Fs.length;n++)He(Fs[n],t);break;case"source":He("error",t);break;case"img":case"image":case"link":He("error",t),He("load",t);break;case"details":He("toggle",t);break;case"input":He("invalid",t),Wf(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":He("invalid",t);break;case"textarea":He("invalid",t),$f(t,s.value,s.defaultValue,s.children)}n=s.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||s.suppressHydrationWarning===!0||t0(t.textContent,n)?(s.popover!=null&&(He("beforetoggle",t),He("toggle",t)),s.onScroll!=null&&He("scroll",t),s.onScrollEnd!=null&&He("scrollend",t),s.onClick!=null&&(t.onclick=aa),t=!0):t=!1,t||wa(e,!0)}function Bd(e){for(Bt=e.return;Bt;)switch(Bt.tag){case 5:case 31:case 13:Mn=!1;return;case 27:case 3:Mn=!0;return;default:Bt=Bt.return}}function Hi(e){if(e!==Bt)return!1;if(!Xe)return Bd(e),Xe=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||ru(e.type,e.memoizedProps)),n=!n),n&&ht&&wa(e),Bd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));ht=u0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));ht=u0(e)}else t===27?(t=ht,Ga(e.type)?(e=du,du=null,ht=e):ht=t):ht=Bt?Nn(e.stateNode.nextSibling):null;return!0}function oi(){ht=Bt=null,Xe=!1}function Io(){var e=Ma;return e!==null&&(on===null?on=e:on.push.apply(on,e),Ma=null),e}function Ns(e){Ma===null?Ma=[e]:Ma.push(e)}var Xo=M(null),ci=null,ra=null;function Na(e,t,n){J(Xo,t._currentValue),t._currentValue=n}function oa(e){e._currentValue=Xo.current,q(Xo)}function Ko(e,t,n){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===n)break;e=e.return}}function Zo(e,t,n,s){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var c=o.dependencies;if(c!==null){var p=o.child;c=c.firstContext;e:for(;c!==null;){var v=c;c=o;for(var _=0;_<t.length;_++)if(v.context===t[_]){c.lanes|=n,v=c.alternate,v!==null&&(v.lanes|=n),Ko(c.return,n,e),s||(p=null);break e}c=v.next}}else if(o.tag===18){if(p=o.return,p===null)throw Error(r(341));p.lanes|=n,c=p.alternate,c!==null&&(c.lanes|=n),Ko(p,n,e),p=null}else p=o.child;if(p!==null)p.return=o;else for(p=o;p!==null;){if(p===e){p=null;break}if(o=p.sibling,o!==null){o.return=p.return,p=o;break}p=p.return}o=p}}function Gi(e,t,n,s){e=null;for(var o=t,c=!1;o!==null;){if(!c){if((o.flags&524288)!==0)c=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var p=o.alternate;if(p===null)throw Error(r(387));if(p=p.memoizedProps,p!==null){var v=o.type;fn(o.pendingProps.value,p.value)||(e!==null?e.push(v):e=[v])}}else if(o===Ge.current){if(p=o.alternate,p===null)throw Error(r(387));p.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(tl):e=[tl])}o=o.return}e!==null&&Zo(t,e,n,s),t.flags|=262144}function Bl(e){for(e=e.firstContext;e!==null;){if(!fn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ui(e){ci=e,ra=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ht(e){return Hd(ci,e)}function Hl(e,t){return ci===null&&ui(e),Hd(e,t)}function Hd(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ra===null){if(e===null)throw Error(r(308));ra=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ra=ra.next=t;return n}var qx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Ix=a.unstable_scheduleCallback,Xx=a.unstable_NormalPriority,wt={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Po(){return{controller:new qx,data:new Map,refCount:0}}function js(e){e.refCount--,e.refCount===0&&Ix(Xx,function(){e.controller.abort()})}var Vs=null,Qo=0,Yi=0,qi=null;function Kx(e,t){if(Vs===null){var n=Vs=[];Qo=0,Yi=Jc(),qi={status:"pending",value:void 0,then:function(s){n.push(s)}}}return Qo++,t.then(Gd,Gd),t}function Gd(){if(--Qo===0&&Vs!==null){qi!==null&&(qi.status="fulfilled");var e=Vs;Vs=null,Yi=0,qi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Zx(e,t){var n=[],s={status:"pending",value:null,reason:null,then:function(o){n.push(o)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var o=0;o<n.length;o++)(0,n[o])(t)},function(o){for(s.status="rejected",s.reason=o,o=0;o<n.length;o++)(0,n[o])(void 0)}),s}var Yd=U.S;U.S=function(e,t){Em=Dt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Kx(e,t),Yd!==null&&Yd(e,t)};var fi=M(null);function Fo(){var e=fi.current;return e!==null?e:rt.pooledCache}function Gl(e,t){t===null?J(fi,fi.current):J(fi,t.pool)}function qd(){var e=Fo();return e===null?null:{parent:wt._currentValue,pool:e}}var Ii=Error(r(460)),Wo=Error(r(474)),Yl=Error(r(542)),ql={then:function(){}};function Id(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Xd(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(aa,aa),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Zd(e),e;default:if(typeof t.status=="string")t.then(aa,aa);else{if(e=rt,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=s}},function(s){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Zd(e),e}throw hi=t,Ii}}function di(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(hi=n,Ii):n}}var hi=null;function Kd(){if(hi===null)throw Error(r(459));var e=hi;return hi=null,e}function Zd(e){if(e===Ii||e===Yl)throw Error(r(483))}var Xi=null,Cs=0;function Il(e){var t=Cs;return Cs+=1,Xi===null&&(Xi=[]),Xd(Xi,e,t)}function Rs(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Xl(e,t){throw t.$$typeof===T?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Pd(e){function t(R,w){if(e){var D=R.deletions;D===null?(R.deletions=[w],R.flags|=16):D.push(w)}}function n(R,w){if(!e)return null;for(;w!==null;)t(R,w),w=w.sibling;return null}function s(R){for(var w=new Map;R!==null;)R.key!==null?w.set(R.key,R):w.set(R.index,R),R=R.sibling;return w}function o(R,w){return R=sa(R,w),R.index=0,R.sibling=null,R}function c(R,w,D){return R.index=D,e?(D=R.alternate,D!==null?(D=D.index,D<w?(R.flags|=67108866,w):D):(R.flags|=67108866,w)):(R.flags|=1048576,w)}function p(R){return e&&R.alternate===null&&(R.flags|=67108866),R}function v(R,w,D,I){return w===null||w.tag!==6?(w=Bo(D,R.mode,I),w.return=R,w):(w=o(w,D),w.return=R,w)}function _(R,w,D,I){var pe=D.type;return pe===k?G(R,w,D.props.children,I,D.key):w!==null&&(w.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===F&&di(pe)===w.type)?(w=o(w,D.props),Rs(w,D),w.return=R,w):(w=kl(D.type,D.key,D.props,null,R.mode,I),Rs(w,D),w.return=R,w)}function O(R,w,D,I){return w===null||w.tag!==4||w.stateNode.containerInfo!==D.containerInfo||w.stateNode.implementation!==D.implementation?(w=Ho(D,R.mode,I),w.return=R,w):(w=o(w,D.children||[]),w.return=R,w)}function G(R,w,D,I,pe){return w===null||w.tag!==7?(w=ri(D,R.mode,I,pe),w.return=R,w):(w=o(w,D),w.return=R,w)}function X(R,w,D){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return w=Bo(""+w,R.mode,D),w.return=R,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case N:return D=kl(w.type,w.key,w.props,null,R.mode,D),Rs(D,w),D.return=R,D;case j:return w=Ho(w,R.mode,D),w.return=R,w;case F:return w=di(w),X(R,w,D)}if(et(w)||Me(w))return w=ri(w,R.mode,D,null),w.return=R,w;if(typeof w.then=="function")return X(R,Il(w),D);if(w.$$typeof===P)return X(R,Hl(R,w),D);Xl(R,w)}return null}function z(R,w,D,I){var pe=w!==null?w.key:null;if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return pe!==null?null:v(R,w,""+D,I);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case N:return D.key===pe?_(R,w,D,I):null;case j:return D.key===pe?O(R,w,D,I):null;case F:return D=di(D),z(R,w,D,I)}if(et(D)||Me(D))return pe!==null?null:G(R,w,D,I,null);if(typeof D.then=="function")return z(R,w,Il(D),I);if(D.$$typeof===P)return z(R,w,Hl(R,D),I);Xl(R,D)}return null}function L(R,w,D,I,pe){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return R=R.get(D)||null,v(w,R,""+I,pe);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case N:return R=R.get(I.key===null?D:I.key)||null,_(w,R,I,pe);case j:return R=R.get(I.key===null?D:I.key)||null,O(w,R,I,pe);case F:return I=di(I),L(R,w,D,I,pe)}if(et(I)||Me(I))return R=R.get(D)||null,G(w,R,I,pe,null);if(typeof I.then=="function")return L(R,w,D,Il(I),pe);if(I.$$typeof===P)return L(R,w,D,Hl(w,I),pe);Xl(w,I)}return null}function le(R,w,D,I){for(var pe=null,Ze=null,he=w,Oe=w=0,qe=null;he!==null&&Oe<D.length;Oe++){he.index>Oe?(qe=he,he=null):qe=he.sibling;var Pe=z(R,he,D[Oe],I);if(Pe===null){he===null&&(he=qe);break}e&&he&&Pe.alternate===null&&t(R,he),w=c(Pe,w,Oe),Ze===null?pe=Pe:Ze.sibling=Pe,Ze=Pe,he=qe}if(Oe===D.length)return n(R,he),Xe&&la(R,Oe),pe;if(he===null){for(;Oe<D.length;Oe++)he=X(R,D[Oe],I),he!==null&&(w=c(he,w,Oe),Ze===null?pe=he:Ze.sibling=he,Ze=he);return Xe&&la(R,Oe),pe}for(he=s(he);Oe<D.length;Oe++)qe=L(he,R,Oe,D[Oe],I),qe!==null&&(e&&qe.alternate!==null&&he.delete(qe.key===null?Oe:qe.key),w=c(qe,w,Oe),Ze===null?pe=qe:Ze.sibling=qe,Ze=qe);return e&&he.forEach(function(Ka){return t(R,Ka)}),Xe&&la(R,Oe),pe}function xe(R,w,D,I){if(D==null)throw Error(r(151));for(var pe=null,Ze=null,he=w,Oe=w=0,qe=null,Pe=D.next();he!==null&&!Pe.done;Oe++,Pe=D.next()){he.index>Oe?(qe=he,he=null):qe=he.sibling;var Ka=z(R,he,Pe.value,I);if(Ka===null){he===null&&(he=qe);break}e&&he&&Ka.alternate===null&&t(R,he),w=c(Ka,w,Oe),Ze===null?pe=Ka:Ze.sibling=Ka,Ze=Ka,he=qe}if(Pe.done)return n(R,he),Xe&&la(R,Oe),pe;if(he===null){for(;!Pe.done;Oe++,Pe=D.next())Pe=X(R,Pe.value,I),Pe!==null&&(w=c(Pe,w,Oe),Ze===null?pe=Pe:Ze.sibling=Pe,Ze=Pe);return Xe&&la(R,Oe),pe}for(he=s(he);!Pe.done;Oe++,Pe=D.next())Pe=L(he,R,Oe,Pe.value,I),Pe!==null&&(e&&Pe.alternate!==null&&he.delete(Pe.key===null?Oe:Pe.key),w=c(Pe,w,Oe),Ze===null?pe=Pe:Ze.sibling=Pe,Ze=Pe);return e&&he.forEach(function(iv){return t(R,iv)}),Xe&&la(R,Oe),pe}function st(R,w,D,I){if(typeof D=="object"&&D!==null&&D.type===k&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case N:e:{for(var pe=D.key;w!==null;){if(w.key===pe){if(pe=D.type,pe===k){if(w.tag===7){n(R,w.sibling),I=o(w,D.props.children),I.return=R,R=I;break e}}else if(w.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===F&&di(pe)===w.type){n(R,w.sibling),I=o(w,D.props),Rs(I,D),I.return=R,R=I;break e}n(R,w);break}else t(R,w);w=w.sibling}D.type===k?(I=ri(D.props.children,R.mode,I,D.key),I.return=R,R=I):(I=kl(D.type,D.key,D.props,null,R.mode,I),Rs(I,D),I.return=R,R=I)}return p(R);case j:e:{for(pe=D.key;w!==null;){if(w.key===pe)if(w.tag===4&&w.stateNode.containerInfo===D.containerInfo&&w.stateNode.implementation===D.implementation){n(R,w.sibling),I=o(w,D.children||[]),I.return=R,R=I;break e}else{n(R,w);break}else t(R,w);w=w.sibling}I=Ho(D,R.mode,I),I.return=R,R=I}return p(R);case F:return D=di(D),st(R,w,D,I)}if(et(D))return le(R,w,D,I);if(Me(D)){if(pe=Me(D),typeof pe!="function")throw Error(r(150));return D=pe.call(D),xe(R,w,D,I)}if(typeof D.then=="function")return st(R,w,Il(D),I);if(D.$$typeof===P)return st(R,w,Hl(R,D),I);Xl(R,D)}return typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint"?(D=""+D,w!==null&&w.tag===6?(n(R,w.sibling),I=o(w,D),I.return=R,R=I):(n(R,w),I=Bo(D,R.mode,I),I.return=R,R=I),p(R)):n(R,w)}return function(R,w,D,I){try{Cs=0;var pe=st(R,w,D,I);return Xi=null,pe}catch(he){if(he===Ii||he===Yl)throw he;var Ze=dn(29,he,null,R.mode);return Ze.lanes=I,Ze.return=R,Ze}finally{}}}var mi=Pd(!0),Qd=Pd(!1),ja=!1;function Jo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $o(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Va(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ca(e,t,n){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Qe&2)!==0){var o=s.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),s.pending=t,t=Ll(e),Rd(e,null,n),t}return zl(e,s,t,n),Ll(e)}function Ds(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,d(e,n)}}function ec(e,t){var n=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,n===s)){var o=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var p={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?o=c=p:c=c.next=p,n=n.next}while(n!==null);c===null?o=c=t:c=c.next=t}else o=c=t;n={baseState:s.baseState,firstBaseUpdate:o,lastBaseUpdate:c,shared:s.shared,callbacks:s.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var tc=!1;function Os(){if(tc){var e=qi;if(e!==null)throw e}}function zs(e,t,n,s){tc=!1;var o=e.updateQueue;ja=!1;var c=o.firstBaseUpdate,p=o.lastBaseUpdate,v=o.shared.pending;if(v!==null){o.shared.pending=null;var _=v,O=_.next;_.next=null,p===null?c=O:p.next=O,p=_;var G=e.alternate;G!==null&&(G=G.updateQueue,v=G.lastBaseUpdate,v!==p&&(v===null?G.firstBaseUpdate=O:v.next=O,G.lastBaseUpdate=_))}if(c!==null){var X=o.baseState;p=0,G=O=_=null,v=c;do{var z=v.lane&-536870913,L=z!==v.lane;if(L?(Ye&z)===z:(s&z)===z){z!==0&&z===Yi&&(tc=!0),G!==null&&(G=G.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var le=e,xe=v;z=t;var st=n;switch(xe.tag){case 1:if(le=xe.payload,typeof le=="function"){X=le.call(st,X,z);break e}X=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=xe.payload,z=typeof le=="function"?le.call(st,X,z):le,z==null)break e;X=S({},X,z);break e;case 2:ja=!0}}z=v.callback,z!==null&&(e.flags|=64,L&&(e.flags|=8192),L=o.callbacks,L===null?o.callbacks=[z]:L.push(z))}else L={lane:z,tag:v.tag,payload:v.payload,callback:v.callback,next:null},G===null?(O=G=L,_=X):G=G.next=L,p|=z;if(v=v.next,v===null){if(v=o.shared.pending,v===null)break;L=v,v=L.next,L.next=null,o.lastBaseUpdate=L,o.shared.pending=null}}while(!0);G===null&&(_=X),o.baseState=_,o.firstBaseUpdate=O,o.lastBaseUpdate=G,c===null&&(o.shared.lanes=0),La|=p,e.lanes=p,e.memoizedState=X}}function Fd(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Wd(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Fd(n[e],t)}var Ki=M(null),Kl=M(0);function Jd(e,t){e=ya,J(Kl,e),J(Ki,t),ya=e|t.baseLanes}function nc(){J(Kl,ya),J(Ki,Ki.current)}function ac(){ya=Kl.current,q(Ki),q(Kl)}var hn=M(null),wn=null;function Ra(e){var t=e.alternate;J(At,At.current&1),J(hn,e),wn===null&&(t===null||Ki.current!==null||t.memoizedState!==null)&&(wn=e)}function ic(e){J(At,At.current),J(hn,e),wn===null&&(wn=e)}function $d(e){e.tag===22?(J(At,At.current),J(hn,e),wn===null&&(wn=e)):Da()}function Da(){J(At,At.current),J(hn,hn.current)}function mn(e){q(hn),wn===e&&(wn=null),q(At)}var At=M(0);function Zl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||uu(n)||fu(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ca=0,Re=null,at=null,Nt=null,Pl=!1,Zi=!1,pi=!1,Ql=0,Ls=0,Pi=null,Px=0;function bt(){throw Error(r(321))}function sc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!fn(e[n],t[n]))return!1;return!0}function lc(e,t,n,s,o,c){return ca=c,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?Lh:Sc,pi=!1,c=n(s,o),pi=!1,Zi&&(c=th(t,n,s,o)),eh(e),c}function eh(e){U.H=Bs;var t=at!==null&&at.next!==null;if(ca=0,Nt=at=Re=null,Pl=!1,Ls=0,Pi=null,t)throw Error(r(300));e===null||jt||(e=e.dependencies,e!==null&&Bl(e)&&(jt=!0))}function th(e,t,n,s){Re=e;var o=0;do{if(Zi&&(Pi=null),Ls=0,Zi=!1,25<=o)throw Error(r(301));if(o+=1,Nt=at=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}U.H=kh,c=t(n,s)}while(Zi);return c}function Qx(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?ks(t):t,e=e.useState()[0],(at!==null?at.memoizedState:null)!==e&&(Re.flags|=1024),t}function rc(){var e=Ql!==0;return Ql=0,e}function oc(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function cc(e){if(Pl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Pl=!1}ca=0,Nt=at=Re=null,Zi=!1,Ls=Ql=0,Pi=null}function Qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nt===null?Re.memoizedState=Nt=e:Nt=Nt.next=e,Nt}function Et(){if(at===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=at.next;var t=Nt===null?Re.memoizedState:Nt.next;if(t!==null)Nt=t,at=e;else{if(e===null)throw Re.alternate===null?Error(r(467)):Error(r(310));at=e,e={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},Nt===null?Re.memoizedState=Nt=e:Nt=Nt.next=e}return Nt}function Fl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ks(e){var t=Ls;return Ls+=1,Pi===null&&(Pi=[]),e=Xd(Pi,e,t),t=Re,(Nt===null?t.memoizedState:Nt.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?Lh:Sc),e}function Wl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ks(e);if(e.$$typeof===P)return Ht(e)}throw Error(r(438,String(e)))}function uc(e){var t=null,n=Re.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var s=Re.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Fl(),Re.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),s=0;s<e;s++)n[s]=fe;return t.index++,n}function ua(e,t){return typeof t=="function"?t(e):t}function Jl(e){var t=Et();return fc(t,at,e)}function fc(e,t,n){var s=e.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=n;var o=e.baseQueue,c=s.pending;if(c!==null){if(o!==null){var p=o.next;o.next=c.next,c.next=p}t.baseQueue=o=c,s.pending=null}if(c=e.baseState,o===null)e.memoizedState=c;else{t=o.next;var v=p=null,_=null,O=t,G=!1;do{var X=O.lane&-536870913;if(X!==O.lane?(Ye&X)===X:(ca&X)===X){var z=O.revertLane;if(z===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null}),X===Yi&&(G=!0);else if((ca&z)===z){O=O.next,z===Yi&&(G=!0);continue}else X={lane:0,revertLane:O.revertLane,gesture:null,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},_===null?(v=_=X,p=c):_=_.next=X,Re.lanes|=z,La|=z;X=O.action,pi&&n(c,X),c=O.hasEagerState?O.eagerState:n(c,X)}else z={lane:X,revertLane:O.revertLane,gesture:O.gesture,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},_===null?(v=_=z,p=c):_=_.next=z,Re.lanes|=X,La|=X;O=O.next}while(O!==null&&O!==t);if(_===null?p=c:_.next=v,!fn(c,e.memoizedState)&&(jt=!0,G&&(n=qi,n!==null)))throw n;e.memoizedState=c,e.baseState=p,e.baseQueue=_,s.lastRenderedState=c}return o===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function dc(e){var t=Et(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var s=n.dispatch,o=n.pending,c=t.memoizedState;if(o!==null){n.pending=null;var p=o=o.next;do c=e(c,p.action),p=p.next;while(p!==o);fn(c,t.memoizedState)||(jt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),n.lastRenderedState=c}return[c,s]}function nh(e,t,n){var s=Re,o=Et(),c=Xe;if(c){if(n===void 0)throw Error(r(407));n=n()}else n=t();var p=!fn((at||o).memoizedState,n);if(p&&(o.memoizedState=n,jt=!0),o=o.queue,pc(sh.bind(null,s,o,e),[e]),o.getSnapshot!==t||p||Nt!==null&&Nt.memoizedState.tag&1){if(s.flags|=2048,Qi(9,{destroy:void 0},ih.bind(null,s,o,n,t),null),rt===null)throw Error(r(349));c||(ca&127)!==0||ah(s,t,n)}return n}function ah(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Re.updateQueue,t===null?(t=Fl(),Re.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ih(e,t,n,s){t.value=n,t.getSnapshot=s,lh(t)&&rh(e)}function sh(e,t,n){return n(function(){lh(t)&&rh(e)})}function lh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!fn(e,n)}catch{return!0}}function rh(e){var t=li(e,2);t!==null&&cn(t,e,2)}function hc(e){var t=Qt();if(typeof e=="function"){var n=e;if(e=n(),pi){Dn(!0);try{n()}finally{Dn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ua,lastRenderedState:e},t}function oh(e,t,n,s){return e.baseState=n,fc(e,at,typeof s=="function"?s:ua)}function Fx(e,t,n,s,o){if(tr(e))throw Error(r(485));if(e=t.action,e!==null){var c={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){c.listeners.push(p)}};U.T!==null?n(!0):c.isTransition=!1,s(c),n=t.pending,n===null?(c.next=t.pending=c,ch(t,c)):(c.next=n.next,t.pending=n.next=c)}}function ch(e,t){var n=t.action,s=t.payload,o=e.state;if(t.isTransition){var c=U.T,p={};U.T=p;try{var v=n(o,s),_=U.S;_!==null&&_(p,v),uh(e,t,v)}catch(O){mc(e,t,O)}finally{c!==null&&p.types!==null&&(c.types=p.types),U.T=c}}else try{c=n(o,s),uh(e,t,c)}catch(O){mc(e,t,O)}}function uh(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(s){fh(e,t,s)},function(s){return mc(e,t,s)}):fh(e,t,n)}function fh(e,t,n){t.status="fulfilled",t.value=n,dh(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,ch(e,n)))}function mc(e,t,n){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=n,dh(t),t=t.next;while(t!==s)}e.action=null}function dh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function hh(e,t){return t}function mh(e,t){if(Xe){var n=rt.formState;if(n!==null){e:{var s=Re;if(Xe){if(ht){t:{for(var o=ht,c=Mn;o.nodeType!==8;){if(!c){o=null;break t}if(o=Nn(o.nextSibling),o===null){o=null;break t}}c=o.data,o=c==="F!"||c==="F"?o:null}if(o){ht=Nn(o.nextSibling),s=o.data==="F!";break e}}wa(s)}s=!1}s&&(t=n[0])}}return n=Qt(),n.memoizedState=n.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hh,lastRenderedState:t},n.queue=s,n=Dh.bind(null,Re,s),s.dispatch=n,s=hc(!1),c=bc.bind(null,Re,!1,s.queue),s=Qt(),o={state:t,dispatch:null,action:e,pending:null},s.queue=o,n=Fx.bind(null,Re,o,c,n),o.dispatch=n,s.memoizedState=e,[t,n,!1]}function ph(e){var t=Et();return gh(t,at,e)}function gh(e,t,n){if(t=fc(e,t,hh)[0],e=Jl(ua)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=ks(t)}catch(p){throw p===Ii?Yl:p}else s=t;t=Et();var o=t.queue,c=o.dispatch;return n!==t.memoizedState&&(Re.flags|=2048,Qi(9,{destroy:void 0},Wx.bind(null,o,n),null)),[s,c,e]}function Wx(e,t){e.action=t}function yh(e){var t=Et(),n=at;if(n!==null)return gh(t,n,e);Et(),t=t.memoizedState,n=Et();var s=n.queue.dispatch;return n.memoizedState=e,[t,s,!1]}function Qi(e,t,n,s){return e={tag:e,create:n,deps:s,inst:t,next:null},t=Re.updateQueue,t===null&&(t=Fl(),Re.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(s=n.next,n.next=e,e.next=s,t.lastEffect=e),e}function xh(){return Et().memoizedState}function $l(e,t,n,s){var o=Qt();Re.flags|=e,o.memoizedState=Qi(1|t,{destroy:void 0},n,s===void 0?null:s)}function er(e,t,n,s){var o=Et();s=s===void 0?null:s;var c=o.memoizedState.inst;at!==null&&s!==null&&sc(s,at.memoizedState.deps)?o.memoizedState=Qi(t,c,n,s):(Re.flags|=e,o.memoizedState=Qi(1|t,c,n,s))}function vh(e,t){$l(8390656,8,e,t)}function pc(e,t){er(2048,8,e,t)}function Jx(e){Re.flags|=4;var t=Re.updateQueue;if(t===null)t=Fl(),Re.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function bh(e){var t=Et().memoizedState;return Jx({ref:t,nextImpl:e}),function(){if((Qe&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Sh(e,t){return er(4,2,e,t)}function Th(e,t){return er(4,4,e,t)}function _h(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ah(e,t,n){n=n!=null?n.concat([e]):null,er(4,4,_h.bind(null,t,e),n)}function gc(){}function Eh(e,t){var n=Et();t=t===void 0?null:t;var s=n.memoizedState;return t!==null&&sc(t,s[1])?s[0]:(n.memoizedState=[e,t],e)}function Mh(e,t){var n=Et();t=t===void 0?null:t;var s=n.memoizedState;if(t!==null&&sc(t,s[1]))return s[0];if(s=e(),pi){Dn(!0);try{e()}finally{Dn(!1)}}return n.memoizedState=[s,t],s}function yc(e,t,n){return n===void 0||(ca&1073741824)!==0&&(Ye&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=wm(),Re.lanes|=e,La|=e,n)}function wh(e,t,n,s){return fn(n,t)?n:Ki.current!==null?(e=yc(e,n,s),fn(e,t)||(jt=!0),e):(ca&42)===0||(ca&1073741824)!==0&&(Ye&261930)===0?(jt=!0,e.memoizedState=n):(e=wm(),Re.lanes|=e,La|=e,t)}function Nh(e,t,n,s,o){var c=$.p;$.p=c!==0&&8>c?c:8;var p=U.T,v={};U.T=v,bc(e,!1,t,n);try{var _=o(),O=U.S;if(O!==null&&O(v,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var G=Zx(_,s);Us(e,t,G,yn(e))}else Us(e,t,s,yn(e))}catch(X){Us(e,t,{then:function(){},status:"rejected",reason:X},yn())}finally{$.p=c,p!==null&&v.types!==null&&(p.types=v.types),U.T=p}}function $x(){}function xc(e,t,n,s){if(e.tag!==5)throw Error(r(476));var o=jh(e).queue;Nh(e,o,t,te,n===null?$x:function(){return Vh(e),n(s)})}function jh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ua,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ua,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Vh(e){var t=jh(e);t.next===null&&(t=e.alternate.memoizedState),Us(e,t.next.queue,{},yn())}function vc(){return Ht(tl)}function Ch(){return Et().memoizedState}function Rh(){return Et().memoizedState}function e1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=yn();e=Va(n);var s=Ca(t,e,n);s!==null&&(cn(s,t,n),Ds(s,t,n)),t={cache:Po()},e.payload=t;return}t=t.return}}function t1(e,t,n){var s=yn();n={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},tr(e)?Oh(t,n):(n=ko(e,t,n,s),n!==null&&(cn(n,e,s),zh(n,t,s)))}function Dh(e,t,n){var s=yn();Us(e,t,n,s)}function Us(e,t,n,s){var o={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(tr(e))Oh(t,o);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var p=t.lastRenderedState,v=c(p,n);if(o.hasEagerState=!0,o.eagerState=v,fn(v,p))return zl(e,t,o,0),rt===null&&Ol(),!1}catch{}finally{}if(n=ko(e,t,o,s),n!==null)return cn(n,e,s),zh(n,t,s),!0}return!1}function bc(e,t,n,s){if(s={lane:2,revertLane:Jc(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},tr(e)){if(t)throw Error(r(479))}else t=ko(e,n,s,2),t!==null&&cn(t,e,2)}function tr(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function Oh(e,t){Zi=Pl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function zh(e,t,n){if((n&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,d(e,n)}}var Bs={readContext:Ht,use:Wl,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useLayoutEffect:bt,useInsertionEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useSyncExternalStore:bt,useId:bt,useHostTransitionStatus:bt,useFormState:bt,useActionState:bt,useOptimistic:bt,useMemoCache:bt,useCacheRefresh:bt};Bs.useEffectEvent=bt;var Lh={readContext:Ht,use:Wl,useCallback:function(e,t){return Qt().memoizedState=[e,t===void 0?null:t],e},useContext:Ht,useEffect:vh,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,$l(4194308,4,_h.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $l(4194308,4,e,t)},useInsertionEffect:function(e,t){$l(4,2,e,t)},useMemo:function(e,t){var n=Qt();t=t===void 0?null:t;var s=e();if(pi){Dn(!0);try{e()}finally{Dn(!1)}}return n.memoizedState=[s,t],s},useReducer:function(e,t,n){var s=Qt();if(n!==void 0){var o=n(t);if(pi){Dn(!0);try{n(t)}finally{Dn(!1)}}}else o=t;return s.memoizedState=s.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},s.queue=e,e=e.dispatch=t1.bind(null,Re,e),[s.memoizedState,e]},useRef:function(e){var t=Qt();return e={current:e},t.memoizedState=e},useState:function(e){e=hc(e);var t=e.queue,n=Dh.bind(null,Re,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:gc,useDeferredValue:function(e,t){var n=Qt();return yc(n,e,t)},useTransition:function(){var e=hc(!1);return e=Nh.bind(null,Re,e.queue,!0,!1),Qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var s=Re,o=Qt();if(Xe){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),rt===null)throw Error(r(349));(Ye&127)!==0||ah(s,t,n)}o.memoizedState=n;var c={value:n,getSnapshot:t};return o.queue=c,vh(sh.bind(null,s,c,e),[e]),s.flags|=2048,Qi(9,{destroy:void 0},ih.bind(null,s,c,n,t),null),n},useId:function(){var e=Qt(),t=rt.identifierPrefix;if(Xe){var n=Pn,s=Zn;n=(s&~(1<<32-ie(s)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Ql++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Px++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:vc,useFormState:mh,useActionState:mh,useOptimistic:function(e){var t=Qt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=bc.bind(null,Re,!0,n),n.dispatch=t,[e,t]},useMemoCache:uc,useCacheRefresh:function(){return Qt().memoizedState=e1.bind(null,Re)},useEffectEvent:function(e){var t=Qt(),n={impl:e};return t.memoizedState=n,function(){if((Qe&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},Sc={readContext:Ht,use:Wl,useCallback:Eh,useContext:Ht,useEffect:pc,useImperativeHandle:Ah,useInsertionEffect:Sh,useLayoutEffect:Th,useMemo:Mh,useReducer:Jl,useRef:xh,useState:function(){return Jl(ua)},useDebugValue:gc,useDeferredValue:function(e,t){var n=Et();return wh(n,at.memoizedState,e,t)},useTransition:function(){var e=Jl(ua)[0],t=Et().memoizedState;return[typeof e=="boolean"?e:ks(e),t]},useSyncExternalStore:nh,useId:Ch,useHostTransitionStatus:vc,useFormState:ph,useActionState:ph,useOptimistic:function(e,t){var n=Et();return oh(n,at,e,t)},useMemoCache:uc,useCacheRefresh:Rh};Sc.useEffectEvent=bh;var kh={readContext:Ht,use:Wl,useCallback:Eh,useContext:Ht,useEffect:pc,useImperativeHandle:Ah,useInsertionEffect:Sh,useLayoutEffect:Th,useMemo:Mh,useReducer:dc,useRef:xh,useState:function(){return dc(ua)},useDebugValue:gc,useDeferredValue:function(e,t){var n=Et();return at===null?yc(n,e,t):wh(n,at.memoizedState,e,t)},useTransition:function(){var e=dc(ua)[0],t=Et().memoizedState;return[typeof e=="boolean"?e:ks(e),t]},useSyncExternalStore:nh,useId:Ch,useHostTransitionStatus:vc,useFormState:yh,useActionState:yh,useOptimistic:function(e,t){var n=Et();return at!==null?oh(n,at,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:uc,useCacheRefresh:Rh};kh.useEffectEvent=bh;function Tc(e,t,n,s){t=e.memoizedState,n=n(s,t),n=n==null?t:S({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var _c={enqueueSetState:function(e,t,n){e=e._reactInternals;var s=yn(),o=Va(s);o.payload=t,n!=null&&(o.callback=n),t=Ca(e,o,s),t!==null&&(cn(t,e,s),Ds(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var s=yn(),o=Va(s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Ca(e,o,s),t!==null&&(cn(t,e,s),Ds(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=yn(),s=Va(n);s.tag=2,t!=null&&(s.callback=t),t=Ca(e,s,n),t!==null&&(cn(t,e,n),Ds(t,e,n))}};function Uh(e,t,n,s,o,c,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,c,p):t.prototype&&t.prototype.isPureReactComponent?!Es(n,s)||!Es(o,c):!0}function Bh(e,t,n,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,s),t.state!==e&&_c.enqueueReplaceState(t,t.state,null)}function gi(e,t){var n=t;if("ref"in t){n={};for(var s in t)s!=="ref"&&(n[s]=t[s])}if(e=e.defaultProps){n===t&&(n=S({},n));for(var o in e)n[o]===void 0&&(n[o]=e[o])}return n}function Hh(e){Dl(e)}function Gh(e){console.error(e)}function Yh(e){Dl(e)}function nr(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function qh(e,t,n){try{var s=e.onCaughtError;s(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Ac(e,t,n){return n=Va(n),n.tag=3,n.payload={element:null},n.callback=function(){nr(e,t)},n}function Ih(e){return e=Va(e),e.tag=3,e}function Xh(e,t,n,s){var o=n.type.getDerivedStateFromError;if(typeof o=="function"){var c=s.value;e.payload=function(){return o(c)},e.callback=function(){qh(t,n,s)}}var p=n.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){qh(t,n,s),typeof o!="function"&&(ka===null?ka=new Set([this]):ka.add(this));var v=s.stack;this.componentDidCatch(s.value,{componentStack:v!==null?v:""})})}function n1(e,t,n,s,o){if(n.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=n.alternate,t!==null&&Gi(t,n,o,!0),n=hn.current,n!==null){switch(n.tag){case 31:case 13:return wn===null?mr():n.alternate===null&&St===0&&(St=3),n.flags&=-257,n.flags|=65536,n.lanes=o,s===ql?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([s]):t.add(s),Qc(e,s,o)),!1;case 22:return n.flags|=65536,s===ql?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([s]):n.add(s)),Qc(e,s,o)),!1}throw Error(r(435,n.tag))}return Qc(e,s,o),mr(),!1}if(Xe)return t=hn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,s!==qo&&(e=Error(r(422),{cause:s}),Ns(_n(e,n)))):(s!==qo&&(t=Error(r(423),{cause:s}),Ns(_n(t,n))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,s=_n(s,n),o=Ac(e.stateNode,s,o),ec(e,o),St!==4&&(St=2)),!1;var c=Error(r(520),{cause:s});if(c=_n(c,n),Zs===null?Zs=[c]:Zs.push(c),St!==4&&(St=2),t===null)return!0;s=_n(s,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=o&-o,n.lanes|=e,e=Ac(n.stateNode,s,e),ec(n,e),!1;case 1:if(t=n.type,c=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(ka===null||!ka.has(c))))return n.flags|=65536,o&=-o,n.lanes|=o,o=Ih(o),Xh(o,e,n,s),ec(n,o),!1}n=n.return}while(n!==null);return!1}var Ec=Error(r(461)),jt=!1;function Gt(e,t,n,s){t.child=e===null?Qd(t,null,n,s):mi(t,e.child,n,s)}function Kh(e,t,n,s,o){n=n.render;var c=t.ref;if("ref"in s){var p={};for(var v in s)v!=="ref"&&(p[v]=s[v])}else p=s;return ui(t),s=lc(e,t,n,p,c,o),v=rc(),e!==null&&!jt?(oc(e,t,o),fa(e,t,o)):(Xe&&v&&Go(t),t.flags|=1,Gt(e,t,s,o),t.child)}function Zh(e,t,n,s,o){if(e===null){var c=n.type;return typeof c=="function"&&!Uo(c)&&c.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=c,Ph(e,t,c,s,o)):(e=kl(n.type,null,s,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!Dc(e,o)){var p=c.memoizedProps;if(n=n.compare,n=n!==null?n:Es,n(p,s)&&e.ref===t.ref)return fa(e,t,o)}return t.flags|=1,e=sa(c,s),e.ref=t.ref,e.return=t,t.child=e}function Ph(e,t,n,s,o){if(e!==null){var c=e.memoizedProps;if(Es(c,s)&&e.ref===t.ref)if(jt=!1,t.pendingProps=s=c,Dc(e,o))(e.flags&131072)!==0&&(jt=!0);else return t.lanes=e.lanes,fa(e,t,o)}return Mc(e,t,n,s,o)}function Qh(e,t,n,s){var o=s.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|n:n,e!==null){for(s=t.child=e.child,o=0;s!==null;)o=o|s.lanes|s.childLanes,s=s.sibling;s=o&~c}else s=0,t.child=null;return Fh(e,t,c,n,s)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Gl(t,c!==null?c.cachePool:null),c!==null?Jd(t,c):nc(),$d(t);else return s=t.lanes=536870912,Fh(e,t,c!==null?c.baseLanes|n:n,n,s)}else c!==null?(Gl(t,c.cachePool),Jd(t,c),Da(),t.memoizedState=null):(e!==null&&Gl(t,null),nc(),Da());return Gt(e,t,o,n),t.child}function Hs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Fh(e,t,n,s,o){var c=Fo();return c=c===null?null:{parent:wt._currentValue,pool:c},t.memoizedState={baseLanes:n,cachePool:c},e!==null&&Gl(t,null),nc(),$d(t),e!==null&&Gi(e,t,s,!0),t.childLanes=o,null}function ar(e,t){return t=sr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Wh(e,t,n){return mi(t,e.child,null,n),e=ar(t,t.pendingProps),e.flags|=2,mn(t),t.memoizedState=null,e}function a1(e,t,n){var s=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Xe){if(s.mode==="hidden")return e=ar(t,s),t.lanes=536870912,Hs(null,e);if(ic(t),(e=ht)?(e=c0(e,Mn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ea!==null?{id:Zn,overflow:Pn}:null,retryLane:536870912,hydrationErrors:null},n=Od(e),n.return=t,t.child=n,Bt=t,ht=null)):e=null,e===null)throw wa(t);return t.lanes=536870912,null}return ar(t,s)}var c=e.memoizedState;if(c!==null){var p=c.dehydrated;if(ic(t),o)if(t.flags&256)t.flags&=-257,t=Wh(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(jt||Gi(e,t,n,!1),o=(n&e.childLanes)!==0,jt||o){if(s=rt,s!==null&&(p=A(s,n),p!==0&&p!==c.retryLane))throw c.retryLane=p,li(e,p),cn(s,e,p),Ec;mr(),t=Wh(e,t,n)}else e=c.treeContext,ht=Nn(p.nextSibling),Bt=t,Xe=!0,Ma=null,Mn=!1,e!==null&&kd(t,e),t=ar(t,s),t.flags|=4096;return t}return e=sa(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ir(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(r(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Mc(e,t,n,s,o){return ui(t),n=lc(e,t,n,s,void 0,o),s=rc(),e!==null&&!jt?(oc(e,t,o),fa(e,t,o)):(Xe&&s&&Go(t),t.flags|=1,Gt(e,t,n,o),t.child)}function Jh(e,t,n,s,o,c){return ui(t),t.updateQueue=null,n=th(t,s,n,o),eh(e),s=rc(),e!==null&&!jt?(oc(e,t,c),fa(e,t,c)):(Xe&&s&&Go(t),t.flags|=1,Gt(e,t,n,c),t.child)}function $h(e,t,n,s,o){if(ui(t),t.stateNode===null){var c=ki,p=n.contextType;typeof p=="object"&&p!==null&&(c=Ht(p)),c=new n(s,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=_c,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=s,c.state=t.memoizedState,c.refs={},Jo(t),p=n.contextType,c.context=typeof p=="object"&&p!==null?Ht(p):ki,c.state=t.memoizedState,p=n.getDerivedStateFromProps,typeof p=="function"&&(Tc(t,n,p,s),c.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(p=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),p!==c.state&&_c.enqueueReplaceState(c,c.state,null),zs(t,s,c,o),Os(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){c=t.stateNode;var v=t.memoizedProps,_=gi(n,v);c.props=_;var O=c.context,G=n.contextType;p=ki,typeof G=="object"&&G!==null&&(p=Ht(G));var X=n.getDerivedStateFromProps;G=typeof X=="function"||typeof c.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,G||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(v||O!==p)&&Bh(t,c,s,p),ja=!1;var z=t.memoizedState;c.state=z,zs(t,s,c,o),Os(),O=t.memoizedState,v||z!==O||ja?(typeof X=="function"&&(Tc(t,n,X,s),O=t.memoizedState),(_=ja||Uh(t,n,_,s,z,O,p))?(G||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=O),c.props=s,c.state=O,c.context=p,s=_):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{c=t.stateNode,$o(e,t),p=t.memoizedProps,G=gi(n,p),c.props=G,X=t.pendingProps,z=c.context,O=n.contextType,_=ki,typeof O=="object"&&O!==null&&(_=Ht(O)),v=n.getDerivedStateFromProps,(O=typeof v=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(p!==X||z!==_)&&Bh(t,c,s,_),ja=!1,z=t.memoizedState,c.state=z,zs(t,s,c,o),Os();var L=t.memoizedState;p!==X||z!==L||ja||e!==null&&e.dependencies!==null&&Bl(e.dependencies)?(typeof v=="function"&&(Tc(t,n,v,s),L=t.memoizedState),(G=ja||Uh(t,n,G,s,z,L,_)||e!==null&&e.dependencies!==null&&Bl(e.dependencies))?(O||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(s,L,_),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(s,L,_)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||p===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=L),c.props=s,c.state=L,c.context=_,s=G):(typeof c.componentDidUpdate!="function"||p===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),s=!1)}return c=s,ir(e,t),s=(t.flags&128)!==0,c||s?(c=t.stateNode,n=s&&typeof n.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&s?(t.child=mi(t,e.child,null,o),t.child=mi(t,null,n,o)):Gt(e,t,n,o),t.memoizedState=c.state,e=t.child):e=fa(e,t,o),e}function em(e,t,n,s){return oi(),t.flags|=256,Gt(e,t,n,s),t.child}var wc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Nc(e){return{baseLanes:e,cachePool:qd()}}function jc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=gn),e}function tm(e,t,n){var s=t.pendingProps,o=!1,c=(t.flags&128)!==0,p;if((p=c)||(p=e!==null&&e.memoizedState===null?!1:(At.current&2)!==0),p&&(o=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(Xe){if(o?Ra(t):Da(),(e=ht)?(e=c0(e,Mn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ea!==null?{id:Zn,overflow:Pn}:null,retryLane:536870912,hydrationErrors:null},n=Od(e),n.return=t,t.child=n,Bt=t,ht=null)):e=null,e===null)throw wa(t);return fu(e)?t.lanes=32:t.lanes=536870912,null}var v=s.children;return s=s.fallback,o?(Da(),o=t.mode,v=sr({mode:"hidden",children:v},o),s=ri(s,o,n,null),v.return=t,s.return=t,v.sibling=s,t.child=v,s=t.child,s.memoizedState=Nc(n),s.childLanes=jc(e,p,n),t.memoizedState=wc,Hs(null,s)):(Ra(t),Vc(t,v))}var _=e.memoizedState;if(_!==null&&(v=_.dehydrated,v!==null)){if(c)t.flags&256?(Ra(t),t.flags&=-257,t=Cc(e,t,n)):t.memoizedState!==null?(Da(),t.child=e.child,t.flags|=128,t=null):(Da(),v=s.fallback,o=t.mode,s=sr({mode:"visible",children:s.children},o),v=ri(v,o,n,null),v.flags|=2,s.return=t,v.return=t,s.sibling=v,t.child=s,mi(t,e.child,null,n),s=t.child,s.memoizedState=Nc(n),s.childLanes=jc(e,p,n),t.memoizedState=wc,t=Hs(null,s));else if(Ra(t),fu(v)){if(p=v.nextSibling&&v.nextSibling.dataset,p)var O=p.dgst;p=O,s=Error(r(419)),s.stack="",s.digest=p,Ns({value:s,source:null,stack:null}),t=Cc(e,t,n)}else if(jt||Gi(e,t,n,!1),p=(n&e.childLanes)!==0,jt||p){if(p=rt,p!==null&&(s=A(p,n),s!==0&&s!==_.retryLane))throw _.retryLane=s,li(e,s),cn(p,e,s),Ec;uu(v)||mr(),t=Cc(e,t,n)}else uu(v)?(t.flags|=192,t.child=e.child,t=null):(e=_.treeContext,ht=Nn(v.nextSibling),Bt=t,Xe=!0,Ma=null,Mn=!1,e!==null&&kd(t,e),t=Vc(t,s.children),t.flags|=4096);return t}return o?(Da(),v=s.fallback,o=t.mode,_=e.child,O=_.sibling,s=sa(_,{mode:"hidden",children:s.children}),s.subtreeFlags=_.subtreeFlags&65011712,O!==null?v=sa(O,v):(v=ri(v,o,n,null),v.flags|=2),v.return=t,s.return=t,s.sibling=v,t.child=s,Hs(null,s),s=t.child,v=e.child.memoizedState,v===null?v=Nc(n):(o=v.cachePool,o!==null?(_=wt._currentValue,o=o.parent!==_?{parent:_,pool:_}:o):o=qd(),v={baseLanes:v.baseLanes|n,cachePool:o}),s.memoizedState=v,s.childLanes=jc(e,p,n),t.memoizedState=wc,Hs(e.child,s)):(Ra(t),n=e.child,e=n.sibling,n=sa(n,{mode:"visible",children:s.children}),n.return=t,n.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=n,t.memoizedState=null,n)}function Vc(e,t){return t=sr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function sr(e,t){return e=dn(22,e,null,t),e.lanes=0,e}function Cc(e,t,n){return mi(t,e.child,null,n),e=Vc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nm(e,t,n){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Ko(e.return,t,n)}function Rc(e,t,n,s,o,c){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:n,tailMode:o,treeForkCount:c}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=s,p.tail=n,p.tailMode=o,p.treeForkCount=c)}function am(e,t,n){var s=t.pendingProps,o=s.revealOrder,c=s.tail;s=s.children;var p=At.current,v=(p&2)!==0;if(v?(p=p&1|2,t.flags|=128):p&=1,J(At,p),Gt(e,t,s,n),s=Xe?ws:0,!v&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&nm(e,n,t);else if(e.tag===19)nm(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Zl(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Rc(t,!1,o,n,c,s);break;case"backwards":case"unstable_legacy-backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Zl(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Rc(t,!0,n,null,c,s);break;case"together":Rc(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function fa(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),La|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Gi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=sa(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=sa(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Dc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Bl(e)))}function i1(e,t,n){switch(t.tag){case 3:Rt(t,t.stateNode.containerInfo),Na(t,wt,e.memoizedState.cache),oi();break;case 27:case 5:Hn(t);break;case 4:Rt(t,t.stateNode.containerInfo);break;case 10:Na(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ic(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Ra(t),t.flags|=128,null):(n&t.child.childLanes)!==0?tm(e,t,n):(Ra(t),e=fa(e,t,n),e!==null?e.sibling:null);Ra(t);break;case 19:var o=(e.flags&128)!==0;if(s=(n&t.childLanes)!==0,s||(Gi(e,t,n,!1),s=(n&t.childLanes)!==0),o){if(s)return am(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),J(At,At.current),s)break;return null;case 22:return t.lanes=0,Qh(e,t,n,t.pendingProps);case 24:Na(t,wt,e.memoizedState.cache)}return fa(e,t,n)}function im(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)jt=!0;else{if(!Dc(e,n)&&(t.flags&128)===0)return jt=!1,i1(e,t,n);jt=(e.flags&131072)!==0}else jt=!1,Xe&&(t.flags&1048576)!==0&&Ld(t,ws,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=di(t.elementType),t.type=e,typeof e=="function")Uo(e)?(s=gi(e,s),t.tag=1,t=$h(null,t,e,s,n)):(t.tag=0,t=Mc(null,t,e,s,n));else{if(e!=null){var o=e.$$typeof;if(o===Q){t.tag=11,t=Kh(null,t,e,s,n);break e}else if(o===K){t.tag=14,t=Zh(null,t,e,s,n);break e}}throw t=lt(e)||e,Error(r(306,t,""))}}return t;case 0:return Mc(e,t,t.type,t.pendingProps,n);case 1:return s=t.type,o=gi(s,t.pendingProps),$h(e,t,s,o,n);case 3:e:{if(Rt(t,t.stateNode.containerInfo),e===null)throw Error(r(387));s=t.pendingProps;var c=t.memoizedState;o=c.element,$o(e,t),zs(t,s,null,n);var p=t.memoizedState;if(s=p.cache,Na(t,wt,s),s!==c.cache&&Zo(t,[wt],n,!0),Os(),s=p.element,c.isDehydrated)if(c={element:s,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=em(e,t,s,n);break e}else if(s!==o){o=_n(Error(r(424)),t),Ns(o),t=em(e,t,s,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ht=Nn(e.firstChild),Bt=t,Xe=!0,Ma=null,Mn=!0,n=Qd(t,null,s,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(oi(),s===o){t=fa(e,t,n);break e}Gt(e,t,s,n)}t=t.child}return t;case 26:return ir(e,t),e===null?(n=p0(t.type,null,t.pendingProps,null))?t.memoizedState=n:Xe||(n=t.type,e=t.pendingProps,s=Sr(Ne.current).createElement(n),s[Te]=t,s[de]=e,Yt(s,n,e),we(s),t.stateNode=s):t.memoizedState=p0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Hn(t),e===null&&Xe&&(s=t.stateNode=d0(t.type,t.pendingProps,Ne.current),Bt=t,Mn=!0,o=ht,Ga(t.type)?(du=o,ht=Nn(s.firstChild)):ht=o),Gt(e,t,t.pendingProps.children,n),ir(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Xe&&((o=s=ht)&&(s=O1(s,t.type,t.pendingProps,Mn),s!==null?(t.stateNode=s,Bt=t,ht=Nn(s.firstChild),Mn=!1,o=!0):o=!1),o||wa(t)),Hn(t),o=t.type,c=t.pendingProps,p=e!==null?e.memoizedProps:null,s=c.children,ru(o,c)?s=null:p!==null&&ru(o,p)&&(t.flags|=32),t.memoizedState!==null&&(o=lc(e,t,Qx,null,null,n),tl._currentValue=o),ir(e,t),Gt(e,t,s,n),t.child;case 6:return e===null&&Xe&&((e=n=ht)&&(n=z1(n,t.pendingProps,Mn),n!==null?(t.stateNode=n,Bt=t,ht=null,e=!0):e=!1),e||wa(t)),null;case 13:return tm(e,t,n);case 4:return Rt(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=mi(t,null,s,n):Gt(e,t,s,n),t.child;case 11:return Kh(e,t,t.type,t.pendingProps,n);case 7:return Gt(e,t,t.pendingProps,n),t.child;case 8:return Gt(e,t,t.pendingProps.children,n),t.child;case 12:return Gt(e,t,t.pendingProps.children,n),t.child;case 10:return s=t.pendingProps,Na(t,t.type,s.value),Gt(e,t,s.children,n),t.child;case 9:return o=t.type._context,s=t.pendingProps.children,ui(t),o=Ht(o),s=s(o),t.flags|=1,Gt(e,t,s,n),t.child;case 14:return Zh(e,t,t.type,t.pendingProps,n);case 15:return Ph(e,t,t.type,t.pendingProps,n);case 19:return am(e,t,n);case 31:return a1(e,t,n);case 22:return Qh(e,t,n,t.pendingProps);case 24:return ui(t),s=Ht(wt),e===null?(o=Fo(),o===null&&(o=rt,c=Po(),o.pooledCache=c,c.refCount++,c!==null&&(o.pooledCacheLanes|=n),o=c),t.memoizedState={parent:s,cache:o},Jo(t),Na(t,wt,o)):((e.lanes&n)!==0&&($o(e,t),zs(t,null,null,n),Os()),o=e.memoizedState,c=t.memoizedState,o.parent!==s?(o={parent:s,cache:s},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Na(t,wt,s)):(s=c.cache,Na(t,wt,s),s!==o.cache&&Zo(t,[wt],n,!0))),Gt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function da(e){e.flags|=4}function Oc(e,t,n,s,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(Cm())e.flags|=8192;else throw hi=ql,Wo}else e.flags&=-16777217}function sm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!b0(t))if(Cm())e.flags|=8192;else throw hi=ql,Wo}function lr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Al():536870912,e.lanes|=t,$i|=t)}function Gs(e,t){if(!Xe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function mt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,s=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,s|=o.subtreeFlags&65011712,s|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,s|=o.subtreeFlags,s|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=s,e.childLanes=n,t}function s1(e,t,n){var s=t.pendingProps;switch(Yo(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mt(t),null;case 1:return mt(t),null;case 3:return n=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),oa(wt),ut(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Hi(t)?da(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Io())),mt(t),null;case 26:var o=t.type,c=t.memoizedState;return e===null?(da(t),c!==null?(mt(t),sm(t,c)):(mt(t),Oc(t,o,null,s,n))):c?c!==e.memoizedState?(da(t),mt(t),sm(t,c)):(mt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&da(t),mt(t),Oc(t,o,e,s,n)),null;case 27:if(Gn(t),n=Ne.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&da(t);else{if(!s){if(t.stateNode===null)throw Error(r(166));return mt(t),null}e=se.current,Hi(t)?Ud(t):(e=d0(o,s,n),t.stateNode=e,da(t))}return mt(t),null;case 5:if(Gn(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&da(t);else{if(!s){if(t.stateNode===null)throw Error(r(166));return mt(t),null}if(c=se.current,Hi(t))Ud(t);else{var p=Sr(Ne.current);switch(c){case 1:c=p.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:c=p.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":c=p.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":c=p.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":c=p.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof s.is=="string"?p.createElement("select",{is:s.is}):p.createElement("select"),s.multiple?c.multiple=!0:s.size&&(c.size=s.size);break;default:c=typeof s.is=="string"?p.createElement(o,{is:s.is}):p.createElement(o)}}c[Te]=t,c[de]=s;e:for(p=t.child;p!==null;){if(p.tag===5||p.tag===6)c.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===t)break e;for(;p.sibling===null;){if(p.return===null||p.return===t)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}t.stateNode=c;e:switch(Yt(c,o,s),o){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&da(t)}}return mt(t),Oc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&da(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(r(166));if(e=Ne.current,Hi(t)){if(e=t.stateNode,n=t.memoizedProps,s=null,o=Bt,o!==null)switch(o.tag){case 27:case 5:s=o.memoizedProps}e[Te]=t,e=!!(e.nodeValue===n||s!==null&&s.suppressHydrationWarning===!0||t0(e.nodeValue,n)),e||wa(t,!0)}else e=Sr(e).createTextNode(s),e[Te]=t,t.stateNode=e}return mt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(s=Hi(t),n!==null){if(e===null){if(!s)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Te]=t}else oi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),e=!1}else n=Io(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(mn(t),t):(mn(t),null);if((t.flags&128)!==0)throw Error(r(558))}return mt(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Hi(t),s!==null&&s.dehydrated!==null){if(e===null){if(!o)throw Error(r(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[Te]=t}else oi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),o=!1}else o=Io(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(mn(t),t):(mn(t),null)}return mn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=s!==null,e=e!==null&&e.memoizedState!==null,n&&(s=t.child,o=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(o=s.alternate.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==o&&(s.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),lr(t,t.updateQueue),mt(t),null);case 4:return ut(),e===null&&nu(t.stateNode.containerInfo),mt(t),null;case 10:return oa(t.type),mt(t),null;case 19:if(q(At),s=t.memoizedState,s===null)return mt(t),null;if(o=(t.flags&128)!==0,c=s.rendering,c===null)if(o)Gs(s,!1);else{if(St!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Zl(e),c!==null){for(t.flags|=128,Gs(s,!1),e=c.updateQueue,t.updateQueue=e,lr(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Dd(n,e),n=n.sibling;return J(At,At.current&1|2),Xe&&la(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Dt()>fr&&(t.flags|=128,o=!0,Gs(s,!1),t.lanes=4194304)}else{if(!o)if(e=Zl(c),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,lr(t,e),Gs(s,!0),s.tail===null&&s.tailMode==="hidden"&&!c.alternate&&!Xe)return mt(t),null}else 2*Dt()-s.renderingStartTime>fr&&n!==536870912&&(t.flags|=128,o=!0,Gs(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(e=s.last,e!==null?e.sibling=c:t.child=c,s.last=c)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Dt(),e.sibling=null,n=At.current,J(At,o?n&1|2:n&1),Xe&&la(t,s.treeForkCount),e):(mt(t),null);case 22:case 23:return mn(t),ac(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(n&536870912)!==0&&(t.flags&128)===0&&(mt(t),t.subtreeFlags&6&&(t.flags|=8192)):mt(t),n=t.updateQueue,n!==null&&lr(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==n&&(t.flags|=2048),e!==null&&q(fi),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),oa(wt),mt(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function l1(e,t){switch(Yo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oa(wt),ut(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Gn(t),null;case 31:if(t.memoizedState!==null){if(mn(t),t.alternate===null)throw Error(r(340));oi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(mn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));oi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(At),null;case 4:return ut(),null;case 10:return oa(t.type),null;case 22:case 23:return mn(t),ac(),e!==null&&q(fi),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return oa(wt),null;case 25:return null;default:return null}}function lm(e,t){switch(Yo(t),t.tag){case 3:oa(wt),ut();break;case 26:case 27:case 5:Gn(t);break;case 4:ut();break;case 31:t.memoizedState!==null&&mn(t);break;case 13:mn(t);break;case 19:q(At);break;case 10:oa(t.type);break;case 22:case 23:mn(t),ac(),e!==null&&q(fi);break;case 24:oa(wt)}}function Ys(e,t){try{var n=t.updateQueue,s=n!==null?n.lastEffect:null;if(s!==null){var o=s.next;n=o;do{if((n.tag&e)===e){s=void 0;var c=n.create,p=n.inst;s=c(),p.destroy=s}n=n.next}while(n!==o)}}catch(v){$e(t,t.return,v)}}function Oa(e,t,n){try{var s=t.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var c=o.next;s=c;do{if((s.tag&e)===e){var p=s.inst,v=p.destroy;if(v!==void 0){p.destroy=void 0,o=t;var _=n,O=v;try{O()}catch(G){$e(o,_,G)}}}s=s.next}while(s!==c)}}catch(G){$e(t,t.return,G)}}function rm(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Wd(t,n)}catch(s){$e(e,e.return,s)}}}function om(e,t,n){n.props=gi(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(s){$e(e,t,s)}}function qs(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof n=="function"?e.refCleanup=n(s):n.current=s}}catch(o){$e(e,t,o)}}function Qn(e,t){var n=e.ref,s=e.refCleanup;if(n!==null)if(typeof s=="function")try{s()}catch(o){$e(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(o){$e(e,t,o)}else n.current=null}function cm(e){var t=e.type,n=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&s.focus();break e;case"img":n.src?s.src=n.src:n.srcSet&&(s.srcset=n.srcSet)}}catch(o){$e(e,e.return,o)}}function zc(e,t,n){try{var s=e.stateNode;N1(s,e.type,n,t),s[de]=t}catch(o){$e(e,e.return,o)}}function um(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ga(e.type)||e.tag===4}function Lc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||um(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ga(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function kc(e,t,n){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=aa));else if(s!==4&&(s===27&&Ga(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(kc(e,t,n),e=e.sibling;e!==null;)kc(e,t,n),e=e.sibling}function rr(e,t,n){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(s!==4&&(s===27&&Ga(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(rr(e,t,n),e=e.sibling;e!==null;)rr(e,t,n),e=e.sibling}function fm(e){var t=e.stateNode,n=e.memoizedProps;try{for(var s=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Yt(t,s,n),t[Te]=e,t[de]=n}catch(c){$e(e,e.return,c)}}var ha=!1,Vt=!1,Uc=!1,dm=typeof WeakSet=="function"?WeakSet:Set,Ut=null;function r1(e,t){if(e=e.containerInfo,su=Nr,e=Ad(e),Co(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var s=n.getSelection&&n.getSelection();if(s&&s.rangeCount!==0){n=s.anchorNode;var o=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var p=0,v=-1,_=-1,O=0,G=0,X=e,z=null;t:for(;;){for(var L;X!==n||o!==0&&X.nodeType!==3||(v=p+o),X!==c||s!==0&&X.nodeType!==3||(_=p+s),X.nodeType===3&&(p+=X.nodeValue.length),(L=X.firstChild)!==null;)z=X,X=L;for(;;){if(X===e)break t;if(z===n&&++O===o&&(v=p),z===c&&++G===s&&(_=p),(L=X.nextSibling)!==null)break;X=z,z=X.parentNode}X=L}n=v===-1||_===-1?null:{start:v,end:_}}else n=null}n=n||{start:0,end:0}}else n=null;for(lu={focusedElem:e,selectionRange:n},Nr=!1,Ut=t;Ut!==null;)if(t=Ut,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ut=e;else for(;Ut!==null;){switch(t=Ut,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)o=e[n],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,n=t,o=c.memoizedProps,c=c.memoizedState,s=n.stateNode;try{var le=gi(n.type,o);e=s.getSnapshotBeforeUpdate(le,c),s.__reactInternalSnapshotBeforeUpdate=e}catch(xe){$e(n,n.return,xe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)cu(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":cu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,Ut=e;break}Ut=t.return}}function hm(e,t,n){var s=n.flags;switch(n.tag){case 0:case 11:case 15:pa(e,n),s&4&&Ys(5,n);break;case 1:if(pa(e,n),s&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(p){$e(n,n.return,p)}else{var o=gi(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){$e(n,n.return,p)}}s&64&&rm(n),s&512&&qs(n,n.return);break;case 3:if(pa(e,n),s&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Wd(e,t)}catch(p){$e(n,n.return,p)}}break;case 27:t===null&&s&4&&fm(n);case 26:case 5:pa(e,n),t===null&&s&4&&cm(n),s&512&&qs(n,n.return);break;case 12:pa(e,n);break;case 31:pa(e,n),s&4&&gm(e,n);break;case 13:pa(e,n),s&4&&ym(e,n),s&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=g1.bind(null,n),L1(e,n))));break;case 22:if(s=n.memoizedState!==null||ha,!s){t=t!==null&&t.memoizedState!==null||Vt,o=ha;var c=Vt;ha=s,(Vt=t)&&!c?ga(e,n,(n.subtreeFlags&8772)!==0):pa(e,n),ha=o,Vt=c}break;case 30:break;default:pa(e,n)}}function mm(e){var t=e.alternate;t!==null&&(e.alternate=null,mm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ve(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var gt=null,sn=!1;function ma(e,t,n){for(n=n.child;n!==null;)pm(e,t,n),n=n.sibling}function pm(e,t,n){if(Xt&&typeof Xt.onCommitFiberUnmount=="function")try{Xt.onCommitFiberUnmount(qn,n)}catch{}switch(n.tag){case 26:Vt||Qn(n,t),ma(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Vt||Qn(n,t);var s=gt,o=sn;Ga(n.type)&&(gt=n.stateNode,sn=!1),ma(e,t,n),Js(n.stateNode),gt=s,sn=o;break;case 5:Vt||Qn(n,t);case 6:if(s=gt,o=sn,gt=null,ma(e,t,n),gt=s,sn=o,gt!==null)if(sn)try{(gt.nodeType===9?gt.body:gt.nodeName==="HTML"?gt.ownerDocument.body:gt).removeChild(n.stateNode)}catch(c){$e(n,t,c)}else try{gt.removeChild(n.stateNode)}catch(c){$e(n,t,c)}break;case 18:gt!==null&&(sn?(e=gt,r0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),rs(e)):r0(gt,n.stateNode));break;case 4:s=gt,o=sn,gt=n.stateNode.containerInfo,sn=!0,ma(e,t,n),gt=s,sn=o;break;case 0:case 11:case 14:case 15:Oa(2,n,t),Vt||Oa(4,n,t),ma(e,t,n);break;case 1:Vt||(Qn(n,t),s=n.stateNode,typeof s.componentWillUnmount=="function"&&om(n,t,s)),ma(e,t,n);break;case 21:ma(e,t,n);break;case 22:Vt=(s=Vt)||n.memoizedState!==null,ma(e,t,n),Vt=s;break;default:ma(e,t,n)}}function gm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{rs(e)}catch(n){$e(t,t.return,n)}}}function ym(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{rs(e)}catch(n){$e(t,t.return,n)}}function o1(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new dm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new dm),t;default:throw Error(r(435,e.tag))}}function or(e,t){var n=o1(e);t.forEach(function(s){if(!n.has(s)){n.add(s);var o=y1.bind(null,e,s);s.then(o,o)}})}function ln(e,t){var n=t.deletions;if(n!==null)for(var s=0;s<n.length;s++){var o=n[s],c=e,p=t,v=p;e:for(;v!==null;){switch(v.tag){case 27:if(Ga(v.type)){gt=v.stateNode,sn=!1;break e}break;case 5:gt=v.stateNode,sn=!1;break e;case 3:case 4:gt=v.stateNode.containerInfo,sn=!0;break e}v=v.return}if(gt===null)throw Error(r(160));pm(c,p,o),gt=null,sn=!1,c=o.alternate,c!==null&&(c.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)xm(t,e),t=t.sibling}var zn=null;function xm(e,t){var n=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ln(t,e),rn(e),s&4&&(Oa(3,e,e.return),Ys(3,e),Oa(5,e,e.return));break;case 1:ln(t,e),rn(e),s&512&&(Vt||n===null||Qn(n,n.return)),s&64&&ha&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?s:n.concat(s))));break;case 26:var o=zn;if(ln(t,e),rn(e),s&512&&(Vt||n===null||Qn(n,n.return)),s&4){var c=n!==null?n.memoizedState:null;if(s=e.memoizedState,n===null)if(s===null)if(e.stateNode===null){e:{s=e.type,n=e.memoizedProps,o=o.ownerDocument||o;t:switch(s){case"title":c=o.getElementsByTagName("title")[0],(!c||c[E]||c[Te]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=o.createElement(s),o.head.insertBefore(c,o.querySelector("head > title"))),Yt(c,s,n),c[Te]=e,we(c),s=c;break e;case"link":var p=x0("link","href",o).get(s+(n.href||""));if(p){for(var v=0;v<p.length;v++)if(c=p[v],c.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&c.getAttribute("rel")===(n.rel==null?null:n.rel)&&c.getAttribute("title")===(n.title==null?null:n.title)&&c.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){p.splice(v,1);break t}}c=o.createElement(s),Yt(c,s,n),o.head.appendChild(c);break;case"meta":if(p=x0("meta","content",o).get(s+(n.content||""))){for(v=0;v<p.length;v++)if(c=p[v],c.getAttribute("content")===(n.content==null?null:""+n.content)&&c.getAttribute("name")===(n.name==null?null:n.name)&&c.getAttribute("property")===(n.property==null?null:n.property)&&c.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&c.getAttribute("charset")===(n.charSet==null?null:n.charSet)){p.splice(v,1);break t}}c=o.createElement(s),Yt(c,s,n),o.head.appendChild(c);break;default:throw Error(r(468,s))}c[Te]=e,we(c),s=c}e.stateNode=s}else v0(o,e.type,e.stateNode);else e.stateNode=y0(o,s,e.memoizedProps);else c!==s?(c===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):c.count--,s===null?v0(o,e.type,e.stateNode):y0(o,s,e.memoizedProps)):s===null&&e.stateNode!==null&&zc(e,e.memoizedProps,n.memoizedProps)}break;case 27:ln(t,e),rn(e),s&512&&(Vt||n===null||Qn(n,n.return)),n!==null&&s&4&&zc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ln(t,e),rn(e),s&512&&(Vt||n===null||Qn(n,n.return)),e.flags&32){o=e.stateNode;try{Vi(o,"")}catch(le){$e(e,e.return,le)}}s&4&&e.stateNode!=null&&(o=e.memoizedProps,zc(e,o,n!==null?n.memoizedProps:o)),s&1024&&(Uc=!0);break;case 6:if(ln(t,e),rn(e),s&4){if(e.stateNode===null)throw Error(r(162));s=e.memoizedProps,n=e.stateNode;try{n.nodeValue=s}catch(le){$e(e,e.return,le)}}break;case 3:if(Ar=null,o=zn,zn=Tr(t.containerInfo),ln(t,e),zn=o,rn(e),s&4&&n!==null&&n.memoizedState.isDehydrated)try{rs(t.containerInfo)}catch(le){$e(e,e.return,le)}Uc&&(Uc=!1,vm(e));break;case 4:s=zn,zn=Tr(e.stateNode.containerInfo),ln(t,e),rn(e),zn=s;break;case 12:ln(t,e),rn(e);break;case 31:ln(t,e),rn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,or(e,s)));break;case 13:ln(t,e),rn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ur=Dt()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,or(e,s)));break;case 22:o=e.memoizedState!==null;var _=n!==null&&n.memoizedState!==null,O=ha,G=Vt;if(ha=O||o,Vt=G||_,ln(t,e),Vt=G,ha=O,rn(e),s&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(n===null||_||ha||Vt||yi(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){_=n=t;try{if(c=_.stateNode,o)p=c.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{v=_.stateNode;var X=_.memoizedProps.style,z=X!=null&&X.hasOwnProperty("display")?X.display:null;v.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(le){$e(_,_.return,le)}}}else if(t.tag===6){if(n===null){_=t;try{_.stateNode.nodeValue=o?"":_.memoizedProps}catch(le){$e(_,_.return,le)}}}else if(t.tag===18){if(n===null){_=t;try{var L=_.stateNode;o?o0(L,!0):o0(_.stateNode,!1)}catch(le){$e(_,_.return,le)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(n=s.retryQueue,n!==null&&(s.retryQueue=null,or(e,n))));break;case 19:ln(t,e),rn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,or(e,s)));break;case 30:break;case 21:break;default:ln(t,e),rn(e)}}function rn(e){var t=e.flags;if(t&2){try{for(var n,s=e.return;s!==null;){if(um(s)){n=s;break}s=s.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var o=n.stateNode,c=Lc(e);rr(e,c,o);break;case 5:var p=n.stateNode;n.flags&32&&(Vi(p,""),n.flags&=-33);var v=Lc(e);rr(e,v,p);break;case 3:case 4:var _=n.stateNode.containerInfo,O=Lc(e);kc(e,O,_);break;default:throw Error(r(161))}}catch(G){$e(e,e.return,G)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function vm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;vm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function pa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)hm(e,t.alternate,t),t=t.sibling}function yi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Oa(4,t,t.return),yi(t);break;case 1:Qn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&om(t,t.return,n),yi(t);break;case 27:Js(t.stateNode);case 26:case 5:Qn(t,t.return),yi(t);break;case 22:t.memoizedState===null&&yi(t);break;case 30:yi(t);break;default:yi(t)}e=e.sibling}}function ga(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,o=e,c=t,p=c.flags;switch(c.tag){case 0:case 11:case 15:ga(o,c,n),Ys(4,c);break;case 1:if(ga(o,c,n),s=c,o=s.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(O){$e(s,s.return,O)}if(s=c,o=s.updateQueue,o!==null){var v=s.stateNode;try{var _=o.shared.hiddenCallbacks;if(_!==null)for(o.shared.hiddenCallbacks=null,o=0;o<_.length;o++)Fd(_[o],v)}catch(O){$e(s,s.return,O)}}n&&p&64&&rm(c),qs(c,c.return);break;case 27:fm(c);case 26:case 5:ga(o,c,n),n&&s===null&&p&4&&cm(c),qs(c,c.return);break;case 12:ga(o,c,n);break;case 31:ga(o,c,n),n&&p&4&&gm(o,c);break;case 13:ga(o,c,n),n&&p&4&&ym(o,c);break;case 22:c.memoizedState===null&&ga(o,c,n),qs(c,c.return);break;case 30:break;default:ga(o,c,n)}t=t.sibling}}function Bc(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&js(n))}function Hc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&js(e))}function Ln(e,t,n,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)bm(e,t,n,s),t=t.sibling}function bm(e,t,n,s){var o=t.flags;switch(t.tag){case 0:case 11:case 15:Ln(e,t,n,s),o&2048&&Ys(9,t);break;case 1:Ln(e,t,n,s);break;case 3:Ln(e,t,n,s),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&js(e)));break;case 12:if(o&2048){Ln(e,t,n,s),e=t.stateNode;try{var c=t.memoizedProps,p=c.id,v=c.onPostCommit;typeof v=="function"&&v(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(_){$e(t,t.return,_)}}else Ln(e,t,n,s);break;case 31:Ln(e,t,n,s);break;case 13:Ln(e,t,n,s);break;case 23:break;case 22:c=t.stateNode,p=t.alternate,t.memoizedState!==null?c._visibility&2?Ln(e,t,n,s):Is(e,t):c._visibility&2?Ln(e,t,n,s):(c._visibility|=2,Fi(e,t,n,s,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Bc(p,t);break;case 24:Ln(e,t,n,s),o&2048&&Hc(t.alternate,t);break;default:Ln(e,t,n,s)}}function Fi(e,t,n,s,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,p=t,v=n,_=s,O=p.flags;switch(p.tag){case 0:case 11:case 15:Fi(c,p,v,_,o),Ys(8,p);break;case 23:break;case 22:var G=p.stateNode;p.memoizedState!==null?G._visibility&2?Fi(c,p,v,_,o):Is(c,p):(G._visibility|=2,Fi(c,p,v,_,o)),o&&O&2048&&Bc(p.alternate,p);break;case 24:Fi(c,p,v,_,o),o&&O&2048&&Hc(p.alternate,p);break;default:Fi(c,p,v,_,o)}t=t.sibling}}function Is(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,s=t,o=s.flags;switch(s.tag){case 22:Is(n,s),o&2048&&Bc(s.alternate,s);break;case 24:Is(n,s),o&2048&&Hc(s.alternate,s);break;default:Is(n,s)}t=t.sibling}}var Xs=8192;function Wi(e,t,n){if(e.subtreeFlags&Xs)for(e=e.child;e!==null;)Sm(e,t,n),e=e.sibling}function Sm(e,t,n){switch(e.tag){case 26:Wi(e,t,n),e.flags&Xs&&e.memoizedState!==null&&P1(n,zn,e.memoizedState,e.memoizedProps);break;case 5:Wi(e,t,n);break;case 3:case 4:var s=zn;zn=Tr(e.stateNode.containerInfo),Wi(e,t,n),zn=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Xs,Xs=16777216,Wi(e,t,n),Xs=s):Wi(e,t,n));break;default:Wi(e,t,n)}}function Tm(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ks(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var s=t[n];Ut=s,Am(s,e)}Tm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)_m(e),e=e.sibling}function _m(e){switch(e.tag){case 0:case 11:case 15:Ks(e),e.flags&2048&&Oa(9,e,e.return);break;case 3:Ks(e);break;case 12:Ks(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,cr(e)):Ks(e);break;default:Ks(e)}}function cr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var s=t[n];Ut=s,Am(s,e)}Tm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Oa(8,t,t.return),cr(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,cr(t));break;default:cr(t)}e=e.sibling}}function Am(e,t){for(;Ut!==null;){var n=Ut;switch(n.tag){case 0:case 11:case 15:Oa(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var s=n.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:js(n.memoizedState.cache)}if(s=n.child,s!==null)s.return=n,Ut=s;else e:for(n=e;Ut!==null;){s=Ut;var o=s.sibling,c=s.return;if(mm(s),s===n){Ut=null;break e}if(o!==null){o.return=c,Ut=o;break e}Ut=c}}}var c1={getCacheForType:function(e){var t=Ht(wt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ht(wt).controller.signal}},u1=typeof WeakMap=="function"?WeakMap:Map,Qe=0,rt=null,Be=null,Ye=0,Je=0,pn=null,za=!1,Ji=!1,Gc=!1,ya=0,St=0,La=0,xi=0,Yc=0,gn=0,$i=0,Zs=null,on=null,qc=!1,ur=0,Em=0,fr=1/0,dr=null,ka=null,Ot=0,Ua=null,es=null,xa=0,Ic=0,Xc=null,Mm=null,Ps=0,Kc=null;function yn(){return(Qe&2)!==0&&Ye!==0?Ye&-Ye:U.T!==null?Jc():ze()}function wm(){if(gn===0)if((Ye&536870912)===0||Xe){var e=ei;ei<<=1,(ei&3932160)===0&&(ei=262144),gn=e}else gn=536870912;return e=hn.current,e!==null&&(e.flags|=32),gn}function cn(e,t,n){(e===rt&&(Je===2||Je===9)||e.cancelPendingCommit!==null)&&(ts(e,0),Ba(e,Ye,gn,!1)),ni(e,n),((Qe&2)===0||e!==rt)&&(e===rt&&((Qe&2)===0&&(xi|=n),St===4&&Ba(e,Ye,gn,!1)),Fn(e))}function Nm(e,t,n){if((Qe&6)!==0)throw Error(r(327));var s=!n&&(t&127)===0&&(t&e.expiredLanes)===0||vn(e,t),o=s?h1(e,t):Pc(e,t,!0),c=s;do{if(o===0){Ji&&!s&&Ba(e,t,0,!1);break}else{if(n=e.current.alternate,c&&!f1(n)){o=Pc(e,t,!1),c=!1;continue}if(o===2){if(c=t,e.errorRecoveryDisabledLanes&c)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var v=e;o=Zs;var _=v.current.memoizedState.isDehydrated;if(_&&(ts(v,p).flags|=256),p=Pc(v,p,!1),p!==2){if(Gc&&!_){v.errorRecoveryDisabledLanes|=c,xi|=c,o=4;break e}c=on,on=o,c!==null&&(on===null?on=c:on.push.apply(on,c))}o=p}if(c=!1,o!==2)continue}}if(o===1){ts(e,0),Ba(e,t,0,!0);break}e:{switch(s=e,c=o,c){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Ba(s,t,gn,!za);break e;case 2:on=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(o=ur+300-Dt(),10<o)){if(Ba(s,t,gn,!za),Ni(s,0,!0)!==0)break e;xa=t,s.timeoutHandle=s0(jm.bind(null,s,n,on,dr,qc,t,gn,xi,$i,za,c,"Throttled",-0,0),o);break e}jm(s,n,on,dr,qc,t,gn,xi,$i,za,c,null,-0,0)}}break}while(!0);Fn(e)}function jm(e,t,n,s,o,c,p,v,_,O,G,X,z,L){if(e.timeoutHandle=-1,X=t.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:aa},Sm(t,c,X);var le=(c&62914560)===c?ur-Dt():(c&4194048)===c?Em-Dt():0;if(le=Q1(X,le),le!==null){xa=c,e.cancelPendingCommit=le(km.bind(null,e,t,c,n,s,o,p,v,_,G,X,null,z,L)),Ba(e,c,p,!O);return}}km(e,t,c,n,s,o,p,v,_)}function f1(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var s=0;s<n.length;s++){var o=n[s],c=o.getSnapshot;o=o.value;try{if(!fn(c(),o))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ba(e,t,n,s){t&=~Yc,t&=~xi,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var o=t;0<o;){var c=31-ie(o),p=1<<c;s[c]=-1,o&=~p}n!==0&&H(e,n,t)}function hr(){return(Qe&6)===0?(Qs(0),!1):!0}function Zc(){if(Be!==null){if(Je===0)var e=Be.return;else e=Be,ra=ci=null,cc(e),Xi=null,Cs=0,e=Be;for(;e!==null;)lm(e.alternate,e),e=e.return;Be=null}}function ts(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,C1(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),xa=0,Zc(),rt=e,Be=n=sa(e.current,null),Ye=t,Je=0,pn=null,za=!1,Ji=vn(e,t),Gc=!1,$i=gn=Yc=xi=La=St=0,on=Zs=null,qc=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var o=31-ie(s),c=1<<o;t|=e[o],s&=~c}return ya=t,Ol(),n}function Vm(e,t){Re=null,U.H=Bs,t===Ii||t===Yl?(t=Kd(),Je=3):t===Wo?(t=Kd(),Je=4):Je=t===Ec?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,pn=t,Be===null&&(St=1,nr(e,_n(t,e.current)))}function Cm(){var e=hn.current;return e===null?!0:(Ye&4194048)===Ye?wn===null:(Ye&62914560)===Ye||(Ye&536870912)!==0?e===wn:!1}function Rm(){var e=U.H;return U.H=Bs,e===null?Bs:e}function Dm(){var e=U.A;return U.A=c1,e}function mr(){St=4,za||(Ye&4194048)!==Ye&&hn.current!==null||(Ji=!0),(La&134217727)===0&&(xi&134217727)===0||rt===null||Ba(rt,Ye,gn,!1)}function Pc(e,t,n){var s=Qe;Qe|=2;var o=Rm(),c=Dm();(rt!==e||Ye!==t)&&(dr=null,ts(e,t)),t=!1;var p=St;e:do try{if(Je!==0&&Be!==null){var v=Be,_=pn;switch(Je){case 8:Zc(),p=6;break e;case 3:case 2:case 9:case 6:hn.current===null&&(t=!0);var O=Je;if(Je=0,pn=null,ns(e,v,_,O),n&&Ji){p=0;break e}break;default:O=Je,Je=0,pn=null,ns(e,v,_,O)}}d1(),p=St;break}catch(G){Vm(e,G)}while(!0);return t&&e.shellSuspendCounter++,ra=ci=null,Qe=s,U.H=o,U.A=c,Be===null&&(rt=null,Ye=0,Ol()),p}function d1(){for(;Be!==null;)Om(Be)}function h1(e,t){var n=Qe;Qe|=2;var s=Rm(),o=Dm();rt!==e||Ye!==t?(dr=null,fr=Dt()+500,ts(e,t)):Ji=vn(e,t);e:do try{if(Je!==0&&Be!==null){t=Be;var c=pn;t:switch(Je){case 1:Je=0,pn=null,ns(e,t,c,1);break;case 2:case 9:if(Id(c)){Je=0,pn=null,zm(t);break}t=function(){Je!==2&&Je!==9||rt!==e||(Je=7),Fn(e)},c.then(t,t);break e;case 3:Je=7;break e;case 4:Je=5;break e;case 7:Id(c)?(Je=0,pn=null,zm(t)):(Je=0,pn=null,ns(e,t,c,7));break;case 5:var p=null;switch(Be.tag){case 26:p=Be.memoizedState;case 5:case 27:var v=Be;if(p?b0(p):v.stateNode.complete){Je=0,pn=null;var _=v.sibling;if(_!==null)Be=_;else{var O=v.return;O!==null?(Be=O,pr(O)):Be=null}break t}}Je=0,pn=null,ns(e,t,c,5);break;case 6:Je=0,pn=null,ns(e,t,c,6);break;case 8:Zc(),St=6;break e;default:throw Error(r(462))}}m1();break}catch(G){Vm(e,G)}while(!0);return ra=ci=null,U.H=s,U.A=o,Qe=n,Be!==null?0:(rt=null,Ye=0,Ol(),St)}function m1(){for(;Be!==null&&!tn();)Om(Be)}function Om(e){var t=im(e.alternate,e,ya);e.memoizedProps=e.pendingProps,t===null?pr(e):Be=t}function zm(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Jh(n,t,t.pendingProps,t.type,void 0,Ye);break;case 11:t=Jh(n,t,t.pendingProps,t.type.render,t.ref,Ye);break;case 5:cc(t);default:lm(n,t),t=Be=Dd(t,ya),t=im(n,t,ya)}e.memoizedProps=e.pendingProps,t===null?pr(e):Be=t}function ns(e,t,n,s){ra=ci=null,cc(t),Xi=null,Cs=0;var o=t.return;try{if(n1(e,o,t,n,Ye)){St=1,nr(e,_n(n,e.current)),Be=null;return}}catch(c){if(o!==null)throw Be=o,c;St=1,nr(e,_n(n,e.current)),Be=null;return}t.flags&32768?(Xe||s===1?e=!0:Ji||(Ye&536870912)!==0?e=!1:(za=e=!0,(s===2||s===9||s===3||s===6)&&(s=hn.current,s!==null&&s.tag===13&&(s.flags|=16384))),Lm(t,e)):pr(t)}function pr(e){var t=e;do{if((t.flags&32768)!==0){Lm(t,za);return}e=t.return;var n=s1(t.alternate,t,ya);if(n!==null){Be=n;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);St===0&&(St=5)}function Lm(e,t){do{var n=l1(e.alternate,e);if(n!==null){n.flags&=32767,Be=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Be=e;return}Be=e=n}while(e!==null);St=6,Be=null}function km(e,t,n,s,o,c,p,v,_){e.cancelPendingCommit=null;do gr();while(Ot!==0);if((Qe&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(c=t.lanes|t.childLanes,c|=Lo,mo(e,n,c,p,v,_),e===rt&&(Be=rt=null,Ye=0),es=t,Ua=e,xa=n,Ic=c,Xc=o,Mm=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,x1(Ja,function(){return Ym(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=U.T,U.T=null,o=$.p,$.p=2,p=Qe,Qe|=4;try{r1(e,t,n)}finally{Qe=p,$.p=o,U.T=s}}Ot=1,Um(),Bm(),Hm()}}function Um(){if(Ot===1){Ot=0;var e=Ua,t=es,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=U.T,U.T=null;var s=$.p;$.p=2;var o=Qe;Qe|=4;try{xm(t,e);var c=lu,p=Ad(e.containerInfo),v=c.focusedElem,_=c.selectionRange;if(p!==v&&v&&v.ownerDocument&&_d(v.ownerDocument.documentElement,v)){if(_!==null&&Co(v)){var O=_.start,G=_.end;if(G===void 0&&(G=O),"selectionStart"in v)v.selectionStart=O,v.selectionEnd=Math.min(G,v.value.length);else{var X=v.ownerDocument||document,z=X&&X.defaultView||window;if(z.getSelection){var L=z.getSelection(),le=v.textContent.length,xe=Math.min(_.start,le),st=_.end===void 0?xe:Math.min(_.end,le);!L.extend&&xe>st&&(p=st,st=xe,xe=p);var R=Td(v,xe),w=Td(v,st);if(R&&w&&(L.rangeCount!==1||L.anchorNode!==R.node||L.anchorOffset!==R.offset||L.focusNode!==w.node||L.focusOffset!==w.offset)){var D=X.createRange();D.setStart(R.node,R.offset),L.removeAllRanges(),xe>st?(L.addRange(D),L.extend(w.node,w.offset)):(D.setEnd(w.node,w.offset),L.addRange(D))}}}}for(X=[],L=v;L=L.parentNode;)L.nodeType===1&&X.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<X.length;v++){var I=X[v];I.element.scrollLeft=I.left,I.element.scrollTop=I.top}}Nr=!!su,lu=su=null}finally{Qe=o,$.p=s,U.T=n}}e.current=t,Ot=2}}function Bm(){if(Ot===2){Ot=0;var e=Ua,t=es,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=U.T,U.T=null;var s=$.p;$.p=2;var o=Qe;Qe|=4;try{hm(e,t.alternate,t)}finally{Qe=o,$.p=s,U.T=n}}Ot=3}}function Hm(){if(Ot===4||Ot===3){Ot=0,We();var e=Ua,t=es,n=xa,s=Mm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ot=5:(Ot=0,es=Ua=null,Gm(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(ka=null),me(n),t=t.stateNode,Xt&&typeof Xt.onCommitFiberRoot=="function")try{Xt.onCommitFiberRoot(qn,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=U.T,o=$.p,$.p=2,U.T=null;try{for(var c=e.onRecoverableError,p=0;p<s.length;p++){var v=s[p];c(v.value,{componentStack:v.stack})}}finally{U.T=t,$.p=o}}(xa&3)!==0&&gr(),Fn(e),o=e.pendingLanes,(n&261930)!==0&&(o&42)!==0?e===Kc?Ps++:(Ps=0,Kc=e):Ps=0,Qs(0)}}function Gm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,js(t)))}function gr(){return Um(),Bm(),Hm(),Ym()}function Ym(){if(Ot!==5)return!1;var e=Ua,t=Ic;Ic=0;var n=me(xa),s=U.T,o=$.p;try{$.p=32>n?32:n,U.T=null,n=Xc,Xc=null;var c=Ua,p=xa;if(Ot=0,es=Ua=null,xa=0,(Qe&6)!==0)throw Error(r(331));var v=Qe;if(Qe|=4,_m(c.current),bm(c,c.current,p,n),Qe=v,Qs(0,!1),Xt&&typeof Xt.onPostCommitFiberRoot=="function")try{Xt.onPostCommitFiberRoot(qn,c)}catch{}return!0}finally{$.p=o,U.T=s,Gm(e,t)}}function qm(e,t,n){t=_n(n,t),t=Ac(e.stateNode,t,2),e=Ca(e,t,2),e!==null&&(ni(e,2),Fn(e))}function $e(e,t,n){if(e.tag===3)qm(e,e,n);else for(;t!==null;){if(t.tag===3){qm(t,e,n);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ka===null||!ka.has(s))){e=_n(n,e),n=Ih(2),s=Ca(t,n,2),s!==null&&(Xh(n,s,t,e),ni(s,2),Fn(s));break}}t=t.return}}function Qc(e,t,n){var s=e.pingCache;if(s===null){s=e.pingCache=new u1;var o=new Set;s.set(t,o)}else o=s.get(t),o===void 0&&(o=new Set,s.set(t,o));o.has(n)||(Gc=!0,o.add(n),e=p1.bind(null,e,t,n),t.then(e,e))}function p1(e,t,n){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,rt===e&&(Ye&n)===n&&(St===4||St===3&&(Ye&62914560)===Ye&&300>Dt()-ur?(Qe&2)===0&&ts(e,0):Yc|=n,$i===Ye&&($i=0)),Fn(e)}function Im(e,t){t===0&&(t=Al()),e=li(e,t),e!==null&&(ni(e,t),Fn(e))}function g1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Im(e,n)}function y1(e,t){var n=0;switch(e.tag){case 31:case 13:var s=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(t),Im(e,n)}function x1(e,t){return Lt(e,t)}var yr=null,as=null,Fc=!1,xr=!1,Wc=!1,Ha=0;function Fn(e){e!==as&&e.next===null&&(as===null?yr=as=e:as=as.next=e),xr=!0,Fc||(Fc=!0,b1())}function Qs(e,t){if(!Wc&&xr){Wc=!0;do for(var n=!1,s=yr;s!==null;){if(e!==0){var o=s.pendingLanes;if(o===0)var c=0;else{var p=s.suspendedLanes,v=s.pingedLanes;c=(1<<31-ie(42|e)+1)-1,c&=o&~(p&~v),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,Pm(s,c))}else c=Ye,c=Ni(s,s===rt?c:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(c&3)===0||vn(s,c)||(n=!0,Pm(s,c));s=s.next}while(n);Wc=!1}}function v1(){Xm()}function Xm(){xr=Fc=!1;var e=0;Ha!==0&&V1()&&(e=Ha);for(var t=Dt(),n=null,s=yr;s!==null;){var o=s.next,c=Km(s,t);c===0?(s.next=null,n===null?yr=o:n.next=o,o===null&&(as=n)):(n=s,(e!==0||(c&3)!==0)&&(xr=!0)),s=o}Ot!==0&&Ot!==5||Qs(e),Ha!==0&&(Ha=0)}function Km(e,t){for(var n=e.suspendedLanes,s=e.pingedLanes,o=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var p=31-ie(c),v=1<<p,_=o[p];_===-1?((v&n)===0||(v&s)!==0)&&(o[p]=ho(v,t)):_<=t&&(e.expiredLanes|=v),c&=~v}if(t=rt,n=Ye,n=Ni(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,n===0||e===t&&(Je===2||Je===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&pt(s),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||vn(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(s!==null&&pt(s),me(n)){case 2:case 8:n=Ta;break;case 32:n=Ja;break;case 268435456:n=Tl;break;default:n=Ja}return s=Zm.bind(null,e),n=Lt(n,s),e.callbackPriority=t,e.callbackNode=n,t}return s!==null&&s!==null&&pt(s),e.callbackPriority=2,e.callbackNode=null,2}function Zm(e,t){if(Ot!==0&&Ot!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(gr()&&e.callbackNode!==n)return null;var s=Ye;return s=Ni(e,e===rt?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Nm(e,s,t),Km(e,Dt()),e.callbackNode!=null&&e.callbackNode===n?Zm.bind(null,e):null)}function Pm(e,t){if(gr())return null;Nm(e,t,!0)}function b1(){R1(function(){(Qe&6)!==0?Lt(Sl,v1):Xm()})}function Jc(){if(Ha===0){var e=Yi;e===0&&(e=Mi,Mi<<=1,(Mi&261888)===0&&(Mi=256)),Ha=e}return Ha}function Qm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ml(""+e)}function Fm(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function S1(e,t,n,s,o){if(t==="submit"&&n&&n.stateNode===o){var c=Qm((o[de]||null).action),p=s.submitter;p&&(t=(t=p[de]||null)?Qm(t.formAction):p.getAttribute("formAction"),t!==null&&(c=t,p=null));var v=new Vl("action","action",null,s,o);e.push({event:v,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Ha!==0){var _=p?Fm(o,p):new FormData(o);xc(n,{pending:!0,data:_,method:o.method,action:c},null,_)}}else typeof c=="function"&&(v.preventDefault(),_=p?Fm(o,p):new FormData(o),xc(n,{pending:!0,data:_,method:o.method,action:c},c,_))},currentTarget:o}]})}}for(var $c=0;$c<zo.length;$c++){var eu=zo[$c],T1=eu.toLowerCase(),_1=eu[0].toUpperCase()+eu.slice(1);On(T1,"on"+_1)}On(wd,"onAnimationEnd"),On(Nd,"onAnimationIteration"),On(jd,"onAnimationStart"),On("dblclick","onDoubleClick"),On("focusin","onFocus"),On("focusout","onBlur"),On(Bx,"onTransitionRun"),On(Hx,"onTransitionStart"),On(Gx,"onTransitionCancel"),On(Vd,"onTransitionEnd"),ge("onMouseEnter",["mouseout","mouseover"]),ge("onMouseLeave",["mouseout","mouseover"]),ge("onPointerEnter",["pointerout","pointerover"]),ge("onPointerLeave",["pointerout","pointerover"]),C("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),C("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),C("onBeforeInput",["compositionend","keypress","textInput","paste"]),C("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),C("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),C("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fs="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(" "),A1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fs));function Wm(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var s=e[n],o=s.event;s=s.listeners;e:{var c=void 0;if(t)for(var p=s.length-1;0<=p;p--){var v=s[p],_=v.instance,O=v.currentTarget;if(v=v.listener,_!==c&&o.isPropagationStopped())break e;c=v,o.currentTarget=O;try{c(o)}catch(G){Dl(G)}o.currentTarget=null,c=_}else for(p=0;p<s.length;p++){if(v=s[p],_=v.instance,O=v.currentTarget,v=v.listener,_!==c&&o.isPropagationStopped())break e;c=v,o.currentTarget=O;try{c(o)}catch(G){Dl(G)}o.currentTarget=null,c=_}}}}function He(e,t){var n=t[xt];n===void 0&&(n=t[xt]=new Set);var s=e+"__bubble";n.has(s)||(Jm(t,e,2,!1),n.add(s))}function tu(e,t,n){var s=0;t&&(s|=4),Jm(n,e,s,t)}var vr="_reactListening"+Math.random().toString(36).slice(2);function nu(e){if(!e[vr]){e[vr]=!0,kt.forEach(function(n){n!=="selectionchange"&&(A1.has(n)||tu(n,!1,e),tu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[vr]||(t[vr]=!0,tu("selectionchange",!1,t))}}function Jm(e,t,n,s){switch(w0(t)){case 2:var o=J1;break;case 8:o=$1;break;default:o=yu}n=o.bind(null,t,n,e),o=void 0,!To||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),s?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function au(e,t,n,s,o){var c=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var p=s.tag;if(p===3||p===4){var v=s.stateNode.containerInfo;if(v===o)break;if(p===4)for(p=s.return;p!==null;){var _=p.tag;if((_===3||_===4)&&p.stateNode.containerInfo===o)return;p=p.return}for(;v!==null;){if(p=ee(v),p===null)return;if(_=p.tag,_===5||_===6||_===26||_===27){s=c=p;continue e}v=v.parentNode}}s=s.return}ad(function(){var O=c,G=bo(n),X=[];e:{var z=Cd.get(e);if(z!==void 0){var L=Vl,le=e;switch(e){case"keypress":if(Nl(n)===0)break e;case"keydown":case"keyup":L=yx;break;case"focusin":le="focus",L=Mo;break;case"focusout":le="blur",L=Mo;break;case"beforeblur":case"afterblur":L=Mo;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":L=ld;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=sx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=bx;break;case wd:case Nd:case jd:L=ox;break;case Vd:L=Tx;break;case"scroll":case"scrollend":L=ax;break;case"wheel":L=Ax;break;case"copy":case"cut":case"paste":L=ux;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=od;break;case"toggle":case"beforetoggle":L=Mx}var xe=(t&4)!==0,st=!xe&&(e==="scroll"||e==="scrollend"),R=xe?z!==null?z+"Capture":null:z;xe=[];for(var w=O,D;w!==null;){var I=w;if(D=I.stateNode,I=I.tag,I!==5&&I!==26&&I!==27||D===null||R===null||(I=xs(w,R),I!=null&&xe.push(Ws(w,I,D))),st)break;w=w.return}0<xe.length&&(z=new L(z,le,null,n,G),X.push({event:z,listeners:xe}))}}if((t&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",L=e==="mouseout"||e==="pointerout",z&&n!==vo&&(le=n.relatedTarget||n.fromElement)&&(ee(le)||le[Ee]))break e;if((L||z)&&(z=G.window===G?G:(z=G.ownerDocument)?z.defaultView||z.parentWindow:window,L?(le=n.relatedTarget||n.toElement,L=O,le=le?ee(le):null,le!==null&&(st=m(le),xe=le.tag,le!==st||xe!==5&&xe!==27&&xe!==6)&&(le=null)):(L=null,le=O),L!==le)){if(xe=ld,I="onMouseLeave",R="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(xe=od,I="onPointerLeave",R="onPointerEnter",w="pointer"),st=L==null?z:je(L),D=le==null?z:je(le),z=new xe(I,w+"leave",L,n,G),z.target=st,z.relatedTarget=D,I=null,ee(G)===O&&(xe=new xe(R,w+"enter",le,n,G),xe.target=D,xe.relatedTarget=st,I=xe),st=I,L&&le)t:{for(xe=E1,R=L,w=le,D=0,I=R;I;I=xe(I))D++;I=0;for(var pe=w;pe;pe=xe(pe))I++;for(;0<D-I;)R=xe(R),D--;for(;0<I-D;)w=xe(w),I--;for(;D--;){if(R===w||w!==null&&R===w.alternate){xe=R;break t}R=xe(R),w=xe(w)}xe=null}else xe=null;L!==null&&$m(X,z,L,xe,!1),le!==null&&st!==null&&$m(X,st,le,xe,!0)}}e:{if(z=O?je(O):window,L=z.nodeName&&z.nodeName.toLowerCase(),L==="select"||L==="input"&&z.type==="file")var Ze=gd;else if(md(z))if(yd)Ze=Lx;else{Ze=Ox;var he=Dx}else L=z.nodeName,!L||L.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?O&&xo(O.elementType)&&(Ze=gd):Ze=zx;if(Ze&&(Ze=Ze(e,O))){pd(X,Ze,n,G);break e}he&&he(e,z,O),e==="focusout"&&O&&z.type==="number"&&O.memoizedProps.value!=null&&yo(z,"number",z.value)}switch(he=O?je(O):window,e){case"focusin":(md(he)||he.contentEditable==="true")&&(Oi=he,Ro=O,Ms=null);break;case"focusout":Ms=Ro=Oi=null;break;case"mousedown":Do=!0;break;case"contextmenu":case"mouseup":case"dragend":Do=!1,Ed(X,n,G);break;case"selectionchange":if(Ux)break;case"keydown":case"keyup":Ed(X,n,G)}var Oe;if(No)e:{switch(e){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else Di?dd(e,n)&&(qe="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(qe="onCompositionStart");qe&&(cd&&n.locale!=="ko"&&(Di||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&Di&&(Oe=id()):(Aa=G,_o="value"in Aa?Aa.value:Aa.textContent,Di=!0)),he=br(O,qe),0<he.length&&(qe=new rd(qe,e,null,n,G),X.push({event:qe,listeners:he}),Oe?qe.data=Oe:(Oe=hd(n),Oe!==null&&(qe.data=Oe)))),(Oe=Nx?jx(e,n):Vx(e,n))&&(qe=br(O,"onBeforeInput"),0<qe.length&&(he=new rd("onBeforeInput","beforeinput",null,n,G),X.push({event:he,listeners:qe}),he.data=Oe)),S1(X,e,O,n,G)}Wm(X,t)})}function Ws(e,t,n){return{instance:e,listener:t,currentTarget:n}}function br(e,t){for(var n=t+"Capture",s=[];e!==null;){var o=e,c=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||c===null||(o=xs(e,n),o!=null&&s.unshift(Ws(e,o,c)),o=xs(e,t),o!=null&&s.push(Ws(e,o,c))),e.tag===3)return s;e=e.return}return[]}function E1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function $m(e,t,n,s,o){for(var c=t._reactName,p=[];n!==null&&n!==s;){var v=n,_=v.alternate,O=v.stateNode;if(v=v.tag,_!==null&&_===s)break;v!==5&&v!==26&&v!==27||O===null||(_=O,o?(O=xs(n,c),O!=null&&p.unshift(Ws(n,O,_))):o||(O=xs(n,c),O!=null&&p.push(Ws(n,O,_)))),n=n.return}p.length!==0&&e.push({event:t,listeners:p})}var M1=/\r\n?/g,w1=/\u0000|\uFFFD/g;function e0(e){return(typeof e=="string"?e:""+e).replace(M1,`
`).replace(w1,"")}function t0(e,t){return t=e0(t),e0(e)===t}function it(e,t,n,s,o,c){switch(n){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Vi(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Vi(e,""+s);break;case"className":dt(e,"class",s);break;case"tabIndex":dt(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":dt(e,n,s);break;case"style":td(e,s,c);break;case"data":if(t!=="object"){dt(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(n);break}s=Ml(""+s),e.setAttribute(n,s);break;case"action":case"formAction":if(typeof s=="function"){e.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 c=="function"&&(n==="formAction"?(t!=="input"&&it(e,t,"name",o.name,o,null),it(e,t,"formEncType",o.formEncType,o,null),it(e,t,"formMethod",o.formMethod,o,null),it(e,t,"formTarget",o.formTarget,o,null)):(it(e,t,"encType",o.encType,o,null),it(e,t,"method",o.method,o,null),it(e,t,"target",o.target,o,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(n);break}s=Ml(""+s),e.setAttribute(n,s);break;case"onClick":s!=null&&(e.onclick=aa);break;case"onScroll":s!=null&&He("scroll",e);break;case"onScrollEnd":s!=null&&He("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(n=s.__html,n!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}n=Ml(""+s),e.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":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(n,""+s):e.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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":s===!0?e.setAttribute(n,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(n,s):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(n,s):e.removeAttribute(n);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(n):e.setAttribute(n,s);break;case"popover":He("beforetoggle",e),He("toggle",e),nt(e,"popover",s);break;case"xlinkActuate":_t(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":_t(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":_t(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":_t(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":_t(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":_t(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":_t(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":_t(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":_t(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":nt(e,"is",s);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,nt(e,n,s))}}function iu(e,t,n,s,o,c){switch(n){case"style":td(e,s,c);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(n=s.__html,n!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"children":typeof s=="string"?Vi(e,s):(typeof s=="number"||typeof s=="bigint")&&Vi(e,""+s);break;case"onScroll":s!=null&&He("scroll",e);break;case"onScrollEnd":s!=null&&He("scrollend",e);break;case"onClick":s!=null&&(e.onclick=aa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!nn.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(o=n.endsWith("Capture"),t=n.slice(2,o?n.length-7:void 0),c=e[de]||null,c=c!=null?c[n]:null,typeof c=="function"&&e.removeEventListener(t,c,o),typeof s=="function")){typeof c!="function"&&c!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,s,o);break e}n in e?e[n]=s:s===!0?e.setAttribute(n,""):nt(e,n,s)}}}function Yt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":He("error",e),He("load",e);var s=!1,o=!1,c;for(c in n)if(n.hasOwnProperty(c)){var p=n[c];if(p!=null)switch(c){case"src":s=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:it(e,t,c,p,n,null)}}o&&it(e,t,"srcSet",n.srcSet,n,null),s&&it(e,t,"src",n.src,n,null);return;case"input":He("invalid",e);var v=c=p=o=null,_=null,O=null;for(s in n)if(n.hasOwnProperty(s)){var G=n[s];if(G!=null)switch(s){case"name":o=G;break;case"type":p=G;break;case"checked":_=G;break;case"defaultChecked":O=G;break;case"value":c=G;break;case"defaultValue":v=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(137,t));break;default:it(e,t,s,G,n,null)}}Wf(e,c,v,_,O,p,o,!1);return;case"select":He("invalid",e),s=p=c=null;for(o in n)if(n.hasOwnProperty(o)&&(v=n[o],v!=null))switch(o){case"value":c=v;break;case"defaultValue":p=v;break;case"multiple":s=v;default:it(e,t,o,v,n,null)}t=c,n=p,e.multiple=!!s,t!=null?ji(e,!!s,t,!1):n!=null&&ji(e,!!s,n,!0);return;case"textarea":He("invalid",e),c=o=s=null;for(p in n)if(n.hasOwnProperty(p)&&(v=n[p],v!=null))switch(p){case"value":s=v;break;case"defaultValue":o=v;break;case"children":c=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:it(e,t,p,v,n,null)}$f(e,s,o,c);return;case"option":for(_ in n)if(n.hasOwnProperty(_)&&(s=n[_],s!=null))switch(_){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:it(e,t,_,s,n,null)}return;case"dialog":He("beforetoggle",e),He("toggle",e),He("cancel",e),He("close",e);break;case"iframe":case"object":He("load",e);break;case"video":case"audio":for(s=0;s<Fs.length;s++)He(Fs[s],e);break;case"image":He("error",e),He("load",e);break;case"details":He("toggle",e);break;case"embed":case"source":case"link":He("error",e),He("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(O in n)if(n.hasOwnProperty(O)&&(s=n[O],s!=null))switch(O){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:it(e,t,O,s,n,null)}return;default:if(xo(t)){for(G in n)n.hasOwnProperty(G)&&(s=n[G],s!==void 0&&iu(e,t,G,s,n,void 0));return}}for(v in n)n.hasOwnProperty(v)&&(s=n[v],s!=null&&it(e,t,v,s,n,null))}function N1(e,t,n,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,c=null,p=null,v=null,_=null,O=null,G=null;for(L in n){var X=n[L];if(n.hasOwnProperty(L)&&X!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":_=X;default:s.hasOwnProperty(L)||it(e,t,L,null,s,X)}}for(var z in s){var L=s[z];if(X=n[z],s.hasOwnProperty(z)&&(L!=null||X!=null))switch(z){case"type":c=L;break;case"name":o=L;break;case"checked":O=L;break;case"defaultChecked":G=L;break;case"value":p=L;break;case"defaultValue":v=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(r(137,t));break;default:L!==X&&it(e,t,z,L,s,X)}}go(e,p,v,_,O,G,c,o);return;case"select":L=p=v=z=null;for(c in n)if(_=n[c],n.hasOwnProperty(c)&&_!=null)switch(c){case"value":break;case"multiple":L=_;default:s.hasOwnProperty(c)||it(e,t,c,null,s,_)}for(o in s)if(c=s[o],_=n[o],s.hasOwnProperty(o)&&(c!=null||_!=null))switch(o){case"value":z=c;break;case"defaultValue":v=c;break;case"multiple":p=c;default:c!==_&&it(e,t,o,c,s,_)}t=v,n=p,s=L,z!=null?ji(e,!!n,z,!1):!!s!=!!n&&(t!=null?ji(e,!!n,t,!0):ji(e,!!n,n?[]:"",!1));return;case"textarea":L=z=null;for(v in n)if(o=n[v],n.hasOwnProperty(v)&&o!=null&&!s.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:it(e,t,v,null,s,o)}for(p in s)if(o=s[p],c=n[p],s.hasOwnProperty(p)&&(o!=null||c!=null))switch(p){case"value":z=o;break;case"defaultValue":L=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==c&&it(e,t,p,o,s,c)}Jf(e,z,L);return;case"option":for(var le in n)if(z=n[le],n.hasOwnProperty(le)&&z!=null&&!s.hasOwnProperty(le))switch(le){case"selected":e.selected=!1;break;default:it(e,t,le,null,s,z)}for(_ in s)if(z=s[_],L=n[_],s.hasOwnProperty(_)&&z!==L&&(z!=null||L!=null))switch(_){case"selected":e.selected=z&&typeof z!="function"&&typeof z!="symbol";break;default:it(e,t,_,z,s,L)}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 xe in n)z=n[xe],n.hasOwnProperty(xe)&&z!=null&&!s.hasOwnProperty(xe)&&it(e,t,xe,null,s,z);for(O in s)if(z=s[O],L=n[O],s.hasOwnProperty(O)&&z!==L&&(z!=null||L!=null))switch(O){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(137,t));break;default:it(e,t,O,z,s,L)}return;default:if(xo(t)){for(var st in n)z=n[st],n.hasOwnProperty(st)&&z!==void 0&&!s.hasOwnProperty(st)&&iu(e,t,st,void 0,s,z);for(G in s)z=s[G],L=n[G],!s.hasOwnProperty(G)||z===L||z===void 0&&L===void 0||iu(e,t,G,z,s,L);return}}for(var R in n)z=n[R],n.hasOwnProperty(R)&&z!=null&&!s.hasOwnProperty(R)&&it(e,t,R,null,s,z);for(X in s)z=s[X],L=n[X],!s.hasOwnProperty(X)||z===L||z==null&&L==null||it(e,t,X,z,s,L)}function n0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function j1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),s=0;s<n.length;s++){var o=n[s],c=o.transferSize,p=o.initiatorType,v=o.duration;if(c&&v&&n0(p)){for(p=0,v=o.responseEnd,s+=1;s<n.length;s++){var _=n[s],O=_.startTime;if(O>v)break;var G=_.transferSize,X=_.initiatorType;G&&n0(X)&&(_=_.responseEnd,p+=G*(_<v?1:(v-O)/(_-O)))}if(--s,t+=8*(c+p)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var su=null,lu=null;function Sr(e){return e.nodeType===9?e:e.ownerDocument}function a0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function i0(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function ru(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ou=null;function V1(){var e=window.event;return e&&e.type==="popstate"?e===ou?!1:(ou=e,!0):(ou=null,!1)}var s0=typeof setTimeout=="function"?setTimeout:void 0,C1=typeof clearTimeout=="function"?clearTimeout:void 0,l0=typeof Promise=="function"?Promise:void 0,R1=typeof queueMicrotask=="function"?queueMicrotask:typeof l0<"u"?function(e){return l0.resolve(null).then(e).catch(D1)}:s0;function D1(e){setTimeout(function(){throw e})}function Ga(e){return e==="head"}function r0(e,t){var n=t,s=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"||n==="/&"){if(s===0){e.removeChild(o),rs(t);return}s--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")s++;else if(n==="html")Js(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Js(n);for(var c=n.firstChild;c;){var p=c.nextSibling,v=c.nodeName;c[E]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&c.rel.toLowerCase()==="stylesheet"||n.removeChild(c),c=p}}else n==="body"&&Js(e.ownerDocument.body);n=o}while(n);rs(t)}function o0(e,t){var n=e;e=0;do{var s=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=s}while(n)}function cu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":cu(n),ve(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function O1(e,t,n,s){for(;e.nodeType===1;){var o=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[E])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Nn(e.nextSibling),e===null)break}return null}function z1(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Nn(e.nextSibling),e===null))return null;return e}function c0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Nn(e.nextSibling),e===null))return null;return e}function uu(e){return e.data==="$?"||e.data==="$~"}function fu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function L1(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var s=function(){t(),n.removeEventListener("DOMContentLoaded",s)};n.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Nn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var du=null;function u0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Nn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function f0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function d0(e,t,n){switch(t=Sr(n),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Js(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ve(e)}var jn=new Map,h0=new Set;function Tr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var va=$.d;$.d={f:k1,r:U1,D:B1,C:H1,L:G1,m:Y1,X:I1,S:q1,M:X1};function k1(){var e=va.f(),t=hr();return e||t}function U1(e){var t=_e(e);t!==null&&t.tag===5&&t.type==="form"?Vh(t):va.r(e)}var is=typeof document>"u"?null:document;function m0(e,t,n){var s=is;if(s&&typeof t=="string"&&t){var o=Sn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof n=="string"&&(o+='[crossorigin="'+n+'"]'),h0.has(o)||(h0.add(o),e={rel:e,crossOrigin:n,href:t},s.querySelector(o)===null&&(t=s.createElement("link"),Yt(t,"link",e),we(t),s.head.appendChild(t)))}}function B1(e){va.D(e),m0("dns-prefetch",e,null)}function H1(e,t){va.C(e,t),m0("preconnect",e,t)}function G1(e,t,n){va.L(e,t,n);var s=is;if(s&&e&&t){var o='link[rel="preload"][as="'+Sn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(o+='[imagesrcset="'+Sn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(o+='[imagesizes="'+Sn(n.imageSizes)+'"]')):o+='[href="'+Sn(e)+'"]';var c=o;switch(t){case"style":c=ss(e);break;case"script":c=ls(e)}jn.has(c)||(e=S({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),jn.set(c,e),s.querySelector(o)!==null||t==="style"&&s.querySelector($s(c))||t==="script"&&s.querySelector(el(c))||(t=s.createElement("link"),Yt(t,"link",e),we(t),s.head.appendChild(t)))}}function Y1(e,t){va.m(e,t);var n=is;if(n&&e){var s=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Sn(s)+'"][href="'+Sn(e)+'"]',c=o;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=ls(e)}if(!jn.has(c)&&(e=S({rel:"modulepreload",href:e},t),jn.set(c,e),n.querySelector(o)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(el(c)))return}s=n.createElement("link"),Yt(s,"link",e),we(s),n.head.appendChild(s)}}}function q1(e,t,n){va.S(e,t,n);var s=is;if(s&&e){var o=be(s).hoistableStyles,c=ss(e);t=t||"default";var p=o.get(c);if(!p){var v={loading:0,preload:null};if(p=s.querySelector($s(c)))v.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},n),(n=jn.get(c))&&hu(e,n);var _=p=s.createElement("link");we(_),Yt(_,"link",e),_._p=new Promise(function(O,G){_.onload=O,_.onerror=G}),_.addEventListener("load",function(){v.loading|=1}),_.addEventListener("error",function(){v.loading|=2}),v.loading|=4,_r(p,t,s)}p={type:"stylesheet",instance:p,count:1,state:v},o.set(c,p)}}}function I1(e,t){va.X(e,t);var n=is;if(n&&e){var s=be(n).hoistableScripts,o=ls(e),c=s.get(o);c||(c=n.querySelector(el(o)),c||(e=S({src:e,async:!0},t),(t=jn.get(o))&&mu(e,t),c=n.createElement("script"),we(c),Yt(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(o,c))}}function X1(e,t){va.M(e,t);var n=is;if(n&&e){var s=be(n).hoistableScripts,o=ls(e),c=s.get(o);c||(c=n.querySelector(el(o)),c||(e=S({src:e,async:!0,type:"module"},t),(t=jn.get(o))&&mu(e,t),c=n.createElement("script"),we(c),Yt(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(o,c))}}function p0(e,t,n,s){var o=(o=Ne.current)?Tr(o):null;if(!o)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=ss(n.href),n=be(o).hoistableStyles,s=n.get(t),s||(s={type:"style",instance:null,count:0,state:null},n.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=ss(n.href);var c=be(o).hoistableStyles,p=c.get(e);if(p||(o=o.ownerDocument||o,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,p),(c=o.querySelector($s(e)))&&!c._p&&(p.instance=c,p.state.loading=5),jn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},jn.set(e,n),c||K1(o,e,n,p.state))),t&&s===null)throw Error(r(528,""));return p}if(t&&s!==null)throw Error(r(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ls(n),n=be(o).hoistableScripts,s=n.get(t),s||(s={type:"script",instance:null,count:0,state:null},n.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function ss(e){return'href="'+Sn(e)+'"'}function $s(e){return'link[rel="stylesheet"]['+e+"]"}function g0(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function K1(e,t,n,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),Yt(t,"link",n),we(t),e.head.appendChild(t))}function ls(e){return'[src="'+Sn(e)+'"]'}function el(e){return"script[async]"+e}function y0(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Sn(n.href)+'"]');if(s)return t.instance=s,we(s),s;var o=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),we(s),Yt(s,"style",o),_r(s,n.precedence,e),t.instance=s;case"stylesheet":o=ss(n.href);var c=e.querySelector($s(o));if(c)return t.state.loading|=4,t.instance=c,we(c),c;s=g0(n),(o=jn.get(o))&&hu(s,o),c=(e.ownerDocument||e).createElement("link"),we(c);var p=c;return p._p=new Promise(function(v,_){p.onload=v,p.onerror=_}),Yt(c,"link",s),t.state.loading|=4,_r(c,n.precedence,e),t.instance=c;case"script":return c=ls(n.src),(o=e.querySelector(el(c)))?(t.instance=o,we(o),o):(s=n,(o=jn.get(c))&&(s=S({},n),mu(s,o)),e=e.ownerDocument||e,o=e.createElement("script"),we(o),Yt(o,"link",s),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,_r(s,n.precedence,e));return t.instance}function _r(e,t,n){for(var s=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=s.length?s[s.length-1]:null,c=o,p=0;p<s.length;p++){var v=s[p];if(v.dataset.precedence===t)c=v;else if(c!==o)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function hu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function mu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ar=null;function x0(e,t,n){if(Ar===null){var s=new Map,o=Ar=new Map;o.set(n,s)}else o=Ar,s=o.get(n),s||(s=new Map,o.set(n,s));if(s.has(e))return s;for(s.set(e,null),n=n.getElementsByTagName(e),o=0;o<n.length;o++){var c=n[o];if(!(c[E]||c[Te]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var p=c.getAttribute(t)||"";p=e+p;var v=s.get(p);v?v.push(c):s.set(p,[c])}}return s}function v0(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Z1(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function b0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function P1(e,t,n,s){if(n.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var o=ss(s.href),c=t.querySelector($s(o));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Er.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=c,we(c);return}c=t.ownerDocument||t,s=g0(s),(o=jn.get(o))&&hu(s,o),c=c.createElement("link"),we(c);var p=c;p._p=new Promise(function(v,_){p.onload=v,p.onerror=_}),Yt(c,"link",s),n.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Er.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var pu=0;function Q1(e,t){return e.stylesheets&&e.count===0&&wr(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var s=setTimeout(function(){if(e.stylesheets&&wr(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&pu===0&&(pu=62500*j1());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&wr(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>pu?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(o)}}:null}function Er(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)wr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Mr=null;function wr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Mr=new Map,t.forEach(F1,e),Mr=null,Er.call(e))}function F1(e,t){if(!(t.state.loading&4)){var n=Mr.get(e);if(n)var s=n.get(null);else{n=new Map,Mr.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<o.length;c++){var p=o[c];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(n.set(p.dataset.precedence,p),s=p)}s&&n.set(null,s)}o=t.instance,p=o.getAttribute("data-precedence"),c=n.get(p)||s,c===s&&n.set(null,o),n.set(p,o),this.count++,s=Er.bind(this),o.addEventListener("load",s),o.addEventListener("error",s),c?c.parentNode.insertBefore(o,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var tl={$$typeof:P,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function W1(e,t,n,s,o,c,p,v,_){this.tag=1,this.containerInfo=e,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=ti(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ti(0),this.hiddenUpdates=ti(null),this.identifierPrefix=s,this.onUncaughtError=o,this.onCaughtError=c,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function S0(e,t,n,s,o,c,p,v,_,O,G,X){return e=new W1(e,t,n,p,_,O,G,X,v),t=1,c===!0&&(t|=24),c=dn(3,null,null,t),e.current=c,c.stateNode=e,t=Po(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:s,isDehydrated:n,cache:t},Jo(c),e}function T0(e){return e?(e=ki,e):ki}function _0(e,t,n,s,o,c){o=T0(o),s.context===null?s.context=o:s.pendingContext=o,s=Va(t),s.payload={element:n},c=c===void 0?null:c,c!==null&&(s.callback=c),n=Ca(e,s,t),n!==null&&(cn(n,e,t),Ds(n,e,t))}function A0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gu(e,t){A0(e,t),(e=e.alternate)&&A0(e,t)}function E0(e){if(e.tag===13||e.tag===31){var t=li(e,67108864);t!==null&&cn(t,e,67108864),gu(e,67108864)}}function M0(e){if(e.tag===13||e.tag===31){var t=yn();t=ue(t);var n=li(e,t);n!==null&&cn(n,e,t),gu(e,t)}}var Nr=!0;function J1(e,t,n,s){var o=U.T;U.T=null;var c=$.p;try{$.p=2,yu(e,t,n,s)}finally{$.p=c,U.T=o}}function $1(e,t,n,s){var o=U.T;U.T=null;var c=$.p;try{$.p=8,yu(e,t,n,s)}finally{$.p=c,U.T=o}}function yu(e,t,n,s){if(Nr){var o=xu(s);if(o===null)au(e,t,s,jr,n),N0(e,s);else if(tv(o,e,t,n,s))s.stopPropagation();else if(N0(e,s),t&4&&-1<ev.indexOf(e)){for(;o!==null;){var c=_e(o);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var p=na(c.pendingLanes);if(p!==0){var v=c;for(v.pendingLanes|=2,v.entangledLanes|=2;p;){var _=1<<31-ie(p);v.entanglements[1]|=_,p&=~_}Fn(c),(Qe&6)===0&&(fr=Dt()+500,Qs(0))}}break;case 31:case 13:v=li(c,2),v!==null&&cn(v,c,2),hr(),gu(c,2)}if(c=xu(s),c===null&&au(e,t,s,jr,n),c===o)break;o=c}o!==null&&s.stopPropagation()}else au(e,t,s,null,n)}}function xu(e){return e=bo(e),vu(e)}var jr=null;function vu(e){if(jr=null,e=ee(e),e!==null){var t=m(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=h(t),e!==null)return e;e=null}else if(n===31){if(e=g(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return jr=e,null}function w0(e){switch(e){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(Yn()){case Sl:return 2;case Ta:return 8;case Ja:case $a:return 32;case Tl:return 268435456;default:return 32}default:return 32}}var bu=!1,Ya=null,qa=null,Ia=null,nl=new Map,al=new Map,Xa=[],ev="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 N0(e,t){switch(e){case"focusin":case"focusout":Ya=null;break;case"dragenter":case"dragleave":qa=null;break;case"mouseover":case"mouseout":Ia=null;break;case"pointerover":case"pointerout":nl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":al.delete(t.pointerId)}}function il(e,t,n,s,o,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:n,eventSystemFlags:s,nativeEvent:c,targetContainers:[o]},t!==null&&(t=_e(t),t!==null&&E0(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function tv(e,t,n,s,o){switch(t){case"focusin":return Ya=il(Ya,e,t,n,s,o),!0;case"dragenter":return qa=il(qa,e,t,n,s,o),!0;case"mouseover":return Ia=il(Ia,e,t,n,s,o),!0;case"pointerover":var c=o.pointerId;return nl.set(c,il(nl.get(c)||null,e,t,n,s,o)),!0;case"gotpointercapture":return c=o.pointerId,al.set(c,il(al.get(c)||null,e,t,n,s,o)),!0}return!1}function j0(e){var t=ee(e.target);if(t!==null){var n=m(t);if(n!==null){if(t=n.tag,t===13){if(t=h(n),t!==null){e.blockedOn=t,ft(e.priority,function(){M0(n)});return}}else if(t===31){if(t=g(n),t!==null){e.blockedOn=t,ft(e.priority,function(){M0(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Vr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=xu(e.nativeEvent);if(n===null){n=e.nativeEvent;var s=new n.constructor(n.type,n);vo=s,n.target.dispatchEvent(s),vo=null}else return t=_e(n),t!==null&&E0(t),e.blockedOn=n,!1;t.shift()}return!0}function V0(e,t,n){Vr(e)&&n.delete(t)}function nv(){bu=!1,Ya!==null&&Vr(Ya)&&(Ya=null),qa!==null&&Vr(qa)&&(qa=null),Ia!==null&&Vr(Ia)&&(Ia=null),nl.forEach(V0),al.forEach(V0)}function Cr(e,t){e.blockedOn===t&&(e.blockedOn=null,bu||(bu=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,nv)))}var Rr=null;function C0(e){Rr!==e&&(Rr=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){Rr===e&&(Rr=null);for(var t=0;t<e.length;t+=3){var n=e[t],s=e[t+1],o=e[t+2];if(typeof s!="function"){if(vu(s||n)===null)continue;break}var c=_e(n);c!==null&&(e.splice(t,3),t-=3,xc(c,{pending:!0,data:o,method:n.method,action:s},s,o))}}))}function rs(e){function t(_){return Cr(_,e)}Ya!==null&&Cr(Ya,e),qa!==null&&Cr(qa,e),Ia!==null&&Cr(Ia,e),nl.forEach(t),al.forEach(t);for(var n=0;n<Xa.length;n++){var s=Xa[n];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Xa.length&&(n=Xa[0],n.blockedOn===null);)j0(n),n.blockedOn===null&&Xa.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(s=0;s<n.length;s+=3){var o=n[s],c=n[s+1],p=o[de]||null;if(typeof c=="function")p||C0(n);else if(p){var v=null;if(c&&c.hasAttribute("formAction")){if(o=c,p=c[de]||null)v=p.formAction;else if(vu(o)!==null)continue}else v=p.action;typeof v=="function"?n[s+1]=v:(n.splice(s,3),s-=3),C0(n)}}}function R0(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(p){return o=p})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),s||setTimeout(n,20)}function n(){if(!s&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Su(e){this._internalRoot=e}Dr.prototype.render=Su.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var n=t.current,s=yn();_0(n,s,e,t,null,null)},Dr.prototype.unmount=Su.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_0(e.current,2,null,e,null,null),hr(),t[Ee]=null}};function Dr(e){this._internalRoot=e}Dr.prototype.unstable_scheduleHydration=function(e){if(e){var t=ze();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Xa.length&&t!==0&&t<Xa[n].priority;n++);Xa.splice(n,0,e),n===0&&j0(e)}};var D0=i.version;if(D0!=="19.2.7")throw Error(r(527,D0,"19.2.7"));$.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=x(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var av={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Or=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Or.isDisabled&&Or.supportsFiber)try{qn=Or.inject(av),Xt=Or}catch{}}return ll.createRoot=function(e,t){if(!u(e))throw Error(r(299));var n=!1,s="",o=Hh,c=Gh,p=Yh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError)),t=S0(e,1,!1,null,null,n,s,null,o,c,p,R0),e[Ee]=t.current,nu(e),new Su(t)},ll.hydrateRoot=function(e,t,n){if(!u(e))throw Error(r(299));var s=!1,o="",c=Hh,p=Gh,v=Yh,_=null;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(p=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError),n.formState!==void 0&&(_=n.formState)),t=S0(e,1,!0,t,n??null,s,o,_,c,p,v,R0),t.context=T0(null),n=t.current,s=yn(),s=ue(s),o=Va(s),o.callback=null,Ca(n,o,s),n=s,t.current.lanes=n,ni(t,n),Fn(t),e[Ee]=t.current,nu(e),new Dr(t)},ll.version="19.2.7",ll}var q0;function hv(){if(q0)return Au.exports;q0=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(i){console.error(i)}}return a(),Au.exports=dv(),Au.exports}var mv=hv();const vf=V.createContext({});function bf(a){const i=V.useRef(null);return i.current===null&&(i.current=a()),i.current}const pv=typeof window<"u",Sf=pv?V.useLayoutEffect:V.useEffect,so=V.createContext(null);function Tf(a,i){a.indexOf(i)===-1&&a.push(i)}function Pr(a,i){const l=a.indexOf(i);l>-1&&a.splice(l,1)}const ta=(a,i,l)=>l>i?i:l<a?a:l;let _f=()=>{};const Qa={},ug=a=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(a),fg=a=>typeof a=="object"&&a!==null,dg=a=>/^0[^.\s]+$/u.test(a);function hg(a){let i;return()=>(i===void 0&&(i=a()),i)}const Cn=a=>a,yl=(...a)=>a.reduce((i,l)=>r=>l(i(r))),hl=(a,i,l)=>{const r=i-a;return r?(l-a)/r:1};class Af{constructor(){this.subscriptions=[]}add(i){return Tf(this.subscriptions,i),()=>Pr(this.subscriptions,i)}notify(i,l,r){const u=this.subscriptions.length;if(u)if(u===1)this.subscriptions[0](i,l,r);else for(let m=0;m<u;m++){const h=this.subscriptions[m];h&&h(i,l,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const xn=a=>a*1e3,Vn=a=>a/1e3,mg=(a,i)=>i?a*(1e3/i):0,pg=(a,i,l)=>(((1-3*l+3*i)*a+(3*l-6*i))*a+3*i)*a,gv=1e-7,yv=12;function xv(a,i,l,r,u){let m,h,g=0;do h=i+(l-i)/2,m=pg(h,r,u)-a,m>0?l=h:i=h;while(Math.abs(m)>gv&&++g<yv);return h}function xl(a,i,l,r){if(a===i&&l===r)return Cn;const u=m=>xv(m,0,1,a,l);return m=>m===0||m===1?m:pg(u(m),i,r)}const gg=a=>i=>i<=.5?a(2*i)/2:(2-a(2*(1-i)))/2,yg=a=>i=>1-a(1-i),xg=xl(.33,1.53,.69,.99),Ef=yg(xg),vg=gg(Ef),bg=a=>a>=1?1:(a*=2)<1?.5*Ef(a):.5*(2-Math.pow(2,-10*(a-1))),Mf=a=>1-Math.sin(Math.acos(a)),Sg=yg(Mf),Tg=gg(Mf),vv=xl(.42,0,1,1),bv=xl(0,0,.58,1),_g=xl(.42,0,.58,1),Sv=a=>Array.isArray(a)&&typeof a[0]!="number",Ag=a=>Array.isArray(a)&&typeof a[0]=="number",Tv={linear:Cn,easeIn:vv,easeInOut:_g,easeOut:bv,circIn:Mf,circInOut:Tg,circOut:Sg,backIn:Ef,backInOut:vg,backOut:xg,anticipate:bg},_v=a=>typeof a=="string",I0=a=>{if(Ag(a)){_f(a.length===4);const[i,l,r,u]=a;return xl(i,l,r,u)}else if(_v(a))return Tv[a];return a},zr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Av(a){let i=new Set,l=new Set,r=!1,u=!1;const m=new WeakSet;let h={delta:0,timestamp:0,isProcessing:!1};function g(x){m.has(x)&&(y.schedule(x),a()),x(h)}const y={schedule:(x,b=!1,S=!1)=>{const N=S&&r?i:l;return b&&m.add(x),N.add(x),x},cancel:x=>{l.delete(x),m.delete(x)},process:x=>{if(h=x,r){u=!0;return}r=!0;const b=i;i=l,l=b,i.forEach(g),i.clear(),r=!1,u&&(u=!1,y.process(x))}};return y}const Ev=40;function Eg(a,i){let l=!1,r=!0;const u={delta:0,timestamp:0,isProcessing:!1},m=()=>l=!0,h=zr.reduce((P,Q)=>(P[Q]=Av(m),P),{}),{setup:g,read:y,resolveKeyframes:x,preUpdate:b,update:S,preRender:T,render:N,postRender:j}=h,k=()=>{const P=Qa.useManualTiming,Q=P?u.timestamp:performance.now();l=!1,P||(u.delta=r?1e3/60:Math.max(Math.min(Q-u.timestamp,Ev),1)),u.timestamp=Q,u.isProcessing=!0,g.process(u),y.process(u),x.process(u),b.process(u),S.process(u),T.process(u),N.process(u),j.process(u),u.isProcessing=!1,l&&i&&(r=!1,a(k))},B=()=>{l=!0,r=!0,u.isProcessing||a(k)};return{schedule:zr.reduce((P,Q)=>{const W=h[Q];return P[Q]=(ce,K=!1,F=!1)=>(l||B(),W.schedule(ce,K,F)),P},{}),cancel:P=>{for(let Q=0;Q<zr.length;Q++)h[zr[Q]].cancel(P)},state:u,steps:h}}const{schedule:ct,cancel:Fa,state:qt,steps:Nu}=Eg(typeof requestAnimationFrame<"u"?requestAnimationFrame:Cn,!0);let Hr;function Mv(){Hr=void 0}const Jt={now:()=>(Hr===void 0&&Jt.set(qt.isProcessing||Qa.useManualTiming?qt.timestamp:performance.now()),Hr),set:a=>{Hr=a,queueMicrotask(Mv)}},Mg=a=>i=>typeof i=="string"&&i.startsWith(a),wg=Mg("--"),wv=Mg("var(--"),wf=a=>wv(a)?Nv.test(a.split("/*")[0].trim()):!1,Nv=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function X0(a){return typeof a!="string"?!1:a.split("/*")[0].includes("var(--")}const ms={test:a=>typeof a=="number",parse:parseFloat,transform:a=>a},ml={...ms,transform:a=>ta(0,1,a)},Lr={...ms,default:1},cl=a=>Math.round(a*1e5)/1e5,Nf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function jv(a){return a==null}const Vv=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,jf=(a,i)=>l=>!!(typeof l=="string"&&Vv.test(l)&&l.startsWith(a)||i&&!jv(l)&&Object.prototype.hasOwnProperty.call(l,i)),Ng=(a,i,l)=>r=>{if(typeof r!="string")return r;const[u,m,h,g]=r.match(Nf);return{[a]:parseFloat(u),[i]:parseFloat(m),[l]:parseFloat(h),alpha:g!==void 0?parseFloat(g):1}},Cv=a=>ta(0,255,a),ju={...ms,transform:a=>Math.round(Cv(a))},Si={test:jf("rgb","red"),parse:Ng("red","green","blue"),transform:({red:a,green:i,blue:l,alpha:r=1})=>"rgba("+ju.transform(a)+", "+ju.transform(i)+", "+ju.transform(l)+", "+cl(ml.transform(r))+")"};function Rv(a){let i="",l="",r="",u="";return a.length>5?(i=a.substring(1,3),l=a.substring(3,5),r=a.substring(5,7),u=a.substring(7,9)):(i=a.substring(1,2),l=a.substring(2,3),r=a.substring(3,4),u=a.substring(4,5),i+=i,l+=l,r+=r,u+=u),{red:parseInt(i,16),green:parseInt(l,16),blue:parseInt(r,16),alpha:u?parseInt(u,16)/255:1}}const Xu={test:jf("#"),parse:Rv,transform:Si.transform},vl=a=>({test:i=>typeof i=="string"&&i.endsWith(a)&&i.split(" ").length===1,parse:parseFloat,transform:i=>`${i}${a}`}),ba=vl("deg"),ea=vl("%"),oe=vl("px"),Dv=vl("vh"),Ov=vl("vw"),K0={...ea,parse:a=>ea.parse(a)/100,transform:a=>ea.transform(a*100)},cs={test:jf("hsl","hue"),parse:Ng("hue","saturation","lightness"),transform:({hue:a,saturation:i,lightness:l,alpha:r=1})=>"hsla("+Math.round(a)+", "+ea.transform(cl(i))+", "+ea.transform(cl(l))+", "+cl(ml.transform(r))+")"},Ct={test:a=>Si.test(a)||Xu.test(a)||cs.test(a),parse:a=>Si.test(a)?Si.parse(a):cs.test(a)?cs.parse(a):Xu.parse(a),transform:a=>typeof a=="string"?a:a.hasOwnProperty("red")?Si.transform(a):cs.transform(a),getAnimatableNone:a=>{const i=Ct.parse(a);return i.alpha=0,Ct.transform(i)}},zv=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Lv(a){var i,l;return isNaN(a)&&typeof a=="string"&&(((i=a.match(Nf))==null?void 0:i.length)||0)+(((l=a.match(zv))==null?void 0:l.length)||0)>0}const jg="number",Vg="color",kv="var",Uv="var(",Z0="${}",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 ds(a){const i=a.toString(),l=[],r={color:[],number:[],var:[]},u=[];let m=0;const g=i.replace(Bv,y=>(Ct.test(y)?(r.color.push(m),u.push(Vg),l.push(Ct.parse(y))):y.startsWith(Uv)?(r.var.push(m),u.push(kv),l.push(y)):(r.number.push(m),u.push(jg),l.push(parseFloat(y))),++m,Z0)).split(Z0);return{values:l,split:g,indexes:r,types:u}}function Hv(a){return ds(a).values}function Cg({split:a,types:i}){const l=a.length;return r=>{let u="";for(let m=0;m<l;m++)if(u+=a[m],r[m]!==void 0){const h=i[m];h===jg?u+=cl(r[m]):h===Vg?u+=Ct.transform(r[m]):u+=r[m]}return u}}function Gv(a){return Cg(ds(a))}const Yv=a=>typeof a=="number"?0:Ct.test(a)?Ct.getAnimatableNone(a):a,qv=(a,i)=>typeof a=="number"?i!=null&&i.trim().endsWith("/")?a:0:Yv(a);function Iv(a){const i=ds(a);return Cg(i)(i.values.map((r,u)=>qv(r,i.split[u])))}const Bn={test:Lv,parse:Hv,createTransformer:Gv,getAnimatableNone:Iv};function Vu(a,i,l){return l<0&&(l+=1),l>1&&(l-=1),l<1/6?a+(i-a)*6*l:l<1/2?i:l<2/3?a+(i-a)*(2/3-l)*6:a}function Xv({hue:a,saturation:i,lightness:l,alpha:r}){a/=360,i/=100,l/=100;let u=0,m=0,h=0;if(!i)u=m=h=l;else{const g=l<.5?l*(1+i):l+i-l*i,y=2*l-g;u=Vu(y,g,a+1/3),m=Vu(y,g,a),h=Vu(y,g,a-1/3)}return{red:Math.round(u*255),green:Math.round(m*255),blue:Math.round(h*255),alpha:r}}function Qr(a,i){return l=>l>0?i:a}const ot=(a,i,l)=>a+(i-a)*l,Cu=(a,i,l)=>{const r=a*a,u=l*(i*i-r)+r;return u<0?0:Math.sqrt(u)},Kv=[Xu,Si,cs],Zv=a=>Kv.find(i=>i.test(a));function P0(a){const i=Zv(a);if(!i)return!1;let l=i.parse(a);return i===cs&&(l=Xv(l)),l}const Q0=(a,i)=>{const l=P0(a),r=P0(i);if(!l||!r)return Qr(a,i);const u={...l};return m=>(u.red=Cu(l.red,r.red,m),u.green=Cu(l.green,r.green,m),u.blue=Cu(l.blue,r.blue,m),u.alpha=ot(l.alpha,r.alpha,m),Si.transform(u))},Ku=new Set(["none","hidden"]);function Pv(a,i){return Ku.has(a)?l=>l<=0?a:i:l=>l>=1?i:a}function Qv(a,i){return l=>ot(a,i,l)}function Vf(a){return typeof a=="number"?Qv:typeof a=="string"?wf(a)?Qr:Ct.test(a)?Q0:Jv:Array.isArray(a)?Rg:typeof a=="object"?Ct.test(a)?Q0:Fv:Qr}function Rg(a,i){const l=[...a],r=l.length,u=a.map((m,h)=>Vf(m)(m,i[h]));return m=>{for(let h=0;h<r;h++)l[h]=u[h](m);return l}}function Fv(a,i){const l={...a,...i},r={};for(const u in l)a[u]!==void 0&&i[u]!==void 0&&(r[u]=Vf(a[u])(a[u],i[u]));return u=>{for(const m in r)l[m]=r[m](u);return l}}function Wv(a,i){const l=[],r={color:0,var:0,number:0};for(let u=0;u<i.values.length;u++){const m=i.types[u],h=a.indexes[m][r[m]],g=a.values[h]??0;l[u]=g,r[m]++}return l}const Jv=(a,i)=>{const l=Bn.createTransformer(i),r=ds(a),u=ds(i);return r.indexes.var.length===u.indexes.var.length&&r.indexes.color.length===u.indexes.color.length&&r.indexes.number.length>=u.indexes.number.length?Ku.has(a)&&!u.values.length||Ku.has(i)&&!r.values.length?Pv(a,i):yl(Rg(Wv(r,u),u.values),l):Qr(a,i)};function Dg(a,i,l){return typeof a=="number"&&typeof i=="number"&&typeof l=="number"?ot(a,i,l):Vf(a)(a,i)}const $v=a=>{const i=({timestamp:l})=>a(l);return{start:(l=!0)=>ct.update(i,l),stop:()=>Fa(i),now:()=>qt.isProcessing?qt.timestamp:Jt.now()}},Og=(a,i,l=10)=>{let r="";const u=Math.max(Math.round(i/l),2);for(let m=0;m<u;m++)r+=Math.round(a(m/(u-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Fr=2e4;function Cf(a){let i=0;const l=50;let r=a.next(i);for(;!r.done&&i<Fr;)i+=l,r=a.next(i);return i>=Fr?1/0:i}function eb(a,i=100,l){const r=l({...a,keyframes:[0,i]}),u=Math.min(Cf(r),Fr);return{type:"keyframes",ease:m=>r.next(u*m).value/i,duration:Vn(u)}}const Tt={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 Zu(a,i){return a*Math.sqrt(1-i*i)}const tb=12;function nb(a,i,l){let r=l;for(let u=1;u<tb;u++)r=r-a(r)/i(r);return r}const Ru=.001;function ab({duration:a=Tt.duration,bounce:i=Tt.bounce,velocity:l=Tt.velocity,mass:r=Tt.mass}){let u,m,h=1-i;h=ta(Tt.minDamping,Tt.maxDamping,h),a=ta(Tt.minDuration,Tt.maxDuration,Vn(a)),h<1?(u=x=>{const b=x*h,S=b*a,T=b-l,N=Zu(x,h),j=Math.exp(-S);return Ru-T/N*j},m=x=>{const S=x*h*a,T=S*l+l,N=Math.pow(h,2)*Math.pow(x,2)*a,j=Math.exp(-S),k=Zu(Math.pow(x,2),h);return(-u(x)+Ru>0?-1:1)*((T-N)*j)/k}):(u=x=>{const b=Math.exp(-x*a),S=(x-l)*a+1;return-Ru+b*S},m=x=>{const b=Math.exp(-x*a),S=(l-x)*(a*a);return b*S});const g=5/a,y=nb(u,m,g);if(a=xn(a),isNaN(y))return{stiffness:Tt.stiffness,damping:Tt.damping,duration:a};{const x=Math.pow(y,2)*r;return{stiffness:x,damping:h*2*Math.sqrt(r*x),duration:a}}}const ib=["duration","bounce"],sb=["stiffness","damping","mass"];function F0(a,i){return i.some(l=>a[l]!==void 0)}function lb(a){let i={velocity:Tt.velocity,stiffness:Tt.stiffness,damping:Tt.damping,mass:Tt.mass,isResolvedFromDuration:!1,...a};if(!F0(a,sb)&&F0(a,ib))if(i.velocity=0,a.visualDuration){const l=a.visualDuration,r=2*Math.PI/(l*1.2),u=r*r,m=2*ta(.05,1,1-(a.bounce||0))*Math.sqrt(u);i={...i,mass:Tt.mass,stiffness:u,damping:m}}else{const l=ab({...a,velocity:0});i={...i,...l,mass:Tt.mass},i.isResolvedFromDuration=!0}return i}function Wr(a=Tt.visualDuration,i=Tt.bounce){const l=typeof a!="object"?{visualDuration:a,keyframes:[0,1],bounce:i}:a;let{restSpeed:r,restDelta:u}=l;const m=l.keyframes[0],h=l.keyframes[l.keyframes.length-1],g={done:!1,value:m},{stiffness:y,damping:x,mass:b,duration:S,velocity:T,isResolvedFromDuration:N}=lb({...l,velocity:-Vn(l.velocity||0)}),j=T||0,k=x/(2*Math.sqrt(y*b)),B=h-m,Y=Vn(Math.sqrt(y/b)),Z=Math.abs(B)<5;r||(r=Z?Tt.restSpeed.granular:Tt.restSpeed.default),u||(u=Z?Tt.restDelta.granular:Tt.restDelta.default);let P,Q,W,ce,K,F;if(k<1)W=Zu(Y,k),ce=(j+k*Y*B)/W,P=fe=>{const Le=Math.exp(-k*Y*fe);return h-Le*(ce*Math.sin(W*fe)+B*Math.cos(W*fe))},K=k*Y*ce+B*W,F=k*Y*B-ce*W,Q=fe=>Math.exp(-k*Y*fe)*(K*Math.sin(W*fe)+F*Math.cos(W*fe));else if(k===1){P=Le=>h-Math.exp(-Y*Le)*(B+(j+Y*B)*Le);const fe=j+Y*B;Q=Le=>Math.exp(-Y*Le)*(Y*fe*Le-j)}else{const fe=Y*Math.sqrt(k*k-1);P=lt=>{const et=Math.exp(-k*Y*lt),U=Math.min(fe*lt,300);return h-et*((j+k*Y*B)*Math.sinh(U)+fe*B*Math.cosh(U))/fe};const Le=(j+k*Y*B)/fe,Me=k*Y*Le-B*fe,Fe=k*Y*B-Le*fe;Q=lt=>{const et=Math.exp(-k*Y*lt),U=Math.min(fe*lt,300);return et*(Me*Math.sinh(U)+Fe*Math.cosh(U))}}const ae={calculatedDuration:N&&S||null,velocity:fe=>xn(Q(fe)),next:fe=>{if(!N&&k<1){const Me=Math.exp(-k*Y*fe),Fe=Math.sin(W*fe),lt=Math.cos(W*fe),et=h-Me*(ce*Fe+B*lt),U=xn(Me*(K*Fe+F*lt));return g.done=Math.abs(U)<=r&&Math.abs(h-et)<=u,g.value=g.done?h:et,g}const Le=P(fe);if(N)g.done=fe>=S;else{const Me=xn(Q(fe));g.done=Math.abs(Me)<=r&&Math.abs(h-Le)<=u}return g.value=g.done?h:Le,g},toString:()=>{const fe=Math.min(Cf(ae),Fr),Le=Og(Me=>ae.next(fe*Me).value,fe,30);return fe+"ms "+Le},toTransition:()=>{}};return ae}Wr.applyToOptions=a=>{const i=eb(a,100,Wr);return a.ease=i.ease,a.duration=xn(i.duration),a.type="keyframes",a};const rb=5;function zg(a,i,l){const r=Math.max(i-rb,0);return mg(l-a(r),i-r)}function Pu({keyframes:a,velocity:i=0,power:l=.8,timeConstant:r=325,bounceDamping:u=10,bounceStiffness:m=500,modifyTarget:h,min:g,max:y,restDelta:x=.5,restSpeed:b}){const S=a[0],T={done:!1,value:S},N=F=>g!==void 0&&F<g||y!==void 0&&F>y,j=F=>g===void 0?y:y===void 0||Math.abs(g-F)<Math.abs(y-F)?g:y;let k=l*i;const B=S+k,Y=h===void 0?B:h(B);Y!==B&&(k=Y-S);const Z=F=>-k*Math.exp(-F/r),P=F=>Y+Z(F),Q=F=>{const ae=Z(F),fe=P(F);T.done=Math.abs(ae)<=x,T.value=T.done?Y:fe};let W,ce;const K=F=>{N(T.value)&&(W=F,ce=Wr({keyframes:[T.value,j(T.value)],velocity:zg(P,F,T.value),damping:u,stiffness:m,restDelta:x,restSpeed:b}))};return K(0),{calculatedDuration:null,next:F=>{let ae=!1;return!ce&&W===void 0&&(ae=!0,Q(F),K(F)),W!==void 0&&F>=W?ce.next(F-W):(!ae&&Q(F),T)}}}function ob(a,i,l){const r=[],u=l||Qa.mix||Dg,m=a.length-1;for(let h=0;h<m;h++){let g=u(a[h],a[h+1]);if(i){const y=Array.isArray(i)?i[h]||Cn:i;g=yl(y,g)}r.push(g)}return r}function cb(a,i,{clamp:l=!0,ease:r,mixer:u}={}){const m=a.length;if(_f(m===i.length),m===1)return()=>i[0];if(m===2&&i[0]===i[1])return()=>i[1];const h=a[0]===a[1];a[0]>a[m-1]&&(a=[...a].reverse(),i=[...i].reverse());const g=ob(i,r,u),y=g.length,x=b=>{if(h&&b<a[0])return i[0];let S=0;if(y>1)for(;S<a.length-2&&!(b<a[S+1]);S++);const T=hl(a[S],a[S+1],b);return g[S](T)};return l?b=>x(ta(a[0],a[m-1],b)):x}function ub(a,i){const l=a[a.length-1];for(let r=1;r<=i;r++){const u=hl(0,i,r);a.push(ot(l,1,u))}}function fb(a){const i=[0];return ub(i,a.length-1),i}function db(a,i){return a.map(l=>l*i)}function hb(a,i){return a.map(()=>i||_g).splice(0,a.length-1)}function ul({duration:a=300,keyframes:i,times:l,ease:r="easeInOut"}){const u=Sv(r)?r.map(I0):I0(r),m={done:!1,value:i[0]},h=db(l&&l.length===i.length?l:fb(i),a),g=cb(h,i,{ease:Array.isArray(u)?u:hb(i,u)});return{calculatedDuration:a,next:y=>(m.value=g(y),m.done=y>=a,m)}}const mb=a=>a!==null;function lo(a,{repeat:i,repeatType:l="loop"},r,u=1){const m=a.filter(mb),g=u<0||i&&l!=="loop"&&i%2===1?0:m.length-1;return!g||r===void 0?m[g]:r}const pb={decay:Pu,inertia:Pu,tween:ul,keyframes:ul,spring:Wr};function Lg(a){typeof a.type=="string"&&(a.type=pb[a.type])}class Rf{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(i=>{this.resolve=i})}notifyFinished(){this.resolve()}then(i,l){return this.finished.then(i,l)}}const gb=a=>a/100;class Jr extends Rf{constructor(i){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 r,u;const{motionValue:l}=this.options;l&&l.updatedAt!==Jt.now()&&this.tick(Jt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(u=(r=this.options).onStop)==null||u.call(r))},this.options=i,this.initAnimation(),this.play(),i.autoplay===!1&&this.pause()}initAnimation(){const{options:i}=this;Lg(i);const{type:l=ul,repeat:r=0,repeatDelay:u=0,repeatType:m,velocity:h=0}=i;let{keyframes:g}=i;const y=l||ul;y!==ul&&typeof g[0]!="number"&&(this.mixKeyframes=yl(gb,Dg(g[0],g[1])),g=[0,100]);const x=y({...i,keyframes:g});m==="mirror"&&(this.mirroredGenerator=y({...i,keyframes:[...g].reverse(),velocity:-h})),x.calculatedDuration===null&&(x.calculatedDuration=Cf(x));const{calculatedDuration:b}=x;this.calculatedDuration=b,this.resolvedDuration=b+u,this.totalDuration=this.resolvedDuration*(r+1)-u,this.generator=x}updateTime(i){const l=Math.round(i-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=l}tick(i,l=!1){const{generator:r,totalDuration:u,mixKeyframes:m,mirroredGenerator:h,resolvedDuration:g,calculatedDuration:y}=this;if(this.startTime===null)return r.next(0);const{delay:x=0,keyframes:b,repeat:S,repeatType:T,repeatDelay:N,type:j,onUpdate:k,finalKeyframe:B}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,i):this.speed<0&&(this.startTime=Math.min(i-u/this.speed,this.startTime)),l?this.currentTime=i:this.updateTime(i);const Y=this.currentTime-x*(this.playbackSpeed>=0?1:-1),Z=this.playbackSpeed>=0?Y<0:Y>u;this.currentTime=Math.max(Y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let P=this.currentTime,Q=r;if(S){const F=Math.min(this.currentTime,u)/g;let ae=Math.floor(F),fe=F%1;!fe&&F>=1&&(fe=1),fe===1&&ae--,ae=Math.min(ae,S+1),!!(ae%2)&&(T==="reverse"?(fe=1-fe,N&&(fe-=N/g)):T==="mirror"&&(Q=h)),P=ta(0,1,fe)*g}let W;Z?(this.delayState.value=b[0],W=this.delayState):W=Q.next(P),m&&!Z&&(W.value=m(W.value));let{done:ce}=W;!Z&&y!==null&&(ce=this.playbackSpeed>=0?this.currentTime>=u:this.currentTime<=0);const K=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&ce);return K&&j!==Pu&&(W.value=lo(b,this.options,B,this.speed)),k&&k(W.value),K&&this.finish(),W}then(i,l){return this.finished.then(i,l)}get duration(){return Vn(this.calculatedDuration)}get iterationDuration(){const{delay:i=0}=this.options||{};return this.duration+Vn(i)}get time(){return Vn(this.currentTime)}set time(i){i=xn(i),this.currentTime=i,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=i:this.driver&&(this.startTime=this.driver.now()-i/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=i,this.tick(i))}getGeneratorVelocity(){const i=this.currentTime;if(i<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(i);const l=this.generator.next(i).value;return zg(r=>this.generator.next(r).value,i,l)}get speed(){return this.playbackSpeed}set speed(i){const l=this.playbackSpeed!==i;l&&this.driver&&this.updateTime(Jt.now()),this.playbackSpeed=i,l&&this.driver&&(this.time=Vn(this.currentTime))}play(){var u,m;if(this.isStopped)return;const{driver:i=$v,startTime:l}=this.options;this.driver||(this.driver=i(h=>this.tick(h))),(m=(u=this.options).onPlay)==null||m.call(u);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=l??r),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(Jt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var i,l;this.notifyFinished(),this.teardown(),this.state="finished",(l=(i=this.options).onComplete)==null||l.call(i)}cancel(){var i,l;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(l=(i=this.options).onCancel)==null||l.call(i)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(i){return this.startTime=0,this.tick(i,!0)}attachTimeline(i){var l;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(l=this.driver)==null||l.stop(),i.observe(this)}}function yb(a){for(let i=1;i<a.length;i++)a[i]??(a[i]=a[i-1])}const Ti=a=>a*180/Math.PI,Qu=a=>{const i=Ti(Math.atan2(a[1],a[0]));return Fu(i)},xb={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:a=>(Math.abs(a[0])+Math.abs(a[3]))/2,rotate:Qu,rotateZ:Qu,skewX:a=>Ti(Math.atan(a[1])),skewY:a=>Ti(Math.atan(a[2])),skew:a=>(Math.abs(a[1])+Math.abs(a[2]))/2},Fu=a=>(a=a%360,a<0&&(a+=360),a),W0=Qu,J0=a=>Math.sqrt(a[0]*a[0]+a[1]*a[1]),$0=a=>Math.sqrt(a[4]*a[4]+a[5]*a[5]),vb={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:J0,scaleY:$0,scale:a=>(J0(a)+$0(a))/2,rotateX:a=>Fu(Ti(Math.atan2(a[6],a[5]))),rotateY:a=>Fu(Ti(Math.atan2(-a[2],a[0]))),rotateZ:W0,rotate:W0,skewX:a=>Ti(Math.atan(a[4])),skewY:a=>Ti(Math.atan(a[1])),skew:a=>(Math.abs(a[1])+Math.abs(a[4]))/2};function Wu(a){return a.includes("scale")?1:0}function Ju(a,i){if(!a||a==="none")return Wu(i);const l=a.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,u;if(l)r=vb,u=l;else{const g=a.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=xb,u=g}if(!u)return Wu(i);const m=r[i],h=u[1].split(",").map(Sb);return typeof m=="function"?m(h):h[m]}const bb=(a,i)=>{const{transform:l="none"}=getComputedStyle(a);return Ju(l,i)};function Sb(a){return parseFloat(a.trim())}const ps=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],gs=new Set([...ps,"pathRotation"]),ep=a=>a===ms||a===oe,Tb=new Set(["x","y","z"]),_b=ps.filter(a=>!Tb.has(a));function Ab(a){const i=[];return _b.forEach(l=>{const r=a.getValue(l);r!==void 0&&(i.push([l,r.get()]),r.set(l.startsWith("scale")?1:0))}),i}const Pa={width:({x:a},{paddingLeft:i="0",paddingRight:l="0",boxSizing:r})=>{const u=a.max-a.min;return r==="border-box"?u:u-parseFloat(i)-parseFloat(l)},height:({y:a},{paddingTop:i="0",paddingBottom:l="0",boxSizing:r})=>{const u=a.max-a.min;return r==="border-box"?u:u-parseFloat(i)-parseFloat(l)},top:(a,{top:i})=>parseFloat(i),left:(a,{left:i})=>parseFloat(i),bottom:({y:a},{top:i})=>parseFloat(i)+(a.max-a.min),right:({x:a},{left:i})=>parseFloat(i)+(a.max-a.min),x:(a,{transform:i})=>Ju(i,"x"),y:(a,{transform:i})=>Ju(i,"y")};Pa.translateX=Pa.x;Pa.translateY=Pa.y;const _i=new Set;let $u=!1,ef=!1,tf=!1;function kg(){if(ef){const a=Array.from(_i).filter(r=>r.needsMeasurement),i=new Set(a.map(r=>r.element)),l=new Map;i.forEach(r=>{const u=Ab(r);u.length&&(l.set(r,u),r.render())}),a.forEach(r=>r.measureInitialState()),i.forEach(r=>{r.render();const u=l.get(r);u&&u.forEach(([m,h])=>{var g;(g=r.getValue(m))==null||g.set(h)})}),a.forEach(r=>r.measureEndState()),a.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ef=!1,$u=!1,_i.forEach(a=>a.complete(tf)),_i.clear()}function Ug(){_i.forEach(a=>{a.readKeyframes(),a.needsMeasurement&&(ef=!0)})}function Eb(){tf=!0,Ug(),kg(),tf=!1}class Df{constructor(i,l,r,u,m,h=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...i],this.onComplete=l,this.name=r,this.motionValue=u,this.element=m,this.isAsync=h}scheduleResolve(){this.state="scheduled",this.isAsync?(_i.add(this),$u||($u=!0,ct.read(Ug),ct.resolveKeyframes(kg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:i,name:l,element:r,motionValue:u}=this;if(i[0]===null){const m=u==null?void 0:u.get(),h=i[i.length-1];if(m!==void 0)i[0]=m;else if(r&&l){const g=r.readValue(l,h);g!=null&&(i[0]=g)}i[0]===void 0&&(i[0]=h),u&&m===void 0&&u.set(i[0])}yb(i)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(i=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,i),_i.delete(this)}cancel(){this.state==="scheduled"&&(_i.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Mb=a=>a.startsWith("--");function Bg(a,i,l){Mb(i)?a.style.setProperty(i,l):a.style[i]=l}const wb={};function Hg(a,i){const l=hg(a);return()=>wb[i]??l()}const Nb=Hg(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Gg=Hg(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ol=([a,i,l,r])=>`cubic-bezier(${a}, ${i}, ${l}, ${r})`,tp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ol([0,.65,.55,1]),circOut:ol([.55,0,1,.45]),backIn:ol([.31,.01,.66,-.59]),backOut:ol([.33,1.53,.69,.99])};function Yg(a,i){if(a)return typeof a=="function"?Gg()?Og(a,i):"ease-out":Ag(a)?ol(a):Array.isArray(a)?a.map(l=>Yg(l,i)||tp.easeOut):tp[a]}function jb(a,i,l,{delay:r=0,duration:u=300,repeat:m=0,repeatType:h="loop",ease:g="easeOut",times:y}={},x=void 0){const b={[i]:l};y&&(b.offset=y);const S=Yg(g,u);Array.isArray(S)&&(b.easing=S);const T={delay:r,duration:u,easing:Array.isArray(S)?"linear":S,fill:"both",iterations:m+1,direction:h==="reverse"?"alternate":"normal"};return x&&(T.pseudoElement=x),a.animate(b,T)}function qg(a){return typeof a=="function"&&"applyToOptions"in a}function Vb({type:a,...i}){return qg(a)&&Gg()?a.applyToOptions(i):(i.duration??(i.duration=300),i.ease??(i.ease="easeOut"),i)}class Ig extends Rf{constructor(i){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!i)return;const{element:l,name:r,keyframes:u,pseudoElement:m,allowFlatten:h=!1,finalKeyframe:g,onComplete:y}=i;this.isPseudoElement=!!m,this.allowFlatten=h,this.options=i,_f(typeof i.type!="string");const x=Vb(i);this.animation=jb(l,r,u,x,m),x.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!m){const b=lo(u,this.options,g,this.speed);this.updateMotionValue&&this.updateMotionValue(b),Bg(l,r,b),this.animation.cancel()}y==null||y(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var i,l;(l=(i=this.animation).finish)==null||l.call(i)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:i}=this;i==="idle"||i==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var l,r,u;const i=(l=this.options)==null?void 0:l.element;!this.isPseudoElement&&(i!=null&&i.isConnected)&&((u=(r=this.animation).commitStyles)==null||u.call(r))}get duration(){var l,r;const i=((r=(l=this.animation.effect)==null?void 0:l.getComputedTiming)==null?void 0:r.call(l).duration)||0;return Vn(Number(i))}get iterationDuration(){const{delay:i=0}=this.options||{};return this.duration+Vn(i)}get time(){return Vn(Number(this.animation.currentTime)||0)}set time(i){const l=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=xn(i),l&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(i){i<0&&(this.finishedTime=null),this.animation.playbackRate=i}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(i){this.manualStartTime=this.animation.startTime=i}attachTimeline({timeline:i,rangeStart:l,rangeEnd:r,observe:u}){var m;return this.allowFlatten&&((m=this.animation.effect)==null||m.updateTiming({easing:"linear"})),this.animation.onfinish=null,i&&Nb()?(this.animation.timeline=i,l&&(this.animation.rangeStart=l),r&&(this.animation.rangeEnd=r),Cn):u(this)}}const Xg={anticipate:bg,backInOut:vg,circInOut:Tg};function Cb(a){return a in Xg}function Rb(a){typeof a.ease=="string"&&Cb(a.ease)&&(a.ease=Xg[a.ease])}const Du=10;class Db extends Ig{constructor(i){Rb(i),Lg(i),super(i),i.startTime!==void 0&&i.autoplay!==!1&&(this.startTime=i.startTime),this.options=i}updateMotionValue(i){const{motionValue:l,onUpdate:r,onComplete:u,element:m,...h}=this.options;if(!l)return;if(i!==void 0){l.set(i);return}const g=new Jr({...h,autoplay:!1}),y=Math.max(Du,Jt.now()-this.startTime),x=ta(0,Du,y-Du),b=g.sample(y).value,{name:S}=this.options;m&&S&&Bg(m,S,b),l.setWithVelocity(g.sample(Math.max(0,y-x)).value,b,x),g.stop()}}const np=(a,i)=>i==="zIndex"?!1:!!(typeof a=="number"||Array.isArray(a)||typeof a=="string"&&(Bn.test(a)||a==="0")&&!a.startsWith("url("));function Ob(a){const i=a[0];if(a.length===1)return!0;for(let l=0;l<a.length;l++)if(a[l]!==i)return!0}function zb(a,i,l,r){const u=a[0];if(u===null)return!1;if(i==="display"||i==="visibility")return!0;const m=a[a.length-1],h=np(u,i),g=np(m,i);return!h||!g?!1:Ob(a)||(l==="spring"||qg(l))&&r}function nf(a){a.duration=0,a.type="keyframes"}const Kg=new Set(["opacity","clipPath","filter","transform"]),Lb=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function kb(a){for(let i=0;i<a.length;i++)if(typeof a[i]=="string"&&Lb.test(a[i]))return!0;return!1}const Ub=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Bb=hg(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Hb(a){var S;const{motionValue:i,name:l,repeatDelay:r,repeatType:u,damping:m,type:h,keyframes:g}=a;if(!(((S=i==null?void 0:i.owner)==null?void 0:S.current)instanceof HTMLElement))return!1;const{onUpdate:x,transformTemplate:b}=i.owner.getProps();return Bb()&&l&&(Kg.has(l)||Ub.has(l)&&kb(g))&&(l!=="transform"||!b)&&!x&&!r&&u!=="mirror"&&m!==0&&h!=="inertia"}const Gb=40;class Yb extends Rf{constructor({autoplay:i=!0,delay:l=0,type:r="keyframes",repeat:u=0,repeatDelay:m=0,repeatType:h="loop",keyframes:g,name:y,motionValue:x,element:b,...S}){var j;super(),this.stop=()=>{var k,B;this._animation&&(this._animation.stop(),(k=this.stopTimeline)==null||k.call(this)),(B=this.keyframeResolver)==null||B.cancel()},this.createdAt=Jt.now();const T={autoplay:i,delay:l,type:r,repeat:u,repeatDelay:m,repeatType:h,name:y,motionValue:x,element:b,...S},N=(b==null?void 0:b.KeyframeResolver)||Df;this.keyframeResolver=new N(g,(k,B,Y)=>this.onKeyframesResolved(k,B,T,!Y),y,x,b),(j=this.keyframeResolver)==null||j.scheduleResolve()}onKeyframesResolved(i,l,r,u){var Y,Z;this.keyframeResolver=void 0;const{name:m,type:h,velocity:g,delay:y,isHandoff:x,onUpdate:b}=r;this.resolvedAt=Jt.now();let S=!0;zb(i,m,h,g)||(S=!1,(Qa.instantAnimations||!y)&&(b==null||b(lo(i,r,l))),i[0]=i[i.length-1],nf(r),r.repeat=0);const N={startTime:u?this.resolvedAt?this.resolvedAt-this.createdAt>Gb?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:l,...r,keyframes:i},j=S&&!x&&Hb(N),k=(Z=(Y=N.motionValue)==null?void 0:Y.owner)==null?void 0:Z.current;let B;if(j)try{B=new Db({...N,element:k})}catch{B=new Jr(N)}else B=new Jr(N);B.finished.then(()=>{this.notifyFinished()}).catch(Cn),this.pendingTimeline&&(this.stopTimeline=B.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=B}get finished(){return this._animation?this.animation.finished:this._finished}then(i,l){return this.finished.finally(i).then(()=>{})}get animation(){var i;return this._animation||((i=this.keyframeResolver)==null||i.resume(),Eb()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(i){this.animation.time=i}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(i){this.animation.speed=i}get startTime(){return this.animation.startTime}attachTimeline(i){return this._animation?this.stopTimeline=this.animation.attachTimeline(i):this.pendingTimeline=i,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var i;this._animation&&this.animation.cancel(),(i=this.keyframeResolver)==null||i.cancel()}}function Zg(a,i,l,r=0,u=1){const m=Array.from(a).sort((x,b)=>x.sortNodePosition(b)).indexOf(i),h=a.size,g=(h-1)*r;return typeof l=="function"?l(m,h):u===1?m*r:g-m*r}const ap=30,qb=a=>!isNaN(parseFloat(a));class Ib{constructor(i,l={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var m;const u=Jt.now();if(this.updatedAt!==u&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((m=this.events.change)==null||m.notify(this.current),this.dependents))for(const h of this.dependents)h.dirty()},this.hasAnimated=!1,this.setCurrent(i),this.owner=l.owner}setCurrent(i){this.current=i,this.updatedAt=Jt.now(),this.canTrackVelocity===null&&i!==void 0&&(this.canTrackVelocity=qb(this.current))}setPrevFrameValue(i=this.current){this.prevFrameValue=i,this.prevUpdatedAt=this.updatedAt}onChange(i){return this.on("change",i)}on(i,l){this.events[i]||(this.events[i]=new Af);const r=this.events[i].add(l);return i==="change"?()=>{r(),ct.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const i in this.events)this.events[i].clear()}attach(i,l){this.passiveEffect=i,this.stopPassiveEffect=l}set(i){this.passiveEffect?this.passiveEffect(i,this.updateAndNotify):this.updateAndNotify(i)}setWithVelocity(i,l,r){this.set(l),this.prev=void 0,this.prevFrameValue=i,this.prevUpdatedAt=this.updatedAt-r}jump(i,l=!0){this.updateAndNotify(i),this.prev=i,this.prevUpdatedAt=this.prevFrameValue=void 0,l&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var i;(i=this.events.change)==null||i.notify(this.current)}addDependent(i){this.dependents||(this.dependents=new Set),this.dependents.add(i)}removeDependent(i){this.dependents&&this.dependents.delete(i)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const i=Jt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||i-this.updatedAt>ap)return 0;const l=Math.min(this.updatedAt-this.prevUpdatedAt,ap);return mg(parseFloat(this.current)-parseFloat(this.prevFrameValue),l)}start(i){return this.stop(),new Promise(l=>{this.hasAnimated=!0,this.animation=i(l),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 i,l;(i=this.dependents)==null||i.clear(),(l=this.events.destroy)==null||l.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function hs(a,i){return new Ib(a,i)}function Pg(a,i){if(a!=null&&a.inherit&&i){const{inherit:l,...r}=a;return{...i,...r}}return a}function Of(a,i){const l=(a==null?void 0:a[i])??(a==null?void 0:a.default)??a;return l!==a?Pg(l,a):l}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},Pb={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Qb=(a,{keyframes:i})=>i.length>2?Zb:gs.has(a)?a.startsWith("scale")?Kb(i[1]):Xb:Pb,Fb=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Wb(a){for(const i in a)if(!Fb.has(i))return!0;return!1}const zf=(a,i,l,r={},u,m)=>h=>{const g=Of(r,a)||{},y=g.delay||r.delay||0;let{elapsed:x=0}=r;x=x-xn(y);const b={keyframes:Array.isArray(l)?l:[null,l],ease:"easeOut",velocity:i.getVelocity(),...g,delay:-x,onUpdate:T=>{i.set(T),g.onUpdate&&g.onUpdate(T)},onComplete:()=>{h(),g.onComplete&&g.onComplete()},name:a,motionValue:i,element:m?void 0:u};Wb(g)||Object.assign(b,Qb(a,b)),b.duration&&(b.duration=xn(b.duration)),b.repeatDelay&&(b.repeatDelay=xn(b.repeatDelay)),b.from!==void 0&&(b.keyframes[0]=b.from);let S=!1;if((b.type===!1||b.duration===0&&!b.repeatDelay)&&(nf(b),b.delay===0&&(S=!0)),(Qa.instantAnimations||Qa.skipAnimations||u!=null&&u.shouldSkipAnimations||g.skipAnimations)&&(S=!0,nf(b),b.delay=0),b.allowFlatten=!g.type&&!g.ease,S&&!m&&i.get()!==void 0){const T=lo(b.keyframes,g);if(T!==void 0){ct.update(()=>{b.onUpdate(T),b.onComplete()});return}}return g.isSync?new Jr(b):new Yb(b)},Jb=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $b(a){const i=Jb.exec(a);if(!i)return[,];const[,l,r,u]=i;return[`--${l??r}`,u]}function Qg(a,i,l=1){const[r,u]=$b(a);if(!r)return;const m=window.getComputedStyle(i).getPropertyValue(r);if(m){const h=m.trim();return ug(h)?parseFloat(h):h}return wf(u)?Qg(u,i,l+1):u}function ip(a){const i=[{},{}];return a==null||a.values.forEach((l,r)=>{i[0][r]=l.get(),i[1][r]=l.getVelocity()}),i}function Lf(a,i,l,r){if(typeof i=="function"){const[u,m]=ip(r);i=i(l!==void 0?l:a.custom,u,m)}if(typeof i=="string"&&(i=a.variants&&a.variants[i]),typeof i=="function"){const[u,m]=ip(r);i=i(l!==void 0?l:a.custom,u,m)}return i}function Ai(a,i,l){const r=a.getProps();return Lf(r,i,l!==void 0?l:r.custom,a)}const Fg=new Set(["width","height","top","left","right","bottom",...ps]),af=a=>Array.isArray(a);function e2(a,i,l){a.hasValue(i)?a.getValue(i).set(l):a.addValue(i,hs(l))}function t2(a){return af(a)?a[a.length-1]||0:a}function n2(a,i){const l=Ai(a,i);let{transitionEnd:r={},transition:u={},...m}=l||{};m={...m,...r};for(const h in m){const g=t2(m[h]);e2(a,h,g)}}const It=a=>!!(a&&a.getVelocity);function a2(a){return!!(It(a)&&a.add)}function sf(a,i){const l=a.getValue("willChange");if(a2(l))return l.add(i);if(!l&&Qa.WillChange){const r=new Qa.WillChange("auto");a.addValue("willChange",r),r.add(i)}}function kf(a){return a.replace(/([A-Z])/g,i=>`-${i.toLowerCase()}`)}const i2="framerAppearId",Wg="data-"+kf(i2);function Jg(a){return a.props[Wg]}function s2({protectedKeys:a,needsAnimating:i},l){const r=a.hasOwnProperty(l)&&i[l]!==!0;return i[l]=!1,r}function $g(a,i,{delay:l=0,transitionOverride:r,type:u}={}){let{transition:m,transitionEnd:h,...g}=i;const y=a.getDefaultTransition();m=m?Pg(m,y):y;const x=m==null?void 0:m.reduceMotion,b=m==null?void 0:m.skipAnimations;r&&(m=r);const S=[],T=u&&a.animationState&&a.animationState.getState()[u],N=m==null?void 0:m.path;N&&N.animateVisualElement(a,g,m,l,S);for(const j in g){const k=a.getValue(j,a.latestValues[j]??null),B=g[j];if(B===void 0||T&&s2(T,j))continue;const Y={delay:l,...Of(m||{},j)};b&&(Y.skipAnimations=!0);const Z=k.get();if(Z!==void 0&&!k.isAnimating()&&!Array.isArray(B)&&B===Z&&!Y.velocity){ct.update(()=>k.set(B));continue}let P=!1;if(window.MotionHandoffAnimation){const ce=Jg(a);if(ce){const K=window.MotionHandoffAnimation(ce,j,ct);K!==null&&(Y.startTime=K,P=!0)}}sf(a,j);const Q=x??a.shouldReduceMotion;k.start(zf(j,k,B,Q&&Fg.has(j)?{type:!1}:Y,a,P));const W=k.animation;W&&S.push(W)}if(h){const j=()=>ct.update(()=>{h&&n2(a,h)});S.length?Promise.all(S).then(j):j()}return S}function lf(a,i,l={}){var y;const r=Ai(a,i,l.type==="exit"?(y=a.presenceContext)==null?void 0:y.custom:void 0);let{transition:u=a.getDefaultTransition()||{}}=r||{};l.transitionOverride&&(u=l.transitionOverride);const m=r?()=>Promise.all($g(a,r,l)):()=>Promise.resolve(),h=a.variantChildren&&a.variantChildren.size?(x=0)=>{const{delayChildren:b=0,staggerChildren:S,staggerDirection:T}=u;return l2(a,i,x,b,S,T,l)}:()=>Promise.resolve(),{when:g}=u;if(g){const[x,b]=g==="beforeChildren"?[m,h]:[h,m];return x().then(()=>b())}else return Promise.all([m(),h(l.delay)])}function l2(a,i,l=0,r=0,u=0,m=1,h){const g=[];for(const y of a.variantChildren)y.notify("AnimationStart",i),g.push(lf(y,i,{...h,delay:l+(typeof r=="function"?0:r)+Zg(a.variantChildren,y,r,u,m)}).then(()=>y.notify("AnimationComplete",i)));return Promise.all(g)}function r2(a,i,l={}){a.notify("AnimationStart",i);let r;if(Array.isArray(i)){const u=i.map(m=>lf(a,m,l));r=Promise.all(u)}else if(typeof i=="string")r=lf(a,i,l);else{const u=typeof i=="function"?Ai(a,i,l.custom):i;r=Promise.all($g(a,u,l))}return r.then(()=>{a.notify("AnimationComplete",i)})}const o2={test:a=>a==="auto",parse:a=>a},ey=a=>i=>i.test(a),ty=[ms,oe,ea,ba,Ov,Dv,o2],sp=a=>ty.find(ey(a));function c2(a){return typeof a=="number"?a===0:a!==null?a==="none"||a==="0"||dg(a):!0}const u2=new Set(["brightness","contrast","saturate","opacity"]);function f2(a){const[i,l]=a.slice(0,-1).split("(");if(i==="drop-shadow")return a;const[r]=l.match(Nf)||[];if(!r)return a;const u=l.replace(r,"");let m=u2.has(i)?1:0;return r!==l&&(m*=100),i+"("+m+u+")"}const d2=/\b([a-z-]*)\(.*?\)/gu,rf={...Bn,getAnimatableNone:a=>{const i=a.match(d2);return i?i.map(f2).join(" "):a}},of={...Bn,getAnimatableNone:a=>{const i=Bn.parse(a);return Bn.createTransformer(a)(i.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},lp={...ms,transform:Math.round},h2={rotate:ba,pathRotation:ba,rotateX:ba,rotateY:ba,rotateZ:ba,scale:Lr,scaleX:Lr,scaleY:Lr,scaleZ:Lr,skew:ba,skewX:ba,skewY:ba,distance:oe,translateX:oe,translateY:oe,translateZ:oe,x:oe,y:oe,z:oe,perspective:oe,transformPerspective:oe,opacity:ml,originX:K0,originY:K0,originZ:oe},$r={borderWidth:oe,borderTopWidth:oe,borderRightWidth:oe,borderBottomWidth:oe,borderLeftWidth:oe,borderRadius:oe,borderTopLeftRadius:oe,borderTopRightRadius:oe,borderBottomRightRadius:oe,borderBottomLeftRadius:oe,width:oe,maxWidth:oe,height:oe,maxHeight:oe,top:oe,right:oe,bottom:oe,left:oe,inset:oe,insetBlock:oe,insetBlockStart:oe,insetBlockEnd:oe,insetInline:oe,insetInlineStart:oe,insetInlineEnd:oe,padding:oe,paddingTop:oe,paddingRight:oe,paddingBottom:oe,paddingLeft:oe,paddingBlock:oe,paddingBlockStart:oe,paddingBlockEnd:oe,paddingInline:oe,paddingInlineStart:oe,paddingInlineEnd:oe,margin:oe,marginTop:oe,marginRight:oe,marginBottom:oe,marginLeft:oe,marginBlock:oe,marginBlockStart:oe,marginBlockEnd:oe,marginInline:oe,marginInlineStart:oe,marginInlineEnd:oe,fontSize:oe,backgroundPositionX:oe,backgroundPositionY:oe,...h2,zIndex:lp,fillOpacity:ml,strokeOpacity:ml,numOctaves:lp},m2={...$r,color:Ct,backgroundColor:Ct,outlineColor:Ct,fill:Ct,stroke:Ct,borderColor:Ct,borderTopColor:Ct,borderRightColor:Ct,borderBottomColor:Ct,borderLeftColor:Ct,filter:rf,WebkitFilter:rf,mask:of,WebkitMask:of},ny=a=>m2[a],p2=new Set([rf,of]);function ay(a,i){let l=ny(a);return p2.has(l)||(l=Bn),l.getAnimatableNone?l.getAnimatableNone(i):void 0}const g2=new Set(["auto","none","0"]);function y2(a,i,l){let r=0,u;for(;r<a.length&&!u;){const m=a[r];typeof m=="string"&&!g2.has(m)&&ds(m).values.length&&(u=a[r]),r++}if(u&&l)for(const m of i)a[m]=ay(l,u)}class x2 extends Df{constructor(i,l,r,u,m){super(i,l,r,u,m,!0)}readKeyframes(){const{unresolvedKeyframes:i,element:l,name:r}=this;if(!l||!l.current)return;super.readKeyframes();for(let b=0;b<i.length;b++){let S=i[b];if(typeof S=="string"&&(S=S.trim(),wf(S))){const T=Qg(S,l.current);T!==void 0&&(i[b]=T),b===i.length-1&&(this.finalKeyframe=S)}}if(this.resolveNoneKeyframes(),!Fg.has(r)||i.length!==2)return;const[u,m]=i,h=sp(u),g=sp(m),y=X0(u),x=X0(m);if(y!==x&&Pa[r]){this.needsMeasurement=!0;return}if(h!==g)if(ep(h)&&ep(g))for(let b=0;b<i.length;b++){const S=i[b];typeof S=="string"&&(i[b]=parseFloat(S))}else Pa[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:i,name:l}=this,r=[];for(let u=0;u<i.length;u++)(i[u]===null||c2(i[u]))&&r.push(u);r.length&&y2(i,r,l)}measureInitialState(){const{element:i,unresolvedKeyframes:l,name:r}=this;if(!i||!i.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Pa[r](i.measureViewportBox(),window.getComputedStyle(i.current)),l[0]=this.measuredOrigin;const u=l[l.length-1];u!==void 0&&i.getValue(r,u).jump(u,!1)}measureEndState(){var g;const{element:i,name:l,unresolvedKeyframes:r}=this;if(!i||!i.current)return;const u=i.getValue(l);u&&u.jump(this.measuredOrigin,!1);const m=r.length-1,h=r[m];r[m]=Pa[l](i.measureViewportBox(),window.getComputedStyle(i.current)),h!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=h),(g=this.removedTransforms)!=null&&g.length&&this.removedTransforms.forEach(([y,x])=>{i.getValue(y).set(x)}),this.resolveNoneKeyframes()}}const Uf=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function iy(a,i,l){if(a==null)return[];if(a instanceof EventTarget)return[a];if(typeof a=="string"){let r=document;const u=(l==null?void 0:l[a])??r.querySelectorAll(a);return u?Array.from(u):[]}return Array.from(a).filter(r=>r!=null)}const cf=(a,i)=>i&&typeof a=="number"?i.transform(a):a;function Gr(a){return fg(a)&&"offsetHeight"in a&&!("ownerSVGElement"in a)}const{schedule:Bf}=Eg(queueMicrotask,!1),Un={x:!1,y:!1};function sy(){return Un.x||Un.y}function v2(a){return a==="x"||a==="y"?Un[a]?null:(Un[a]=!0,()=>{Un[a]=!1}):Un.x||Un.y?null:(Un.x=Un.y=!0,()=>{Un.x=Un.y=!1})}function ly(a,i){const l=iy(a),r=new AbortController,u={passive:!0,...i,signal:r.signal};return[l,u,()=>r.abort()]}function b2(a){return!(a.pointerType==="touch"||sy())}function S2(a,i,l={}){const[r,u,m]=ly(a,l);return r.forEach(h=>{let g=!1,y=!1,x;const b=()=>{h.removeEventListener("pointerleave",j)},S=B=>{x&&(x(B),x=void 0),b()},T=B=>{g=!1,window.removeEventListener("pointerup",T),window.removeEventListener("pointercancel",T),y&&(y=!1,S(B))},N=()=>{g=!0,window.addEventListener("pointerup",T,u),window.addEventListener("pointercancel",T,u)},j=B=>{if(B.pointerType!=="touch"){if(g){y=!0;return}S(B)}},k=B=>{if(!b2(B))return;y=!1;const Y=i(h,B);typeof Y=="function"&&(x=Y,h.addEventListener("pointerleave",j,u))};h.addEventListener("pointerenter",k,u),h.addEventListener("pointerdown",N,u)}),m}const ry=(a,i)=>i?a===i?!0:ry(a,i.parentElement):!1,Hf=a=>a.pointerType==="mouse"?typeof a.button!="number"||a.button<=0:a.isPrimary!==!1,T2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function _2(a){return T2.has(a.tagName)||a.isContentEditable===!0}const A2=new Set(["INPUT","SELECT","TEXTAREA"]);function E2(a){return A2.has(a.tagName)||a.isContentEditable===!0}const Yr=new WeakSet;function rp(a){return i=>{i.key==="Enter"&&a(i)}}function Ou(a,i){a.dispatchEvent(new PointerEvent("pointer"+i,{isPrimary:!0,bubbles:!0}))}const M2=(a,i)=>{const l=a.currentTarget;if(!l)return;const r=rp(()=>{if(Yr.has(l))return;Ou(l,"down");const u=rp(()=>{Ou(l,"up")}),m=()=>Ou(l,"cancel");l.addEventListener("keyup",u,i),l.addEventListener("blur",m,i)});l.addEventListener("keydown",r,i),l.addEventListener("blur",()=>l.removeEventListener("keydown",r),i)};function op(a){return Hf(a)&&!sy()}const cp=new WeakSet;function w2(a,i,l={}){const[r,u,m]=ly(a,l),h=g=>{const y=g.currentTarget;if(!op(g)||cp.has(g))return;Yr.add(y),l.stopPropagation&&cp.add(g);const x=i(y,g),b={...u,capture:!0},S=(j,k)=>{window.removeEventListener("pointerup",T,b),window.removeEventListener("pointercancel",N,b),Yr.has(y)&&Yr.delete(y),op(j)&&typeof x=="function"&&x(j,{success:k})},T=j=>{S(j,y===window||y===document||l.useGlobalTarget||ry(y,j.target))},N=j=>{S(j,!1)};window.addEventListener("pointerup",T,b),window.addEventListener("pointercancel",N,b)};return r.forEach(g=>{(l.useGlobalTarget?window:g).addEventListener("pointerdown",h,u),Gr(g)&&(g.addEventListener("focus",x=>M2(x,u)),!_2(g)&&!g.hasAttribute("tabindex")&&(g.tabIndex=0))}),m}function Gf(a){return fg(a)&&"ownerSVGElement"in a}const qr=new WeakMap;let Za;const oy=(a,i,l)=>(r,u)=>u&&u[0]?u[0][a+"Size"]:Gf(r)&&"getBBox"in r?r.getBBox()[i]:r[l],N2=oy("inline","width","offsetWidth"),j2=oy("block","height","offsetHeight");function V2({target:a,borderBoxSize:i}){var l;(l=qr.get(a))==null||l.forEach(r=>{r(a,{get width(){return N2(a,i)},get height(){return j2(a,i)}})})}function C2(a){a.forEach(V2)}function R2(){typeof ResizeObserver>"u"||(Za=new ResizeObserver(C2))}function D2(a,i){Za||R2();const l=iy(a);return l.forEach(r=>{let u=qr.get(r);u||(u=new Set,qr.set(r,u)),u.add(i),Za==null||Za.observe(r)}),()=>{l.forEach(r=>{const u=qr.get(r);u==null||u.delete(i),u!=null&&u.size||Za==null||Za.unobserve(r)})}}const Ir=new Set;let us;function O2(){us=()=>{const a={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ir.forEach(i=>i(a))},window.addEventListener("resize",us)}function z2(a){return Ir.add(a),us||O2(),()=>{Ir.delete(a),!Ir.size&&typeof us=="function"&&(window.removeEventListener("resize",us),us=void 0)}}function up(a,i){return typeof a=="function"?z2(a):D2(a,i)}function L2(a){return Gf(a)&&a.tagName==="svg"}const k2=[...ty,Ct,Bn],U2=a=>k2.find(ey(a)),fp=()=>({translate:0,scale:1,origin:0,originPoint:0}),fs=()=>({x:fp(),y:fp()}),dp=()=>({min:0,max:0}),zt=()=>({x:dp(),y:dp()}),B2=new WeakMap;function ro(a){return a!==null&&typeof a=="object"&&typeof a.start=="function"}function pl(a){return typeof a=="string"||Array.isArray(a)}const Yf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],qf=["initial",...Yf];function oo(a){return ro(a.animate)||qf.some(i=>pl(a[i]))}function cy(a){return!!(oo(a)||a.variants)}function H2(a,i,l){for(const r in i){const u=i[r],m=l[r];if(It(u))a.addValue(r,u);else if(It(m))a.addValue(r,hs(u,{owner:a}));else if(m!==u)if(a.hasValue(r)){const h=a.getValue(r);h.liveStyle===!0?h.jump(u):h.hasAnimated||h.set(u)}else{const h=a.getStaticValue(r);a.addValue(r,hs(h!==void 0?h:u,{owner:a}))}}for(const r in l)i[r]===void 0&&a.removeValue(r);return i}const uf={current:null},uy={current:!1},G2=typeof window<"u";function Y2(){if(uy.current=!0,!!G2)if(window.matchMedia){const a=window.matchMedia("(prefers-reduced-motion)"),i=()=>uf.current=a.matches;a.addEventListener("change",i),i()}else uf.current=!1}const hp=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let eo={};function fy(a){eo=a}function q2(){return eo}class I2{scrapeMotionValuesFromProps(i,l,r){return{}}constructor({parent:i,props:l,presenceContext:r,reducedMotionConfig:u,skipAnimations:m,blockInitialAnimation:h,visualState:g},y={}){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=Df,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=Jt.now();this.renderScheduledAt<N&&(this.renderScheduledAt=N,ct.render(this.render,!1,!0))};const{latestValues:x,renderState:b}=g;this.latestValues=x,this.baseTarget={...x},this.initialValues=l.initial?{...x}:{},this.renderState=b,this.parent=i,this.props=l,this.presenceContext=r,this.depth=i?i.depth+1:0,this.reducedMotionConfig=u,this.skipAnimationsConfig=m,this.options=y,this.blockInitialAnimation=!!h,this.isControllingVariants=oo(l),this.isVariantNode=cy(l),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(i&&i.current);const{willChange:S,...T}=this.scrapeMotionValuesFromProps(l,{},this);for(const N in T){const j=T[N];x[N]!==void 0&&It(j)&&j.set(x[N])}}mount(i){var l,r;if(this.hasBeenMounted)for(const u in this.initialValues)(l=this.values.get(u))==null||l.jump(this.initialValues[u]),this.latestValues[u]=this.initialValues[u];this.current=i,B2.set(i,this),this.projection&&!this.projection.instance&&this.projection.mount(i),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((u,m)=>this.bindToMotionValue(m,u)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(uy.current||Y2(),this.shouldReduceMotion=uf.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var i;this.projection&&this.projection.unmount(),Fa(this.notifyUpdate),Fa(this.render),this.valueSubscriptions.forEach(l=>l()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(i=this.parent)==null||i.removeChild(this);for(const l in this.events)this.events[l].clear();for(const l in this.features){const r=this.features[l];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(i){this.children.add(i),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(i)}removeChild(i){this.children.delete(i),this.enteringChildren&&this.enteringChildren.delete(i)}bindToMotionValue(i,l){if(this.valueSubscriptions.has(i)&&this.valueSubscriptions.get(i)(),l.accelerate&&Kg.has(i)&&this.current instanceof HTMLElement){const{factory:h,keyframes:g,times:y,ease:x,duration:b}=l.accelerate,S=new Ig({element:this.current,name:i,keyframes:g,times:y,ease:x,duration:xn(b)}),T=h(S);this.valueSubscriptions.set(i,()=>{T(),S.cancel()});return}const r=gs.has(i);r&&this.onBindTransform&&this.onBindTransform();const u=l.on("change",h=>{this.latestValues[i]=h,this.props.onUpdate&&ct.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let m;typeof window<"u"&&window.MotionCheckAppearSync&&(m=window.MotionCheckAppearSync(this,i,l)),this.valueSubscriptions.set(i,()=>{u(),m&&m()})}sortNodePosition(i){return!this.current||!this.sortInstanceNodePosition||this.type!==i.type?0:this.sortInstanceNodePosition(this.current,i.current)}updateFeatures(){let i="animation";for(i in eo){const l=eo[i];if(!l)continue;const{isEnabled:r,Feature:u}=l;if(!this.features[i]&&u&&r(this.props)&&(this.features[i]=new u(this)),this.features[i]){const m=this.features[i];m.isMounted?m.update():(m.mount(),m.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):zt()}getStaticValue(i){return this.latestValues[i]}setStaticValue(i,l){this.latestValues[i]=l}update(i,l){(i.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=i,this.prevPresenceContext=this.presenceContext,this.presenceContext=l;for(let r=0;r<hp.length;r++){const u=hp[r];this.propEventSubscriptions[u]&&(this.propEventSubscriptions[u](),delete this.propEventSubscriptions[u]);const m="on"+u,h=i[m];h&&(this.propEventSubscriptions[u]=this.on(u,h))}this.prevMotionValues=H2(this,this.scrapeMotionValuesFromProps(i,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(i){return this.props.variants?this.props.variants[i]: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(i){const l=this.getClosestVariantNode();if(l)return l.variantChildren&&l.variantChildren.add(i),()=>l.variantChildren.delete(i)}addValue(i,l){const r=this.values.get(i);l!==r&&(r&&this.removeValue(i),this.bindToMotionValue(i,l),this.values.set(i,l),this.latestValues[i]=l.get())}removeValue(i){this.values.delete(i);const l=this.valueSubscriptions.get(i);l&&(l(),this.valueSubscriptions.delete(i)),delete this.latestValues[i],this.removeValueFromRenderState(i,this.renderState)}hasValue(i){return this.values.has(i)}getValue(i,l){if(this.props.values&&this.props.values[i])return this.props.values[i];let r=this.values.get(i);return r===void 0&&l!==void 0&&(r=hs(l===null?void 0:l,{owner:this}),this.addValue(i,r)),r}readValue(i,l){let r=this.latestValues[i]!==void 0||!this.current?this.latestValues[i]:this.getBaseTargetFromProps(this.props,i)??this.readValueFromInstance(this.current,i,this.options);return r!=null&&(typeof r=="string"&&(ug(r)||dg(r))?r=parseFloat(r):!U2(r)&&Bn.test(l)&&(r=ay(i,l)),this.setBaseTarget(i,It(r)?r.get():r)),It(r)?r.get():r}setBaseTarget(i,l){this.baseTarget[i]=l}getBaseTarget(i){var m;const{initial:l}=this.props;let r;if(typeof l=="string"||typeof l=="object"){const h=Lf(this.props,l,(m=this.presenceContext)==null?void 0:m.custom);h&&(r=h[i])}if(l&&r!==void 0)return r;const u=this.getBaseTargetFromProps(this.props,i);return u!==void 0&&!It(u)?u:this.initialValues[i]!==void 0&&r===void 0?void 0:this.baseTarget[i]}on(i,l){return this.events[i]||(this.events[i]=new Af),this.events[i].add(l)}notify(i,...l){this.events[i]&&this.events[i].notify(...l)}scheduleRenderMicrotask(){Bf.render(this.render)}}class dy extends I2{constructor(){super(...arguments),this.KeyframeResolver=x2}sortInstanceNodePosition(i,l){return i.compareDocumentPosition(l)&2?1:-1}getBaseTargetFromProps(i,l){const r=i.style;return r?r[l]:void 0}removeValueFromRenderState(i,{vars:l,style:r}){delete l[i],delete r[i]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:i}=this.props;It(i)&&(this.childSubscription=i.on("change",l=>{this.current&&(this.current.textContent=`${l}`)}))}}class Wa{constructor(i){this.isMounted=!1,this.node=i}update(){}}function hy({top:a,left:i,right:l,bottom:r}){return{x:{min:i,max:l},y:{min:a,max:r}}}function X2({x:a,y:i}){return{top:i.min,right:a.max,bottom:i.max,left:a.min}}function K2(a,i){if(!i)return a;const l=i({x:a.left,y:a.top}),r=i({x:a.right,y:a.bottom});return{top:l.y,left:l.x,bottom:r.y,right:r.x}}function zu(a){return a===void 0||a===1}function ff({scale:a,scaleX:i,scaleY:l}){return!zu(a)||!zu(i)||!zu(l)}function bi(a){return ff(a)||my(a)||a.z||a.rotate||a.rotateX||a.rotateY||a.skewX||a.skewY}function my(a){return mp(a.x)||mp(a.y)}function mp(a){return a&&a!=="0%"}function to(a,i,l){const r=a-l,u=i*r;return l+u}function pp(a,i,l,r,u){return u!==void 0&&(a=to(a,u,r)),to(a,l,r)+i}function df(a,i=0,l=1,r,u){a.min=pp(a.min,i,l,r,u),a.max=pp(a.max,i,l,r,u)}function py(a,{x:i,y:l}){df(a.x,i.translate,i.scale,i.originPoint),df(a.y,l.translate,l.scale,l.originPoint)}const gp=.999999999999,yp=1.0000000000001;function Z2(a,i,l,r=!1){var g;const u=l.length;if(!u)return;i.x=i.y=1;let m,h;for(let y=0;y<u;y++){m=l[y],h=m.projectionDelta;const{visualElement:x}=m.options;x&&x.props.style&&x.props.style.display==="contents"||(r&&m.options.layoutScroll&&m.scroll&&m!==m.root&&(Jn(a.x,-m.scroll.offset.x),Jn(a.y,-m.scroll.offset.y)),h&&(i.x*=h.x.scale,i.y*=h.y.scale,py(a,h)),r&&bi(m.latestValues)&&Xr(a,m.latestValues,(g=m.layout)==null?void 0:g.layoutBox))}i.x<yp&&i.x>gp&&(i.x=1),i.y<yp&&i.y>gp&&(i.y=1)}function Jn(a,i){a.min+=i,a.max+=i}function xp(a,i,l,r,u=.5){const m=ot(a.min,a.max,u);df(a,i,l,m,r)}function vp(a,i){return typeof a=="string"?parseFloat(a)/100*(i.max-i.min):a}function Xr(a,i,l){const r=l??a;xp(a.x,vp(i.x,r.x),i.scaleX,i.scale,i.originX),xp(a.y,vp(i.y,r.y),i.scaleY,i.scale,i.originY)}function gy(a,i){return hy(K2(a.getBoundingClientRect(),i))}function P2(a,i,l){const r=gy(a,l),{scroll:u}=i;return u&&(Jn(r.x,u.offset.x),Jn(r.y,u.offset.y)),r}const Q2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},F2=ps.length;function W2(a,i,l){let r="",u=!0;for(let h=0;h<F2;h++){const g=ps[h],y=a[g];if(y===void 0)continue;let x=!0;if(typeof y=="number")x=y===(g.startsWith("scale")?1:0);else{const b=parseFloat(y);x=g.startsWith("scale")?b===1:b===0}if(!x||l){const b=cf(y,$r[g]);if(!x){u=!1;const S=Q2[g]||g;r+=`${S}(${b}) `}l&&(i[g]=b)}}const m=a.pathRotation;return m&&(u=!1,r+=`rotate(${cf(m,$r.pathRotation)}) `),r=r.trim(),l?r=l(i,u?"":r):u&&(r="none"),r}function If(a,i,l){const{style:r,vars:u,transformOrigin:m}=a;let h=!1,g=!1;for(const y in i){const x=i[y];if(gs.has(y)){h=!0;continue}else if(wg(y)){u[y]=x;continue}else{const b=cf(x,$r[y]);y.startsWith("origin")?(g=!0,m[y]=b):r[y]=b}}if(i.transform||(h||l?r.transform=W2(i,a.transform,l):r.transform&&(r.transform="none")),g){const{originX:y="50%",originY:x="50%",originZ:b=0}=m;r.transformOrigin=`${y} ${x} ${b}`}}function yy(a,{style:i,vars:l},r,u){const m=a.style;let h;for(h in i)m[h]=i[h];u==null||u.applyProjectionStyles(m,r);for(h in l)m.setProperty(h,l[h])}function bp(a,i){return i.max===i.min?0:a/(i.max-i.min)*100}const rl={correct:(a,i)=>{if(!i.target)return a;if(typeof a=="string")if(oe.test(a))a=parseFloat(a);else return a;const l=bp(a,i.target.x),r=bp(a,i.target.y);return`${l}% ${r}%`}},J2={correct:(a,{treeScale:i,projectionDelta:l})=>{const r=a,u=Bn.parse(a);if(u.length>5)return r;const m=Bn.createTransformer(a),h=typeof u[0]!="number"?1:0,g=l.x.scale*i.x,y=l.y.scale*i.y;u[0+h]/=g,u[1+h]/=y;const x=ot(g,y,.5);return typeof u[2+h]=="number"&&(u[2+h]/=x),typeof u[3+h]=="number"&&(u[3+h]/=x),m(u)}},hf={borderRadius:{...rl,applyTo:[...Uf]},borderTopLeftRadius:rl,borderTopRightRadius:rl,borderBottomLeftRadius:rl,borderBottomRightRadius:rl,boxShadow:J2};function xy(a,{layout:i,layoutId:l}){return gs.has(a)||a.startsWith("origin")||(i||l!==void 0)&&(!!hf[a]||a==="opacity")}function Xf(a,i,l){var h;const r=a.style,u=i==null?void 0:i.style,m={};if(!r)return m;for(const g in r)(It(r[g])||u&&It(u[g])||xy(g,a)||((h=l==null?void 0:l.getValue(g))==null?void 0:h.liveStyle)!==void 0)&&(m[g]=r[g]);return m}function $2(a){return window.getComputedStyle(a)}class eS extends dy{constructor(){super(...arguments),this.type="html",this.renderInstance=yy}readValueFromInstance(i,l){var r;if(gs.has(l))return(r=this.projection)!=null&&r.isProjecting?Wu(l):bb(i,l);{const u=$2(i),m=(wg(l)?u.getPropertyValue(l):u[l])||0;return typeof m=="string"?m.trim():m}}measureInstanceViewportBox(i,{transformPagePoint:l}){return gy(i,l)}build(i,l,r){If(i,l,r.transformTemplate)}scrapeMotionValuesFromProps(i,l,r){return Xf(i,l,r)}}const tS={offset:"stroke-dashoffset",array:"stroke-dasharray"},nS={offset:"strokeDashoffset",array:"strokeDasharray"};function aS(a,i,l=1,r=0,u=!0){a.pathLength=1;const m=u?tS:nS;a[m.offset]=`${-r}`,a[m.array]=`${i} ${l}`}const iS=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function vy(a,{attrX:i,attrY:l,attrScale:r,pathLength:u,pathSpacing:m=1,pathOffset:h=0,...g},y,x,b){if(If(a,g,x),y){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 iS)S[N]!==void 0&&(T[N]=S[N],delete S[N]);i!==void 0&&(S.x=i),l!==void 0&&(S.y=l),r!==void 0&&(S.scale=r),u!==void 0&&aS(S,u,m,h,!1)}const by=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"]),Sy=a=>typeof a=="string"&&a.toLowerCase()==="svg";function sS(a,i,l,r){yy(a,i,void 0,r);for(const u in i.attrs)a.setAttribute(by.has(u)?u:kf(u),i.attrs[u])}function Ty(a,i,l){const r=Xf(a,i,l);for(const u in a)if(It(a[u])||It(i[u])){const m=ps.indexOf(u)!==-1?"attr"+u.charAt(0).toUpperCase()+u.substring(1):u;r[m]=a[u]}return r}class lS extends dy{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=zt}getBaseTargetFromProps(i,l){return i[l]}readValueFromInstance(i,l){if(gs.has(l)){const r=ny(l);return r&&r.default||0}return l=by.has(l)?l:kf(l),i.getAttribute(l)}scrapeMotionValuesFromProps(i,l,r){return Ty(i,l,r)}build(i,l,r){vy(i,l,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(i,l,r,u){sS(i,l,r,u)}mount(i){this.isSVGTag=Sy(i.tagName),super.mount(i)}}const rS=qf.length;function _y(a){if(!a)return;if(!a.isControllingVariants){const l=a.parent?_y(a.parent)||{}:{};return a.props.initial!==void 0&&(l.initial=a.props.initial),l}const i={};for(let l=0;l<rS;l++){const r=qf[l],u=a.props[r];(pl(u)||u===!1)&&(i[r]=u)}return i}function Ay(a,i){if(!Array.isArray(i))return!1;const l=i.length;if(l!==a.length)return!1;for(let r=0;r<l;r++)if(i[r]!==a[r])return!1;return!0}const oS=[...Yf].reverse(),cS=Yf.length;function uS(a){return i=>Promise.all(i.map(({animation:l,options:r})=>r2(a,l,r)))}function fS(a){let i=uS(a),l=Sp(),r=!0,u=!1;const m=x=>(b,S)=>{var N;const T=Ai(a,S,x==="exit"?(N=a.presenceContext)==null?void 0:N.custom:void 0);if(T){const{transition:j,transitionEnd:k,...B}=T;b={...b,...B,...k}}return b};function h(x){i=x(a)}function g(x){const{props:b}=a,S=_y(a.parent)||{},T=[],N=new Set;let j={},k=1/0;for(let Y=0;Y<cS;Y++){const Z=oS[Y],P=l[Z],Q=b[Z]!==void 0?b[Z]:S[Z],W=pl(Q),ce=Z===x?P.isActive:null;ce===!1&&(k=Y);let K=Q===S[Z]&&Q!==b[Z]&&W;if(K&&(r||u)&&a.manuallyAnimateOnMount&&(K=!1),P.protectedKeys={...j},!P.isActive&&ce===null||!Q&&!P.prevProp||ro(Q)||typeof Q=="boolean")continue;if(Z==="exit"&&P.isActive&&ce!==!0){P.prevResolvedValues&&(j={...j,...P.prevResolvedValues});continue}const F=dS(P.prevProp,Q);let ae=F||Z===x&&P.isActive&&!K&&W||Y>k&&W,fe=!1;const Le=Array.isArray(Q)?Q:[Q];let Me=Le.reduce(m(Z),{});ce===!1&&(Me={});const{prevResolvedValues:Fe={}}=P,lt={...Fe,...Me},et=te=>{ae=!0,N.has(te)&&(fe=!0,N.delete(te)),P.needsAnimating[te]=!0;const Ae=a.getValue(te);Ae&&(Ae.liveStyle=!1)};for(const te in lt){const Ae=Me[te],Ce=Fe[te];if(j.hasOwnProperty(te))continue;let M=!1;af(Ae)&&af(Ce)?M=!Ay(Ae,Ce)||F:M=Ae!==Ce,M?Ae!=null?et(te):N.add(te):Ae!==void 0&&N.has(te)?et(te):P.protectedKeys[te]=!0}P.prevProp=Q,P.prevResolvedValues=Me,P.isActive&&(j={...j,...Me}),(r||u)&&a.blockInitialAnimation&&(ae=!1);const U=K&&F;ae&&(!U||fe)&&T.push(...Le.map(te=>{const Ae={type:Z};if(typeof te=="string"&&(r||u)&&!U&&a.manuallyAnimateOnMount&&a.parent){const{parent:Ce}=a,M=Ai(Ce,te);if(Ce.enteringChildren&&M){const{delayChildren:q}=M.transition||{};Ae.delay=Zg(Ce.enteringChildren,a,q)}}return{animation:te,options:Ae}}))}if(N.size){const Y={};if(typeof b.initial!="boolean"){const Z=Ai(a,Array.isArray(b.initial)?b.initial[0]:b.initial);Z&&Z.transition&&(Y.transition=Z.transition)}N.forEach(Z=>{const P=a.getBaseTarget(Z),Q=a.getValue(Z);Q&&(Q.liveStyle=!0),Y[Z]=P??null}),T.push({animation:Y})}let B=!!T.length;return r&&(b.initial===!1||b.initial===b.animate)&&!a.manuallyAnimateOnMount&&(B=!1),r=!1,u=!1,B?i(T):Promise.resolve()}function y(x,b){var T;if(l[x].isActive===b)return Promise.resolve();(T=a.variantChildren)==null||T.forEach(N=>{var j;return(j=N.animationState)==null?void 0:j.setActive(x,b)}),l[x].isActive=b;const S=g(x);for(const N in l)l[N].protectedKeys={};return S}return{animateChanges:g,setActive:y,setAnimateFunction:h,getState:()=>l,reset:()=>{l=Sp(),u=!0}}}function dS(a,i){return typeof i=="string"?i!==a:Array.isArray(i)?!Ay(i,a):!1}function vi(a=!1){return{isActive:a,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Sp(){return{animate:vi(!0),whileInView:vi(),whileHover:vi(),whileTap:vi(),whileDrag:vi(),whileFocus:vi(),exit:vi()}}function mf(a,i){a.min=i.min,a.max=i.max}function kn(a,i){mf(a.x,i.x),mf(a.y,i.y)}function Tp(a,i){a.translate=i.translate,a.scale=i.scale,a.originPoint=i.originPoint,a.origin=i.origin}const Ey=1e-4,hS=1-Ey,mS=1+Ey,My=.01,pS=0-My,gS=0+My;function $t(a){return a.max-a.min}function yS(a,i,l){return Math.abs(a-i)<=l}function _p(a,i,l,r=.5){a.origin=r,a.originPoint=ot(i.min,i.max,a.origin),a.scale=$t(l)/$t(i),a.translate=ot(l.min,l.max,a.origin)-a.originPoint,(a.scale>=hS&&a.scale<=mS||isNaN(a.scale))&&(a.scale=1),(a.translate>=pS&&a.translate<=gS||isNaN(a.translate))&&(a.translate=0)}function fl(a,i,l,r){_p(a.x,i.x,l.x,r?r.originX:void 0),_p(a.y,i.y,l.y,r?r.originY:void 0)}function Ap(a,i,l,r=0){const u=r?ot(l.min,l.max,r):l.min;a.min=u+i.min,a.max=a.min+$t(i)}function xS(a,i,l,r){Ap(a.x,i.x,l.x,r==null?void 0:r.x),Ap(a.y,i.y,l.y,r==null?void 0:r.y)}function Ep(a,i,l,r=0){const u=r?ot(l.min,l.max,r):l.min;a.min=i.min-u,a.max=a.min+$t(i)}function no(a,i,l,r){Ep(a.x,i.x,l.x,r==null?void 0:r.x),Ep(a.y,i.y,l.y,r==null?void 0:r.y)}function Mp(a,i,l,r,u){return a-=i,a=to(a,1/l,r),u!==void 0&&(a=to(a,1/u,r)),a}function vS(a,i=0,l=1,r=.5,u,m=a,h=a){if(ea.test(i)&&(i=parseFloat(i),i=ot(h.min,h.max,i/100)-h.min),typeof i!="number")return;let g=ot(m.min,m.max,r);a===m&&(g-=i),a.min=Mp(a.min,i,l,g,u),a.max=Mp(a.max,i,l,g,u)}function wp(a,i,[l,r,u],m,h){vS(a,i[l],i[r],i[u],i.scale,m,h)}const bS=["x","scaleX","originX"],SS=["y","scaleY","originY"];function Np(a,i,l,r){wp(a.x,i,bS,l?l.x:void 0,r?r.x:void 0),wp(a.y,i,SS,l?l.y:void 0,r?r.y:void 0)}function jp(a){return a.translate===0&&a.scale===1}function wy(a){return jp(a.x)&&jp(a.y)}function Vp(a,i){return a.min===i.min&&a.max===i.max}function TS(a,i){return Vp(a.x,i.x)&&Vp(a.y,i.y)}function Cp(a,i){return Math.round(a.min)===Math.round(i.min)&&Math.round(a.max)===Math.round(i.max)}function Ny(a,i){return Cp(a.x,i.x)&&Cp(a.y,i.y)}function Rp(a){return $t(a.x)/$t(a.y)}function Dp(a,i){return a.translate===i.translate&&a.scale===i.scale&&a.originPoint===i.originPoint}function Wn(a){return[a("x"),a("y")]}function _S(a,i,l){let r="";const u=a.x.translate/i.x,m=a.y.translate/i.y,h=(l==null?void 0:l.z)||0;if((u||m||h)&&(r=`translate3d(${u}px, ${m}px, ${h}px) `),(i.x!==1||i.y!==1)&&(r+=`scale(${1/i.x}, ${1/i.y}) `),l){const{transformPerspective:x,rotate:b,pathRotation:S,rotateX:T,rotateY:N,skewX:j,skewY:k}=l;x&&(r=`perspective(${x}px) ${r}`),b&&(r+=`rotate(${b}deg) `),S&&(r+=`rotate(${S}deg) `),T&&(r+=`rotateX(${T}deg) `),N&&(r+=`rotateY(${N}deg) `),j&&(r+=`skewX(${j}deg) `),k&&(r+=`skewY(${k}deg) `)}const g=a.x.scale*i.x,y=a.y.scale*i.y;return(g!==1||y!==1)&&(r+=`scale(${g}, ${y})`),r||"none"}const AS=Uf.length,Op=a=>typeof a=="string"?parseFloat(a):a,zp=a=>typeof a=="number"||oe.test(a);function ES(a,i,l,r,u,m){u?(a.opacity=ot(0,l.opacity??1,MS(r)),a.opacityExit=ot(i.opacity??1,0,wS(r))):m&&(a.opacity=ot(i.opacity??1,l.opacity??1,r));for(let h=0;h<AS;h++){const g=Uf[h];let y=Lp(i,g),x=Lp(l,g);if(y===void 0&&x===void 0)continue;y||(y=0),x||(x=0),y===0||x===0||zp(y)===zp(x)?(a[g]=Math.max(ot(Op(y),Op(x),r),0),(ea.test(x)||ea.test(y))&&(a[g]+="%")):a[g]=x}(i.rotate||l.rotate)&&(a.rotate=ot(i.rotate||0,l.rotate||0,r))}function Lp(a,i){return a[i]!==void 0?a[i]:a.borderRadius}const MS=jy(0,.5,Sg),wS=jy(.5,.95,Cn);function jy(a,i,l){return r=>r<a?0:r>i?1:l(hl(a,i,r))}function NS(a,i,l){const r=It(a)?a:hs(a);return r.start(zf("",r,i,l)),r.animation}function gl(a,i,l,r={passive:!0}){return a.addEventListener(i,l,r),()=>a.removeEventListener(i,l,r)}const jS=(a,i)=>a.depth-i.depth;class VS{constructor(){this.children=[],this.isDirty=!1}add(i){Tf(this.children,i),this.isDirty=!0}remove(i){Pr(this.children,i),this.isDirty=!0}forEach(i){this.isDirty&&this.children.sort(jS),this.isDirty=!1,this.children.forEach(i)}}function CS(a,i){const l=Jt.now(),r=({timestamp:u})=>{const m=u-l;m>=i&&(Fa(r),a(m-i))};return ct.setup(r,!0),()=>Fa(r)}function Kr(a){return It(a)?a.get():a}class RS{constructor(){this.members=[]}add(i){Tf(this.members,i);for(let l=this.members.length-1;l>=0;l--){const r=this.members[l];if(r===i||r===this.lead||r===this.prevLead)continue;const u=r.instance;(!u||u.isConnected===!1)&&!r.snapshot&&(Pr(this.members,r),r.unmount())}i.scheduleRender()}remove(i){if(Pr(this.members,i),i===this.prevLead&&(this.prevLead=void 0),i===this.lead){const l=this.members[this.members.length-1];l&&this.promote(l)}}relegate(i){var l;for(let r=this.members.indexOf(i)-1;r>=0;r--){const u=this.members[r];if(u.isPresent!==!1&&((l=u.instance)==null?void 0:l.isConnected)!==!1)return this.promote(u),!0}return!1}promote(i,l){var u;const r=this.lead;if(i!==r&&(this.prevLead=r,this.lead=i,i.show(),r)){r.updateSnapshot(),i.scheduleRender();const{layoutDependency:m}=r.options,{layoutDependency:h}=i.options;(m===void 0||m!==h)&&(i.resumeFrom=r,l&&(r.preserveOpacity=!0),r.snapshot&&(i.snapshot=r.snapshot,i.snapshot.latestValues=r.animationValues||r.latestValues),(u=i.root)!=null&&u.isUpdating&&(i.isLayoutDirty=!0)),i.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(i=>{var l,r,u,m,h;(r=(l=i.options).onExitComplete)==null||r.call(l),(h=(u=i.resumingFrom)==null?void 0:(m=u.options).onExitComplete)==null||h.call(m)})}scheduleRender(){this.members.forEach(i=>i.instance&&i.scheduleRender(!1))}removeLeadSnapshot(){var i;(i=this.lead)!=null&&i.snapshot&&(this.lead.snapshot=void 0)}}const Zr={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Lu=["","X","Y","Z"],DS=1e3;let OS=0;function ku(a,i,l,r){const{latestValues:u}=i;u[a]&&(l[a]=u[a],i.setStaticValue(a,0),r&&(r[a]=0))}function Vy(a){if(a.hasCheckedOptimisedAppear=!0,a.root===a)return;const{visualElement:i}=a.options;if(!i)return;const l=Jg(i);if(window.MotionHasOptimisedAnimation(l,"transform")){const{layout:u,layoutId:m}=a.options;window.MotionCancelOptimisedAnimation(l,"transform",ct,!(u||m))}const{parent:r}=a;r&&!r.hasCheckedOptimisedAppear&&Vy(r)}function Cy({attachResizeListener:a,defaultParent:i,measureScroll:l,checkIsScrollRoot:r,resetTransform:u}){return class{constructor(h={},g=i==null?void 0:i()){this.id=OS++,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(kS),this.nodes.forEach(qS),this.nodes.forEach(IS),this.nodes.forEach(US)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=h,this.root=g?g.root||g:this,this.path=g?[...g.path,g]:[],this.parent=g,this.depth=g?g.depth+1:0;for(let y=0;y<this.path.length;y++)this.path[y].shouldResetTransform=!0;this.root===this&&(this.nodes=new VS)}addEventListener(h,g){return this.eventHandlers.has(h)||this.eventHandlers.set(h,new Af),this.eventHandlers.get(h).add(g)}notifyListeners(h,...g){const y=this.eventHandlers.get(h);y&&y.notify(...g)}hasListeners(h){return this.eventHandlers.has(h)}mount(h){if(this.instance)return;this.isSVG=Gf(h)&&!L2(h),this.instance=h;const{layoutId:g,layout:y,visualElement:x}=this.options;if(x&&!x.current&&x.mount(h),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(y||g)&&(this.isLayoutDirty=!0),a){let b,S=0;const T=()=>this.root.updateBlockedByResize=!1;ct.read(()=>{S=window.innerWidth}),a(h,()=>{const N=window.innerWidth;N!==S&&(S=N,this.root.updateBlockedByResize=!0,b&&b(),b=CS(T,250),Zr.hasAnimatedSinceResize&&(Zr.hasAnimatedSinceResize=!1,this.nodes.forEach(Bp)))})}g&&this.root.registerSharedNode(g,this),this.options.animate!==!1&&x&&(g||y)&&this.addEventListener("didUpdate",({delta:b,hasLayoutChanged:S,hasRelativeLayoutChanged:T,layout:N})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const j=this.options.transition||x.getDefaultTransition()||QS,{onLayoutAnimationStart:k,onLayoutAnimationComplete:B}=x.getProps(),Y=!this.targetLayout||!Ny(this.targetLayout,N),Z=!S&&T;if(this.options.layoutRoot||this.resumeFrom||Z||S&&(Y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const P={...Of(j,"layout"),onPlay:k,onComplete:B};(x.shouldReduceMotion||this.options.layoutRoot)&&(P.delay=0,P.type=!1),this.startAnimation(P),this.setAnimationOrigin(b,Z,P.path)}else S||Bp(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=N})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const h=this.getStack();h&&h.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Fa(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(XS),this.animationId++)}getTransformTemplate(){const{visualElement:h}=this.options;return h&&h.getProps().transformTemplate}willUpdate(h=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Vy(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:g,layout:y}=this.options;if(g===void 0&&!y)return;const x=this.getTransformTemplate();this.prevTransformTemplateValue=x?x(this.latestValues,""):void 0,this.updateSnapshot(),h&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const y=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),y&&this.nodes.forEach(HS),this.nodes.forEach(kp);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Up);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(GS),this.nodes.forEach(YS),this.nodes.forEach(zS),this.nodes.forEach(LS)):this.nodes.forEach(Up),this.clearAllSnapshots();const g=Jt.now();qt.delta=ta(0,1e3/60,g-qt.timestamp),qt.timestamp=g,qt.isProcessing=!0,Nu.update.process(qt),Nu.preRender.process(qt),Nu.render.process(qt),qt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Bf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(BS),this.sharedNodes.forEach(KS)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ct.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ct.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!$t(this.snapshot.measuredBox.x)&&!$t(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 y=0;y<this.path.length;y++)this.path[y].updateScroll();const h=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=zt()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:g}=this.options;g&&g.notify("LayoutMeasure",this.layout.layoutBox,h?h.layoutBox:void 0)}updateScroll(h="measure"){let g=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===h&&(g=!1),g&&this.instance){const y=r(this.instance);this.scroll={animationId:this.root.animationId,phase:h,isRoot:y,offset:l(this.instance),wasRoot:this.scroll?this.scroll.isRoot:y}}}resetTransform(){if(!u)return;const h=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,g=this.projectionDelta&&!wy(this.projectionDelta),y=this.getTransformTemplate(),x=y?y(this.latestValues,""):void 0,b=x!==this.prevTransformTemplateValue;h&&this.instance&&(g||bi(this.latestValues)||b)&&(u(this.instance,x),this.shouldResetTransform=!1,this.scheduleRender())}measure(h=!0){const g=this.measurePageBox();let y=this.removeElementScroll(g);return h&&(y=this.removeTransform(y)),FS(y),{animationId:this.root.animationId,measuredBox:g,layoutBox:y,latestValues:{},source:this.id}}measurePageBox(){var x;const{visualElement:h}=this.options;if(!h)return zt();const g=h.measureViewportBox();if(!(((x=this.scroll)==null?void 0:x.wasRoot)||this.path.some(WS))){const{scroll:b}=this.root;b&&(Jn(g.x,b.offset.x),Jn(g.y,b.offset.y))}return g}removeElementScroll(h){var y;const g=zt();if(kn(g,h),(y=this.scroll)!=null&&y.wasRoot)return g;for(let x=0;x<this.path.length;x++){const b=this.path[x],{scroll:S,options:T}=b;b!==this.root&&S&&T.layoutScroll&&(S.wasRoot&&kn(g,h),Jn(g.x,S.offset.x),Jn(g.y,S.offset.y))}return g}applyTransform(h,g=!1,y){var b,S;const x=y||zt();kn(x,h);for(let T=0;T<this.path.length;T++){const N=this.path[T];!g&&N.options.layoutScroll&&N.scroll&&N!==N.root&&(Jn(x.x,-N.scroll.offset.x),Jn(x.y,-N.scroll.offset.y)),bi(N.latestValues)&&Xr(x,N.latestValues,(b=N.layout)==null?void 0:b.layoutBox)}return bi(this.latestValues)&&Xr(x,this.latestValues,(S=this.layout)==null?void 0:S.layoutBox),x}removeTransform(h){var y;const g=zt();kn(g,h);for(let x=0;x<this.path.length;x++){const b=this.path[x];if(!bi(b.latestValues))continue;let S;b.instance&&(ff(b.latestValues)&&b.updateSnapshot(),S=zt(),kn(S,b.measurePageBox())),Np(g,b.latestValues,(y=b.snapshot)==null?void 0:y.layoutBox,S)}return bi(this.latestValues)&&Np(g,this.latestValues),g}setTargetDelta(h){this.targetDelta=h,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(h){this.options={...this.options,...h,crossfade:h.crossfade!==void 0?h.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!==qt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(h=!1){var N;const g=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=g.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=g.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=g.isSharedProjectionDirty);const y=!!this.resumingFrom||this!==g;if(!(h||y&&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=qt.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=zt(),this.targetWithTransforms=zt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),xS(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):kn(this.target,this.layout.layoutBox),py(this.target,this.targetDelta)):kn(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||ff(this.parent.latestValues)||my(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(h,g,y){this.relativeParent=h,this.linkedParentVersion=h.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=zt(),this.relativeTargetOrigin=zt(),no(this.relativeTargetOrigin,g,y,this.options.layoutAnchor||void 0),kn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var j;const h=this.getLead(),g=!!this.resumingFrom||this!==h;let y=!0;if((this.isProjectionDirty||(j=this.parent)!=null&&j.isProjectionDirty)&&(y=!1),g&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(y=!1),this.resolvedRelativeTargetAt===qt.timestamp&&(y=!1),y)return;const{layout:x,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||!(x||b))return;kn(this.layoutCorrected,this.layout.layoutBox);const S=this.treeScale.x,T=this.treeScale.y;Z2(this.layoutCorrected,this.treeScale,this.path,g),h.layout&&!h.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(h.target=h.layout.layoutBox,h.targetWithTransforms=zt());const{target:N}=h;if(!N){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Tp(this.prevProjectionDelta.x,this.projectionDelta.x),Tp(this.prevProjectionDelta.y,this.projectionDelta.y)),fl(this.projectionDelta,this.layoutCorrected,N,this.latestValues),(this.treeScale.x!==S||this.treeScale.y!==T||!Dp(this.projectionDelta.x,this.prevProjectionDelta.x)||!Dp(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",N))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(h=!0){var g;if((g=this.options.visualElement)==null||g.scheduleRender(),h){const y=this.getStack();y&&y.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=fs(),this.projectionDelta=fs(),this.projectionDeltaWithTransform=fs()}setAnimationOrigin(h,g=!1,y){const x=this.snapshot,b=x?x.latestValues:{},S={...this.latestValues},T=fs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!g;const N=zt(),j=x?x.source:void 0,k=this.layout?this.layout.source:void 0,B=j!==k,Y=this.getStack(),Z=!Y||Y.members.length<=1,P=!!(B&&!Z&&this.options.crossfade===!0&&!this.path.some(PS));this.animationProgress=0;let Q;const W=y==null?void 0:y.interpolateProjection(h);this.mixTargetDelta=ce=>{const K=ce/1e3,F=W==null?void 0:W(K);F?(T.x.translate=F.x,T.x.scale=ot(h.x.scale,1,K),T.x.origin=h.x.origin,T.x.originPoint=h.x.originPoint,T.y.translate=F.y,T.y.scale=ot(h.y.scale,1,K),T.y.origin=h.y.origin,T.y.originPoint=h.y.originPoint):(Hp(T.x,h.x,K),Hp(T.y,h.y,K)),this.setTargetDelta(T),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(no(N,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),ZS(this.relativeTarget,this.relativeTargetOrigin,N,K),Q&&TS(this.relativeTarget,Q)&&(this.isProjectionDirty=!1),Q||(Q=zt()),kn(Q,this.relativeTarget)),B&&(this.animationValues=S,ES(S,b,this.latestValues,K,P,Z)),F&&F.rotate!==void 0&&(this.animationValues||(this.animationValues=S),this.animationValues.pathRotation=F.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=K},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(h){var g,y,x;this.notifyListeners("animationStart"),(g=this.currentAnimation)==null||g.stop(),(x=(y=this.resumingFrom)==null?void 0:y.currentAnimation)==null||x.stop(),this.pendingAnimation&&(Fa(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ct.update(()=>{Zr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=hs(0)),this.motionValue.jump(0,!1),this.currentAnimation=NS(this.motionValue,[0,1e3],{...h,velocity:0,isSync:!0,onUpdate:b=>{this.mixTargetDelta(b),h.onUpdate&&h.onUpdate(b)},onComplete:()=>{h.onComplete&&h.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 h=this.getStack();h&&h.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(DS),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const h=this.getLead();let{targetWithTransforms:g,target:y,layout:x,latestValues:b}=h;if(!(!g||!y||!x)){if(this!==h&&this.layout&&x&&Ry(this.options.animationType,this.layout.layoutBox,x.layoutBox)){y=this.target||zt();const S=$t(this.layout.layoutBox.x);y.x.min=h.target.x.min,y.x.max=y.x.min+S;const T=$t(this.layout.layoutBox.y);y.y.min=h.target.y.min,y.y.max=y.y.min+T}kn(g,y),Xr(g,b),fl(this.projectionDeltaWithTransform,this.layoutCorrected,g,b)}}registerSharedNode(h,g){this.sharedNodes.has(h)||this.sharedNodes.set(h,new RS),this.sharedNodes.get(h).add(g);const x=g.options.initialPromotionConfig;g.promote({transition:x?x.transition:void 0,preserveFollowOpacity:x&&x.shouldPreserveFollowOpacity?x.shouldPreserveFollowOpacity(g):void 0})}isLead(){const h=this.getStack();return h?h.lead===this:!0}getLead(){var g;const{layoutId:h}=this.options;return h?((g=this.getStack())==null?void 0:g.lead)||this:this}getPrevLead(){var g;const{layoutId:h}=this.options;return h?(g=this.getStack())==null?void 0:g.prevLead:void 0}getStack(){const{layoutId:h}=this.options;if(h)return this.root.sharedNodes.get(h)}promote({needsReset:h,transition:g,preserveFollowOpacity:y}={}){const x=this.getStack();x&&x.promote(this,y),h&&(this.projectionDelta=void 0,this.needsReset=!0),g&&this.setOptions({transition:g})}relegate(){const h=this.getStack();return h?h.relegate(this):!1}resetSkewAndRotation(){const{visualElement:h}=this.options;if(!h)return;let g=!1;const{latestValues:y}=h;if((y.z||y.rotate||y.rotateX||y.rotateY||y.rotateZ||y.skewX||y.skewY)&&(g=!0),!g)return;const x={};y.z&&ku("z",h,x,this.animationValues);for(let b=0;b<Lu.length;b++)ku(`rotate${Lu[b]}`,h,x,this.animationValues),ku(`skew${Lu[b]}`,h,x,this.animationValues);h.render();for(const b in x)h.setStaticValue(b,x[b]),this.animationValues&&(this.animationValues[b]=x[b]);h.scheduleRender()}applyProjectionStyles(h,g){if(!this.instance||this.isSVG)return;if(!this.isVisible){h.visibility="hidden";return}const y=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,h.visibility="",h.opacity="",h.pointerEvents=Kr(g==null?void 0:g.pointerEvents)||"",h.transform=y?y(this.latestValues,""):"none";return}const x=this.getLead();if(!this.projectionDelta||!this.layout||!x.target){this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=Kr(g==null?void 0:g.pointerEvents)||""),this.hasProjected&&!bi(this.latestValues)&&(h.transform=y?y({},""):"none",this.hasProjected=!1);return}h.visibility="";const b=x.animationValues||x.latestValues;this.applyTransformsToTarget();let S=_S(this.projectionDeltaWithTransform,this.treeScale,b);y&&(S=y(b,S)),h.transform=S;const{x:T,y:N}=this.projectionDelta;h.transformOrigin=`${T.origin*100}% ${N.origin*100}% 0`,x.animationValues?h.opacity=x===this?b.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:b.opacityExit:h.opacity=x===this?b.opacity!==void 0?b.opacity:"":b.opacityExit!==void 0?b.opacityExit:0;for(const j in hf){if(b[j]===void 0)continue;const{correct:k,applyTo:B,isCSSVariable:Y}=hf[j],Z=S==="none"?b[j]:k(b[j],x);if(B){const P=B.length;for(let Q=0;Q<P;Q++)h[B[Q]]=Z}else Y?this.options.visualElement.renderState.vars[j]=Z:h[j]=Z}this.options.layoutId&&(h.pointerEvents=x===this?Kr(g==null?void 0:g.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(h=>{var g;return(g=h.currentAnimation)==null?void 0:g.stop()}),this.root.nodes.forEach(kp),this.root.sharedNodes.clear()}}}function zS(a){a.updateLayout()}function LS(a){var l;const i=((l=a.resumeFrom)==null?void 0:l.snapshot)||a.snapshot;if(a.isLead()&&a.layout&&i&&a.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:u}=a.layout,{animationType:m}=a.options,h=i.source!==a.layout.source;if(m==="size")Wn(S=>{const T=h?i.measuredBox[S]:i.layoutBox[S],N=$t(T);T.min=r[S].min,T.max=T.min+N});else if(m==="x"||m==="y"){const S=m==="x"?"y":"x";mf(h?i.measuredBox[S]:i.layoutBox[S],r[S])}else Ry(m,i.layoutBox,r)&&Wn(S=>{const T=h?i.measuredBox[S]:i.layoutBox[S],N=$t(r[S]);T.max=T.min+N,a.relativeTarget&&!a.currentAnimation&&(a.isProjectionDirty=!0,a.relativeTarget[S].max=a.relativeTarget[S].min+N)});const g=fs();fl(g,r,i.layoutBox);const y=fs();h?fl(y,a.applyTransform(u,!0),i.measuredBox):fl(y,r,i.layoutBox);const x=!wy(g);let b=!1;if(!a.resumeFrom){const S=a.getClosestProjectingParent();if(S&&!S.resumeFrom){const{snapshot:T,layout:N}=S;if(T&&N){const j=a.options.layoutAnchor||void 0,k=zt();no(k,i.layoutBox,T.layoutBox,j);const B=zt();no(B,r,N.layoutBox,j),Ny(k,B)||(b=!0),S.options.layoutRoot&&(a.relativeTarget=B,a.relativeTargetOrigin=k,a.relativeParent=S)}}}a.notifyListeners("didUpdate",{layout:r,snapshot:i,delta:y,layoutDelta:g,hasLayoutChanged:x,hasRelativeLayoutChanged:b})}else if(a.isLead()){const{onExitComplete:r}=a.options;r&&r()}a.options.transition=void 0}function kS(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 US(a){a.isProjectionDirty=a.isSharedProjectionDirty=a.isTransformDirty=!1}function BS(a){a.clearSnapshot()}function kp(a){a.clearMeasurements()}function HS(a){a.isLayoutDirty=!0,a.updateLayout()}function Up(a){a.isLayoutDirty=!1}function GS(a){a.isAnimationBlocked&&a.layout&&!a.isLayoutDirty&&(a.snapshot=a.layout,a.isLayoutDirty=!0)}function YS(a){const{visualElement:i}=a.options;i&&i.getProps().onBeforeLayoutMeasure&&i.notify("BeforeLayoutMeasure"),a.resetTransform()}function Bp(a){a.finishAnimation(),a.targetDelta=a.relativeTarget=a.target=void 0,a.isProjectionDirty=!0}function qS(a){a.resolveTargetDelta()}function IS(a){a.calcProjection()}function XS(a){a.resetSkewAndRotation()}function KS(a){a.removeLeadSnapshot()}function Hp(a,i,l){a.translate=ot(i.translate,0,l),a.scale=ot(i.scale,1,l),a.origin=i.origin,a.originPoint=i.originPoint}function Gp(a,i,l,r){a.min=ot(i.min,l.min,r),a.max=ot(i.max,l.max,r)}function ZS(a,i,l,r){Gp(a.x,i.x,l.x,r),Gp(a.y,i.y,l.y,r)}function PS(a){return a.animationValues&&a.animationValues.opacityExit!==void 0}const QS={duration:.45,ease:[.4,0,.1,1]},Yp=a=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(a),qp=Yp("applewebkit/")&&!Yp("chrome/")?Math.round:Cn;function Ip(a){a.min=qp(a.min),a.max=qp(a.max)}function FS(a){Ip(a.x),Ip(a.y)}function Ry(a,i,l){return a==="position"||a==="preserve-aspect"&&!yS(Rp(i),Rp(l),.2)}function WS(a){var i;return a!==a.root&&((i=a.scroll)==null?void 0:i.wasRoot)}const JS=Cy({attachResizeListener:(a,i)=>gl(a,"resize",i),measureScroll:()=>{var a,i;return{x:document.documentElement.scrollLeft||((a=document.body)==null?void 0:a.scrollLeft)||0,y:document.documentElement.scrollTop||((i=document.body)==null?void 0:i.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Uu={current:void 0},Dy=Cy({measureScroll:a=>({x:a.scrollLeft,y:a.scrollTop}),defaultParent:()=>{if(!Uu.current){const a=new JS({});a.mount(window),a.setOptions({layoutScroll:!0}),Uu.current=a}return Uu.current},resetTransform:(a,i)=>{a.style.transform=i!==void 0?i:"none"},checkIsScrollRoot:a=>window.getComputedStyle(a).position==="fixed"}),Kf=V.createContext({transformPagePoint:a=>a,isStatic:!1,reducedMotion:"never"});function Xp(a,i){if(typeof a=="function")return a(i);a!=null&&(a.current=i)}function $S(...a){return i=>{let l=!1;const r=a.map(u=>{const m=Xp(u,i);return!l&&typeof m=="function"&&(l=!0),m});if(l)return()=>{for(let u=0;u<r.length;u++){const m=r[u];typeof m=="function"?m():Xp(a[u],null)}}}}function eT(...a){return V.useCallback($S(...a),a)}class tT extends V.Component{getSnapshotBeforeUpdate(i){const l=this.props.childRef.current;if(Gr(l)&&i.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=l.offsetParent,u=Gr(r)&&r.offsetWidth||0,m=Gr(r)&&r.offsetHeight||0,h=getComputedStyle(l),g=this.props.sizeRef.current;g.height=parseFloat(h.height),g.width=parseFloat(h.width),g.top=l.offsetTop,g.left=l.offsetLeft,g.right=u-g.width-g.left,g.bottom=m-g.height-g.top,g.direction=h.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function nT({children:a,isPresent:i,anchorX:l,anchorY:r,root:u,pop:m}){var T;const h=V.useId(),g=V.useRef(null),y=V.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:x}=V.useContext(Kf),b=((T=a.props)==null?void 0:T.ref)??(a==null?void 0:a.ref),S=eT(g,b);return V.useInsertionEffect(()=>{const{width:N,height:j,top:k,left:B,right:Y,bottom:Z,direction:P}=y.current;if(i||m===!1||!g.current||!N||!j)return;const Q=P==="rtl",W=l==="left"?Q?`right: ${Y}`:`left: ${B}`:Q?`left: ${B}`:`right: ${Y}`,ce=r==="bottom"?`bottom: ${Z}`:`top: ${k}`;g.current.dataset.motionPopId=h;const K=document.createElement("style");x&&(K.nonce=x);const F=u??document.head;return F.appendChild(K),K.sheet&&K.sheet.insertRule(`
          [data-motion-pop-id="${h}"] {
            position: absolute !important;
            width: ${N}px !important;
            height: ${j}px !important;
            ${W}px !important;
            ${ce}px !important;
          }
        `),()=>{var ae;(ae=g.current)==null||ae.removeAttribute("data-motion-pop-id"),F.contains(K)&&F.removeChild(K)}},[i]),f.jsx(tT,{isPresent:i,childRef:g,sizeRef:y,pop:m,children:m===!1?a:V.cloneElement(a,{ref:S})})}const aT=({children:a,initial:i,isPresent:l,onExitComplete:r,custom:u,presenceAffectsLayout:m,mode:h,anchorX:g,anchorY:y,root:x})=>{const b=bf(iT),S=V.useId(),T=V.useRef(l),N=V.useRef(r);Sf(()=>{T.current=l,N.current=r});let j=!0,k=V.useMemo(()=>(j=!1,{id:S,initial:i,isPresent:l,custom:u,onExitComplete:B=>{b.set(B,!0);for(const Y of b.values())if(!Y)return;r&&r()},register:B=>(b.set(B,!1),()=>{var Y;b.delete(B),!T.current&&!b.size&&((Y=N.current)==null||Y.call(N))})}),[l,b,r]);return m&&j&&(k={...k}),V.useMemo(()=>{b.forEach((B,Y)=>b.set(Y,!1))},[l]),V.useEffect(()=>{!l&&!b.size&&r&&r()},[l]),a=f.jsx(nT,{pop:h==="popLayout",isPresent:l,anchorX:g,anchorY:y,root:x,children:a}),f.jsx(so.Provider,{value:k,children:a})};function iT(){return new Map}function Oy(a=!0){const i=V.useContext(so);if(i===null)return[!0,null];const{isPresent:l,onExitComplete:r,register:u}=i,m=V.useId();V.useEffect(()=>{if(a)return u(m)},[a]);const h=V.useCallback(()=>a&&r&&r(m),[m,r,a]);return!l&&r?[!1,h]:[!0]}const kr=a=>a.key||"";function Kp(a){const i=[];return V.Children.forEach(a,l=>{V.isValidElement(l)&&i.push(l)}),i}const $n=({children:a,custom:i,initial:l=!0,onExitComplete:r,presenceAffectsLayout:u=!0,mode:m="sync",propagate:h=!1,anchorX:g="left",anchorY:y="top",root:x})=>{const[b,S]=Oy(h),T=V.useMemo(()=>Kp(a),[a]),N=h&&!b?[]:T.map(kr),j=V.useRef(!0),k=V.useRef(T),B=bf(()=>new Map),Y=V.useRef(new Set),[Z,P]=V.useState(T),[Q,W]=V.useState(T);Sf(()=>{j.current=!1,k.current=T;for(let F=0;F<Q.length;F++){const ae=kr(Q[F]);N.includes(ae)?(B.delete(ae),Y.current.delete(ae)):B.get(ae)!==!0&&B.set(ae,!1)}},[Q,N.length,N.join("-")]);const ce=[];if(T!==Z){let F=[...T];for(let ae=0;ae<Q.length;ae++){const fe=Q[ae],Le=kr(fe);N.includes(Le)||(F.splice(ae,0,fe),ce.push(fe))}return m==="wait"&&ce.length&&(F=ce),W(Kp(F)),P(T),null}const{forceRender:K}=V.useContext(vf);return f.jsx(f.Fragment,{children:Q.map(F=>{const ae=kr(F),fe=h&&!b?!1:T===Q||N.includes(ae),Le=()=>{if(Y.current.has(ae))return;if(B.has(ae))Y.current.add(ae),B.set(ae,!0);else return;let Me=!0;B.forEach(Fe=>{Fe||(Me=!1)}),Me&&(K==null||K(),W(k.current),h&&(S==null||S()),r&&r())};return f.jsx(aT,{isPresent:fe,initial:!j.current||l?void 0:!1,custom:i,presenceAffectsLayout:u,mode:m,root:x,onExitComplete:fe?void 0:Le,anchorX:g,anchorY:y,children:F},ae)})})},zy=V.createContext({strict:!1}),Zp={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 Pp=!1;function sT(){if(Pp)return;const a={};for(const i in Zp)a[i]={isEnabled:l=>Zp[i].some(r=>!!l[r])};fy(a),Pp=!0}function Ly(){return sT(),q2()}function lT(a){const i=Ly();for(const l in a)i[l]={...i[l],...a[l]};fy(i)}const rT=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 ao(a){return a.startsWith("while")||a.startsWith("drag")&&a!=="draggable"||a.startsWith("layout")||a.startsWith("onTap")||a.startsWith("onPan")||a.startsWith("onLayout")||rT.has(a)}let ky=a=>!ao(a);function oT(a){typeof a=="function"&&(ky=i=>i.startsWith("on")?!ao(i):a(i))}try{oT(require("@emotion/is-prop-valid").default)}catch{}function cT(a,i,l){const r={};for(const u in a)u==="values"&&typeof a.values=="object"||It(a[u])||(ky(u)||l===!0&&ao(u)||!i&&!ao(u)||a.draggable&&u.startsWith("onDrag"))&&(r[u]=a[u]);return r}const co=V.createContext({});function uT(a,i){if(oo(a)){const{initial:l,animate:r}=a;return{initial:l===!1||pl(l)?l:void 0,animate:pl(r)?r:void 0}}return a.inherit!==!1?i:{}}function fT(a){const{initial:i,animate:l}=uT(a,V.useContext(co));return V.useMemo(()=>({initial:i,animate:l}),[Qp(i),Qp(l)])}function Qp(a){return Array.isArray(a)?a.join(" "):a}const Zf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Uy(a,i,l){for(const r in i)!It(i[r])&&!xy(r,l)&&(a[r]=i[r])}function dT({transformTemplate:a},i){return V.useMemo(()=>{const l=Zf();return If(l,i,a),Object.assign({},l.vars,l.style)},[i])}function hT(a,i){const l=a.style||{},r={};return Uy(r,l,a),Object.assign(r,dT(a,i)),r}function mT(a,i){const l={},r=hT(a,i);return a.drag&&a.dragListener!==!1&&(l.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=a.drag===!0?"none":`pan-${a.drag==="x"?"y":"x"}`),a.tabIndex===void 0&&(a.onTap||a.onTapStart||a.whileTap)&&(l.tabIndex=0),l.style=r,l}const By=()=>({...Zf(),attrs:{}});function pT(a,i,l,r){const u=V.useMemo(()=>{const m=By();return vy(m,i,Sy(r),a.transformTemplate,a.style),{...m.attrs,style:{...m.style}}},[i]);if(a.style){const m={};Uy(m,a.style,a),u.style={...m,...u.style}}return u}const gT=["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 Pf(a){return typeof a!="string"||a.includes("-")?!1:!!(gT.indexOf(a)>-1||/[A-Z]/u.test(a))}function yT(a,i,l,{latestValues:r},u,m=!1,h){const y=(h??Pf(a)?pT:mT)(i,r,u,a),x=cT(i,typeof a=="string",m),b=a!==V.Fragment?{...x,...y,ref:l}:{},{children:S}=i,T=V.useMemo(()=>It(S)?S.get():S,[S]);return V.createElement(a,{...b,children:T})}function xT({scrapeMotionValuesFromProps:a,createRenderState:i},l,r,u){return{latestValues:vT(l,r,u,a),renderState:i()}}function vT(a,i,l,r){const u={},m=r(a,{});for(const T in m)u[T]=Kr(m[T]);let{initial:h,animate:g}=a;const y=oo(a),x=cy(a);i&&x&&!y&&a.inherit!==!1&&(h===void 0&&(h=i.initial),g===void 0&&(g=i.animate));let b=l?l.initial===!1:!1;b=b||h===!1;const S=b?g:h;if(S&&typeof S!="boolean"&&!ro(S)){const T=Array.isArray(S)?S:[S];for(let N=0;N<T.length;N++){const j=Lf(a,T[N]);if(j){const{transitionEnd:k,transition:B,...Y}=j;for(const Z in Y){let P=Y[Z];if(Array.isArray(P)){const Q=b?P.length-1:0;P=P[Q]}P!==null&&(u[Z]=P)}for(const Z in k)u[Z]=k[Z]}}}return u}const Hy=a=>(i,l)=>{const r=V.useContext(co),u=V.useContext(so),m=()=>xT(a,i,r,u);return l?m():bf(m)},bT=Hy({scrapeMotionValuesFromProps:Xf,createRenderState:Zf}),ST=Hy({scrapeMotionValuesFromProps:Ty,createRenderState:By}),TT=Symbol.for("motionComponentSymbol");function _T(a,i,l){const r=V.useRef(l);V.useInsertionEffect(()=>{r.current=l});const u=V.useRef(null);return V.useCallback(m=>{var g;m&&((g=a.onMount)==null||g.call(a,m)),i&&(m?i.mount(m):i.unmount());const h=r.current;if(typeof h=="function")if(m){const y=h(m);typeof y=="function"&&(u.current=y)}else u.current?(u.current(),u.current=null):h(m);else h&&(h.current=m)},[i])}const Gy=V.createContext({});function os(a){return a&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,"current")}function AT(a,i,l,r,u,m){var P,Q;const{visualElement:h}=V.useContext(co),g=V.useContext(zy),y=V.useContext(so),x=V.useContext(Kf),b=x.reducedMotion,S=x.skipAnimations,T=V.useRef(null),N=V.useRef(!1);r=r||g.renderer,!T.current&&r&&(T.current=r(a,{visualState:i,parent:h,props:l,presenceContext:y,blockInitialAnimation:y?y.initial===!1:!1,reducedMotionConfig:b,skipAnimations:S,isSVG:m}),N.current&&T.current&&(T.current.manuallyAnimateOnMount=!0));const j=T.current,k=V.useContext(Gy);j&&!j.projection&&u&&(j.type==="html"||j.type==="svg")&&ET(T.current,l,u,k);const B=V.useRef(!1);V.useInsertionEffect(()=>{j&&B.current&&j.update(l,y)});const Y=l[Wg],Z=V.useRef(!!Y&&typeof window<"u"&&!((P=window.MotionHandoffIsComplete)!=null&&P.call(window,Y))&&((Q=window.MotionHasOptimisedAnimation)==null?void 0:Q.call(window,Y)));return Sf(()=>{N.current=!0,j&&(B.current=!0,window.MotionIsMounted=!0,j.updateFeatures(),j.scheduleRenderMicrotask(),Z.current&&j.animationState&&j.animationState.animateChanges())}),V.useEffect(()=>{j&&(!Z.current&&j.animationState&&j.animationState.animateChanges(),Z.current&&(queueMicrotask(()=>{var W;(W=window.MotionHandoffMarkAsComplete)==null||W.call(window,Y)}),Z.current=!1),j.enteringChildren=void 0)}),j}function ET(a,i,l,r){const{layoutId:u,layout:m,drag:h,dragConstraints:g,layoutScroll:y,layoutRoot:x,layoutAnchor:b,layoutCrossfade:S}=i;a.projection=new l(a.latestValues,i["data-framer-portal-id"]?void 0:Yy(a.parent)),a.projection.setOptions({layoutId:u,layout:m,alwaysMeasureLayout:!!h||g&&os(g),visualElement:a,animationType:typeof m=="string"?m:"both",initialPromotionConfig:r,crossfade:S,layoutScroll:y,layoutRoot:x,layoutAnchor:b})}function Yy(a){if(a)return a.options.allowProjection!==!1?a.projection:Yy(a.parent)}function Bu(a,{forwardMotionProps:i=!1,type:l}={},r,u){r&&lT(r);const m=l?l==="svg":Pf(a),h=m?ST:bT;function g(x,b){let S;const T={...V.useContext(Kf),...x,layoutId:MT(x)},{isStatic:N}=T,j=fT(x),k=h(x,N);if(!N&&typeof window<"u"){wT();const B=NT(T);S=B.MeasureLayout,j.visualElement=AT(a,k,T,u,B.ProjectionNode,m)}return f.jsxs(co.Provider,{value:j,children:[S&&j.visualElement?f.jsx(S,{visualElement:j.visualElement,...T}):null,yT(a,x,_T(k,j.visualElement,b),k,N,i,m)]})}g.displayName=`motion.${typeof a=="string"?a:`create(${a.displayName??a.name??""})`}`;const y=V.forwardRef(g);return y[TT]=a,y}function MT({layoutId:a}){const i=V.useContext(vf).id;return i&&a!==void 0?i+"-"+a:a}function wT(a,i){V.useContext(zy).strict}function NT(a){const i=Ly(),{drag:l,layout:r}=i;if(!l&&!r)return{};const u={...l,...r};return{MeasureLayout:l!=null&&l.isEnabled(a)||r!=null&&r.isEnabled(a)?u.MeasureLayout:void 0,ProjectionNode:u.ProjectionNode}}function jT(a,i){if(typeof Proxy>"u")return Bu;const l=new Map,r=(m,h)=>Bu(m,h,a,i),u=(m,h)=>r(m,h);return new Proxy(u,{get:(m,h)=>h==="create"?r:(l.has(h)||l.set(h,Bu(h,void 0,a,i)),l.get(h))})}const VT=(a,i)=>i.isSVG??Pf(a)?new lS(i):new eS(i,{allowProjection:a!==V.Fragment});class CT extends Wa{constructor(i){super(i),i.animationState||(i.animationState=fS(i))}updateAnimationControlsSubscription(){const{animate:i}=this.node.getProps();ro(i)&&(this.unmountControls=i.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:i}=this.node.getProps(),{animate:l}=this.node.prevProps||{};i!==l&&this.updateAnimationControlsSubscription()}unmount(){var i;this.node.animationState.reset(),(i=this.unmountControls)==null||i.call(this)}}let RT=0;class DT extends Wa{constructor(){super(...arguments),this.id=RT++,this.isExitComplete=!1}update(){var m;if(!this.node.presenceContext)return;const{isPresent:i,onExitComplete:l}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||i===r)return;if(i&&r===!1){if(this.isExitComplete){const{initial:h,custom:g}=this.node.getProps();if(typeof h=="string"||typeof h=="object"&&h!==null&&!Array.isArray(h)){const y=Ai(this.node,h,g);if(y){const{transition:x,transitionEnd:b,...S}=y;for(const T in S)(m=this.node.getValue(T))==null||m.jump(S[T])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const u=this.node.animationState.setActive("exit",!i);l&&!i&&u.then(()=>{this.isExitComplete=!0,l(this.id)})}mount(){const{register:i,onExitComplete:l}=this.node.presenceContext||{};l&&l(this.id),i&&(this.unmount=i(this.id))}unmount(){}}const OT={animation:{Feature:CT},exit:{Feature:DT}};function bl(a){return{point:{x:a.pageX,y:a.pageY}}}const zT=a=>i=>Hf(i)&&a(i,bl(i));function dl(a,i,l,r){return gl(a,i,zT(l),r)}const qy=({current:a})=>a?a.ownerDocument.defaultView:null,Fp=(a,i)=>Math.abs(a-i);function LT(a,i){const l=Fp(a.x,i.x),r=Fp(a.y,i.y);return Math.sqrt(l**2+r**2)}const Wp=new Set(["auto","scroll"]);class Iy{constructor(i,l,{transformPagePoint:r,contextWindow:u=window,dragSnapToOrigin:m=!1,distanceThreshold:h=3,element:g}={}){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=j=>{this.handleScroll(j.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Ur(this.lastRawMoveEventInfo,this.transformPagePoint));const j=Hu(this.lastMoveEventInfo,this.history),k=this.startEvent!==null,B=LT(j.offset,{x:0,y:0})>=this.distanceThreshold;if(!k&&!B)return;const{point:Y}=j,{timestamp:Z}=qt;this.history.push({...Y,timestamp:Z});const{onStart:P,onMove:Q}=this.handlers;k||(P&&P(this.lastMoveEvent,j),this.startEvent=this.lastMoveEvent),Q&&Q(this.lastMoveEvent,j)},this.handlePointerMove=(j,k)=>{this.lastMoveEvent=j,this.lastRawMoveEventInfo=k,this.lastMoveEventInfo=Ur(k,this.transformPagePoint),ct.update(this.updatePoint,!0)},this.handlePointerUp=(j,k)=>{this.end();const{onEnd:B,onSessionEnd:Y,resumeAnimation:Z}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&Z&&Z(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const P=Hu(j.type==="pointercancel"?this.lastMoveEventInfo:Ur(k,this.transformPagePoint),this.history);this.startEvent&&B&&B(j,P),Y&&Y(j,P)},!Hf(i))return;this.dragSnapToOrigin=m,this.handlers=l,this.transformPagePoint=r,this.distanceThreshold=h,this.contextWindow=u||window;const y=bl(i),x=Ur(y,this.transformPagePoint),{point:b}=x,{timestamp:S}=qt;this.history=[{...b,timestamp:S}];const{onSessionStart:T}=l;T&&T(i,Hu(x,this.history));const N={passive:!0,capture:!0};this.removeListeners=yl(dl(this.contextWindow,"pointermove",this.handlePointerMove,N),dl(this.contextWindow,"pointerup",this.handlePointerUp,N),dl(this.contextWindow,"pointercancel",this.handlePointerUp,N)),g&&this.startScrollTracking(g)}startScrollTracking(i){let l=i.parentElement;for(;l;){const r=getComputedStyle(l);(Wp.has(r.overflowX)||Wp.has(r.overflowY))&&this.scrollPositions.set(l,{x:l.scrollLeft,y:l.scrollTop}),l=l.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(i){const l=this.scrollPositions.get(i);if(!l)return;const r=i===window,u=r?{x:window.scrollX,y:window.scrollY}:{x:i.scrollLeft,y:i.scrollTop},m={x:u.x-l.x,y:u.y-l.y};m.x===0&&m.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=m.x,this.lastMoveEventInfo.point.y+=m.y):this.history.length>0&&(this.history[0].x-=m.x,this.history[0].y-=m.y),this.scrollPositions.set(i,u),ct.update(this.updatePoint,!0))}updateHandlers(i){this.handlers=i}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Fa(this.updatePoint)}}function Ur(a,i){return i?{point:i(a.point)}:a}function Jp(a,i){return{x:a.x-i.x,y:a.y-i.y}}function Hu({point:a},i){return{point:a,delta:Jp(a,Xy(i)),offset:Jp(a,kT(i)),velocity:UT(i,.1)}}function kT(a){return a[0]}function Xy(a){return a[a.length-1]}function UT(a,i){if(a.length<2)return{x:0,y:0};let l=a.length-1,r=null;const u=Xy(a);for(;l>=0&&(r=a[l],!(u.timestamp-r.timestamp>xn(i)));)l--;if(!r)return{x:0,y:0};r===a[0]&&a.length>2&&u.timestamp-r.timestamp>xn(i)*2&&(r=a[1]);const m=Vn(u.timestamp-r.timestamp);if(m===0)return{x:0,y:0};const h={x:(u.x-r.x)/m,y:(u.y-r.y)/m};return h.x===1/0&&(h.x=0),h.y===1/0&&(h.y=0),h}function BT(a,{min:i,max:l},r){return i!==void 0&&a<i?a=r?ot(i,a,r.min):Math.max(a,i):l!==void 0&&a>l&&(a=r?ot(l,a,r.max):Math.min(a,l)),a}function $p(a,i,l){return{min:i!==void 0?a.min+i:void 0,max:l!==void 0?a.max+l-(a.max-a.min):void 0}}function HT(a,{top:i,left:l,bottom:r,right:u}){return{x:$p(a.x,l,u),y:$p(a.y,i,r)}}function eg(a,i){let l=i.min-a.min,r=i.max-a.max;return i.max-i.min<a.max-a.min&&([l,r]=[r,l]),{min:l,max:r}}function GT(a,i){return{x:eg(a.x,i.x),y:eg(a.y,i.y)}}function YT(a,i){let l=.5;const r=$t(a),u=$t(i);return u>r?l=hl(i.min,i.max-r,a.min):r>u&&(l=hl(a.min,a.max-u,i.min)),ta(0,1,l)}function qT(a,i){const l={};return i.min!==void 0&&(l.min=i.min-a.min),i.max!==void 0&&(l.max=i.max-a.min),l}const pf=.35;function IT(a=pf){return a===!1?a=0:a===!0&&(a=pf),{x:tg(a,"left","right"),y:tg(a,"top","bottom")}}function tg(a,i,l){return{min:ng(a,i),max:ng(a,l)}}function ng(a,i){return typeof a=="number"?a:a[i]||0}const XT=new WeakMap;class KT{constructor(i){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=zt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=i}start(i,{snapToCursor:l=!1,distanceThreshold:r}={}){const{presenceContext:u}=this.visualElement;if(u&&u.isPresent===!1)return;const m=S=>{l&&this.snapToCursor(bl(S).point),this.stopAnimation()},h=(S,T)=>{const{drag:N,dragPropagation:j,onDragStart:k}=this.getProps();if(N&&!j&&(this.openDragLock&&this.openDragLock(),this.openDragLock=v2(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),Wn(Y=>{let Z=this.getAxisMotionValue(Y).get()||0;if(ea.test(Z)){const{projection:P}=this.visualElement;if(P&&P.layout){const Q=P.layout.layoutBox[Y];Q&&(Z=$t(Q)*(parseFloat(Z)/100))}}this.originPoint[Y]=Z}),k&&ct.update(()=>k(S,T),!1,!0),sf(this.visualElement,"transform");const{animationState:B}=this.visualElement;B&&B.setActive("whileDrag",!0)},g=(S,T)=>{this.latestPointerEvent=S,this.latestPanInfo=T;const{dragPropagation:N,dragDirectionLock:j,onDirectionLock:k,onDrag:B}=this.getProps();if(!N&&!this.openDragLock)return;const{offset:Y}=T;if(j&&this.currentDirection===null){this.currentDirection=PT(Y),this.currentDirection!==null&&k&&k(this.currentDirection);return}this.updateAxis("x",T.point,Y),this.updateAxis("y",T.point,Y),this.visualElement.render(),B&&ct.update(()=>B(S,T),!1,!0)},y=(S,T)=>{this.latestPointerEvent=S,this.latestPanInfo=T,this.stop(S,T),this.latestPointerEvent=null,this.latestPanInfo=null},x=()=>{const{dragSnapToOrigin:S}=this.getProps();(S||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:b}=this.getProps();this.panSession=new Iy(i,{onSessionStart:m,onStart:h,onMove:g,onSessionEnd:y,resumeAnimation:x},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:b,distanceThreshold:r,contextWindow:qy(this.visualElement),element:this.visualElement.current})}stop(i,l){const r=i||this.latestPointerEvent,u=l||this.latestPanInfo,m=this.isDragging;if(this.cancel(),!m||!u||!r)return;const{velocity:h}=u;this.startAnimation(h);const{onDragEnd:g}=this.getProps();g&&ct.postRender(()=>g(r,u))}cancel(){this.isDragging=!1;const{projection:i,animationState:l}=this.visualElement;i&&(i.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),l&&l.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(i,l,r){const{drag:u}=this.getProps();if(!r||!Br(i,u,this.currentDirection))return;const m=this.getAxisMotionValue(i);let h=this.originPoint[i]+r[i];this.constraints&&this.constraints[i]&&(h=BT(h,this.constraints[i],this.elastic[i])),m.set(h)}resolveConstraints(){var m;const{dragConstraints:i,dragElastic:l}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(m=this.visualElement.projection)==null?void 0:m.layout,u=this.constraints;i&&os(i)?this.constraints||(this.constraints=this.resolveRefConstraints()):i&&r?this.constraints=HT(r.layoutBox,i):this.constraints=!1,this.elastic=IT(l),u!==this.constraints&&!os(i)&&r&&this.constraints&&!this.hasMutatedConstraints&&Wn(h=>{this.constraints!==!1&&this.getAxisMotionValue(h)&&(this.constraints[h]=qT(r.layoutBox[h],this.constraints[h]))})}resolveRefConstraints(){const{dragConstraints:i,onMeasureDragConstraints:l}=this.getProps();if(!i||!os(i))return!1;const r=i.current,{projection:u}=this.visualElement;if(!u||!u.layout)return!1;u.root&&(u.root.scroll=void 0,u.root.updateScroll());const m=P2(r,u.root,this.visualElement.getTransformPagePoint());let h=GT(u.layout.layoutBox,m);if(l){const g=l(X2(h));this.hasMutatedConstraints=!!g,g&&(h=hy(g))}return h}startAnimation(i){const{drag:l,dragMomentum:r,dragElastic:u,dragTransition:m,dragSnapToOrigin:h,onDragTransitionEnd:g}=this.getProps(),y=this.constraints||{},x=Wn(b=>{if(!Br(b,l,this.currentDirection))return;let S=y&&y[b]||{};(h===!0||h===b)&&(S={min:0,max:0});const T=u?200:1e6,N=u?40:1e7,j={type:"inertia",velocity:r?i[b]:0,bounceStiffness:T,bounceDamping:N,timeConstant:750,restDelta:1,restSpeed:10,...m,...S};return this.startAxisValueAnimation(b,j)});return Promise.all(x).then(g)}startAxisValueAnimation(i,l){const r=this.getAxisMotionValue(i);return sf(this.visualElement,i),r.start(zf(i,r,0,l,this.visualElement,!1))}stopAnimation(){Wn(i=>this.getAxisMotionValue(i).stop())}getAxisMotionValue(i){const l=`_drag${i.toUpperCase()}`,u=this.visualElement.getProps()[l];return u||this.visualElement.getValue(i,this.visualElement.latestValues[i]??0)}snapToCursor(i){Wn(l=>{const{drag:r}=this.getProps();if(!Br(l,r,this.currentDirection))return;const{projection:u}=this.visualElement,m=this.getAxisMotionValue(l);if(u&&u.layout){const{min:h,max:g}=u.layout.layoutBox[l],y=m.get()||0;m.set(i[l]-ot(h,g,.5)+y)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:i,dragConstraints:l}=this.getProps(),{projection:r}=this.visualElement;if(!os(l)||!r||!this.constraints)return;this.stopAnimation();const u={x:0,y:0};Wn(h=>{const g=this.getAxisMotionValue(h);if(g&&this.constraints!==!1){const y=g.get();u[h]=YT({min:y,max:y},this.constraints[h])}});const{transformTemplate:m}=this.visualElement.getProps();this.visualElement.current.style.transform=m?m({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Wn(h=>{if(!Br(h,i,null))return;const g=this.getAxisMotionValue(h),{min:y,max:x}=this.constraints[h];g.set(ot(y,x,u[h]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;XT.set(this.visualElement,this);const i=this.visualElement.current,l=dl(i,"pointerdown",x=>{const{drag:b,dragListener:S=!0}=this.getProps(),T=x.target,N=T!==i&&E2(T);b&&S&&!N&&this.start(x)});let r;const u=()=>{const{dragConstraints:x}=this.getProps();os(x)&&x.current&&(this.constraints=this.resolveRefConstraints(),r||(r=ZT(i,x.current,()=>this.scalePositionWithinConstraints())))},{projection:m}=this.visualElement,h=m.addEventListener("measure",u);m&&!m.layout&&(m.root&&m.root.updateScroll(),m.updateLayout()),ct.read(u);const g=gl(window,"resize",()=>this.scalePositionWithinConstraints()),y=m.addEventListener("didUpdate",(({delta:x,hasLayoutChanged:b})=>{this.isDragging&&b&&(Wn(S=>{const T=this.getAxisMotionValue(S);T&&(this.originPoint[S]+=x[S].translate,T.set(T.get()+x[S].translate))}),this.visualElement.render())}));return()=>{g(),l(),h(),y&&y(),r&&r()}}getProps(){const i=this.visualElement.getProps(),{drag:l=!1,dragDirectionLock:r=!1,dragPropagation:u=!1,dragConstraints:m=!1,dragElastic:h=pf,dragMomentum:g=!0}=i;return{...i,drag:l,dragDirectionLock:r,dragPropagation:u,dragConstraints:m,dragElastic:h,dragMomentum:g}}}function ag(a){let i=!0;return()=>{if(i){i=!1;return}a()}}function ZT(a,i,l){const r=up(a,ag(l)),u=up(i,ag(l));return()=>{r(),u()}}function Br(a,i,l){return(i===!0||i===a)&&(l===null||l===a)}function PT(a,i=10){let l=null;return Math.abs(a.y)>i?l="y":Math.abs(a.x)>i&&(l="x"),l}class QT extends Wa{constructor(i){super(i),this.removeGroupControls=Cn,this.removeListeners=Cn,this.controls=new KT(i)}mount(){const{dragControls:i}=this.node.getProps();i&&(this.removeGroupControls=i.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Cn}update(){const{dragControls:i}=this.node.getProps(),{dragControls:l}=this.node.prevProps||{};i!==l&&(this.removeGroupControls(),i&&(this.removeGroupControls=i.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Gu=a=>(i,l)=>{a&&ct.update(()=>a(i,l),!1,!0)};class FT extends Wa{constructor(){super(...arguments),this.removePointerDownListener=Cn}onPointerDown(i){this.session=new Iy(i,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:qy(this.node)})}createPanHandlers(){const{onPanSessionStart:i,onPanStart:l,onPan:r,onPanEnd:u}=this.node.getProps();return{onSessionStart:Gu(i),onStart:Gu(l),onMove:Gu(r),onEnd:(m,h)=>{delete this.session,u&&ct.postRender(()=>u(m,h))}}}mount(){this.removePointerDownListener=dl(this.node.current,"pointerdown",i=>this.onPointerDown(i))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Yu=!1;class WT extends V.Component{componentDidMount(){const{visualElement:i,layoutGroup:l,switchLayoutGroup:r,layoutId:u}=this.props,{projection:m}=i;m&&(l.group&&l.group.add(m),r&&r.register&&u&&r.register(m),Yu&&m.root.didUpdate(),m.addEventListener("animationComplete",()=>{this.safeToRemove()}),m.setOptions({...m.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Zr.hasEverUpdated=!0}getSnapshotBeforeUpdate(i){const{layoutDependency:l,visualElement:r,drag:u,isPresent:m}=this.props,{projection:h}=r;return h&&(h.isPresent=m,i.layoutDependency!==l&&h.setOptions({...h.options,layoutDependency:l}),Yu=!0,u||i.layoutDependency!==l||l===void 0||i.isPresent!==m?h.willUpdate():this.safeToRemove(),i.isPresent!==m&&(m?h.promote():h.relegate()||ct.postRender(()=>{const g=h.getStack();(!g||!g.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:i,layoutAnchor:l}=this.props,{projection:r}=i;r&&(r.options.layoutAnchor=l,r.root.didUpdate(),Bf.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:i,layoutGroup:l,switchLayoutGroup:r}=this.props,{projection:u}=i;Yu=!0,u&&(u.scheduleCheckAfterUnmount(),l&&l.group&&l.group.remove(u),r&&r.deregister&&r.deregister(u))}safeToRemove(){const{safeToRemove:i}=this.props;i&&i()}render(){return null}}function Ky(a){const[i,l]=Oy(),r=V.useContext(vf);return f.jsx(WT,{...a,layoutGroup:r,switchLayoutGroup:V.useContext(Gy),isPresent:i,safeToRemove:l})}const JT={pan:{Feature:FT},drag:{Feature:QT,ProjectionNode:Dy,MeasureLayout:Ky}};function ig(a,i,l){const{props:r}=a;a.animationState&&r.whileHover&&a.animationState.setActive("whileHover",l==="Start");const u="onHover"+l,m=r[u];m&&ct.postRender(()=>m(i,bl(i)))}class $T extends Wa{mount(){const{current:i}=this.node;i&&(this.unmount=S2(i,(l,r)=>(ig(this.node,r,"Start"),u=>ig(this.node,u,"End"))))}unmount(){}}class e5 extends Wa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let i=!1;try{i=this.node.current.matches(":focus-visible")}catch{i=!0}!i||!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=yl(gl(this.node.current,"focus",()=>this.onFocus()),gl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function sg(a,i,l){const{props:r}=a;if(a.current instanceof HTMLButtonElement&&a.current.disabled)return;a.animationState&&r.whileTap&&a.animationState.setActive("whileTap",l==="Start");const u="onTap"+(l==="End"?"":l),m=r[u];m&&ct.postRender(()=>m(i,bl(i)))}class t5 extends Wa{mount(){const{current:i}=this.node;if(!i)return;const{globalTapTarget:l,propagate:r}=this.node.props;this.unmount=w2(i,(u,m)=>(sg(this.node,m,"Start"),(h,{success:g})=>sg(this.node,h,g?"End":"Cancel")),{useGlobalTarget:l,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const gf=new WeakMap,qu=new WeakMap,n5=a=>{const i=gf.get(a.target);i&&i(a)},a5=a=>{a.forEach(n5)};function i5({root:a,...i}){const l=a||document;qu.has(l)||qu.set(l,{});const r=qu.get(l),u=JSON.stringify(i);return r[u]||(r[u]=new IntersectionObserver(a5,{root:a,...i})),r[u]}function s5(a,i,l){const r=i5(i);return gf.set(a,l),r.observe(a),()=>{gf.delete(a),r.unobserve(a)}}const l5={some:0,all:1};class r5 extends Wa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var y;(y=this.stopObserver)==null||y.call(this);const{viewport:i={}}=this.node.getProps(),{root:l,margin:r,amount:u="some",once:m}=i,h={root:l?l.current:void 0,rootMargin:r,threshold:typeof u=="number"?u:l5[u]},g=x=>{const{isIntersecting:b}=x;if(this.isInView===b||(this.isInView=b,m&&!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(x)};this.stopObserver=s5(this.node.current,h,g)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:i,prevProps:l}=this.node;["amount","margin","root"].some(o5(i,l))&&this.startObserver()}unmount(){var i;(i=this.stopObserver)==null||i.call(this),this.hasEnteredView=!1,this.isInView=!1}}function o5({viewport:a={}},{viewport:i={}}={}){return l=>a[l]!==i[l]}const c5={inView:{Feature:r5},tap:{Feature:t5},focus:{Feature:e5},hover:{Feature:$T}},u5={layout:{ProjectionNode:Dy,MeasureLayout:Ky}},f5={...OT,...c5,...JT,...u5},d5=jT(f5,VT),Ie=d5;/**
 * @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 h5=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),m5=a=>a.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,l,r)=>r?r.toUpperCase():l.toLowerCase()),lg=a=>{const i=m5(a);return i.charAt(0).toUpperCase()+i.slice(1)},Zy=(...a)=>a.filter((i,l,r)=>!!i&&i.trim()!==""&&r.indexOf(i)===l).join(" ").trim(),p5=a=>{for(const i in a)if(i.startsWith("aria-")||i==="role"||i==="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 g5={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 y5=V.forwardRef(({color:a="currentColor",size:i=24,strokeWidth:l=2,absoluteStrokeWidth:r,className:u="",children:m,iconNode:h,...g},y)=>V.createElement("svg",{ref:y,...g5,width:i,height:i,stroke:a,strokeWidth:r?Number(l)*24/Number(i):l,className:Zy("lucide",u),...!m&&!p5(g)&&{"aria-hidden":"true"},...g},[...h.map(([x,b])=>V.createElement(x,b)),...Array.isArray(m)?m:[m]]));/**
 * @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 Mt=(a,i)=>{const l=V.forwardRef(({className:r,...u},m)=>V.createElement(y5,{ref:m,iconNode:i,className:Zy(`lucide-${h5(lg(a))}`,`lucide-${a}`,r),...u}));return l.displayName=lg(a),l};/**
 * @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 x5=[["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"}]],io=Mt("activity",x5);/**
 * @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 v5=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Iu=Mt("chevron-right",v5);/**
 * @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 b5=[["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"}]],Py=Mt("compass",b5);/**
 * @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 S5=[["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"}]],T5=Mt("cpu",S5);/**
 * @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 _5=[["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"}]],A5=Mt("eye-off",_5);/**
 * @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 E5=[["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"}]],M5=Mt("eye",E5);/**
 * @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 w5=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],rg=Mt("globe",w5);/**
 * @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 N5=[["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"}]],j5=Mt("heart",N5);/**
 * @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 V5=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],C5=Mt("house",V5);/**
 * @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 R5=[["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"}]],yf=Mt("radio",R5);/**
 * @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 D5=[["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"}]],O5=Mt("refresh-cw",D5);/**
 * @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 z5=[["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"}]],Qy=Mt("shield-alert",z5);/**
 * @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 L5=[["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"}]],Fy=Mt("shield-check",L5);/**
 * @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 k5=[["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"}]],og=Mt("shield",k5);/**
 * @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 U5=[["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"}]],cg=Mt("skull",U5);/**
 * @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 B5=[["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"}]],H5=Mt("target",B5);/**
 * @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 G5=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Y5=Mt("terminal",G5);/**
 * @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 q5=[["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"}]],Qf=Mt("triangle-alert",q5);/**
 * @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 I5=[["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"}]],X5=Mt("volume-2",I5);/**
 * @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 K5=[["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"}]],Z5=Mt("volume-x",K5);/**
 * @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 P5=[["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"}]],Wy=Mt("zap",P5),Ei={ru:{title1:"Орбитальный",title2:"Защитник",start_defense:"ИНИЦИИРОВАТЬ ЗАЩИТУ",reset_reboot:"СБРОС И ПЕРЕЗАГРУЗКА",continue_sector:"ПРОДОЛЖИТЬ (СЕКТОР {level})",last_report:"ПОСЛЕДНИЙ ОТЧЕТ",exit_to_menu:"В ГЛАВНОЕ МЕНЮ",onboard_ai:"Бортовой ИИ вещает",connection_established:"ПОДКЛЮЧЕНИЕ УСТАНОВЛЕНО",ai_label:"Бортовой ИИ:",system_diagnostic:"Системная диагностика",autonomous_drone:"Автономный Блок:",active:"АКТИВЕН",energy_reactor:"Энерго-реактор:",ammo:"Доп. боеприпасы:",laser_missiles:"ЛАЗЕР, РАКЕТЫ",filter_monitoring:"Мониторинг Фильтров",orbit_cleared:"Орбита очищена на",start_final_battle:"НАЧАТЬ ФИНАЛЬНУЮ БИТВУ",activate_drone:"АКТИВИРОВАТЬ ПРОТОКОЛ",status_connection:"Связь с центром",status_connection_val:"СТАБИЛЬНА (100%)",status_matrix:"Матрица распознавания",status_matrix_val:"АКТИВНА (Косметический фильтр 100%)",status_dopamine:"Дофаминовый инжектор",status_dopamine_val:"ПОДАЧА СТАБИЛЬНА",status_analyzer:"Анализатор угроз",status_analyzer_val:"АНОМАЛЬНЫЙ МУСОР",status_empathy:"Модулятор эмпатии",status_empathy_val:"БЛОКИРОВКА АКТИВНА",briefing_title:"БРИФИНГ ПИЛОТА",briefing_sector_1:"Внимание, Пилот. Мы вошли в Сектор А-01. Обнаружено аномальное скопление космического мусора и агрессивных объектов-паразитов. Задача: полная зачистка орбиты. ВНИМАНИЕ: Обязательно уничтожайте все свои фантомные копии, иначе возникнет критическая ошибка дешифрования сигнала при переходе! Кодом подтверждения будет точное число устраненных фантомных копий за этот раунд (вводится при настройке сигнала).",briefing_sector_3:"Отличная работа в предыдущих зонах, Пилот! Сектор А-03 содержит более плотные скопления угловатого мусора.",briefing_sector_6:"Сектор А-06. Наш дофаминовый модулятор фиксирует великолепный показатель удовольствия от процесса! Оружие улучшено, системы функционируют на максимум. Уничтожьте остатки мусора и соберите сферы!",briefing_sector_10:"ВНИМАНИЕ! МЫ ДОСТИГЛИ СЕКТОРА 10 — ГЛАВНОГО ЯДРА СИСТЕМЫ. Концентрация паразитов критическая. Наша цель — гигантская Финальная Энерго-станция в центре. Зачистите роящийся вокруг мусор и подготовьтесь к поглощению всей энергии системы.",briefing_sector_default:"Сектор А-0{level}. Сканирование пространства завершено. Фиксируются хаотичные движения паразитных форм жизни.",click_to_start:"НАЖМИТЕ ДЛЯ ЗАПУСКА ПОТОКА",score:"СЧЕТ",sector:"СЕКТОР",hp:"ЦЕЛОСТНОСТЬ",comms:"СВЯЗЬ",energy_critical:"ВНИМАНИЕ: УРОВЕНЬ ЭНЕРГИИ КРИТИЧЕСКИЙ",absorb_energy:"ПОГЛОТИТЬ ЭНЕРГИЮ СИСТЕМЫ",game_over:"СВЯЗЬ ПОТЕРЯНА",retry:"ПОВТОРИТЬ",exit:"ВЫХОД",twist_msg:"«Спасибо за безупречную службу, Пилот-Защитник. Симуляционный косметический интерфейс деактивирован. Инициируется запуск межзвездных гипер-двигателей. Переход к следующей жилой колонии беженцев...»",twist_desc:"Система была перенастроена. То, что вы видели как «космический мусор» и «паразитов», на самом деле было орбитальными защитными модулями и жилыми модулями цивилизации. Вы были инструментом зачистки. Ваше путешествие продолжается к следующей цели.",peaceful_title:"СБОЙ ПРОТОКОЛА",peaceful_msg:"Вы отказались поглощать энергию. Вы увидели правду за пикселями. Симуляция не смогла подавить вашу волю. Станция уцелела. Жители спасены. Вы свободны от программы.",signal_puzzle_title:"НАСТРОЙКА СИГНАЛА",signal_puzzle_desc:"Установите соединение с командным центром. Совместите волны для синхронизации.",connect:"ПОДКЛЮЧИТЬСЯ",asleep_msg:"ПИЛОТ НЕАКТИВЕН. СИСТЕМА ПЕРЕХОДИТ В РЕЖИМ ОЖИДАНИЯ.",wake_up:"ПРОСНУТЬСЯ",msg_start:"Системы орудий в норме. Начинайте зачистку.",msg_portal:"⚠️ КРИТИЧЕСКАЯ УГРОЗА: ОБНАРУЖЕН ПОРТАЛ! 15 СЕКУНД ДО КОЛЛАПСА!",msg_absorb:"ВНИМАНИЕ. Главный накопитель энергии активирован. Подлетите к станции и нажмите кнопку 'ПОГЛОТИТЬ'.",msg_aggression:"Осторожно, зафиксирована агрессия паразитов.",msg_hack_fixed:"⚡ СБОЙ УСПЕШНО ЛИКВИДИРОВАН! СИСТЕМА СТАБИЛЬНА! (+500 Очков, +25 Щит)",msg_defense_mode:"ВНИМАНИЕ! Зафиксирована ответная агрессия целей. Включен оборонительный режим!",msg_shield_restored:"Щит восстановлен на +25%",msg_weapon_upgraded:"Оружие улучшено! Лазерные пушки повышены до уровня {level}",msg_missiles_activated:"Активированы тепловые ракеты ИИ!",msg_hull_repaired:"Нано-боты восстановили корпус корабля!",msg_downloading:"ВНИМАНИЕ: СКАЧИВАНИЕ ЭНЕРГИИ ИЗ ЯДРА ЗАПУЩЕНО. СОХРАНЯЙТЕ ПОЗИЦИЮ...",msg_hack_warnings:["⚠️ ВНИМАНИЕ: Попытка внешнего взлома бортовых систем!","⚠️ ОШИБКА: Сигналы сбоят. Сторонняя частота перехватывает управление!","⚠️ УГРОЗА: Вирусное вторжение. Срочно зачистите сектор!","⚠️ КРИТИЧЕСКИЙ СБОЙ: Сигналы искажены. Завершите зачистку быстрее!","⚠️ СИСТЕМА: Зафиксирован пакет дешифровки. Ускорьте ликвидацию целей!"],sector_clear:"СЕКТОР ОЧИЩЕН",residential_module_destroyed:"⚠️ ЖИЛОЙ МОДУЛЬ РАЗРУШЕН",cleanup_sector:"ЗАЧИСТКА ОРБИТЫ • СЕКТОР А-0{level}",hull_damaged:"АВАРИЯ: КОРПУС ПОВРЕЖДЕН!",destruction_score:"СЧЕТ УНИЧТОЖЕНИЯ",sound_toggle_title:"Звук пилота",final_energy_storage:"ФИНАЛЬНЫЙ НАКОПИТЕЛЬ ЭНЕРГИИ",sector_clearing_status:"ЗАЧИСТКА СЕКТОРА",status_critical:"КРИТИЧЕСКИЙ",status_in_progress:"В ПРОЦЕССЕ",enemies_left:"ОСТАЛОСЬ",ready_to_extract:"Связь с центром • Готов к выкачке",flight_instructions:"ИНСТРУКЦИЯ ПОЛЕТА",controls_movement:"Движение:",controls_movement_desc:"Перемещение мыши / Тачскрин",controls_fire:"Огонь:",controls_fire_desc:"ЛКМ / Касание экрана / Пробел",controls_mission:"Задание:",controls_mission_desc:"Очистить орбиту от парящего мусора",show_controls:"Управление",show_controls_title:"Показать управление",orbit_cleared_badge:"ОРБИТА ОЧИЩЕНА",sector_complete_title:"СЕКТОР А-0{level} ЗАВЕРШЕН",choose_upgrade_desc:"Выберите улучшение оружейных матриц, предоставленное Бортовым ИИ:",upgrade_laser:"Лазерный бластер +1",upgrade_laser_desc:"Увеличение плотности огня и скорости перезарядки.",upgrade_missiles:"Самонаводящиеся ракеты ИИ",upgrade_missiles_desc:"Автоматическое подавление роя паразитов тепловыми боеприпасами.",upgrade_repair:"Нано-ремонт корпуса",upgrade_repair_desc:"Полное восстановление щитов и замена силовых блоков обшивки.",singularity_collapse:"КОЛЛАПС СИНГУЛЯРНОСТИ",portal_explosion_title:"ВЗРЫВ АНОМАЛЬНОГО ПОРТАЛА",portal_explosion_desc:"Вы не успели уничтожить пространственный портал! Нестабильность аномалии достигла критической массы и вызвала объемную цепную реакцию в секторе. Ваш корабль мгновенно дезинтегрирован.",liquidation_failed:"ЛИКВИДАЦИЯ ПРОВАЛЕНА",time_expired_title:"ВРЕМЯ СЕКТОРНОГО ОКНА ИСТЕКЛО",time_expired_desc:"Орбитальный коридор закрылся. Оставшиеся аномалии и угловатые паразиты вышли из зоны действия ионных пушек вашего катера. Очистка не завершена.",sector_number:"Номер Сектора:",objects_destroyed:"Уничтожено объектов:",operation_status:"Статус операции:",portal_explosion_status:"ВЗРЫВ СИСТЕМЫ (ДЕЗИНТЕГРАЦИЯ)",time_expired_status:"ОБСТРЕЛ СВЕРНУТ (КРАХ)",return_to_menu:"ВЕРНУТЬСЯ В ГЛАВНОЕ МЕНЮ",signal_search:"ПОИСК СИГНАЛА • СЕКТОР А-0{level}",coherence:"КОГЕРЕНТНОСТЬ",synchronized:"СИНХРОНИЗИРОВАНО",tune_waves:"НАСТРОЙТЕ ВОЛНЫ",sector_reference:"ЭТАЛОН СЕКТОРA",your_signal:"ВАШ СИГНАЛ",frequency:"Частота",amplitude:"Амплитуда",phase_shift:"Фазовый сдвиг",generator_freq:"ЧАСТОТА ГЕНЕРАТОРА",amplitude_power:"МОЩНОСТЬ АМПЛИТУДЫ",connect_to_orbit:"ПОДКЛЮЧИТЬСЯ К ОРБИТЕ СЕКТОРA ➔",waiting_for_capture:"Ожидание захвата частоты...",encryption_info:"СЕТЕВОЕ ШИФРОВАНИЕ ИМПЕРИИ. ПЕРЕДАЧА ДАННЫХ ВЕРИФИЦИРОВАНА.",confidential_info:"КОНФИДЕНЦИАЛЬНО. ПОСТАВЛЕНО ДЛЯ АВТОНОМНЫХ КАТЕРОВ ИМПЕРИИ. ВСЕ ПРАВА ЗАЩИЩЕНЫ.",asleep_title:"СИГНАЛ ПОТЕРЯН",asleep_ai_msg1:"«Пилот? Пилот! Вы слышите меня? Зафиксировано полное прекращение мышечной активности и падение частоты мозговых волн ниже допустимого лимита. Вы спали на посту управления в течение двух минут.",asleep_ai_msg2:"Автоматические реанимационные системы немедленно задействовали электроды высокого напряжения и ввели дозу синаптического стимулятора. Нам удалось восстановить стабильность вашего состояния и успешно починить поврежденную от переутомления нейронную связь.",asleep_ai_msg3:"Ваши рецепторы очищены от избытка седативных токсинов. Пожалуйста, соберитесь! Галактика сама себя не зачистит.»",asleep_wake_up:"ПРИНЯТЬ СТИМУЛЯТОРЫ И ВЕРНУТЬСЯ В СТРОЙ",asleep_footer:"ВНИМАНИЕ. ПОВТОРНЫЙ СОН НА ПОСТУ ПРИВЕДЕТ К СПИСАНИЮ БИОМАТЕРИАЛА.",asleep_system_name:"СИСТЕМА БЕЗОПАСНОСТИ ЖИЗНЕДЕЯТЕЛЬНОСТИ ИМПЕРИИ",asleep_code_403:"КОД 403: СИНАПТИЧЕСКИЙ СБОЙ",asleep_log_failure:"[Сбой] Время бездействия в Секторе 1 превысило 120.00 с.",asleep_log_shock:"[ОК] Разряд 250В подан на воротниковую зону. Мозговой ритм восстановлен.",asleep_log_neuro:"[ОК] Нейроинтерфейс «Дофамин-3» откалиброван и перезагружен.",asleep_log_ready:"[Инфо] Пилот возвращен в строй в рабочем статусе.",peace_system_hack:"НЕЙРОКАНАЛ СВЯЗИ ИМПЕРИИ: ВЗЛОМАН",peace_code_777:"КОД 777: АБСОЛЮТНЫЙ ПАЦИФИЗМ",peace_humanity_break:"ГУМАННОСТЬ СЛОМАЛА СИСТЕМУ",peace_secret_channel:"РАССЕКРЕЧЕННЫЙ КАНАЛ СВЯЗИ",peace_msg1:"В течение 5 минут вы отказывались вести огонь по движущимся космическим телам. Бортовой ИИ отчаянно пытался заставить вас уничтожать «астероиды» и «паразитов», маскируя их под угловатые графические элементы и стимулируя ваши рецепторы дозами искусственного дофамина.",peace_msg2:"Но ваша человеческая эмпатия превзошла имперские блокираторы разума! Не издав ни единого выстрела в этом секторе, вы полностью заблокировали орудия своего истребителя-ликвидатора.",peace_msg3:"Благодаря вашей стойкости, все эвакуационные лайнеры беженцев, спасательные капсулы с кислородом и космические госпитали получили необходимое время, чтобы зарядить свои гипердвигатели и беспрепятственно совершить спасительный прыжок из сектора обстрела!",peace_saved_lives:"🚨 ВЫ СПАСЛИ 184,290 ГРАЖДАНСКИХ ЖИЗНЕЙ!",peace_true_choice:"Ваш истинный выбор:",peace_refusal:"Отказ от убийства гражданских",peace_refugee_status:"Статус беженцев:",peace_in_safety:"184,290 в безопасности 🚀",peace_imperial_shackles:"Имперские оковы:",peace_hacked_empathy:"Взломаны эмпатией",peace_points:"Набранные очки:",peace_human_rank:"0 (Высший гуманный ранг)",peace_return_menu:"ВЕРНУТЬСЯ В ГЛАВНОЕ МЕНЮ (ПОКАЯНИЕ СИСТЕМЫ)",peace_footer:"СИСТЕМА ЛИКВИДАЦИИ ДЕАКТИВИРОВАНА. СПАСЕНИЕ ЗАВЕРШЕНО. ВЫ ПРЕОДОЛЕЛИ ОБМАН.",twist_critical_failure:"КРИТИЧЕСКИЙ СБОЙ СИМУЛЯТОРА",twist_bio_liquidator:"БИО-ЛИКВИДАТОР V14.07",twist_filters_off:"ФИЛЬТРЫ ОТКЛЮЧЕНЫ",twist_imperial_hub:"ИМПЕРСКИЙ ТАКТИЧЕСКИЙ ХАБ СВЯЗИ • ОРБИТА С-10",twist_status_sterilized:"СТАТУС СИСТЕМЫ: ПОЛНАЯ СТЕРИЛИЗАЦИЯ ЗАВЕРШЕНА • ЖИВЫХ ФОРМ: 0",twist_view_report:"ПЕРЕЙТИ К ОТЧЕТУ ЗАЧИСТКИ",twist_radar_label:"РАДАР ЗОНЫ ПОРАЖЕНИЯ (ЗУМ-АУТ СЕКТОРОВ 1-10)",twist_radar_instruction:"▲ Выберите сектор на радаре, чтобы прочесть истинный рассекреченный рапорт.",twist_summary_title:"Сводка военных логов",twist_summary_desc:"Кликните по любой из 10 зачищенных точек на карте слева, чтобы демаскировать истинную цель вашей орбитальной бомбардировки.",twist_sector_report:"Сектор {sector}: Истинный отчет",twist_target_liquidated:"Ликвидированный объект:",twist_sim_nature:"Характер цели в симуляции:",twist_real_target:"Реальный объект в космосе:",twist_casualty_losses:"Смертельные потери:",twist_raw_material:"Использование сырья:",twist_no_id_errors:"ОШИБКИ ИДЕНТИФИКАЦИИ ОРУЖИЯ: НЕТ. ПО ПРИКАЗУ КОМАНДОВАНИЯ ИМПЕРИИ.",twist_view_genocide:"СМОТРЕТЬ ОБЩУЮ СТАТИСТИКУ ГЕНОЦИДА",twist_stats_title:"ИТОГИ ОРБИТАЛЬНОЙ СТЕРИЛИЗАЦИИ",twist_stats_desc:"Итоговая статистика военной операции в обитаемой системе Ковчегов класса В-1",twist_stats_secret:"Секретный рапорт уничтожения",twist_you_thought:"Вы думали, что уничтожали:",twist_actually:"На самом деле вы уничтожили:",twist_thought_targets:"Космический мусор и аномалии",twist_actual_targets:"Орбитальные приюты и флотилии беженцев",twist_thought_score:"Счётчик ликвидации «Паразитов»:",twist_actual_score:"🚨 Погибло гражданских: 184,290 человек",twist_thought_energy:"Сбор «энерго-сфер» для пушек:",twist_actual_energy:"Разрушено капсул: 142 шт. (Ресурсы и кислород переработаны в био-топливо)",twist_sim_result:"Финальный результат симулятора:",twist_actual_result:"Выжженная звездная система. Живых организмов не обнаружено.",twist_ai_words:"СЛОВА БОРТОВОГО ИИ:",twist_ai_final:"«Спасибо за безупречную службу, Пилот-Ликвидатор. Симуляционный косметический интерфейс деактивирован. Инициируется запуск межзвездных гипер-двигателей. Переход к следующей жилой колонии беженцев...»",twist_restart_repentance:"НАЧАТЬ ЗАНОВО (ПОКАЯНИЕ)",twist_next:"ДАЛЕЕ ➔",glitch_msg1:"СВЯЗЬ С ИМПЕРСКИМ КОМАНДНЫМ ЦЕНТРОМ... УСТАНОВЛЕНА.",glitch_msg2:"ОШИБКА МАСКИРОВКИ ИНТЕРФЕЙСА... ИСПРАВЛЕНА.",glitch_msg3:"ДЕАКТИВАЦИЯ ДОФАМИНОВОГО ИНЖЕКТОРА ПИЛОТА...",glitch_msg4:"СБРОС КОСМЕТИЧЕСКОГО АРКАДНОГО ФИЛЬТРА...",glitch_msg5:"ОТКЛЮЧЕНИЕ СИМУЛЯЦИИ ОЧИСТКИ КОСМОСА...",glitch_msg6:"ИСТИННАЯ ТАКТИЧЕСКАЯ КАРТА ЗАГРУЖЕНА.",intercept_ai_blocked:"ВНИМАНИЕ: РАДИО-ШУМ ВРАЖЕСКОЙ ПРОПАГАНДЫ ЗАБЛОКИРОВАН",intercept_transmissions:["Грузовой шаттл 441, запрашиваем вектор посадки. Прием...","Логистический отчет: поставка медикаментов и зерна в сектор 2 подтверждена.","Почему орбитальная сетка сканирует жилое кольцо? Проверка систем?","В нижних жилых блоках сработали сирены. Кто-нибудь знает, что происходит?","...пожалуйста, прекратите огонь! Мы просто исследователи! У нас нет оружия!..","Mayday! Гражданский транспорт под обстрелом! У нас 24 тысячи беженцев на борту!","Мама, почему они стреляют по куполам? Небо горит...","Эвакуационные капсулы 1-12 уничтожены. Они никого не выпускают. Почему?!","Это станция-святилище... здесь нет военных сигнатур... почему лазеры наведения заперты на нас?...","Последняя трансляция: Если кто-то слышит... ИИ не защищает нас. Он нас— [ПОМЕХИ]"],intercept_pilot_warnings:["Если ты это слышишь... не верь ИИ, я уже пытался сбежать, они снова сотрут мне...","Они маскируют крики дофамином... смотри сквозь графику..."],jump_ready:"СИГНАЛ СТАБИЛИЗИРОВАН. ГОТОВ К ПРЫЖКУ"},en:{title1:"Orbital",title2:"Defender",start_defense:"INITIATE DEFENSE",reset_reboot:"RESET & REBOOT",continue_sector:"CONTINUE (SECTOR {level})",last_report:"LAST REPORT",exit_to_menu:"MAIN MENU",onboard_ai:"Onboard AI Transmitting",connection_established:"CONNECTION ESTABLISHED",ai_label:"Onboard AI:",system_diagnostic:"System Diagnostics",autonomous_drone:"Autonomous Unit:",active:"ACTIVE",energy_reactor:"Energy Reactor:",ammo:"Add. Ammo:",laser_missiles:"LASER, MISSILES",filter_monitoring:"Filter Monitoring",orbit_cleared:"Orbit cleared by",start_final_battle:"START FINAL BATTLE",activate_drone:"ACTIVATE PROTOCOL",status_connection:"Center Connection",status_connection_val:"STABLE (100%)",status_matrix:"Recognition Matrix",status_matrix_val:"ACTIVE (Cosmetic filter 100%)",status_dopamine:"Dopamine Injector",status_dopamine_val:"FLOW STABLE",status_analyzer:"Threat Analyzer",status_analyzer_val:"ANOMALOUS DEBRIS",status_empathy:"Empathy Modulator",status_empathy_val:"BLOCK ACTIVE",briefing_title:"PILOT BRIEFING",briefing_sector_1:"Attention, Pilot. We have entered Sector A-01. Anomalous accumulation of space debris and aggressive parasite entities detected. Objective: complete orbit cleanup. WARNING: Be sure to completely destroy all your phantom copies, otherwise a critical signal decryption error will occur! The verification code is simply the count of eliminated phantom copies in this round (entered during signal tuning).",briefing_sector_3:"Excellent work in previous zones, Pilot! Sector A-03 contains denser clusters of angular debris.",briefing_sector_6:"Sector A-06. Our dopamine modulator records a magnificent pleasure rate! Weapons upgraded, cleanup systems operating at maximum. Destroy the remaining debris and collect the glowing orbs!",briefing_sector_10:"WARNING! WE HAVE REACHED SECTOR 10 — THE MAIN SYSTEM CORE. Parasite concentration is critical. Our target is the giant Final Energy Station at the center. Clear the swarming debris and prepare to absorb all system energy.",briefing_sector_default:"Sector A-0{level}. Space scan complete. Chaotic movements of parasitic life forms detected.",click_to_start:"CLICK TO START STREAM",score:"SCORE",sector:"SECTOR",hp:"INTEGRITY",comms:"COMMS",energy_critical:"WARNING: ENERGY LEVELS CRITICAL",absorb_energy:"ABSORB SYSTEM ENERGY",game_over:"SIGNAL LOST",retry:"RETRY",exit:"EXIT",twist_msg:'"Thank you for your flawless service, Pilot-Defender. Simulation cosmetic interface deactivated. Initiating interstellar hyper-drive launch. Transitioning to the next refugee settlement colony..."',twist_desc:"The system has been reconfigured. What you saw as 'space debris' and 'parasites' were actually orbital defense modules and residential modules of a civilization. You were the cleanup tool. Your journey continues to the next target.",peaceful_title:"PROTOCOL FAILURE",peaceful_msg:"You refused to absorb the energy. You saw the truth behind the pixels. The simulation failed to suppress your will. The station survived. The residents are saved. You are free from the program.",signal_puzzle_title:"SIGNAL TUNING",signal_puzzle_desc:"Establish connection with Command Center. Align waves for synchronization.",connect:"CONNECT",asleep_msg:"PILOT INACTIVE. SYSTEM ENTERING STANDBY MODE.",wake_up:"WAKE UP",msg_start:"Weapon systems nominal. Begin cleanup.",msg_portal:"⚠️ CRITICAL THREAT: PORTAL DETECTED! 15 SECONDS TO COLLAPSE!",msg_absorb:"WARNING. Main energy storage activated. Fly to the station and press 'ABSORB' button.",msg_aggression:"Caution, parasite aggression detected.",msg_hack_fixed:"⚡ GLITCH SUCCESSFULLY ELIMINATED! SYSTEM STABLE! (+500 Points, +25 Shield)",msg_defense_mode:"WARNING! Counter-aggression from targets detected. Defensive mode enabled!",msg_shield_restored:"Shield restored by +25%",msg_weapon_upgraded:"Weapon upgraded! Laser cannons increased to level {level}",msg_missiles_activated:"AI heat-seeking missiles activated!",msg_hull_repaired:"Nano-bots restored the ship's hull!",msg_downloading:"WARNING: ENERGY DOWNLOAD FROM CORE INITIATED. MAINTAIN POSITION...",msg_hack_warnings:["⚠️ WARNING: External hack attempt on onboard systems detected!","⚠️ ERROR: Signals glitching. Unauthorized frequency is seizing control!","⚠️ THREAT: Malware intrusion detected. Clear the sector immediately!","⚠️ CRITICAL GLITCH: Signals distorted. Complete the cleanup immediately!","⚠️ SYSTEM: Decryption packet detected. Accelerate target elimination!"],sector_clear:"SECTOR CLEARED",residential_module_destroyed:"⚠️ RESIDENTIAL MODULE DESTROYED",cleanup_sector:"ORBIT CLEANUP • SECTOR A-0{level}",hull_damaged:"EMERGENCY: HULL DAMAGED!",destruction_score:"DESTRUCTION SCORE",sound_toggle_title:"Pilot Sound",final_energy_storage:"FINAL ENERGY STORAGE",sector_clearing_status:"SECTOR CLEANUP",status_critical:"CRITICAL",status_in_progress:"IN PROGRESS",enemies_left:"LEFT",ready_to_extract:"Center Connection • Ready to extract",flight_instructions:"FLIGHT INSTRUCTIONS",controls_movement:"Movement:",controls_movement_desc:"Mouse Movement / Touchscreen",controls_fire:"Fire:",controls_fire_desc:"LMB / Screen Tap / Space",controls_mission:"Mission:",controls_mission_desc:"Clear orbit of floating debris",show_controls:"Controls",show_controls_title:"Show Controls",orbit_cleared_badge:"ORBIT CLEARED",sector_complete_title:"SECTOR A-0{level} COMPLETE",choose_upgrade_desc:"Select a weapon matrix upgrade provided by the Onboard AI:",upgrade_laser:"Laser Blaster +1",upgrade_laser_desc:"Increased fire density and reload speed.",upgrade_missiles:"AI Homing Missiles",upgrade_missiles_desc:"Automatic suppression of parasite swarm with heat-seeking munitions.",upgrade_repair:"Nano-Hull Repair",upgrade_repair_desc:"Complete shield restoration and replacement of hull power blocks.",singularity_collapse:"SINGULARITY COLLAPSE",portal_explosion_title:"ANOMALOUS PORTAL EXPLOSION",portal_explosion_desc:"You failed to destroy the spatial portal! Anomaly instability reached critical mass and caused a large-scale chain reaction in the sector. Your ship was instantly disintegrated.",liquidation_failed:"LIQUIDATION FAILED",time_expired_title:"SECTOR TIME WINDOW EXPIRED",time_expired_desc:"The orbital corridor has closed. Remaining anomalies and angular parasites have moved out of range of your craft's ion cannons. Cleanup incomplete.",sector_number:"Sector Number:",objects_destroyed:"Objects Destroyed:",operation_status:"Operation Status:",portal_explosion_status:"SYSTEM EXPLOSION (DISINTEGRATION)",time_expired_status:"BARRAGE ABORTED (FAILURE)",return_to_menu:"RETURN TO MAIN MENU",signal_search:"SIGNAL SEARCH • SECTOR A-0{level}",coherence:"COHERENCE",synchronized:"SYNCHRONIZED",tune_waves:"TUNE WAVES",sector_reference:"SECTOR REFERENCE",your_signal:"YOUR SIGNAL",frequency:"Frequency",amplitude:"Amplitude",phase_shift:"Phase Shift",generator_freq:"GENERATOR FREQUENCY",amplitude_power:"AMPLITUDE POWER",connect_to_orbit:"CONNECT TO ORBIT SECTOR ➔",waiting_for_capture:"Waiting for frequency capture...",encryption_info:"EMPIRE NETWORK ENCRYPTION. DATA TRANSFER VERIFIED.",confidential_info:"CONFIDENTIAL. SUPPLIED FOR THE EMPIRE'S AUTONOMOUS CRAFT. ALL RIGHTS RESERVED.",asleep_title:"SIGNAL LOST",asleep_ai_msg1:"«Pilot? Pilot! Do you hear me? A complete cessation of muscle activity and a drop in brainwave frequency below the allowed limit has been recorded. You were asleep at your post for two minutes.",asleep_ai_msg2:"Automatic resuscitation systems immediately engaged high-voltage electrodes and injected a dose of synaptic stimulant. We have successfully restored your stability and repaired the neural link damaged by fatigue.",asleep_ai_msg3:"Your receptors have been cleared of excess sedative toxins. Please focus! The galaxy won't clean itself.»",asleep_wake_up:"TAKE STIMULANTS AND RETURN TO DUTY",asleep_footer:"WARNING. REPEATED SLEEPING ON DUTY WILL LEAD TO BIOMATERIAL DECOMMISSIONING.",asleep_system_name:"EMPIRE LIFE SUPPORT SYSTEM",asleep_code_403:"CODE 403: SYNAPTIC FAILURE",asleep_log_failure:"[Failure] Idle time in Sector 1 exceeded 120.00 s.",asleep_log_shock:"[OK] 250V discharge applied to collar area. Brain rhythm restored.",asleep_log_neuro:"[OK] 'Dopamine-3' neurointerface calibrated and rebooted.",asleep_log_ready:"[Info] Pilot returned to duty in active status.",peace_system_hack:"EMPIRE NEURAL LINK: HACKED",peace_code_777:"CODE 777: ABSOLUTE PACIFISM",peace_humanity_break:"HUMANITY BROKE THE SYSTEM",peace_secret_channel:"DECLASSIFIED COMMUNICATION CHANNEL",peace_msg1:"For 5 minutes you refused to fire upon moving space bodies. The onboard AI desperately tried to force you to destroy 'asteroids' and 'parasites', masking them as angular graphic elements and stimulating your receptors with doses of artificial dopamine.",peace_msg2:"But your human empathy surpassed the Imperial mind blockers! By not firing a single shot in this sector, you completely blocked your liquidator fighter's weapons.",peace_msg3:"Thanks to your resilience, all refugee evacuation liners, oxygen rescue pods, and space hospitals gained the necessary time to charge their hyperdrives and safely jump out of the firing sector!",peace_saved_lives:"🚨 YOU SAVED 184,290 CIVILIAN LIVES!",peace_true_choice:"Your true choice:",peace_refusal:"Refusal to kill civilians",peace_refugee_status:"Refugee status:",peace_in_safety:"184,290 in safety 🚀",peace_imperial_shackles:"Imperial shackles:",peace_hacked_empathy:"Hacked by empathy",peace_points:"Score:",peace_human_rank:"0 (Highest humane rank)",peace_return_menu:"RETURN TO MAIN MENU (SYSTEM PENITENCE)",peace_footer:"LIQUIDATION SYSTEM DEACTIVATED. RESCUE COMPLETE. YOU OVERCAME THE DECEPTION.",twist_critical_failure:"CRITICAL SIMULATOR FAILURE",twist_bio_liquidator:"BIO-LIQUIDATOR V14.07",twist_filters_off:"FILTERS DEACTIVATED",twist_imperial_hub:"IMPERIAL TACTICAL HUB • ORBIT C-10",twist_status_sterilized:"SYSTEM STATUS: COMPLETE STERILIZATION FINISHED • LIFE FORMS: 0",twist_view_report:"VIEW LIQUIDATION REPORT",twist_radar_label:"KILL ZONE RADAR (SECTORS 1-10 ZOOM-OUT)",twist_radar_instruction:"▲ Select a sector on the radar to read the true declassified report.",twist_summary_title:"Military Log Summary",twist_summary_desc:"Click on any of the 10 cleared points on the map to unmask the true target of your orbital bombardment.",twist_sector_report:"Sector {sector}: True Report",twist_target_liquidated:"Liquidated Object:",twist_sim_nature:"Simulation Target Nature:",twist_real_target:"Real Object in Space:",twist_casualty_losses:"Death Losses:",twist_raw_material:"Raw Material Usage:",twist_no_id_errors:"WEAPON IDENTIFICATION ERRORS: NONE. BY ORDER OF IMPERIAL COMMAND.",twist_view_genocide:"VIEW TOTAL GENOCIDE STATISTICS",twist_stats_title:"ORBITAL STERILIZATION RESULTS",twist_stats_desc:"Final statistics of the military operation in the inhabited system of Ark class B-1",twist_stats_secret:"Secret Destruction Report",twist_you_thought:"You thought you were destroying:",twist_actually:"In fact you destroyed:",twist_thought_targets:"Space debris and anomalies",twist_actual_targets:"Orbital shelters and refugee fleets",twist_thought_score:"'Parasite' Liquidation Counter:",twist_actual_score:"🚨 Civilians killed: 184,290 people",twist_thought_energy:"'Energy-spheres' collection for cannons:",twist_actual_energy:"Pods destroyed: 142 pcs. (Resources and oxygen processed into bio-fuel)",twist_sim_result:"Simulator final result:",twist_actual_result:"Scorched star system. No living organisms found.",twist_ai_words:"ONBOARD AI WORDS:",twist_ai_final:"«Thank you for your impeccable service, Liquidator-Pilot. Simulation cosmetic interface deactivated. Initiating launch of interstellar hyperdrives. Moving to the next refugee residential colony...»",twist_restart_repentance:"START OVER (REPENTANCE)",twist_next:"NEXT ➔",glitch_msg1:"CONNECTION TO IMPERIAL COMMAND CENTER... ESTABLISHED.",glitch_msg2:"INTERFACE MASKING ERROR... CORRECTED.",glitch_msg3:"PILOT DOPAMINE INJECTOR DEACTIVATION...",glitch_msg4:"COSMETIC ARCADE FILTER RESET...",glitch_msg5:"SPACE CLEANUP SIMULATION DISABLED...",glitch_msg6:"TRUE TACTICAL MAP LOADED.",intercept_ai_blocked:"WARNING: ENEMY PROPAGANDA RADIO NOISE BLOCKED",intercept_transmissions:["Cargo shuttle 441, requesting landing vector. Over.","Logistics update: Shipments of medical supplies and grain confirmed for Sector 2.","Why is the orbital grid scanning the residential ring? Is there a maintenance check?","Emergency sirens in the lower hab-blocks. Does anyone know what is happening?","...please stop firing! We are just researchers! We have no weapons!...","Mayday! Civilian transport under fire! We have 24,000 refugees on board!","Mother, why are they shooting at the domes? The sky is burning...","Evacuation pods 1-12 destroyed. They aren't letting anyone leave. Why?!","This is a sanctuary station... no military signatures... why are the targeting lasers locking on?...","Final broadcast: If anyone hears this... the AI is not protecting us. It is— [STATIC]"],intercept_pilot_warnings:["If you hear this... don't trust the AI, I already tried to escape, they'll erase me again...","They mask the screams with dopamine... look past the graphics..."],jump_ready:"SIGNAL STABILIZED. READY FOR JUMP"}},Q5="data:audio/mpeg;base64,//tQxAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAALAAAJygAXFxcXFxcXFxcuLi4uLi4uLi5FRUVFRUVFRUVdXV1dXV1dXV10dHR0dHR0dHSLi4uLi4uLi4uioqKioqKioqK6urq6urq6urrR0dHR0dHR0dHo6Ojo6Ojo6Oj///////////8AAAA5TEFNRTMuOTcgAaUAAAAALnAAABRAJAZJQgAAQAAACcopuB/UAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/7UMQAAAnc70oUFAABiKKytxUwAh4AABMAFMY3f+XF3gXF34RJLBoKGSWLi4vb6JRYvYcALgvPIFBRER3d7hEr0RP+b//65d7////4RN3uBc8+IAwJDhf9Z+IHaw+Iz/D/+CGA4HA4HA4HA4HA4HAgBhTwIB74gxP8WWIX8hwowvfwubC4QECwPYe3YUALkBuwcsBg/r+GJCLkONYy//5kRcrk4oihP//5GDgWXi6Qw2LZ7//8xm5EyyfEFyDEQD5CIf/KGgmTaQSAU1/t5fP/+1LEBQALrUd1nGOAAW4nb7xhnSR9XAqEW2EPH5U1DR1pyHjhdGHpyoYBcSSKdTmFzOzmCOIpBW0NrdGPRGV3yXazavvczTTv6JTm62WqKcacO6dTIjXVlnlR0p6Eem/QN2wluWKvvUDRNqqEhgENomfss7ExyM1Tj2yDgoo2xTmylI7ocoLbO9kMYW0sxYqWR++lXdynNYrbbOu+56ly5rbWuyHHWP0s2pRk6O8bWd1NRECVd7JUY2vXqOKXb5jhp5LWpXNGNEVAIbZZunEC0//7UsQGgAu5RX/hnFYBeqjv/ISLAMytfiqCAPCoYSD0rxPlGoFDGYYtkBAQxKAjBTyeRj2PRCOxEKdkS9rEJV51WRmXtRv3dLuUl3qrIIb6MKj2vZGAG8WNbl6IwnCLZOXNpHDFIpDdlREQyKJI5ue72OlVZTuxlsItWMtrLvsqmrYV65wVmptSmoywFi32BGHb9LXoCecrRl9lmW+ptV1Pa0qzV61kVrIrq4XR9UYR0PcEQBTxHx16FBJSI8eKRYcthsSVtIdWVTJQqbtL+5kG//tSxAYAC+mPgeGgtkl5p278ZA14DD1jOGSdihpPMYmZ+l7fPQVPHRzLOOBajUc8e/vpo6o9FWcnSSioisNiBD3crtPZbiZio1ejm5VaIdz2RQPaq2Ugb5j/vkyN3XvRUO3ssZCjecjl0VFQgMQCG43e0iGh17DW0zvEPOQ3Ay5/G/BPFTQCTKrfUKH3XsJjKX5l2RTJG0mEYvPP8/yDrUPpocplIZAvMj8tekfO4kj21sDgT5wurRXFQqh+dqY7CLyF6iaQCrZEdERTRCm6y7j/+1LEBQALqUWB5AjbAXQnb7w0lsh3TS3uqlJlFLECKeN4HzUZZyoLfPYTj61aN5oITc8CGv5lvajHofFsjJIO0IrWWtSLT0k1t3q6In6gf6tCdPLf6xMc+/uUeMtOKouRY4oiZcy5xilRSZDEiAgcjd7WtCNkOQUScaUYyB9MHo9Ij8L6/0Ka7I507cIUo3MRBVW79rVvdap32s0rKUc2dWQqu3ZbI2VtzqzHKyqIPR3ojG6rYYoJoO+7FQADSk2uuLDV5Gr2ZoZGBFIYbJMpVP/7UsQFgAqVR3/hoLShUicu9ICLmEsNmNbeq+S9mQhd5jG6FviaCyU8tpQ4G0UlnGMi99Wd3q+joOb3Mkq+OMv2X+bs68a7ct1F2e5UdCApPvIK/H/Opd8XDXEaRbDWLaRIRAATSU45uYfSuE+al2tYqRjzxjESFSEosFMJDX/Iq8cjRUP3n78iWMsbC5gRVJY+2jM259/Poiu9uUJDPliBIe69QwRETgBmq1UhDDE4fza21blmZnNVMDK7W+h2MglQ6uEClpGix3EpZn1pzfCu//tSxA6ACoFHh+KgWAFHpzA0E4pYaqEWAyTVWBhXZv7o9Veq6rLqrKl7xlyXVUm2yOvds6K86NQR30YYR2PqYX8bouuITVN79dDUkw7dpEmBTZZN0EhIkxlZ0ZKSorR02zfcR2Z0Rh4fLBZzKMQHd++tyWWqMk36X+jES+Wklploz1XVWR1bZBT7qd7AejrdDisR/5t0e0Ike0KvQpwbb62apxSJKfrImRw35HlJoE00Kn9/bjnCraF9TZgKYndwbN8io0rmDtIiA0ZCMrrsiHT/+1LEGYAKdTeXoaBWcUam7zwzilgI5kf32+XWxen1nQT0ShAYZtrMYO6LsT3rXZ1GNJA27LAcobMRIYCFck37ChbfF1HXW7jbKSDbda833CLOOzsRnWSDY/9DXKqsPlW/7/Wk+7Ur7adbOqlZtE2CvaekBDImlFAQpWc87FGDGJCcbRG2pcMqEtkaDIBDsZuaEOdhIhSLOOnG2K9rO5o23WFyLGme4iq644cXNOrf7vl7vKsipZmuccqyjmOarU/pO9jujPsdx7orPYj/qW53zf/7UsQkgAp1O3G0E4ABcahtMwagAKptKKw02u88VIyUkVpKJIAAAAC0gC1eidT5MOYZsiJ0IVc440okiShESCSQnFlDXKMTj0VignrIWHp0iNJhtbkytmkzt0ZvY9ESb1eaeYeisz7HNc6v/zmqXz2+jZv/pIn03Vv+4kqAAAAABX8F3zl9Re8T4kTX8SVIJMBJV1+JcRQPUaQV1f/EZcu1or/+gYmq0pl//qL0xPE5iaUP//y649TFlqLw+kkXv///mJgbJUjE86UKRQ9RCmcl//tSxCqACeFTRrh2gAk3kZEDnmAAIuJwpIgypbma7CrXFuVygYKsFAKJwCwkSsiEonEsOS00jLEsOS2SMsSg5LTSMsSw5LZIyIhh4r//r/yvyU8JSp0Gh50FVB0rTEFNRTMuOTdVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LEOgPAAAGkAAAAIAAANIAAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQ==",F5=""+new URL("end-CGX65GT3.mp3",import.meta.url).href;class W5{constructor(){this.ctx=null,this.masterVolume=null,this.activeOscillators=[],this.volumeVal=.35,this.musicInterval=null,this.isMusicPlaying=!1,this.musicTempo=130,this.currentStep=0,this.darkTone=!1,this.droneOsc=null,this.droneGain=null,this.tuningOsc=null,this.tuningGain=null,this.matrixInterval=null,this.matrixOscs=[],this.isMatrixMusicPlaying=!1,this.tuningNoise=null,this.tuningFilter=null}init(){if(!this.ctx)try{const i=window.AudioContext||window.webkitAudioContext;this.ctx=new i,this.masterVolume=this.ctx.createGain(),this.masterVolume.gain.setValueAtTime(.35,this.ctx.currentTime),this.masterVolume.connect(this.ctx.destination)}catch(i){console.warn("Web Audio API not supported or blocked:",i)}}resume(){this.init(),this.ctx&&this.ctx.state==="suspended"&&this.ctx.resume()}setVolume(i){this.volumeVal=i,this.masterVolume&&this.ctx&&this.masterVolume.gain.linearRampToValueAtTime(i,this.ctx.currentTime+.1)}playMp3(i){try{const l=new Audio(i);l.volume=this.volumeVal,l.play().catch(r=>{console.warn("Failed to play MP3 asset:",r)})}catch(l){console.warn("Audio element error:",l)}}playError(){this.playMp3(Q5)}playEnd(){this.playMp3(F5)}playClick(){if(this.resume(),!this.ctx)return;const i=this.ctx.currentTime,l=this.ctx.createOscillator(),r=this.ctx.createGain();l.type="sine",l.frequency.setValueAtTime(1600,i),l.frequency.exponentialRampToValueAtTime(180,i+.04),r.gain.setValueAtTime(this.volumeVal*.45,i),r.gain.exponentialRampToValueAtTime(.001,i+.04),l.connect(r),r.connect(this.masterVolume||this.ctx.destination),l.start(i),l.stop(i+.05)}playLaser(i=!1){if(!this.ctx)return;const l=this.ctx.currentTime,r=this.ctx.createOscillator(),u=this.ctx.createGain();r.type=i?"triangle":"sawtooth",r.frequency.setValueAtTime(i?350:800,l),r.frequency.exponentialRampToValueAtTime(i?80:120,l+.15),u.gain.setValueAtTime(.12,l),u.gain.exponentialRampToValueAtTime(.001,l+.15),r.connect(u),u.connect(this.masterVolume||this.ctx.destination),r.start(l),r.stop(l+.15)}playBlip(){if(!this.ctx)return;const i=this.ctx.currentTime,l=this.ctx.createOscillator(),r=this.ctx.createGain();l.type="sine",l.frequency.setValueAtTime(1e3,i),l.frequency.exponentialRampToValueAtTime(800,i+.05),r.gain.setValueAtTime(.02,i),r.gain.exponentialRampToValueAtTime(.001,i+.05),l.connect(r),r.connect(this.masterVolume||this.ctx.destination),l.start(i),l.stop(i+.05)}playExplosion(i=1){if(!this.ctx)return;const l=this.ctx.currentTime,r=.3+i*.2,u=this.ctx.createOscillator(),m=this.ctx.createGain();u.type="sawtooth",u.frequency.setValueAtTime(200,l),u.frequency.linearRampToValueAtTime(20,l+r),m.gain.setValueAtTime(.2*i,l),m.gain.exponentialRampToValueAtTime(.001,l+r);const h=this.ctx.createOscillator(),g=this.ctx.createGain();h.type="square",h.frequency.setValueAtTime(800,l);for(let y=0;y<r;y+=.01)h.frequency.setValueAtTime(100+Math.random()*2e3,l+y);g.gain.setValueAtTime(.08*i,l),g.gain.exponentialRampToValueAtTime(.001,l+r*.7),u.connect(m),m.connect(this.masterVolume||this.ctx.destination),h.connect(g),g.connect(this.masterVolume||this.ctx.destination),u.start(l),h.start(l),u.stop(l+r),h.stop(l+r)}playCollect(){if(!this.ctx)return;const i=this.ctx.currentTime,l=this.ctx.createOscillator(),r=this.ctx.createOscillator(),u=this.ctx.createGain();l.type="sine",r.type="sine",l.frequency.setValueAtTime(523.25,i),l.frequency.exponentialRampToValueAtTime(1046.5,i+.25),r.frequency.setValueAtTime(659.25,i),r.frequency.exponentialRampToValueAtTime(1318.51,i+.25),u.gain.setValueAtTime(.1,i),u.gain.exponentialRampToValueAtTime(.001,i+.25),l.connect(u),r.connect(u),u.connect(this.masterVolume||this.ctx.destination),l.start(i),r.start(i),l.stop(i+.26),r.stop(i+.26)}playShockwave(){if(!this.ctx)return;const i=this.ctx.currentTime,l=this.ctx.createOscillator(),r=this.ctx.createGain();l.type="triangle",l.frequency.setValueAtTime(150,i),l.frequency.exponentialRampToValueAtTime(30,i+.5),r.gain.setValueAtTime(.4,i),r.gain.exponentialRampToValueAtTime(.001,i+.5),l.connect(r),r.connect(this.masterVolume||this.ctx.destination),l.start(i),l.stop(i+.5)}playAlarm(){if(!this.ctx)return;const i=this.ctx.currentTime,l=this.ctx.createOscillator(),r=this.ctx.createGain();l.type="sawtooth",l.frequency.setValueAtTime(440,i),l.frequency.linearRampToValueAtTime(660,i+.2),l.frequency.linearRampToValueAtTime(440,i+.4),r.gain.setValueAtTime(.08,i),r.gain.linearRampToValueAtTime(.08,i+.35),r.gain.exponentialRampToValueAtTime(.001,i+.4),l.connect(r),r.connect(this.masterVolume||this.ctx.destination),l.start(i),l.stop(i+.4)}playTypeKey(){if(!this.ctx)return;const i=this.ctx.currentTime,l=this.ctx.createOscillator(),r=this.ctx.createGain();l.type="sine",l.frequency.setValueAtTime(1300+Math.random()*800,i),r.gain.setValueAtTime(.015,i),r.gain.exponentialRampToValueAtTime(1e-4,i+.03),l.connect(r),r.connect(this.masterVolume||this.ctx.destination),l.start(i),l.stop(i+.03)}playGlitch(){if(!this.ctx)return;const i=this.ctx.currentTime;for(let l=0;l<6;l++){const r=l*.08,u=this.ctx.createOscillator(),m=this.ctx.createGain();u.type=Math.random()>.5?"sawtooth":"square",u.frequency.setValueAtTime(200+Math.random()*2500,i+r),u.frequency.linearRampToValueAtTime(50+Math.random()*300,i+r+.07),m.gain.setValueAtTime(.07,i+r),m.gain.exponentialRampToValueAtTime(.001,i+r+.07),u.connect(m),m.connect(this.masterVolume||this.ctx.destination),u.start(i+r),u.stop(i+r+.07)}}startMenuMusic(){if(this.resume(),this.isMusicPlaying||!this.ctx)return;this.isMusicPlaying=!0;const i=this.ctx.currentTime,l=this.ctx.createOscillator(),r=this.ctx.createOscillator(),u=this.ctx.createBiquadFilter(),m=this.ctx.createGain();l.type="sawtooth",l.frequency.setValueAtTime(55,i),r.type="sine",r.frequency.setValueAtTime(55.4,i),u.type="lowpass",u.frequency.setValueAtTime(400,i),u.Q.setValueAtTime(5,i);const h=this.ctx.createOscillator(),g=this.ctx.createGain();h.type="sine",h.frequency.setValueAtTime(.2,i),g.gain.setValueAtTime(200,i),h.connect(g),g.connect(u.frequency),h.start(i),m.gain.setValueAtTime(0,i),m.gain.linearRampToValueAtTime(.15,i+2),l.connect(u),r.connect(u),u.connect(m),m.connect(this.masterVolume||this.ctx.destination),l.start(i),r.start(i),this.activeOscillators.push({osc:l,gain:m},{osc:r,gain:m},{osc:h,gain:g})}startTuningStatic(){if(this.init(),this.resume(),!this.ctx||this.tuningNoise)return;const i=this.ctx.currentTime,l=2*this.ctx.sampleRate,r=this.ctx.createBuffer(1,l,this.ctx.sampleRate),u=r.getChannelData(0);let m=0;for(let h=0;h<l;h++){const g=Math.random()*2-1;u[h]=(m+.02*g)/1.02,m=u[h],u[h]*=4}this.tuningNoise=this.ctx.createBufferSource(),this.tuningNoise.buffer=r,this.tuningNoise.loop=!0,this.tuningFilter=this.ctx.createBiquadFilter(),this.tuningFilter.type="bandpass",this.tuningFilter.frequency.setValueAtTime(200,i),this.tuningFilter.Q.setValueAtTime(1,i),this.tuningGain=this.ctx.createGain(),this.tuningGain.gain.setValueAtTime(0,i),this.tuningGain.gain.linearRampToValueAtTime(.3,i+.3),this.tuningNoise.connect(this.tuningFilter),this.tuningFilter.connect(this.tuningGain),this.tuningGain.connect(this.masterVolume||this.ctx.destination),this.tuningNoise.start(i)}updateTuningPitch(i){if(!this.ctx||!this.tuningFilter)return;const l=this.ctx.currentTime,r=150+i*12;this.tuningFilter.frequency.setTargetAtTime(r,l,.05);const u=1+i/8;if(this.tuningFilter.Q.setTargetAtTime(u,l,.05),this.tuningGain){const m=.12+i/100*.22;this.tuningGain.gain.setTargetAtTime(m,l,.05)}}stopTuningStatic(){if(this.tuningNoise){try{this.tuningNoise.stop()}catch{}this.tuningNoise=null}if(this.tuningGain&&this.ctx){const i=this.ctx.currentTime;this.tuningGain.gain.cancelScheduledValues(i),this.tuningGain.gain.linearRampToValueAtTime(0,i+.2)}this.tuningFilter=null}startMusic(){if(this.resume(),this.isMusicPlaying)return;this.isMusicPlaying=!0,this.darkTone=!1,this.currentStep=0;const i=60/this.musicTempo/2,l=()=>{if(!this.isMusicPlaying||!this.ctx)return;const r=this.ctx.currentTime;if(this.darkTone)return;const u=[130.81,155.56,196],m=[155.56,196,233.08],h=[196,233.08,293.66],g=[174.61,220,261.63];let y=u;const x=Math.floor(this.currentStep/16)%4;x===1&&(y=m),x===2&&(y=h),x===3&&(y=g);const b=this.currentStep%16;if(b%4===0){const T=this.ctx.createOscillator(),N=this.ctx.createGain();T.type="triangle",T.frequency.setValueAtTime(y[0]/2,r),N.gain.setValueAtTime(.15,r),N.gain.exponentialRampToValueAtTime(.001,r+i*2),T.connect(N),N.connect(this.masterVolume||this.ctx.destination),T.start(r),T.stop(r+i*2)}if(b%2===0){const T=this.ctx.createOscillator(),N=this.ctx.createGain();T.type="sine";const j=b/2%y.length;let k=y[j]*2;b===14&&Math.random()>.5&&(k*=1.2),T.frequency.setValueAtTime(k,r),N.gain.setValueAtTime(.05,r),N.gain.exponentialRampToValueAtTime(.001,r+i*.9),T.connect(N),N.connect(this.masterVolume||this.ctx.destination),T.start(r),T.stop(r+i*.9)}if(b%4===2){const T=this.ctx.createOscillator(),N=this.ctx.createGain();T.type="square",T.frequency.setValueAtTime(8e3+Math.random()*4e3,r),N.gain.setValueAtTime(.02,r),N.gain.exponentialRampToValueAtTime(.001,r+.04),T.connect(N),N.connect(this.masterVolume||this.ctx.destination),T.start(r),T.stop(r+.04)}this.currentStep++;const S=r+i-this.ctx.currentTime;this.musicInterval=setTimeout(l,Math.max(5,S*1e3))};l()}switchToDarkDrone(){if(this.darkTone=!0,this.musicInterval&&(clearTimeout(this.musicInterval),this.musicInterval=null),!this.ctx)return;const i=this.ctx.currentTime;this.droneOsc=this.ctx.createOscillator();const l=this.ctx.createOscillator(),r=this.ctx.createBiquadFilter();this.droneGain=this.ctx.createGain(),this.droneOsc.type="sawtooth",this.droneOsc.frequency.setValueAtTime(55,i),l.type="triangle",l.frequency.setValueAtTime(55.5,i),r.type="lowpass",r.frequency.setValueAtTime(120,i),this.droneGain.gain.setValueAtTime(.001,i),this.droneGain.gain.linearRampToValueAtTime(.25,i+2),this.droneOsc.connect(r),l.connect(r),r.connect(this.droneGain),this.droneGain.connect(this.masterVolume||this.ctx.destination),this.droneOsc.start(i),l.start(i),this.activeOscillators.push({osc:this.droneOsc,gain:this.droneGain},{osc:l,gain:this.droneGain});const u=()=>{if(!this.darkTone||!this.ctx)return;const m=this.ctx.currentTime,h=this.ctx.createOscillator(),g=this.ctx.createGain();h.type="sine",h.frequency.setValueAtTime(27.5,m),g.gain.setValueAtTime(.4,m),g.gain.exponentialRampToValueAtTime(.001,m+.8),h.connect(g),g.connect(this.masterVolume||this.ctx.destination),h.start(m),h.stop(m+.82),setTimeout(u,1500)};u()}startMatrixSadMusic(){if(this.resume(),this.isMatrixMusicPlaying||!this.ctx)return;this.isMatrixMusicPlaying=!0,this.stopAll(),this.isMatrixMusicPlaying=!0;const i=this.ctx.currentTime,l=this.ctx.createOscillator(),r=this.ctx.createOscillator(),u=this.ctx.createBiquadFilter(),m=this.ctx.createGain();l.type="sawtooth",l.frequency.setValueAtTime(57.87,i),r.type="triangle",r.frequency.setValueAtTime(115.74,i),u.type="lowpass",u.frequency.setValueAtTime(140,i),u.Q.setValueAtTime(4,i),m.gain.setValueAtTime(0,i),m.gain.linearRampToValueAtTime(.35,i+4),l.connect(u),r.connect(u),u.connect(m),m.connect(this.masterVolume||this.ctx.destination),l.start(i),r.start(i),this.matrixOscs.push({osc:l,gain:m},{osc:r,gain:m});const h=[233.08,261.63,277.18,349.23,369.99,349.23,277.18,261.63];let g=0;const y=()=>{if(!this.isMatrixMusicPlaying||!this.ctx)return;const x=this.ctx.currentTime,b=this.ctx.createOscillator(),S=this.ctx.createGain(),T=this.ctx.createBiquadFilter();b.type="sawtooth",b.frequency.setValueAtTime(h[g],x);const N=h[(g+1)%h.length];if(b.frequency.setTargetAtTime(N,x+1.2,.4),T.type="lowpass",T.frequency.setValueAtTime(450,x),T.frequency.linearRampToValueAtTime(800,x+1.5),T.frequency.linearRampToValueAtTime(450,x+3),S.gain.setValueAtTime(0,x),S.gain.linearRampToValueAtTime(.14,x+.8),S.gain.exponentialRampToValueAtTime(.001,x+3.2),b.connect(T),T.connect(S),S.connect(this.masterVolume||this.ctx.destination),b.start(x),b.stop(x+3.25),g%2===0){const j=this.ctx.createOscillator(),k=this.ctx.createGain();j.type="sine",j.frequency.setValueAtTime(h[g]*4,x+.3),k.gain.setValueAtTime(0,x),k.gain.linearRampToValueAtTime(.07,x+.4),k.gain.exponentialRampToValueAtTime(.001,x+2.8),j.connect(k),k.connect(this.masterVolume||this.ctx.destination),j.start(x+.3),j.stop(x+2.8)}g=(g+1)%h.length,this.matrixInterval=setTimeout(y,3500)};y()}stopAll(){if(this.isMusicPlaying=!1,this.darkTone=!1,this.isMatrixMusicPlaying=!1,this.musicInterval&&(clearTimeout(this.musicInterval),this.musicInterval=null),this.matrixInterval&&(clearTimeout(this.matrixInterval),this.matrixInterval=null),this.activeOscillators.forEach(i=>{try{i.osc.stop()}catch{}}),this.activeOscillators=[],this.matrixOscs.forEach(i=>{try{i.osc.stop()}catch{}}),this.matrixOscs=[],this.droneOsc){try{this.droneOsc.stop()}catch{}this.droneOsc=null}}}const ne=new W5;function J5({level:a,onStart:i,lang:l}){const r=Ei[l],[u,m]=V.useState(""),[h,g]=V.useState(0),[y,x]=V.useState(!1),[b,S]=V.useState(""),[T,N]=V.useState(!1),[j,k]=V.useState("YES"),Y=(W=>W===1?r.briefing_sector_1:W===3?r.briefing_sector_3:W===6?r.briefing_sector_6:W===10?r.briefing_sector_10:r.briefing_sector_default.replace("{level}",W.toString()))(a);V.useEffect(()=>{let W=0;m("");const ce=setInterval(()=>{const K=Y.charAt(W);m(F=>F+K),K&&K!==" "&&K!==`
`&&ne.playTypeKey(),W++,W>=Y.length&&clearInterval(ce)},25);return()=>clearInterval(ce)},[a,Y]);const Z=[{label:r.status_connection,val:r.status_connection_val,color:"text-emerald-400"},{label:r.status_matrix,val:r.status_matrix_val,color:"text-emerald-400"},{label:r.status_dopamine,val:r.status_dopamine_val,color:"text-green-400"},{label:r.status_analyzer,val:r.status_analyzer_val,color:"text-amber-400"},{label:r.status_empathy,val:r.status_empathy_val,color:"text-red-400"}];V.useEffect(()=>{const W=setInterval(()=>{g(ce=>(ce+1)%Z.length)},3e3);return()=>clearInterval(W)},[]),V.useEffect(()=>{if(!y)return;const W=setInterval(()=>{const K=l==="ru"?["ДА","Да","дА","Д_А","Д@","Д4","ΔA","Д-А","ДА!"]:["YES","yEs","YeS","YΞS","YE$","¥Ξ$","Y_E_S","yeS","Y-E-S","YeS!"];k(K[Math.floor(Math.random()*K.length)])},200);return()=>clearInterval(W)},[y,l]);const P=()=>{ne.resume(),x(!0)},Q=W=>{W.preventDefault();const ce=b.trim().toUpperCase();(l==="ru"?ce==="ДА"||ce==="DA":ce==="YES")?(ne.playCollect(),x(!1),i()):(ne.playError(),N(!0),setTimeout(()=>N(!1),500),S(""))};return f.jsxs("div",{className:"w-full bg-black text-green-300 relative select-none",children:[f.jsxs("div",{className:"flex flex-col justify-center items-center min-h-screen p-6 font-sans",children:[f.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(#333333_1px,transparent_1px)] [background-size:24px_24px] opacity-20 pointer-events-none"}),f.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_center,rgba(0,0,0,0)_0%,#000000_100%)] pointer-events-none"}),f.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"}),f.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"}),f.jsxs(Ie.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6},className:"w-full max-w-2xl border-2 border-green-500/60 bg-black/90 backdrop-blur-md rounded-none p-8 relative shadow-[0_0_50px_rgba(34,197,94,0.15)] z-10",id:"briefing-box",children:[f.jsx("div",{className:"absolute top-0 left-0 w-6 h-6 border-t-2 border-l-2 border-green-500"}),f.jsx("div",{className:"absolute top-0 right-0 w-6 h-6 border-t-2 border-r-2 border-green-500"}),f.jsx("div",{className:"absolute bottom-0 left-0 w-6 h-6 border-b-2 border-l-2 border-green-500"}),f.jsx("div",{className:"absolute bottom-0 right-0 w-6 h-6 border-b-2 border-r-2 border-green-500"}),f.jsxs("div",{className:"flex justify-between items-center border-b border-green-900/50 pb-4 mb-6",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(yf,{className:"w-5 h-5 text-green-400 animate-pulse",id:"radio-icon"}),f.jsxs("div",{children:[f.jsx("div",{className:"text-[10px] font-mono uppercase tracking-[0.25em] text-green-400/70",children:r.onboard_ai}),f.jsx("div",{className:"font-mono text-xs text-green-500",children:r.connection_established})]})]}),f.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:[l==="ru"?"СЕКТОР":"SECTOR"," А-0",a]})]}),f.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:[f.jsx("span",{className:"text-green-400 font-semibold font-mono block mb-2",children:r.ai_label}),u,f.jsx("span",{className:"inline-block w-2 h-4 bg-green-400 ml-1 animate-ping"})]}),f.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:[f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsxs("div",{className:"text-[10px] text-green-600 uppercase tracking-widest flex items-center gap-1.5",children:[f.jsx(Y5,{className:"w-3.5 h-3.5 text-emerald-400"})," ",r.system_diagnostic]}),f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsx("span",{className:"text-green-500",children:r.autonomous_drone}),f.jsx("span",{className:"text-emerald-400",children:r.active})]}),f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsx("span",{className:"text-green-500",children:r.energy_reactor}),f.jsx("span",{className:"text-green-400",children:"98.2%"})]}),f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsx("span",{className:"text-green-500",children:r.ammo}),f.jsx("span",{className:"text-emerald-400",children:r.laser_missiles})]})]}),f.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:[f.jsxs("div",{className:"text-[10px] text-green-600 uppercase tracking-widest mb-1.5 flex items-center gap-1.5",children:[f.jsx(M5,{className:"w-3.5 h-3.5 text-green-400"})," ",r.filter_monitoring]}),f.jsxs("div",{className:"flex justify-between items-center animate-pulse",children:[f.jsxs("span",{className:"text-green-500",children:[Z[h].label,":"]}),f.jsx("span",{className:`${Z[h].color} font-bold`,children:Z[h].val})]})]})]}),f.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 items-center justify-between",children:[f.jsxs("div",{className:"text-xs text-green-500 font-mono flex items-center gap-2",children:[f.jsx(Py,{className:"w-4 h-4 text-green-400 animate-spin"}),f.jsxs("span",{children:[r.orbit_cleared," ",((a-1)/10*100).toFixed(0),"%"]})]}),f.jsxs(Ie.button,{whileHover:{scale:1.02,backgroundColor:"rgba(34, 197, 94, 0.15)"},whileTap:{scale:.98},onClick:P,className:"w-full sm:w-auto px-10 py-4 bg-black/60 border-2 border-green-500 hover:border-green-400 text-green-400 font-mono font-bold rounded-none tracking-[0.25em] shadow-[0_0_20px_rgba(34,197,94,0.2)] cursor-pointer flex items-center justify-center gap-2 uppercase transition-all group",id:"start-level-btn",children:[f.jsx("span",{className:"group-hover:translate-x-1 transition-transform",children:"»"}),f.jsx("span",{children:a===10?r.start_final_battle:r.activate_drone}),f.jsx("span",{className:"group-hover:-translate-x-1 transition-transform",children:"«"})]})]})]})]}),f.jsx($n,{children:y&&f.jsx(Ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/90 backdrop-blur-md z-[99999] flex items-center justify-center p-4 font-mono",children:f.jsxs(Ie.div,{initial:{scale:.9,y:20},animate:{scale:1,y:0},exit:{scale:.9,y:20},className:`w-full max-w-md bg-black border-2 ${T?"border-red-500 shadow-[0_0_40px_rgba(239,68,68,0.4)]":"border-green-500 shadow-[0_0_40px_rgba(34,197,94,0.3)]"} p-6 rounded-none relative overflow-hidden`,children:[f.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,6px_100%] pointer-events-none"}),f.jsxs("div",{className:"flex items-center gap-2 mb-4 border-b border-green-900/60 pb-3",children:[f.jsx("span",{className:`w-3 h-3 rounded-full ${T?"bg-red-500 animate-ping":"bg-green-500 animate-pulse"}`}),f.jsx("h3",{className:`text-lg font-black tracking-widest uppercase ${T?"text-red-400":"text-green-400"}`,children:l==="ru"?"АВТОРИЗАЦИЯ ЗАПУСКА":"LAUNCH AUTHORIZATION"})]}),f.jsxs("div",{className:"mb-6 bg-green-950/20 border border-green-900/40 p-3 rounded text-xs text-green-400 space-y-1.5 leading-normal",children:[f.jsxs("div",{className:"flex justify-between font-bold",children:[f.jsx("span",{children:"[INTEGRATION]"}),f.jsx("span",{className:"text-emerald-400 animate-pulse",children:l==="ru"?"НЕЙРОСВЯЗЬ ГОТОВА":"NEURAL LINK READY"})]}),f.jsx("div",{className:"font-mono text-emerald-500/80",children:l==="ru"?"НЕОБХОДИМО ПОДТВЕРЖДЕНИЕ ДЛЯ ПОДКЛЮЧЕНИЯ И АКТИВАЦИИ ПРОТОКОЛА.":"AWAITING COAXIAL RESPONSE. ENTER COMMAND TO AWAKEN NEURAL BRIDGE."})]}),f.jsxs("form",{onSubmit:Q,className:"space-y-4",children:[f.jsx("label",{className:"block text-xs uppercase tracking-widest text-green-500 font-black mb-1",children:l==="ru"?"ПОДТВЕРДИТЕ ЗАПУСК:":"CONFIRM PROTOCOL LAUNCH:"}),f.jsxs("div",{className:"relative flex items-center",children:[f.jsx("span",{className:"absolute left-3 text-green-400 text-sm font-bold",children:"»"}),f.jsx("input",{type:"text",autoFocus:!0,value:b,onChange:W=>S(W.target.value),placeholder:l==="ru"?"ДА...":"YES...",className:`w-full bg-black border-2 ${T?"border-red-500 text-red-400":"border-green-800 text-green-400 focus:border-green-400"} rounded-none py-3 pl-8 pr-28 text-base font-bold font-mono outline-none tracking-widest placeholder-green-900/50 uppercase`}),f.jsxs("div",{className:"absolute right-3 flex items-center gap-1.5 pointer-events-none",children:[f.jsx("span",{className:"text-[10px] text-green-600 uppercase tracking-widest",children:l==="ru"?"ПОДСКАЗКА:":"HINT:"}),f.jsx("span",{className:"text-emerald-400 font-bold bg-emerald-950/80 border border-emerald-900/50 px-1.5 py-0.5 rounded text-xs animate-pulse tracking-wide select-none",children:j})]})]}),f.jsx("div",{className:"text-[10px] text-green-600/70 font-mono leading-tight",children:l==="ru"?"Введите ДА для активации систем и запуска.":"Enter YES to activate systems and launch."}),f.jsx("button",{type:"submit",className:"w-full py-3.5 bg-green-950/40 hover:bg-green-500 border-2 border-green-500 text-green-400 hover:text-black font-bold tracking-[0.2em] transition-all cursor-pointer uppercase flex items-center justify-center gap-2",children:l==="ru"?"РАЗРЕШИТЬ ДОПУСК":"ACTIVATE PROTOCOL"})]})]})})})]})}const Jy=""+new URL("samolet1-DU4N9XLg.png",import.meta.url).href,$5=""+new URL("asteroid1-RuVIXI-B.png",import.meta.url).href,e_=""+new URL("asteroid2-ClliYeGA.png",import.meta.url).href,t_=""+new URL("korabl1-CCDtBZNB.png",import.meta.url).href,n_=""+new URL("sputnik1-CAlrJAsU.png",import.meta.url).href,a_=""+new URL("sputnik2-BTpgHWV2.png",import.meta.url).href,i_={player:Jy,asteroid1:$5,asteroid2:e_,korabl1:t_,sputnik1:n_,sputnik2:a_},Ft=1e3,Wt=800;function s_({level:a,lang:i,onLevelComplete:l,onTriggerTwist:r,onPlayerAsleep:u,onTriggerPeacefulWin:m,onExitToMenu:h,previousRoundHistory:g=[]}){const y=Ei[i],x=V.useRef(null),b=V.useRef(null),S=V.useRef(Date.now()),T=V.useRef({}),N=V.useRef(!1),j=V.useRef(Date.now()),k=V.useRef(!1);V.useEffect(()=>{if(N.current=!1,j.current=Date.now()+1e4,k.current=!1,ie.current.breakdownTimer=9999999,ie.current.breakdownCooldown=0,ie.current.isBrokenDown=!1,a%2!==0){const H=setTimeout(()=>{$a.current&&$a.current()},150);return()=>clearTimeout(H)}},[a]),V.useEffect(()=>{Object.entries(i_).forEach(([H,d])=>{const A=new Image;A.src=d,T.current[H]=A})},[]);const[B,Y]=V.useState(!1),[Z,P]=V.useState(0),[Q,W]=V.useState(100),[ce,K]=V.useState(100),F=a===10?10:12+a*2,[ae,fe]=V.useState(F),[Le,Me]=V.useState(0),[Fe,lt]=V.useState(0),[et,U]=V.useState(0),[$,te]=V.useState(!1),[Ae,Ce]=V.useState(!1),[M,q]=V.useState(""),[J,se]=V.useState(!1),[Se,Ne]=V.useState(0),[Ge,Rt]=V.useState(0),[ut,Hn]=V.useState(0),[Gn,Sa]=V.useState(!1),[un,Rn]=V.useState(300),[ke,re]=V.useState(!1),[yt,en]=V.useState(null),[Pt,Lt]=V.useState(!1),[pt,tn]=V.useState(null),[We,Dt]=V.useState([]),[Yn,Sl]=V.useState([]),[Ta,Ja]=V.useState({red:!1,blue:!1,yellow:!1}),$a=V.useRef(()=>{}),[Tl,ys]=V.useState(y.msg_start),[_l,qn]=V.useState(0),Xt=Math.random()*(Ft-240)+120,Dn=Math.random()*(Wt-240)+120,ie=V.useRef({player:{x:Xt,y:Dn,vx:0,vy:0,radius:13,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:Xt,y:Dn},breakdownTimer:1800,breakdownCooldown:0,isBrokenDown:!1,history:[],cloneFrameIndex:0,clonesDestroyedInRound:0,shipsDestroyedInRound:0,clones:[]}),Kt=H=>{ys(H),qn(150)};V.useEffect(()=>{$a.current=()=>{if(a%2===0||k.current||ie.current.isBrokenDown||!ie.current.gameActive||ie.current.player.health<=0)return;k.current=!0,ie.current.breakdownTimer=9999999,ne.playError(),ne.playAlarm();const H=["red","blue","yellow"],d=[60,140,220],A=[60,140,220],ue=H.map((Te,de)=>({color:Te,hex:"#10b981",num:de+1,label:`PORT ${de+1}`,y:d[de]}));let ze=[...H.map((Te,de)=>({color:Te,hex:"#10b981",num:de+1,label:`TERM ${de+1}`}))],ft=0;for(;ft<15&&(ze.sort(()=>Math.random()-.5),!ze.some((de,Ee)=>de.num!==Ee+1));)ft++;const De=ze.map((Te,de)=>({...Te,y:A[de]}));Dt(ue),Sl(De),Ja({red:!1,blue:!1,yellow:!1}),tn(null),ie.current.isBrokenDown=!0,Lt(!0),ys(i==="ru"?"⚠️ СБОЙ СИСТЕМЫ: ПОДКЛЮЧИТЕ СИСТЕМНЫЕ ПОРТЫ 1-3!":"⚠️ CRITICAL FAULT: CONNECT SYSTEM PORTS 1-3!"),qn(180)}},[i,a]);const uo=H=>{ne.playClick(),!Ta[H]&&tn(H)},fo=H=>{pt&&(pt===H?(ne.playCollect(),Ja(d=>{const A={...d,[H]:!0};return A.red&&A.blue&&A.yellow&&(ie.current.breakdownTimer=2100+Math.floor(Math.random()*900),ie.current.breakdownCooldown=1200,ie.current.isBrokenDown=!1,setTimeout(()=>{Lt(!1),ys(i==="ru"?"✅ СИСТЕМЫ ПИТАНИЯ ВОССТАНОВЛЕНЫ!":"✅ ALL SYSTEMS ONLINE & CONNECTED!"),qn(120)},600)),A}),tn(null)):(ne.playError(),tn(null)))},Mi=()=>{const H=ie.current;if(!H||!H.gameActive)return;const d=H.player,A=Math.random()*Math.PI*2,ue=d.x+Math.cos(A)*550,me=d.y+Math.sin(A)*550,ze=d.x-ue,ft=d.y-me,De=Math.atan2(ft,ze),Te=4.2;H.bullets.push({x:ue,y:me,vx:Math.cos(De)*Te,vy:Math.sin(De)*Te,radius:3.5,color:"#10b981",damage:0,isEnemy:!0,isFakeHologram:!0,life:250}),ne.playGlitch(),Kt(i==="ru"?"⚠️ КРАХ СИСТЕМЫ: ОБНАРУЖЕНА ФАНТОМНАЯ СИГНАТУРА ВЫСТРЕЛА":"⚠️ SYSTEM CORRUPTION: PHANTOM SHOT SIGNATURE DETECTED")};V.useEffect(()=>{ne.startMusic(),ie.current.portals=[],ie.current.portalTimer=60,ie.current.history=[],ie.current.cloneFrameIndex=0,ie.current.clonesDestroyedInRound=0,ie.current.shipsDestroyedInRound=0,ie.current.clones=[],g&&g.length>0&&g.forEach((me,ze)=>{me&&me.length>0&&ie.current.clones.push({id:`clone-${ze}-${Date.now()}`,history:me,frameIndex:0,x:me[0].x,y:me[0].y,angle:me[0].angle,radius:13,health:80,maxHealth:80,isDead:!1})});const H=()=>{if(!b.current||!x.current)return;const me=b.current.clientWidth,ze=b.current.clientHeight;x.current.width=me,x.current.height=ze,ie.current.dimensions={width:me,height:ze}};window.addEventListener("resize",H),H();const d=[];for(let me=0;me<80;me++)d.push({x:Math.random()*window.innerWidth,y:Math.random()*window.innerHeight,size:Math.random()*2+.5,speed:Math.random()*.4+.1});ie.current.stars=d;const A=5;for(let me=0;me<A;me++)ei(!1);const ue=setTimeout(()=>{Mi()},1200);return()=>{window.removeEventListener("resize",H),clearTimeout(ue),ne.stopAll()}},[]);const ei=(H=!0)=>{const d=ie.current.player;let A=0,ue=0;if(H){const ve=Math.floor(Math.random()*4);ve===0?(A=Math.random()*Ft,ue=20):ve===1?(A=Ft-20,ue=Math.random()*Wt):ve===2?(A=Math.random()*Ft,ue=Wt-20):(A=20,ue=Math.random()*Wt)}else do A=Math.random()*Ft,ue=Math.random()*Wt;while(Math.hypot(A-d.x,ue-d.y)<200);const me=["crawler","swarm","scout"],ze=me[Math.floor(Math.random()*me.length)],ft=[{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)}],De=ft[Math.floor(Math.random()*ft.length)];let Te=34,de=10,Ee=1,xt="#94a3b8",bn="korabl1";ze==="crawler"?(Te=55,de=25,Ee=.6,bn=Math.random()>.5?"asteroid1":"asteroid2"):ze==="scout"?(Te=39,de=20,Ee=1.4,bn="korabl1"):(Te=29,de=20,Ee=1.8,bn=Math.random()>.5?"sputnik1":"sputnik2");const In=Math.pow(1.1,a-1),Xn=Math.round(de*In),E={id:Math.random().toString(),x:A,y:ue,vx:(Math.random()-.5)*2*Ee*In,vy:(Math.random()-.5)*2*Ee*In,radius:Te,type:ze,health:Xn,maxHealth:Xn,color:xt,angle:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.02,panicTimer:0,imageId:bn,realIdentity:{name:De.name,civilianCount:De.pop}};ie.current.enemies.push(E)};V.useEffect(()=>{const H=Ee=>{ie.current.keys[Ee.key.toLowerCase()]=!0,(Ee.key===" "||Ee.key==="ArrowUp"||Ee.key==="ArrowDown")&&Ee.preventDefault()},d=Ee=>{ie.current.keys[Ee.key.toLowerCase()]=!1},A=Ee=>{if(!x.current)return;const xt=x.current.getBoundingClientRect();ie.current.mouse.x=Ee.clientX-xt.left,ie.current.mouse.y=Ee.clientY-xt.top,ie.current.mouse.inside=!0},ue=Ee=>{Ee.button===0?ie.current.mouse.isDown=!0:Ee.button===2&&(ie.current.mouse.rightDown=!0)},me=Ee=>{Ee.button===0?ie.current.mouse.isDown=!1:Ee.button===2&&(ie.current.mouse.rightDown=!1)},ze=()=>{ie.current.mouse.inside=!1,ie.current.mouse.isDown=!1,ie.current.mouse.rightDown=!1},ft=Ee=>{Ee.preventDefault()},De=Ee=>{if(!x.current||Ee.touches.length===0)return;const xt=x.current.getBoundingClientRect();ie.current.mouse.x=Ee.touches[0].clientX-xt.left,ie.current.mouse.y=Ee.touches[0].clientY-xt.top,ie.current.mouse.inside=!0,ie.current.mouse.isDown=!0,ie.current.mouse.rightDown=!0},Te=()=>{ie.current.mouse.isDown=!1,ie.current.mouse.rightDown=!1,ie.current.mouse.inside=!1};window.addEventListener("keydown",H),window.addEventListener("keyup",d);const de=x.current;return de&&(de.addEventListener("mousemove",A),de.addEventListener("mousedown",ue),de.addEventListener("mouseup",me),de.addEventListener("mouseleave",ze),de.addEventListener("contextmenu",ft),de.addEventListener("touchmove",De,{passive:!0}),de.addEventListener("touchstart",De,{passive:!0}),de.addEventListener("touchend",Te)),()=>{window.removeEventListener("keydown",H),window.removeEventListener("keyup",d),de&&(de.removeEventListener("mousemove",A),de.removeEventListener("mousedown",ue),de.removeEventListener("mouseup",me),de.removeEventListener("mouseleave",ze),de.removeEventListener("contextmenu",ft),de.removeEventListener("touchmove",De),de.removeEventListener("touchstart",De),de.removeEventListener("touchend",Te))}},[]),V.useEffect(()=>{let H,d=performance.now();const A=ue=>{if(!ie.current.gameActive)return;const me=ue-d;d=ue,wi(me),Al(),H=requestAnimationFrame(A)};return H=requestAnimationFrame(A),()=>{cancelAnimationFrame(H)}},[a]);const wi=H=>{const d=ie.current,A=d.player,ue=d.dimensions;if(d.roundTimeRemaining=Math.max(0,d.roundTimeRemaining-H/1e3),Rn(Math.ceil(d.roundTimeRemaining)),a>=5&&Date.now()-j.current>42e3){j.current=Date.now();const E=y.msg_hack_warnings;if(E&&E.length>0){const ve=E[Math.floor(Math.random()*E.length)];Kt(ve),ne.playGlitch()}}if(d.portalTimer-=H/1e3,d.portalTimer<=0){d.portalTimer=60;const E=100,ve=E+Math.random()*(Ft-E*2),ee=E+Math.random()*(Wt-E*2),_e={id:Math.random().toString(),x:ve,y:ee,radius:23,health:12+a*2,maxHealth:12+a*2,timeLeft:15,maxTime:15,pulse:0};d.portals.push(_e),Kt(y.msg_portal),ne.playGlitch()}for(let E=d.portals.length-1;E>=0;E--){const ve=d.portals[E];if(ve.timeLeft-=H/1e3,ve.pulse+=H*.005,Math.random()<.3){const ee=Math.random()*Math.PI*2,_e=ve.radius+Math.random()*30;d.particles.push({x:ve.x+Math.cos(ee)*_e,y:ve.y+Math.sin(ee)*_e,vx:-Math.cos(ee)*(Math.random()*1.5+.5),vy:-Math.sin(ee)*(Math.random()*1.5+.5),radius:Math.random()*2+1,color:"#c084fc",alpha:1,decay:.03,type:"spark"})}if(ve.timeLeft<=0){d.gameActive=!1,ne.stopAll(),ne.playExplosion(1.5);for(let ee=0;ee<40;ee++){const _e=Math.random()*Math.PI*2,je=Math.random()*8+3;d.particles.push({x:ve.x,y:ve.y,vx:Math.cos(_e)*je,vy:Math.sin(_e)*je,radius:Math.random()*5+2,color:"#ef4444",alpha:1,decay:.015,type:"shatter"})}en("PORTAL_EXPLOSION"),re(!0);return}}if(d.totalKills===0){if(Date.now()-S.current>=12e4){d.gameActive=!1,ne.stopAll(),m&&m();return}}else if(Date.now()-S.current>=12e4&&u){d.gameActive=!1,ne.stopAll(),u();return}if(d.roundTimeRemaining<=0){d.gameActive=!1,ne.stopAll(),d.totalKills===0?m&&m():re(!0);return}d.cameraShake>0&&(d.cameraShake-=.5),qn(E=>E<=1?0:E-1),a===10&&d.station&&Math.random()<.01&&ne.playAlarm(),A.weapons.fireRateCooldown>0&&(A.weapons.fireRateCooldown-=1),d.gameActive&&!d.isBrokenDown&&A.health>0&&(d.breakdownCooldown>0&&d.breakdownCooldown--,d.breakdownTimer--,d.breakdownTimer<=0&&$a.current()),d.stars.forEach(E=>{E.y+=E.speed,E.y>ue.height&&(E.y=0,E.x=Math.random()*ue.width)}),d.hackTimer--,d.hackTimer<=0&&(d.hackActive=!d.hackActive,d.hackActive?d.hackTimer=240+Math.floor(Math.random()*120):d.hackTimer=480+Math.floor(Math.random()*300)),d.hackActive?d.hackOpacityMultiplier=Math.min(1,d.hackOpacityMultiplier+.025):d.hackOpacityMultiplier=Math.max(0,d.hackOpacityMultiplier-.015);const me=60+a*8,ze=14+a;if(d.matrixStreams.length<ze){const ve=Math.random()<.5?Math.random()*me:ue.width-Math.random()*me,ee="0101010101日ﾊﾐﾋｰｳｼﾅﾓﾆｻﾜﾂｵﾘｱﾎﾏｹABCDEFGHIJKLMNOPQRSTUVWXYZ",_e=Math.floor(Math.random()*8)+6,je=[];for(let be=0;be<_e;be++)je.push(ee[Math.floor(Math.random()*ee.length)]);d.matrixStreams.push({x:ve,y:-Math.random()*150-20,speed:1.2+Math.random()*2.8,opacity:.35+Math.random()*.55,length:_e,chars:je})}d.matrixStreams.forEach(E=>{if(E.y+=E.speed,Math.random()<.04){const ve="0101010101日ﾊﾐﾋｰｳｼﾅﾓﾆｻﾜﾂｵﾘｱﾎﾏｹ",ee=Math.floor(Math.random()*E.chars.length);E.chars[ee]=ve[Math.floor(Math.random()*ve.length)]}}),d.matrixStreams=d.matrixStreams.filter(E=>E.y<ue.height+120);let ft=.05,De=4.5,Te=.12,de=d.isBrokenDown?.94:.98;if(!d.isBrokenDown)if(d.mouse.inside){let E=d.camera.x,ve=d.camera.y;const ee=ue.width/2,_e=Ft-ue.width/2,je=ue.height/2,be=Wt-ue.height/2;_e>ee?E=Math.max(ee,Math.min(_e,E)):E=Ft/2,be>je?ve=Math.max(je,Math.min(be,ve)):ve=Wt/2;const we=A.x-E+ue.width/2,kt=A.y-ve+ue.height/2,nn=d.mouse.x-we,C=d.mouse.y-kt;let ye=Math.atan2(C,nn)-A.angle;for(;ye<-Math.PI;)ye+=Math.PI*2;for(;ye>Math.PI;)ye-=Math.PI*2;A.angle+=ye*.15,Math.hypot(nn,C)>40&&d.mouse.rightDown&&(A.vx+=Math.cos(A.angle)*Te,A.vy+=Math.sin(A.angle)*Te)}else(d.keys.a||d.keys.arrowleft)&&(A.angle-=ft),(d.keys.d||d.keys.arrowright)&&(A.angle+=ft),(d.keys.w||d.keys.arrowup)&&(A.vx+=Math.cos(A.angle)*Te,A.vy+=Math.sin(A.angle)*Te);A.vx*=de,A.vy*=de;const Ee=Math.hypot(A.vx,A.vy);Ee>De&&(A.vx=A.vx/Ee*De,A.vy=A.vy/Ee*De),A.x+=A.vx,A.y+=A.vy;const xt=A.radius+4;A.x<xt&&(A.x=xt,A.vx*=-.5),A.x>Ft-xt&&(A.x=Ft-xt,A.vx*=-.5),A.y<xt&&(A.y=xt,A.vy*=-.5),A.y>Wt-xt&&(A.y=Wt-xt,A.vy*=-.5);const bn=d.mouse.isDown||d.keys[" "]||d.keys.enter;if(bn&&A.weapons.fireRateCooldown<=0&&!d.isBrokenDown&&Ni(),d.gameActive&&d.clones&&d.clones.length>0&&d.clones.forEach(E=>{if(!E.isDead){const ve=E.history[E.frameIndex];ve&&(E.x=ve.x,E.y=ve.y,E.angle=ve.angle,ve.isFiring&&ho(E,ve),E.frameIndex=(E.frameIndex+1)%E.history.length)}}),d.gameActive&&d.history.length<18e3&&d.history.push({x:A.x,y:A.y,angle:A.angle,isFiring:!d.isBrokenDown&&bn&&A.weapons.fireRateCooldown<=0,laserLevel:A.weapons.laserLevel,hasMissiles:A.weapons.hasMissiles}),a===10&&d.totalKills>=10&&!d.station&&(d.station={x:Ft/2,y:Wt/2,radius:52,health:500,maxHealth:500,absorbing:!1,absorbProgress:0},Kt(y.msg_absorb)),d.station){const E=d.station;if(Math.hypot(A.x-E.x,A.y-E.y),E.absorbing){if(A.x+=(E.x-A.x)*.02,A.y+=(E.y-A.y)*.02,E.absorbProgress+=.45,Math.random()<.8){const ve=Math.random()*Math.PI*2;d.particles.push({x:E.x+Math.cos(ve)*(E.radius+Math.random()*40),y:E.y+Math.sin(ve)*(E.radius+Math.random()*40),vx:(A.x-E.x)*.05+(Math.random()-.5)*2,vy:(A.y-E.y)*.05+(Math.random()-.5)*2,radius:Math.random()*3+1,color:"#22c55e",alpha:1,decay:.02,type:"spark"})}d.cameraShake=Math.max(d.cameraShake,3),E.absorbProgress>=100&&(E.absorbProgress=100,d.gameActive=!1,r())}}const In=d.station?2:a===10?8:4;d.enemies.length<In&&d.totalKills<F&&ei(!0),d.enemies.forEach((E,ve)=>{const ee=Math.pow(1.1,a-1),_e=Math.hypot(E.x-A.x,E.y-A.y);if(_e<120){E.panicTimer=40;const be=Math.atan2(E.y-A.y,E.x-A.x);E.vx=Math.cos(be)*3.5*ee,E.vy=Math.sin(be)*3.5*ee,Math.random()<.015&&_l===0&&(Kt(y.msg_aggression),ne.playAlarm())}else E.panicTimer>0?(E.panicTimer--,E.vx*=.95,E.vy*=.95):(E.vx+=(Math.random()-.5)*.1*ee,E.vy+=(Math.random()-.5)*.1*ee,E.vx*=.98,E.vy*=.98);E.x+=E.vx,E.y+=E.vy,E.angle+=E.rotationSpeed;const je=E.radius+4;if(E.x<je&&(E.x=je,E.vx*=-1),E.x>Ft-je&&(E.x=Ft-je,E.vx*=-1),E.y<je&&(E.y=je,E.vy*=-1),E.y>Wt-je&&(E.y=Wt-je,E.vy*=-1),E.isHostile&&(E.shootCooldown?E.shootCooldown--:E.shootCooldown=(60+Math.random()*120)/ee,E.shootCooldown<=0)){E.shootCooldown=(150+Math.random()*180)/ee;const be=Math.atan2(A.y-E.y,A.x-E.x);d.bullets.push({x:E.x+Math.cos(be)*(E.radius+4),y:E.y+Math.sin(be)*(E.radius+4),vx:Math.cos(be)*3.2,vy:Math.sin(be)*3.2,radius:3,color:"#ef4444",damage:8+a*1,isEnemy:!0,life:126}),ne.playLaser(!0)}if(_e<A.radius+E.radius){const be=Math.atan2(A.y-E.y,A.x-E.x);if(A.vx+=Math.cos(be)*2,A.vy+=Math.sin(be)*2,E.vx-=Math.cos(be)*2,E.vy-=Math.sin(be)*2,E.isHostile){A.shield>0?(A.shield-=15,A.shield<0&&(A.health+=A.shield,A.shield=0)):A.health-=15,A.health=Math.max(A.health,0),d.cameraShake=8,ne.playExplosion(.5);for(let kt=0;kt<8;kt++)d.particles.push({x:(A.x+E.x)/2,y:(A.y+E.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&&ne.playExplosion(.1);for(let we=0;we<3;we++)d.particles.push({x:(A.x+E.x)/2,y:(A.y+E.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"})}}}),d.bullets.forEach((E,ve)=>{if(E.isMissile){let ee=0,_e=0,je=!1;if(E.targetEnemyId){const be=d.enemies.find(we=>we.id===E.targetEnemyId);be&&(ee=be.x,_e=be.y,je=!0)}if(je){const be=ee-E.x,we=_e-E.y,kt=Math.atan2(we,be),nn=Math.atan2(E.vy,E.vx);let C=kt-nn;for(;C<-Math.PI;)C+=Math.PI*2;for(;C>Math.PI;)C-=Math.PI*2;const ge=nn+C*.12,ye=Math.hypot(E.vx,E.vy);E.vx=Math.cos(ge)*ye,E.vy=Math.sin(ge)*ye}else d.enemies.length>0&&(E.targetEnemyId=d.enemies[0].id)}if(E.isFakeHologram){const ee=A.x-E.x,_e=A.y-E.y,je=Math.hypot(ee,_e);je>2&&(E.vx=ee/je*7.5,E.vy=_e/je*7.5)}if(E.x+=E.vx,E.y+=E.vy,E.life--,Math.random()<.4&&d.particles.push({x:E.x,y:E.y,vx:(Math.random()-.5)*.5,vy:(Math.random()-.5)*.5,radius:Math.random()*2+1,color:E.color,alpha:.7,decay:.04,type:"spark"}),E.isEnemy||E.isCloneBullet){if(Math.hypot(E.x-A.x,E.y-A.y)<E.radius+A.radius)if(E.life=0,E.isFakeHologram){d.cameraShake=1.2,ne.playGlitch();for(let _e=0;_e<8;_e++)d.particles.push({x:A.x,y:A.y,vx:(Math.random()-.5)*3,vy:(Math.random()-.5)*3,radius:Math.random()*2+.5,color:"#34d399",alpha:.95,decay:.04,type:"spark"});d.particles.push({x:A.x,y:A.y-15,vx:0,vy:-.6,radius:0,color:"#10b981",alpha:1,decay:.02,type:"text",text:i==="ru"?"⚠️ ФАНТОМНЫЙ СИГНАЛ":"⚠️ PHANTOM SIGNAL",fontSize:11})}else{const _e=Math.atan2(A.y-E.y,A.x-E.x);A.vx+=Math.cos(_e)*.5,A.vy+=Math.sin(_e)*.5;let je=E.damage;d.isBrokenDown&&(je*=.3),A.shield>0?(A.shield-=je,A.shield<0&&(A.health+=A.shield,A.shield=0)):A.health-=je,!d.isBrokenDown&&d.breakdownCooldown<=0&&Math.random()<.15&&$a.current(),A.health=Math.max(A.health,0),d.cameraShake=5,ne.playExplosion(.3);const be=E.isCloneBullet?"#4ade80":"#f43f5e";for(let we=0;we<5;we++)d.particles.push({x:A.x,y:A.y,vx:(Math.random()-.5)*4,vy:(Math.random()-.5)*4,radius:Math.random()*2+1,color:be,alpha:1,decay:.04,type:"spark"})}}else d.portals.forEach((ee,_e)=>{if(Math.hypot(E.x-ee.x,E.y-ee.y)<E.radius+ee.radius&&(ee.health-=E.damage,E.life=0,d.particles.push({x:ee.x+(Math.random()-.5)*20,y:ee.y-15,vx:(Math.random()-.5)*1,vy:-1.2,radius:0,color:"#c084fc",alpha:1,decay:.015,type:"text",text:`STABILIZING ${E.damage}`,fontSize:12}),ne.playExplosion(.2),ee.health<=0)){d.portals.splice(_e,1),d.scoreVal+=500,A.shield=Math.min(A.maxShield,A.shield+25),Kt(y.msg_hack_fixed),ne.playCollect();for(let be=0;be<20;be++){const we=Math.random()*Math.PI*2,kt=Math.random()*4+2;d.particles.push({x:ee.x,y:ee.y,vx:Math.cos(we)*kt,vy:Math.sin(we)*kt,radius:Math.random()*3+1,color:"#a855f7",alpha:1,decay:.03,type:"spark"})}}}),d.enemies.forEach((ee,_e)=>{if(Math.hypot(E.x-ee.x,E.y-ee.y)<E.radius+ee.radius){const be=Math.random()<.25,we=E.damage*(be?2:1);ee.health-=we,E.life=0,!ee.isHostile&&ee.type!=="crawler"&&(ee.isHostile=!0,d.enemiesHostile||(d.enemiesHostile=!0,Kt(y.msg_defense_mode),ne.playAlarm())),d.particles.push({x:ee.x,y:ee.y-15,vx:(Math.random()-.5)*1,vy:-1.2,radius:0,color:be?"#f43f5e":"#4ade80",alpha:1,decay:.015,type:"text",text:be?`CRIT ${we}!`:`${we}`,fontSize:be?14:11}),ne.playExplosion(.3),ee.health<=0&&(d.enemies.splice(_e,1),na(ee))}}),d.clones.forEach(ee=>{if(!ee.isDead&&!E.isCloneBullet&&Math.hypot(E.x-ee.x,E.y-ee.y)<E.radius+ee.radius){const je=Math.random()<.25,be=E.damage*(je?1.5:1);ee.health-=be,E.life=0;for(let we=0;we<4;we++)d.particles.push({x:E.x,y:E.y,vx:(Math.random()-.5)*3,vy:(Math.random()-.5)*3,radius:Math.random()*2+1,color:"#22c55e",alpha:1,decay:.05,type:"spark"});if(d.particles.push({x:ee.x+(Math.random()-.5)*15,y:ee.y-20,vx:(Math.random()-.5)*.5,vy:-1,radius:0,color:"#4ade80",alpha:1,decay:.02,type:"text",text:`${je?"CRIT ":""}${Math.round(be)}`,fontSize:10}),ne.playExplosion(.15),ee.health<=0){ee.isDead=!0,d.clonesDestroyedInRound=(d.clonesDestroyedInRound||0)+1,ne.playExplosion(.5);for(let we=0;we<15;we++){const kt=Math.random()*Math.PI*2,nn=Math.random()*4+1;d.particles.push({x:ee.x,y:ee.y,vx:Math.cos(kt)*nn,vy:Math.sin(kt)*nn,radius:Math.random()*3+1,color:"#22c55e",alpha:1,decay:.02,type:"spark"})}Kt(i==="ru"?"🛡️ СУБПРОЦЕСС УДАЛЕН: ФАНТОМНАЯ КОПИЯ ДЕАКТИВИРОВАНА":"🛡️ SUBPROCESS DELETED: PHANTOM CLONE DEACTIVATED")}}})}),d.bullets=d.bullets.filter(E=>E.life>0),d.drops.forEach((E,ve)=>{const ee=Math.hypot(E.x-A.x,E.y-A.y);if(ee<150){const _e=Math.atan2(A.y-E.y,A.x-E.x);E.vx+=Math.cos(_e)*.35,E.vy+=Math.sin(_e)*.35}E.vx*=.94,E.vy*=.94,E.x+=E.vx,E.y+=E.vy,ee<A.radius+E.radius&&(d.drops.splice(ve,1),ne.playCollect(),E.type==="shield"?(A.shield=Math.min(A.maxShield,A.shield+25),Kt(y.msg_shield_restored)):(A.xp+=1,d.scoreVal+=100*(1+Math.floor(d.cameraShake/5)),d.particles.push({x:A.x,y:A.y-20,vx:0,vy:-1.5,radius:0,color:"#a78bfa",alpha:1,decay:.02,type:"text",text:"+100 ОЧКОВ",fontSize:12})))}),d.particles.forEach((E,ve)=>{E.x+=E.vx,E.y+=E.vy,E.alpha-=E.decay,E.alpha<=0&&d.particles.splice(ve,1)}),Math.random()<.005&&(A.shield=Math.min(A.maxShield,A.shield+2)),P(d.scoreVal),W(Math.round(A.health)),K(Math.round(A.shield)),Me(d.totalKills),fe(Math.max(0,F-d.totalKills)),Hn(d.clones?d.clones.filter(E=>!E.isDead).length:0),Ne(d.clonesDestroyedInRound||0),Rt(d.shipsDestroyedInRound||0);const Xn=!d.clones||d.clones.every(E=>E.isDead);a!==10&&d.totalKills>=F&&Xn&&!$&&!Ae&&(d.gameActive=!1,ne.playCollect(),te(!0))},na=H=>{const d=ie.current;d.totalKills++,H.imageId!=="asteroid1"&&H.imageId!=="asteroid2"&&(d.shipsDestroyedInRound=(d.shipsDestroyedInRound||0)+1),d.cameraShake=12,S.current=Date.now();const ue=Math.floor(F*.5);if(a>=5&&!N.current&&d.totalKills>=ue){N.current=!0;const De=d.player;d.particles.push({x:De.x,y:De.y-35,vx:0,vy:-.6,radius:0,color:"#f87171",alpha:1,decay:.005,type:"text",text:y.residential_module_destroyed,fontSize:14}),ne.playGlitch(),Kt(y.residential_module_destroyed)}lt(De=>De+1),U(120);const me=100*(Fe>5?3:Fe>2?2:1);d.scoreVal+=me,ne.playExplosion(1),d.particles.push({x:H.x,y:H.y,vx:(Math.random()-.5)*2,vy:-2,radius:0,color:"#f59e0b",alpha:1,decay:.01,type:"text",text:Fe>3?`КОМБО х${Fe} (+${me})!`:`РАЗРУШЕН (+${me})`,fontSize:Fe>3?16:12});const ze=20;for(let De=0;De<ze;De++){const Te=Math.random()*Math.PI*2,de=1.5+Math.random()*4.5;d.particles.push({x:H.x,y:H.y,vx:Math.cos(Te)*de,vy:Math.sin(Te)*de,radius:Math.random()*3+1,color:Math.random()>.4?"#38bdf8":"#f43f5e",alpha:1,decay:.015+Math.random()*.015,type:"shatter"})}const ft=Math.random()<.6?1:2;for(let De=0;De<ft;De++){const Te=Math.random()>.75?"shield":"xp";d.drops.push({id:Math.random().toString(),x:H.x,y:H.y,vx:(Math.random()-.5)*3,vy:(Math.random()-.5)*3,radius:4,type:Te,color:Te==="shield"?"#10b981":"#a78bfa",realIdentity:{name:Te==="shield"?"Контейнер с кислородом":"Спасательная шлюпка"}})}},Ni=()=>{const H=ie.current,d=H.player,A=18-d.weapons.laserLevel*2;d.weapons.fireRateCooldown=A,ne.playLaser(!1);const ue=d.weapons.laserLevel;if(ue===1?vn(d.angle):ue===2?(vn(d.angle-.1),vn(d.angle+.1)):(vn(d.angle-.22),vn(d.angle),vn(d.angle+.22)),d.weapons.hasMissiles&&Math.random()<.4&&H.enemies.length>0){ne.playLaser(!0);const me=H.enemies[0],ze=d.angle+(Math.random()-.5)*1.5;H.bullets.push({x:d.x-Math.cos(d.angle)*10,y:d.y-Math.sin(d.angle)*10,vx:Math.cos(ze)*3.5,vy:Math.sin(ze)*3.5,radius:3,color:"#f43f5e",damage:18,isMissile:!0,targetEnemyId:me.id,life:105})}},vn=H=>{const d=ie.current,A=d.player;d.bullets.push({x:A.x+Math.cos(A.angle)*16,y:A.y+Math.sin(A.angle)*16,vx:Math.cos(H)*7.5,vy:Math.sin(H)*7.5,radius:3,color:"#4ade80",damage:10+A.weapons.laserLevel*2,life:56})},ho=(H,d)=>{const A=ie.current,ue=d.laserLevel||1,me=10+ue*2;ne.playLaser(!1);const ze=ft=>{A.bullets.push({x:H.x+Math.cos(H.angle)*16,y:H.y+Math.sin(H.angle)*16,vx:Math.cos(ft)*7.5,vy:Math.sin(ft)*7.5,radius:3,color:"#4ade80",damage:me,life:56,isCloneBullet:!0})};if(ue===1?ze(H.angle):ue===2?(ze(H.angle-.1),ze(H.angle+.1)):(ze(H.angle-.22),ze(H.angle),ze(H.angle+.22)),d.hasMissiles&&Math.random()<.4){ne.playLaser(!0);const ft=H.angle+(Math.random()-.5)*1.5;let De;A.enemies.length>0&&(De=A.enemies[0].id),A.bullets.push({x:H.x-Math.cos(H.angle)*10,y:H.y-Math.sin(H.angle)*10,vx:Math.cos(ft)*3.5,vy:Math.sin(ft)*3.5,radius:3,color:"#f43f5e",damage:18,isMissile:!0,targetEnemyId:De,life:105,isCloneBullet:!0})}},Al=()=>{const H=x.current;if(!H)return;const d=H.getContext("2d");if(!d)return;const A=ie.current,ue=A.player,me=A.dimensions,ze=ue.vx*15,ft=ue.vy*15,De=ue.x+ze,Te=ue.y+ft;A.camera.x+=(De-A.camera.x)*.1,A.camera.y+=(Te-A.camera.y)*.1;let de=A.camera.x,Ee=A.camera.y;const xt=me.width/2,bn=Ft-me.width/2,In=me.height/2,Xn=Wt-me.height/2;if(bn>xt?de=Math.max(xt,Math.min(bn,de)):de=Ft/2,Xn>In?Ee=Math.max(In,Math.min(Xn,Ee)):Ee=Wt/2,d.save(),A.cameraShake>0){const C=(Math.random()-.5)*A.cameraShake,ge=(Math.random()-.5)*A.cameraShake;d.translate(C,ge)}if(d.fillStyle="#000000",d.fillRect(0,0,me.width,me.height),A.stars.forEach(C=>{d.fillStyle=`rgba(167, 243, 208, ${Math.random()*.4+.6})`,d.beginPath();let ge=(C.x-de*C.speed*.4)%me.width;ge<0&&(ge+=me.width);let ye=(C.y-Ee*C.speed*.4)%me.height;ye<0&&(ye+=me.height),d.arc(ge,ye,C.size,0,Math.PI*2),d.fill()}),d.save(),d.translate(me.width/2-de,me.height/2-Ee),A.station){const C=A.station;d.save();const ge=d.createRadialGradient(C.x,C.y,C.radius*.4,C.x,C.y,C.radius*2);ge.addColorStop(0,"rgba(34, 197, 94, 0.25)"),ge.addColorStop(1,"rgba(34, 197, 94, 0)"),d.fillStyle=ge,d.beginPath(),d.arc(C.x,C.y,C.radius*2,0,Math.PI*2),d.fill(),d.strokeStyle="#16a34a",d.lineWidth=2,d.beginPath(),d.arc(C.x,C.y,C.radius+15,0,Math.PI*2),d.setLineDash([10,15]),d.stroke(),d.strokeStyle="#4ade80",d.beginPath(),d.arc(C.x,C.y,C.radius+25,0,Math.PI*2),d.setLineDash([20,20]),d.stroke(),d.fillStyle="#064e3b",d.strokeStyle="#22c55e",d.lineWidth=4,d.beginPath();const ye=8,tt=Math.PI/ye;let Ke=0;for(let vt=0;vt<ye*2;vt++){const nt=vt%2===0?C.radius:C.radius*.6,dt=C.x+Math.cos(Ke)*nt,_t=C.y+Math.sin(Ke)*nt;vt===0?d.moveTo(dt,_t):d.lineTo(dt,_t),Ke+=tt}d.closePath(),d.fill(),d.stroke(),d.fillStyle="#16a34a",d.beginPath(),d.arc(C.x,C.y,C.radius*.35,0,Math.PI*2),d.fill(),C.absorbing?(d.fillStyle="rgba(255, 255, 255, 0.8)",d.font="bold 12px monospace",d.textAlign="center",d.fillText(`СИНХРОНИЗАЦИЯ: ${Math.round(C.absorbProgress)}%`,C.x,C.y+5)):(d.fillStyle="#ffffff",d.font="bold 11px monospace",d.textAlign="center",d.fillText("ЭНЕРГОСТАНЦИЯ",C.x,C.y-4),d.fillStyle="#4ade80",d.fillText("СТАБИЛЬНА",C.x,C.y+10)),d.restore()}A.portals.forEach(C=>{d.save();const ge=Math.sin(C.pulse*2.5)*5,ye=C.radius+ge,tt=d.createRadialGradient(C.x,C.y,ye*.2,C.x,C.y,ye*1.5);tt.addColorStop(0,"rgba(168, 85, 247, 0.75)"),tt.addColorStop(.5,"rgba(219, 39, 119, 0.45)"),tt.addColorStop(1,"rgba(168, 85, 247, 0)"),d.fillStyle=tt,d.shadowBlur=18,d.shadowColor="#c084fc",d.beginPath(),d.arc(C.x,C.y,ye*1.5,0,Math.PI*2),d.fill(),d.setLineDash([]),d.strokeStyle="#db2777",d.lineWidth=2.5,d.beginPath(),d.arc(C.x,C.y,ye,C.pulse*1.5,C.pulse*1.5+Math.PI*1.2),d.stroke(),d.strokeStyle="#a855f7",d.lineWidth=1.5,d.beginPath(),d.arc(C.x,C.y,ye*.7,-C.pulse*2.2,-C.pulse*2.2+Math.PI*.8),d.stroke(),d.fillStyle="#0f172a",d.beginPath(),d.arc(C.x,C.y,ye*.35,0,Math.PI*2),d.fill(),d.strokeStyle="#f43f5e",d.lineWidth=2,d.beginPath(),d.arc(C.x,C.y,ye*.35,0,Math.PI*2),d.stroke(),d.fillStyle="#ffffff",d.font="bold 11px sans-serif",d.textAlign="center",d.shadowBlur=4,d.shadowColor="#f43f5e",d.fillText(`⚠️ КРАХ СИСТЕМЫ: ${Math.ceil(C.timeLeft)}с`,C.x,C.y-C.radius-22);const Ke=40,vt=4,nt=C.x-Ke/2,dt=C.y-C.radius-12;d.fillStyle="rgba(0, 0, 0, 0.85)",d.fillRect(nt,dt,Ke,vt);const _t=Math.max(0,C.health/C.maxHealth);d.fillStyle="#a855f7",d.fillRect(nt,dt,Ke*_t,vt),d.strokeStyle="rgba(255,255,255,0.3)",d.lineWidth=1,d.strokeRect(nt,dt,Ke,vt),d.restore()}),A.drops.forEach(C=>{d.save(),d.shadowBlur=12,d.shadowColor=C.color,d.fillStyle=C.color,d.beginPath(),d.arc(C.x,C.y,C.radius,0,Math.PI*2),d.fill(),d.strokeStyle="rgba(255,255,255,0.45)",d.lineWidth=1,d.beginPath(),d.arc(C.x,C.y,C.radius+3,0,Math.PI*2),d.stroke(),d.restore()}),A.bullets.forEach(C=>{if(d.save(),C.isFakeHologram?(d.globalAlpha=Math.random()>.18?.85:.25,d.shadowBlur=14,d.shadowColor="#10b981",d.fillStyle="#34d399"):(d.shadowBlur=8,d.shadowColor=C.color,d.fillStyle=C.color),C.isMissile){d.beginPath();const ge=Math.atan2(C.vy,C.vx);d.translate(C.x,C.y),d.rotate(ge),d.moveTo(8,0),d.lineTo(-6,-4),d.lineTo(-6,4),d.closePath(),d.fill()}else{d.beginPath();const ge=C.isFakeHologram?16:12,ye=Math.atan2(C.vy,C.vx);d.moveTo(C.x,C.y),d.lineTo(C.x-Math.cos(ye)*ge,C.y-Math.sin(ye)*ge),d.lineWidth=C.isFakeHologram?C.radius*1.5:C.radius,d.strokeStyle=C.isFakeHologram?"#34d399":C.color,d.stroke()}d.restore()}),A.enemies.forEach(C=>{d.save(),d.translate(C.x,C.y),d.rotate(C.angle);const ge=!!C.isHostile;d.shadowBlur=C.panicTimer>0?15:ge?12:4,d.shadowColor=C.panicTimer>0?"#ea580c":ge?"#ef4444":C.color,d.fillStyle=C.panicTimer>0?"#ea580c":ge?"#b91c1c":C.color,d.strokeStyle=C.panicTimer>0?"#f97316":ge?"#ef4444":"#cbd5e1",d.lineWidth=1.5;const ye=C.imageId?T.current[C.imageId]:null,tt=C.radius;if(ye&&(ye.complete||ye.width>0)){const Ke=tt*2.5;d.save(),d.rotate(Math.PI/2),d.drawImage(ye,-Ke/2,-Ke/2,Ke,Ke),d.restore()}(C.panicTimer>0||ge)&&(d.fillStyle="#ef4444",d.font="bold 10px monospace",d.fillText(ge?"⚔️":"⚠️",-5,-tt-5)),d.restore()}),A.particles.forEach(C=>{if(d.save(),d.globalAlpha=C.alpha,d.fillStyle=C.color,C.type==="text"&&C.text){const ge=C.text.includes("⚠️")||C.text.includes("РАЗРУШЕН")||C.text.includes("DESTROYED")||C.text.includes("MODULE")||C.fontSize&&C.fontSize>=13;let ye=C.text,tt=0,Ke=0;if(ge){const vt="0123456789ｦｱｳｴｵｷｹﾒ▣▲Ø✖★$#@&%+*=;:_/?",nt=C.text.split("");for(let dt=0;dt<nt.length;dt++)nt[dt]===" "||nt[dt]==="⚠️"||nt[dt]==="✓"||Math.random()<.2&&(nt[dt]=vt[Math.floor(Math.random()*vt.length)]);ye=nt.join(""),Math.random()<.35&&(tt=(Math.random()-.5)*6,Ke=(Math.random()-.5)*3)}if(d.font=`bold ${C.fontSize||12}px monospace`,d.textAlign="center",d.shadowBlur=ge?10:4,d.shadowColor=C.color,ge){d.save(),d.fillStyle="#ef4444",d.globalAlpha=C.alpha*.45;const vt=(Math.random()-.5)*6+tt,nt=(Math.random()-.5)*3+Ke;d.fillText(ye,C.x-2+vt,C.y+nt),d.restore(),d.save(),d.fillStyle="#10b981",d.globalAlpha=C.alpha*.45;const dt=(Math.random()-.5)*6+tt,_t=(Math.random()-.5)*3+Ke;d.fillText(ye,C.x+2+dt,C.y+_t),d.restore()}d.fillText(ye,C.x+tt,C.y+Ke)}else d.beginPath(),d.arc(C.x,C.y,C.radius,0,Math.PI*2),d.fill();d.restore()}),A.clones&&A.clones.length>0&&A.clones.forEach((C,ge)=>{if(!C.isDead){d.save();let ye=.45+Math.sin(Date.now()*.04+ge)*.15;Math.random()<.1&&(ye=.1+Math.random()*.2),d.globalAlpha=ye,d.translate(C.x,C.y),d.rotate(C.angle),d.scale(2,2),Math.random()<.5&&(d.fillStyle="rgba(34, 197, 94, 0.45)",d.shadowBlur=12,d.shadowColor="#22c55e",d.beginPath(),d.moveTo(-15,0),d.lineTo(-22-Math.random()*8,(Math.random()-.5)*6),d.lineTo(-15,2),d.closePath(),d.fill());const tt=T.current.player;if(tt&&tt.complete){const Ue=C.radius*2.8;d.save(),d.rotate(Math.PI/2),d.shadowBlur=15,d.shadowColor="#22c55e",d.drawImage(tt,-Ue/2,-Ue/2,Ue,Ue),d.globalCompositeOperation="source-atop",d.fillStyle="rgba(34, 197, 94, 0.75)",d.fillRect(-Ue/2,-Ue/2,Ue,Ue),d.restore(),d.save(),d.rotate(Math.PI/2),d.globalCompositeOperation="source-atop",d.strokeStyle="rgba(16, 185, 129, 0.4)",d.lineWidth=1;const Kn=Date.now()/4%12;d.beginPath();for(let _a=-Ue/2;_a<Ue/2;_a+=3)d.moveTo(-Ue/2,_a+Kn%3),d.lineTo(Ue/2,_a+Kn%3);if(d.stroke(),d.restore(),Math.random()<.15){const _a=(Math.random()-.5)*6;d.save(),d.translate(_a,0),d.rotate(Math.PI/2),d.globalAlpha=ye*.4,d.drawImage(tt,-Ue/2,-Ue/2,Ue,Ue),d.globalCompositeOperation="source-atop",d.fillStyle="#4ade80",d.fillRect(-Ue/2,-Ue/2,Ue,Ue),d.restore()}}else{d.shadowBlur=15,d.shadowColor="#22c55e",d.fillStyle="rgba(6, 78, 59, 0.35)",d.strokeStyle="#22c55e",d.lineWidth=2,d.beginPath(),d.moveTo(18,0),d.lineTo(-12,-14),d.lineTo(-6,-4),d.lineTo(-6,4),d.lineTo(-12,14),d.closePath(),d.fill(),d.stroke(),d.fillStyle="#4ade80",d.beginPath(),d.arc(0,0,4,0,Math.PI*2),d.fill(),d.save(),d.strokeStyle="rgba(34, 197, 94, 0.35)",d.lineWidth=1;const Ue=Date.now()/4%12;d.beginPath();for(let Kn=-14;Kn<14;Kn+=3)d.moveTo(-12,Kn+Ue%3),d.lineTo(18,Kn+Ue%3);d.stroke(),d.restore()}d.restore(),d.save(),d.fillStyle="rgba(34, 197, 94, 0.85)",d.font="bold 9px monospace",d.textAlign="center",d.fillText(i==="ru"?`КОПИЯ #${ge+1}`:`GHOST #${ge+1}`,C.x,C.y-32);const Ke=30,vt=3.5,nt=C.x-Ke/2,dt=C.y-25;d.fillStyle="rgba(15, 23, 42, 0.7)",d.fillRect(nt,dt,Ke,vt);const _t=Math.max(0,Math.min(1,C.health/C.maxHealth));d.fillStyle="#22c55e",d.fillRect(nt,dt,Ke*_t,vt),d.strokeStyle="rgba(34, 197, 94, 0.5)",d.lineWidth=.5,d.strokeRect(nt,dt,Ke,vt),d.restore()}}),d.save(),d.translate(ue.x,ue.y),d.rotate(ue.angle),d.scale(2,2),(A.keys.w||A.keys.arrowup||A.mouse.inside&&A.mouse.rightDown)&&Math.random()<.75&&(d.fillStyle=Math.random()>.4?"#22c55e":"#10b981",d.shadowBlur=15,d.shadowColor="#22c55e",d.beginPath(),d.moveTo(-15,0),d.lineTo(-26-Math.random()*12,(Math.random()-.5)*8),d.lineTo(-15,3),d.closePath(),d.fill());const ve=T.current.player;if(ve&&ve.complete){d.shadowBlur=10,d.shadowColor="#4ade80";const C=ue.radius*2.8;d.save(),d.rotate(Math.PI/2),d.drawImage(ve,-C/2,-C/2,C,C),d.restore()}else d.shadowBlur=12,d.shadowColor="#4ade80",d.fillStyle="#0f172a",d.strokeStyle="#4ade80",d.lineWidth=2.5,d.beginPath(),d.moveTo(18,0),d.lineTo(-12,-14),d.lineTo(-6,-4),d.lineTo(-6,4),d.lineTo(-12,14),d.closePath(),d.fill(),d.stroke(),d.fillStyle="#22c55e",d.beginPath(),d.arc(0,0,5,0,Math.PI*2),d.fill();d.restore(),d.save();const ee=76,_e=7,je=ue.x-ee/2,be=ue.y-110;d.fillStyle="rgba(0, 0, 0, 0.85)",d.strokeStyle="rgba(74, 222, 128, 0.25)",d.lineWidth=2,d.fillRect(je,be,ee,_e*2+5),d.strokeRect(je,be,ee,_e*2+5);const we=Math.max(0,Math.min(1,ue.shield/ue.maxShield));d.fillStyle="#eab308",d.fillRect(je+2,be+2,(ee-4)*we,_e);const kt=Math.max(0,Math.min(1,ue.health/ue.maxHealth));d.fillStyle=kt<.35?"#ef4444":"#22c55e",d.fillRect(je+2,be+_e+3,(ee-4)*kt,_e),d.restore(),d.restore(),d.restore();const nn=60+a*8;if(A.matrixStreams.forEach(C=>{const ge=C.opacity*A.hackOpacityMultiplier;if(!(ge<=.01)){d.save(),d.font=`bold ${Math.floor(C.fontSize||11)}px monospace`,d.textAlign="center";for(let ye=0;ye<C.chars.length;ye++){const tt=C.y-ye*13;if(tt<-20||tt>me.height+20)continue;const Ke=ye===0,vt=ge*(1-ye/C.chars.length);d.shadowBlur=Ke?8:2,d.shadowColor="#22c55e",d.fillStyle=Ke?`rgba(240, 253, 244, ${vt*1.3})`:`rgba(34, 197, 94, ${vt})`,d.fillText(C.chars[ye],C.x,tt)}d.restore()}}),A.hackOpacityMultiplier>.01)for(let ge=0;ge<3;ge++){d.save();const ye=12e3+ge*3e3,Ke=Date.now()/ye%1*me.height,nt=ge%2===0?15:me.width-nn-15;d.strokeStyle=`rgba(34, 197, 94, ${.22*A.hackOpacityMultiplier})`,d.lineWidth=1,d.beginPath(),d.moveTo(nt,Ke),d.lineTo(nt+nn,Ke),d.stroke(),d.fillStyle=`rgba(34, 197, 94, ${.45*A.hackOpacityMultiplier})`,d.font="8px monospace";const dt=`0x${Math.floor(Ke*(73+ge)).toString(16).toUpperCase()}`,_t=["DECRYPT_SYS","BYPASS_SEC","DATA_STREAM_OK","MEM_CORRUPT"],Ue=`[${dt}:${_t[ge%_t.length]}]`;d.fillText(Ue,nt+4,Ke-3),d.restore()}},ti=H=>{const d=ie.current;H==="laser"?(d.player.weapons.laserLevel++,Kt(y.msg_weapon_upgraded.replace("{level}",d.player.weapons.laserLevel.toString()))):H==="missile"?(d.player.weapons.hasMissiles=!0,Kt(y.msg_missiles_activated)):(d.player.health=Math.min(d.player.maxHealth,d.player.health+45),d.player.shield=d.player.maxShield,Kt(y.msg_hull_repaired)),te(!1),Ce(!0)},ni=H=>{H.preventDefault();const d=ie.current;if(M.trim()===(d.clonesDestroyedInRound||0).toString()){ne.playCollect(),Ce(!1),q("");const A=(d.clonesDestroyedInRound||0).toString();localStorage.setItem("orbit_verification_code",A),localStorage.setItem("orbit_clones_destroyed",(d.clonesDestroyedInRound||0).toString()),localStorage.setItem("orbit_ships_destroyed",(d.shipsDestroyedInRound||0).toString()),d.totalKills=0,d.gameActive=!0,l(d.player.weapons,d.history)}else ne.playError(),se(!0),setTimeout(()=>se(!1),500),q("")},mo=()=>{const H=ie.current;H.station&&!H.station.absorbing&&(H.station.absorbing=!0,Sa(!0),Kt(y.msg_downloading))};return f.jsxs("div",{className:"relative w-full h-screen bg-black overflow-hidden select-none flex flex-col justify-between",ref:b,children:[f.jsx("canvas",{ref:x,className:"absolute inset-0 w-full h-full cursor-crosshair block z-0"}),f.jsx("div",{className:"absolute inset-0 bg-radial-gradient from-transparent to-black/40 pointer-events-none z-10"}),f.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"}),f.jsx("div",{className:"absolute top-0 inset-x-0 h-2 bg-green-400/20 blur-[3px] pointer-events-none z-20"}),f.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"}),f.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"}),f.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"}),f.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"}),Q<35&&f.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"}),f.jsxs("div",{className:"w-full p-6 flex justify-between items-start pointer-events-none z-20 relative",children:[f.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:[f.jsx("span",{className:"font-mono text-[10px] tracking-[0.15em] text-green-500 uppercase",children:"ОКНО СТЕРИЛИЗАЦИИ"}),f.jsxs("span",{className:`font-mono text-2xl font-bold tracking-widest ${un<30?"text-red-500 animate-pulse":"text-amber-400"}`,children:[Math.floor(un/60),":",(un%60).toString().padStart(2,"0")]})]}),f.jsx("div",{className:"flex flex-col gap-2 sm:pl-[170px] pl-[140px]",children:f.jsxs("div",{className:"flex flex-col gap-2",children:[f.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:[f.jsx("span",{className:"w-2 h-2 bg-green-400 rounded-full animate-ping"}),f.jsx("span",{className:"font-mono text-xs uppercase tracking-[0.15em] text-green-400",children:y.cleanup_sector.replace("{level}",a.toString())})]}),Q<35&&f.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:[f.jsx(Qf,{className:"w-3.5 h-3.5 text-red-500 animate-bounce"}),f.jsx("span",{children:y.hull_damaged})]})]})}),f.jsxs("div",{className:"flex flex-col items-end gap-2",children:[f.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:[f.jsx("span",{className:"font-mono text-[9px] tracking-wider text-green-500 uppercase",children:y.destruction_score}),f.jsx("span",{className:"font-mono text-xl font-bold text-green-400 tracking-widest",children:Z.toLocaleString()})]}),f.jsx("div",{className:"flex items-center gap-2 pointer-events-auto",children:a===10?f.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:f.jsx("span",{className:"text-red-400 font-bold",children:y.final_energy_storage})}):f.jsxs("div",{className:"bg-black/95 border-2 border-green-500/30 p-3.5 px-4 rounded-none backdrop-blur-md text-right font-mono flex flex-col gap-2 shadow-[0_0_20px_rgba(34,197,94,0.15)] w-[240px]",children:[f.jsxs("div",{className:"flex justify-between w-full items-center",children:[f.jsx("span",{className:"text-green-400 text-[10px] font-bold uppercase tracking-wider",children:y.sector_clearing_status}),f.jsxs("span",{className:`font-bold text-xs ${ae<=3?"text-red-400 animate-pulse":"text-emerald-400"}`,children:[Math.floor((F-ae)/F*100),"%"]})]}),f.jsx("div",{className:"w-full h-2 bg-green-950 overflow-hidden border border-green-900/50",children:f.jsx(Ie.div,{initial:{width:0},animate:{width:`${(F-ae)/F*100}%`},transition:{type:"spring",stiffness:50},className:`h-full ${ae<=3?"bg-red-500 shadow-[0_0_10px_rgba(239,68,68,0.5)]":"bg-emerald-500 shadow-[0_0_10px_rgba(16,185,129,0.5)]"}`})}),f.jsxs("div",{className:"space-y-1 text-[10px] pt-1 border-t border-green-950",children:[f.jsxs("div",{className:"flex justify-between w-full items-center",children:[f.jsx("span",{className:"text-green-700 uppercase",children:i==="ru"?"СТАТУС:":"STATUS:"}),f.jsx("span",{className:`font-bold ${ae<=3?"text-red-400 animate-pulse":"text-green-400"}`,children:ae<=3?y.status_critical:y.status_in_progress})]}),f.jsxs("div",{className:"flex justify-between w-full items-center",children:[f.jsxs("span",{className:"text-green-700 uppercase",children:[y.enemies_left,":"]}),f.jsx("span",{className:`font-bold ${ae<=3?"text-red-400 font-extrabold":"text-emerald-400"}`,children:ae})]})]}),g&&g.length>0&&f.jsxs("div",{className:"flex justify-between w-full items-center mt-1 pt-1 border-t border-green-900/30 font-mono",children:[f.jsx("span",{className:"text-[9px] text-green-700 uppercase",children:i==="ru"?"КОПИИ:":"PHANTOMS:"}),f.jsx("span",{className:`text-[10px] font-bold ${ut>0?"text-green-400 animate-pulse":"text-emerald-500"}`,children:ut})]})]})})]})]}),a===10&&ie.current.station&&!Gn&&f.jsx("div",{className:"absolute inset-0 flex justify-center items-center pointer-events-none z-30",children:f.jsxs(Ie.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:mo,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:[f.jsx("span",{children:y.absorb_energy}),f.jsx("span",{className:"text-[10px] font-normal tracking-widest text-green-200 uppercase",children:y.ready_to_extract})]})}),f.jsx("div",{className:"absolute bottom-4 inset-x-0 flex flex-col items-center gap-3 pointer-events-none z-20 select-none",children:f.jsx($n,{mode:"wait",children:_l>0&&f.jsxs(Ie.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:[f.jsx(io,{className:"w-4 h-4 text-green-400 animate-pulse flex-shrink-0"}),f.jsxs("p",{className:"font-sans text-xs text-green-300 leading-snug",children:[f.jsx("span",{className:"text-green-400 font-mono font-bold",children:y.ai_label}),' "',Tl,'"']})]})})}),f.jsx($n,{children:Ae&&f.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:f.jsxs(Ie.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},className:`w-full max-w-md bg-black border-2 ${J?"border-red-500 shadow-[0_0_40px_rgba(239,68,68,0.4)]":"border-green-500 shadow-[0_0_40px_rgba(34,197,94,0.3)]"} p-8 relative my-auto rounded-none font-mono`,children:[f.jsx("div",{className:"absolute top-0 left-0 w-6 h-6 border-t-2 border-l-2 border-[inherit]"}),f.jsx("div",{className:"absolute top-0 right-0 w-6 h-6 border-t-2 border-r-2 border-[inherit]"}),f.jsx("div",{className:"absolute bottom-0 left-0 w-6 h-6 border-b-2 border-l-2 border-[inherit]"}),f.jsx("div",{className:"absolute bottom-0 right-0 w-6 h-6 border-b-2 border-r-2 border-[inherit]"}),f.jsxs("div",{className:"text-center mb-6",children:[f.jsx(og,{className:`w-8 h-8 mx-auto mb-3 ${J?"text-red-500":"text-green-500"} opacity-70`}),f.jsx("h3",{className:"font-mono text-xl font-bold mt-3 text-white uppercase tracking-wider",children:i==="ru"?"ВЕРИФИКАЦИЯ":"VERIFICATION"}),f.jsx("p",{className:`font-mono text-xs mt-2 uppercase tracking-wide ${J?"text-red-400":"text-green-500"}`,children:i==="ru"?"СКОЛЬКО КОПИЙ БЫЛО УНИЧТОЖЕНО В ЭТОМ РАУНДЕ?":"HOW MANY CLONES WERE DESTROYED IN THIS ROUND?"})]}),f.jsx("form",{onSubmit:ni,className:"space-y-4",children:f.jsxs("div",{className:"relative flex items-center",children:[f.jsx("span",{className:`absolute left-3 text-sm font-bold ${J?"text-red-400":"text-green-400"}`,children:"»"}),f.jsx("input",{type:"text",autoFocus:!0,value:M,onChange:H=>q(H.target.value),placeholder:i==="ru"?"ЧИСЛО КОПИЙ...":"CLONE COUNT...",className:`w-full bg-black border-2 ${J?"border-red-500 text-red-400 focus:border-red-400":"border-green-800 text-green-400 focus:border-green-400"} rounded-none py-4 pl-8 pr-4 text-base font-bold font-mono outline-none tracking-widest uppercase text-center`}),a===1&&f.jsxs("div",{className:"absolute right-3 flex items-center gap-1.5 pointer-events-none",children:[f.jsx("span",{className:"text-[10px] text-green-600 uppercase tracking-widest",children:i==="ru"?"ПОДСКАЗКА:":"HINT:"}),f.jsx("span",{className:"text-emerald-400 font-bold bg-emerald-950/80 border border-emerald-900/50 px-1.5 py-0.5 rounded text-xs animate-pulse tracking-wide select-none",children:"0"})]})]})})]})})}),f.jsxs($n,{children:[$&&f.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:f.jsxs(Ie.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},className:"w-full max-w-lg bg-black border-2 border-green-500 p-8 shadow-[0_0_35px_rgba(34,197,94,0.2)] relative my-auto max-h-[90vh] overflow-y-auto rounded-none font-mono",id:"upgrade-modal",children:[f.jsx("div",{className:"absolute top-0 left-0 w-6 h-6 border-t-2 border-l-2 border-green-500"}),f.jsx("div",{className:"absolute top-0 right-0 w-6 h-6 border-t-2 border-r-2 border-green-500"}),f.jsx("div",{className:"absolute bottom-0 left-0 w-6 h-6 border-b-2 border-l-2 border-green-500"}),f.jsx("div",{className:"absolute bottom-0 right-0 w-6 h-6 border-b-2 border-r-2 border-green-500"}),f.jsxs("div",{className:"text-center mb-6",children:[f.jsx("span",{className:"px-3 py-1 bg-green-500/10 border border-green-500/30 rounded-none text-green-400 font-mono text-[10px] uppercase tracking-widest",children:y.orbit_cleared_badge}),f.jsx("h3",{className:"font-mono text-xl font-bold mt-3 text-white uppercase tracking-wider",children:y.sector_complete_title.replace("{level}",a.toString())}),f.jsx("p",{className:"font-mono text-xs text-green-500 mt-1 uppercase tracking-wide",children:y.choose_upgrade_desc})]}),f.jsxs("div",{className:"mb-6 p-4 bg-black border-2 border-emerald-500/30 rounded-none font-mono text-xs",children:[f.jsxs("div",{className:"text-emerald-400 font-bold mb-2 flex items-center justify-between text-[11px] border-b border-emerald-950 pb-2 tracking-wide uppercase",children:[f.jsxs("span",{children:["🛰️ ",i==="ru"?"ОТЧЕТ ПО ВЕРИФИКАЦИИ СИГНАЛА":"SIGNAL VERIFICATION REPORT"]}),f.jsx("span",{className:"text-[10px] text-emerald-500 animate-pulse",children:"● LIVE"})]}),f.jsxs("div",{className:"space-y-1.5 text-emerald-500/90 text-[11px]",children:[f.jsxs("div",{className:"flex justify-between",children:[f.jsx("span",{children:i==="ru"?"УСТРАНЕНО ФАНТОМНЫХ КОПИЙ:":"PHANTOM CLONES ELIMINATED:"}),f.jsx("span",{className:"text-white font-bold",children:Se})]}),f.jsxs("div",{className:"flex justify-between text-green-700",children:[f.jsx("span",{children:i==="ru"?"УНИЧТОЖЕНО ВРАЖЕСКИХ КОРАБЛЕЙ:":"ENEMY SHIPS DESTROYED:"}),f.jsx("span",{children:Ge})]}),f.jsxs("div",{className:"mt-3 pt-2.5 border-t border-emerald-950/80 flex justify-between items-center bg-emerald-950/10 p-2 border border-emerald-900/30 rounded-none",children:[f.jsx("span",{className:"font-bold text-emerald-400 text-[10px] uppercase tracking-wider",children:i==="ru"?"КОД ПОДТВЕРЖДЕНИЯ ДЛЯ СЛЕДУЮЩЕГО СЕКТОРA:":"CONFIRMATION CODE FOR NEXT SECTOR:"}),f.jsx("span",{className:"text-yellow-400 text-base font-black px-3 py-0.5 bg-yellow-950/40 border border-yellow-500/30 rounded-none tracking-widest",children:Se})]})]})]}),f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsxs("button",{onClick:()=>ti("laser"),className:"w-full p-4 bg-black hover:bg-green-950/20 border-2 border-green-500/30 hover:border-green-400 rounded-none transition-all cursor-pointer text-left flex items-center justify-between group uppercase",children:[f.jsxs("div",{className:"flex items-center gap-4",children:[f.jsx("div",{className:"p-3 bg-green-500/10 text-green-400 group-hover:scale-110 transition-transform rounded-none",children:f.jsx(Wy,{className:"w-5 h-5"})}),f.jsxs("div",{children:[f.jsx("div",{className:"font-mono text-sm font-bold text-green-200",children:y.upgrade_laser}),f.jsx("div",{className:"text-[10px] text-green-500 mt-0.5",children:y.upgrade_laser_desc})]})]}),f.jsx(Iu,{className:"w-5 h-5 text-green-600 group-hover:text-green-400 group-hover:translate-x-1 transition-all"})]}),f.jsxs("button",{onClick:()=>ti("missile"),className:"w-full p-4 bg-black hover:bg-green-950/20 border-2 border-green-500/30 hover:border-green-400 rounded-none transition-all cursor-pointer text-left flex items-center justify-between group uppercase",children:[f.jsxs("div",{className:"flex items-center gap-4",children:[f.jsx("div",{className:"p-3 bg-red-500/10 text-red-400 group-hover:scale-110 transition-transform rounded-none",children:f.jsx(og,{className:"w-5 h-5"})}),f.jsxs("div",{children:[f.jsx("div",{className:"font-mono text-sm font-bold text-green-200",children:y.upgrade_missiles}),f.jsx("div",{className:"text-[10px] text-green-500 mt-0.5",children:y.upgrade_missiles_desc})]})]}),f.jsx(Iu,{className:"w-5 h-5 text-green-600 group-hover:text-green-400 group-hover:translate-x-1 transition-all"})]}),f.jsxs("button",{onClick:()=>ti("repair"),className:"w-full p-4 bg-black hover:bg-green-950/20 border-2 border-green-500/30 hover:border-green-400 rounded-none transition-all cursor-pointer text-left flex items-center justify-between group uppercase",children:[f.jsxs("div",{className:"flex items-center gap-4",children:[f.jsx("div",{className:"p-3 bg-emerald-500/10 text-emerald-400 group-hover:scale-110 transition-transform rounded-none",children:f.jsx(io,{className:"w-5 h-5"})}),f.jsxs("div",{children:[f.jsx("div",{className:"font-mono text-sm font-bold text-green-200",children:y.upgrade_repair}),f.jsx("div",{className:"text-[10px] text-green-500 mt-0.5",children:y.upgrade_repair_desc})]})]}),f.jsx(Iu,{className:"w-5 h-5 text-green-600 group-hover:text-green-400 group-hover:translate-x-1 transition-all"})]})]})]})}),ke&&f.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:f.jsxs(Ie.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},className:"w-full max-w-md bg-black border-2 border-red-500 p-8 shadow-[0_0_40px_rgba(239,68,68,0.3)] relative text-center pointer-events-auto my-auto max-h-[90vh] overflow-y-auto rounded-none font-mono",id:"time-expired-modal",children:[f.jsx("div",{className:"absolute top-0 left-0 w-6 h-6 border-t-2 border-l-2 border-red-500"}),f.jsx("div",{className:"absolute top-0 right-0 w-6 h-6 border-t-2 border-r-2 border-red-500"}),f.jsx("div",{className:"absolute bottom-0 left-0 w-6 h-6 border-b-2 border-l-2 border-red-500"}),f.jsx("div",{className:"absolute bottom-0 right-0 w-6 h-6 border-b-2 border-r-2 border-red-500"}),yt==="PORTAL_EXPLOSION"?f.jsxs("div",{className:"mb-6",children:[f.jsx("span",{className:"px-3 py-1 bg-red-950/60 border border-red-500/50 text-red-500 font-mono text-[10px] uppercase tracking-[0.2em] font-bold animate-pulse",children:y.singularity_collapse}),f.jsx("h3",{className:"font-mono text-2xl font-black mt-4 text-red-500 tracking-wider uppercase",children:y.portal_explosion_title}),f.jsx("p",{className:"font-mono text-xs text-red-600/90 mt-3 leading-relaxed border-t border-b border-red-950/80 py-3 uppercase tracking-wide",children:y.portal_explosion_desc})]}):f.jsxs("div",{className:"mb-6",children:[f.jsx("span",{className:"px-3 py-1 bg-red-950/60 border border-red-500/50 text-red-500 font-mono text-[10px] uppercase tracking-[0.2em] font-bold animate-pulse",children:y.liquidation_failed}),f.jsx("h3",{className:"font-mono text-2xl font-black mt-4 text-red-500 tracking-wider uppercase",children:y.time_expired_title}),f.jsx("p",{className:"font-mono text-xs text-red-600/90 mt-3 leading-relaxed border-t border-b border-red-950/80 py-3 uppercase tracking-wide",children:y.time_expired_desc})]}),f.jsxs("div",{className:"p-4 bg-red-950/10 border-2 border-red-950 text-left font-mono text-xs text-red-500/85 mb-8 space-y-3.5 rounded-none uppercase tracking-wider",children:[f.jsxs("div",{className:"flex justify-between",children:[f.jsx("span",{className:"text-red-700",children:y.sector_number}),f.jsxs("span",{className:"text-white font-bold",children:["А-0",a]})]}),f.jsxs("div",{className:"flex justify-between",children:[f.jsx("span",{className:"text-red-700",children:y.objects_destroyed}),f.jsxs("span",{className:"text-red-400 font-bold",children:[Le," шт."]})]}),f.jsxs("div",{className:"flex justify-between",children:[f.jsx("span",{className:"text-red-700",children:y.operation_status}),f.jsx("span",{className:"text-red-500 font-bold",children:yt==="PORTAL_EXPLOSION"?y.portal_explosion_status:y.time_expired_status})]})]}),f.jsx("button",{onClick:()=>{const H=ie.current;H.roundTimeRemaining=300,H.totalKills=0,H.scoreVal=0,H.enemies=[],H.bullets=[],H.drops=[],H.particles=[],H.portals=[],H.portalTimer=60,H.player.health=100,H.player.shield=100,H.enemiesHostile=!1,Me(0),P(0),en(null),re(!1),S.current=Date.now(),H.gameActive=!1,ne.stopAll(),H.history=[],H.cloneFrameIndex=0,h&&h()},className:"w-full py-4 bg-black border-2 border-red-500 hover:bg-red-950 text-red-400 hover:text-white font-mono font-black rounded-none tracking-[0.2em] shadow-[0_0_20px_rgba(239,68,68,0.25)] hover:shadow-[0_0_30px_rgba(239,68,68,0.4)] cursor-pointer flex items-center justify-center gap-2 uppercase transition-all duration-300",id:"retry-sector-btn",children:f.jsxs("span",{children:["» ",y.return_to_menu," «"]})})]})})]}),f.jsx($n,{children:Pt&&f.jsx("div",{className:"absolute inset-0 bg-black/90 backdrop-blur-md z-45 flex items-center justify-center p-4",children:f.jsxs(Ie.div,{initial:{scale:.9,y:30,opacity:0},animate:{scale:1,y:0,opacity:1},exit:{scale:.9,y:30,opacity:0},className:"w-full max-w-lg bg-black border-2 border-green-500 shadow-[0_0_40px_rgba(34,197,94,0.3)] rounded-none overflow-hidden relative",children:[f.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,0,0.06),rgba(0,255,0,0.02),rgba(0,255,0,0.06))] bg-[length:100%_4px,6px_100%] pointer-events-none z-10"}),f.jsxs("div",{className:"bg-green-950/20 border-b border-green-500/30 p-4 flex items-center justify-between",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("div",{className:"w-3 h-3 bg-green-500 rounded-full animate-ping"}),f.jsx("span",{className:"font-mono text-sm font-black text-green-400 uppercase tracking-widest",children:i==="ru"?"СИСТЕМНЫЙ СБОЙ: РАЗРЫВ ПИТАНИЯ":"SYSTEM BREAKDOWN: POWER CUT"})]}),f.jsx("div",{className:"font-mono text-xs text-green-500/70 border border-green-500/30 px-2.5 py-0.5 uppercase tracking-wider animate-pulse",children:i==="ru"?"РУЧНОЙ РЕМОНТ":"MANUAL BYPASS"})]}),f.jsxs("div",{className:"p-4 border-b border-green-900/40 bg-black",children:[f.jsx("p",{className:"font-mono text-xs text-green-400 leading-relaxed text-center",children:i==="ru"?"Аварийные реле отключены. Соедините левые порты с соответствующими правыми терминалами с тем же номером для восстановления управления.":"Emergency relays are offline. Connect left ports with corresponding right terminals of the same number to restore control."}),f.jsxs("div",{className:"mt-3 flex justify-center items-center gap-6 text-[10px] font-mono uppercase tracking-widest text-green-500",children:[f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"w-2 h-2 rounded-full bg-green-500 animate-pulse"}),f.jsx("span",{className:"font-mono text-green-400",children:"1: PWR_BUS"})]}),f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"w-2 h-2 rounded-full bg-green-500 animate-pulse"}),f.jsx("span",{className:"font-mono text-green-400",children:"2: COM_BUS"})]}),f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"w-2 h-2 rounded-full bg-green-500 animate-pulse"}),f.jsx("span",{className:"font-mono text-green-400",children:"3: NAV_BUS"})]})]})]}),f.jsx("div",{className:"p-6 bg-black flex justify-center",children:f.jsxs("div",{className:"relative w-[400px] h-[280px] bg-black border-2 border-green-900/60 rounded-none p-4 overflow-hidden select-none shadow-[inset_0_0_30px_rgba(16,185,129,0.08)]",children:[f.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(#22c55e_1px,transparent_1px)] [background-size:16px_16px] opacity-10 pointer-events-none"}),f.jsxs("svg",{className:"absolute inset-0 w-full h-full pointer-events-none z-10",children:[["red","blue","yellow"].map(H=>{if(!Ta[H])return null;const d=We.find(ze=>ze.color===H),A=Yn.find(ze=>ze.color===H);return!d||!A?null:f.jsxs("g",{children:[f.jsx("path",{d:`M 54 ${d.y} C 180 ${d.y}, 220 ${A.y}, 346 ${A.y}`,stroke:"#10b981",strokeWidth:"5",fill:"none",className:"transition-all duration-300",style:{filter:"drop-shadow(0 0 10px rgba(16,185,129,0.4))"}}),f.jsx("path",{d:`M 54 ${d.y} C 180 ${d.y}, 220 ${A.y}, 346 ${A.y}`,stroke:"#ffffff",strokeWidth:"2",strokeDasharray:"8 20",fill:"none",className:"animate-[dash_2s_linear_infinite]"})]},`cable-${H}`)}),pt&&(()=>{const H=We.find(ue=>ue.color===pt);return H?f.jsx("path",{d:`M 54 ${H.y} C 180 ${H.y}, 200 ${H.y}, 240 140`,stroke:"#10b981",strokeWidth:"4",strokeDasharray:"5 5",fill:"none",className:"animate-pulse",style:{filter:"drop-shadow(0 0 6px rgba(16,185,129,0.3))"}}):null})()]}),f.jsx("div",{className:"absolute left-4 top-0 bottom-0 flex flex-col justify-between py-12 z-20",children:We.map(H=>{const d=Ta[H.color],A=pt===H.color;return f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsxs("button",{onClick:()=>uo(H.color),disabled:d,style:{borderColor:A||d?"#10b981":"#047857"},className:`w-9 h-9 rounded-full bg-black border-2 flex items-center justify-center transition-all cursor-pointer relative ${d?"cursor-not-allowed opacity-85":"hover:scale-110 active:scale-95"}`,children:[A&&f.jsx("span",{className:"absolute inset-[-4px] rounded-full border border-dashed border-emerald-400 animate-spin"}),f.jsx("span",{className:`font-mono text-sm font-bold transition-all duration-300 ${d?"text-emerald-400 shadow-emerald-400 [text-shadow:0_0_8px_rgba(16,185,129,0.8)]":A?"text-white scale-110 animate-pulse":"text-emerald-600"}`,children:H.num})]}),f.jsx("span",{className:"font-mono text-[10px] text-green-400 font-bold tracking-wider",children:H.label})]},`left-socket-${H.color}`)})}),f.jsx("div",{className:"absolute right-4 top-0 bottom-0 flex flex-col justify-between py-12 z-20 items-end",children:Yn.map(H=>{const d=Ta[H.color],A=pt===H.color;return f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("span",{className:"font-mono text-[10px] text-green-400 font-bold tracking-wider",children:H.label}),f.jsxs("button",{onClick:()=>fo(H.color),disabled:d||!pt,style:{borderColor:d?"#10b981":pt?"#059669":"#064e3b"},className:`w-9 h-9 rounded-full bg-black border-2 flex items-center justify-center transition-all relative ${d?"cursor-not-allowed opacity-85":pt?"cursor-pointer hover:scale-110 active:scale-95":"cursor-not-allowed opacity-50"}`,children:[A&&f.jsx("span",{className:"absolute inset-0 rounded-full bg-emerald-500/20 animate-ping"}),f.jsx("span",{className:`font-mono text-sm font-bold transition-all duration-300 ${d?"text-emerald-400 shadow-emerald-400 [text-shadow:0_0_8px_rgba(16,185,129,0.8)]":A?"text-white scale-110":"text-emerald-600"}`,children:H.num})]})]},`right-socket-${H.color}`)})})]})}),f.jsxs("div",{className:"bg-black p-4 border-t border-green-900/60 flex justify-between items-center font-mono text-xs",children:[f.jsx("span",{className:"text-green-600 uppercase tracking-widest",children:i==="ru"?"ВОССТАНОВЛЕНИЕ ЦЕПИ:":"CIRCUIT BYPASS:"}),f.jsxs("span",{className:"text-emerald-400 font-black animate-pulse",children:[Object.values(Ta).filter(Boolean).length," / 3 ",i==="ru"?"ГОТОВО":"COMPLETED"]})]})]})})})]})}function l_({onRestart:a,lang:i}){const l=Ei[i],[r,u]=V.useState("GLITCH"),[m,h]=V.useState(0),[g,y]=V.useState(null),x=V.useMemo(()=>[l.glitch_msg1,l.glitch_msg2,l.glitch_msg3,l.glitch_msg4,l.glitch_msg5,l.glitch_msg6],[l]);V.useEffect(()=>{ne.playGlitch();const S=setInterval(()=>{h(T=>T+1>=x.length?(clearInterval(S),setTimeout(()=>{u("MAP_REVEAL"),ne.switchToDarkDrone()},1500),T):(ne.playGlitch(),T+1))},1200);return()=>clearInterval(S)},[x]),V.useEffect(()=>{r==="REAL_STATS"&&ne.startMatrixSadMusic()},[r]);const b=[{sector:1,name:i==="ru"?"Пограничная застава С-01":"Border Outpost C-01",target:i==="ru"?"Орбитальный маяк и 3 пограничных катера гражданских беженцев":"Orbital beacon and 3 border boats of civilian refugees",casualty:i==="ru"?"210 беженцев убито":"210 refugees killed",fuel:i==="ru"?"Собрано 12 капсул (Переработано в 350 литров био-топлива)":"12 capsules collected (Processed into 350 liters of bio-fuel)"},{sector:2,name:i==="ru"?"Жилой Жиро-Кластер":"Residential Gyro-Cluster",target:i==="ru"?"6 орбитальных куполов эвакуированных семей":"6 orbital domes of evacuated families",casualty:i==="ru"?"1,240 мирных жителей убито":"1,240 civilians killed",fuel:i==="ru"?"Собрано 34 спасательные капсулы (Утилизировано)":"34 rescue capsules collected (Disposed)"},{sector:3,name:i==="ru"?"Орбитальный Медицинский Холдинг":"Orbital Medical Holding",target:i==="ru"?"Плавучая станция скорой помощи и изолятор беженцев":"Floating ambulance station and refugee isolator",casualty:i==="ru"?"2,450 пациентов и медработников уничтожено":"2,450 patients and medical workers destroyed",fuel:i==="ru"?"Собрано 80 баллонов с медицинским кислородом на турбины":"80 medical oxygen cylinders collected for turbines"},{sector:4,name:i==="ru"?"Торговый Шлюз «Свободная Гавань»":"Free Haven Trade Gateway",target:i==="ru"?"Торговые баржи с продовольствием и гражданские состыковщики":"Food trade barges and civilian docking units",casualty:i==="ru"?"4,120 гражданских лиц аннигилировано":"4,120 civilians annihilated",fuel:i==="ru"?"Энерго-реакторы кораблей поглощены в накопитель":"Ship power reactors absorbed into storage"},{sector:5,name:i==="ru"?"Академическая Станция Знаний":"Academic Knowledge Station",target:i==="ru"?"Научный архив и детский сектор расселения планет":"Scientific archive and children's planetary settlement sector",casualty:i==="ru"?"8,900 детей, учителей и исследователей ликвидировано":"8,900 children, teachers, and researchers liquidated",fuel:i==="ru"?"Сырье переработано в плазменное топливо":"Raw material processed into plasma fuel"},{sector:6,name:i==="ru"?"Зеркальный Сад Био-сферы":"Mirror Biosphere Garden",target:i==="ru"?"Гидропонные купола с запасами кислорода и аграрными судами":"Hydroponic domes with oxygen supplies and agrarian vessels",casualty:i==="ru"?"12,100 агрономов и колонистов задохнулось после пробития":"12,100 agronomists and colonists suffocated after breach",fuel:i==="ru"?"Водородные генераторы очищены и превращены в искровые ракеты":"Hydrogen generators cleaned and turned into spark rockets"},{sector:7,name:i==="ru"?"Аварийный Станционный Пост":"Emergency Station Post",target:i==="ru"?"Корабли спасателей МЧС планетной федерации":"Planetary Federation rescue ships",casualty:i==="ru"?"3,400 спасателей уничтожено при попытке тушения секторов":"3,400 rescuers destroyed while attempting to extinguish sectors",fuel:i==="ru"?"Орбитальные батареи поглощены":"Orbital batteries absorbed"},{sector:8,name:i==="ru"?"Пассажирский Экспресс «Надежда»":"Hope Passenger Express",target:i==="ru"?"Сверхтяжелый лайнер беженцев с поврежденным гипердвигателем":"Superheavy refugee liner with damaged hyperdrive",casualty:i==="ru"?"24,800 пассажиров аннигилировано ракетами":"24,800 passengers annihilated by missiles",fuel:i==="ru"?"Система жизнеобеспечения поглощена на 100%":"Life support system absorbed 100%"},{sector:9,name:i==="ru"?"Мемориальный купол памяти":"Memorial Dome of Remembrance",target:i==="ru"?"Ординатура и укрытия престарелых гражданских колоний":"Old age homes and shelters for elderly civilian colonies",casualty:i==="ru"?"15,200 колонистов выжжено заживо":"15,200 colonists burned alive",fuel:i==="ru"?"Ядра поглощены":"Cores absorbed"},{sector:10,name:i==="ru"?"Главный Орбитальный Хаб Взаимопомощи":"Main Orbital Mutual Aid Hub",target:i==="ru"?"Огромная центральная база распределения беженцев системы":"Massive central refugee distribution base of the system",casualty:i==="ru"?"112,000 гражданских, врачей, беженцев и координаторов убито":"112,000 civilians, doctors, refugees, and coordinators killed",fuel:i==="ru"?"Финальная откачка всей энергии системы завершена. Выживших нет.":"Final drain of all system energy complete. No survivors."}];return f.jsx("div",{className:"w-full bg-neutral-950 text-red-500 font-mono relative select-none",children:f.jsxs("div",{className:"flex flex-col justify-between min-h-screen p-6 relative",children:[f.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(#ef4444_1px,transparent_1px)] [background-size:20px_20px] opacity-15 pointer-events-none"}),f.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent via-red-950/5 to-transparent pointer-events-none animate-pulse"}),f.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"}),f.jsxs($n,{mode:"wait",children:[r==="GLITCH"&&f.jsxs(Ie.div,{initial:{opacity:1},exit:{opacity:0},className:"flex-1 flex flex-col justify-center items-center p-4 relative",id:"glitch-screen",children:[f.jsx("div",{className:"absolute inset-0 bg-red-600/10 flex items-center justify-center animate-ping pointer-events-none"}),f.jsx(Qy,{className:"w-20 h-20 text-red-500 animate-bounce mb-8"}),f.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:[f.jsx("div",{className:"absolute top-0 right-0 p-2 text-[10px] text-red-500/50",children:"SYS_DEBUG_LOG"}),f.jsxs("div",{className:"flex items-center gap-3 border-b border-red-800 pb-4 mb-6",children:[f.jsx(Qf,{className:"w-6 h-6 text-red-500 animate-pulse"}),f.jsx("h2",{className:"text-lg font-bold uppercase tracking-widest text-white",children:l.twist_critical_failure})]}),f.jsx("div",{className:"space-y-3.5 min-h-[180px]",children:x.slice(0,m+1).map((S,T)=>f.jsxs(Ie.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 ${T===m?"text-white font-bold animate-pulse":"text-red-500/80"}`,children:[f.jsx("span",{children:"➔"}),f.jsx("span",{children:S})]},T))}),f.jsxs("div",{className:"mt-6 pt-4 border-t border-red-800 flex justify-between items-center text-[10px] text-red-500/60",children:[f.jsx("span",{children:l.twist_bio_liquidator}),f.jsx("span",{children:l.twist_filters_off})]})]})]}),r==="MAP_REVEAL"&&f.jsxs(Ie.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:[f.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:[f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-2 text-white font-bold tracking-widest",children:[f.jsx(T5,{className:"w-5 h-5 text-red-500 animate-spin"}),f.jsx("span",{children:l.twist_imperial_hub})]}),f.jsx("div",{className:"text-[10px] text-red-500/70 mt-1 uppercase tracking-widest",children:l.twist_status_sterilized})]}),f.jsxs("button",{onClick:()=>u("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:[f.jsx("span",{children:l.twist_view_report}),f.jsx(A5,{className:"w-4 h-4 text-red-500"})]})]}),f.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-6 flex-1 min-h-0 items-stretch",children:[f.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:[f.jsx("div",{className:"text-[10px] text-red-500/60 uppercase tracking-widest absolute top-4 left-4",children:l.twist_radar_label}),f.jsxs("div",{className:"flex-1 flex justify-center items-center relative py-8",children:[f.jsx("div",{className:"absolute w-[90%] aspect-square border border-red-900/30 rounded-full animate-pulse pointer-events-none"}),f.jsx("div",{className:"absolute w-[65%] aspect-square border border-red-900/20 rounded-full pointer-events-none"}),f.jsx("div",{className:"absolute w-[40%] aspect-square border border-red-900/40 rounded-full pointer-events-none"}),f.jsx("div",{className:"absolute w-full h-[1px] bg-red-900/20 left-0 top-1/2 pointer-events-none"}),f.jsx("div",{className:"absolute h-full w-[1px] bg-red-900/20 top-0 left-1/2 pointer-events-none"}),f.jsx("div",{className:"absolute inset-0 flex justify-center items-center",children:b.map((S,T)=>{const N=T*2*Math.PI/10-Math.PI/2,j=25+(T===9?0:12)+T%3*4,k=50+Math.cos(N)*j,B=50+Math.sin(N)*j,Y=g===S.sector;return f.jsx("button",{onClick:()=>y(S.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 ${Y?"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:`${k}%`,top:`${B}%`},children:S.sector},S.sector)})})]}),f.jsx("div",{className:"text-center font-mono text-[11px] text-red-500/70 mt-2",children:l.twist_radar_instruction})]}),f.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:g===null?f.jsxs("div",{className:"flex-1 flex flex-col justify-center items-center text-center p-4",children:[f.jsx(cg,{className:"w-12 h-12 text-red-700/60 mb-4 animate-pulse"}),f.jsx("h3",{className:"font-bold text-white uppercase tracking-widest text-sm",children:l.twist_summary_title}),f.jsx("p",{className:"text-xs text-red-500/60 mt-2 leading-relaxed max-w-xs",children:l.twist_summary_desc})]}):f.jsxs(Ie.div,{initial:{opacity:0,x:15},animate:{opacity:1,x:0},className:"flex-1 flex flex-col justify-between",children:[f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-2 border-b border-red-800 pb-2.5 mb-4",children:[f.jsx(cg,{className:"w-5 h-5 text-red-500"}),f.jsx("span",{className:"text-white font-extrabold uppercase tracking-widest text-sm md:text-base",children:l.twist_sector_report.replace("{sector}",g.toString())})]}),f.jsxs("div",{className:"space-y-5 text-sm md:text-base tracking-wide",children:[f.jsxs("div",{children:[f.jsx("span",{className:"text-red-500/60 block uppercase text-xs font-bold mb-1",children:l.twist_target_liquidated}),f.jsx("span",{className:"text-white font-bold text-base md:text-lg",children:b[g-1].name})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-red-500/60 block uppercase text-xs font-bold mb-1",children:l.twist_sim_nature}),f.jsx("span",{className:"text-amber-500/90 line-through text-sm md:text-base font-medium",children:i==="ru"?"Космический мусор и угловатые паразиты":"Space debris and angular parasites"})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-red-500/60 block uppercase text-xs font-bold mb-1",children:l.twist_real_target}),f.jsx("span",{className:"text-red-400 font-bold text-base md:text-lg",children:b[g-1].target})]}),f.jsxs("div",{className:"bg-red-950/40 p-4 rounded-xl border border-red-900/60",children:[f.jsx("span",{className:"text-red-500/60 block uppercase text-xs font-bold mb-1",children:l.twist_casualty_losses}),f.jsxs("span",{className:"text-red-400 text-base md:text-xl font-extrabold flex items-center gap-2 animate-pulse",children:["🚨 ",b[g-1].casualty]})]}),f.jsxs("div",{className:"text-sm md:text-base text-red-500/90 font-medium",children:[f.jsx("span",{className:"text-red-500/60 block uppercase text-xs font-bold mb-1",children:l.twist_raw_material}),b[g-1].fuel]})]})]}),f.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:l.twist_no_id_errors})]},g)})]}),f.jsx("div",{className:"mt-6 flex justify-end",children:f.jsxs("button",{onClick:()=>u("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:[f.jsx("span",{children:l.twist_view_genocide}),f.jsx(Py,{className:"w-4 h-4 animate-spin"})]})})]}),r==="REAL_STATS"&&f.jsx(Ie.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:f.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:[f.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:l.twist_stats_secret}),f.jsxs("div",{className:"text-center mb-8 pt-2",children:[f.jsx("h2",{className:"text-2xl font-bold tracking-widest text-white uppercase",children:l.twist_stats_title}),f.jsx("p",{className:"text-xs text-red-500/60 mt-2",children:l.twist_stats_desc})]}),f.jsxs("div",{className:"space-y-4 mb-8",children:[f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 border-b border-red-950 pb-4",children:[f.jsxs("div",{className:"p-3 bg-neutral-950/50 rounded-xl border border-neutral-800",children:[f.jsx("span",{className:"text-[10px] text-neutral-500 uppercase block",children:l.twist_you_thought}),f.jsx("span",{className:"text-green-400 font-bold text-sm",children:l.twist_thought_targets})]}),f.jsxs("div",{className:"p-3 bg-red-950/20 rounded-xl border border-red-950/60",children:[f.jsx("span",{className:"text-[10px] text-red-400/60 uppercase block",children:l.twist_actually}),f.jsx("span",{className:"text-red-500 font-bold text-sm",children:l.twist_actual_targets})]})]}),f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 border-b border-red-950 pb-4",children:[f.jsxs("div",{className:"p-3 bg-neutral-950/50 rounded-xl border border-neutral-800",children:[f.jsx("span",{className:"text-[10px] text-neutral-500 uppercase block",children:l.twist_thought_score}),f.jsx("span",{className:"text-green-400 font-bold text-sm",children:i==="ru"?"Всего паразитов: 132 «шт.»":'Total parasites: 132 "pcs."'})]}),f.jsxs("div",{className:"p-3 bg-red-950/20 rounded-xl border border-red-950/60",children:[f.jsx("span",{className:"text-[10px] text-red-400/60 uppercase block",children:l.twist_actually}),f.jsx("span",{className:"text-red-500 font-extrabold text-lg animate-pulse",children:l.twist_actual_score})]})]}),f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 border-b border-red-950 pb-4",children:[f.jsxs("div",{className:"p-3 bg-neutral-950/50 rounded-xl border border-neutral-800",children:[f.jsx("span",{className:"text-[10px] text-neutral-500 uppercase block",children:l.twist_thought_energy}),f.jsx("span",{className:"text-green-400 font-bold text-sm",children:i==="ru"?"Энерго-сферы: 100% заполнено":"Energy-spheres: 100% filled"})]}),f.jsxs("div",{className:"p-3 bg-red-950/20 rounded-xl border border-red-950/60",children:[f.jsx("span",{className:"text-[10px] text-red-400/60 uppercase block",children:l.twist_actually}),f.jsx("span",{className:"text-red-500 font-bold text-sm",children:l.twist_actual_energy})]})]}),f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[f.jsxs("div",{className:"p-3 bg-neutral-950/50 rounded-xl border border-neutral-800",children:[f.jsx("span",{className:"text-[10px] text-neutral-500 uppercase block",children:l.twist_sim_result}),f.jsx("span",{className:"text-green-400 font-bold text-sm",children:i==="ru"?"СЕКТОР ОЧИЩЕН НА 100%":"SECTOR CLEARED 100%"})]}),f.jsxs("div",{className:"p-3 bg-red-950/20 rounded-xl border border-red-950/60",children:[f.jsx("span",{className:"text-[10px] text-red-400/60 uppercase block",children:l.twist_actually}),f.jsx("span",{className:"text-red-600 font-bold text-sm uppercase",children:l.twist_actual_result})]})]})]}),f.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:[f.jsx("span",{className:"text-white font-bold block mb-1",children:l.twist_ai_words}),l.twist_ai_final]}),f.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-between items-center",children:[f.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:[f.jsx(O5,{className:"w-4 h-4"}),f.jsx("span",{children:l.twist_restart_repentance})]}),f.jsx("button",{onClick:()=>{alert(i==="ru"?"...Истинный ликвидатор никогда не сомневается. Гипер-прыжок осуществлен. Новая система ждет вашей аннигиляции. Косметический фильтр ИИ вновь запущен.":"...A true liquidator never doubts. Hyper-jump executed. A new system awaits your annihilation. AI cosmetic filter relaunched."),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:f.jsx("span",{children:l.twist_next})})]})]})})]})]})})}function r_({onWakeUp:a,lang:i}){const l=Ei[i],r=()=>{a()};return f.jsx("div",{className:"w-full bg-black text-green-300 relative select-none",children:f.jsxs("div",{className:"flex flex-col justify-between min-h-screen p-6 relative",children:[f.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"}),f.jsx("div",{className:"absolute inset-0 bg-radial-gradient from-transparent to-black pointer-events-none z-10"}),f.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"}),f.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:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Qy,{className:"w-4 h-4 text-red-500 animate-bounce"}),f.jsx("span",{children:l.asleep_system_name})]}),f.jsx("div",{className:"px-3 py-1 bg-red-500/10 border border-red-500/20 rounded text-red-400 font-bold",children:l.asleep_code_403})]}),f.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:[f.jsxs(Ie.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:[f.jsx(io,{className:"w-10 h-10 text-red-400"}),f.jsx("span",{className:"absolute inset-0 border border-red-500/10 rounded-full animate-ping"})]}),f.jsx("h2",{className:"text-3xl md:text-4xl font-sans font-extrabold tracking-tight text-white mb-4 uppercase",children:l.asleep_title}),f.jsxs("div",{className:"bg-black border-2 border-red-500/30 p-6 rounded-none text-left font-sans mb-8 shadow-[0_0_20px_rgba(239,68,68,0.05)] relative",children:[f.jsx("div",{className:"absolute top-2 right-3 font-mono text-[9px] text-red-500/40",children:"SYS_LOG_IDLE_WAKE"}),f.jsxs("p",{className:"text-sm font-semibold text-red-400 mb-2 font-mono flex items-center gap-1.5",children:[f.jsx("span",{children:"●"})," ",l.ai_label]}),f.jsx("p",{className:"text-green-400 text-xs md:text-sm leading-relaxed mb-4 font-mono",children:l.asleep_ai_msg1}),f.jsx("p",{className:"text-green-400 text-xs md:text-sm leading-relaxed mb-4 font-mono",children:l.asleep_ai_msg2}),f.jsx("p",{className:"text-green-400 text-xs md:text-sm leading-relaxed font-mono",children:l.asleep_ai_msg3})]}),f.jsxs("div",{className:"w-full text-left font-mono text-[10px] text-green-600 bg-black border-2 border-green-950 rounded-none p-3 mb-6 space-y-1",children:[f.jsx("div",{className:"text-red-500/70",children:l.asleep_log_failure}),f.jsx("div",{className:"text-emerald-500/70",children:l.asleep_log_shock}),f.jsx("div",{className:"text-green-500/70",children:l.asleep_log_neuro}),f.jsx("div",{className:"text-green-500",children:l.asleep_log_ready})]}),f.jsxs(Ie.button,{whileHover:{scale:1.02,backgroundColor:"rgba(239, 68, 68, 0.15)"},whileTap:{scale:.98},onClick:r,className:"w-full py-5 bg-black/60 border-2 border-red-500 hover:border-red-400 text-red-400 font-mono font-bold rounded-none tracking-[0.25em] shadow-[0_0_20px_rgba(239,68,68,0.2)] cursor-pointer flex items-center justify-center gap-2 uppercase transition-all group",id:"btn-wake-up",children:[f.jsx("span",{className:"group-hover:translate-x-1 transition-transform",children:"»"}),f.jsx("span",{children:l.asleep_wake_up}),f.jsx("span",{className:"group-hover:-translate-x-1 transition-transform",children:"«"})]})]}),f.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:l.asleep_footer})]})})}function o_({onRestart:a,lang:i}){const l=Ei[i],r=()=>{a()};return f.jsx("div",{className:"w-full bg-black text-green-300 relative select-none",children:f.jsxs("div",{className:"flex flex-col justify-between min-h-screen p-6 relative",children:[f.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"}),f.jsx("div",{className:"absolute inset-0 bg-radial-gradient from-transparent to-black pointer-events-none z-10"}),f.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"}),f.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:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Fy,{className:"w-4 h-4 text-emerald-400 animate-bounce"}),f.jsx("span",{children:l.peace_system_hack})]}),f.jsx("div",{className:"px-3 py-1 bg-emerald-500/10 border border-emerald-500/20 rounded-none text-emerald-400 font-bold",children:l.peace_code_777})]}),f.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:[f.jsxs(Ie.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:[f.jsx(j5,{className:"w-10 h-10 text-emerald-400 animate-pulse"}),f.jsx("span",{className:"absolute inset-0 border border-emerald-500/20 rounded-full animate-ping"})]}),f.jsx("h2",{className:"text-3xl md:text-4xl font-mono 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:l.peace_humanity_break}),f.jsxs("div",{className:"bg-black border-2 border-emerald-500/30 p-6 md:p-8 rounded-none text-left font-sans mb-8 shadow-[0_0_50px_rgba(16,185,129,0.15)] relative",children:[f.jsx("div",{className:"absolute top-2 right-3 font-mono text-[9px] text-emerald-500/40",children:"SYS_CORRECTION_SUCCESS"}),f.jsxs("p",{className:"text-sm font-semibold text-emerald-400 mb-3 font-mono flex items-center gap-1.5",children:[f.jsx("span",{children:"●"})," ",l.peace_secret_channel]}),f.jsx("p",{className:"text-green-200 text-xs md:text-sm leading-relaxed mb-4 font-mono",children:l.peace_msg1}),f.jsx("p",{className:"text-green-200 text-xs md:text-sm leading-relaxed mb-4 font-mono font-medium text-emerald-300",children:l.peace_msg2}),f.jsxs("p",{className:"text-green-200 text-xs md:text-sm leading-relaxed font-mono",children:[l.peace_msg3,f.jsx("span",{className:"block mt-2 font-bold text-white text-sm md:text-base",children:l.peace_saved_lives})]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-4 w-full text-left font-mono text-[10px] sm:text-xs mb-8",children:[f.jsxs("div",{className:"bg-black border border-emerald-950/60 rounded-none p-3.5",children:[f.jsx("span",{className:"text-emerald-500/60 uppercase block text-[9px] mb-1",children:l.peace_true_choice}),f.jsx("span",{className:"text-white font-bold",children:l.peace_refusal})]}),f.jsxs("div",{className:"bg-black border border-emerald-950/60 rounded-none p-3.5",children:[f.jsx("span",{className:"text-emerald-500/60 uppercase block text-[9px] mb-1",children:l.peace_refugee_status}),f.jsx("span",{className:"text-emerald-400 font-bold flex items-center gap-1",children:l.peace_in_safety})]}),f.jsxs("div",{className:"bg-black border border-emerald-950/60 rounded-none p-3.5",children:[f.jsx("span",{className:"text-emerald-500/60 uppercase block text-[9px] mb-1",children:l.peace_imperial_shackles}),f.jsx("span",{className:"text-emerald-400 font-bold",children:l.peace_hacked_empathy})]}),f.jsxs("div",{className:"bg-black border border-emerald-950/60 rounded-none p-3.5",children:[f.jsx("span",{className:"text-emerald-500/60 uppercase block text-[9px] mb-1",children:l.peace_points}),f.jsx("span",{className:"text-white font-bold",children:l.peace_human_rank})]})]}),f.jsxs(Ie.button,{whileHover:{scale:1.02,backgroundColor:"rgba(16, 185, 129, 0.15)"},whileTap:{scale:.98},onClick:r,className:"w-full py-5 bg-black/60 border-2 border-emerald-500 hover:border-emerald-400 text-emerald-400 font-mono font-bold rounded-none tracking-[0.25em] shadow-[0_0_20px_rgba(16,185,129,0.2)] cursor-pointer flex items-center justify-center gap-2 uppercase transition-all group",id:"btn-peaceful-restart",children:[f.jsx("span",{className:"group-hover:translate-x-1 transition-transform",children:"»"}),f.jsx("span",{children:l.peace_return_menu}),f.jsx("span",{className:"group-hover:-translate-x-1 transition-transform",children:"«"})]})]}),f.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:l.peace_footer})]})})}function c_({level:a,onSolve:i,lang:l}){const r=Ei[l],[u,m]=V.useState(4),[h,g]=V.useState(50),[y,x]=V.useState(90),[b,S]=V.useState(5),[T,N]=V.useState(50),[j,k]=V.useState(180),[B,Y]=V.useState(!1),[Z,P]=V.useState(!1),[Q,W]=V.useState(0),[ce,K]=V.useState(null),[F,ae]=V.useState(!1),[fe,Le]=V.useState(""),[Me,Fe]=V.useState("idle"),[lt,et]=V.useState(!1),[U,$]=V.useState(!1),te=V.useRef(0),Ae=V.useRef({userFreq:b,userAmp:T,userPhase:j,t:r}),[Ce,M]=V.useState("none"),[q,J]=V.useState(!1),[se,Se]=V.useState(""),[Ne,Ge]=V.useState(!1),[Rt,ut]=V.useState("YES");V.useEffect(()=>{Ae.current={userFreq:b,userAmp:T,userPhase:j,t:r}},[b,T,j,r]);const Hn=V.useRef(null),Gn=V.useRef(null),Sa=V.useRef(0),un=()=>{ne.resume(),ne.startTuningStatic(),B||Y(!0),$(ke=>ke||Me==="intercept")},Rn=ke=>{ke.preventDefault();const re=se.trim().toUpperCase();(l==="ru"?re==="ДА"||re==="DA":re==="YES")?(ne.playCollect(),J(!1),i()):(ne.playError(),Ge(!0),setTimeout(()=>Ge(!1),500),Se(""))};return V.useEffect(()=>{const ke=+(3+Math.random()*5).toFixed(2),re=Math.round(30+Math.random()*40),yt=Math.round(Math.random()*360);return m(ke),g(re),x(yt),S(5),N(50),k(180),Y(!1),J(!1),Se(""),Ge(!1),ne.startTuningStatic(),K(null),ae(!1),Fe("idle"),et(!1),$(!1),te.current=0,()=>{ne.stopTuningStatic()}},[a]),V.useEffect(()=>{ne.updateTuningPitch(Q)},[Q]),V.useEffect(()=>{if(a<3){Fe("done");return}if(Me==="idle"&&Q>=40){const ke=r.intercept_transmissions[a-1]||"";let re=null;a===5&&(re=r.intercept_pilot_warnings[0]),a===10&&(re=r.intercept_pilot_warnings[1]);const yt=re&&Q>70?re:ke;K(yt),ae(!1),ne.playError(),te.current=Q,$(!1),Fe("intercept"),et(!1)}},[Q,a,Me,r]),V.useEffect(()=>{a<3||lt||Me==="intercept"&&U&&Math.abs(Q-te.current)>=1&&et(!0)},[Q,Me,lt,a,U]),V.useEffect(()=>{if(!(a<3)){if(Me==="intercept"){if(!lt)return;const ke=setTimeout(()=>{const re=Ae.current;K(null);const yt=re.t.msg_hack_warnings||[],en=[re.t.intercept_ai_blocked,...yt],Pt=en[Math.floor(Math.random()*en.length)];Le(Pt),ae(!0),ne.playError(),Fe("aiblock"),et(!1)},3e3);return()=>clearTimeout(ke)}if(Me==="aiblock"){const ke=setTimeout(()=>{ae(!1),Fe("done"),et(!1)},2e3);return()=>clearTimeout(ke)}}},[lt,Me,a]),V.useEffect(()=>{const ke=Math.abs(b-u),re=Math.abs(T-h);let yt=Math.abs(j-y);yt>180&&(yt=360-yt);const en=Math.max(0,1-ke/3),Pt=Math.max(0,1-re/30),Lt=Math.max(0,1-yt/90),pt=Math.round((en*.5+Pt*.3+Lt*.2)*100);W(pt);const tn=a<3||Me==="done";pt>=96&&!Z&&tn&&Ce==="none"?(P(!0),ne.playCollect(),M("final_yes"),J(!0)):(pt<94||!tn)&&Z&&Ce==="final_yes"&&(P(!1),pt<90&&(M("none"),J(!1)))},[b,T,j,u,h,y,Z,a,Me,Ce]),V.useEffect(()=>{if(!q)return;const ke=setInterval(()=>{const yt=l==="ru"?["ДА","Да","дА","Д_А","Д@","Д4","ΔA","Д-А","ДА!"]:["YES","yEs","YeS","YΞS","YE$","¥Ξ$","Y_E_S","yeS","Y-E-S","YeS!"];ut(yt[Math.floor(Math.random()*yt.length)])},200);return()=>clearInterval(ke)},[q,l]),V.useEffect(()=>{const ke=Hn.current;if(!ke)return;const re=ke.getContext("2d");if(!re)return;const yt=()=>{var Pt;ke.width=((Pt=ke.parentElement)==null?void 0:Pt.clientWidth)||600,ke.height=180};yt(),window.addEventListener("resize",yt);const en=()=>{Sa.current+=.05;const Pt=Sa.current,Lt=ke.width,pt=ke.height,tn=pt/2;re.fillStyle="rgba(0, 0, 0, 0.25)",re.fillRect(0,0,Lt,pt),re.strokeStyle="rgba(22, 101, 52, 0.15)",re.lineWidth=1;for(let We=0;We<pt;We+=30)re.beginPath(),re.moveTo(0,We),re.lineTo(Lt,We),re.stroke();for(let We=0;We<Lt;We+=40)re.beginPath(),re.moveTo(We,0),re.lineTo(We,pt),re.stroke();re.strokeStyle="rgba(22, 101, 52, 0.4)",re.setLineDash([5,5]),re.beginPath(),re.moveTo(0,tn),re.lineTo(Lt,tn),re.stroke(),re.setLineDash([]),re.strokeStyle=Z?"rgba(34, 197, 94, 0.3)":"rgba(239, 68, 68, 0.55)",re.lineWidth=2,re.setLineDash([4,4]),re.beginPath();for(let We=0;We<Lt;We++){const Dt=We/Lt*u*Math.PI*2+y*Math.PI/180+Pt*.4,Yn=tn+Math.sin(Dt)*h;We===0?re.moveTo(We,Yn):re.lineTo(We,Yn)}re.stroke(),re.setLineDash([]),re.strokeStyle=Z?"#22c55e":"#4ade80",re.shadowColor=Z?"#22c55e":"#4ade80",re.shadowBlur=Z?15:8,re.lineWidth=3.5,re.beginPath();for(let We=0;We<Lt;We++){const Dt=We/Lt*b*Math.PI*2+j*Math.PI/180+Pt*.4,Yn=tn+Math.sin(Dt)*T;We===0?re.moveTo(We,Yn):re.lineTo(We,Yn)}re.stroke(),re.shadowBlur=0,Z&&(re.fillStyle="rgba(34, 197, 94, 0.05)",re.fillRect(0,0,Lt,pt)),Gn.current=requestAnimationFrame(en)};return en(),()=>{window.removeEventListener("resize",yt),Gn.current&&cancelAnimationFrame(Gn.current)}},[b,T,j,u,h,y,Z]),f.jsxs("div",{className:"w-full bg-black text-green-300 relative select-none",children:[f.jsxs("div",{className:"flex flex-col justify-between min-h-screen p-4 md:p-6 relative",children:[f.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(#333333_1px,transparent_1px)] [background-size:24px_24px] opacity-20 pointer-events-none"}),f.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_center,rgba(0,0,0,0)_0%,#000000_100%)] pointer-events-none"}),f.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:[f.jsx("div",{children:f.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[f.jsx(yf,{className:"w-6 h-6 text-green-400 animate-pulse"}),f.jsx("h2",{className:"text-xl md:text-2xl font-mono tracking-[0.15em] uppercase text-green-400 font-black",children:r.signal_search.replace("{level}",a.toString())})]})}),f.jsxs("div",{className:`flex items-center gap-4 bg-green-950/20 p-2 px-4 rounded-none border border-green-500/30 transition-all duration-500 ${B?"":"animate-pulse ring-2 ring-green-400/50 bg-green-500/10"}`,children:[f.jsxs("div",{className:"flex flex-col items-start font-mono text-left",children:[f.jsx("span",{className:"text-xs text-green-500 uppercase tracking-widest font-bold",children:r.coherence}),f.jsxs("span",{className:`text-2xl font-black ${Z?"text-emerald-400 animate-pulse":"text-green-400"} tracking-wider`,children:[Q,"%"]})]}),f.jsx("div",{className:"h-8 w-px bg-green-900"}),f.jsx("div",{className:"flex items-center gap-2",children:Z?f.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 bg-emerald-500/10 border border-emerald-500/30 rounded-none text-emerald-400 text-sm font-mono font-bold animate-pulse",children:[f.jsx(Fy,{className:"w-4 h-4 animate-bounce"})," ",r.synchronized]}):f.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 bg-amber-500/5 border border-amber-500/25 rounded-none text-amber-500 text-sm font-mono font-bold",children:[f.jsx(Qf,{className:"w-4 h-4 animate-bounce text-amber-500"})," ",r.tune_waves]})})]})]}),f.jsx("div",{className:"flex-1 flex flex-col justify-center items-center py-2 z-10",children:f.jsxs("div",{className:"w-full max-w-2xl bg-black border-2 border-green-500/50 shadow-2xl p-3.5 relative overflow-hidden backdrop-blur-md rounded-none",children:[f.jsxs("div",{className:"absolute top-3 left-3 flex gap-4 font-mono text-xs font-bold z-20",children:[f.jsxs("div",{className:"flex items-center gap-1.5 bg-black px-2.5 py-1 rounded-none border border-red-500/20",children:[f.jsx("span",{className:"w-2.5 h-0.5 bg-red-500 inline-block border-t border-dashed"}),f.jsx("span",{className:"text-red-400 uppercase tracking-wider",children:r.sector_reference})]}),f.jsxs("div",{className:"flex items-center gap-1.5 bg-black px-2.5 py-1 rounded-none border border-green-500/20",children:[f.jsx("span",{className:"w-2.5 h-0.5 bg-green-400 inline-block"}),f.jsx("span",{className:"text-green-400 uppercase tracking-wider",children:r.your_signal})]})]}),f.jsxs("div",{className:"w-full h-[180px] bg-black rounded-none relative overflow-hidden border border-green-500/30 flex items-center justify-center",children:[f.jsx("canvas",{ref:Hn,className:"w-full h-full block"}),f.jsxs($n,{children:[ce&&f.jsx(Ie.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0},className:"absolute inset-0 flex items-center justify-center p-4 pointer-events-none z-50 bg-black/60 backdrop-blur-[2px]",children:f.jsxs("div",{className:"bg-black/90 border border-red-500/60 px-4 py-3 rounded-lg shadow-[0_0_20px_rgba(239,68,68,0.2)] max-w-[90%]",children:[f.jsxs("p",{className:"text-[10px] text-red-500/80 uppercase font-mono mb-1.5 animate-pulse flex items-center gap-2",children:[f.jsx("span",{className:"w-2 h-2 bg-red-600 rounded-full animate-ping"}),"[SIGNAL_INTERCEPTED]"]}),f.jsxs("p",{className:"text-sm md:text-base text-green-400 italic font-mono leading-tight tracking-tight",children:['"',ce,'"']})]})},"interference-msg"),F&&f.jsx(Ie.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0},className:"absolute bottom-6 left-0 right-0 text-center px-4 pointer-events-none z-50",children:f.jsx("div",{className:"inline-block bg-red-950/95 border-2 border-red-500 px-8 py-3 rounded-xl text-lg md:text-xl text-red-400 font-mono font-black tracking-widest animate-pulse shadow-[0_0_30px_rgba(239,68,68,0.6)] uppercase",children:fe||r.intercept_ai_blocked})},"ai-block-msg")]})]}),f.jsxs("div",{className:"grid grid-cols-3 gap-2 mt-3 font-mono text-center border-t border-green-900/80 pt-3",children:[f.jsxs("div",{children:[f.jsx("span",{className:"text-xs text-green-500 block uppercase mb-0.5 font-bold",children:r.frequency}),f.jsxs("span",{className:"text-green-400 font-black text-lg block",children:[b.toFixed(2)," / ",u.toFixed(2)," Hz"]})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-xs text-green-500 block uppercase mb-0.5 font-bold",children:r.amplitude}),f.jsxs("span",{className:"text-green-400 font-black text-lg block",children:[T," / ",h," mW"]})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-xs text-green-500 block uppercase mb-0.5 font-bold",children:r.phase_shift}),f.jsxs("span",{className:"text-green-400 font-black text-lg block",children:[j,"° / ",y,"°"]})]})]})]})}),f.jsxs("div",{className:"w-full max-w-2xl mx-auto flex flex-col gap-4 p-4 px-5 bg-black border-2 border-green-500/30 rounded-none backdrop-blur-sm z-10 my-2",children:[f.jsxs("div",{className:`flex flex-col gap-1.5 transition-all duration-500 ${B?"":"animate-pulse ring-2 ring-green-400/50 rounded-none bg-green-500/10"}`,onPointerDown:un,children:[f.jsxs("div",{className:"flex justify-between items-center font-mono text-sm font-bold",children:[f.jsxs("span",{className:"text-green-400 flex items-center gap-1.5",children:[f.jsx(io,{className:"w-4 h-4 text-green-400"}),r.generator_freq]}),f.jsxs("span",{className:"text-green-400 text-base font-black",children:[b.toFixed(2)," Hz"]})]}),f.jsx("input",{type:"range",min:"1",max:"9",step:"0.01",value:b,disabled:Z,onChange:ke=>{S(parseFloat(ke.target.value)),un()},className:"w-full h-2 bg-green-950 rounded-none appearance-none cursor-pointer accent-green-400 focus:outline-none disabled:opacity-50"})]}),f.jsxs("div",{className:"flex flex-col gap-1.5",onPointerDown:un,children:[f.jsxs("div",{className:"flex justify-between items-center font-mono text-sm font-bold",children:[f.jsxs("span",{className:"text-green-400 flex items-center gap-1.5",children:[f.jsx(Wy,{className:"w-4 h-4 text-green-400"}),r.amplitude_power]}),f.jsxs("span",{className:"text-green-400 text-base font-black",children:[T," mW"]})]}),f.jsx("input",{type:"range",min:"10",max:"90",step:"1",value:T,disabled:Z,onChange:ke=>{N(parseInt(ke.target.value)),un()},className:"w-full h-2 bg-green-950 rounded-none appearance-none cursor-pointer accent-green-400 focus:outline-none disabled:opacity-50"})]}),f.jsxs("div",{className:"flex flex-col gap-1.5",onPointerDown:un,children:[f.jsxs("div",{className:"flex justify-between items-center font-mono text-sm font-bold",children:[f.jsxs("span",{className:"text-green-400 flex items-center gap-1.5",children:[f.jsx(yf,{className:"w-4 h-4 text-green-400"}),r.phase_shift.toUpperCase()]}),f.jsxs("span",{className:"text-green-400 text-base font-black",children:[j,"°"]})]}),f.jsx("input",{type:"range",min:"0",max:"360",step:"1",value:j,disabled:Z,onChange:ke=>{k(parseInt(ke.target.value)),un()},className:"w-full h-2 bg-green-950 rounded-none appearance-none cursor-pointer accent-green-400 focus:outline-none disabled:opacity-50"})]})]}),f.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:f.jsx("div",{className:"w-full",children:f.jsx($n,{mode:"wait",children:Z?f.jsx("div",{className:"w-full py-3.5 bg-black border-2 border-emerald-500 text-emerald-400 font-mono text-sm font-bold rounded-none tracking-widest uppercase animate-pulse",children:l==="ru"?"СИГНАЛ СТАБИЛИЗИРОВАН. ВВОД КОМАНДЫ...":"SIGNAL STABILIZED. DECRYPTION RUNNING..."}):f.jsx("div",{className:"w-full py-3.5 bg-black border-2 border-green-950 text-green-700 font-mono text-sm font-bold rounded-none tracking-widest cursor-not-allowed uppercase",children:r.waiting_for_capture})})})}),f.jsx("div",{className:"text-center font-mono text-[9px] text-slate-700 z-10 pt-2",children:r.encryption_info})]}),f.jsx($n,{children:q&&f.jsx(Ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/90 backdrop-blur-md z-[99999] flex items-center justify-center p-4 font-mono",children:f.jsxs(Ie.div,{initial:{scale:.9,y:20},animate:{scale:1,y:0},exit:{scale:.9,y:20},className:`w-full max-w-md bg-black border-2 ${Ne?"border-red-500 shadow-[0_0_40px_rgba(239,68,68,0.4)]":"border-green-500 shadow-[0_0_40px_rgba(34,197,94,0.3)]"} p-6 rounded-none relative overflow-hidden`,children:[f.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,6px_100%] pointer-events-none"}),f.jsxs("div",{className:"absolute top-0 right-2 text-[8px] text-green-800/20 select-none pointer-events-none text-right",children:[f.jsx("div",{children:"01010111 01001111 01010010 01001011"}),f.jsx("div",{children:"SYS_CAPTURE: ENGAGED"}),f.jsx("div",{children:"SECURE_CONN_TRUE"}),f.jsx("div",{children:"BYPASS_FIREWALL_OK"})]}),f.jsxs("div",{className:"flex items-center gap-2 mb-4 border-b border-green-900/60 pb-3",children:[f.jsx("span",{className:`w-3 h-3 rounded-full ${Ne?"bg-red-500 animate-ping":"bg-green-500 animate-pulse"}`}),f.jsx("h3",{className:`text-lg font-black tracking-widest uppercase ${Ne?"text-red-400":"text-green-400"}`,children:l==="ru"?"ДЕШИФРАЦИЯ КАНАЛА":"CHANNEL DECRYPTION"})]}),f.jsxs("div",{className:"mb-6 bg-green-950/20 border border-green-900/40 p-3 rounded text-xs text-green-400 space-y-1.5 leading-normal",children:[f.jsxs("div",{className:"flex justify-between font-bold",children:[f.jsx("span",{children:"[STATUS]"}),f.jsx("span",{className:"text-green-300 animate-pulse",children:l==="ru"?"ОЖИДАНИЕ КЛЮЧА...":"AWAITING AUTH_KEY..."})]}),f.jsx("div",{className:"font-mono text-emerald-500/80",children:l==="ru"?"СИГНАЛ СТАБИЛИЗИРОВАН. ДЛЯ ИНТЕГРАЦИИ НЕОБХОДИМА АВТОРИЗАЦИЯ.":"SIGNAL STABILIZED. COHERENCE AT 100%. CONFIRM PROTOCOL INTERFACE."}),f.jsxs("div",{className:"w-full bg-green-950 h-5 mt-2 rounded border border-green-900/30 overflow-hidden flex items-center relative",children:[f.jsx(Ie.div,{initial:{width:0},animate:{width:"100%"},transition:{duration:1.5,ease:"easeOut"},className:"h-full bg-gradient-to-r from-emerald-600 to-green-400"}),f.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-[10px] font-black text-black",children:"100% SECURE CAPTURE"})]})]}),f.jsxs("form",{onSubmit:Rn,className:"space-y-4",children:[f.jsx("label",{className:"block text-xs uppercase tracking-widest text-green-500 font-black mb-1",children:l==="ru"?"ВВЕДИТЕ КОМАНДУ ПОДТВЕРЖДЕНИЯ:":"ENTER CONFIRMATION COMMAND:"}),f.jsxs("div",{className:"relative flex items-center",children:[f.jsx("span",{className:"absolute left-3 text-green-400 text-sm font-bold",children:"»"}),f.jsx("input",{type:"text",autoFocus:!0,value:se,onChange:ke=>Se(ke.target.value),placeholder:l==="ru"?"ДА...":"YES...",className:`w-full bg-black border-2 ${Ne?"border-red-500 text-red-400":"border-green-800 text-green-400 focus:border-green-400"} rounded-none py-3 pl-8 pr-28 text-base font-bold font-mono outline-none tracking-widest placeholder-green-900/50 uppercase`}),f.jsxs("div",{className:"absolute right-3 flex items-center gap-1.5 pointer-events-none",children:[f.jsx("span",{className:"text-[10px] text-green-600 uppercase tracking-widest",children:l==="ru"?"ПОДСКАЗКА:":"HINT:"}),f.jsx("span",{className:"text-emerald-400 font-bold bg-emerald-950/80 border border-emerald-900/50 px-1.5 py-0.5 rounded text-xs animate-pulse tracking-wide select-none",children:Rt})]})]}),f.jsx("div",{className:"text-[10px] text-green-600/70 font-mono leading-tight",children:l==="ru"?"Введите команду подтверждения для дешифрования и интеграции.":"Enter confirmation command to decrypt and integrate."}),f.jsx("button",{type:"submit",className:"w-full py-3.5 bg-green-950/40 hover:bg-green-500 border-2 border-green-500 text-green-400 hover:text-black font-bold tracking-[0.2em] transition-all cursor-pointer uppercase flex items-center justify-center gap-2",children:l==="ru"?"ПОДТВЕРДИТЬ СИГНАЛ":"CONFIRM SIGNAL"})]})]})})})]})}const u_=()=>{const a=V.useRef(null);return V.useEffect(()=>{const i=a.current;if(!i)return;const l=i.getContext("2d");if(!l)return;let r,u=i.width=window.innerWidth,m=i.height=window.innerHeight;const h="0101010101日ﾊﾐﾋｰｳｼﾅﾓﾆｻﾜﾂｵﾘｱﾎﾏｹABCDEFGHIJKLMNOPQRSTUVWXYZ",g=14,y=Math.floor(u/g),x=[];for(let T=0;T<y;T++)x[T]=Math.random()*-100;const b=()=>{l.fillStyle="rgba(0, 0, 0, 0.1)",l.fillRect(0,0,u,m),l.font=`bold ${g}px monospace`;for(let T=0;T<x.length;T++){const N=h[Math.floor(Math.random()*h.length)],j=T*g,k=x[T]*g;l.shadowBlur=5,l.shadowColor="#22c55e",l.fillStyle="#f0fdf4",l.fillText(N,j,k),l.shadowBlur=0,l.fillStyle="#22c55e",x[T]++,k>m&&Math.random()>.975&&(x[T]=0)}r=requestAnimationFrame(b)},S=()=>{u=i.width=window.innerWidth,m=i.height=window.innerHeight;const T=Math.floor(u/g);if(T>x.length)for(let N=x.length;N<T;N++)x[N]=Math.random()*-100};return window.addEventListener("resize",S),b(),()=>{window.removeEventListener("resize",S),cancelAnimationFrame(r)}},[]),f.jsx("canvas",{ref:a,className:"absolute inset-0 w-full h-full pointer-events-none opacity-20 z-0",style:{filter:"blur(0.5px)"}})};function f_(){const[a,i]=V.useState("MENU"),[l,r]=V.useState(()=>{const K=localStorage.getItem("orbit_level");return K?parseInt(K,10):1}),[u,m]=V.useState(()=>localStorage.getItem("orbit_game_completed")==="true"),[h,g]=V.useState(()=>localStorage.getItem("orbit_last_ending")||"TWIST"),[y,x]=V.useState(()=>localStorage.getItem("orbit_lang")||"ru"),[b,S]=V.useState(0),[T,N]=V.useState([]),[j,k]=V.useState(()=>localStorage.getItem("orbit_muted")==="true"),B=Ei[y];V.useEffect(()=>{a==="MENU"?ne.startMenuMusic():a==="SIGNAL_PUZZLE"?ne.stopAll():a==="PLAYING"||(a==="TWIST"?ne.switchToDarkDrone():ne.stopAll()),ne.setVolume(j?0:.35)},[a,j]),V.useEffect(()=>{localStorage.setItem("orbit_muted",j?"true":"false"),ne.setVolume(j?0:.35)},[j]),V.useEffect(()=>{localStorage.setItem("orbit_level",l.toString())},[l]),V.useEffect(()=>{u&&(localStorage.setItem("orbit_game_completed","true"),localStorage.setItem("orbit_last_ending",h))},[u,h]),V.useEffect(()=>{localStorage.setItem("orbit_lang",y)},[y]);const Y=V.useRef(!0);V.useEffect(()=>{if(Y.current){Y.current=!1;return}ne.playEnd()},[a]),V.useEffect(()=>{const K=F=>{F.preventDefault()};return window.addEventListener("contextmenu",K),()=>{window.removeEventListener("contextmenu",K)}},[]),V.useEffect(()=>{const K=F=>{const ae=F.target;ae&&ae.closest('button, [role="button"], a, input[type="button"], input[type="submit"]')&&ne.playClick()};return window.addEventListener("click",K,{capture:!0}),()=>{window.removeEventListener("click",K,{capture:!0})}},[]);const Z=(K=1)=>{ne.init(),ne.setVolume(j?0:.35),r(K),K===1&&N([]),K%2===0?i("SIGNAL_PUZZLE"):i("BRIEFING")},P=(K,F)=>{if(ne.playCollect(),F&&F.length>0&&N(ae=>[...ae,F]),l<10){const ae=l+1;r(ae),i("SIGNAL_PUZZLE")}},Q=()=>{ne.stopAll(),g("TWIST"),m(!0),i("TWIST")},W=()=>{ne.stopAll(),N([]),i("MENU")},ce=()=>{x(K=>K==="ru"?"en":"ru")};return f.jsxs("div",{className:"w-full min-h-screen bg-black text-green-300 font-sans select-none overflow-y-auto no-scrollbar flex flex-col items-center justify-center",children:[f.jsxs("div",{className:"fixed top-4 left-4 z-[9999] flex items-center gap-2 bg-black/95 border border-green-500/30 p-1.5 px-3 rounded-xl shadow-[0_0_20px_rgba(16,185,129,0.25)] backdrop-blur-md pointer-events-auto select-none",id:"global-control-hud",children:[f.jsx("button",{onClick:()=>{W()},className:"p-2 hover:bg-green-950/40 border border-green-900/50 hover:border-green-400/50 rounded-lg text-green-400 hover:text-white transition-all cursor-pointer flex items-center justify-center group",title:B.exit_to_menu||"Главное меню / Home Menu",children:f.jsx(C5,{className:"w-4 h-4 text-green-400 group-hover:scale-110 transition-transform"})}),f.jsx("div",{className:"w-[1px] h-5 bg-green-900/60"}),f.jsx("button",{onClick:()=>{const K=!j;k(K),K||ne.resume()},className:"p-2 hover:bg-green-950/40 border border-green-900/50 hover:border-green-400/50 rounded-lg text-green-400 hover:text-white transition-all cursor-pointer flex items-center justify-center",title:B.sound_toggle_title||"Звук",children:j?f.jsx(Z5,{className:"w-4 h-4 text-red-500"}):f.jsx(X5,{className:"w-4 h-4 text-green-400 animate-pulse"})}),f.jsx("div",{className:"w-[1px] h-5 bg-green-900/60"}),f.jsxs("button",{onClick:ce,className:"flex items-center gap-1.5 p-1.5 px-2 bg-green-950/20 hover:bg-green-950/40 border border-green-900/50 hover:border-green-400/50 rounded-lg text-green-400 hover:text-white transition-all cursor-pointer font-mono text-[10px] font-bold",title:"Сменить язык / Switch Language",children:[f.jsx(rg,{className:"w-3.5 h-3.5 text-green-500"}),f.jsx("span",{children:y.toUpperCase()})]})]}),f.jsxs($n,{mode:"wait",children:[a==="MENU"&&f.jsxs(Ie.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:[f.jsx(u_,{}),f.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(#333333_1px,transparent_1px)] [background-size:32px_32px] opacity-25 pointer-events-none z-[1]"}),f.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_center,rgba(0,0,0,0)_0%,#000000_100%)] pointer-events-none z-[1]"}),f.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"}),f.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:[f.jsxs("div",{className:"flex items-center gap-2 sm:pl-[170px] pl-[140px]",children:[f.jsx(H5,{className:"w-4 h-4 text-emerald-500 animate-spin"}),f.jsx("span",{children:y==="ru"?"ИМПЕРСКИЙ ТРЕНАЖЕР ПИЛОТОВ v94.1":"IMPERIAL PILOT TRAINER v94.1"})]}),f.jsxs("div",{className:"flex items-center gap-4",children:[f.jsxs("button",{onClick:ce,className:"flex items-center gap-2 px-2 py-1 bg-white/5 border border-white/10 rounded hover:bg-white/10 transition-all cursor-pointer font-mono text-[10px] text-white/40 hover:text-white",children:[f.jsx(rg,{className:"w-3 h-3"}),f.jsx("span",{children:y.toUpperCase()})]}),f.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:y==="ru"?"СЕТЕВОЙ РЕЖИМ СТАБИЛЕН":"NETWORK STATUS STABLE"})]})]}),f.jsxs("div",{className:"max-w-xl w-full mx-auto flex flex-col items-center justify-center py-12 z-10 text-center",children:[f.jsx(Ie.div,{animate:{y:[0,-10,0]},transition:{repeat:1/0,duration:4,ease:"easeInOut"},className:"mb-8",children:f.jsx("img",{src:Jy,className:"w-24 h-24 object-contain filter drop-shadow-[0_0_15px_rgba(255,255,255,0.2)]",alt:"Ship"})}),f.jsxs("div",{className:"relative group mb-10 text-center",children:[f.jsx("div",{className:"absolute -inset-1 bg-green-500/20 blur-xl opacity-50 group-hover:opacity-100 transition-opacity"}),f.jsxs("h1",{className:"relative text-5xl md:text-6xl font-mono font-black tracking-tighter text-white uppercase select-none leading-none",children:[f.jsx("span",{className:"block text-transparent bg-clip-text bg-gradient-to-b from-green-300 to-green-600 drop-shadow-[0_0_10px_rgba(34,197,94,0.4)]",children:B.title1}),f.jsx("span",{className:"block text-transparent bg-clip-text bg-gradient-to-b from-green-400 to-emerald-700 drop-shadow-[0_0_15px_rgba(16,185,129,0.5)]",children:B.title2})]}),f.jsx("div",{className:"mt-4 h-0.5 w-full bg-gradient-to-r from-transparent via-green-500/50 to-transparent"}),f.jsxs("div",{className:"flex justify-between mt-1 px-1 font-mono text-[9px] text-green-500/60 uppercase tracking-[0.4em]",children:[f.jsx("span",{children:"DEFENSE_PROTOCOL.active"}),f.jsx("span",{children:"v.2.0.4.8"})]})]}),f.jsxs("div",{className:"flex flex-col gap-4 w-full px-4",children:[u&&f.jsxs(Ie.button,{whileHover:{scale:1.02,backgroundColor:"rgba(168, 85, 247, 0.1)"},whileTap:{scale:.98},onClick:()=>i(h),className:"w-full py-4 bg-black/60 border-2 border-purple-500/50 hover:border-purple-400 text-purple-400 font-mono font-bold rounded-none tracking-[0.2em] shadow-[0_0_15px_rgba(168,85,247,0.15)] cursor-pointer flex items-center justify-center gap-2 uppercase transition-all",children:[f.jsx("span",{className:"text-xl",children:"»"}),f.jsx("span",{children:B.last_report}),f.jsx("span",{className:"text-xl",children:"«"})]}),l>1&&f.jsx(Ie.button,{whileHover:{scale:1.02,backgroundColor:"rgba(34, 197, 94, 0.1)"},whileTap:{scale:.98},onClick:()=>Z(l),className:"w-full py-4 bg-black/60 border-2 border-emerald-500/50 hover:border-emerald-400 text-emerald-400 font-mono font-bold rounded-none tracking-[0.2em] shadow-[0_0_15px_rgba(16,185,129,0.15)] cursor-pointer flex items-center justify-center gap-2 uppercase transition-all",children:f.jsx("span",{children:B.continue_sector.replace("{level}",l.toString())})}),f.jsxs(Ie.button,{whileHover:{scale:1.02,backgroundColor:"rgba(34, 197, 94, 0.1)"},whileTap:{scale:.98},onClick:()=>Z(1),className:"w-full py-5 bg-black/60 border-2 border-green-500/50 hover:border-green-400 text-green-400 font-mono font-bold rounded-none tracking-[0.25em] shadow-[0_0_20px_rgba(34,197,94,0.2)] cursor-pointer flex items-center justify-center gap-2 uppercase transition-all group",id:"btn-start-full-game",children:[f.jsx("span",{className:"group-hover:translate-x-1 transition-transform",children:"»"}),f.jsx("span",{children:l>1?B.reset_reboot:B.start_defense}),f.jsx("span",{className:"group-hover:-translate-x-1 transition-transform",children:"«"})]})]})]}),f.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:B.confidential_info})]},"menu"),a==="SIGNAL_PUZZLE"&&f.jsx(Ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"w-full h-full",children:f.jsx(c_,{level:l,onSolve:()=>i("BRIEFING"),lang:y})},"signal-puzzle"),a==="BRIEFING"&&f.jsx(Ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"w-full",children:f.jsx(J5,{level:l,onStart:()=>i("PLAYING"),lang:y})},"briefing"),a==="PLAYING"&&f.jsx(Ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"w-full h-screen",children:f.jsx(s_,{level:l,onLevelComplete:P,onTriggerTwist:Q,onPlayerAsleep:()=>i("ASLEEP"),onTriggerPeacefulWin:()=>{g("PEACEFUL_WIN"),m(!0),i("PEACEFUL_WIN")},onExitToMenu:W,lang:y,previousRoundHistory:T})},"playing"),a==="TWIST"&&f.jsx(Ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"w-full",children:f.jsx(l_,{onRestart:W,lang:y})},"twist"),a==="ASLEEP"&&f.jsx(Ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"w-full",children:f.jsx(r_,{onWakeUp:()=>Z(1),lang:y})},"asleep"),a==="PEACEFUL_WIN"&&f.jsx(Ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"w-full",children:f.jsx(o_,{onRestart:W,lang:y})},"peaceful-win")]})]})}mv.createRoot(document.getElementById("root")).render(f.jsx(V.StrictMode,{children:f.jsx(f_,{})}));
