expxagents 0.7.9 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,344 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browserAll-BUIMCzCP.js","assets/webworkerAll-Kw76R3HQ.js","assets/WebGPURenderer-C5qxFAzO.js","assets/BufferResource-BrKqN-K6.js","assets/RenderTargetSystem-0ZZvvcQt.js","assets/WebGLRenderer-DYZKskuK.js","assets/CanvasRenderer-CQDKSCiw.js"])))=>i.map(i=>d[i]);
2
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))l(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&l(d)}).observe(document,{childList:!0,subtree:!0});function a(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function l(o){if(o.ep)return;o.ep=!0;const c=a(o);fetch(o.href,c)}})();function Ep(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var S0={exports:{}},wh={};/**
3
+ * @license React
4
+ * react-jsx-runtime.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var a1;function yS(){if(a1)return wh;a1=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function a(l,o,c){var d=null;if(c!==void 0&&(d=""+c),o.key!==void 0&&(d=""+o.key),"key"in o){c={};for(var m in o)m!=="key"&&(c[m]=o[m])}else c=o;return o=c.ref,{$$typeof:n,type:l,key:d,ref:o!==void 0?o:null,props:c}}return wh.Fragment=t,wh.jsx=a,wh.jsxs=a,wh}var i1;function gS(){return i1||(i1=1,S0.exports=yS()),S0.exports}var X=gS(),b0={exports:{}},Vt={};/**
11
+ * @license React
12
+ * react.production.js
13
+ *
14
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var l1;function vS(){if(l1)return Vt;l1=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),E=Symbol.iterator;function C(j){return j===null||typeof j!="object"?null:(j=E&&j[E]||j["@@iterator"],typeof j=="function"?j:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,M={};function D(j,I,ot){this.props=j,this.context=I,this.refs=M,this.updater=ot||R}D.prototype.isReactComponent={},D.prototype.setState=function(j,I){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,I,"setState")},D.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function w(){}w.prototype=D.prototype;function B(j,I,ot){this.props=j,this.context=I,this.refs=M,this.updater=ot||R}var U=B.prototype=new w;U.constructor=B,z(U,D.prototype),U.isPureReactComponent=!0;var k=Array.isArray;function Q(){}var V={H:null,A:null,T:null,S:null},ft=Object.prototype.hasOwnProperty;function lt(j,I,ot){var vt=ot.ref;return{$$typeof:n,type:j,key:I,ref:vt!==void 0?vt:null,props:ot}}function st(j,I){return lt(j.type,I,j.props)}function ut(j){return typeof j=="object"&&j!==null&&j.$$typeof===n}function pt(j){var I={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(ot){return I[ot]})}var gt=/\/+/g;function xt(j,I){return typeof j=="object"&&j!==null&&j.key!=null?pt(""+j.key):I.toString(36)}function Ct(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(Q,Q):(j.status="pending",j.then(function(I){j.status==="pending"&&(j.status="fulfilled",j.value=I)},function(I){j.status==="pending"&&(j.status="rejected",j.reason=I)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function H(j,I,ot,vt,Tt){var Ot=typeof j;(Ot==="undefined"||Ot==="boolean")&&(j=null);var Bt=!1;if(j===null)Bt=!0;else switch(Ot){case"bigint":case"string":case"number":Bt=!0;break;case"object":switch(j.$$typeof){case n:case t:Bt=!0;break;case _:return Bt=j._init,H(Bt(j._payload),I,ot,vt,Tt)}}if(Bt)return Tt=Tt(j),Bt=vt===""?"."+xt(j,0):vt,k(Tt)?(ot="",Bt!=null&&(ot=Bt.replace(gt,"$&/")+"/"),H(Tt,I,ot,"",function(pa){return pa})):Tt!=null&&(ut(Tt)&&(Tt=st(Tt,ot+(Tt.key==null||j&&j.key===Tt.key?"":(""+Tt.key).replace(gt,"$&/")+"/")+Bt)),I.push(Tt)),1;Bt=0;var fe=vt===""?".":vt+":";if(k(j))for(var ce=0;ce<j.length;ce++)vt=j[ce],Ot=fe+xt(vt,ce),Bt+=H(vt,I,ot,Ot,Tt);else if(ce=C(j),typeof ce=="function")for(j=ce.call(j),ce=0;!(vt=j.next()).done;)vt=vt.value,Ot=fe+xt(vt,ce++),Bt+=H(vt,I,ot,Ot,Tt);else if(Ot==="object"){if(typeof j.then=="function")return H(Ct(j),I,ot,vt,Tt);throw I=String(j),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return Bt}function G(j,I,ot){if(j==null)return j;var vt=[],Tt=0;return H(j,vt,"","",function(Ot){return I.call(ot,Ot,Tt++)}),vt}function at(j){if(j._status===-1){var I=j._result;I=I(),I.then(function(ot){(j._status===0||j._status===-1)&&(j._status=1,j._result=ot)},function(ot){(j._status===0||j._status===-1)&&(j._status=2,j._result=ot)}),j._status===-1&&(j._status=0,j._result=I)}if(j._status===1)return j._result.default;throw j._result}var et=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},mt={map:G,forEach:function(j,I,ot){G(j,function(){I.apply(this,arguments)},ot)},count:function(j){var I=0;return G(j,function(){I++}),I},toArray:function(j){return G(j,function(I){return I})||[]},only:function(j){if(!ut(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return Vt.Activity=b,Vt.Children=mt,Vt.Component=D,Vt.Fragment=a,Vt.Profiler=o,Vt.PureComponent=B,Vt.StrictMode=l,Vt.Suspense=p,Vt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,Vt.__COMPILER_RUNTIME={__proto__:null,c:function(j){return V.H.useMemoCache(j)}},Vt.cache=function(j){return function(){return j.apply(null,arguments)}},Vt.cacheSignal=function(){return null},Vt.cloneElement=function(j,I,ot){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var vt=z({},j.props),Tt=j.key;if(I!=null)for(Ot in I.key!==void 0&&(Tt=""+I.key),I)!ft.call(I,Ot)||Ot==="key"||Ot==="__self"||Ot==="__source"||Ot==="ref"&&I.ref===void 0||(vt[Ot]=I[Ot]);var Ot=arguments.length-2;if(Ot===1)vt.children=ot;else if(1<Ot){for(var Bt=Array(Ot),fe=0;fe<Ot;fe++)Bt[fe]=arguments[fe+2];vt.children=Bt}return lt(j.type,Tt,vt)},Vt.createContext=function(j){return j={$$typeof:d,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:c,_context:j},j},Vt.createElement=function(j,I,ot){var vt,Tt={},Ot=null;if(I!=null)for(vt in I.key!==void 0&&(Ot=""+I.key),I)ft.call(I,vt)&&vt!=="key"&&vt!=="__self"&&vt!=="__source"&&(Tt[vt]=I[vt]);var Bt=arguments.length-2;if(Bt===1)Tt.children=ot;else if(1<Bt){for(var fe=Array(Bt),ce=0;ce<Bt;ce++)fe[ce]=arguments[ce+2];Tt.children=fe}if(j&&j.defaultProps)for(vt in Bt=j.defaultProps,Bt)Tt[vt]===void 0&&(Tt[vt]=Bt[vt]);return lt(j,Ot,Tt)},Vt.createRef=function(){return{current:null}},Vt.forwardRef=function(j){return{$$typeof:m,render:j}},Vt.isValidElement=ut,Vt.lazy=function(j){return{$$typeof:_,_payload:{_status:-1,_result:j},_init:at}},Vt.memo=function(j,I){return{$$typeof:v,type:j,compare:I===void 0?null:I}},Vt.startTransition=function(j){var I=V.T,ot={};V.T=ot;try{var vt=j(),Tt=V.S;Tt!==null&&Tt(ot,vt),typeof vt=="object"&&vt!==null&&typeof vt.then=="function"&&vt.then(Q,et)}catch(Ot){et(Ot)}finally{I!==null&&ot.types!==null&&(I.types=ot.types),V.T=I}},Vt.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},Vt.use=function(j){return V.H.use(j)},Vt.useActionState=function(j,I,ot){return V.H.useActionState(j,I,ot)},Vt.useCallback=function(j,I){return V.H.useCallback(j,I)},Vt.useContext=function(j){return V.H.useContext(j)},Vt.useDebugValue=function(){},Vt.useDeferredValue=function(j,I){return V.H.useDeferredValue(j,I)},Vt.useEffect=function(j,I){return V.H.useEffect(j,I)},Vt.useEffectEvent=function(j){return V.H.useEffectEvent(j)},Vt.useId=function(){return V.H.useId()},Vt.useImperativeHandle=function(j,I,ot){return V.H.useImperativeHandle(j,I,ot)},Vt.useInsertionEffect=function(j,I){return V.H.useInsertionEffect(j,I)},Vt.useLayoutEffect=function(j,I){return V.H.useLayoutEffect(j,I)},Vt.useMemo=function(j,I){return V.H.useMemo(j,I)},Vt.useOptimistic=function(j,I){return V.H.useOptimistic(j,I)},Vt.useReducer=function(j,I,ot){return V.H.useReducer(j,I,ot)},Vt.useRef=function(j){return V.H.useRef(j)},Vt.useState=function(j){return V.H.useState(j)},Vt.useSyncExternalStore=function(j,I,ot){return V.H.useSyncExternalStore(j,I,ot)},Vt.useTransition=function(){return V.H.useTransition()},Vt.version="19.2.4",Vt}var s1;function Cp(){return s1||(s1=1,b0.exports=vS()),b0.exports}var Y=Cp();const Qm=Ep(Y);var T0={exports:{}},Bh={},E0={exports:{}},C0={};/**
19
+ * @license React
20
+ * scheduler.production.js
21
+ *
22
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var r1;function xS(){return r1||(r1=1,(function(n){function t(H,G){var at=H.length;H.push(G);t:for(;0<at;){var et=at-1>>>1,mt=H[et];if(0<o(mt,G))H[et]=G,H[at]=mt,at=et;else break t}}function a(H){return H.length===0?null:H[0]}function l(H){if(H.length===0)return null;var G=H[0],at=H.pop();if(at!==G){H[0]=at;t:for(var et=0,mt=H.length,j=mt>>>1;et<j;){var I=2*(et+1)-1,ot=H[I],vt=I+1,Tt=H[vt];if(0>o(ot,at))vt<mt&&0>o(Tt,ot)?(H[et]=Tt,H[vt]=at,et=vt):(H[et]=ot,H[I]=at,et=I);else if(vt<mt&&0>o(Tt,at))H[et]=Tt,H[vt]=at,et=vt;else break t}}return G}function o(H,G){var at=H.sortIndex-G.sortIndex;return at!==0?at:H.id-G.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var p=[],v=[],_=1,b=null,E=3,C=!1,R=!1,z=!1,M=!1,D=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function U(H){for(var G=a(v);G!==null;){if(G.callback===null)l(v);else if(G.startTime<=H)l(v),G.sortIndex=G.expirationTime,t(p,G);else break;G=a(v)}}function k(H){if(z=!1,U(H),!R)if(a(p)!==null)R=!0,Q||(Q=!0,pt());else{var G=a(v);G!==null&&Ct(k,G.startTime-H)}}var Q=!1,V=-1,ft=5,lt=-1;function st(){return M?!0:!(n.unstable_now()-lt<ft)}function ut(){if(M=!1,Q){var H=n.unstable_now();lt=H;var G=!0;try{t:{R=!1,z&&(z=!1,w(V),V=-1),C=!0;var at=E;try{e:{for(U(H),b=a(p);b!==null&&!(b.expirationTime>H&&st());){var et=b.callback;if(typeof et=="function"){b.callback=null,E=b.priorityLevel;var mt=et(b.expirationTime<=H);if(H=n.unstable_now(),typeof mt=="function"){b.callback=mt,U(H),G=!0;break e}b===a(p)&&l(p),U(H)}else l(p);b=a(p)}if(b!==null)G=!0;else{var j=a(v);j!==null&&Ct(k,j.startTime-H),G=!1}}break t}finally{b=null,E=at,C=!1}G=void 0}}finally{G?pt():Q=!1}}}var pt;if(typeof B=="function")pt=function(){B(ut)};else if(typeof MessageChannel<"u"){var gt=new MessageChannel,xt=gt.port2;gt.port1.onmessage=ut,pt=function(){xt.postMessage(null)}}else pt=function(){D(ut,0)};function Ct(H,G){V=D(function(){H(n.unstable_now())},G)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(H){H.callback=null},n.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ft=0<H?Math.floor(1e3/H):5},n.unstable_getCurrentPriorityLevel=function(){return E},n.unstable_next=function(H){switch(E){case 1:case 2:case 3:var G=3;break;default:G=E}var at=E;E=G;try{return H()}finally{E=at}},n.unstable_requestPaint=function(){M=!0},n.unstable_runWithPriority=function(H,G){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var at=E;E=H;try{return G()}finally{E=at}},n.unstable_scheduleCallback=function(H,G,at){var et=n.unstable_now();switch(typeof at=="object"&&at!==null?(at=at.delay,at=typeof at=="number"&&0<at?et+at:et):at=et,H){case 1:var mt=-1;break;case 2:mt=250;break;case 5:mt=1073741823;break;case 4:mt=1e4;break;default:mt=5e3}return mt=at+mt,H={id:_++,callback:G,priorityLevel:H,startTime:at,expirationTime:mt,sortIndex:-1},at>et?(H.sortIndex=at,t(v,H),a(p)===null&&H===a(v)&&(z?(w(V),V=-1):z=!0,Ct(k,at-et))):(H.sortIndex=mt,t(p,H),R||C||(R=!0,Q||(Q=!0,pt()))),H},n.unstable_shouldYield=st,n.unstable_wrapCallback=function(H){var G=E;return function(){var at=E;E=G;try{return H.apply(this,arguments)}finally{E=at}}}})(C0)),C0}var u1;function _S(){return u1||(u1=1,E0.exports=xS()),E0.exports}var A0={exports:{}},ha={};/**
27
+ * @license React
28
+ * react-dom.production.js
29
+ *
30
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var o1;function SS(){if(o1)return ha;o1=1;var n=Cp();function t(p){var v="https://react.dev/errors/"+p;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var _=2;_<arguments.length;_++)v+="&args[]="+encodeURIComponent(arguments[_])}return"Minified React error #"+p+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var l={d:{f:a,r:function(){throw Error(t(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(p,v,_){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:b==null?null:""+b,children:p,containerInfo:v,implementation:_}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(p,v){if(p==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return ha.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,ha.createPortal=function(p,v){var _=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(t(299));return c(p,v,null,_)},ha.flushSync=function(p){var v=d.T,_=l.p;try{if(d.T=null,l.p=2,p)return p()}finally{d.T=v,l.p=_,l.d.f()}},ha.preconnect=function(p,v){typeof p=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,l.d.C(p,v))},ha.prefetchDNS=function(p){typeof p=="string"&&l.d.D(p)},ha.preinit=function(p,v){if(typeof p=="string"&&v&&typeof v.as=="string"){var _=v.as,b=m(_,v.crossOrigin),E=typeof v.integrity=="string"?v.integrity:void 0,C=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;_==="style"?l.d.S(p,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:b,integrity:E,fetchPriority:C}):_==="script"&&l.d.X(p,{crossOrigin:b,integrity:E,fetchPriority:C,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},ha.preinitModule=function(p,v){if(typeof p=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var _=m(v.as,v.crossOrigin);l.d.M(p,{crossOrigin:_,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&l.d.M(p)},ha.preload=function(p,v){if(typeof p=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var _=v.as,b=m(_,v.crossOrigin);l.d.L(p,_,{crossOrigin:b,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},ha.preloadModule=function(p,v){if(typeof p=="string")if(v){var _=m(v.as,v.crossOrigin);l.d.m(p,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:_,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else l.d.m(p)},ha.requestFormReset=function(p){l.d.r(p)},ha.unstable_batchedUpdates=function(p,v){return p(v)},ha.useFormState=function(p,v,_){return d.H.useFormState(p,v,_)},ha.useFormStatus=function(){return d.H.useHostTransitionStatus()},ha.version="19.2.4",ha}var c1;function bS(){if(c1)return A0.exports;c1=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),A0.exports=SS(),A0.exports}/**
35
+ * @license React
36
+ * react-dom-client.production.js
37
+ *
38
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
39
+ *
40
+ * This source code is licensed under the MIT license found in the
41
+ * LICENSE file in the root directory of this source tree.
42
+ */var f1;function TS(){if(f1)return Bh;f1=1;var n=_S(),t=Cp(),a=bS();function l(e){var i="https://react.dev/errors/"+e;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)i+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+e+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var i=e,u=e;if(e.alternate)for(;i.return;)i=i.return;else{e=i;do i=e,(i.flags&4098)!==0&&(u=i.return),e=i.return;while(e)}return i.tag===3?u:null}function d(e){if(e.tag===13){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function m(e){if(e.tag===31){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function p(e){if(c(e)!==e)throw Error(l(188))}function v(e){var i=e.alternate;if(!i){if(i=c(e),i===null)throw Error(l(188));return i!==e?null:e}for(var u=e,f=i;;){var y=u.return;if(y===null)break;var x=y.alternate;if(x===null){if(f=y.return,f!==null){u=f;continue}break}if(y.child===x.child){for(x=y.child;x;){if(x===u)return p(y),e;if(x===f)return p(y),i;x=x.sibling}throw Error(l(188))}if(u.return!==f.return)u=y,f=x;else{for(var A=!1,O=y.child;O;){if(O===u){A=!0,u=y,f=x;break}if(O===f){A=!0,f=y,u=x;break}O=O.sibling}if(!A){for(O=x.child;O;){if(O===u){A=!0,u=x,f=y;break}if(O===f){A=!0,f=x,u=y;break}O=O.sibling}if(!A)throw Error(l(189))}}if(u.alternate!==f)throw Error(l(190))}if(u.tag!==3)throw Error(l(188));return u.stateNode.current===u?e:i}function _(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e;for(e=e.child;e!==null;){if(i=_(e),i!==null)return i;e=e.sibling}return null}var b=Object.assign,E=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),B=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),ft=Symbol.for("react.lazy"),lt=Symbol.for("react.activity"),st=Symbol.for("react.memo_cache_sentinel"),ut=Symbol.iterator;function pt(e){return e===null||typeof e!="object"?null:(e=ut&&e[ut]||e["@@iterator"],typeof e=="function"?e:null)}var gt=Symbol.for("react.client.reference");function xt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===gt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case z:return"Fragment";case D:return"Profiler";case M:return"StrictMode";case k:return"Suspense";case Q:return"SuspenseList";case lt:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case B:return e.displayName||"Context";case w:return(e._context.displayName||"Context")+".Consumer";case U:var i=e.render;return e=e.displayName,e||(e=i.displayName||i.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case V:return i=e.displayName||null,i!==null?i:xt(e.type)||"Memo";case ft:i=e._payload,e=e._init;try{return xt(e(i))}catch{}}return null}var Ct=Array.isArray,H=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,at={pending:!1,data:null,method:null,action:null},et=[],mt=-1;function j(e){return{current:e}}function I(e){0>mt||(e.current=et[mt],et[mt]=null,mt--)}function ot(e,i){mt++,et[mt]=e.current,e.current=i}var vt=j(null),Tt=j(null),Ot=j(null),Bt=j(null);function fe(e,i){switch(ot(Ot,i),ot(Tt,e),ot(vt,null),i.nodeType){case 9:case 11:e=(e=i.documentElement)&&(e=e.namespaceURI)?Ag(e):0;break;default:if(e=i.tagName,i=i.namespaceURI)i=Ag(i),e=Mg(i,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}I(vt),ot(vt,e)}function ce(){I(vt),I(Tt),I(Ot)}function pa(e){e.memoizedState!==null&&ot(Bt,e);var i=vt.current,u=Mg(i,e.type);i!==u&&(ot(Tt,e),ot(vt,u))}function ja(e){Tt.current===e&&(I(vt),I(Tt)),Bt.current===e&&(I(Bt),zh._currentValue=at)}var qn,In;function pn(e){if(qn===void 0)try{throw Error()}catch(u){var i=u.stack.trim().match(/\n( *(at )?)/);qn=i&&i[1]||"",In=-1<u.stack.indexOf(`
43
+ at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
44
+ `+qn+e+In}var $n=!1;function ys(e,i){if(!e||$n)return"";$n=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(i){var dt=function(){throw Error()};if(Object.defineProperty(dt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(dt,[])}catch(it){var tt=it}Reflect.construct(e,[],dt)}else{try{dt.call()}catch(it){tt=it}e.call(dt.prototype)}}else{try{throw Error()}catch(it){tt=it}(dt=e())&&typeof dt.catch=="function"&&dt.catch(function(){})}}catch(it){if(it&&tt&&typeof it.stack=="string")return[it.stack,tt.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=f.DetermineComponentFrameRoot(),A=x[0],O=x[1];if(A&&O){var L=A.split(`
45
+ `),F=O.split(`
46
+ `);for(y=f=0;f<L.length&&!L[f].includes("DetermineComponentFrameRoot");)f++;for(;y<F.length&&!F[y].includes("DetermineComponentFrameRoot");)y++;if(f===L.length||y===F.length)for(f=L.length-1,y=F.length-1;1<=f&&0<=y&&L[f]!==F[y];)y--;for(;1<=f&&0<=y;f--,y--)if(L[f]!==F[y]){if(f!==1||y!==1)do if(f--,y--,0>y||L[f]!==F[y]){var rt=`
47
+ `+L[f].replace(" at new "," at ");return e.displayName&&rt.includes("<anonymous>")&&(rt=rt.replace("<anonymous>",e.displayName)),rt}while(1<=f&&0<=y);break}}}finally{$n=!1,Error.prepareStackTrace=u}return(u=e?e.displayName||e.name:"")?pn(u):""}function ei(e,i){switch(e.tag){case 26:case 27:case 5:return pn(e.type);case 16:return pn("Lazy");case 13:return e.child!==i&&i!==null?pn("Suspense Fallback"):pn("Suspense");case 19:return pn("SuspenseList");case 0:case 15:return ys(e.type,!1);case 11:return ys(e.type.render,!1);case 1:return ys(e.type,!0);case 31:return pn("Activity");default:return""}}function eu(e){try{var i="",u=null;do i+=ei(e,u),u=e,e=e.return;while(e);return i}catch(f){return`
48
+ Error generating stack: `+f.message+`
49
+ `+f.stack}}var gs=Object.prototype.hasOwnProperty,Ya=n.unstable_scheduleCallback,Dl=n.unstable_cancelCallback,jp=n.unstable_shouldYield,hd=n.unstable_requestPaint,ta=n.unstable_now,dd=n.unstable_getCurrentPriorityLevel,md=n.unstable_ImmediatePriority,go=n.unstable_UserBlockingPriority,vo=n.unstable_NormalPriority,pd=n.unstable_LowPriority,yd=n.unstable_IdlePriority,tf=n.log,ef=n.unstable_setDisableYieldValue,qa=null,$e=null;function La(e){if(typeof tf=="function"&&ef(e),$e&&typeof $e.setStrictMode=="function")try{$e.setStrictMode(qa,e)}catch{}}var Ln=Math.clz32?Math.clz32:gd,nu=Math.log,au=Math.LN2;function gd(e){return e>>>=0,e===0?32:31-(nu(e)/au|0)|0}var iu=256,vs=262144,lu=4194304;function _i(e){var i=e&42;if(i!==0)return i;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 su(e,i,u){var f=e.pendingLanes;if(f===0)return 0;var y=0,x=e.suspendedLanes,A=e.pingedLanes;e=e.warmLanes;var O=f&134217727;return O!==0?(f=O&~x,f!==0?y=_i(f):(A&=O,A!==0?y=_i(A):u||(u=O&~e,u!==0&&(y=_i(u))))):(O=f&~x,O!==0?y=_i(O):A!==0?y=_i(A):u||(u=f&~e,u!==0&&(y=_i(u)))),y===0?0:i!==0&&i!==y&&(i&x)===0&&(x=y&-y,u=i&-i,x>=u||x===32&&(u&4194048)!==0)?i:y}function sr(e,i){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&i)===0}function xo(e,i){switch(e){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 rr(){var e=lu;return lu<<=1,(lu&62914560)===0&&(lu=4194304),e}function ur(e){for(var i=[],u=0;31>u;u++)i.push(e);return i}function or(e,i){e.pendingLanes|=i,i!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function vd(e,i,u,f,y,x){var A=e.pendingLanes;e.pendingLanes=u,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=u,e.entangledLanes&=u,e.errorRecoveryDisabledLanes&=u,e.shellSuspendCounter=0;var O=e.entanglements,L=e.expirationTimes,F=e.hiddenUpdates;for(u=A&~u;0<u;){var rt=31-Ln(u),dt=1<<rt;O[rt]=0,L[rt]=-1;var tt=F[rt];if(tt!==null)for(F[rt]=null,rt=0;rt<tt.length;rt++){var it=tt[rt];it!==null&&(it.lane&=-536870913)}u&=~dt}f!==0&&nf(e,f,0),x!==0&&y===0&&e.tag!==0&&(e.suspendedLanes|=x&~(A&~i))}function nf(e,i,u){e.pendingLanes|=i,e.suspendedLanes&=~i;var f=31-Ln(i);e.entangledLanes|=i,e.entanglements[f]=e.entanglements[f]|1073741824|u&261930}function _o(e,i){var u=e.entangledLanes|=i;for(e=e.entanglements;u;){var f=31-Ln(u),y=1<<f;y&i|e[f]&i&&(e[f]|=i),u&=~y}}function So(e,i){var u=i&-i;return u=(u&42)!==0?1:Si(u),(u&(e.suspendedLanes|i))!==0?0:u}function Si(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 bo(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Fi(){var e=G.p;return e!==0?e:(e=window.event,e===void 0?32:Pg(e.type))}function bi(e,i){var u=G.p;try{return G.p=e,i()}finally{G.p=u}}var ni=Math.random().toString(36).slice(2),Ft="__reactFiber$"+ni,zn="__reactProps$"+ni,Ol="__reactContainer$"+ni,To="__reactEvents$"+ni,xd="__reactListeners$"+ni,Yp="__reactHandles$"+ni,Eo="__reactResources$"+ni,xs="__reactMarker$"+ni;function ru(e){delete e[Ft],delete e[zn],delete e[To],delete e[xd],delete e[Yp]}function cn(e){var i=e[Ft];if(i)return i;for(var u=e.parentNode;u;){if(i=u[Ol]||u[Ft]){if(u=i.alternate,i.child!==null||u!==null&&u.child!==null)for(e=Bg(e);e!==null;){if(u=e[Ft])return u;e=Bg(e)}return i}e=u,u=e.parentNode}return null}function De(e){if(e=e[Ft]||e[Ol]){var i=e.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return e}return null}function Ii(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e.stateNode;throw Error(l(33))}function $i(e){var i=e[Eo];return i||(i=e[Eo]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function tn(e){e[xs]=!0}var Ti=new Set,uu={};function tl(e,i){Nl(e,i),Nl(e+"Capture",i)}function Nl(e,i){for(uu[e]=i,e=0;e<i.length;e++)Ti.add(i[e])}var _d=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]*$"),af={},lf={};function Sd(e){return gs.call(lf,e)?!0:gs.call(af,e)?!1:_d.test(e)?lf[e]=!0:(af[e]=!0,!1)}function ou(e,i,u){if(Sd(i))if(u===null)e.removeAttribute(i);else{switch(typeof u){case"undefined":case"function":case"symbol":e.removeAttribute(i);return;case"boolean":var f=i.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){e.removeAttribute(i);return}}e.setAttribute(i,""+u)}}function cu(e,i,u){if(u===null)e.removeAttribute(i);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttribute(i,""+u)}}function ai(e,i,u,f){if(f===null)e.removeAttribute(u);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(u);return}e.setAttributeNS(i,u,""+f)}}function ya(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function bd(e){var i=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Td(e,i,u){var f=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);if(!e.hasOwnProperty(i)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var y=f.get,x=f.set;return Object.defineProperty(e,i,{configurable:!0,get:function(){return y.call(this)},set:function(A){u=""+A,x.call(this,A)}}),Object.defineProperty(e,i,{enumerable:f.enumerable}),{getValue:function(){return u},setValue:function(A){u=""+A},stopTracking:function(){e._valueTracker=null,delete e[i]}}}}function Co(e){if(!e._valueTracker){var i=bd(e)?"checked":"value";e._valueTracker=Td(e,i,""+e[i])}}function sf(e){if(!e)return!1;var i=e._valueTracker;if(!i)return!0;var u=i.getValue(),f="";return e&&(f=bd(e)?e.checked?"true":"false":e.value),e=f,e!==u?(i.setValue(e),!0):!1}function cr(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 Ed=/[\n"\\]/g;function ga(e){return e.replace(Ed,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Ao(e,i,u,f,y,x,A,O){e.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?e.type=A:e.removeAttribute("type"),i!=null?A==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+ya(i)):e.value!==""+ya(i)&&(e.value=""+ya(i)):A!=="submit"&&A!=="reset"||e.removeAttribute("value"),i!=null?Mo(e,A,ya(i)):u!=null?Mo(e,A,ya(u)):f!=null&&e.removeAttribute("value"),y==null&&x!=null&&(e.defaultChecked=!!x),y!=null&&(e.checked=y&&typeof y!="function"&&typeof y!="symbol"),O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"?e.name=""+ya(O):e.removeAttribute("name")}function rf(e,i,u,f,y,x,A,O){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.type=x),i!=null||u!=null){if(!(x!=="submit"&&x!=="reset"||i!=null)){Co(e);return}u=u!=null?""+ya(u):"",i=i!=null?""+ya(i):u,O||i===e.value||(e.value=i),e.defaultValue=i}f=f??y,f=typeof f!="function"&&typeof f!="symbol"&&!!f,e.checked=O?e.checked:!!f,e.defaultChecked=!!f,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(e.name=A),Co(e)}function Mo(e,i,u){i==="number"&&cr(e.ownerDocument)===e||e.defaultValue===""+u||(e.defaultValue=""+u)}function fr(e,i,u,f){if(e=e.options,i){i={};for(var y=0;y<u.length;y++)i["$"+u[y]]=!0;for(u=0;u<e.length;u++)y=i.hasOwnProperty("$"+e[u].value),e[u].selected!==y&&(e[u].selected=y),y&&f&&(e[u].defaultSelected=!0)}else{for(u=""+ya(u),i=null,y=0;y<e.length;y++){if(e[y].value===u){e[y].selected=!0,f&&(e[y].defaultSelected=!0);return}i!==null||e[y].disabled||(i=e[y])}i!==null&&(i.selected=!0)}}function uf(e,i,u){if(i!=null&&(i=""+ya(i),i!==e.value&&(e.value=i),u==null)){e.defaultValue!==i&&(e.defaultValue=i);return}e.defaultValue=u!=null?""+ya(u):""}function _s(e,i,u,f){if(i==null){if(f!=null){if(u!=null)throw Error(l(92));if(Ct(f)){if(1<f.length)throw Error(l(93));f=f[0]}u=f}u==null&&(u=""),i=u}u=ya(i),e.defaultValue=u,f=e.textContent,f===u&&f!==""&&f!==null&&(e.value=f),Co(e)}function Ss(e,i){if(i){var u=e.firstChild;if(u&&u===e.lastChild&&u.nodeType===3){u.nodeValue=i;return}}e.textContent=i}var Ro=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 fu(e,i,u){var f=i.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?f?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="":f?e.setProperty(i,u):typeof u!="number"||u===0||Ro.has(i)?i==="float"?e.cssFloat=u:e[i]=(""+u).trim():e[i]=u+"px"}function of(e,i,u){if(i!=null&&typeof i!="object")throw Error(l(62));if(e=e.style,u!=null){for(var f in u)!u.hasOwnProperty(f)||i!=null&&i.hasOwnProperty(f)||(f.indexOf("--")===0?e.setProperty(f,""):f==="float"?e.cssFloat="":e[f]="");for(var y in i)f=i[y],i.hasOwnProperty(y)&&u[y]!==f&&fu(e,y,f)}else for(var x in i)i.hasOwnProperty(x)&&fu(e,x,i[x])}function hu(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 Cd=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"]]),Ad=/^[\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 du(e){return Ad.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ei(){}var mu=null;function zo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bs=null,wl=null;function cf(e){var i=De(e);if(i&&(e=i.stateNode)){var u=e[zn]||null;t:switch(e=i.stateNode,i.type){case"input":if(Ao(e,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),i=u.name,u.type==="radio"&&i!=null){for(u=e;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+ga(""+i)+'"][type="radio"]'),i=0;i<u.length;i++){var f=u[i];if(f!==e&&f.form===e.form){var y=f[zn]||null;if(!y)throw Error(l(90));Ao(f,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(i=0;i<u.length;i++)f=u[i],f.form===e.form&&sf(f)}break t;case"textarea":uf(e,u.value,u.defaultValue);break t;case"select":i=u.value,i!=null&&fr(e,!!u.multiple,i,!1)}}}var Do=!1;function ff(e,i,u){if(Do)return e(i,u);Do=!0;try{var f=e(i);return f}finally{if(Do=!1,(bs!==null||wl!==null)&&(N(),bs&&(i=bs,e=wl,wl=bs=null,cf(i),e)))for(i=0;i<e.length;i++)cf(e[i])}}function Ts(e,i){var u=e.stateNode;if(u===null)return null;var f=u[zn]||null;if(f===null)return null;u=f[i];t:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(e=e.type,f=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!f;break t;default:e=!1}if(e)return null;if(u&&typeof u!="function")throw Error(l(231,i,typeof u));return u}var Ci=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Oo=!1;if(Ci)try{var pu={};Object.defineProperty(pu,"passive",{get:function(){Oo=!0}}),window.addEventListener("test",pu,pu),window.removeEventListener("test",pu,pu)}catch{Oo=!1}var Bl=null,No=null,Ul=null;function wo(){if(Ul)return Ul;var e,i=No,u=i.length,f,y="value"in Bl?Bl.value:Bl.textContent,x=y.length;for(e=0;e<u&&i[e]===y[e];e++);var A=u-e;for(f=1;f<=A&&i[u-f]===y[x-f];f++);return Ul=y.slice(e,1<f?1-f:void 0)}function Es(e){var i=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&i===13&&(e=13)):e=i,e===10&&(e=13),32<=e||e===13?e:0}function yu(){return!0}function hf(){return!1}function Dn(e){function i(u,f,y,x,A){this._reactName=u,this._targetInst=y,this.type=f,this.nativeEvent=x,this.target=A,this.currentTarget=null;for(var O in e)e.hasOwnProperty(O)&&(u=e[O],this[O]=u?u(x):x[O]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?yu:hf,this.isPropagationStopped=hf,this}return b(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=yu)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=yu)},persist:function(){},isPersistent:yu}),i}var Hl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gu=Dn(Hl),ii=b({},Hl,{view:0,detail:0}),Bo=Dn(ii),Uo,vu,hr,xu=b({},ii,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Su,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!==hr&&(hr&&e.type==="mousemove"?(Uo=e.screenX-hr.screenX,vu=e.screenY-hr.screenY):vu=Uo=0,hr=e),Uo)},movementY:function(e){return"movementY"in e?e.movementY:vu}}),Md=Dn(xu),Sn=b({},xu,{dataTransfer:0}),Rd=Dn(Sn),zd=b({},ii,{relatedTarget:0}),Ho=Dn(zd),Dd=b({},Hl,{animationName:0,elapsedTime:0,pseudoElement:0}),Od=Dn(Dd),_u=b({},Hl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),df=Dn(_u),Nd=b({},Hl,{data:0}),mf=Dn(Nd),wd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pf={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"},yf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Bd(e){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(e):(e=yf[e])?!!i[e]:!1}function Su(){return Bd}var gf=b({},ii,{key:function(e){if(e.key){var i=wd[e.key]||e.key;if(i!=="Unidentified")return i}return e.type==="keypress"?(e=Es(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?pf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Su,charCode:function(e){return e.type==="keypress"?Es(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Es(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),vf=Dn(gf),Ud=b({},xu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Go=Dn(Ud),Hd=b({},ii,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Su}),el=Dn(Hd),xf=b({},Hl,{propertyName:0,elapsedTime:0,pseudoElement:0}),qp=Dn(xf),Gd=b({},xu,{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}),Gl=Dn(Gd),nl=b({},Hl,{newState:0,oldState:0}),_f=Dn(nl),Sf=[9,13,27,32],Cs=Ci&&"CompositionEvent"in window,jl=null;Ci&&"documentMode"in document&&(jl=document.documentMode);var As=Ci&&"TextEvent"in window&&!jl,bn=Ci&&(!Cs||jl&&8<jl&&11>=jl),bu=" ",bf=!1;function jo(e,i){switch(e){case"keyup":return Sf.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dr(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yl=!1;function Yo(e,i){switch(e){case"compositionend":return dr(i);case"keypress":return i.which!==32?null:(bf=!0,bu);case"textInput":return e=i.data,e===bu&&bf?null:e;default:return null}}function jd(e,i){if(Yl)return e==="compositionend"||!Cs&&jo(e,i)?(e=wo(),Ul=No=Bl=null,Yl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return bn&&i.locale!=="ko"?null:i.data;default:return null}}var va={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 Tf(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i==="input"?!!va[e.type]:i==="textarea"}function qo(e,i,u,f){bs?wl?wl.push(f):wl=[f]:bs=f,i=zm(i,"onChange"),0<i.length&&(u=new gu("onChange","change",null,u,f),e.push({event:u,listeners:i}))}var mr=null,pr=null;function Ef(e){_g(e,0)}function yr(e){var i=Ii(e);if(sf(i))return e}function Cf(e,i){if(e==="change")return i}var Tu=!1;if(Ci){var Ms;if(Ci){var Oe="oninput"in document;if(!Oe){var Yd=document.createElement("div");Yd.setAttribute("oninput","return;"),Oe=typeof Yd.oninput=="function"}Ms=Oe}else Ms=!1;Tu=Ms&&(!document.documentMode||9<document.documentMode)}function qd(){mr&&(mr.detachEvent("onpropertychange",Af),pr=mr=null)}function Af(e){if(e.propertyName==="value"&&yr(pr)){var i=[];qo(i,pr,e,zo(e)),ff(Ef,i)}}function Eu(e,i,u){e==="focusin"?(qd(),mr=i,pr=u,mr.attachEvent("onpropertychange",Af)):e==="focusout"&&qd()}function ql(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yr(pr)}function Ld(e,i){if(e==="click")return yr(i)}function Xd(e,i){if(e==="input"||e==="change")return yr(i)}function Rs(e,i){return e===i&&(e!==0||1/e===1/i)||e!==e&&i!==i}var Ne=typeof Object.is=="function"?Object.is:Rs;function gr(e,i){if(Ne(e,i))return!0;if(typeof e!="object"||e===null||typeof i!="object"||i===null)return!1;var u=Object.keys(e),f=Object.keys(i);if(u.length!==f.length)return!1;for(f=0;f<u.length;f++){var y=u[f];if(!gs.call(i,y)||!Ne(e[y],i[y]))return!1}return!0}function Mf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rf(e,i){var u=Mf(e);e=0;for(var f;u;){if(u.nodeType===3){if(f=e+u.textContent.length,e<=i&&f>=i)return{node:u,offset:i-e};e=f}t:{for(;u;){if(u.nextSibling){u=u.nextSibling;break t}u=u.parentNode}u=void 0}u=Mf(u)}}function Lo(e,i){return e&&i?e===i?!0:e&&e.nodeType===3?!1:i&&i.nodeType===3?Lo(e,i.parentNode):"contains"in e?e.contains(i):e.compareDocumentPosition?!!(e.compareDocumentPosition(i)&16):!1:!1}function Xo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var i=cr(e.document);i instanceof e.HTMLIFrameElement;){try{var u=typeof i.contentWindow.location.href=="string"}catch{u=!1}if(u)e=i.contentWindow;else break;i=cr(e.document)}return i}function vr(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i&&(i==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||i==="textarea"||e.contentEditable==="true")}var Vd=Ci&&"documentMode"in document&&11>=document.documentMode,xr=null,Vo=null,_r=null,xa=!1;function Qo(e,i,u){var f=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;xa||xr==null||xr!==cr(f)||(f=xr,"selectionStart"in f&&vr(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),_r&&gr(_r,f)||(_r=f,f=zm(Vo,"onSelect"),0<f.length&&(i=new gu("onSelect","select",null,i,u),e.push({event:i,listeners:f}),i.target=xr)))}function Ll(e,i){var u={};return u[e.toLowerCase()]=i.toLowerCase(),u["Webkit"+e]="webkit"+i,u["Moz"+e]="moz"+i,u}var Sr={animationend:Ll("Animation","AnimationEnd"),animationiteration:Ll("Animation","AnimationIteration"),animationstart:Ll("Animation","AnimationStart"),transitionrun:Ll("Transition","TransitionRun"),transitionstart:Ll("Transition","TransitionStart"),transitioncancel:Ll("Transition","TransitionCancel"),transitionend:Ll("Transition","TransitionEnd")},Cu={},Xn={};Ci&&(Xn=document.createElement("div").style,"AnimationEvent"in window||(delete Sr.animationend.animation,delete Sr.animationiteration.animation,delete Sr.animationstart.animation),"TransitionEvent"in window||delete Sr.transitionend.transition);function Xl(e){if(Cu[e])return Cu[e];if(!Sr[e])return e;var i=Sr[e],u;for(u in i)if(i.hasOwnProperty(u)&&u in Xn)return Cu[e]=i[u];return e}var ea=Xl("animationend"),zf=Xl("animationiteration"),Ai=Xl("animationstart"),br=Xl("transitionrun"),Vl=Xl("transitionstart"),Df=Xl("transitioncancel"),ko=Xl("transitionend"),al=new Map,Ko="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(" ");Ko.push("scrollEnd");function On(e,i){al.set(e,i),tl(i,[e])}var Ql=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=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(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},yn=[],zs=0,Zo=0;function kl(){for(var e=zs,i=Zo=zs=0;i<e;){var u=yn[i];yn[i++]=null;var f=yn[i];yn[i++]=null;var y=yn[i];yn[i++]=null;var x=yn[i];if(yn[i++]=null,f!==null&&y!==null){var A=f.pending;A===null?y.next=y:(y.next=A.next,A.next=y),f.pending=y}x!==0&&Jo(u,y,x)}}function Au(e,i,u,f){yn[zs++]=e,yn[zs++]=i,yn[zs++]=u,yn[zs++]=f,Zo|=f,e.lanes|=f,e=e.alternate,e!==null&&(e.lanes|=f)}function Tr(e,i,u,f){return Au(e,i,u,f),Er(e)}function Kl(e,i){return Au(e,null,null,i),Er(e)}function Jo(e,i,u){e.lanes|=u;var f=e.alternate;f!==null&&(f.lanes|=u);for(var y=!1,x=e.return;x!==null;)x.childLanes|=u,f=x.alternate,f!==null&&(f.childLanes|=u),x.tag===22&&(e=x.stateNode,e===null||e._visibility&1||(y=!0)),e=x,x=x.return;return e.tag===3?(x=e.stateNode,y&&i!==null&&(y=31-Ln(u),e=x.hiddenUpdates,f=e[y],f===null?e[y]=[i]:f.push(i),i.lane=u|536870912),x):null}function Er(e){if(50<Ks)throw Ks=0,Zs=null,Error(l(185));for(var i=e.return;i!==null;)e=i,i=e.return;return e.tag===3?e.stateNode:null}var Zl={};function Qd(e,i,u,f){this.tag=e,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vn(e,i,u,f){return new Qd(e,i,u,f)}function Qn(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Mi(e,i){var u=e.alternate;return u===null?(u=Vn(e.tag,i,e.key,e.mode),u.elementType=e.elementType,u.type=e.type,u.stateNode=e.stateNode,u.alternate=e,e.alternate=u):(u.pendingProps=i,u.type=e.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=e.flags&65011712,u.childLanes=e.childLanes,u.lanes=e.lanes,u.child=e.child,u.memoizedProps=e.memoizedProps,u.memoizedState=e.memoizedState,u.updateQueue=e.updateQueue,i=e.dependencies,u.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},u.sibling=e.sibling,u.index=e.index,u.ref=e.ref,u.refCleanup=e.refCleanup,u}function Nn(e,i){e.flags&=65011714;var u=e.alternate;return u===null?(e.childLanes=0,e.lanes=i,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=u.childLanes,e.lanes=u.lanes,e.child=u.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=u.memoizedProps,e.memoizedState=u.memoizedState,e.updateQueue=u.updateQueue,e.type=u.type,i=u.dependencies,e.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),e}function Mu(e,i,u,f,y,x){var A=0;if(f=e,typeof e=="function")Qn(e)&&(A=1);else if(typeof e=="string")A=iS(e,u,vt.current)?26:e==="html"||e==="head"||e==="body"?27:5;else t:switch(e){case lt:return e=Vn(31,u,i,y),e.elementType=lt,e.lanes=x,e;case z:return il(u.children,y,x,i);case M:A=8,y|=24;break;case D:return e=Vn(12,u,i,y|2),e.elementType=D,e.lanes=x,e;case k:return e=Vn(13,u,i,y),e.elementType=k,e.lanes=x,e;case Q:return e=Vn(19,u,i,y),e.elementType=Q,e.lanes=x,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case B:A=10;break t;case w:A=9;break t;case U:A=11;break t;case V:A=14;break t;case ft:A=16,f=null;break t}A=29,u=Error(l(130,e===null?"null":typeof e,"")),f=null}return i=Vn(A,u,i,y),i.elementType=e,i.type=f,i.lanes=x,i}function il(e,i,u,f){return e=Vn(7,e,f,i),e.lanes=u,e}function Wo(e,i,u){return e=Vn(6,e,null,i),e.lanes=u,e}function kd(e){var i=Vn(18,null,null,0);return i.stateNode=e,i}function li(e,i,u){return i=Vn(4,e.children!==null?e.children:[],e.key,i),i.lanes=u,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},i}var Of=new WeakMap;function na(e,i){if(typeof e=="object"&&e!==null){var u=Of.get(e);return u!==void 0?u:(i={value:e,source:i,stack:eu(i)},Of.set(e,i),i)}return{value:e,source:i,stack:eu(i)}}var si=[],Ds=0,Ru=null,Cr=0,_a=[],aa=0,Ri=null,zi=1,Di="";function ll(e,i){si[Ds++]=Cr,si[Ds++]=Ru,Ru=e,Cr=i}function Nf(e,i,u){_a[aa++]=zi,_a[aa++]=Di,_a[aa++]=Ri,Ri=e;var f=zi;e=Di;var y=32-Ln(f)-1;f&=~(1<<y),u+=1;var x=32-Ln(i)+y;if(30<x){var A=y-y%5;x=(f&(1<<A)-1).toString(32),f>>=A,y-=A,zi=1<<32-Ln(i)+y|u<<y|f,Di=x+e}else zi=1<<x|u<<y|f,Di=e}function Po(e){e.return!==null&&(ll(e,1),Nf(e,1,0))}function Jl(e){for(;e===Ru;)Ru=si[--Ds],si[Ds]=null,Cr=si[--Ds],si[Ds]=null;for(;e===Ri;)Ri=_a[--aa],_a[aa]=null,Di=_a[--aa],_a[aa]=null,zi=_a[--aa],_a[aa]=null}function zu(e,i){_a[aa++]=zi,_a[aa++]=Di,_a[aa++]=Ri,zi=i.id,Di=i.overflow,Ri=e}var gn=null,Ce=null,te=!1,sl=null,vn=!1,Fo=Error(l(519));function It(e){var i=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Du(na(i,e)),Fo}function Io(e){var i=e.stateNode,u=e.type,f=e.memoizedProps;switch(i[Ft]=e,i[zn]=f,u){case"dialog":ee("cancel",i),ee("close",i);break;case"iframe":case"object":case"embed":ee("load",i);break;case"video":case"audio":for(u=0;u<Eh.length;u++)ee(Eh[u],i);break;case"source":ee("error",i);break;case"img":case"image":case"link":ee("error",i),ee("load",i);break;case"details":ee("toggle",i);break;case"input":ee("invalid",i),rf(i,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0);break;case"select":ee("invalid",i);break;case"textarea":ee("invalid",i),_s(i,f.value,f.defaultValue,f.children)}u=f.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||i.textContent===""+u||f.suppressHydrationWarning===!0||Eg(i.textContent,u)?(f.popover!=null&&(ee("beforetoggle",i),ee("toggle",i)),f.onScroll!=null&&ee("scroll",i),f.onScrollEnd!=null&&ee("scrollend",i),f.onClick!=null&&(i.onclick=Ei),i=!0):i=!1,i||It(e,!0)}function Kd(e){for(gn=e.return;gn;)switch(gn.tag){case 5:case 31:case 13:vn=!1;return;case 27:case 3:vn=!0;return;default:gn=gn.return}}function Os(e){if(e!==gn)return!1;if(!te)return Kd(e),te=!0,!1;var i=e.tag,u;if((u=i!==3&&i!==27)&&((u=i===5)&&(u=e.type,u=!(u!=="form"&&u!=="button")||s0(e.type,e.memoizedProps)),u=!u),u&&Ce&&It(e),Kd(e),i===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Ce=wg(e)}else if(i===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Ce=wg(e)}else i===27?(i=Ce,Qr(e.type)?(e=f0,f0=null,Ce=e):Ce=i):Ce=gn?Li(e.stateNode.nextSibling):null;return!0}function Ns(){Ce=gn=null,te=!1}function wf(){var e=sl;return e!==null&&(jn===null?jn=e:jn.push.apply(jn,e),sl=null),e}function Du(e){sl===null?sl=[e]:sl.push(e)}var Bf=j(null),rl=null,wn=null;function ul(e,i,u){ot(Bf,i._currentValue),i._currentValue=u}function Xa(e){e._currentValue=Bf.current,I(Bf)}function ol(e,i,u){for(;e!==null;){var f=e.alternate;if((e.childLanes&i)!==i?(e.childLanes|=i,f!==null&&(f.childLanes|=i)):f!==null&&(f.childLanes&i)!==i&&(f.childLanes|=i),e===u)break;e=e.return}}function $o(e,i,u,f){var y=e.child;for(y!==null&&(y.return=e);y!==null;){var x=y.dependencies;if(x!==null){var A=y.child;x=x.firstContext;t:for(;x!==null;){var O=x;x=y;for(var L=0;L<i.length;L++)if(O.context===i[L]){x.lanes|=u,O=x.alternate,O!==null&&(O.lanes|=u),ol(x.return,u,e),f||(A=null);break t}x=O.next}}else if(y.tag===18){if(A=y.return,A===null)throw Error(l(341));A.lanes|=u,x=A.alternate,x!==null&&(x.lanes|=u),ol(A,u,e),A=null}else A=y.child;if(A!==null)A.return=y;else for(A=y;A!==null;){if(A===e){A=null;break}if(y=A.sibling,y!==null){y.return=A.return,A=y;break}A=A.return}y=A}}function Wl(e,i,u,f){e=null;for(var y=i,x=!1;y!==null;){if(!x){if((y.flags&524288)!==0)x=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var A=y.alternate;if(A===null)throw Error(l(387));if(A=A.memoizedProps,A!==null){var O=y.type;Ne(y.pendingProps.value,A.value)||(e!==null?e.push(O):e=[O])}}else if(y===Bt.current){if(A=y.alternate,A===null)throw Error(l(387));A.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(e!==null?e.push(zh):e=[zh])}y=y.return}e!==null&&$o(i,e,u,f),i.flags|=262144}function Ar(e){for(e=e.firstContext;e!==null;){if(!Ne(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ws(e){rl=e,wn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xn(e){return Uf(rl,e)}function Ou(e,i){return rl===null&&ws(e),Uf(e,i)}function Uf(e,i){var u=i._currentValue;if(i={context:i,memoizedValue:u,next:null},wn===null){if(e===null)throw Error(l(308));wn=i,e.dependencies={lanes:0,firstContext:i},e.flags|=524288}else wn=wn.next=i;return u}var Zd=typeof AbortController<"u"?AbortController:function(){var e=[],i=this.signal={aborted:!1,addEventListener:function(u,f){e.push(f)}};this.abort=function(){i.aborted=!0,e.forEach(function(u){return u()})}},Jd=n.unstable_scheduleCallback,Hf=n.unstable_NormalPriority,Rt={$$typeof:B,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Gf(){return{controller:new Zd,data:new Map,refCount:0}}function Tn(e){e.refCount--,e.refCount===0&&Jd(Hf,function(){e.controller.abort()})}var Bs=null,jf=0,cl=0,ri=null;function Mr(e,i){if(Bs===null){var u=Bs=[];jf=0,cl=Fp(),ri={status:"pending",value:void 0,then:function(f){u.push(f)}}}return jf++,i.then(Yf,Yf),i}function Yf(){if(--jf===0&&Bs!==null){ri!==null&&(ri.status="fulfilled");var e=Bs;Bs=null,cl=0,ri=null;for(var i=0;i<e.length;i++)(0,e[i])()}}function qf(e,i){var u=[],f={status:"pending",value:null,reason:null,then:function(y){u.push(y)}};return e.then(function(){f.status="fulfilled",f.value=i;for(var y=0;y<u.length;y++)(0,u[y])(i)},function(y){for(f.status="rejected",f.reason=y,y=0;y<u.length;y++)(0,u[y])(void 0)}),f}var Wd=H.S;H.S=function(e,i){Lr=ta(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&Mr(e,i),Wd!==null&&Wd(e,i)};var Pl=j(null);function Oi(){var e=Pl.current;return e!==null?e:pe.pooledCache}function Rr(e,i){i===null?ot(Pl,Pl.current):ot(Pl,i.pool)}function tc(){var e=Oi();return e===null?null:{parent:Rt._currentValue,pool:e}}var Fl=Error(l(460)),Nu=Error(l(474)),ui=Error(l(542)),wu={then:function(){}};function Pd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Lf(e,i,u){switch(u=e[u],u===void 0?e.push(i):u!==i&&(i.then(Ei,Ei),i=u),i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,Xf(e),e;default:if(typeof i.status=="string")i.then(Ei,Ei);else{if(e=pe,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=i,e.status="pending",e.then(function(f){if(i.status==="pending"){var y=i;y.status="fulfilled",y.value=f}},function(f){if(i.status==="pending"){var y=i;y.status="rejected",y.reason=f}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,Xf(e),e}throw Nt=i,Fl}}function Us(e){try{var i=e._init;return i(e._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Nt=u,Fl):u}}var Nt=null;function ec(){if(Nt===null)throw Error(l(459));var e=Nt;return Nt=null,e}function Xf(e){if(e===Fl||e===ui)throw Error(l(483))}var Il=null,$l=0;function nc(e){var i=$l;return $l+=1,Il===null&&(Il=[]),Lf(Il,e,i)}function Bu(e,i){i=i.props.ref,e.ref=i!==void 0?i:null}function Uu(e,i){throw i.$$typeof===E?Error(l(525)):(e=Object.prototype.toString.call(i),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e)))}function zr(e){function i(J,K){if(e){var P=J.deletions;P===null?(J.deletions=[K],J.flags|=16):P.push(K)}}function u(J,K){if(!e)return null;for(;K!==null;)i(J,K),K=K.sibling;return null}function f(J){for(var K=new Map;J!==null;)J.key!==null?K.set(J.key,J):K.set(J.index,J),J=J.sibling;return K}function y(J,K){return J=Mi(J,K),J.index=0,J.sibling=null,J}function x(J,K,P){return J.index=P,e?(P=J.alternate,P!==null?(P=P.index,P<K?(J.flags|=67108866,K):P):(J.flags|=67108866,K)):(J.flags|=1048576,K)}function A(J){return e&&J.alternate===null&&(J.flags|=67108866),J}function O(J,K,P,ht){return K===null||K.tag!==6?(K=Wo(P,J.mode,ht),K.return=J,K):(K=y(K,P),K.return=J,K)}function L(J,K,P,ht){var Dt=P.type;return Dt===z?rt(J,K,P.props.children,ht,P.key):K!==null&&(K.elementType===Dt||typeof Dt=="object"&&Dt!==null&&Dt.$$typeof===ft&&Us(Dt)===K.type)?(K=y(K,P.props),Bu(K,P),K.return=J,K):(K=Mu(P.type,P.key,P.props,null,J.mode,ht),Bu(K,P),K.return=J,K)}function F(J,K,P,ht){return K===null||K.tag!==4||K.stateNode.containerInfo!==P.containerInfo||K.stateNode.implementation!==P.implementation?(K=li(P,J.mode,ht),K.return=J,K):(K=y(K,P.children||[]),K.return=J,K)}function rt(J,K,P,ht,Dt){return K===null||K.tag!==7?(K=il(P,J.mode,ht,Dt),K.return=J,K):(K=y(K,P),K.return=J,K)}function dt(J,K,P){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return K=Wo(""+K,J.mode,P),K.return=J,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case C:return P=Mu(K.type,K.key,K.props,null,J.mode,P),Bu(P,K),P.return=J,P;case R:return K=li(K,J.mode,P),K.return=J,K;case ft:return K=Us(K),dt(J,K,P)}if(Ct(K)||pt(K))return K=il(K,J.mode,P,null),K.return=J,K;if(typeof K.then=="function")return dt(J,nc(K),P);if(K.$$typeof===B)return dt(J,Ou(J,K),P);Uu(J,K)}return null}function tt(J,K,P,ht){var Dt=K!==null?K.key:null;if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return Dt!==null?null:O(J,K,""+P,ht);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case C:return P.key===Dt?L(J,K,P,ht):null;case R:return P.key===Dt?F(J,K,P,ht):null;case ft:return P=Us(P),tt(J,K,P,ht)}if(Ct(P)||pt(P))return Dt!==null?null:rt(J,K,P,ht,null);if(typeof P.then=="function")return tt(J,K,nc(P),ht);if(P.$$typeof===B)return tt(J,K,Ou(J,P),ht);Uu(J,P)}return null}function it(J,K,P,ht,Dt){if(typeof ht=="string"&&ht!==""||typeof ht=="number"||typeof ht=="bigint")return J=J.get(P)||null,O(K,J,""+ht,Dt);if(typeof ht=="object"&&ht!==null){switch(ht.$$typeof){case C:return J=J.get(ht.key===null?P:ht.key)||null,L(K,J,ht,Dt);case R:return J=J.get(ht.key===null?P:ht.key)||null,F(K,J,ht,Dt);case ft:return ht=Us(ht),it(J,K,P,ht,Dt)}if(Ct(ht)||pt(ht))return J=J.get(P)||null,rt(K,J,ht,Dt,null);if(typeof ht.then=="function")return it(J,K,P,nc(ht),Dt);if(ht.$$typeof===B)return it(J,K,P,Ou(K,ht),Dt);Uu(K,ht)}return null}function Et(J,K,P,ht){for(var Dt=null,ge=null,At=K,Zt=K=0,ie=null;At!==null&&Zt<P.length;Zt++){At.index>Zt?(ie=At,At=null):ie=At.sibling;var ve=tt(J,At,P[Zt],ht);if(ve===null){At===null&&(At=ie);break}e&&At&&ve.alternate===null&&i(J,At),K=x(ve,K,Zt),ge===null?Dt=ve:ge.sibling=ve,ge=ve,At=ie}if(Zt===P.length)return u(J,At),te&&ll(J,Zt),Dt;if(At===null){for(;Zt<P.length;Zt++)At=dt(J,P[Zt],ht),At!==null&&(K=x(At,K,Zt),ge===null?Dt=At:ge.sibling=At,ge=At);return te&&ll(J,Zt),Dt}for(At=f(At);Zt<P.length;Zt++)ie=it(At,J,Zt,P[Zt],ht),ie!==null&&(e&&ie.alternate!==null&&At.delete(ie.key===null?Zt:ie.key),K=x(ie,K,Zt),ge===null?Dt=ie:ge.sibling=ie,ge=ie);return e&&At.forEach(function(Wr){return i(J,Wr)}),te&&ll(J,Zt),Dt}function Ut(J,K,P,ht){if(P==null)throw Error(l(151));for(var Dt=null,ge=null,At=K,Zt=K=0,ie=null,ve=P.next();At!==null&&!ve.done;Zt++,ve=P.next()){At.index>Zt?(ie=At,At=null):ie=At.sibling;var Wr=tt(J,At,ve.value,ht);if(Wr===null){At===null&&(At=ie);break}e&&At&&Wr.alternate===null&&i(J,At),K=x(Wr,K,Zt),ge===null?Dt=Wr:ge.sibling=Wr,ge=Wr,At=ie}if(ve.done)return u(J,At),te&&ll(J,Zt),Dt;if(At===null){for(;!ve.done;Zt++,ve=P.next())ve=dt(J,ve.value,ht),ve!==null&&(K=x(ve,K,Zt),ge===null?Dt=ve:ge.sibling=ve,ge=ve);return te&&ll(J,Zt),Dt}for(At=f(At);!ve.done;Zt++,ve=P.next())ve=it(At,J,Zt,ve.value,ht),ve!==null&&(e&&ve.alternate!==null&&At.delete(ve.key===null?Zt:ve.key),K=x(ve,K,Zt),ge===null?Dt=ve:ge.sibling=ve,ge=ve);return e&&At.forEach(function(pS){return i(J,pS)}),te&&ll(J,Zt),Dt}function Re(J,K,P,ht){if(typeof P=="object"&&P!==null&&P.type===z&&P.key===null&&(P=P.props.children),typeof P=="object"&&P!==null){switch(P.$$typeof){case C:t:{for(var Dt=P.key;K!==null;){if(K.key===Dt){if(Dt=P.type,Dt===z){if(K.tag===7){u(J,K.sibling),ht=y(K,P.props.children),ht.return=J,J=ht;break t}}else if(K.elementType===Dt||typeof Dt=="object"&&Dt!==null&&Dt.$$typeof===ft&&Us(Dt)===K.type){u(J,K.sibling),ht=y(K,P.props),Bu(ht,P),ht.return=J,J=ht;break t}u(J,K);break}else i(J,K);K=K.sibling}P.type===z?(ht=il(P.props.children,J.mode,ht,P.key),ht.return=J,J=ht):(ht=Mu(P.type,P.key,P.props,null,J.mode,ht),Bu(ht,P),ht.return=J,J=ht)}return A(J);case R:t:{for(Dt=P.key;K!==null;){if(K.key===Dt)if(K.tag===4&&K.stateNode.containerInfo===P.containerInfo&&K.stateNode.implementation===P.implementation){u(J,K.sibling),ht=y(K,P.children||[]),ht.return=J,J=ht;break t}else{u(J,K);break}else i(J,K);K=K.sibling}ht=li(P,J.mode,ht),ht.return=J,J=ht}return A(J);case ft:return P=Us(P),Re(J,K,P,ht)}if(Ct(P))return Et(J,K,P,ht);if(pt(P)){if(Dt=pt(P),typeof Dt!="function")throw Error(l(150));return P=Dt.call(P),Ut(J,K,P,ht)}if(typeof P.then=="function")return Re(J,K,nc(P),ht);if(P.$$typeof===B)return Re(J,K,Ou(J,P),ht);Uu(J,P)}return typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint"?(P=""+P,K!==null&&K.tag===6?(u(J,K.sibling),ht=y(K,P),ht.return=J,J=ht):(u(J,K),ht=Wo(P,J.mode,ht),ht.return=J,J=ht),A(J)):u(J,K)}return function(J,K,P,ht){try{$l=0;var Dt=Re(J,K,P,ht);return Il=null,Dt}catch(At){if(At===Fl||At===ui)throw At;var ge=Vn(29,At,null,J.mode);return ge.lanes=ht,ge.return=J,ge}finally{}}}var Hs=zr(!0),Fd=zr(!1),ts=!1;function Vf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qf(e,i){e=e.updateQueue,i.updateQueue===e&&(i.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ni(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function fl(e,i,u){var f=e.updateQueue;if(f===null)return null;if(f=f.shared,(ne&2)!==0){var y=f.pending;return y===null?i.next=i:(i.next=y.next,y.next=i),f.pending=i,i=Er(e),Jo(e,null,u),i}return Au(e,f,i,u),Er(e)}function es(e,i,u){if(i=i.updateQueue,i!==null&&(i=i.shared,(u&4194048)!==0)){var f=i.lanes;f&=e.pendingLanes,u|=f,i.lanes=u,_o(e,u)}}function ac(e,i){var u=e.updateQueue,f=e.alternate;if(f!==null&&(f=f.updateQueue,u===f)){var y=null,x=null;if(u=u.firstBaseUpdate,u!==null){do{var A={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};x===null?y=x=A:x=x.next=A,u=u.next}while(u!==null);x===null?y=x=i:x=x.next=i}else y=x=i;u={baseState:f.baseState,firstBaseUpdate:y,lastBaseUpdate:x,shared:f.shared,callbacks:f.callbacks},e.updateQueue=u;return}e=u.lastBaseUpdate,e===null?u.firstBaseUpdate=i:e.next=i,u.lastBaseUpdate=i}var kf=!1;function Hu(){if(kf){var e=ri;if(e!==null)throw e}}function Gs(e,i,u,f){kf=!1;var y=e.updateQueue;ts=!1;var x=y.firstBaseUpdate,A=y.lastBaseUpdate,O=y.shared.pending;if(O!==null){y.shared.pending=null;var L=O,F=L.next;L.next=null,A===null?x=F:A.next=F,A=L;var rt=e.alternate;rt!==null&&(rt=rt.updateQueue,O=rt.lastBaseUpdate,O!==A&&(O===null?rt.firstBaseUpdate=F:O.next=F,rt.lastBaseUpdate=L))}if(x!==null){var dt=y.baseState;A=0,rt=F=L=null,O=x;do{var tt=O.lane&-536870913,it=tt!==O.lane;if(it?($t&tt)===tt:(f&tt)===tt){tt!==0&&tt===cl&&(kf=!0),rt!==null&&(rt=rt.next={lane:0,tag:O.tag,payload:O.payload,callback:null,next:null});t:{var Et=e,Ut=O;tt=i;var Re=u;switch(Ut.tag){case 1:if(Et=Ut.payload,typeof Et=="function"){dt=Et.call(Re,dt,tt);break t}dt=Et;break t;case 3:Et.flags=Et.flags&-65537|128;case 0:if(Et=Ut.payload,tt=typeof Et=="function"?Et.call(Re,dt,tt):Et,tt==null)break t;dt=b({},dt,tt);break t;case 2:ts=!0}}tt=O.callback,tt!==null&&(e.flags|=64,it&&(e.flags|=8192),it=y.callbacks,it===null?y.callbacks=[tt]:it.push(tt))}else it={lane:tt,tag:O.tag,payload:O.payload,callback:O.callback,next:null},rt===null?(F=rt=it,L=dt):rt=rt.next=it,A|=tt;if(O=O.next,O===null){if(O=y.shared.pending,O===null)break;it=O,O=it.next,it.next=null,y.lastBaseUpdate=it,y.shared.pending=null}}while(!0);rt===null&&(L=dt),y.baseState=L,y.firstBaseUpdate=F,y.lastBaseUpdate=rt,x===null&&(y.shared.lanes=0),Oa|=A,e.lanes=A,e.memoizedState=dt}}function wi(e,i){if(typeof e!="function")throw Error(l(191,e));e.call(i)}function En(e,i){var u=e.callbacks;if(u!==null)for(e.callbacks=null,e=0;e<u.length;e++)wi(u[e],i)}var Sa=j(null),kn=j(0);function Kf(e,i){e=We,ot(kn,e),ot(Sa,i),We=e|i.baseLanes}function Zf(){ot(kn,We),ot(Sa,Sa.current)}function Bn(){We=kn.current,I(Sa),I(kn)}var fn=j(null),Va=null;function ns(e){var i=e.alternate;ot(je,je.current&1),ot(fn,e),Va===null&&(i===null||Sa.current!==null||i.memoizedState!==null)&&(Va=e)}function Jf(e){ot(je,je.current),ot(fn,e),Va===null&&(Va=e)}function Id(e){e.tag===22?(ot(je,je.current),ot(fn,e),Va===null&&(Va=e)):hl()}function hl(){ot(je,je.current),ot(fn,fn.current)}function ba(e){I(fn),Va===e&&(Va=null),I(je)}var je=j(0);function ic(e){for(var i=e;i!==null;){if(i.tag===13){var u=i.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||o0(u)||c0(u)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var ia=0,Ht=null,Se=null,en=null,lc=!1,Bi=!1,js=!1,sc=0,Gu=0,Ui=null,Lp=0;function Ye(){throw Error(l(321))}function Wf(e,i){if(i===null)return!1;for(var u=0;u<i.length&&u<e.length;u++)if(!Ne(e[u],i[u]))return!1;return!0}function Pf(e,i,u,f,y,x){return ia=x,Ht=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,H.H=e===null||e.memoizedState===null?vm:Nr,js=!1,x=u(f,y),js=!1,Bi&&(x=tm(i,u,f,y)),$d(e),x}function $d(e){H.H=Xu;var i=Se!==null&&Se.next!==null;if(ia=0,en=Se=Ht=null,lc=!1,Gu=0,Ui=null,i)throw Error(l(300));e===null||we||(e=e.dependencies,e!==null&&Ar(e)&&(we=!0))}function tm(e,i,u,f){Ht=e;var y=0;do{if(Bi&&(Ui=null),Gu=0,Bi=!1,25<=y)throw Error(l(301));if(y+=1,en=Se=null,e.updateQueue!=null){var x=e.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}H.H=Vu,x=i(u,f)}while(Bi);return x}function Xp(){var e=H.H,i=e.useState()[0];return i=typeof i.then=="function"?Yu(i):i,e=e.useState()[0],(Se!==null?Se.memoizedState:null)!==e&&(Ht.flags|=1024),i}function Ff(){var e=sc!==0;return sc=0,e}function If(e,i,u){i.updateQueue=e.updateQueue,i.flags&=-2053,e.lanes&=~u}function $f(e){if(lc){for(e=e.memoizedState;e!==null;){var i=e.queue;i!==null&&(i.pending=null),e=e.next}lc=!1}ia=0,en=Se=Ht=null,Bi=!1,Gu=sc=0,Ui=null}function Kn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return en===null?Ht.memoizedState=en=e:en=en.next=e,en}function ke(){if(Se===null){var e=Ht.alternate;e=e!==null?e.memoizedState:null}else e=Se.next;var i=en===null?Ht.memoizedState:en.next;if(i!==null)en=i,Se=e;else{if(e===null)throw Ht.alternate===null?Error(l(467)):Error(l(310));Se=e,e={memoizedState:Se.memoizedState,baseState:Se.baseState,baseQueue:Se.baseQueue,queue:Se.queue,next:null},en===null?Ht.memoizedState=en=e:en=en.next=e}return en}function ju(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Yu(e){var i=Gu;return Gu+=1,Ui===null&&(Ui=[]),e=Lf(Ui,e,i),i=Ht,(en===null?i.memoizedState:en.next)===null&&(i=i.alternate,H.H=i===null||i.memoizedState===null?vm:Nr),e}function rc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Yu(e);if(e.$$typeof===B)return xn(e)}throw Error(l(438,String(e)))}function th(e){var i=null,u=Ht.updateQueue;if(u!==null&&(i=u.memoCache),i==null){var f=Ht.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(i={data:f.data.map(function(y){return y.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),u===null&&(u=ju(),Ht.updateQueue=u),u.memoCache=i,u=i.data[i.index],u===void 0)for(u=i.data[i.index]=Array(e),f=0;f<e;f++)u[f]=st;return i.index++,u}function dl(e,i){return typeof i=="function"?i(e):i}function uc(e){var i=ke();return eh(i,Se,e)}function eh(e,i,u){var f=e.queue;if(f===null)throw Error(l(311));f.lastRenderedReducer=u;var y=e.baseQueue,x=f.pending;if(x!==null){if(y!==null){var A=y.next;y.next=x.next,x.next=A}i.baseQueue=y=x,f.pending=null}if(x=e.baseState,y===null)e.memoizedState=x;else{i=y.next;var O=A=null,L=null,F=i,rt=!1;do{var dt=F.lane&-536870913;if(dt!==F.lane?($t&dt)===dt:(ia&dt)===dt){var tt=F.revertLane;if(tt===0)L!==null&&(L=L.next={lane:0,revertLane:0,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),dt===cl&&(rt=!0);else if((ia&tt)===tt){F=F.next,tt===cl&&(rt=!0);continue}else dt={lane:0,revertLane:F.revertLane,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},L===null?(O=L=dt,A=x):L=L.next=dt,Ht.lanes|=tt,Oa|=tt;dt=F.action,js&&u(x,dt),x=F.hasEagerState?F.eagerState:u(x,dt)}else tt={lane:dt,revertLane:F.revertLane,gesture:F.gesture,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},L===null?(O=L=tt,A=x):L=L.next=tt,Ht.lanes|=dt,Oa|=dt;F=F.next}while(F!==null&&F!==i);if(L===null?A=x:L.next=O,!Ne(x,e.memoizedState)&&(we=!0,rt&&(u=ri,u!==null)))throw u;e.memoizedState=x,e.baseState=A,e.baseQueue=L,f.lastRenderedState=x}return y===null&&(f.lanes=0),[e.memoizedState,f.dispatch]}function oc(e){var i=ke(),u=i.queue;if(u===null)throw Error(l(311));u.lastRenderedReducer=e;var f=u.dispatch,y=u.pending,x=i.memoizedState;if(y!==null){u.pending=null;var A=y=y.next;do x=e(x,A.action),A=A.next;while(A!==y);Ne(x,i.memoizedState)||(we=!0),i.memoizedState=x,i.baseQueue===null&&(i.baseState=x),u.lastRenderedState=x}return[x,f]}function nh(e,i,u){var f=Ht,y=ke(),x=te;if(x){if(u===void 0)throw Error(l(407));u=u()}else u=i();var A=!Ne((Se||y).memoizedState,u);if(A&&(y.memoizedState=u,we=!0),y=y.queue,rh(ih.bind(null,f,y,e),[e]),y.getSnapshot!==i||A||en!==null&&en.memoizedState.tag&1){if(f.flags|=2048,Dr(9,{destroy:void 0},ah.bind(null,f,y,u,i),null),pe===null)throw Error(l(349));x||(ia&127)!==0||em(f,i,u)}return u}function em(e,i,u){e.flags|=16384,e={getSnapshot:i,value:u},i=Ht.updateQueue,i===null?(i=ju(),Ht.updateQueue=i,i.stores=[e]):(u=i.stores,u===null?i.stores=[e]:u.push(e))}function ah(e,i,u,f){i.value=u,i.getSnapshot=f,lh(i)&&cc(e)}function ih(e,i,u){return u(function(){lh(i)&&cc(e)})}function lh(e){var i=e.getSnapshot;e=e.value;try{var u=i();return!Ne(e,u)}catch{return!0}}function cc(e){var i=Kl(e,2);i!==null&&r(i,e,2)}function qu(e){var i=Kn();if(typeof e=="function"){var u=e;if(e=u(),js){La(!0);try{u()}finally{La(!1)}}}return i.memoizedState=i.baseState=e,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:dl,lastRenderedState:e},i}function nm(e,i,u,f){return e.baseState=u,eh(e,Se,typeof f=="function"?f:dl)}function Vp(e,i,u,f,y){if(ml(e))throw Error(l(485));if(e=i.action,e!==null){var x={payload:y,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(A){x.listeners.push(A)}};H.T!==null?u(!0):x.isTransition=!1,f(x),u=i.pending,u===null?(x.next=i.pending=x,am(i,x)):(x.next=u.next,i.pending=u.next=x)}}function am(e,i){var u=i.action,f=i.payload,y=e.state;if(i.isTransition){var x=H.T,A={};H.T=A;try{var O=u(y,f),L=H.S;L!==null&&L(A,O),im(e,i,O)}catch(F){fc(e,i,F)}finally{x!==null&&A.types!==null&&(x.types=A.types),H.T=x}}else try{x=u(y,f),im(e,i,x)}catch(F){fc(e,i,F)}}function im(e,i,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(f){sh(e,i,f)},function(f){return fc(e,i,f)}):sh(e,i,u)}function sh(e,i,u){i.status="fulfilled",i.value=u,lm(i),e.state=u,i=e.pending,i!==null&&(u=i.next,u===i?e.pending=null:(u=u.next,i.next=u,am(e,u)))}function fc(e,i,u){var f=e.pending;if(e.pending=null,f!==null){f=f.next;do i.status="rejected",i.reason=u,lm(i),i=i.next;while(i!==f)}e.action=null}function lm(e){e=e.listeners;for(var i=0;i<e.length;i++)(0,e[i])()}function sm(e,i){return i}function rm(e,i){if(te){var u=pe.formState;if(u!==null){t:{var f=Ht;if(te){if(Ce){e:{for(var y=Ce,x=vn;y.nodeType!==8;){if(!x){y=null;break e}if(y=Li(y.nextSibling),y===null){y=null;break e}}x=y.data,y=x==="F!"||x==="F"?y:null}if(y){Ce=Li(y.nextSibling),f=y.data==="F!";break t}}It(f)}f=!1}f&&(i=u[0])}}return u=Kn(),u.memoizedState=u.baseState=i,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sm,lastRenderedState:i},u.queue=f,u=gm.bind(null,Ht,f),f.dispatch=u,f=qu(!1),x=Lu.bind(null,Ht,!1,f.queue),f=Kn(),y={state:i,dispatch:null,action:e,pending:null},f.queue=y,u=Vp.bind(null,Ht,y,x,u),y.dispatch=u,f.memoizedState=e,[i,u,!1]}function um(e){var i=ke();return om(i,Se,e)}function om(e,i,u){if(i=eh(e,i,sm)[0],e=uc(dl)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var f=Yu(i)}catch(A){throw A===Fl?ui:A}else f=i;i=ke();var y=i.queue,x=y.dispatch;return u!==i.memoizedState&&(Ht.flags|=2048,Dr(9,{destroy:void 0},Qp.bind(null,y,u),null)),[f,x,e]}function Qp(e,i){e.action=i}function cm(e){var i=ke(),u=Se;if(u!==null)return om(i,u,e);ke(),i=i.memoizedState,u=ke();var f=u.queue.dispatch;return u.memoizedState=e,[i,f,!1]}function Dr(e,i,u,f){return e={tag:e,create:u,deps:f,inst:i,next:null},i=Ht.updateQueue,i===null&&(i=ju(),Ht.updateQueue=i),u=i.lastEffect,u===null?i.lastEffect=e.next=e:(f=u.next,u.next=e,e.next=f,i.lastEffect=e),e}function fm(){return ke().memoizedState}function hc(e,i,u,f){var y=Kn();Ht.flags|=e,y.memoizedState=Dr(1|i,{destroy:void 0},u,f===void 0?null:f)}function dc(e,i,u,f){var y=ke();f=f===void 0?null:f;var x=y.memoizedState.inst;Se!==null&&f!==null&&Wf(f,Se.memoizedState.deps)?y.memoizedState=Dr(i,x,u,f):(Ht.flags|=e,y.memoizedState=Dr(1|i,x,u,f))}function hm(e,i){hc(8390656,8,e,i)}function rh(e,i){dc(2048,8,e,i)}function dm(e){Ht.flags|=4;var i=Ht.updateQueue;if(i===null)i=ju(),Ht.updateQueue=i,i.events=[e];else{var u=i.events;u===null?i.events=[e]:u.push(e)}}function mm(e){var i=ke().memoizedState;return dm({ref:i,nextImpl:e}),function(){if((ne&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}function pm(e,i){return dc(4,2,e,i)}function Ta(e,i){return dc(4,4,e,i)}function uh(e,i){if(typeof i=="function"){e=e();var u=i(e);return function(){typeof u=="function"?u():i(null)}}if(i!=null)return e=e(),i.current=e,function(){i.current=null}}function mc(e,i,u){u=u!=null?u.concat([e]):null,dc(4,4,uh.bind(null,i,e),u)}function pc(){}function oh(e,i){var u=ke();i=i===void 0?null:i;var f=u.memoizedState;return i!==null&&Wf(i,f[1])?f[0]:(u.memoizedState=[e,i],e)}function ch(e,i){var u=ke();i=i===void 0?null:i;var f=u.memoizedState;if(i!==null&&Wf(i,f[1]))return f[0];if(f=e(),js){La(!0);try{e()}finally{La(!1)}}return u.memoizedState=[f,i],f}function fh(e,i,u){return u===void 0||(ia&1073741824)!==0&&($t&261930)===0?e.memoizedState=i:(e.memoizedState=u,e=s(),Ht.lanes|=e,Oa|=e,u)}function hh(e,i,u,f){return Ne(u,i)?u:Sa.current!==null?(e=fh(e,u,f),Ne(e,i)||(we=!0),e):(ia&42)===0||(ia&1073741824)!==0&&($t&261930)===0?(we=!0,e.memoizedState=u):(e=s(),Ht.lanes|=e,Oa|=e,i)}function dh(e,i,u,f,y){var x=G.p;G.p=x!==0&&8>x?x:8;var A=H.T,O={};H.T=O,Lu(e,!1,i,u);try{var L=y(),F=H.S;if(F!==null&&F(O,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var rt=qf(L,f);Or(e,i,rt,Jn(e))}else Or(e,i,f,Jn(e))}catch(dt){Or(e,i,{then:function(){},status:"rejected",reason:dt},Jn())}finally{G.p=x,A!==null&&O.types!==null&&(A.types=O.types),H.T=A}}function kp(){}function mh(e,i,u,f){if(e.tag!==5)throw Error(l(476));var y=ym(e).queue;dh(e,y,i,at,u===null?kp:function(){return ph(e),u(f)})}function ym(e){var i=e.memoizedState;if(i!==null)return i;i={memoizedState:at,baseState:at,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:dl,lastRenderedState:at},next:null};var u={};return i.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:dl,lastRenderedState:u},next:null},e.memoizedState=i,e=e.alternate,e!==null&&(e.memoizedState=i),i}function ph(e){var i=ym(e);i.next===null&&(i=e.alternate.memoizedState),Or(e,i.next.queue,{},Jn())}function yh(){return xn(zh)}function Cn(){return ke().memoizedState}function gh(){return ke().memoizedState}function Kp(e){for(var i=e.return;i!==null;){switch(i.tag){case 24:case 3:var u=Jn();e=Ni(u);var f=fl(i,e,u);f!==null&&(r(f,i,u),es(f,i,u)),i={cache:Gf()},e.payload=i;return}i=i.return}}function Zp(e,i,u){var f=Jn();u={lane:f,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},ml(e)?Ys(i,u):(u=Tr(e,i,u,f),u!==null&&(r(u,e,f),la(u,i,f)))}function gm(e,i,u){var f=Jn();Or(e,i,u,f)}function Or(e,i,u,f){var y={lane:f,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(ml(e))Ys(i,y);else{var x=e.alternate;if(e.lanes===0&&(x===null||x.lanes===0)&&(x=i.lastRenderedReducer,x!==null))try{var A=i.lastRenderedState,O=x(A,u);if(y.hasEagerState=!0,y.eagerState=O,Ne(O,A))return Au(e,i,y,0),pe===null&&kl(),!1}catch{}finally{}if(u=Tr(e,i,y,f),u!==null)return r(u,e,f),la(u,i,f),!0}return!1}function Lu(e,i,u,f){if(f={lane:2,revertLane:Fp(),gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},ml(e)){if(i)throw Error(l(479))}else i=Tr(e,u,f,2),i!==null&&r(i,e,2)}function ml(e){var i=e.alternate;return e===Ht||i!==null&&i===Ht}function Ys(e,i){Bi=lc=!0;var u=e.pending;u===null?i.next=i:(i.next=u.next,u.next=i),e.pending=i}function la(e,i,u){if((u&4194048)!==0){var f=i.lanes;f&=e.pendingLanes,u|=f,i.lanes=u,_o(e,u)}}var Xu={readContext:xn,use:rc,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useLayoutEffect:Ye,useInsertionEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useSyncExternalStore:Ye,useId:Ye,useHostTransitionStatus:Ye,useFormState:Ye,useActionState:Ye,useOptimistic:Ye,useMemoCache:Ye,useCacheRefresh:Ye};Xu.useEffectEvent=Ye;var vm={readContext:xn,use:rc,useCallback:function(e,i){return Kn().memoizedState=[e,i===void 0?null:i],e},useContext:xn,useEffect:hm,useImperativeHandle:function(e,i,u){u=u!=null?u.concat([e]):null,hc(4194308,4,uh.bind(null,i,e),u)},useLayoutEffect:function(e,i){return hc(4194308,4,e,i)},useInsertionEffect:function(e,i){hc(4,2,e,i)},useMemo:function(e,i){var u=Kn();i=i===void 0?null:i;var f=e();if(js){La(!0);try{e()}finally{La(!1)}}return u.memoizedState=[f,i],f},useReducer:function(e,i,u){var f=Kn();if(u!==void 0){var y=u(i);if(js){La(!0);try{u(i)}finally{La(!1)}}}else y=i;return f.memoizedState=f.baseState=y,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:y},f.queue=e,e=e.dispatch=Zp.bind(null,Ht,e),[f.memoizedState,e]},useRef:function(e){var i=Kn();return e={current:e},i.memoizedState=e},useState:function(e){e=qu(e);var i=e.queue,u=gm.bind(null,Ht,i);return i.dispatch=u,[e.memoizedState,u]},useDebugValue:pc,useDeferredValue:function(e,i){var u=Kn();return fh(u,e,i)},useTransition:function(){var e=qu(!1);return e=dh.bind(null,Ht,e.queue,!0,!1),Kn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,i,u){var f=Ht,y=Kn();if(te){if(u===void 0)throw Error(l(407));u=u()}else{if(u=i(),pe===null)throw Error(l(349));($t&127)!==0||em(f,i,u)}y.memoizedState=u;var x={value:u,getSnapshot:i};return y.queue=x,hm(ih.bind(null,f,x,e),[e]),f.flags|=2048,Dr(9,{destroy:void 0},ah.bind(null,f,x,u,i),null),u},useId:function(){var e=Kn(),i=pe.identifierPrefix;if(te){var u=Di,f=zi;u=(f&~(1<<32-Ln(f)-1)).toString(32)+u,i="_"+i+"R_"+u,u=sc++,0<u&&(i+="H"+u.toString(32)),i+="_"}else u=Lp++,i="_"+i+"r_"+u.toString(32)+"_";return e.memoizedState=i},useHostTransitionStatus:yh,useFormState:rm,useActionState:rm,useOptimistic:function(e){var i=Kn();i.memoizedState=i.baseState=e;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=u,i=Lu.bind(null,Ht,!0,u),u.dispatch=i,[e,i]},useMemoCache:th,useCacheRefresh:function(){return Kn().memoizedState=Kp.bind(null,Ht)},useEffectEvent:function(e){var i=Kn(),u={impl:e};return i.memoizedState=u,function(){if((ne&2)!==0)throw Error(l(440));return u.impl.apply(void 0,arguments)}}},Nr={readContext:xn,use:rc,useCallback:oh,useContext:xn,useEffect:rh,useImperativeHandle:mc,useInsertionEffect:pm,useLayoutEffect:Ta,useMemo:ch,useReducer:uc,useRef:fm,useState:function(){return uc(dl)},useDebugValue:pc,useDeferredValue:function(e,i){var u=ke();return hh(u,Se.memoizedState,e,i)},useTransition:function(){var e=uc(dl)[0],i=ke().memoizedState;return[typeof e=="boolean"?e:Yu(e),i]},useSyncExternalStore:nh,useId:Cn,useHostTransitionStatus:yh,useFormState:um,useActionState:um,useOptimistic:function(e,i){var u=ke();return nm(u,Se,e,i)},useMemoCache:th,useCacheRefresh:gh};Nr.useEffectEvent=mm;var Vu={readContext:xn,use:rc,useCallback:oh,useContext:xn,useEffect:rh,useImperativeHandle:mc,useInsertionEffect:pm,useLayoutEffect:Ta,useMemo:ch,useReducer:oc,useRef:fm,useState:function(){return oc(dl)},useDebugValue:pc,useDeferredValue:function(e,i){var u=ke();return Se===null?fh(u,e,i):hh(u,Se.memoizedState,e,i)},useTransition:function(){var e=oc(dl)[0],i=ke().memoizedState;return[typeof e=="boolean"?e:Yu(e),i]},useSyncExternalStore:nh,useId:Cn,useHostTransitionStatus:yh,useFormState:cm,useActionState:cm,useOptimistic:function(e,i){var u=ke();return Se!==null?nm(u,Se,e,i):(u.baseState=e,[e,u.queue.dispatch])},useMemoCache:th,useCacheRefresh:gh};Vu.useEffectEvent=mm;function wr(e,i,u,f){i=e.memoizedState,u=u(f,i),u=u==null?i:b({},i,u),e.memoizedState=u,e.lanes===0&&(e.updateQueue.baseState=u)}var Qu={enqueueSetState:function(e,i,u){e=e._reactInternals;var f=Jn(),y=Ni(f);y.payload=i,u!=null&&(y.callback=u),i=fl(e,y,f),i!==null&&(r(i,e,f),es(i,e,f))},enqueueReplaceState:function(e,i,u){e=e._reactInternals;var f=Jn(),y=Ni(f);y.tag=1,y.payload=i,u!=null&&(y.callback=u),i=fl(e,y,f),i!==null&&(r(i,e,f),es(i,e,f))},enqueueForceUpdate:function(e,i){e=e._reactInternals;var u=Jn(),f=Ni(u);f.tag=2,i!=null&&(f.callback=i),i=fl(e,f,u),i!==null&&(r(i,e,u),es(i,e,u))}};function xm(e,i,u,f,y,x,A){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(f,x,A):i.prototype&&i.prototype.isPureReactComponent?!gr(u,f)||!gr(y,x):!0}function _m(e,i,u,f){e=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(u,f),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(u,f),i.state!==e&&Qu.enqueueReplaceState(i,i.state,null)}function An(e,i){var u=i;if("ref"in i){u={};for(var f in i)f!=="ref"&&(u[f]=i[f])}if(e=e.defaultProps){u===i&&(u=b({},u));for(var y in e)u[y]===void 0&&(u[y]=e[y])}return u}function vh(e){Ql(e)}function Sm(e){console.error(e)}function yc(e){Ql(e)}function gc(e,i){try{var u=e.onUncaughtError;u(i.value,{componentStack:i.stack})}catch(f){setTimeout(function(){throw f})}}function bm(e,i,u){try{var f=e.onCaughtError;f(u.value,{componentStack:u.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function xh(e,i,u){return u=Ni(u),u.tag=3,u.payload={element:null},u.callback=function(){gc(e,i)},u}function Br(e){return e=Ni(e),e.tag=3,e}function sa(e,i,u,f){var y=u.type.getDerivedStateFromError;if(typeof y=="function"){var x=f.value;e.payload=function(){return y(x)},e.callback=function(){bm(i,u,f)}}var A=u.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(e.callback=function(){bm(i,u,f),typeof y!="function"&&(qi===null?qi=new Set([this]):qi.add(this));var O=f.stack;this.componentDidCatch(f.value,{componentStack:O!==null?O:""})})}function Ea(e,i,u,f,y){if(u.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(i=u.alternate,i!==null&&Wl(i,u,y,!0),u=fn.current,u!==null){switch(u.tag){case 31:case 13:return Va===null?qt():u.alternate===null&&ye===0&&(ye=3),u.flags&=-257,u.flags|=65536,u.lanes=y,f===wu?u.flags|=16384:(i=u.updateQueue,i===null?u.updateQueue=new Set([f]):i.add(f),Jp(e,f,y)),!1;case 22:return u.flags|=65536,f===wu?u.flags|=16384:(i=u.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([f])},u.updateQueue=i):(u=i.retryQueue,u===null?i.retryQueue=new Set([f]):u.add(f)),Jp(e,f,y)),!1}throw Error(l(435,u.tag))}return Jp(e,f,y),qt(),!1}if(te)return i=fn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=y,f!==Fo&&(e=Error(l(422),{cause:f}),Du(na(e,u)))):(f!==Fo&&(i=Error(l(423),{cause:f}),Du(na(i,u))),e=e.current.alternate,e.flags|=65536,y&=-y,e.lanes|=y,f=na(f,u),y=xh(e.stateNode,f,y),ac(e,y),ye!==4&&(ye=2)),!1;var x=Error(l(520),{cause:f});if(x=na(x,u),di===null?di=[x]:di.push(x),ye!==4&&(ye=2),i===null)return!0;f=na(f,u),u=i;do{switch(u.tag){case 3:return u.flags|=65536,e=y&-y,u.lanes|=e,e=xh(u.stateNode,f,e),ac(u,e),!1;case 1:if(i=u.type,x=u.stateNode,(u.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(qi===null||!qi.has(x))))return u.flags|=65536,y&=-y,u.lanes|=y,y=Br(y),sa(y,e,u,f),ac(u,y),!1}u=u.return}while(u!==null);return!1}var vc=Error(l(461)),we=!1;function qe(e,i,u,f){i.child=e===null?Fd(i,null,u,f):Hs(i,e.child,u,f)}function ku(e,i,u,f,y){u=u.render;var x=i.ref;if("ref"in f){var A={};for(var O in f)O!=="ref"&&(A[O]=f[O])}else A=f;return ws(i),f=Pf(e,i,u,A,x,y),O=Ff(),e!==null&&!we?(If(e,i,y),fi(e,i,y)):(te&&O&&Po(i),i.flags|=1,qe(e,i,f,y),i.child)}function Ku(e,i,u,f,y){if(e===null){var x=u.type;return typeof x=="function"&&!Qn(x)&&x.defaultProps===void 0&&u.compare===null?(i.tag=15,i.type=x,Ca(e,i,x,f,y)):(e=Mu(u.type,null,f,i,i.mode,y),e.ref=i.ref,e.return=i,i.child=e)}if(x=e.child,!is(e,y)){var A=x.memoizedProps;if(u=u.compare,u=u!==null?u:gr,u(A,f)&&e.ref===i.ref)return fi(e,i,y)}return i.flags|=1,e=Mi(x,f),e.ref=i.ref,e.return=i,i.child=e}function Ca(e,i,u,f,y){if(e!==null){var x=e.memoizedProps;if(gr(x,f)&&e.ref===i.ref)if(we=!1,i.pendingProps=f=x,is(e,y))(e.flags&131072)!==0&&(we=!0);else return i.lanes=e.lanes,fi(e,i,y)}return Ur(e,i,u,f,y)}function Aa(e,i,u,f){var y=f.children,x=e!==null?e.memoizedState:null;if(e===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),f.mode==="hidden"){if((i.flags&128)!==0){if(x=x!==null?x.baseLanes|u:u,e!==null){for(f=i.child=e.child,y=0;f!==null;)y=y|f.lanes|f.childLanes,f=f.sibling;f=y&~x}else f=0,i.child=null;return Hi(e,i,x,u,f)}if((u&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},e!==null&&Rr(i,x!==null?x.cachePool:null),x!==null?Kf(i,x):Zf(),Id(i);else return f=i.lanes=536870912,Hi(e,i,x!==null?x.baseLanes|u:u,u,f)}else x!==null?(Rr(i,x.cachePool),Kf(i,x),hl(),i.memoizedState=null):(e!==null&&Rr(i,null),Zf(),hl());return qe(e,i,y,u),i.child}function oi(e,i){return e!==null&&e.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Hi(e,i,u,f,y){var x=Oi();return x=x===null?null:{parent:Rt._currentValue,pool:x},i.memoizedState={baseLanes:u,cachePool:x},e!==null&&Rr(i,null),Zf(),Id(i),e!==null&&Wl(e,i,f,!0),i.childLanes=y,null}function Qa(e,i){return i=Hr({mode:i.mode,children:i.children},e.mode),i.ref=e.ref,e.child=i,i.return=e,i}function _n(e,i,u){return Hs(i,e.child,null,u),e=Qa(i,i.pendingProps),e.flags|=2,ba(i),i.memoizedState=null,e}function Zu(e,i,u){var f=i.pendingProps,y=(i.flags&128)!==0;if(i.flags&=-129,e===null){if(te){if(f.mode==="hidden")return e=Qa(i,f),i.lanes=536870912,oi(null,e);if(Jf(i),(e=Ce)?(e=Ng(e,vn),e=e!==null&&e.data==="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:Ri!==null?{id:zi,overflow:Di}:null,retryLane:536870912,hydrationErrors:null},u=kd(e),u.return=i,i.child=u,gn=i,Ce=null)):e=null,e===null)throw It(i);return i.lanes=536870912,null}return Qa(i,f)}var x=e.memoizedState;if(x!==null){var A=x.dehydrated;if(Jf(i),y)if(i.flags&256)i.flags&=-257,i=_n(e,i,u);else if(i.memoizedState!==null)i.child=e.child,i.flags|=128,i=null;else throw Error(l(558));else if(we||Wl(e,i,u,!1),y=(u&e.childLanes)!==0,we||y){if(f=pe,f!==null&&(A=So(f,u),A!==0&&A!==x.retryLane))throw x.retryLane=A,Kl(e,A),r(f,e,A),vc;qt(),i=_n(e,i,u)}else e=x.treeContext,Ce=Li(A.nextSibling),gn=i,te=!0,sl=null,vn=!1,e!==null&&zu(i,e),i=Qa(i,f),i.flags|=4096;return i}return e=Mi(e.child,{mode:f.mode,children:f.children}),e.ref=i.ref,i.child=e,e.return=i,e}function ci(e,i){var u=i.ref;if(u===null)e!==null&&e.ref!==null&&(i.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(l(284));(e===null||e.ref!==u)&&(i.flags|=4194816)}}function Ur(e,i,u,f,y){return ws(i),u=Pf(e,i,u,f,void 0,y),f=Ff(),e!==null&&!we?(If(e,i,y),fi(e,i,y)):(te&&f&&Po(i),i.flags|=1,qe(e,i,u,y),i.child)}function Un(e,i,u,f,y,x){return ws(i),i.updateQueue=null,u=tm(i,f,u,y),$d(e),f=Ff(),e!==null&&!we?(If(e,i,x),fi(e,i,x)):(te&&f&&Po(i),i.flags|=1,qe(e,i,u,x),i.child)}function Mn(e,i,u,f,y){if(ws(i),i.stateNode===null){var x=Zl,A=u.contextType;typeof A=="object"&&A!==null&&(x=xn(A)),x=new u(f,x),i.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=Qu,i.stateNode=x,x._reactInternals=i,x=i.stateNode,x.props=f,x.state=i.memoizedState,x.refs={},Vf(i),A=u.contextType,x.context=typeof A=="object"&&A!==null?xn(A):Zl,x.state=i.memoizedState,A=u.getDerivedStateFromProps,typeof A=="function"&&(wr(i,u,A,f),x.state=i.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(A=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),A!==x.state&&Qu.enqueueReplaceState(x,x.state,null),Gs(i,f,x,y),Hu(),x.state=i.memoizedState),typeof x.componentDidMount=="function"&&(i.flags|=4194308),f=!0}else if(e===null){x=i.stateNode;var O=i.memoizedProps,L=An(u,O);x.props=L;var F=x.context,rt=u.contextType;A=Zl,typeof rt=="object"&&rt!==null&&(A=xn(rt));var dt=u.getDerivedStateFromProps;rt=typeof dt=="function"||typeof x.getSnapshotBeforeUpdate=="function",O=i.pendingProps!==O,rt||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(O||F!==A)&&_m(i,x,f,A),ts=!1;var tt=i.memoizedState;x.state=tt,Gs(i,f,x,y),Hu(),F=i.memoizedState,O||tt!==F||ts?(typeof dt=="function"&&(wr(i,u,dt,f),F=i.memoizedState),(L=ts||xm(i,u,L,f,tt,F,A))?(rt||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(i.flags|=4194308)):(typeof x.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=f,i.memoizedState=F),x.props=f,x.state=F,x.context=A,f=L):(typeof x.componentDidMount=="function"&&(i.flags|=4194308),f=!1)}else{x=i.stateNode,Qf(e,i),A=i.memoizedProps,rt=An(u,A),x.props=rt,dt=i.pendingProps,tt=x.context,F=u.contextType,L=Zl,typeof F=="object"&&F!==null&&(L=xn(F)),O=u.getDerivedStateFromProps,(F=typeof O=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(A!==dt||tt!==L)&&_m(i,x,f,L),ts=!1,tt=i.memoizedState,x.state=tt,Gs(i,f,x,y),Hu();var it=i.memoizedState;A!==dt||tt!==it||ts||e!==null&&e.dependencies!==null&&Ar(e.dependencies)?(typeof O=="function"&&(wr(i,u,O,f),it=i.memoizedState),(rt=ts||xm(i,u,rt,f,tt,it,L)||e!==null&&e.dependencies!==null&&Ar(e.dependencies))?(F||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(f,it,L),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(f,it,L)),typeof x.componentDidUpdate=="function"&&(i.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof x.componentDidUpdate!="function"||A===e.memoizedProps&&tt===e.memoizedState||(i.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||A===e.memoizedProps&&tt===e.memoizedState||(i.flags|=1024),i.memoizedProps=f,i.memoizedState=it),x.props=f,x.state=it,x.context=L,f=rt):(typeof x.componentDidUpdate!="function"||A===e.memoizedProps&&tt===e.memoizedState||(i.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||A===e.memoizedProps&&tt===e.memoizedState||(i.flags|=1024),f=!1)}return x=f,ci(e,i),f=(i.flags&128)!==0,x||f?(x=i.stateNode,u=f&&typeof u.getDerivedStateFromError!="function"?null:x.render(),i.flags|=1,e!==null&&f?(i.child=Hs(i,e.child,null,y),i.child=Hs(i,null,u,y)):qe(e,i,u,y),i.memoizedState=x.state,e=i.child):e=fi(e,i,y),e}function se(e,i,u,f){return Ns(),i.flags|=256,qe(e,i,u,f),i.child}var Ma={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ka(e){return{baseLanes:e,cachePool:tc()}}function Ju(e,i,u){return e=e!==null?e.childLanes&~u:0,i&&(e|=ae),e}function Ra(e,i,u){var f=i.pendingProps,y=!1,x=(i.flags&128)!==0,A;if((A=x)||(A=e!==null&&e.memoizedState===null?!1:(je.current&2)!==0),A&&(y=!0,i.flags&=-129),A=(i.flags&32)!==0,i.flags&=-33,e===null){if(te){if(y?ns(i):hl(),(e=Ce)?(e=Ng(e,vn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:Ri!==null?{id:zi,overflow:Di}:null,retryLane:536870912,hydrationErrors:null},u=kd(e),u.return=i,i.child=u,gn=i,Ce=null)):e=null,e===null)throw It(i);return c0(e)?i.lanes=32:i.lanes=536870912,null}var O=f.children;return f=f.fallback,y?(hl(),y=i.mode,O=Hr({mode:"hidden",children:O},y),f=il(f,y,u,null),O.return=i,f.return=i,O.sibling=f,i.child=O,f=i.child,f.memoizedState=ka(u),f.childLanes=Ju(e,A,u),i.memoizedState=Ma,oi(null,f)):(ns(i),as(i,O))}var L=e.memoizedState;if(L!==null&&(O=L.dehydrated,O!==null)){if(x)i.flags&256?(ns(i),i.flags&=-257,i=Gr(e,i,u)):i.memoizedState!==null?(hl(),i.child=e.child,i.flags|=128,i=null):(hl(),O=f.fallback,y=i.mode,f=Hr({mode:"visible",children:f.children},y),O=il(O,y,u,null),O.flags|=2,f.return=i,O.return=i,f.sibling=O,i.child=f,Hs(i,e.child,null,u),f=i.child,f.memoizedState=ka(u),f.childLanes=Ju(e,A,u),i.memoizedState=Ma,i=oi(null,f));else if(ns(i),c0(O)){if(A=O.nextSibling&&O.nextSibling.dataset,A)var F=A.dgst;A=F,f=Error(l(419)),f.stack="",f.digest=A,Du({value:f,source:null,stack:null}),i=Gr(e,i,u)}else if(we||Wl(e,i,u,!1),A=(u&e.childLanes)!==0,we||A){if(A=pe,A!==null&&(f=So(A,u),f!==0&&f!==L.retryLane))throw L.retryLane=f,Kl(e,f),r(A,e,f),vc;o0(O)||qt(),i=Gr(e,i,u)}else o0(O)?(i.flags|=192,i.child=e.child,i=null):(e=L.treeContext,Ce=Li(O.nextSibling),gn=i,te=!0,sl=null,vn=!1,e!==null&&zu(i,e),i=as(i,f.children),i.flags|=4096);return i}return y?(hl(),O=f.fallback,y=i.mode,L=e.child,F=L.sibling,f=Mi(L,{mode:"hidden",children:f.children}),f.subtreeFlags=L.subtreeFlags&65011712,F!==null?O=Mi(F,O):(O=il(O,y,u,null),O.flags|=2),O.return=i,f.return=i,f.sibling=O,i.child=f,oi(null,f),f=i.child,O=e.child.memoizedState,O===null?O=ka(u):(y=O.cachePool,y!==null?(L=Rt._currentValue,y=y.parent!==L?{parent:L,pool:L}:y):y=tc(),O={baseLanes:O.baseLanes|u,cachePool:y}),f.memoizedState=O,f.childLanes=Ju(e,A,u),i.memoizedState=Ma,oi(e.child,f)):(ns(i),u=e.child,e=u.sibling,u=Mi(u,{mode:"visible",children:f.children}),u.return=i,u.sibling=null,e!==null&&(A=i.deletions,A===null?(i.deletions=[e],i.flags|=16):A.push(e)),i.child=u,i.memoizedState=null,u)}function as(e,i){return i=Hr({mode:"visible",children:i},e.mode),i.return=e,e.child=i}function Hr(e,i){return e=Vn(22,e,null,i),e.lanes=0,e}function Gr(e,i,u){return Hs(i,e.child,null,u),e=as(i,i.pendingProps.children),e.flags|=2,i.memoizedState=null,e}function qs(e,i,u){e.lanes|=i;var f=e.alternate;f!==null&&(f.lanes|=i),ol(e.return,i,u)}function Wu(e,i,u,f,y,x){var A=e.memoizedState;A===null?e.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:f,tail:u,tailMode:y,treeForkCount:x}:(A.isBackwards=i,A.rendering=null,A.renderingStartTime=0,A.last=f,A.tail=u,A.tailMode=y,A.treeForkCount=x)}function Pu(e,i,u){var f=i.pendingProps,y=f.revealOrder,x=f.tail;f=f.children;var A=je.current,O=(A&2)!==0;if(O?(A=A&1|2,i.flags|=128):A&=1,ot(je,A),qe(e,i,f,u),f=te?Cr:0,!O&&e!==null&&(e.flags&128)!==0)t:for(e=i.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&qs(e,u,i);else if(e.tag===19)qs(e,u,i);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===i)break t;for(;e.sibling===null;){if(e.return===null||e.return===i)break t;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(y){case"forwards":for(u=i.child,y=null;u!==null;)e=u.alternate,e!==null&&ic(e)===null&&(y=u),u=u.sibling;u=y,u===null?(y=i.child,i.child=null):(y=u.sibling,u.sibling=null),Wu(i,!1,y,u,x,f);break;case"backwards":case"unstable_legacy-backwards":for(u=null,y=i.child,i.child=null;y!==null;){if(e=y.alternate,e!==null&&ic(e)===null){i.child=y;break}e=y.sibling,y.sibling=u,u=y,y=e}Wu(i,!0,u,null,x,f);break;case"together":Wu(i,!1,null,null,void 0,f);break;default:i.memoizedState=null}return i.child}function fi(e,i,u){if(e!==null&&(i.dependencies=e.dependencies),Oa|=i.lanes,(u&i.childLanes)===0)if(e!==null){if(Wl(e,i,u,!1),(u&i.childLanes)===0)return null}else return null;if(e!==null&&i.child!==e.child)throw Error(l(153));if(i.child!==null){for(e=i.child,u=Mi(e,e.pendingProps),i.child=u,u.return=i;e.sibling!==null;)e=e.sibling,u=u.sibling=Mi(e,e.pendingProps),u.return=i;u.sibling=null}return i.child}function is(e,i){return(e.lanes&i)!==0?!0:(e=e.dependencies,!!(e!==null&&Ar(e)))}function Fu(e,i,u){switch(i.tag){case 3:fe(i,i.stateNode.containerInfo),ul(i,Rt,e.memoizedState.cache),Ns();break;case 27:case 5:pa(i);break;case 4:fe(i,i.stateNode.containerInfo);break;case 10:ul(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Jf(i),null;break;case 13:var f=i.memoizedState;if(f!==null)return f.dehydrated!==null?(ns(i),i.flags|=128,null):(u&i.child.childLanes)!==0?Ra(e,i,u):(ns(i),e=fi(e,i,u),e!==null?e.sibling:null);ns(i);break;case 19:var y=(e.flags&128)!==0;if(f=(u&i.childLanes)!==0,f||(Wl(e,i,u,!1),f=(u&i.childLanes)!==0),y){if(f)return Pu(e,i,u);i.flags|=128}if(y=i.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),ot(je,je.current),f)break;return null;case 22:return i.lanes=0,Aa(e,i,u,i.pendingProps);case 24:ul(i,Rt,e.memoizedState.cache)}return fi(e,i,u)}function xc(e,i,u){if(e!==null)if(e.memoizedProps!==i.pendingProps)we=!0;else{if(!is(e,u)&&(i.flags&128)===0)return we=!1,Fu(e,i,u);we=(e.flags&131072)!==0}else we=!1,te&&(i.flags&1048576)!==0&&Nf(i,Cr,i.index);switch(i.lanes=0,i.tag){case 16:t:{var f=i.pendingProps;if(e=Us(i.elementType),i.type=e,typeof e=="function")Qn(e)?(f=An(e,f),i.tag=1,i=Mn(null,i,e,f,u)):(i.tag=0,i=Ur(null,i,e,f,u));else{if(e!=null){var y=e.$$typeof;if(y===U){i.tag=11,i=ku(null,i,e,f,u);break t}else if(y===V){i.tag=14,i=Ku(null,i,e,f,u);break t}}throw i=xt(e)||e,Error(l(306,i,""))}}return i;case 0:return Ur(e,i,i.type,i.pendingProps,u);case 1:return f=i.type,y=An(f,i.pendingProps),Mn(e,i,f,y,u);case 3:t:{if(fe(i,i.stateNode.containerInfo),e===null)throw Error(l(387));f=i.pendingProps;var x=i.memoizedState;y=x.element,Qf(e,i),Gs(i,f,null,u);var A=i.memoizedState;if(f=A.cache,ul(i,Rt,f),f!==x.cache&&$o(i,[Rt],u,!0),Hu(),f=A.element,x.isDehydrated)if(x={element:f,isDehydrated:!1,cache:A.cache},i.updateQueue.baseState=x,i.memoizedState=x,i.flags&256){i=se(e,i,f,u);break t}else if(f!==y){y=na(Error(l(424)),i),Du(y),i=se(e,i,f,u);break t}else{switch(e=i.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ce=Li(e.firstChild),gn=i,te=!0,sl=null,vn=!0,u=Fd(i,null,f,u),i.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(Ns(),f===y){i=fi(e,i,u);break t}qe(e,i,f,u)}i=i.child}return i;case 26:return ci(e,i),e===null?(u=jg(i.type,null,i.pendingProps,null))?i.memoizedState=u:te||(u=i.type,e=i.pendingProps,f=Dm(Ot.current).createElement(u),f[Ft]=i,f[zn]=e,Wn(f,u,e),tn(f),i.stateNode=f):i.memoizedState=jg(i.type,e.memoizedProps,i.pendingProps,e.memoizedState),null;case 27:return pa(i),e===null&&te&&(f=i.stateNode=Ug(i.type,i.pendingProps,Ot.current),gn=i,vn=!0,y=Ce,Qr(i.type)?(f0=y,Ce=Li(f.firstChild)):Ce=y),qe(e,i,i.pendingProps.children,u),ci(e,i),e===null&&(i.flags|=4194304),i.child;case 5:return e===null&&te&&((y=f=Ce)&&(f=k2(f,i.type,i.pendingProps,vn),f!==null?(i.stateNode=f,gn=i,Ce=Li(f.firstChild),vn=!1,y=!0):y=!1),y||It(i)),pa(i),y=i.type,x=i.pendingProps,A=e!==null?e.memoizedProps:null,f=x.children,s0(y,x)?f=null:A!==null&&s0(y,A)&&(i.flags|=32),i.memoizedState!==null&&(y=Pf(e,i,Xp,null,null,u),zh._currentValue=y),ci(e,i),qe(e,i,f,u),i.child;case 6:return e===null&&te&&((e=u=Ce)&&(u=K2(u,i.pendingProps,vn),u!==null?(i.stateNode=u,gn=i,Ce=null,e=!0):e=!1),e||It(i)),null;case 13:return Ra(e,i,u);case 4:return fe(i,i.stateNode.containerInfo),f=i.pendingProps,e===null?i.child=Hs(i,null,f,u):qe(e,i,f,u),i.child;case 11:return ku(e,i,i.type,i.pendingProps,u);case 7:return qe(e,i,i.pendingProps,u),i.child;case 8:return qe(e,i,i.pendingProps.children,u),i.child;case 12:return qe(e,i,i.pendingProps.children,u),i.child;case 10:return f=i.pendingProps,ul(i,i.type,f.value),qe(e,i,f.children,u),i.child;case 9:return y=i.type._context,f=i.pendingProps.children,ws(i),y=xn(y),f=f(y),i.flags|=1,qe(e,i,f,u),i.child;case 14:return Ku(e,i,i.type,i.pendingProps,u);case 15:return Ca(e,i,i.type,i.pendingProps,u);case 19:return Pu(e,i,u);case 31:return Zu(e,i,u);case 22:return Aa(e,i,u,i.pendingProps);case 24:return ws(i),f=xn(Rt),e===null?(y=Oi(),y===null&&(y=pe,x=Gf(),y.pooledCache=x,x.refCount++,x!==null&&(y.pooledCacheLanes|=u),y=x),i.memoizedState={parent:f,cache:y},Vf(i),ul(i,Rt,y)):((e.lanes&u)!==0&&(Qf(e,i),Gs(i,null,null,u),Hu()),y=e.memoizedState,x=i.memoizedState,y.parent!==f?(y={parent:f,cache:f},i.memoizedState=y,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=y),ul(i,Rt,f)):(f=x.cache,ul(i,Rt,f),f!==y.cache&&$o(i,[Rt],u,!0))),qe(e,i,i.pendingProps.children,u),i.child;case 29:throw i.pendingProps}throw Error(l(156,i.tag))}function ra(e){e.flags|=4}function ls(e,i,u,f,y){if((i=(e.mode&32)!==0)&&(i=!1),i){if(e.flags|=16777216,(y&335544128)===y)if(e.stateNode.complete)e.flags|=8192;else if(_t())e.flags|=8192;else throw Nt=wu,Nu}else e.flags&=-16777217}function pl(e,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Vg(i))if(_t())e.flags|=8192;else throw Nt=wu,Nu}function jr(e,i){i!==null&&(e.flags|=4),e.flags&16384&&(i=e.tag!==22?rr():536870912,e.lanes|=i,Na|=i)}function Iu(e,i){if(!te)switch(e.tailMode){case"hidden":i=e.tail;for(var u=null;i!==null;)i.alternate!==null&&(u=i),i=i.sibling;u===null?e.tail=null:u.sibling=null;break;case"collapsed":u=e.tail;for(var f=null;u!==null;)u.alternate!==null&&(f=u),u=u.sibling;f===null?i||e.tail===null?e.tail=null:e.tail.sibling=null:f.sibling=null}}function xe(e){var i=e.alternate!==null&&e.alternate.child===e.child,u=0,f=0;if(i)for(var y=e.child;y!==null;)u|=y.lanes|y.childLanes,f|=y.subtreeFlags&65011712,f|=y.flags&65011712,y.return=e,y=y.sibling;else for(y=e.child;y!==null;)u|=y.lanes|y.childLanes,f|=y.subtreeFlags,f|=y.flags,y.return=e,y=y.sibling;return e.subtreeFlags|=f,e.childLanes=u,i}function _h(e,i,u){var f=i.pendingProps;switch(Jl(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xe(i),null;case 1:return xe(i),null;case 3:return u=i.stateNode,f=null,e!==null&&(f=e.memoizedState.cache),i.memoizedState.cache!==f&&(i.flags|=2048),Xa(Rt),ce(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(e===null||e.child===null)&&(Os(i)?ra(i):e===null||e.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,wf())),xe(i),null;case 26:var y=i.type,x=i.memoizedState;return e===null?(ra(i),x!==null?(xe(i),pl(i,x)):(xe(i),ls(i,y,null,f,u))):x?x!==e.memoizedState?(ra(i),xe(i),pl(i,x)):(xe(i),i.flags&=-16777217):(e=e.memoizedProps,e!==f&&ra(i),xe(i),ls(i,y,e,f,u)),null;case 27:if(ja(i),u=Ot.current,y=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==f&&ra(i);else{if(!f){if(i.stateNode===null)throw Error(l(166));return xe(i),null}e=vt.current,Os(i)?Io(i):(e=Ug(y,f,u),i.stateNode=e,ra(i))}return xe(i),null;case 5:if(ja(i),y=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==f&&ra(i);else{if(!f){if(i.stateNode===null)throw Error(l(166));return xe(i),null}if(x=vt.current,Os(i))Io(i);else{var A=Dm(Ot.current);switch(x){case 1:x=A.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:x=A.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":x=A.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":x=A.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":x=A.createElement("div"),x.innerHTML="<script><\/script>",x=x.removeChild(x.firstChild);break;case"select":x=typeof f.is=="string"?A.createElement("select",{is:f.is}):A.createElement("select"),f.multiple?x.multiple=!0:f.size&&(x.size=f.size);break;default:x=typeof f.is=="string"?A.createElement(y,{is:f.is}):A.createElement(y)}}x[Ft]=i,x[zn]=f;t:for(A=i.child;A!==null;){if(A.tag===5||A.tag===6)x.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===i)break t;for(;A.sibling===null;){if(A.return===null||A.return===i)break t;A=A.return}A.sibling.return=A.return,A=A.sibling}i.stateNode=x;t:switch(Wn(x,y,f),y){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break t;case"img":f=!0;break t;default:f=!1}f&&ra(i)}}return xe(i),ls(i,i.type,e===null?null:e.memoizedProps,i.pendingProps,u),null;case 6:if(e&&i.stateNode!=null)e.memoizedProps!==f&&ra(i);else{if(typeof f!="string"&&i.stateNode===null)throw Error(l(166));if(e=Ot.current,Os(i)){if(e=i.stateNode,u=i.memoizedProps,f=null,y=gn,y!==null)switch(y.tag){case 27:case 5:f=y.memoizedProps}e[Ft]=i,e=!!(e.nodeValue===u||f!==null&&f.suppressHydrationWarning===!0||Eg(e.nodeValue,u)),e||It(i,!0)}else e=Dm(e).createTextNode(f),e[Ft]=i,i.stateNode=e}return xe(i),null;case 31:if(u=i.memoizedState,e===null||e.memoizedState!==null){if(f=Os(i),u!==null){if(e===null){if(!f)throw Error(l(318));if(e=i.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[Ft]=i}else Ns(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;xe(i),e=!1}else u=wf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),e=!0;if(!e)return i.flags&256?(ba(i),i):(ba(i),null);if((i.flags&128)!==0)throw Error(l(558))}return xe(i),null;case 13:if(f=i.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(y=Os(i),f!==null&&f.dehydrated!==null){if(e===null){if(!y)throw Error(l(318));if(y=i.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(l(317));y[Ft]=i}else Ns(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;xe(i),y=!1}else y=wf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=y),y=!0;if(!y)return i.flags&256?(ba(i),i):(ba(i),null)}return ba(i),(i.flags&128)!==0?(i.lanes=u,i):(u=f!==null,e=e!==null&&e.memoizedState!==null,u&&(f=i.child,y=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(y=f.alternate.memoizedState.cachePool.pool),x=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(x=f.memoizedState.cachePool.pool),x!==y&&(f.flags|=2048)),u!==e&&u&&(i.child.flags|=8192),jr(i,i.updateQueue),xe(i),null);case 4:return ce(),e===null&&e0(i.stateNode.containerInfo),xe(i),null;case 10:return Xa(i.type),xe(i),null;case 19:if(I(je),f=i.memoizedState,f===null)return xe(i),null;if(y=(i.flags&128)!==0,x=f.rendering,x===null)if(y)Iu(f,!1);else{if(ye!==0||e!==null&&(e.flags&128)!==0)for(e=i.child;e!==null;){if(x=ic(e),x!==null){for(i.flags|=128,Iu(f,!1),e=x.updateQueue,i.updateQueue=e,jr(i,e),i.subtreeFlags=0,e=u,u=i.child;u!==null;)Nn(u,e),u=u.sibling;return ot(je,je.current&1|2),te&&ll(i,f.treeForkCount),i.child}e=e.sibling}f.tail!==null&&ta()>wa&&(i.flags|=128,y=!0,Iu(f,!1),i.lanes=4194304)}else{if(!y)if(e=ic(x),e!==null){if(i.flags|=128,y=!0,e=e.updateQueue,i.updateQueue=e,jr(i,e),Iu(f,!0),f.tail===null&&f.tailMode==="hidden"&&!x.alternate&&!te)return xe(i),null}else 2*ta()-f.renderingStartTime>wa&&u!==536870912&&(i.flags|=128,y=!0,Iu(f,!1),i.lanes=4194304);f.isBackwards?(x.sibling=i.child,i.child=x):(e=f.last,e!==null?e.sibling=x:i.child=x,f.last=x)}return f.tail!==null?(e=f.tail,f.rendering=e,f.tail=e.sibling,f.renderingStartTime=ta(),e.sibling=null,u=je.current,ot(je,y?u&1|2:u&1),te&&ll(i,f.treeForkCount),e):(xe(i),null);case 22:case 23:return ba(i),Bn(),f=i.memoizedState!==null,e!==null?e.memoizedState!==null!==f&&(i.flags|=8192):f&&(i.flags|=8192),f?(u&536870912)!==0&&(i.flags&128)===0&&(xe(i),i.subtreeFlags&6&&(i.flags|=8192)):xe(i),u=i.updateQueue,u!==null&&jr(i,u.retryQueue),u=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(u=e.memoizedState.cachePool.pool),f=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),f!==u&&(i.flags|=2048),e!==null&&I(Pl),null;case 24:return u=null,e!==null&&(u=e.memoizedState.cache),i.memoizedState.cache!==u&&(i.flags|=2048),Xa(Rt),xe(i),null;case 25:return null;case 30:return null}throw Error(l(156,i.tag))}function _c(e,i){switch(Jl(i),i.tag){case 1:return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 3:return Xa(Rt),ce(),e=i.flags,(e&65536)!==0&&(e&128)===0?(i.flags=e&-65537|128,i):null;case 26:case 27:case 5:return ja(i),null;case 31:if(i.memoizedState!==null){if(ba(i),i.alternate===null)throw Error(l(340));Ns()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 13:if(ba(i),e=i.memoizedState,e!==null&&e.dehydrated!==null){if(i.alternate===null)throw Error(l(340));Ns()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 19:return I(je),null;case 4:return ce(),null;case 10:return Xa(i.type),null;case 22:case 23:return ba(i),Bn(),e!==null&&I(Pl),e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 24:return Xa(Rt),null;case 25:return null;default:return null}}function Ls(e,i){switch(Jl(i),i.tag){case 3:Xa(Rt),ce();break;case 26:case 27:case 5:ja(i);break;case 4:ce();break;case 31:i.memoizedState!==null&&ba(i);break;case 13:ba(i);break;case 19:I(je);break;case 10:Xa(i.type);break;case 22:case 23:ba(i),Bn(),e!==null&&I(Pl);break;case 24:Xa(Rt)}}function Gi(e,i){try{var u=i.updateQueue,f=u!==null?u.lastEffect:null;if(f!==null){var y=f.next;u=y;do{if((u.tag&e)===e){f=void 0;var x=u.create,A=u.inst;f=x(),A.destroy=f}u=u.next}while(u!==y)}}catch(O){Ee(i,i.return,O)}}function Ka(e,i,u){try{var f=i.updateQueue,y=f!==null?f.lastEffect:null;if(y!==null){var x=y.next;f=x;do{if((f.tag&e)===e){var A=f.inst,O=A.destroy;if(O!==void 0){A.destroy=void 0,y=i;var L=u,F=O;try{F()}catch(rt){Ee(y,L,rt)}}}f=f.next}while(f!==x)}}catch(rt){Ee(i,i.return,rt)}}function ss(e){var i=e.updateQueue;if(i!==null){var u=e.stateNode;try{En(i,u)}catch(f){Ee(e,e.return,f)}}}function Sh(e,i,u){u.props=An(e.type,e.memoizedProps),u.state=e.memoizedState;try{u.componentWillUnmount()}catch(f){Ee(e,i,f)}}function ji(e,i){try{var u=e.ref;if(u!==null){switch(e.tag){case 26:case 27:case 5:var f=e.stateNode;break;case 30:f=e.stateNode;break;default:f=e.stateNode}typeof u=="function"?e.refCleanup=u(f):u.current=f}}catch(y){Ee(e,i,y)}}function za(e,i){var u=e.ref,f=e.refCleanup;if(u!==null)if(typeof f=="function")try{f()}catch(y){Ee(e,i,y)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(y){Ee(e,i,y)}else u.current=null}function Da(e){var i=e.type,u=e.memoizedProps,f=e.stateNode;try{t:switch(i){case"button":case"input":case"select":case"textarea":u.autoFocus&&f.focus();break t;case"img":u.src?f.src=u.src:u.srcSet&&(f.srcset=u.srcSet)}}catch(y){Ee(e,e.return,y)}}function Za(e,i,u){try{var f=e.stateNode;Y2(f,e.type,u,i),f[zn]=i}catch(y){Ee(e,e.return,y)}}function nn(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Qr(e.type)||e.tag===4}function Yi(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||nn(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&&Qr(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qt(e,i,u){var f=e.tag;if(f===5||f===6)e=e.stateNode,i?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(e,i):(i=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,i.appendChild(e),u=u._reactRootContainer,u!=null||i.onclick!==null||(i.onclick=Ei));else if(f!==4&&(f===27&&Qr(e.type)&&(u=e.stateNode,i=null),e=e.child,e!==null))for(Qt(e,i,u),e=e.sibling;e!==null;)Qt(e,i,u),e=e.sibling}function he(e,i,u){var f=e.tag;if(f===5||f===6)e=e.stateNode,i?u.insertBefore(e,i):u.appendChild(e);else if(f!==4&&(f===27&&Qr(e.type)&&(u=e.stateNode),e=e.child,e!==null))for(he(e,i,u),e=e.sibling;e!==null;)he(e,i,u),e=e.sibling}function Ke(e){var i=e.stateNode,u=e.memoizedProps;try{for(var f=e.type,y=i.attributes;y.length;)i.removeAttributeNode(y[0]);Wn(i,f,u),i[Ft]=e,i[zn]=u}catch(x){Ee(e,e.return,x)}}var Ja=!1,Be=!1,yl=!1,$u=typeof WeakSet=="function"?WeakSet:Set,Le=null;function Yr(e,i){if(e=e.containerInfo,i0=Gm,e=Xo(e),vr(e)){if("selectionStart"in e)var u={start:e.selectionStart,end:e.selectionEnd};else t:{u=(u=e.ownerDocument)&&u.defaultView||window;var f=u.getSelection&&u.getSelection();if(f&&f.rangeCount!==0){u=f.anchorNode;var y=f.anchorOffset,x=f.focusNode;f=f.focusOffset;try{u.nodeType,x.nodeType}catch{u=null;break t}var A=0,O=-1,L=-1,F=0,rt=0,dt=e,tt=null;e:for(;;){for(var it;dt!==u||y!==0&&dt.nodeType!==3||(O=A+y),dt!==x||f!==0&&dt.nodeType!==3||(L=A+f),dt.nodeType===3&&(A+=dt.nodeValue.length),(it=dt.firstChild)!==null;)tt=dt,dt=it;for(;;){if(dt===e)break e;if(tt===u&&++F===y&&(O=A),tt===x&&++rt===f&&(L=A),(it=dt.nextSibling)!==null)break;dt=tt,tt=dt.parentNode}dt=it}u=O===-1||L===-1?null:{start:O,end:L}}else u=null}u=u||{start:0,end:0}}else u=null;for(l0={focusedElem:e,selectionRange:u},Gm=!1,Le=i;Le!==null;)if(i=Le,e=i.child,(i.subtreeFlags&1028)!==0&&e!==null)e.return=i,Le=e;else for(;Le!==null;){switch(i=Le,x=i.alternate,e=i.flags,i.tag){case 0:if((e&4)!==0&&(e=i.updateQueue,e=e!==null?e.events:null,e!==null))for(u=0;u<e.length;u++)y=e[u],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&x!==null){e=void 0,u=i,y=x.memoizedProps,x=x.memoizedState,f=u.stateNode;try{var Et=An(u.type,y);e=f.getSnapshotBeforeUpdate(Et,x),f.__reactInternalSnapshotBeforeUpdate=e}catch(Ut){Ee(u,u.return,Ut)}}break;case 3:if((e&1024)!==0){if(e=i.stateNode.containerInfo,u=e.nodeType,u===9)u0(e);else if(u===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":u0(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(l(163))}if(e=i.sibling,e!==null){e.return=i.return,Le=e;break}Le=i.return}}function Tm(e,i,u){var f=u.flags;switch(u.tag){case 0:case 11:case 15:gl(e,u),f&4&&Gi(5,u);break;case 1:if(gl(e,u),f&4)if(e=u.stateNode,i===null)try{e.componentDidMount()}catch(A){Ee(u,u.return,A)}else{var y=An(u.type,i.memoizedProps);i=i.memoizedState;try{e.componentDidUpdate(y,i,e.__reactInternalSnapshotBeforeUpdate)}catch(A){Ee(u,u.return,A)}}f&64&&ss(u),f&512&&ji(u,u.return);break;case 3:if(gl(e,u),f&64&&(e=u.updateQueue,e!==null)){if(i=null,u.child!==null)switch(u.child.tag){case 27:case 5:i=u.child.stateNode;break;case 1:i=u.child.stateNode}try{En(e,i)}catch(A){Ee(u,u.return,A)}}break;case 27:i===null&&f&4&&Ke(u);case 26:case 5:gl(e,u),i===null&&f&4&&Da(u),f&512&&ji(u,u.return);break;case 12:gl(e,u);break;case 31:gl(e,u),f&4&&bc(e,u);break;case 13:gl(e,u),f&4&&bh(e,u),f&64&&(e=u.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(u=M2.bind(null,u),Z2(e,u))));break;case 22:if(f=u.memoizedState!==null||Ja,!f){i=i!==null&&i.memoizedState!==null||Be,y=Ja;var x=Be;Ja=f,(Be=i)&&!x?me(e,u,(u.subtreeFlags&8772)!==0):gl(e,u),Ja=y,Be=x}break;case 30:break;default:gl(e,u)}}function Sc(e){var i=e.alternate;i!==null&&(e.alternate=null,Sc(i)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(i=e.stateNode,i!==null&&ru(i)),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 re=null,an=!1;function Hn(e,i,u){for(u=u.child;u!==null;)rs(e,i,u),u=u.sibling}function rs(e,i,u){if($e&&typeof $e.onCommitFiberUnmount=="function")try{$e.onCommitFiberUnmount(qa,u)}catch{}switch(u.tag){case 26:Be||za(u,i),Hn(e,i,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Be||za(u,i);var f=re,y=an;Qr(u.type)&&(re=u.stateNode,an=!1),Hn(e,i,u),Ah(u.stateNode),re=f,an=y;break;case 5:Be||za(u,i);case 6:if(f=re,y=an,re=null,Hn(e,i,u),re=f,an=y,re!==null)if(an)try{(re.nodeType===9?re.body:re.nodeName==="HTML"?re.ownerDocument.body:re).removeChild(u.stateNode)}catch(x){Ee(u,i,x)}else try{re.removeChild(u.stateNode)}catch(x){Ee(u,i,x)}break;case 18:re!==null&&(an?(e=re,Dg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,u.stateNode),wc(e)):Dg(re,u.stateNode));break;case 4:f=re,y=an,re=u.stateNode.containerInfo,an=!0,Hn(e,i,u),re=f,an=y;break;case 0:case 11:case 14:case 15:Ka(2,u,i),Be||Ka(4,u,i),Hn(e,i,u);break;case 1:Be||(za(u,i),f=u.stateNode,typeof f.componentWillUnmount=="function"&&Sh(u,i,f)),Hn(e,i,u);break;case 21:Hn(e,i,u);break;case 22:Be=(f=Be)||u.memoizedState!==null,Hn(e,i,u),Be=f;break;default:Hn(e,i,u)}}function bc(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{wc(e)}catch(u){Ee(i,i.return,u)}}}function bh(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{wc(e)}catch(u){Ee(i,i.return,u)}}function Em(e){switch(e.tag){case 31:case 13:case 19:var i=e.stateNode;return i===null&&(i=e.stateNode=new $u),i;case 22:return e=e.stateNode,i=e._retryCache,i===null&&(i=e._retryCache=new $u),i;default:throw Error(l(435,e.tag))}}function Ze(e,i){var u=Em(e);i.forEach(function(f){if(!u.has(f)){u.add(f);var y=R2.bind(null,e,f);f.then(y,y)}})}function Gn(e,i){var u=i.deletions;if(u!==null)for(var f=0;f<u.length;f++){var y=u[f],x=e,A=i,O=A;t:for(;O!==null;){switch(O.tag){case 27:if(Qr(O.type)){re=O.stateNode,an=!1;break t}break;case 5:re=O.stateNode,an=!1;break t;case 3:case 4:re=O.stateNode.containerInfo,an=!0;break t}O=O.return}if(re===null)throw Error(l(160));rs(x,A,y),re=null,an=!1,x=y.alternate,x!==null&&(x.return=null),y.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)us(i,e),i=i.sibling}var ua=null;function us(e,i){var u=e.alternate,f=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Gn(i,e),Xe(e),f&4&&(Ka(3,e,e.return),Gi(3,e),Ka(5,e,e.return));break;case 1:Gn(i,e),Xe(e),f&512&&(Be||u===null||za(u,u.return)),f&64&&Ja&&(e=e.updateQueue,e!==null&&(f=e.callbacks,f!==null&&(u=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=u===null?f:u.concat(f))));break;case 26:var y=ua;if(Gn(i,e),Xe(e),f&512&&(Be||u===null||za(u,u.return)),f&4){var x=u!==null?u.memoizedState:null;if(f=e.memoizedState,u===null)if(f===null)if(e.stateNode===null){t:{f=e.type,u=e.memoizedProps,y=y.ownerDocument||y;e:switch(f){case"title":x=y.getElementsByTagName("title")[0],(!x||x[xs]||x[Ft]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=y.createElement(f),y.head.insertBefore(x,y.querySelector("head > title"))),Wn(x,f,u),x[Ft]=e,tn(x),f=x;break t;case"link":var A=Lg("link","href",y).get(f+(u.href||""));if(A){for(var O=0;O<A.length;O++)if(x=A[O],x.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&x.getAttribute("rel")===(u.rel==null?null:u.rel)&&x.getAttribute("title")===(u.title==null?null:u.title)&&x.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){A.splice(O,1);break e}}x=y.createElement(f),Wn(x,f,u),y.head.appendChild(x);break;case"meta":if(A=Lg("meta","content",y).get(f+(u.content||""))){for(O=0;O<A.length;O++)if(x=A[O],x.getAttribute("content")===(u.content==null?null:""+u.content)&&x.getAttribute("name")===(u.name==null?null:u.name)&&x.getAttribute("property")===(u.property==null?null:u.property)&&x.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&x.getAttribute("charset")===(u.charSet==null?null:u.charSet)){A.splice(O,1);break e}}x=y.createElement(f),Wn(x,f,u),y.head.appendChild(x);break;default:throw Error(l(468,f))}x[Ft]=e,tn(x),f=x}e.stateNode=f}else Xg(y,e.type,e.stateNode);else e.stateNode=qg(y,f,e.memoizedProps);else x!==f?(x===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):x.count--,f===null?Xg(y,e.type,e.stateNode):qg(y,f,e.memoizedProps)):f===null&&e.stateNode!==null&&Za(e,e.memoizedProps,u.memoizedProps)}break;case 27:Gn(i,e),Xe(e),f&512&&(Be||u===null||za(u,u.return)),u!==null&&f&4&&Za(e,e.memoizedProps,u.memoizedProps);break;case 5:if(Gn(i,e),Xe(e),f&512&&(Be||u===null||za(u,u.return)),e.flags&32){y=e.stateNode;try{Ss(y,"")}catch(Et){Ee(e,e.return,Et)}}f&4&&e.stateNode!=null&&(y=e.memoizedProps,Za(e,y,u!==null?u.memoizedProps:y)),f&1024&&(yl=!0);break;case 6:if(Gn(i,e),Xe(e),f&4){if(e.stateNode===null)throw Error(l(162));f=e.memoizedProps,u=e.stateNode;try{u.nodeValue=f}catch(Et){Ee(e,e.return,Et)}}break;case 3:if(wm=null,y=ua,ua=Om(i.containerInfo),Gn(i,e),ua=y,Xe(e),f&4&&u!==null&&u.memoizedState.isDehydrated)try{wc(i.containerInfo)}catch(Et){Ee(e,e.return,Et)}yl&&(yl=!1,Cm(e));break;case 4:f=ua,ua=Om(e.stateNode.containerInfo),Gn(i,e),Xe(e),ua=f;break;case 12:Gn(i,e),Xe(e);break;case 31:Gn(i,e),Xe(e),f&4&&(f=e.updateQueue,f!==null&&(e.updateQueue=null,Ze(e,f)));break;case 13:Gn(i,e),Xe(e),e.child.flags&8192&&e.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(_l=ta()),f&4&&(f=e.updateQueue,f!==null&&(e.updateQueue=null,Ze(e,f)));break;case 22:y=e.memoizedState!==null;var L=u!==null&&u.memoizedState!==null,F=Ja,rt=Be;if(Ja=F||y,Be=rt||L,Gn(i,e),Be=rt,Ja=F,Xe(e),f&8192)t:for(i=e.stateNode,i._visibility=y?i._visibility&-2:i._visibility|1,y&&(u===null||L||Ja||Be||Xs(e)),u=null,i=e;;){if(i.tag===5||i.tag===26){if(u===null){L=u=i;try{if(x=L.stateNode,y)A=x.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none";else{O=L.stateNode;var dt=L.memoizedProps.style,tt=dt!=null&&dt.hasOwnProperty("display")?dt.display:null;O.style.display=tt==null||typeof tt=="boolean"?"":(""+tt).trim()}}catch(Et){Ee(L,L.return,Et)}}}else if(i.tag===6){if(u===null){L=i;try{L.stateNode.nodeValue=y?"":L.memoizedProps}catch(Et){Ee(L,L.return,Et)}}}else if(i.tag===18){if(u===null){L=i;try{var it=L.stateNode;y?Og(it,!0):Og(L.stateNode,!1)}catch(Et){Ee(L,L.return,Et)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===e)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break t;for(;i.sibling===null;){if(i.return===null||i.return===e)break t;u===i&&(u=null),i=i.return}u===i&&(u=null),i.sibling.return=i.return,i=i.sibling}f&4&&(f=e.updateQueue,f!==null&&(u=f.retryQueue,u!==null&&(f.retryQueue=null,Ze(e,u))));break;case 19:Gn(i,e),Xe(e),f&4&&(f=e.updateQueue,f!==null&&(e.updateQueue=null,Ze(e,f)));break;case 30:break;case 21:break;default:Gn(i,e),Xe(e)}}function Xe(e){var i=e.flags;if(i&2){try{for(var u,f=e.return;f!==null;){if(nn(f)){u=f;break}f=f.return}if(u==null)throw Error(l(160));switch(u.tag){case 27:var y=u.stateNode,x=Yi(e);he(e,x,y);break;case 5:var A=u.stateNode;u.flags&32&&(Ss(A,""),u.flags&=-33);var O=Yi(e);he(e,O,A);break;case 3:case 4:var L=u.stateNode.containerInfo,F=Yi(e);Qt(e,F,L);break;default:throw Error(l(161))}}catch(rt){Ee(e,e.return,rt)}e.flags&=-3}i&4096&&(e.flags&=-4097)}function Cm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var i=e;Cm(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),e=e.sibling}}function gl(e,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Tm(e,i.alternate,i),i=i.sibling}function Xs(e){for(e=e.child;e!==null;){var i=e;switch(i.tag){case 0:case 11:case 14:case 15:Ka(4,i,i.return),Xs(i);break;case 1:za(i,i.return);var u=i.stateNode;typeof u.componentWillUnmount=="function"&&Sh(i,i.return,u),Xs(i);break;case 27:Ah(i.stateNode);case 26:case 5:za(i,i.return),Xs(i);break;case 22:i.memoizedState===null&&Xs(i);break;case 30:Xs(i);break;default:Xs(i)}e=e.sibling}}function me(e,i,u){for(u=u&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var f=i.alternate,y=e,x=i,A=x.flags;switch(x.tag){case 0:case 11:case 15:me(y,x,u),Gi(4,x);break;case 1:if(me(y,x,u),f=x,y=f.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(F){Ee(f,f.return,F)}if(f=x,y=f.updateQueue,y!==null){var O=f.stateNode;try{var L=y.shared.hiddenCallbacks;if(L!==null)for(y.shared.hiddenCallbacks=null,y=0;y<L.length;y++)wi(L[y],O)}catch(F){Ee(f,f.return,F)}}u&&A&64&&ss(x),ji(x,x.return);break;case 27:Ke(x);case 26:case 5:me(y,x,u),u&&f===null&&A&4&&Da(x),ji(x,x.return);break;case 12:me(y,x,u);break;case 31:me(y,x,u),u&&A&4&&bc(y,x);break;case 13:me(y,x,u),u&&A&4&&bh(y,x);break;case 22:x.memoizedState===null&&me(y,x,u),ji(x,x.return);break;case 30:break;default:me(y,x,u)}i=i.sibling}}function Tc(e,i){var u=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(u=e.memoizedState.cachePool.pool),e=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(e=i.memoizedState.cachePool.pool),e!==u&&(e!=null&&e.refCount++,u!=null&&Tn(u))}function vl(e,i){e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&Tn(e))}function hn(e,i,u,f){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)He(e,i,u,f),i=i.sibling}function He(e,i,u,f){var y=i.flags;switch(i.tag){case 0:case 11:case 15:hn(e,i,u,f),y&2048&&Gi(9,i);break;case 1:hn(e,i,u,f);break;case 3:hn(e,i,u,f),y&2048&&(e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&Tn(e)));break;case 12:if(y&2048){hn(e,i,u,f),e=i.stateNode;try{var x=i.memoizedProps,A=x.id,O=x.onPostCommit;typeof O=="function"&&O(A,i.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(L){Ee(i,i.return,L)}}else hn(e,i,u,f);break;case 31:hn(e,i,u,f);break;case 13:hn(e,i,u,f);break;case 23:break;case 22:x=i.stateNode,A=i.alternate,i.memoizedState!==null?x._visibility&2?hn(e,i,u,f):qr(e,i):x._visibility&2?hn(e,i,u,f):(x._visibility|=2,os(e,i,u,f,(i.subtreeFlags&10256)!==0||!1)),y&2048&&Tc(A,i);break;case 24:hn(e,i,u,f),y&2048&&vl(i.alternate,i);break;default:hn(e,i,u,f)}}function os(e,i,u,f,y){for(y=y&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var x=e,A=i,O=u,L=f,F=A.flags;switch(A.tag){case 0:case 11:case 15:os(x,A,O,L,y),Gi(8,A);break;case 23:break;case 22:var rt=A.stateNode;A.memoizedState!==null?rt._visibility&2?os(x,A,O,L,y):qr(x,A):(rt._visibility|=2,os(x,A,O,L,y)),y&&F&2048&&Tc(A.alternate,A);break;case 24:os(x,A,O,L,y),y&&F&2048&&vl(A.alternate,A);break;default:os(x,A,O,L,y)}i=i.sibling}}function qr(e,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var u=e,f=i,y=f.flags;switch(f.tag){case 22:qr(u,f),y&2048&&Tc(f.alternate,f);break;case 24:qr(u,f),y&2048&&vl(f.alternate,f);break;default:qr(u,f)}i=i.sibling}}var Ve=8192;function Vs(e,i,u){if(e.subtreeFlags&Ve)for(e=e.child;e!==null;)Je(e,i,u),e=e.sibling}function Je(e,i,u){switch(e.tag){case 26:Vs(e,i,u),e.flags&Ve&&e.memoizedState!==null&&lS(u,ua,e.memoizedState,e.memoizedProps);break;case 5:Vs(e,i,u);break;case 3:case 4:var f=ua;ua=Om(e.stateNode.containerInfo),Vs(e,i,u),ua=f;break;case 22:e.memoizedState===null&&(f=e.alternate,f!==null&&f.memoizedState!==null?(f=Ve,Ve=16777216,Vs(e,i,u),Ve=f):Vs(e,i,u));break;default:Vs(e,i,u)}}function oa(e){var i=e.alternate;if(i!==null&&(e=i.child,e!==null)){i.child=null;do i=e.sibling,e.sibling=null,e=i;while(e!==null)}}function Zn(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var u=0;u<i.length;u++){var f=i[u];Le=f,to(f,e)}oa(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Qs(e),e=e.sibling}function Qs(e){switch(e.tag){case 0:case 11:case 15:Zn(e),e.flags&2048&&Ka(9,e,e.return);break;case 3:Zn(e);break;case 12:Zn(e);break;case 22:var i=e.stateNode;e.memoizedState!==null&&i._visibility&2&&(e.return===null||e.return.tag!==13)?(i._visibility&=-3,Ec(e)):Zn(e);break;default:Zn(e)}}function Ec(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var u=0;u<i.length;u++){var f=i[u];Le=f,to(f,e)}oa(e)}for(e=e.child;e!==null;){switch(i=e,i.tag){case 0:case 11:case 15:Ka(8,i,i.return),Ec(i);break;case 22:u=i.stateNode,u._visibility&2&&(u._visibility&=-3,Ec(i));break;default:Ec(i)}e=e.sibling}}function to(e,i){for(;Le!==null;){var u=Le;switch(u.tag){case 0:case 11:case 15:Ka(8,u,i);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var f=u.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:Tn(u.memoizedState.cache)}if(f=u.child,f!==null)f.return=u,Le=f;else t:for(u=e;Le!==null;){f=Le;var y=f.sibling,x=f.return;if(Sc(f),f===u){Le=null;break t}if(y!==null){y.return=x,Le=y;break t}Le=x}}}var Cc={getCacheForType:function(e){var i=xn(Rt),u=i.data.get(e);return u===void 0&&(u=e(),i.data.set(e,u)),u},cacheSignal:function(){return xn(Rt).controller.signal}},Ac=typeof WeakMap=="function"?WeakMap:Map,ne=0,pe=null,kt=null,$t=0,zt=0,Wt=null,Xt=!1,Kt=!1,be=!1,We=0,ye=0,Oa=0,xl=0,hi=0,ae=0,Na=0,di=null,jn=null,ca=!1,_l=0,Lr=0,wa=1/0,Xr=null,qi=null,Ge=0,mi=null,Ba=null,Wa=0,Sl=0,ks=null,Mc=null,Ks=0,Zs=null;function Jn(){return(ne&2)!==0&&$t!==0?$t&-$t:H.T!==null?Fp():Fi()}function s(){if(ae===0)if(($t&536870912)===0||te){var e=vs;vs<<=1,(vs&3932160)===0&&(vs=262144),ae=e}else ae=536870912;return e=fn.current,e!==null&&(e.flags|=32),ae}function r(e,i,u){(e===pe&&(zt===2||zt===9)||e.cancelPendingCommit!==null)&&(W(e,0),T(e,$t,ae,!1)),or(e,u),((ne&2)===0||e!==pe)&&(e===pe&&((ne&2)===0&&(xl|=u),ye===4&&T(e,$t,ae,!1)),cs(e))}function h(e,i,u){if((ne&6)!==0)throw Error(l(327));var f=!u&&(i&127)===0&&(i&e.expiredLanes)===0||sr(e,i),y=f?Js(e,i):fa(e,i,!0),x=f;do{if(y===0){Kt&&!f&&T(e,i,0,!1);break}else{if(u=e.current.alternate,x&&!S(u)){y=fa(e,i,!1),x=!1;continue}if(y===2){if(x=i,e.errorRecoveryDisabledLanes&x)var A=0;else A=e.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){i=A;t:{var O=e;y=di;var L=O.current.memoizedState.isDehydrated;if(L&&(W(O,A).flags|=256),A=fa(O,A,!1),A!==2){if(be&&!L){O.errorRecoveryDisabledLanes|=x,xl|=x,y=4;break t}x=jn,jn=y,x!==null&&(jn===null?jn=x:jn.push.apply(jn,x))}y=A}if(x=!1,y!==2)continue}}if(y===1){W(e,0),T(e,i,0,!0);break}t:{switch(f=e,x=y,x){case 0:case 1:throw Error(l(345));case 4:if((i&4194048)!==i)break;case 6:T(f,i,ae,!Xt);break t;case 2:jn=null;break;case 3:case 5:break;default:throw Error(l(329))}if((i&62914560)===i&&(y=_l+300-ta(),10<y)){if(T(f,i,ae,!Xt),su(f,0,!0)!==0)break t;Wa=i,f.timeoutHandle=Rg(g.bind(null,f,u,jn,Xr,ca,i,ae,xl,Na,Xt,x,"Throttled",-0,0),y);break t}g(f,u,jn,Xr,ca,i,ae,xl,Na,Xt,x,null,-0,0)}}break}while(!0);cs(e)}function g(e,i,u,f,y,x,A,O,L,F,rt,dt,tt,it){if(e.timeoutHandle=-1,dt=i.subtreeFlags,dt&8192||(dt&16785408)===16785408){dt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ei},Je(i,x,dt);var Et=(x&62914560)===x?_l-ta():(x&4194048)===x?Lr-ta():0;if(Et=sS(dt,Et),Et!==null){Wa=x,e.cancelPendingCommit=Et(Gt.bind(null,e,i,x,u,f,y,A,O,L,rt,dt,null,tt,it)),T(e,x,A,!F);return}}Gt(e,i,x,u,f,y,A,O,L)}function S(e){for(var i=e;;){var u=i.tag;if((u===0||u===11||u===15)&&i.flags&16384&&(u=i.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var f=0;f<u.length;f++){var y=u[f],x=y.getSnapshot;y=y.value;try{if(!Ne(x(),y))return!1}catch{return!1}}if(u=i.child,i.subtreeFlags&16384&&u!==null)u.return=i,i=u;else{if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function T(e,i,u,f){i&=~hi,i&=~xl,e.suspendedLanes|=i,e.pingedLanes&=~i,f&&(e.warmLanes|=i),f=e.expirationTimes;for(var y=i;0<y;){var x=31-Ln(y),A=1<<x;f[x]=-1,y&=~A}u!==0&&nf(e,u,i)}function N(){return(ne&6)===0?(Th(0),!1):!0}function q(){if(kt!==null){if(zt===0)var e=kt.return;else e=kt,wn=rl=null,$f(e),Il=null,$l=0,e=kt;for(;e!==null;)Ls(e.alternate,e),e=e.return;kt=null}}function W(e,i){var u=e.timeoutHandle;u!==-1&&(e.timeoutHandle=-1,X2(u)),u=e.cancelPendingCommit,u!==null&&(e.cancelPendingCommit=null,u()),Wa=0,q(),pe=e,kt=u=Mi(e.current,null),$t=i,zt=0,Wt=null,Xt=!1,Kt=sr(e,i),be=!1,Na=ae=hi=xl=Oa=ye=0,jn=di=null,ca=!1,(i&8)!==0&&(i|=i&32);var f=e.entangledLanes;if(f!==0)for(e=e.entanglements,f&=i;0<f;){var y=31-Ln(f),x=1<<y;i|=e[y],f&=~x}return We=i,kl(),u}function ct(e,i){Ht=null,H.H=Xu,i===Fl||i===ui?(i=ec(),zt=3):i===Nu?(i=ec(),zt=4):zt=i===vc?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Wt=i,kt===null&&(ye=1,gc(e,na(i,e.current)))}function _t(){var e=fn.current;return e===null?!0:($t&4194048)===$t?Va===null:($t&62914560)===$t||($t&536870912)!==0?e===Va:!1}function St(){var e=H.H;return H.H=Xu,e===null?Xu:e}function bt(){var e=H.A;return H.A=Cc,e}function qt(){ye=4,Xt||($t&4194048)!==$t&&fn.current!==null||(Kt=!0),(Oa&134217727)===0&&(xl&134217727)===0||pe===null||T(pe,$t,ae,!1)}function fa(e,i,u){var f=ne;ne|=2;var y=St(),x=bt();(pe!==e||$t!==i)&&(Xr=null,W(e,i)),i=!1;var A=ye;t:do try{if(zt!==0&&kt!==null){var O=kt,L=Wt;switch(zt){case 8:q(),A=6;break t;case 3:case 2:case 9:case 6:fn.current===null&&(i=!0);var F=zt;if(zt=0,Wt=null,yt(e,O,L,F),u&&Kt){A=0;break t}break;default:F=zt,zt=0,Wt=null,yt(e,O,L,F)}}eo(),A=ye;break}catch(rt){ct(e,rt)}while(!0);return i&&e.shellSuspendCounter++,wn=rl=null,ne=f,H.H=y,H.A=x,kt===null&&(pe=null,$t=0,kl()),A}function eo(){for(;kt!==null;)Z(kt)}function Js(e,i){var u=ne;ne|=2;var f=St(),y=bt();pe!==e||$t!==i?(Xr=null,wa=ta()+500,W(e,i)):Kt=sr(e,i);t:do try{if(zt!==0&&kt!==null){i=kt;var x=Wt;e:switch(zt){case 1:zt=0,Wt=null,yt(e,i,x,1);break;case 2:case 9:if(Pd(x)){zt=0,Wt=null,nt(i);break}i=function(){zt!==2&&zt!==9||pe!==e||(zt=7),cs(e)},x.then(i,i);break t;case 3:zt=7;break t;case 4:zt=5;break t;case 7:Pd(x)?(zt=0,Wt=null,nt(i)):(zt=0,Wt=null,yt(e,i,x,7));break;case 5:var A=null;switch(kt.tag){case 26:A=kt.memoizedState;case 5:case 27:var O=kt;if(A?Vg(A):O.stateNode.complete){zt=0,Wt=null;var L=O.sibling;if(L!==null)kt=L;else{var F=O.return;F!==null?(kt=F,Mt(F)):kt=null}break e}}zt=0,Wt=null,yt(e,i,x,5);break;case 6:zt=0,Wt=null,yt(e,i,x,6);break;case 8:q(),ye=6;break t;default:throw Error(l(462))}}$();break}catch(rt){ct(e,rt)}while(!0);return wn=rl=null,H.H=f,H.A=y,ne=u,kt!==null?0:(pe=null,$t=0,kl(),ye)}function $(){for(;kt!==null&&!jp();)Z(kt)}function Z(e){var i=xc(e.alternate,e,We);e.memoizedProps=e.pendingProps,i===null?Mt(e):kt=i}function nt(e){var i=e,u=i.alternate;switch(i.tag){case 15:case 0:i=Un(u,i,i.pendingProps,i.type,void 0,$t);break;case 11:i=Un(u,i,i.pendingProps,i.type.render,i.ref,$t);break;case 5:$f(i);default:Ls(u,i),i=kt=Nn(i,We),i=xc(u,i,We)}e.memoizedProps=e.pendingProps,i===null?Mt(e):kt=i}function yt(e,i,u,f){wn=rl=null,$f(i),Il=null,$l=0;var y=i.return;try{if(Ea(e,y,i,u,$t)){ye=1,gc(e,na(u,e.current)),kt=null;return}}catch(x){if(y!==null)throw kt=y,x;ye=1,gc(e,na(u,e.current)),kt=null;return}i.flags&32768?(te||f===1?e=!0:Kt||($t&536870912)!==0?e=!1:(Xt=e=!0,(f===2||f===9||f===3||f===6)&&(f=fn.current,f!==null&&f.tag===13&&(f.flags|=16384))),Ae(i,e)):Mt(i)}function Mt(e){var i=e;do{if((i.flags&32768)!==0){Ae(i,Xt);return}e=i.return;var u=_h(i.alternate,i,We);if(u!==null){kt=u;return}if(i=i.sibling,i!==null){kt=i;return}kt=i=e}while(i!==null);ye===0&&(ye=5)}function Ae(e,i){do{var u=_c(e.alternate,e);if(u!==null){u.flags&=32767,kt=u;return}if(u=e.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!i&&(e=e.sibling,e!==null)){kt=e;return}kt=e=u}while(e!==null);ye=6,kt=null}function Gt(e,i,u,f,y,x,A,O,L){e.cancelPendingCommit=null;do Rc();while(Ge!==0);if((ne&6)!==0)throw Error(l(327));if(i!==null){if(i===e.current)throw Error(l(177));if(x=i.lanes|i.childLanes,x|=Zo,vd(e,u,x,A,O,L),e===pe&&(kt=pe=null,$t=0),Ba=i,mi=e,Wa=u,Sl=x,ks=y,Mc=f,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,z2(vo,function(){return fg(),null})):(e.callbackNode=null,e.callbackPriority=0),f=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||f){f=H.T,H.T=null,y=G.p,G.p=2,A=ne,ne|=4;try{Yr(e,i,u)}finally{ne=A,G.p=y,H.T=f}}Ge=1,ue(),dn(),oe()}}function ue(){if(Ge===1){Ge=0;var e=mi,i=Ba,u=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||u){u=H.T,H.T=null;var f=G.p;G.p=2;var y=ne;ne|=4;try{us(i,e);var x=l0,A=Xo(e.containerInfo),O=x.focusedElem,L=x.selectionRange;if(A!==O&&O&&O.ownerDocument&&Lo(O.ownerDocument.documentElement,O)){if(L!==null&&vr(O)){var F=L.start,rt=L.end;if(rt===void 0&&(rt=F),"selectionStart"in O)O.selectionStart=F,O.selectionEnd=Math.min(rt,O.value.length);else{var dt=O.ownerDocument||document,tt=dt&&dt.defaultView||window;if(tt.getSelection){var it=tt.getSelection(),Et=O.textContent.length,Ut=Math.min(L.start,Et),Re=L.end===void 0?Ut:Math.min(L.end,Et);!it.extend&&Ut>Re&&(A=Re,Re=Ut,Ut=A);var J=Rf(O,Ut),K=Rf(O,Re);if(J&&K&&(it.rangeCount!==1||it.anchorNode!==J.node||it.anchorOffset!==J.offset||it.focusNode!==K.node||it.focusOffset!==K.offset)){var P=dt.createRange();P.setStart(J.node,J.offset),it.removeAllRanges(),Ut>Re?(it.addRange(P),it.extend(K.node,K.offset)):(P.setEnd(K.node,K.offset),it.addRange(P))}}}}for(dt=[],it=O;it=it.parentNode;)it.nodeType===1&&dt.push({element:it,left:it.scrollLeft,top:it.scrollTop});for(typeof O.focus=="function"&&O.focus(),O=0;O<dt.length;O++){var ht=dt[O];ht.element.scrollLeft=ht.left,ht.element.scrollTop=ht.top}}Gm=!!i0,l0=i0=null}finally{ne=y,G.p=f,H.T=u}}e.current=i,Ge=2}}function dn(){if(Ge===2){Ge=0;var e=mi,i=Ba,u=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||u){u=H.T,H.T=null;var f=G.p;G.p=2;var y=ne;ne|=4;try{Tm(e,i.alternate,i)}finally{ne=y,G.p=f,H.T=u}}Ge=3}}function oe(){if(Ge===4||Ge===3){Ge=0,hd();var e=mi,i=Ba,u=Wa,f=Mc;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Ge=5:(Ge=0,Ba=mi=null,bl(e,e.pendingLanes));var y=e.pendingLanes;if(y===0&&(qi=null),bo(u),i=i.stateNode,$e&&typeof $e.onCommitFiberRoot=="function")try{$e.onCommitFiberRoot(qa,i,void 0,(i.current.flags&128)===128)}catch{}if(f!==null){i=H.T,y=G.p,G.p=2,H.T=null;try{for(var x=e.onRecoverableError,A=0;A<f.length;A++){var O=f[A];x(O.value,{componentStack:O.stack})}}finally{H.T=i,G.p=y}}(Wa&3)!==0&&Rc(),cs(e),y=e.pendingLanes,(u&261930)!==0&&(y&42)!==0?e===Zs?Ks++:(Ks=0,Zs=e):Ks=0,Th(0)}}function bl(e,i){(e.pooledCacheLanes&=i)===0&&(i=e.pooledCache,i!=null&&(e.pooledCache=null,Tn(i)))}function Rc(){return ue(),dn(),oe(),fg()}function fg(){if(Ge!==5)return!1;var e=mi,i=Sl;Sl=0;var u=bo(Wa),f=H.T,y=G.p;try{G.p=32>u?32:u,H.T=null,u=ks,ks=null;var x=mi,A=Wa;if(Ge=0,Ba=mi=null,Wa=0,(ne&6)!==0)throw Error(l(331));var O=ne;if(ne|=4,Qs(x.current),He(x,x.current,A,u),ne=O,Th(0,!1),$e&&typeof $e.onPostCommitFiberRoot=="function")try{$e.onPostCommitFiberRoot(qa,x)}catch{}return!0}finally{G.p=y,H.T=f,bl(e,i)}}function hg(e,i,u){i=na(u,i),i=xh(e.stateNode,i,2),e=fl(e,i,2),e!==null&&(or(e,2),cs(e))}function Ee(e,i,u){if(e.tag===3)hg(e,e,u);else for(;i!==null;){if(i.tag===3){hg(i,e,u);break}else if(i.tag===1){var f=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(qi===null||!qi.has(f))){e=na(u,e),u=Br(2),f=fl(i,u,2),f!==null&&(sa(u,f,i,e),or(f,2),cs(f));break}}i=i.return}}function Jp(e,i,u){var f=e.pingCache;if(f===null){f=e.pingCache=new Ac;var y=new Set;f.set(i,y)}else y=f.get(i),y===void 0&&(y=new Set,f.set(i,y));y.has(u)||(be=!0,y.add(u),e=A2.bind(null,e,i,u),i.then(e,e))}function A2(e,i,u){var f=e.pingCache;f!==null&&f.delete(i),e.pingedLanes|=e.suspendedLanes&u,e.warmLanes&=~u,pe===e&&($t&u)===u&&(ye===4||ye===3&&($t&62914560)===$t&&300>ta()-_l?(ne&2)===0&&W(e,0):hi|=u,Na===$t&&(Na=0)),cs(e)}function dg(e,i){i===0&&(i=rr()),e=Kl(e,i),e!==null&&(or(e,i),cs(e))}function M2(e){var i=e.memoizedState,u=0;i!==null&&(u=i.retryLane),dg(e,u)}function R2(e,i){var u=0;switch(e.tag){case 31:case 13:var f=e.stateNode,y=e.memoizedState;y!==null&&(u=y.retryLane);break;case 19:f=e.stateNode;break;case 22:f=e.stateNode._retryCache;break;default:throw Error(l(314))}f!==null&&f.delete(i),dg(e,u)}function z2(e,i){return Ya(e,i)}var Am=null,zc=null,Wp=!1,Mm=!1,Pp=!1,Vr=0;function cs(e){e!==zc&&e.next===null&&(zc===null?Am=zc=e:zc=zc.next=e),Mm=!0,Wp||(Wp=!0,O2())}function Th(e,i){if(!Pp&&Mm){Pp=!0;do for(var u=!1,f=Am;f!==null;){if(e!==0){var y=f.pendingLanes;if(y===0)var x=0;else{var A=f.suspendedLanes,O=f.pingedLanes;x=(1<<31-Ln(42|e)+1)-1,x&=y&~(A&~O),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(u=!0,gg(f,x))}else x=$t,x=su(f,f===pe?x:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(x&3)===0||sr(f,x)||(u=!0,gg(f,x));f=f.next}while(u);Pp=!1}}function D2(){mg()}function mg(){Mm=Wp=!1;var e=0;Vr!==0&&L2()&&(e=Vr);for(var i=ta(),u=null,f=Am;f!==null;){var y=f.next,x=pg(f,i);x===0?(f.next=null,u===null?Am=y:u.next=y,y===null&&(zc=u)):(u=f,(e!==0||(x&3)!==0)&&(Mm=!0)),f=y}Ge!==0&&Ge!==5||Th(e),Vr!==0&&(Vr=0)}function pg(e,i){for(var u=e.suspendedLanes,f=e.pingedLanes,y=e.expirationTimes,x=e.pendingLanes&-62914561;0<x;){var A=31-Ln(x),O=1<<A,L=y[A];L===-1?((O&u)===0||(O&f)!==0)&&(y[A]=xo(O,i)):L<=i&&(e.expiredLanes|=O),x&=~O}if(i=pe,u=$t,u=su(e,e===i?u:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),f=e.callbackNode,u===0||e===i&&(zt===2||zt===9)||e.cancelPendingCommit!==null)return f!==null&&f!==null&&Dl(f),e.callbackNode=null,e.callbackPriority=0;if((u&3)===0||sr(e,u)){if(i=u&-u,i===e.callbackPriority)return i;switch(f!==null&&Dl(f),bo(u)){case 2:case 8:u=go;break;case 32:u=vo;break;case 268435456:u=yd;break;default:u=vo}return f=yg.bind(null,e),u=Ya(u,f),e.callbackPriority=i,e.callbackNode=u,i}return f!==null&&f!==null&&Dl(f),e.callbackPriority=2,e.callbackNode=null,2}function yg(e,i){if(Ge!==0&&Ge!==5)return e.callbackNode=null,e.callbackPriority=0,null;var u=e.callbackNode;if(Rc()&&e.callbackNode!==u)return null;var f=$t;return f=su(e,e===pe?f:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),f===0?null:(h(e,f,i),pg(e,ta()),e.callbackNode!=null&&e.callbackNode===u?yg.bind(null,e):null)}function gg(e,i){if(Rc())return null;h(e,i,!0)}function O2(){V2(function(){(ne&6)!==0?Ya(md,D2):mg()})}function Fp(){if(Vr===0){var e=cl;e===0&&(e=iu,iu<<=1,(iu&261888)===0&&(iu=256)),Vr=e}return Vr}function vg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:du(""+e)}function xg(e,i){var u=i.ownerDocument.createElement("input");return u.name=i.name,u.value=i.value,e.id&&u.setAttribute("form",e.id),i.parentNode.insertBefore(u,i),e=new FormData(e),u.parentNode.removeChild(u),e}function N2(e,i,u,f,y){if(i==="submit"&&u&&u.stateNode===y){var x=vg((y[zn]||null).action),A=f.submitter;A&&(i=(i=A[zn]||null)?vg(i.formAction):A.getAttribute("formAction"),i!==null&&(x=i,A=null));var O=new gu("action","action",null,f,y);e.push({event:O,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(Vr!==0){var L=A?xg(y,A):new FormData(y);mh(u,{pending:!0,data:L,method:y.method,action:x},null,L)}}else typeof x=="function"&&(O.preventDefault(),L=A?xg(y,A):new FormData(y),mh(u,{pending:!0,data:L,method:y.method,action:x},x,L))},currentTarget:y}]})}}for(var Ip=0;Ip<Ko.length;Ip++){var $p=Ko[Ip],w2=$p.toLowerCase(),B2=$p[0].toUpperCase()+$p.slice(1);On(w2,"on"+B2)}On(ea,"onAnimationEnd"),On(zf,"onAnimationIteration"),On(Ai,"onAnimationStart"),On("dblclick","onDoubleClick"),On("focusin","onFocus"),On("focusout","onBlur"),On(br,"onTransitionRun"),On(Vl,"onTransitionStart"),On(Df,"onTransitionCancel"),On(ko,"onTransitionEnd"),Nl("onMouseEnter",["mouseout","mouseover"]),Nl("onMouseLeave",["mouseout","mouseover"]),Nl("onPointerEnter",["pointerout","pointerover"]),Nl("onPointerLeave",["pointerout","pointerover"]),tl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),tl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),tl("onBeforeInput",["compositionend","keypress","textInput","paste"]),tl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),tl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),tl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Eh="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(" "),U2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Eh));function _g(e,i){i=(i&4)!==0;for(var u=0;u<e.length;u++){var f=e[u],y=f.event;f=f.listeners;t:{var x=void 0;if(i)for(var A=f.length-1;0<=A;A--){var O=f[A],L=O.instance,F=O.currentTarget;if(O=O.listener,L!==x&&y.isPropagationStopped())break t;x=O,y.currentTarget=F;try{x(y)}catch(rt){Ql(rt)}y.currentTarget=null,x=L}else for(A=0;A<f.length;A++){if(O=f[A],L=O.instance,F=O.currentTarget,O=O.listener,L!==x&&y.isPropagationStopped())break t;x=O,y.currentTarget=F;try{x(y)}catch(rt){Ql(rt)}y.currentTarget=null,x=L}}}}function ee(e,i){var u=i[To];u===void 0&&(u=i[To]=new Set);var f=e+"__bubble";u.has(f)||(Sg(i,e,2,!1),u.add(f))}function t0(e,i,u){var f=0;i&&(f|=4),Sg(u,e,f,i)}var Rm="_reactListening"+Math.random().toString(36).slice(2);function e0(e){if(!e[Rm]){e[Rm]=!0,Ti.forEach(function(u){u!=="selectionchange"&&(U2.has(u)||t0(u,!1,e),t0(u,!0,e))});var i=e.nodeType===9?e:e.ownerDocument;i===null||i[Rm]||(i[Rm]=!0,t0("selectionchange",!1,i))}}function Sg(e,i,u,f){switch(Pg(i)){case 2:var y=oS;break;case 8:y=cS;break;default:y=y0}u=y.bind(null,i,u,e),y=void 0,!Oo||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(y=!0),f?y!==void 0?e.addEventListener(i,u,{capture:!0,passive:y}):e.addEventListener(i,u,!0):y!==void 0?e.addEventListener(i,u,{passive:y}):e.addEventListener(i,u,!1)}function n0(e,i,u,f,y){var x=f;if((i&1)===0&&(i&2)===0&&f!==null)t:for(;;){if(f===null)return;var A=f.tag;if(A===3||A===4){var O=f.stateNode.containerInfo;if(O===y)break;if(A===4)for(A=f.return;A!==null;){var L=A.tag;if((L===3||L===4)&&A.stateNode.containerInfo===y)return;A=A.return}for(;O!==null;){if(A=cn(O),A===null)return;if(L=A.tag,L===5||L===6||L===26||L===27){f=x=A;continue t}O=O.parentNode}}f=f.return}ff(function(){var F=x,rt=zo(u),dt=[];t:{var tt=al.get(e);if(tt!==void 0){var it=gu,Et=e;switch(e){case"keypress":if(Es(u)===0)break t;case"keydown":case"keyup":it=vf;break;case"focusin":Et="focus",it=Ho;break;case"focusout":Et="blur",it=Ho;break;case"beforeblur":case"afterblur":it=Ho;break;case"click":if(u.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":it=Md;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":it=Rd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":it=el;break;case ea:case zf:case Ai:it=Od;break;case ko:it=qp;break;case"scroll":case"scrollend":it=Bo;break;case"wheel":it=Gl;break;case"copy":case"cut":case"paste":it=df;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":it=Go;break;case"toggle":case"beforetoggle":it=_f}var Ut=(i&4)!==0,Re=!Ut&&(e==="scroll"||e==="scrollend"),J=Ut?tt!==null?tt+"Capture":null:tt;Ut=[];for(var K=F,P;K!==null;){var ht=K;if(P=ht.stateNode,ht=ht.tag,ht!==5&&ht!==26&&ht!==27||P===null||J===null||(ht=Ts(K,J),ht!=null&&Ut.push(Ch(K,ht,P))),Re)break;K=K.return}0<Ut.length&&(tt=new it(tt,Et,null,u,rt),dt.push({event:tt,listeners:Ut}))}}if((i&7)===0){t:{if(tt=e==="mouseover"||e==="pointerover",it=e==="mouseout"||e==="pointerout",tt&&u!==mu&&(Et=u.relatedTarget||u.fromElement)&&(cn(Et)||Et[Ol]))break t;if((it||tt)&&(tt=rt.window===rt?rt:(tt=rt.ownerDocument)?tt.defaultView||tt.parentWindow:window,it?(Et=u.relatedTarget||u.toElement,it=F,Et=Et?cn(Et):null,Et!==null&&(Re=c(Et),Ut=Et.tag,Et!==Re||Ut!==5&&Ut!==27&&Ut!==6)&&(Et=null)):(it=null,Et=F),it!==Et)){if(Ut=Md,ht="onMouseLeave",J="onMouseEnter",K="mouse",(e==="pointerout"||e==="pointerover")&&(Ut=Go,ht="onPointerLeave",J="onPointerEnter",K="pointer"),Re=it==null?tt:Ii(it),P=Et==null?tt:Ii(Et),tt=new Ut(ht,K+"leave",it,u,rt),tt.target=Re,tt.relatedTarget=P,ht=null,cn(rt)===F&&(Ut=new Ut(J,K+"enter",Et,u,rt),Ut.target=P,Ut.relatedTarget=Re,ht=Ut),Re=ht,it&&Et)e:{for(Ut=H2,J=it,K=Et,P=0,ht=J;ht;ht=Ut(ht))P++;ht=0;for(var Dt=K;Dt;Dt=Ut(Dt))ht++;for(;0<P-ht;)J=Ut(J),P--;for(;0<ht-P;)K=Ut(K),ht--;for(;P--;){if(J===K||K!==null&&J===K.alternate){Ut=J;break e}J=Ut(J),K=Ut(K)}Ut=null}else Ut=null;it!==null&&bg(dt,tt,it,Ut,!1),Et!==null&&Re!==null&&bg(dt,Re,Et,Ut,!0)}}t:{if(tt=F?Ii(F):window,it=tt.nodeName&&tt.nodeName.toLowerCase(),it==="select"||it==="input"&&tt.type==="file")var ge=Cf;else if(Tf(tt))if(Tu)ge=Xd;else{ge=ql;var At=Eu}else it=tt.nodeName,!it||it.toLowerCase()!=="input"||tt.type!=="checkbox"&&tt.type!=="radio"?F&&hu(F.elementType)&&(ge=Cf):ge=Ld;if(ge&&(ge=ge(e,F))){qo(dt,ge,u,rt);break t}At&&At(e,tt,F),e==="focusout"&&F&&tt.type==="number"&&F.memoizedProps.value!=null&&Mo(tt,"number",tt.value)}switch(At=F?Ii(F):window,e){case"focusin":(Tf(At)||At.contentEditable==="true")&&(xr=At,Vo=F,_r=null);break;case"focusout":_r=Vo=xr=null;break;case"mousedown":xa=!0;break;case"contextmenu":case"mouseup":case"dragend":xa=!1,Qo(dt,u,rt);break;case"selectionchange":if(Vd)break;case"keydown":case"keyup":Qo(dt,u,rt)}var Zt;if(Cs)t:{switch(e){case"compositionstart":var ie="onCompositionStart";break t;case"compositionend":ie="onCompositionEnd";break t;case"compositionupdate":ie="onCompositionUpdate";break t}ie=void 0}else Yl?jo(e,u)&&(ie="onCompositionEnd"):e==="keydown"&&u.keyCode===229&&(ie="onCompositionStart");ie&&(bn&&u.locale!=="ko"&&(Yl||ie!=="onCompositionStart"?ie==="onCompositionEnd"&&Yl&&(Zt=wo()):(Bl=rt,No="value"in Bl?Bl.value:Bl.textContent,Yl=!0)),At=zm(F,ie),0<At.length&&(ie=new mf(ie,e,null,u,rt),dt.push({event:ie,listeners:At}),Zt?ie.data=Zt:(Zt=dr(u),Zt!==null&&(ie.data=Zt)))),(Zt=As?Yo(e,u):jd(e,u))&&(ie=zm(F,"onBeforeInput"),0<ie.length&&(At=new mf("onBeforeInput","beforeinput",null,u,rt),dt.push({event:At,listeners:ie}),At.data=Zt)),N2(dt,e,F,u,rt)}_g(dt,i)})}function Ch(e,i,u){return{instance:e,listener:i,currentTarget:u}}function zm(e,i){for(var u=i+"Capture",f=[];e!==null;){var y=e,x=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||x===null||(y=Ts(e,u),y!=null&&f.unshift(Ch(e,y,x)),y=Ts(e,i),y!=null&&f.push(Ch(e,y,x))),e.tag===3)return f;e=e.return}return[]}function H2(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function bg(e,i,u,f,y){for(var x=i._reactName,A=[];u!==null&&u!==f;){var O=u,L=O.alternate,F=O.stateNode;if(O=O.tag,L!==null&&L===f)break;O!==5&&O!==26&&O!==27||F===null||(L=F,y?(F=Ts(u,x),F!=null&&A.unshift(Ch(u,F,L))):y||(F=Ts(u,x),F!=null&&A.push(Ch(u,F,L)))),u=u.return}A.length!==0&&e.push({event:i,listeners:A})}var G2=/\r\n?/g,j2=/\u0000|\uFFFD/g;function Tg(e){return(typeof e=="string"?e:""+e).replace(G2,`
50
+ `).replace(j2,"")}function Eg(e,i){return i=Tg(i),Tg(e)===i}function Me(e,i,u,f,y,x){switch(u){case"children":typeof f=="string"?i==="body"||i==="textarea"&&f===""||Ss(e,f):(typeof f=="number"||typeof f=="bigint")&&i!=="body"&&Ss(e,""+f);break;case"className":cu(e,"class",f);break;case"tabIndex":cu(e,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":cu(e,u,f);break;case"style":of(e,f,x);break;case"data":if(i!=="object"){cu(e,"data",f);break}case"src":case"href":if(f===""&&(i!=="a"||u!=="href")){e.removeAttribute(u);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){e.removeAttribute(u);break}f=du(""+f),e.setAttribute(u,f);break;case"action":case"formAction":if(typeof f=="function"){e.setAttribute(u,"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 x=="function"&&(u==="formAction"?(i!=="input"&&Me(e,i,"name",y.name,y,null),Me(e,i,"formEncType",y.formEncType,y,null),Me(e,i,"formMethod",y.formMethod,y,null),Me(e,i,"formTarget",y.formTarget,y,null)):(Me(e,i,"encType",y.encType,y,null),Me(e,i,"method",y.method,y,null),Me(e,i,"target",y.target,y,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){e.removeAttribute(u);break}f=du(""+f),e.setAttribute(u,f);break;case"onClick":f!=null&&(e.onclick=Ei);break;case"onScroll":f!=null&&ee("scroll",e);break;case"onScrollEnd":f!=null&&ee("scrollend",e);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(l(61));if(u=f.__html,u!=null){if(y.children!=null)throw Error(l(60));e.innerHTML=u}}break;case"multiple":e.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":e.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){e.removeAttribute("xlink:href");break}u=du(""+f),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":f!=null&&typeof f!="function"&&typeof f!="symbol"?e.setAttribute(u,""+f):e.removeAttribute(u);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":f&&typeof f!="function"&&typeof f!="symbol"?e.setAttribute(u,""):e.removeAttribute(u);break;case"capture":case"download":f===!0?e.setAttribute(u,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?e.setAttribute(u,f):e.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?e.setAttribute(u,f):e.removeAttribute(u);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?e.removeAttribute(u):e.setAttribute(u,f);break;case"popover":ee("beforetoggle",e),ee("toggle",e),ou(e,"popover",f);break;case"xlinkActuate":ai(e,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":ai(e,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":ai(e,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":ai(e,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":ai(e,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":ai(e,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":ai(e,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":ai(e,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":ai(e,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":ou(e,"is",f);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=Cd.get(u)||u,ou(e,u,f))}}function a0(e,i,u,f,y,x){switch(u){case"style":of(e,f,x);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(l(61));if(u=f.__html,u!=null){if(y.children!=null)throw Error(l(60));e.innerHTML=u}}break;case"children":typeof f=="string"?Ss(e,f):(typeof f=="number"||typeof f=="bigint")&&Ss(e,""+f);break;case"onScroll":f!=null&&ee("scroll",e);break;case"onScrollEnd":f!=null&&ee("scrollend",e);break;case"onClick":f!=null&&(e.onclick=Ei);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!uu.hasOwnProperty(u))t:{if(u[0]==="o"&&u[1]==="n"&&(y=u.endsWith("Capture"),i=u.slice(2,y?u.length-7:void 0),x=e[zn]||null,x=x!=null?x[u]:null,typeof x=="function"&&e.removeEventListener(i,x,y),typeof f=="function")){typeof x!="function"&&x!==null&&(u in e?e[u]=null:e.hasAttribute(u)&&e.removeAttribute(u)),e.addEventListener(i,f,y);break t}u in e?e[u]=f:f===!0?e.setAttribute(u,""):ou(e,u,f)}}}function Wn(e,i,u){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ee("error",e),ee("load",e);var f=!1,y=!1,x;for(x in u)if(u.hasOwnProperty(x)){var A=u[x];if(A!=null)switch(x){case"src":f=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:Me(e,i,x,A,u,null)}}y&&Me(e,i,"srcSet",u.srcSet,u,null),f&&Me(e,i,"src",u.src,u,null);return;case"input":ee("invalid",e);var O=x=A=y=null,L=null,F=null;for(f in u)if(u.hasOwnProperty(f)){var rt=u[f];if(rt!=null)switch(f){case"name":y=rt;break;case"type":A=rt;break;case"checked":L=rt;break;case"defaultChecked":F=rt;break;case"value":x=rt;break;case"defaultValue":O=rt;break;case"children":case"dangerouslySetInnerHTML":if(rt!=null)throw Error(l(137,i));break;default:Me(e,i,f,rt,u,null)}}rf(e,x,O,L,F,A,y,!1);return;case"select":ee("invalid",e),f=A=x=null;for(y in u)if(u.hasOwnProperty(y)&&(O=u[y],O!=null))switch(y){case"value":x=O;break;case"defaultValue":A=O;break;case"multiple":f=O;default:Me(e,i,y,O,u,null)}i=x,u=A,e.multiple=!!f,i!=null?fr(e,!!f,i,!1):u!=null&&fr(e,!!f,u,!0);return;case"textarea":ee("invalid",e),x=y=f=null;for(A in u)if(u.hasOwnProperty(A)&&(O=u[A],O!=null))switch(A){case"value":f=O;break;case"defaultValue":y=O;break;case"children":x=O;break;case"dangerouslySetInnerHTML":if(O!=null)throw Error(l(91));break;default:Me(e,i,A,O,u,null)}_s(e,f,y,x);return;case"option":for(L in u)if(u.hasOwnProperty(L)&&(f=u[L],f!=null))switch(L){case"selected":e.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:Me(e,i,L,f,u,null)}return;case"dialog":ee("beforetoggle",e),ee("toggle",e),ee("cancel",e),ee("close",e);break;case"iframe":case"object":ee("load",e);break;case"video":case"audio":for(f=0;f<Eh.length;f++)ee(Eh[f],e);break;case"image":ee("error",e),ee("load",e);break;case"details":ee("toggle",e);break;case"embed":case"source":case"link":ee("error",e),ee("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(F in u)if(u.hasOwnProperty(F)&&(f=u[F],f!=null))switch(F){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:Me(e,i,F,f,u,null)}return;default:if(hu(i)){for(rt in u)u.hasOwnProperty(rt)&&(f=u[rt],f!==void 0&&a0(e,i,rt,f,u,void 0));return}}for(O in u)u.hasOwnProperty(O)&&(f=u[O],f!=null&&Me(e,i,O,f,u,null))}function Y2(e,i,u,f){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,x=null,A=null,O=null,L=null,F=null,rt=null;for(it in u){var dt=u[it];if(u.hasOwnProperty(it)&&dt!=null)switch(it){case"checked":break;case"value":break;case"defaultValue":L=dt;default:f.hasOwnProperty(it)||Me(e,i,it,null,f,dt)}}for(var tt in f){var it=f[tt];if(dt=u[tt],f.hasOwnProperty(tt)&&(it!=null||dt!=null))switch(tt){case"type":x=it;break;case"name":y=it;break;case"checked":F=it;break;case"defaultChecked":rt=it;break;case"value":A=it;break;case"defaultValue":O=it;break;case"children":case"dangerouslySetInnerHTML":if(it!=null)throw Error(l(137,i));break;default:it!==dt&&Me(e,i,tt,it,f,dt)}}Ao(e,A,O,L,F,rt,x,y);return;case"select":it=A=O=tt=null;for(x in u)if(L=u[x],u.hasOwnProperty(x)&&L!=null)switch(x){case"value":break;case"multiple":it=L;default:f.hasOwnProperty(x)||Me(e,i,x,null,f,L)}for(y in f)if(x=f[y],L=u[y],f.hasOwnProperty(y)&&(x!=null||L!=null))switch(y){case"value":tt=x;break;case"defaultValue":O=x;break;case"multiple":A=x;default:x!==L&&Me(e,i,y,x,f,L)}i=O,u=A,f=it,tt!=null?fr(e,!!u,tt,!1):!!f!=!!u&&(i!=null?fr(e,!!u,i,!0):fr(e,!!u,u?[]:"",!1));return;case"textarea":it=tt=null;for(O in u)if(y=u[O],u.hasOwnProperty(O)&&y!=null&&!f.hasOwnProperty(O))switch(O){case"value":break;case"children":break;default:Me(e,i,O,null,f,y)}for(A in f)if(y=f[A],x=u[A],f.hasOwnProperty(A)&&(y!=null||x!=null))switch(A){case"value":tt=y;break;case"defaultValue":it=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(l(91));break;default:y!==x&&Me(e,i,A,y,f,x)}uf(e,tt,it);return;case"option":for(var Et in u)if(tt=u[Et],u.hasOwnProperty(Et)&&tt!=null&&!f.hasOwnProperty(Et))switch(Et){case"selected":e.selected=!1;break;default:Me(e,i,Et,null,f,tt)}for(L in f)if(tt=f[L],it=u[L],f.hasOwnProperty(L)&&tt!==it&&(tt!=null||it!=null))switch(L){case"selected":e.selected=tt&&typeof tt!="function"&&typeof tt!="symbol";break;default:Me(e,i,L,tt,f,it)}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 Ut in u)tt=u[Ut],u.hasOwnProperty(Ut)&&tt!=null&&!f.hasOwnProperty(Ut)&&Me(e,i,Ut,null,f,tt);for(F in f)if(tt=f[F],it=u[F],f.hasOwnProperty(F)&&tt!==it&&(tt!=null||it!=null))switch(F){case"children":case"dangerouslySetInnerHTML":if(tt!=null)throw Error(l(137,i));break;default:Me(e,i,F,tt,f,it)}return;default:if(hu(i)){for(var Re in u)tt=u[Re],u.hasOwnProperty(Re)&&tt!==void 0&&!f.hasOwnProperty(Re)&&a0(e,i,Re,void 0,f,tt);for(rt in f)tt=f[rt],it=u[rt],!f.hasOwnProperty(rt)||tt===it||tt===void 0&&it===void 0||a0(e,i,rt,tt,f,it);return}}for(var J in u)tt=u[J],u.hasOwnProperty(J)&&tt!=null&&!f.hasOwnProperty(J)&&Me(e,i,J,null,f,tt);for(dt in f)tt=f[dt],it=u[dt],!f.hasOwnProperty(dt)||tt===it||tt==null&&it==null||Me(e,i,dt,tt,f,it)}function Cg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function q2(){if(typeof performance.getEntriesByType=="function"){for(var e=0,i=0,u=performance.getEntriesByType("resource"),f=0;f<u.length;f++){var y=u[f],x=y.transferSize,A=y.initiatorType,O=y.duration;if(x&&O&&Cg(A)){for(A=0,O=y.responseEnd,f+=1;f<u.length;f++){var L=u[f],F=L.startTime;if(F>O)break;var rt=L.transferSize,dt=L.initiatorType;rt&&Cg(dt)&&(L=L.responseEnd,A+=rt*(L<O?1:(O-F)/(L-F)))}if(--f,i+=8*(x+A)/(y.duration/1e3),e++,10<e)break}}if(0<e)return i/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var i0=null,l0=null;function Dm(e){return e.nodeType===9?e:e.ownerDocument}function Ag(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 Mg(e,i){if(e===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&i==="foreignObject"?0:e}function s0(e,i){return e==="textarea"||e==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var r0=null;function L2(){var e=window.event;return e&&e.type==="popstate"?e===r0?!1:(r0=e,!0):(r0=null,!1)}var Rg=typeof setTimeout=="function"?setTimeout:void 0,X2=typeof clearTimeout=="function"?clearTimeout:void 0,zg=typeof Promise=="function"?Promise:void 0,V2=typeof queueMicrotask=="function"?queueMicrotask:typeof zg<"u"?function(e){return zg.resolve(null).then(e).catch(Q2)}:Rg;function Q2(e){setTimeout(function(){throw e})}function Qr(e){return e==="head"}function Dg(e,i){var u=i,f=0;do{var y=u.nextSibling;if(e.removeChild(u),y&&y.nodeType===8)if(u=y.data,u==="/$"||u==="/&"){if(f===0){e.removeChild(y),wc(i);return}f--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")f++;else if(u==="html")Ah(e.ownerDocument.documentElement);else if(u==="head"){u=e.ownerDocument.head,Ah(u);for(var x=u.firstChild;x;){var A=x.nextSibling,O=x.nodeName;x[xs]||O==="SCRIPT"||O==="STYLE"||O==="LINK"&&x.rel.toLowerCase()==="stylesheet"||u.removeChild(x),x=A}}else u==="body"&&Ah(e.ownerDocument.body);u=y}while(u);wc(i)}function Og(e,i){var u=e;e=0;do{var f=u.nextSibling;if(u.nodeType===1?i?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(i?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),f&&f.nodeType===8)if(u=f.data,u==="/$"){if(e===0)break;e--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||e++;u=f}while(u)}function u0(e){var i=e.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var u=i;switch(i=i.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":u0(u),ru(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}e.removeChild(u)}}function k2(e,i,u,f){for(;e.nodeType===1;){var y=u;if(e.nodeName.toLowerCase()!==i.toLowerCase()){if(!f&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(f){if(!e[xs])switch(i){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(x=e.getAttribute("rel"),x==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(x!==y.rel||e.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||e.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||e.getAttribute("title")!==(y.title==null?null:y.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(x=e.getAttribute("src"),(x!==(y.src==null?null:y.src)||e.getAttribute("type")!==(y.type==null?null:y.type)||e.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&x&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(i==="input"&&e.type==="hidden"){var x=y.name==null?null:""+y.name;if(y.type==="hidden"&&e.getAttribute("name")===x)return e}else return e;if(e=Li(e.nextSibling),e===null)break}return null}function K2(e,i,u){if(i==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!u||(e=Li(e.nextSibling),e===null))return null;return e}function Ng(e,i){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Li(e.nextSibling),e===null))return null;return e}function o0(e){return e.data==="$?"||e.data==="$~"}function c0(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Z2(e,i){var u=e.ownerDocument;if(e.data==="$~")e._reactRetry=i;else if(e.data!=="$?"||u.readyState!=="loading")i();else{var f=function(){i(),u.removeEventListener("DOMContentLoaded",f)};u.addEventListener("DOMContentLoaded",f),e._reactRetry=f}}function Li(e){for(;e!=null;e=e.nextSibling){var i=e.nodeType;if(i===1||i===3)break;if(i===8){if(i=e.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return e}var f0=null;function wg(e){e=e.nextSibling;for(var i=0;e;){if(e.nodeType===8){var u=e.data;if(u==="/$"||u==="/&"){if(i===0)return Li(e.nextSibling);i--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||i++}e=e.nextSibling}return null}function Bg(e){e=e.previousSibling;for(var i=0;e;){if(e.nodeType===8){var u=e.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(i===0)return e;i--}else u!=="/$"&&u!=="/&"||i++}e=e.previousSibling}return null}function Ug(e,i,u){switch(i=Dm(u),e){case"html":if(e=i.documentElement,!e)throw Error(l(452));return e;case"head":if(e=i.head,!e)throw Error(l(453));return e;case"body":if(e=i.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function Ah(e){for(var i=e.attributes;i.length;)e.removeAttributeNode(i[0]);ru(e)}var Xi=new Map,Hg=new Set;function Om(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ws=G.d;G.d={f:J2,r:W2,D:P2,C:F2,L:I2,m:$2,X:eS,S:tS,M:nS};function J2(){var e=Ws.f(),i=N();return e||i}function W2(e){var i=De(e);i!==null&&i.tag===5&&i.type==="form"?ph(i):Ws.r(e)}var Dc=typeof document>"u"?null:document;function Gg(e,i,u){var f=Dc;if(f&&typeof i=="string"&&i){var y=ga(i);y='link[rel="'+e+'"][href="'+y+'"]',typeof u=="string"&&(y+='[crossorigin="'+u+'"]'),Hg.has(y)||(Hg.add(y),e={rel:e,crossOrigin:u,href:i},f.querySelector(y)===null&&(i=f.createElement("link"),Wn(i,"link",e),tn(i),f.head.appendChild(i)))}}function P2(e){Ws.D(e),Gg("dns-prefetch",e,null)}function F2(e,i){Ws.C(e,i),Gg("preconnect",e,i)}function I2(e,i,u){Ws.L(e,i,u);var f=Dc;if(f&&e&&i){var y='link[rel="preload"][as="'+ga(i)+'"]';i==="image"&&u&&u.imageSrcSet?(y+='[imagesrcset="'+ga(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(y+='[imagesizes="'+ga(u.imageSizes)+'"]')):y+='[href="'+ga(e)+'"]';var x=y;switch(i){case"style":x=Oc(e);break;case"script":x=Nc(e)}Xi.has(x)||(e=b({rel:"preload",href:i==="image"&&u&&u.imageSrcSet?void 0:e,as:i},u),Xi.set(x,e),f.querySelector(y)!==null||i==="style"&&f.querySelector(Mh(x))||i==="script"&&f.querySelector(Rh(x))||(i=f.createElement("link"),Wn(i,"link",e),tn(i),f.head.appendChild(i)))}}function $2(e,i){Ws.m(e,i);var u=Dc;if(u&&e){var f=i&&typeof i.as=="string"?i.as:"script",y='link[rel="modulepreload"][as="'+ga(f)+'"][href="'+ga(e)+'"]',x=y;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=Nc(e)}if(!Xi.has(x)&&(e=b({rel:"modulepreload",href:e},i),Xi.set(x,e),u.querySelector(y)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Rh(x)))return}f=u.createElement("link"),Wn(f,"link",e),tn(f),u.head.appendChild(f)}}}function tS(e,i,u){Ws.S(e,i,u);var f=Dc;if(f&&e){var y=$i(f).hoistableStyles,x=Oc(e);i=i||"default";var A=y.get(x);if(!A){var O={loading:0,preload:null};if(A=f.querySelector(Mh(x)))O.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":i},u),(u=Xi.get(x))&&h0(e,u);var L=A=f.createElement("link");tn(L),Wn(L,"link",e),L._p=new Promise(function(F,rt){L.onload=F,L.onerror=rt}),L.addEventListener("load",function(){O.loading|=1}),L.addEventListener("error",function(){O.loading|=2}),O.loading|=4,Nm(A,i,f)}A={type:"stylesheet",instance:A,count:1,state:O},y.set(x,A)}}}function eS(e,i){Ws.X(e,i);var u=Dc;if(u&&e){var f=$i(u).hoistableScripts,y=Nc(e),x=f.get(y);x||(x=u.querySelector(Rh(y)),x||(e=b({src:e,async:!0},i),(i=Xi.get(y))&&d0(e,i),x=u.createElement("script"),tn(x),Wn(x,"link",e),u.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},f.set(y,x))}}function nS(e,i){Ws.M(e,i);var u=Dc;if(u&&e){var f=$i(u).hoistableScripts,y=Nc(e),x=f.get(y);x||(x=u.querySelector(Rh(y)),x||(e=b({src:e,async:!0,type:"module"},i),(i=Xi.get(y))&&d0(e,i),x=u.createElement("script"),tn(x),Wn(x,"link",e),u.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},f.set(y,x))}}function jg(e,i,u,f){var y=(y=Ot.current)?Om(y):null;if(!y)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(i=Oc(u.href),u=$i(y).hoistableStyles,f=u.get(i),f||(f={type:"style",instance:null,count:0,state:null},u.set(i,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){e=Oc(u.href);var x=$i(y).hoistableStyles,A=x.get(e);if(A||(y=y.ownerDocument||y,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(e,A),(x=y.querySelector(Mh(e)))&&!x._p&&(A.instance=x,A.state.loading=5),Xi.has(e)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Xi.set(e,u),x||aS(y,e,u,A.state))),i&&f===null)throw Error(l(528,""));return A}if(i&&f!==null)throw Error(l(529,""));return null;case"script":return i=u.async,u=u.src,typeof u=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Nc(u),u=$i(y).hoistableScripts,f=u.get(i),f||(f={type:"script",instance:null,count:0,state:null},u.set(i,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function Oc(e){return'href="'+ga(e)+'"'}function Mh(e){return'link[rel="stylesheet"]['+e+"]"}function Yg(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function aS(e,i,u,f){e.querySelector('link[rel="preload"][as="style"]['+i+"]")?f.loading=1:(i=e.createElement("link"),f.preload=i,i.addEventListener("load",function(){return f.loading|=1}),i.addEventListener("error",function(){return f.loading|=2}),Wn(i,"link",u),tn(i),e.head.appendChild(i))}function Nc(e){return'[src="'+ga(e)+'"]'}function Rh(e){return"script[async]"+e}function qg(e,i,u){if(i.count++,i.instance===null)switch(i.type){case"style":var f=e.querySelector('style[data-href~="'+ga(u.href)+'"]');if(f)return i.instance=f,tn(f),f;var y=b({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return f=(e.ownerDocument||e).createElement("style"),tn(f),Wn(f,"style",y),Nm(f,u.precedence,e),i.instance=f;case"stylesheet":y=Oc(u.href);var x=e.querySelector(Mh(y));if(x)return i.state.loading|=4,i.instance=x,tn(x),x;f=Yg(u),(y=Xi.get(y))&&h0(f,y),x=(e.ownerDocument||e).createElement("link"),tn(x);var A=x;return A._p=new Promise(function(O,L){A.onload=O,A.onerror=L}),Wn(x,"link",f),i.state.loading|=4,Nm(x,u.precedence,e),i.instance=x;case"script":return x=Nc(u.src),(y=e.querySelector(Rh(x)))?(i.instance=y,tn(y),y):(f=u,(y=Xi.get(x))&&(f=b({},u),d0(f,y)),e=e.ownerDocument||e,y=e.createElement("script"),tn(y),Wn(y,"link",f),e.head.appendChild(y),i.instance=y);case"void":return null;default:throw Error(l(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(f=i.instance,i.state.loading|=4,Nm(f,u.precedence,e));return i.instance}function Nm(e,i,u){for(var f=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=f.length?f[f.length-1]:null,x=y,A=0;A<f.length;A++){var O=f[A];if(O.dataset.precedence===i)x=O;else if(x!==y)break}x?x.parentNode.insertBefore(e,x.nextSibling):(i=u.nodeType===9?u.head:u,i.insertBefore(e,i.firstChild))}function h0(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.title==null&&(e.title=i.title)}function d0(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.integrity==null&&(e.integrity=i.integrity)}var wm=null;function Lg(e,i,u){if(wm===null){var f=new Map,y=wm=new Map;y.set(u,f)}else y=wm,f=y.get(u),f||(f=new Map,y.set(u,f));if(f.has(e))return f;for(f.set(e,null),u=u.getElementsByTagName(e),y=0;y<u.length;y++){var x=u[y];if(!(x[xs]||x[Ft]||e==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var A=x.getAttribute(i)||"";A=e+A;var O=f.get(A);O?O.push(x):f.set(A,[x])}}return f}function Xg(e,i,u){e=e.ownerDocument||e,e.head.insertBefore(u,i==="title"?e.querySelector("head > title"):null)}function iS(e,i,u){if(u===1||i.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return e=i.disabled,typeof i.precedence=="string"&&e==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function Vg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function lS(e,i,u,f){if(u.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var y=Oc(f.href),x=i.querySelector(Mh(y));if(x){i=x._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(e.count++,e=Bm.bind(e),i.then(e,e)),u.state.loading|=4,u.instance=x,tn(x);return}x=i.ownerDocument||i,f=Yg(f),(y=Xi.get(y))&&h0(f,y),x=x.createElement("link"),tn(x);var A=x;A._p=new Promise(function(O,L){A.onload=O,A.onerror=L}),Wn(x,"link",f),u.instance=x}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(u,i),(i=u.state.preload)&&(u.state.loading&3)===0&&(e.count++,u=Bm.bind(e),i.addEventListener("load",u),i.addEventListener("error",u))}}var m0=0;function sS(e,i){return e.stylesheets&&e.count===0&&Hm(e,e.stylesheets),0<e.count||0<e.imgCount?function(u){var f=setTimeout(function(){if(e.stylesheets&&Hm(e,e.stylesheets),e.unsuspend){var x=e.unsuspend;e.unsuspend=null,x()}},6e4+i);0<e.imgBytes&&m0===0&&(m0=62500*q2());var y=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Hm(e,e.stylesheets),e.unsuspend)){var x=e.unsuspend;e.unsuspend=null,x()}},(e.imgBytes>m0?50:800)+i);return e.unsuspend=u,function(){e.unsuspend=null,clearTimeout(f),clearTimeout(y)}}:null}function Bm(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Hm(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Um=null;function Hm(e,i){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Um=new Map,i.forEach(rS,e),Um=null,Bm.call(e))}function rS(e,i){if(!(i.state.loading&4)){var u=Um.get(e);if(u)var f=u.get(null);else{u=new Map,Um.set(e,u);for(var y=e.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<y.length;x++){var A=y[x];(A.nodeName==="LINK"||A.getAttribute("media")!=="not all")&&(u.set(A.dataset.precedence,A),f=A)}f&&u.set(null,f)}y=i.instance,A=y.getAttribute("data-precedence"),x=u.get(A)||f,x===f&&u.set(null,y),u.set(A,y),this.count++,f=Bm.bind(this),y.addEventListener("load",f),y.addEventListener("error",f),x?x.parentNode.insertBefore(y,x.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(y,e.firstChild)),i.state.loading|=4}}var zh={$$typeof:B,Provider:null,Consumer:null,_currentValue:at,_currentValue2:at,_threadCount:0};function uS(e,i,u,f,y,x,A,O,L){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=ur(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ur(0),this.hiddenUpdates=ur(null),this.identifierPrefix=f,this.onUncaughtError=y,this.onCaughtError=x,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.incompleteTransitions=new Map}function Qg(e,i,u,f,y,x,A,O,L,F,rt,dt){return e=new uS(e,i,u,A,L,F,rt,dt,O),i=1,x===!0&&(i|=24),x=Vn(3,null,null,i),e.current=x,x.stateNode=e,i=Gf(),i.refCount++,e.pooledCache=i,i.refCount++,x.memoizedState={element:f,isDehydrated:u,cache:i},Vf(x),e}function kg(e){return e?(e=Zl,e):Zl}function Kg(e,i,u,f,y,x){y=kg(y),f.context===null?f.context=y:f.pendingContext=y,f=Ni(i),f.payload={element:u},x=x===void 0?null:x,x!==null&&(f.callback=x),u=fl(e,f,i),u!==null&&(r(u,e,i),es(u,e,i))}function Zg(e,i){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var u=e.retryLane;e.retryLane=u!==0&&u<i?u:i}}function p0(e,i){Zg(e,i),(e=e.alternate)&&Zg(e,i)}function Jg(e){if(e.tag===13||e.tag===31){var i=Kl(e,67108864);i!==null&&r(i,e,67108864),p0(e,67108864)}}function Wg(e){if(e.tag===13||e.tag===31){var i=Jn();i=Si(i);var u=Kl(e,i);u!==null&&r(u,e,i),p0(e,i)}}var Gm=!0;function oS(e,i,u,f){var y=H.T;H.T=null;var x=G.p;try{G.p=2,y0(e,i,u,f)}finally{G.p=x,H.T=y}}function cS(e,i,u,f){var y=H.T;H.T=null;var x=G.p;try{G.p=8,y0(e,i,u,f)}finally{G.p=x,H.T=y}}function y0(e,i,u,f){if(Gm){var y=g0(f);if(y===null)n0(e,i,f,jm,u),Fg(e,f);else if(hS(y,e,i,u,f))f.stopPropagation();else if(Fg(e,f),i&4&&-1<fS.indexOf(e)){for(;y!==null;){var x=De(y);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var A=_i(x.pendingLanes);if(A!==0){var O=x;for(O.pendingLanes|=2,O.entangledLanes|=2;A;){var L=1<<31-Ln(A);O.entanglements[1]|=L,A&=~L}cs(x),(ne&6)===0&&(wa=ta()+500,Th(0))}}break;case 31:case 13:O=Kl(x,2),O!==null&&r(O,x,2),N(),p0(x,2)}if(x=g0(f),x===null&&n0(e,i,f,jm,u),x===y)break;y=x}y!==null&&f.stopPropagation()}else n0(e,i,f,null,u)}}function g0(e){return e=zo(e),v0(e)}var jm=null;function v0(e){if(jm=null,e=cn(e),e!==null){var i=c(e);if(i===null)e=null;else{var u=i.tag;if(u===13){if(e=d(i),e!==null)return e;e=null}else if(u===31){if(e=m(i),e!==null)return e;e=null}else if(u===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;e=null}else i!==e&&(e=null)}}return jm=e,null}function Pg(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(dd()){case md:return 2;case go:return 8;case vo:case pd:return 32;case yd:return 268435456;default:return 32}default:return 32}}var x0=!1,kr=null,Kr=null,Zr=null,Dh=new Map,Oh=new Map,Jr=[],fS="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 Fg(e,i){switch(e){case"focusin":case"focusout":kr=null;break;case"dragenter":case"dragleave":Kr=null;break;case"mouseover":case"mouseout":Zr=null;break;case"pointerover":case"pointerout":Dh.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Oh.delete(i.pointerId)}}function Nh(e,i,u,f,y,x){return e===null||e.nativeEvent!==x?(e={blockedOn:i,domEventName:u,eventSystemFlags:f,nativeEvent:x,targetContainers:[y]},i!==null&&(i=De(i),i!==null&&Jg(i)),e):(e.eventSystemFlags|=f,i=e.targetContainers,y!==null&&i.indexOf(y)===-1&&i.push(y),e)}function hS(e,i,u,f,y){switch(i){case"focusin":return kr=Nh(kr,e,i,u,f,y),!0;case"dragenter":return Kr=Nh(Kr,e,i,u,f,y),!0;case"mouseover":return Zr=Nh(Zr,e,i,u,f,y),!0;case"pointerover":var x=y.pointerId;return Dh.set(x,Nh(Dh.get(x)||null,e,i,u,f,y)),!0;case"gotpointercapture":return x=y.pointerId,Oh.set(x,Nh(Oh.get(x)||null,e,i,u,f,y)),!0}return!1}function Ig(e){var i=cn(e.target);if(i!==null){var u=c(i);if(u!==null){if(i=u.tag,i===13){if(i=d(u),i!==null){e.blockedOn=i,bi(e.priority,function(){Wg(u)});return}}else if(i===31){if(i=m(u),i!==null){e.blockedOn=i,bi(e.priority,function(){Wg(u)});return}}else if(i===3&&u.stateNode.current.memoizedState.isDehydrated){e.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ym(e){if(e.blockedOn!==null)return!1;for(var i=e.targetContainers;0<i.length;){var u=g0(e.nativeEvent);if(u===null){u=e.nativeEvent;var f=new u.constructor(u.type,u);mu=f,u.target.dispatchEvent(f),mu=null}else return i=De(u),i!==null&&Jg(i),e.blockedOn=u,!1;i.shift()}return!0}function $g(e,i,u){Ym(e)&&u.delete(i)}function dS(){x0=!1,kr!==null&&Ym(kr)&&(kr=null),Kr!==null&&Ym(Kr)&&(Kr=null),Zr!==null&&Ym(Zr)&&(Zr=null),Dh.forEach($g),Oh.forEach($g)}function qm(e,i){e.blockedOn===i&&(e.blockedOn=null,x0||(x0=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,dS)))}var Lm=null;function t1(e){Lm!==e&&(Lm=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Lm===e&&(Lm=null);for(var i=0;i<e.length;i+=3){var u=e[i],f=e[i+1],y=e[i+2];if(typeof f!="function"){if(v0(f||u)===null)continue;break}var x=De(u);x!==null&&(e.splice(i,3),i-=3,mh(x,{pending:!0,data:y,method:u.method,action:f},f,y))}}))}function wc(e){function i(L){return qm(L,e)}kr!==null&&qm(kr,e),Kr!==null&&qm(Kr,e),Zr!==null&&qm(Zr,e),Dh.forEach(i),Oh.forEach(i);for(var u=0;u<Jr.length;u++){var f=Jr[u];f.blockedOn===e&&(f.blockedOn=null)}for(;0<Jr.length&&(u=Jr[0],u.blockedOn===null);)Ig(u),u.blockedOn===null&&Jr.shift();if(u=(e.ownerDocument||e).$$reactFormReplay,u!=null)for(f=0;f<u.length;f+=3){var y=u[f],x=u[f+1],A=y[zn]||null;if(typeof x=="function")A||t1(u);else if(A){var O=null;if(x&&x.hasAttribute("formAction")){if(y=x,A=x[zn]||null)O=A.formAction;else if(v0(y)!==null)continue}else O=A.action;typeof O=="function"?u[f+1]=O:(u.splice(f,3),f-=3),t1(u)}}}function e1(){function e(x){x.canIntercept&&x.info==="react-transition"&&x.intercept({handler:function(){return new Promise(function(A){return y=A})},focusReset:"manual",scroll:"manual"})}function i(){y!==null&&(y(),y=null),f||setTimeout(u,20)}function u(){if(!f&&!navigation.transition){var x=navigation.currentEntry;x&&x.url!=null&&navigation.navigate(x.url,{state:x.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var f=!1,y=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(u,100),function(){f=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),y!==null&&(y(),y=null)}}}function _0(e){this._internalRoot=e}Xm.prototype.render=_0.prototype.render=function(e){var i=this._internalRoot;if(i===null)throw Error(l(409));var u=i.current,f=Jn();Kg(u,f,e,i,null,null)},Xm.prototype.unmount=_0.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var i=e.containerInfo;Kg(e.current,2,null,e,null,null),N(),i[Ol]=null}};function Xm(e){this._internalRoot=e}Xm.prototype.unstable_scheduleHydration=function(e){if(e){var i=Fi();e={blockedOn:null,target:e,priority:i};for(var u=0;u<Jr.length&&i!==0&&i<Jr[u].priority;u++);Jr.splice(u,0,e),u===0&&Ig(e)}};var n1=t.version;if(n1!=="19.2.4")throw Error(l(527,n1,"19.2.4"));G.findDOMNode=function(e){var i=e._reactInternals;if(i===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=v(i),e=e!==null?_(e):null,e=e===null?null:e.stateNode,e};var mS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vm.isDisabled&&Vm.supportsFiber)try{qa=Vm.inject(mS),$e=Vm}catch{}}return Bh.createRoot=function(e,i){if(!o(e))throw Error(l(299));var u=!1,f="",y=vh,x=Sm,A=yc;return i!=null&&(i.unstable_strictMode===!0&&(u=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(y=i.onUncaughtError),i.onCaughtError!==void 0&&(x=i.onCaughtError),i.onRecoverableError!==void 0&&(A=i.onRecoverableError)),i=Qg(e,1,!1,null,null,u,f,null,y,x,A,e1),e[Ol]=i.current,e0(e),new _0(i)},Bh.hydrateRoot=function(e,i,u){if(!o(e))throw Error(l(299));var f=!1,y="",x=vh,A=Sm,O=yc,L=null;return u!=null&&(u.unstable_strictMode===!0&&(f=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onUncaughtError!==void 0&&(x=u.onUncaughtError),u.onCaughtError!==void 0&&(A=u.onCaughtError),u.onRecoverableError!==void 0&&(O=u.onRecoverableError),u.formState!==void 0&&(L=u.formState)),i=Qg(e,1,!0,i,u??null,f,y,L,x,A,O,e1),i.context=kg(null),u=i.current,f=Jn(),f=Si(f),y=Ni(f),y.callback=null,fl(u,y,f),u=f,i.current.lanes=u,or(i,u),cs(i),e[Ol]=i.current,e0(e),new Xm(i)},Bh.version="19.2.4",Bh}var h1;function ES(){if(h1)return T0.exports;h1=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),T0.exports=TS(),T0.exports}var CS=ES();/**
51
+ * react-router v7.13.1
52
+ *
53
+ * Copyright (c) Remix Software Inc.
54
+ *
55
+ * This source code is licensed under the MIT license found in the
56
+ * LICENSE.md file in the root directory of this source tree.
57
+ *
58
+ * @license MIT
59
+ */var d1="popstate";function m1(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function AS(n={}){function t(l,o){var v;let c=(v=o.state)==null?void 0:v.masked,{pathname:d,search:m,hash:p}=c||l.location;return cy("",{pathname:d,search:m,hash:p},o.state&&o.state.usr||null,o.state&&o.state.key||"default",c?{pathname:l.location.pathname,search:l.location.search,hash:l.location.hash}:void 0)}function a(l,o){return typeof o=="string"?o:td(o)}return RS(t,a,null,n)}function Qe(n,t){if(n===!1||n===null||typeof n>"u")throw new Error(t)}function Rl(n,t){if(!n){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function MS(){return Math.random().toString(36).substring(2,10)}function p1(n,t){return{usr:n.state,key:n.key,idx:t,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function cy(n,t,a=null,l,o){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof t=="string"?Fc(t):t,state:a,key:t&&t.key||l||MS(),unstable_mask:o}}function td({pathname:n="/",search:t="",hash:a=""}){return t&&t!=="?"&&(n+=t.charAt(0)==="?"?t:"?"+t),a&&a!=="#"&&(n+=a.charAt(0)==="#"?a:"#"+a),n}function Fc(n){let t={};if(n){let a=n.indexOf("#");a>=0&&(t.hash=n.substring(a),n=n.substring(0,a));let l=n.indexOf("?");l>=0&&(t.search=n.substring(l),n=n.substring(0,l)),n&&(t.pathname=n)}return t}function RS(n,t,a,l={}){let{window:o=document.defaultView,v5Compat:c=!1}=l,d=o.history,m="POP",p=null,v=_();v==null&&(v=0,d.replaceState({...d.state,idx:v},""));function _(){return(d.state||{idx:null}).idx}function b(){m="POP";let M=_(),D=M==null?null:M-v;v=M,p&&p({action:m,location:z.location,delta:D})}function E(M,D){m="PUSH";let w=m1(M)?M:cy(z.location,M,D);v=_()+1;let B=p1(w,v),U=z.createHref(w.unstable_mask||w);try{d.pushState(B,"",U)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;o.location.assign(U)}c&&p&&p({action:m,location:z.location,delta:1})}function C(M,D){m="REPLACE";let w=m1(M)?M:cy(z.location,M,D);v=_();let B=p1(w,v),U=z.createHref(w.unstable_mask||w);d.replaceState(B,"",U),c&&p&&p({action:m,location:z.location,delta:0})}function R(M){return zS(M)}let z={get action(){return m},get location(){return n(o,d)},listen(M){if(p)throw new Error("A history only accepts one active listener");return o.addEventListener(d1,b),p=M,()=>{o.removeEventListener(d1,b),p=null}},createHref(M){return t(o,M)},createURL:R,encodeLocation(M){let D=R(M);return{pathname:D.pathname,search:D.search,hash:D.hash}},push:E,replace:C,go(M){return d.go(M)}};return z}function zS(n,t=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),Qe(a,"No window.location.(origin|href) available to create URL");let l=typeof n=="string"?n:td(n);return l=l.replace(/ $/,"%20"),!t&&l.startsWith("//")&&(l=a+l),new URL(l,a)}function gx(n,t,a="/"){return DS(n,t,a,!1)}function DS(n,t,a,l){let o=typeof t=="string"?Fc(t):t,c=ar(o.pathname||"/",a);if(c==null)return null;let d=vx(n);OS(d);let m=null;for(let p=0;m==null&&p<d.length;++p){let v=XS(c);m=qS(d[p],v,l)}return m}function vx(n,t=[],a=[],l="",o=!1){let c=(d,m,p=o,v)=>{let _={relativePath:v===void 0?d.path||"":v,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};if(_.relativePath.startsWith("/")){if(!_.relativePath.startsWith(l)&&p)return;Qe(_.relativePath.startsWith(l),`Absolute route path "${_.relativePath}" nested under path "${l}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),_.relativePath=_.relativePath.slice(l.length)}let b=ds([l,_.relativePath]),E=a.concat(_);d.children&&d.children.length>0&&(Qe(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),vx(d.children,t,E,b,p)),!(d.path==null&&!d.index)&&t.push({path:b,score:jS(b,d.index),routesMeta:E})};return n.forEach((d,m)=>{var p;if(d.path===""||!((p=d.path)!=null&&p.includes("?")))c(d,m);else for(let v of xx(d.path))c(d,m,!0,v)}),t}function xx(n){let t=n.split("/");if(t.length===0)return[];let[a,...l]=t,o=a.endsWith("?"),c=a.replace(/\?$/,"");if(l.length===0)return o?[c,""]:[c];let d=xx(l.join("/")),m=[];return m.push(...d.map(p=>p===""?c:[c,p].join("/"))),o&&m.push(...d),m.map(p=>n.startsWith("/")&&p===""?"/":p)}function OS(n){n.sort((t,a)=>t.score!==a.score?a.score-t.score:YS(t.routesMeta.map(l=>l.childrenIndex),a.routesMeta.map(l=>l.childrenIndex)))}var NS=/^:[\w-]+$/,wS=3,BS=2,US=1,HS=10,GS=-2,y1=n=>n==="*";function jS(n,t){let a=n.split("/"),l=a.length;return a.some(y1)&&(l+=GS),t&&(l+=BS),a.filter(o=>!y1(o)).reduce((o,c)=>o+(NS.test(c)?wS:c===""?US:HS),l)}function YS(n,t){return n.length===t.length&&n.slice(0,-1).every((l,o)=>l===t[o])?n[n.length-1]-t[t.length-1]:0}function qS(n,t,a=!1){let{routesMeta:l}=n,o={},c="/",d=[];for(let m=0;m<l.length;++m){let p=l[m],v=m===l.length-1,_=c==="/"?t:t.slice(c.length)||"/",b=yp({path:p.relativePath,caseSensitive:p.caseSensitive,end:v},_),E=p.route;if(!b&&v&&a&&!l[l.length-1].route.index&&(b=yp({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},_)),!b)return null;Object.assign(o,b.params),d.push({params:o,pathname:ds([c,b.pathname]),pathnameBase:KS(ds([c,b.pathnameBase])),route:E}),b.pathnameBase!=="/"&&(c=ds([c,b.pathnameBase]))}return d}function yp(n,t){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[a,l]=LS(n.path,n.caseSensitive,n.end),o=t.match(a);if(!o)return null;let c=o[0],d=c.replace(/(.)\/+$/,"$1"),m=o.slice(1);return{params:l.reduce((v,{paramName:_,isOptional:b},E)=>{if(_==="*"){let R=m[E]||"";d=c.slice(0,c.length-R.length).replace(/(.)\/+$/,"$1")}const C=m[E];return b&&!C?v[_]=void 0:v[_]=(C||"").replace(/%2F/g,"/"),v},{}),pathname:c,pathnameBase:d,pattern:n}}function LS(n,t=!1,a=!0){Rl(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let l=[],o="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,p,v,_)=>{if(l.push({paramName:m,isOptional:p!=null}),p){let b=_.charAt(v+d.length);return b&&b!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(l.push({paramName:"*"}),o+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?o+="\\/*$":n!==""&&n!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),l]}function XS(n){try{return n.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Rl(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),n}}function ar(n,t){if(t==="/")return n;if(!n.toLowerCase().startsWith(t.toLowerCase()))return null;let a=t.endsWith("/")?t.length-1:t.length,l=n.charAt(a);return l&&l!=="/"?null:n.slice(a)||"/"}var VS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function QS(n,t="/"){let{pathname:a,search:l="",hash:o=""}=typeof n=="string"?Fc(n):n,c;return a?(a=a.replace(/\/\/+/g,"/"),a.startsWith("/")?c=g1(a.substring(1),"/"):c=g1(a,t)):c=t,{pathname:c,search:ZS(l),hash:JS(o)}}function g1(n,t){let a=t.replace(/\/+$/,"").split("/");return n.split("/").forEach(o=>{o===".."?a.length>1&&a.pop():o!=="."&&a.push(o)}),a.length>1?a.join("/"):"/"}function M0(n,t,a,l){return`Cannot include a '${n}' character in a manually specified \`to.${t}\` field [${JSON.stringify(l)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function kS(n){return n.filter((t,a)=>a===0||t.route.path&&t.route.path.length>0)}function Yy(n){let t=kS(n);return t.map((a,l)=>l===t.length-1?a.pathname:a.pathnameBase)}function Ap(n,t,a,l=!1){let o;typeof n=="string"?o=Fc(n):(o={...n},Qe(!o.pathname||!o.pathname.includes("?"),M0("?","pathname","search",o)),Qe(!o.pathname||!o.pathname.includes("#"),M0("#","pathname","hash",o)),Qe(!o.search||!o.search.includes("#"),M0("#","search","hash",o)));let c=n===""||o.pathname==="",d=c?"/":o.pathname,m;if(d==null)m=a;else{let b=t.length-1;if(!l&&d.startsWith("..")){let E=d.split("/");for(;E[0]==="..";)E.shift(),b-=1;o.pathname=E.join("/")}m=b>=0?t[b]:"/"}let p=QS(o,m),v=d&&d!=="/"&&d.endsWith("/"),_=(c||d===".")&&a.endsWith("/");return!p.pathname.endsWith("/")&&(v||_)&&(p.pathname+="/"),p}var ds=n=>n.join("/").replace(/\/\/+/g,"/"),KS=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),ZS=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,JS=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,WS=class{constructor(n,t,a,l=!1){this.status=n,this.statusText=t||"",this.internal=l,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function PS(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function FS(n){return n.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var _x=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Sx(n,t){let a=n;if(typeof a!="string"||!VS.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let l=a,o=!1;if(_x)try{let c=new URL(window.location.href),d=a.startsWith("//")?new URL(c.protocol+a):new URL(a),m=ar(d.pathname,t);d.origin===c.origin&&m!=null?a=m+d.search+d.hash:o=!0}catch{Rl(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:l,isExternal:o,to:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var bx=["POST","PUT","PATCH","DELETE"];new Set(bx);var IS=["GET",...bx];new Set(IS);var Ic=Y.createContext(null);Ic.displayName="DataRouter";var Mp=Y.createContext(null);Mp.displayName="DataRouterState";var $S=Y.createContext(!1),Tx=Y.createContext({isTransitioning:!1});Tx.displayName="ViewTransition";var tb=Y.createContext(new Map);tb.displayName="Fetchers";var eb=Y.createContext(null);eb.displayName="Await";var xi=Y.createContext(null);xi.displayName="Navigation";var rd=Y.createContext(null);rd.displayName="Location";var zl=Y.createContext({outlet:null,matches:[],isDataRoute:!1});zl.displayName="Route";var qy=Y.createContext(null);qy.displayName="RouteError";var Ex="REACT_ROUTER_ERROR",nb="REDIRECT",ab="ROUTE_ERROR_RESPONSE";function ib(n){if(n.startsWith(`${Ex}:${nb}:{`))try{let t=JSON.parse(n.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function lb(n){if(n.startsWith(`${Ex}:${ab}:{`))try{let t=JSON.parse(n.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new WS(t.status,t.statusText,t.data)}catch{}}function sb(n,{relative:t}={}){Qe($c(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:l}=Y.useContext(xi),{hash:o,pathname:c,search:d}=ud(n,{relative:t}),m=c;return a!=="/"&&(m=c==="/"?a:ds([a,c])),l.createHref({pathname:m,search:d,hash:o})}function $c(){return Y.useContext(rd)!=null}function ms(){return Qe($c(),"useLocation() may be used only in the context of a <Router> component."),Y.useContext(rd).location}var Cx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ax(n){Y.useContext(xi).static||Y.useLayoutEffect(n)}function Rp(){let{isDataRoute:n}=Y.useContext(zl);return n?Sb():rb()}function rb(){Qe($c(),"useNavigate() may be used only in the context of a <Router> component.");let n=Y.useContext(Ic),{basename:t,navigator:a}=Y.useContext(xi),{matches:l}=Y.useContext(zl),{pathname:o}=ms(),c=JSON.stringify(Yy(l)),d=Y.useRef(!1);return Ax(()=>{d.current=!0}),Y.useCallback((p,v={})=>{if(Rl(d.current,Cx),!d.current)return;if(typeof p=="number"){a.go(p);return}let _=Ap(p,JSON.parse(c),o,v.relative==="path");n==null&&t!=="/"&&(_.pathname=_.pathname==="/"?t:ds([t,_.pathname])),(v.replace?a.replace:a.push)(_,v.state,v)},[t,a,c,o,n])}var ub=Y.createContext(null);function ob(n){let t=Y.useContext(zl).outlet;return Y.useMemo(()=>t&&Y.createElement(ub.Provider,{value:n},t),[t,n])}function ud(n,{relative:t}={}){let{matches:a}=Y.useContext(zl),{pathname:l}=ms(),o=JSON.stringify(Yy(a));return Y.useMemo(()=>Ap(n,JSON.parse(o),l,t==="path"),[n,o,l,t])}function cb(n,t){return Mx(n,t)}function Mx(n,t,a){var M;Qe($c(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:l}=Y.useContext(xi),{matches:o}=Y.useContext(zl),c=o[o.length-1],d=c?c.params:{},m=c?c.pathname:"/",p=c?c.pathnameBase:"/",v=c&&c.route;{let D=v&&v.path||"";zx(m,!v||D.endsWith("*")||D.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${D}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
60
+
61
+ Please change the parent <Route path="${D}"> to <Route path="${D==="/"?"*":`${D}/*`}">.`)}let _=ms(),b;if(t){let D=typeof t=="string"?Fc(t):t;Qe(p==="/"||((M=D.pathname)==null?void 0:M.startsWith(p)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${D.pathname}" was given in the \`location\` prop.`),b=D}else b=_;let E=b.pathname||"/",C=E;if(p!=="/"){let D=p.replace(/^\//,"").split("/");C="/"+E.replace(/^\//,"").split("/").slice(D.length).join("/")}let R=gx(n,{pathname:C});Rl(v||R!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),Rl(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let z=pb(R&&R.map(D=>Object.assign({},D,{params:Object.assign({},d,D.params),pathname:ds([p,l.encodeLocation?l.encodeLocation(D.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:D.pathname]),pathnameBase:D.pathnameBase==="/"?p:ds([p,l.encodeLocation?l.encodeLocation(D.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:D.pathnameBase])})),o,a);return t&&z?Y.createElement(rd.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...b},navigationType:"POP"}},z):z}function fb(){let n=_b(),t=PS(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),a=n instanceof Error?n.stack:null,l="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:l},c={padding:"2px 4px",backgroundColor:l},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=Y.createElement(Y.Fragment,null,Y.createElement("p",null,"💿 Hey developer 👋"),Y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",Y.createElement("code",{style:c},"ErrorBoundary")," or"," ",Y.createElement("code",{style:c},"errorElement")," prop on your route.")),Y.createElement(Y.Fragment,null,Y.createElement("h2",null,"Unexpected Application Error!"),Y.createElement("h3",{style:{fontStyle:"italic"}},t),a?Y.createElement("pre",{style:o},a):null,d)}var hb=Y.createElement(fb,null),Rx=class extends Y.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,t){return t.location!==n.location||t.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:t.error,location:t.location,revalidation:n.revalidation||t.revalidation}}componentDidCatch(n,t){this.props.onError?this.props.onError(n,t):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const a=lb(n.digest);a&&(n=a)}let t=n!==void 0?Y.createElement(zl.Provider,{value:this.props.routeContext},Y.createElement(qy.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?Y.createElement(db,{error:n},t):t}};Rx.contextType=$S;var R0=new WeakMap;function db({children:n,error:t}){let{basename:a}=Y.useContext(xi);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let l=ib(t.digest);if(l){let o=R0.get(t);if(o)throw o;let c=Sx(l.location,a);if(_x&&!R0.get(t))if(c.isExternal||l.reloadDocument)window.location.href=c.absoluteURL||c.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:l.replace}));throw R0.set(t,d),d}return Y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c.absoluteURL||c.to}`})}}return n}function mb({routeContext:n,match:t,children:a}){let l=Y.useContext(Ic);return l&&l.static&&l.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=t.route.id),Y.createElement(zl.Provider,{value:n},a)}function pb(n,t=[],a){let l=a==null?void 0:a.state;if(n==null){if(!l)return null;if(l.errors)n=l.matches;else if(t.length===0&&!l.initialized&&l.matches.length>0)n=l.matches;else return null}let o=n,c=l==null?void 0:l.errors;if(c!=null){let _=o.findIndex(b=>b.route.id&&(c==null?void 0:c[b.route.id])!==void 0);Qe(_>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),o=o.slice(0,Math.min(o.length,_+1))}let d=!1,m=-1;if(a&&l){d=l.renderFallback;for(let _=0;_<o.length;_++){let b=o[_];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(m=_),b.route.id){let{loaderData:E,errors:C}=l,R=b.route.loader&&!E.hasOwnProperty(b.route.id)&&(!C||C[b.route.id]===void 0);if(b.route.lazy||R){a.isStatic&&(d=!0),m>=0?o=o.slice(0,m+1):o=[o[0]];break}}}}let p=a==null?void 0:a.onError,v=l&&p?(_,b)=>{var E,C;p(_,{location:l.location,params:((C=(E=l.matches)==null?void 0:E[0])==null?void 0:C.params)??{},unstable_pattern:FS(l.matches),errorInfo:b})}:void 0;return o.reduceRight((_,b,E)=>{let C,R=!1,z=null,M=null;l&&(C=c&&b.route.id?c[b.route.id]:void 0,z=b.route.errorElement||hb,d&&(m<0&&E===0?(zx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,M=null):m===E&&(R=!0,M=b.route.hydrateFallbackElement||null)));let D=t.concat(o.slice(0,E+1)),w=()=>{let B;return C?B=z:R?B=M:b.route.Component?B=Y.createElement(b.route.Component,null):b.route.element?B=b.route.element:B=_,Y.createElement(mb,{match:b,routeContext:{outlet:_,matches:D,isDataRoute:l!=null},children:B})};return l&&(b.route.ErrorBoundary||b.route.errorElement||E===0)?Y.createElement(Rx,{location:l.location,revalidation:l.revalidation,component:z,error:C,children:w(),routeContext:{outlet:null,matches:D,isDataRoute:!0},onError:v}):w()},null)}function Ly(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yb(n){let t=Y.useContext(Ic);return Qe(t,Ly(n)),t}function gb(n){let t=Y.useContext(Mp);return Qe(t,Ly(n)),t}function vb(n){let t=Y.useContext(zl);return Qe(t,Ly(n)),t}function Xy(n){let t=vb(n),a=t.matches[t.matches.length-1];return Qe(a.route.id,`${n} can only be used on routes that contain a unique "id"`),a.route.id}function xb(){return Xy("useRouteId")}function _b(){var l;let n=Y.useContext(qy),t=gb("useRouteError"),a=Xy("useRouteError");return n!==void 0?n:(l=t.errors)==null?void 0:l[a]}function Sb(){let{router:n}=yb("useNavigate"),t=Xy("useNavigate"),a=Y.useRef(!1);return Ax(()=>{a.current=!0}),Y.useCallback(async(o,c={})=>{Rl(a.current,Cx),a.current&&(typeof o=="number"?await n.navigate(o):await n.navigate(o,{fromRouteId:t,...c}))},[n,t])}var v1={};function zx(n,t,a){!t&&!v1[n]&&(v1[n]=!0,Rl(!1,a))}Y.memo(bb);function bb({routes:n,future:t,state:a,isStatic:l,onError:o}){return Mx(n,void 0,{state:a,isStatic:l,onError:o})}function Tb({to:n,replace:t,state:a,relative:l}){Qe($c(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=Y.useContext(xi);Rl(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:c}=Y.useContext(zl),{pathname:d}=ms(),m=Rp(),p=Ap(n,Yy(c),d,l==="path"),v=JSON.stringify(p);return Y.useEffect(()=>{m(JSON.parse(v),{replace:t,state:a,relative:l})},[m,v,l,t,a]),null}function Eb(n){return ob(n.context)}function Pr(n){Qe(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Cb({basename:n="/",children:t=null,location:a,navigationType:l="POP",navigator:o,static:c=!1,unstable_useTransitions:d}){Qe(!$c(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=n.replace(/^\/*/,"/"),p=Y.useMemo(()=>({basename:m,navigator:o,static:c,unstable_useTransitions:d,future:{}}),[m,o,c,d]);typeof a=="string"&&(a=Fc(a));let{pathname:v="/",search:_="",hash:b="",state:E=null,key:C="default",unstable_mask:R}=a,z=Y.useMemo(()=>{let M=ar(v,m);return M==null?null:{location:{pathname:M,search:_,hash:b,state:E,key:C,unstable_mask:R},navigationType:l}},[m,v,_,b,E,C,l,R]);return Rl(z!=null,`<Router basename="${m}"> is not able to match the URL "${v}${_}${b}" because it does not start with the basename, so the <Router> won't render anything.`),z==null?null:Y.createElement(xi.Provider,{value:p},Y.createElement(rd.Provider,{children:t,value:z}))}function Ab({children:n,location:t}){return cb(fy(n),t)}function fy(n,t=[]){let a=[];return Y.Children.forEach(n,(l,o)=>{if(!Y.isValidElement(l))return;let c=[...t,o];if(l.type===Y.Fragment){a.push.apply(a,fy(l.props.children,c));return}Qe(l.type===Pr,`[${typeof l.type=="string"?l.type:l.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Qe(!l.props.index||!l.props.children,"An index route cannot have child routes.");let d={id:l.props.id||c.join("-"),caseSensitive:l.props.caseSensitive,element:l.props.element,Component:l.props.Component,index:l.props.index,path:l.props.path,middleware:l.props.middleware,loader:l.props.loader,action:l.props.action,hydrateFallbackElement:l.props.hydrateFallbackElement,HydrateFallback:l.props.HydrateFallback,errorElement:l.props.errorElement,ErrorBoundary:l.props.ErrorBoundary,hasErrorBoundary:l.props.hasErrorBoundary===!0||l.props.ErrorBoundary!=null||l.props.errorElement!=null,shouldRevalidate:l.props.shouldRevalidate,handle:l.props.handle,lazy:l.props.lazy};l.props.children&&(d.children=fy(l.props.children,c)),a.push(d)}),a}var cp="get",fp="application/x-www-form-urlencoded";function zp(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Mb(n){return zp(n)&&n.tagName.toLowerCase()==="button"}function Rb(n){return zp(n)&&n.tagName.toLowerCase()==="form"}function zb(n){return zp(n)&&n.tagName.toLowerCase()==="input"}function Db(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Ob(n,t){return n.button===0&&(!t||t==="_self")&&!Db(n)}var km=null;function Nb(){if(km===null)try{new FormData(document.createElement("form"),0),km=!1}catch{km=!0}return km}var wb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function z0(n){return n!=null&&!wb.has(n)?(Rl(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${fp}"`),null):n}function Bb(n,t){let a,l,o,c,d;if(Rb(n)){let m=n.getAttribute("action");l=m?ar(m,t):null,a=n.getAttribute("method")||cp,o=z0(n.getAttribute("enctype"))||fp,c=new FormData(n)}else if(Mb(n)||zb(n)&&(n.type==="submit"||n.type==="image")){let m=n.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=n.getAttribute("formaction")||m.getAttribute("action");if(l=p?ar(p,t):null,a=n.getAttribute("formmethod")||m.getAttribute("method")||cp,o=z0(n.getAttribute("formenctype"))||z0(m.getAttribute("enctype"))||fp,c=new FormData(m,n),!Nb()){let{name:v,type:_,value:b}=n;if(_==="image"){let E=v?`${v}.`:"";c.append(`${E}x`,"0"),c.append(`${E}y`,"0")}else v&&c.append(v,b)}}else{if(zp(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=cp,l=null,o=fp,d=n}return c&&o==="text/plain"&&(d=c,c=void 0),{action:l,method:a.toLowerCase(),encType:o,formData:c,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Vy(n,t){if(n===!1||n===null||typeof n>"u")throw new Error(t)}function Ub(n,t,a,l){let o=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return a?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${l}`:o.pathname=`${o.pathname}.${l}`:o.pathname==="/"?o.pathname=`_root.${l}`:t&&ar(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${l}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${l}`,o}async function Hb(n,t){if(n.id in t)return t[n.id];try{let a=await import(n.module);return t[n.id]=a,a}catch(a){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Gb(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function jb(n,t,a){let l=await Promise.all(n.map(async o=>{let c=t.routes[o.route.id];if(c){let d=await Hb(c,a);return d.links?d.links():[]}return[]}));return Xb(l.flat(1).filter(Gb).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function x1(n,t,a,l,o,c){let d=(p,v)=>a[v]?p.route.id!==a[v].route.id:!0,m=(p,v)=>{var _;return a[v].pathname!==p.pathname||((_=a[v].route.path)==null?void 0:_.endsWith("*"))&&a[v].params["*"]!==p.params["*"]};return c==="assets"?t.filter((p,v)=>d(p,v)||m(p,v)):c==="data"?t.filter((p,v)=>{var b;let _=l.routes[p.route.id];if(!_||!_.hasLoader)return!1;if(d(p,v)||m(p,v))return!0;if(p.route.shouldRevalidate){let E=p.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((b=a[0])==null?void 0:b.params)||{},nextUrl:new URL(n,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof E=="boolean")return E}return!0}):[]}function Yb(n,t,{includeHydrateFallback:a}={}){return qb(n.map(l=>{let o=t.routes[l.route.id];if(!o)return[];let c=[o.module];return o.clientActionModule&&(c=c.concat(o.clientActionModule)),o.clientLoaderModule&&(c=c.concat(o.clientLoaderModule)),a&&o.hydrateFallbackModule&&(c=c.concat(o.hydrateFallbackModule)),o.imports&&(c=c.concat(o.imports)),c}).flat(1))}function qb(n){return[...new Set(n)]}function Lb(n){let t={},a=Object.keys(n).sort();for(let l of a)t[l]=n[l];return t}function Xb(n,t){let a=new Set;return new Set(t),n.reduce((l,o)=>{let c=JSON.stringify(Lb(o));return a.has(c)||(a.add(c),l.push({key:c,link:o})),l},[])}function Dx(){let n=Y.useContext(Ic);return Vy(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Vb(){let n=Y.useContext(Mp);return Vy(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Qy=Y.createContext(void 0);Qy.displayName="FrameworkContext";function Ox(){let n=Y.useContext(Qy);return Vy(n,"You must render this element inside a <HydratedRouter> element"),n}function Qb(n,t){let a=Y.useContext(Qy),[l,o]=Y.useState(!1),[c,d]=Y.useState(!1),{onFocus:m,onBlur:p,onMouseEnter:v,onMouseLeave:_,onTouchStart:b}=t,E=Y.useRef(null);Y.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let z=D=>{D.forEach(w=>{d(w.isIntersecting)})},M=new IntersectionObserver(z,{threshold:.5});return E.current&&M.observe(E.current),()=>{M.disconnect()}}},[n]),Y.useEffect(()=>{if(l){let z=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(z)}}},[l]);let C=()=>{o(!0)},R=()=>{o(!1),d(!1)};return a?n!=="intent"?[c,E,{}]:[c,E,{onFocus:Uh(m,C),onBlur:Uh(p,R),onMouseEnter:Uh(v,C),onMouseLeave:Uh(_,R),onTouchStart:Uh(b,C)}]:[!1,E,{}]}function Uh(n,t){return a=>{n&&n(a),a.defaultPrevented||t(a)}}function kb({page:n,...t}){let{router:a}=Dx(),l=Y.useMemo(()=>gx(a.routes,n,a.basename),[a.routes,n,a.basename]);return l?Y.createElement(Zb,{page:n,matches:l,...t}):null}function Kb(n){let{manifest:t,routeModules:a}=Ox(),[l,o]=Y.useState([]);return Y.useEffect(()=>{let c=!1;return jb(n,t,a).then(d=>{c||o(d)}),()=>{c=!0}},[n,t,a]),l}function Zb({page:n,matches:t,...a}){let l=ms(),{future:o,manifest:c,routeModules:d}=Ox(),{basename:m}=Dx(),{loaderData:p,matches:v}=Vb(),_=Y.useMemo(()=>x1(n,t,v,c,l,"data"),[n,t,v,c,l]),b=Y.useMemo(()=>x1(n,t,v,c,l,"assets"),[n,t,v,c,l]),E=Y.useMemo(()=>{if(n===l.pathname+l.search+l.hash)return[];let z=new Set,M=!1;if(t.forEach(w=>{var U;let B=c.routes[w.route.id];!B||!B.hasLoader||(!_.some(k=>k.route.id===w.route.id)&&w.route.id in p&&((U=d[w.route.id])!=null&&U.shouldRevalidate)||B.hasClientLoader?M=!0:z.add(w.route.id))}),z.size===0)return[];let D=Ub(n,m,o.unstable_trailingSlashAwareDataRequests,"data");return M&&z.size>0&&D.searchParams.set("_routes",t.filter(w=>z.has(w.route.id)).map(w=>w.route.id).join(",")),[D.pathname+D.search]},[m,o.unstable_trailingSlashAwareDataRequests,p,l,c,_,t,n,d]),C=Y.useMemo(()=>Yb(b,c),[b,c]),R=Kb(b);return Y.createElement(Y.Fragment,null,E.map(z=>Y.createElement("link",{key:z,rel:"prefetch",as:"fetch",href:z,...a})),C.map(z=>Y.createElement("link",{key:z,rel:"modulepreload",href:z,...a})),R.map(({key:z,link:M})=>Y.createElement("link",{key:z,nonce:a.nonce,...M,crossOrigin:M.crossOrigin??a.crossOrigin})))}function Jb(...n){return t=>{n.forEach(a=>{typeof a=="function"?a(t):a!=null&&(a.current=t)})}}var Wb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Wb&&(window.__reactRouterVersion="7.13.1")}catch{}function Pb({basename:n,children:t,unstable_useTransitions:a,window:l}){let o=Y.useRef();o.current==null&&(o.current=AS({window:l,v5Compat:!0}));let c=o.current,[d,m]=Y.useState({action:c.action,location:c.location}),p=Y.useCallback(v=>{a===!1?m(v):Y.startTransition(()=>m(v))},[a]);return Y.useLayoutEffect(()=>c.listen(p),[c,p]),Y.createElement(Cb,{basename:n,children:t,location:d.location,navigationType:d.action,navigator:c,unstable_useTransitions:a})}var Nx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wx=Y.forwardRef(function({onClick:t,discover:a="render",prefetch:l="none",relative:o,reloadDocument:c,replace:d,unstable_mask:m,state:p,target:v,to:_,preventScrollReset:b,viewTransition:E,unstable_defaultShouldRevalidate:C,...R},z){let{basename:M,navigator:D,unstable_useTransitions:w}=Y.useContext(xi),B=typeof _=="string"&&Nx.test(_),U=Sx(_,M);_=U.to;let k=sb(_,{relative:o}),Q=ms(),V=null;if(m){let Ct=Ap(m,[],Q.unstable_mask?Q.unstable_mask.pathname:"/",!0);M!=="/"&&(Ct.pathname=Ct.pathname==="/"?M:ds([M,Ct.pathname])),V=D.createHref(Ct)}let[ft,lt,st]=Qb(l,R),ut=$b(_,{replace:d,unstable_mask:m,state:p,target:v,preventScrollReset:b,relative:o,viewTransition:E,unstable_defaultShouldRevalidate:C,unstable_useTransitions:w});function pt(Ct){t&&t(Ct),Ct.defaultPrevented||ut(Ct)}let gt=!(U.isExternal||c),xt=Y.createElement("a",{...R,...st,href:(gt?V:void 0)||U.absoluteURL||k,onClick:gt?pt:t,ref:Jb(z,lt),target:v,"data-discover":!B&&a==="render"?"true":void 0});return ft&&!B?Y.createElement(Y.Fragment,null,xt,Y.createElement(kb,{page:k})):xt});wx.displayName="Link";var Qh=Y.forwardRef(function({"aria-current":t="page",caseSensitive:a=!1,className:l="",end:o=!1,style:c,to:d,viewTransition:m,children:p,...v},_){let b=ud(d,{relative:v.relative}),E=ms(),C=Y.useContext(Mp),{navigator:R,basename:z}=Y.useContext(xi),M=C!=null&&iT(b)&&m===!0,D=R.encodeLocation?R.encodeLocation(b).pathname:b.pathname,w=E.pathname,B=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;a||(w=w.toLowerCase(),B=B?B.toLowerCase():null,D=D.toLowerCase()),B&&z&&(B=ar(B,z)||B);const U=D!=="/"&&D.endsWith("/")?D.length-1:D.length;let k=w===D||!o&&w.startsWith(D)&&w.charAt(U)==="/",Q=B!=null&&(B===D||!o&&B.startsWith(D)&&B.charAt(D.length)==="/"),V={isActive:k,isPending:Q,isTransitioning:M},ft=k?t:void 0,lt;typeof l=="function"?lt=l(V):lt=[l,k?"active":null,Q?"pending":null,M?"transitioning":null].filter(Boolean).join(" ");let st=typeof c=="function"?c(V):c;return Y.createElement(wx,{...v,"aria-current":ft,className:lt,ref:_,style:st,to:d,viewTransition:m},typeof p=="function"?p(V):p)});Qh.displayName="NavLink";var Fb=Y.forwardRef(({discover:n="render",fetcherKey:t,navigate:a,reloadDocument:l,replace:o,state:c,method:d=cp,action:m,onSubmit:p,relative:v,preventScrollReset:_,viewTransition:b,unstable_defaultShouldRevalidate:E,...C},R)=>{let{unstable_useTransitions:z}=Y.useContext(xi),M=nT(),D=aT(m,{relative:v}),w=d.toLowerCase()==="get"?"get":"post",B=typeof m=="string"&&Nx.test(m),U=k=>{if(p&&p(k),k.defaultPrevented)return;k.preventDefault();let Q=k.nativeEvent.submitter,V=(Q==null?void 0:Q.getAttribute("formmethod"))||d,ft=()=>M(Q||k.currentTarget,{fetcherKey:t,method:V,navigate:a,replace:o,state:c,relative:v,preventScrollReset:_,viewTransition:b,unstable_defaultShouldRevalidate:E});z&&a!==!1?Y.startTransition(()=>ft()):ft()};return Y.createElement("form",{ref:R,method:w,action:D,onSubmit:l?p:U,...C,"data-discover":!B&&n==="render"?"true":void 0})});Fb.displayName="Form";function Ib(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Bx(n){let t=Y.useContext(Ic);return Qe(t,Ib(n)),t}function $b(n,{target:t,replace:a,unstable_mask:l,state:o,preventScrollReset:c,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:p,unstable_useTransitions:v}={}){let _=Rp(),b=ms(),E=ud(n,{relative:d});return Y.useCallback(C=>{if(Ob(C,t)){C.preventDefault();let R=a!==void 0?a:td(b)===td(E),z=()=>_(n,{replace:R,unstable_mask:l,state:o,preventScrollReset:c,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:p});v?Y.startTransition(()=>z()):z()}},[b,_,E,a,l,o,t,n,c,d,m,p,v])}var tT=0,eT=()=>`__${String(++tT)}__`;function nT(){let{router:n}=Bx("useSubmit"),{basename:t}=Y.useContext(xi),a=xb(),l=n.fetch,o=n.navigate;return Y.useCallback(async(c,d={})=>{let{action:m,method:p,encType:v,formData:_,body:b}=Bb(c,t);if(d.navigate===!1){let E=d.fetcherKey||eT();await l(E,a,d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:_,body:b,formMethod:d.method||p,formEncType:d.encType||v,flushSync:d.flushSync})}else await o(d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:_,body:b,formMethod:d.method||p,formEncType:d.encType||v,replace:d.replace,state:d.state,fromRouteId:a,flushSync:d.flushSync,viewTransition:d.viewTransition})},[l,o,t,a])}function aT(n,{relative:t}={}){let{basename:a}=Y.useContext(xi),l=Y.useContext(zl);Qe(l,"useFormAction must be used inside a RouteContext");let[o]=l.matches.slice(-1),c={...ud(n||".",{relative:t})},d=ms();if(n==null){c.search=d.search;let m=new URLSearchParams(c.search),p=m.getAll("index");if(p.some(_=>_==="")){m.delete("index"),p.filter(b=>b).forEach(b=>m.append("index",b));let _=m.toString();c.search=_?`?${_}`:""}}return(!n||n===".")&&o.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(c.pathname=c.pathname==="/"?a:ds([a,c.pathname])),td(c)}function iT(n,{relative:t}={}){let a=Y.useContext(Tx);Qe(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:l}=Bx("useViewTransitionState"),o=ud(n,{relative:t});if(!a.isTransitioning)return!1;let c=ar(a.currentLocation.pathname,l)||a.currentLocation.pathname,d=ar(a.nextLocation.pathname,l)||a.nextLocation.pathname;return yp(o.pathname,d)!=null||yp(o.pathname,c)!=null}const _1=n=>{let t;const a=new Set,l=(v,_)=>{const b=typeof v=="function"?v(t):v;if(!Object.is(b,t)){const E=t;t=_??(typeof b!="object"||b===null)?b:Object.assign({},t,b),a.forEach(C=>C(t,E))}},o=()=>t,m={setState:l,getState:o,getInitialState:()=>p,subscribe:v=>(a.add(v),()=>a.delete(v))},p=t=n(l,o,m);return m},lT=(n=>n?_1(n):_1),sT=n=>n;function rT(n,t=sT){const a=Qm.useSyncExternalStore(n.subscribe,Qm.useCallback(()=>t(n.getState()),[n,t]),Qm.useCallback(()=>t(n.getInitialState()),[n,t]));return Qm.useDebugValue(a),a}const S1=n=>{const t=lT(n),a=l=>rT(t,l);return Object.assign(a,t),a},Dp=(n=>n?S1(n):S1),Al=Dp(n=>({user:null,isAuthenticated:!1,loading:!1,error:null,login:async(t,a)=>{n({loading:!0,error:null});try{const l=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t,password:a}),credentials:"include"}),o=await l.json();if(!l.ok){n({loading:!1,error:o.error||"Login failed"});return}n({user:o.user,isAuthenticated:!0,loading:!1,error:null})}catch{n({loading:!1,error:"Network error"})}},logout:async()=>{try{await fetch("/api/auth/logout",{method:"POST",credentials:"include"})}catch{}n({user:null,isAuthenticated:!1,error:null})},checkAuth:async()=>{n({loading:!0});try{const t=await fetch("/api/auth/me",{credentials:"include"});if(t.ok){const a=await t.json();n({user:a.user,isAuthenticated:!0,loading:!1})}else n({user:null,isAuthenticated:!1,loading:!1})}catch{n({user:null,isAuthenticated:!1,loading:!1})}},reset:()=>n({user:null,isAuthenticated:!1,loading:!1,error:null})})),Fa=Dp((n,t)=>({squads:[],selectedSquad:null,activeStates:{},fetchSquads:async()=>{try{const a=await fetch("/api/squads",{credentials:"include"});if(a.ok){const l=await a.json();n({squads:l.squads})}}catch{}},selectSquad:a=>n({selectedSquad:a}),setSquadState:(a,l)=>n(o=>({activeStates:{...o.activeStates,[a]:l}})),clearSquadState:a=>n(l=>{const{[a]:o,...c}=l.activeStates;return{activeStates:c}}),reset:()=>n({squads:[],selectedSquad:null,activeStates:{}})}));let uT=0;function b1(){return`local-${Date.now()}-${++uT}`}const Ki=Dp((n,t)=>({messages:[],conversationId:null,streaming:!1,streamingText:"",error:null,addUserMessage:a=>{const l={id:b1(),role:"user",content:a,createdAt:new Date().toISOString()};n(o=>({messages:[...o.messages,l],error:null}))},setConversationId:a=>{n({conversationId:a})},startStreaming:()=>{n({streaming:!0,streamingText:"",error:null})},appendChunk:a=>{n(l=>({streamingText:l.streamingText+a}))},finishStreaming:a=>{const{streamingText:l}=t(),o={id:a,role:"assistant",content:l,createdAt:new Date().toISOString()};n(c=>({messages:[...c.messages,o],streaming:!1,streamingText:""}))},addAgentDm:a=>{const l={id:b1(),role:"agent_dm",content:a.content,agentId:a.agentId,agentName:a.agentName,createdAt:new Date().toISOString()};n(o=>({messages:[...o.messages,l]}))},setError:a=>{n({error:a,streaming:!1,streamingText:""})},loadHistory:async a=>{try{const l=await fetch(`/api/squads/${a}/conversations`,{credentials:"include"});if(!l.ok)return;const o=await l.json();if(!o.data||o.data.length===0){n({conversationId:null,messages:[]});return}const c=o.data[0];n({conversationId:c.id});const d=await fetch(`/api/conversations/${c.id}/messages`,{credentials:"include"});if(!d.ok)return;const p=((await d.json()).data||[]).map(v=>({id:v.id,role:v.role,content:v.content,agentId:v.agent_id??void 0,agentName:v.agent_name??void 0,createdAt:v.created_at}));n({messages:p})}catch{}},reset:()=>n({messages:[],conversationId:null,streaming:!1,streamingText:"",error:null})}));function oT(n){const a=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`,l=new WebSocket(a),o=[];let c=!0;function d(m){l.readyState===WebSocket.OPEN?l.send(JSON.stringify(m)):l.readyState===WebSocket.CONNECTING&&o.push(m)}return l.onopen=()=>{var m,p;c||(p=(m=n.current).onReconnect)==null||p.call(m),c=!1;for(const v of o)l.send(JSON.stringify(v));o.length=0},l.onmessage=m=>{var p,v,_,b,E,C,R,z,M,D,w;try{const B=JSON.parse(m.data),U=n.current;switch(B.type){case"squad:state":(p=U.onSquadState)==null||p.call(U,B.squadName,B.state);break;case"squad:inactive":(v=U.onSquadInactive)==null||v.call(U,B.squadName,B.reason);break;case"chat:chunk":(_=U.onChatChunk)==null||_.call(U,B.squadName,B.conversationId,B.delta);break;case"chat:done":(b=U.onChatDone)==null||b.call(U,B.squadName,B.conversationId,B.messageId);break;case"chat:error":(E=U.onChatError)==null||E.call(U,B.squadName,B.error);break;case"chat:agent_dm":(C=U.onChatAgentDm)==null||C.call(U,B.squadName,B.conversationId,B.agentId,B.agentName,B.message);break;case"chat:conversation_created":(R=U.onChatConversationCreated)==null||R.call(U,B.squadName,B.conversationId);break;case"agent:output_chunk":(z=U.onAgentOutputChunk)==null||z.call(U,B.squadName,B.agentId,B.agentName,B.delta);break;case"agent:step_start":(M=U.onAgentStepStart)==null||M.call(U,B.squadName,B.agentId,B.agentName,B.stepIndex,B.stepLabel);break;case"agent:step_complete":(D=U.onAgentStepComplete)==null||D.call(U,B.squadName,B.agentId,B.agentName,B.stepIndex,B.stepLabel);break;case"squad:checkpoint":(w=U.onSquadCheckpoint)==null||w.call(U,B.squadName,B.agentId,B.agentName,B.question);break}}catch{}},{subscribe:m=>{d({type:"squad:subscribe",squadName:m})},unsubscribe:m=>{d({type:"squad:unsubscribe",squadName:m})},sendChat:(m,p)=>{d({type:"chat:send",squadName:m,message:p})},newConversation:m=>{d({type:"chat:new_conversation",squadName:m})},sendCheckpointResponse:(m,p)=>{d({type:"squad:checkpoint_response",squadName:m,answer:p})},disconnect:()=>{l.close()}}}function cT(n={}){const t=Y.useRef(null),a=Y.useRef(n),l=Y.useRef(new Set);a.current=n,Y.useEffect(()=>{const p=oT(a);t.current=p;for(const v of l.current)p.subscribe(v);return()=>{p.disconnect()}},[]);const o=Y.useCallback(p=>{var v;l.current.add(p),(v=t.current)==null||v.subscribe(p)},[]),c=Y.useCallback(p=>{var v;l.current.delete(p),(v=t.current)==null||v.unsubscribe(p)},[]),d=Y.useCallback((p,v)=>{var _;(_=t.current)==null||_.sendChat(p,v)},[]),m=Y.useCallback((p,v)=>{var _;(_=t.current)==null||_.sendCheckpointResponse(p,v)},[]);return{subscribe:o,unsubscribe:c,sendChat:d,sendCheckpointResponse:m}}const fT={idle:"#888",working:"#4caf50",delivering:"#4fc3f7",done:"#4caf50",checkpoint:"#ff9800",running:"#4caf50",completed:"#4caf50"},hT={idle:"○",working:"●",delivering:"→",done:"✓",checkpoint:"◆",running:"●",completed:"✓"};function dT({status:n}){if(!n)return null;const t=fT[n]||"#888",a=hT[n]||"○";return X.jsxs("span",{style:{color:t,fontSize:"0.75rem"},children:[a," ",n]})}function mT({squad:n,selected:t,onClick:a}){return X.jsxs("div",{onClick:a,style:{padding:"8px 12px",cursor:"pointer",borderRadius:"4px",background:t?"#1a3a5c":"transparent",borderLeft:t?"2px solid #4caf50":"2px solid transparent",marginBottom:"4px"},children:[X.jsx("div",{style:{fontSize:"0.875rem",color:t?"#e0e0e0":"#aaa"},children:n.name}),X.jsx(dT,{status:n.status})]})}function pT({squads:n,selectedSquad:t,onSelect:a}){return X.jsxs("div",{style:{padding:"8px"},children:[X.jsx("div",{style:{color:"#888",fontSize:"0.7rem",textTransform:"uppercase",marginBottom:"8px",padding:"0 12px"},children:"Squads"}),n.length===0&&X.jsx("div",{style:{padding:"8px 12px",color:"#666",fontSize:"0.8rem"},children:"No squads found"}),n.map(l=>X.jsx(mT,{squad:l,selected:l.code===t,onClick:()=>a(l.code)},l.code))]})}function yT(n){const t=Math.floor(n/3600),a=Math.floor(n%3600/60),l=n%60,o=c=>c.toString().padStart(2,"0");return t>0?`${t}h ${o(a)}m ${o(l)}s`:`${a}m ${o(l)}s`}function gT({state:n}){const[t,a]=Y.useState(0);return Y.useEffect(()=>{if(!(n!=null&&n.startedAt)||n.status!=="running"){a(0);return}const l=new Date(n.startedAt).getTime(),o=()=>a(Math.floor((Date.now()-l)/1e3));o();const c=setInterval(o,1e3);return()=>clearInterval(c)},[n==null?void 0:n.startedAt,n==null?void 0:n.status]),n?X.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"6px 16px",background:"#16213e",fontSize:"0.8rem",color:"#aaa",borderTop:"1px solid #1a1a2e"},children:[X.jsxs("span",{children:["Step ",n.step.current,"/",n.step.total,": ",n.step.label]}),n.status==="running"&&X.jsxs("span",{children:["Elapsed: ",yT(t)]}),n.handoff&&X.jsxs("span",{style:{color:"#4caf50"},children:[n.handoff.from," → ",n.handoff.to]})]}):X.jsx("div",{})}let hy=null;function vT(n){hy=n}function xT(n,t){hy&&hy(n,t)}let dy=null;function _T(n){dy=n}function ST(n,t){dy&&dy(n,t)}const hp=32,El=96,Fr=64,Yt={floor:13158600,floorHighlight:14211288,floorGrout:12105912,wall:15261904,wallTrim:11577496,baseboard:7035464,desk:15263976,deskTop:16119285,deskShadow:13684944,deskLeg:1710618,deskEdge:14737632,monitor:2236976,monitorScreen:1981020,monitorScreenGlow:2773120,monitorStand:3355456,keyboard:3355456,keyboardKey:4473941,chairSeat:2899536,chairBack:3426654,chairBase:4473924,chairWheel:3355443,plant:5025616,plantDark:3706428,plantLight:6732650,pot:9133628,potRim:10515018,soil:4863264,bookshelf:8020808,bookshelfEdge:9139029,bookColors:[15022389,2001125,4431943,16750592,9315498,35195,16635957],rug:6044974,rugPattern:8016448,rugBorder:4861472},my=[5227511,5025616,16750592,15022389,9315498,16771899],bT={idle:8947848,working:5025616,delivering:5227511,done:5025616,checkpoint:16750592},da={counter:4073251,counterTop:6111287,machine:3622735,machineTop:4545124,machineLight:5025616,cup:14142664,cupShadow:12364452,saucer:14735052,sink:7901340,faucet:11583173,menu:5125166},pi={table:6111287,tableTop:7162945,tableEdge:5125166,tableLeg:4073251,chair:3622735,chairSeat:4545124,chairBack:5533306,carpet:2503224,carpetPattern:3030340,whiteboard:15527921,whiteboardFrame:7901340},co={background:1713022,backgroundGlow:2635155,statusRunning:5025616,statusIdle:8947848,statusCheckpoint:16750592,statusCompleted:5025616},tr={floor:11579568,tile:11053224,grout:10066329,stripe:12632256},Ua={floor:14477552,tile:12966120,tileGrout:11453652,wall:14740208,stall:11583173,stallDoor:9479342,sink:15527921,sinkBowl:16777215,mirror:11789820,mirrorFrame:7901340,toilet:16448250,toiletSeat:15658734,pipe:9479342},Pa={floor:6111287,carpet:5125166,carpetBorder:4073251,desk:4073251,deskTop:6111287,deskEdge:2890510,chair:1713022,chairSeat:2635155,window:8508666,windowFrame:5533306,windowSill:7901340,bookshelf:7162945,globe:4367861,nameplate:16766720},gi={wall:7901340,wallHighlight:10795204,doorFrame:6111287,lobby:14142664,lobbyTile:13155766,lobbyAccent:9268835},Ml=640,ho=480,TT=64,ET=80,CT=El+32,AT=Fr+48,T1=2,Ux=10,E1=120,Hh=280,C1=360,Km=180,Vi=80,MT=960;function A1(n,t,a){const l=Math.max(0,Math.min(1,a));return n+(t-n)*l}function RT(n){return n<.5?2*n*n:1-Math.pow(-2*n+2,2)/2}function Hx(n){const t=Ux,a=Math.max(1,n),l=a*Ml+(a-1)*t,o=Math.max(l,MT),c=o+2*t,d=t+ho+t,m=d+E1+t,p=m+Hh+t,v=[];for(let M=0;M<n;M++)v.push({x:t+M*(Ml+t),y:t});const _={x:t,y:d,width:o,height:E1},b={x:t,y:m,width:C1,height:Hh},E={x:t+o-Km,y:m,width:Km,height:Hh},C={x:E.x-t-Km,y:m,width:Km,height:Hh},R=b.x+C1+t,z={x:R,y:m,width:C.x-t-R,height:Hh};return{totalWidth:c,totalHeight:p,innerWidth:o,squadOrigins:v,corridor:_,ceoOffice:b,bathroomMale:C,bathroomFemale:E,lobby:z}}function dp(n,t){const a=n%T1,l=Math.floor(n/T1);return{x:t.x+TT+a*CT,y:t.y+ET+l*AT}}function Jh(n){return{x:n.x+Ml-80,y:n.y+ho-80}}function Gx(n){return{x:n.x+Ml-160,y:n.y+Math.floor(ho/2)}}function zT(n,t){const a=t==="male"?n.bathroomMale:n.bathroomFemale;return{x:a.x+a.width/2,y:a.y+a.height/2}}function DT(n){return{x:n.corridor.x+40+Math.random()*(n.corridor.width-80),y:n.corridor.y+20+Math.random()*(n.corridor.height-40)}}function M1(n,t){return{x:n.x-t.x,y:n.y-t.y}}const R1=500,z1=50;let D1=0;function O1(n){return{idle:"idle",working:"working",delivering:"walking",done:"idle",checkpoint:"checkpoint"}[n]??"idle"}const Pe=Dp(n=>({rooms:[],activeRoom:null,bubbles:{},activityLog:{},checkpoints:{},agentVisuals:{},appendBubble:(t,a,l)=>{const o=`${t}:${a}`;n(c=>{var p;let m=(((p=c.bubbles[o])==null?void 0:p.text)??"")+l;return m.length>R1&&(m=m.slice(m.length-R1)),{bubbles:{...c.bubbles,[o]:{text:m,updatedAt:Date.now()}}}})},clearBubble:(t,a)=>{const l=`${t}:${a}`;n(o=>{const{[l]:c,...d}=o.bubbles;return{bubbles:d}})},clearAllBubbles:()=>n({bubbles:{}}),addActivity:(t,a,l)=>{const c={id:++D1,agentName:a,action:l,timestamp:Date.now()};n(d=>{var _;const p=[...((_=d.activityLog[t])==null?void 0:_.entries)??[],c],v=p.length>z1?p.slice(p.length-z1):p;return{activityLog:{...d.activityLog,[t]:{entries:v}}}})},setCheckpoint:(t,a,l,o)=>n(c=>({checkpoints:{...c.checkpoints,[t]:{agentId:a,agentName:l,question:o}}})),clearCheckpoint:t=>n(a=>{const{[t]:l,...o}=a.checkpoints;return{checkpoints:o}}),setActiveRoom:t=>n({activeRoom:t}),syncRooms:t=>n(a=>{const l=t;let o;return l.length===0?o=null:a.activeRoom===null||!l.includes(a.activeRoom)?o=l[0]:o=a.activeRoom,{rooms:l,activeRoom:o}}),setAgents:(t,a)=>n(l=>{const o=l.agentVisuals[t]??[],c=new Map(o.map(p=>[p.id,p])),d={x:0,y:0},m=a.map((p,v)=>{const _=c.get(p.id);if(_){const C=p.status?O1(p.status):_.status,R=C!==_.status;let z=_.targetPosition;return R&&(C==="working"||C==="checkpoint"?z=dp(v,d):z=Jh(d)),{..._,name:p.name,deskIndex:v,status:C,targetPosition:z}}const b=p.status?O1(p.status):"idle",E=b==="working"||b==="checkpoint"?dp(v,d):Jh(d);return{id:p.id,name:p.name,colorIndex:v%6,status:b,deskIndex:v,position:E,targetPosition:null}});return{agentVisuals:{...l.agentVisuals,[t]:m}}}),setAgentStatus:(t,a,l)=>n(o=>{const c=o.agentVisuals[t];if(!c)return o;const d={x:0,y:0},m=c.map(p=>{if(p.id!==a)return p;let v;return l==="working"||l==="checkpoint"?v=dp(p.deskIndex,d):v=Jh(d),{...p,status:l,targetPosition:v}});return{agentVisuals:{...o.agentVisuals,[t]:m}}}),reset:()=>{D1=0,n({rooms:[],activeRoom:null,bubbles:{},activityLog:{},checkpoints:{},agentVisuals:{}})}}));function OT(){const n=Al(G=>G.user),t=Al(G=>G.isAuthenticated),a=Al(G=>G.loading),l=Al(G=>G.logout),o=Al(G=>G.checkAuth),c=Rp(),d=ms(),m=d.pathname==="/office"||d.pathname==="/",p=Fa(G=>G.squads),v=Fa(G=>G.selectedSquad),_=Fa(G=>v?G.activeStates[v]:null),b=Fa(G=>G.fetchSquads),E=Fa(G=>G.selectSquad),C=Fa(G=>G.setSquadState),R=Fa(G=>G.clearSquadState),z=Y.useCallback((G,at)=>{C(G,at);const et=Pe.getState();et.rooms.includes(G)||et.syncRooms([...et.rooms,G]),at.status!=="checkpoint"&&et.clearCheckpoint(G),at.agents&&et.setAgents(G,at.agents.map(mt=>({id:mt.id,name:mt.name,status:mt.status})))},[C]),M=Y.useCallback(G=>{R(G);const at=Pe.getState(),et=at.agentVisuals[G];if(et)for(const mt of et)at.setAgentStatus(G,mt.id,"idle")},[R]),D=Y.useCallback((G,at)=>{Ki.getState().setConversationId(at)},[]),w=Y.useCallback((G,at,et)=>{const mt=Ki.getState();mt.streaming||mt.startStreaming(),mt.appendChunk(et)},[]),B=Y.useCallback((G,at,et)=>{Ki.getState().finishStreaming(et)},[]),U=Y.useCallback((G,at)=>{Ki.getState().setError(at)},[]),k=Y.useCallback((G,at,et,mt,j)=>{Ki.getState().addAgentDm({agentId:et,agentName:mt,content:j})},[]),Q=Y.useCallback((G,at,et,mt)=>{Pe.getState().appendBubble(G,at,mt)},[]),V=Y.useCallback((G,at,et,mt,j)=>{Pe.getState().addActivity(G,et,`started "${j}"`),Pe.getState().setAgentStatus(G,at,"working")},[]),ft=Y.useCallback((G,at,et,mt,j)=>{Pe.getState().addActivity(G,et,`completed "${j}"`),Pe.getState().setAgentStatus(G,at,"idle")},[]),lt=Y.useCallback((G,at,et,mt)=>{Pe.getState().setCheckpoint(G,at,et,mt),Pe.getState().setAgentStatus(G,at,"checkpoint")},[]),st=Y.useCallback(()=>{Pe.getState().clearAllBubbles()},[]),{subscribe:ut,unsubscribe:pt,sendChat:gt,sendCheckpointResponse:xt}=cT({onSquadState:z,onSquadInactive:M,onChatConversationCreated:D,onChatChunk:w,onChatDone:B,onChatError:U,onChatAgentDm:k,onAgentOutputChunk:Q,onAgentStepStart:V,onAgentStepComplete:ft,onSquadCheckpoint:lt,onReconnect:st});Y.useEffect(()=>{vT(gt)},[gt]),Y.useEffect(()=>{_T(xt)},[xt]),Y.useEffect(()=>{b().then(()=>{const{squads:G}=Fa.getState();if(G.length>0){const at=Pe.getState(),et=G.map(I=>I.code),mt=at.rooms,j=[...new Set([...mt,...et])];at.syncRooms(j);for(const I of G)!at.agentVisuals[I.code]&&I.agents&&I.agents.length>0&&at.setAgents(I.code,I.agents.map(ot=>({id:ot.id,name:ot.name,status:"idle"})))}})},[b]);const Ct=Pe(G=>G.rooms);Y.useEffect(()=>{for(const G of Ct)ut(G);return()=>{for(const G of Ct)pt(G)}},[Ct,ut,pt]),Y.useEffect(()=>{t||o()},[]),Y.useEffect(()=>{!a&&!t&&c("/login")},[a,t,c]);const H=G=>({padding:"6px 12px",color:G?"#4fc3f7":"#888",textDecoration:"none",fontSize:"0.85rem"});return X.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100vh",background:"#0f0f1a",color:"#e0e0e0"},children:[X.jsxs("header",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 16px",background:"#16213e",borderBottom:"1px solid #1a1a2e"},children:[X.jsx("span",{style:{color:"#4fc3f7",fontWeight:"bold",fontSize:"1.1rem"},children:"ExpxAgents"}),X.jsxs("span",{style:{color:"#888",fontSize:"0.85rem"},children:[n==null?void 0:n.username," | ",X.jsx("span",{style:{color:"#4caf50"},children:"● Connected"}),X.jsx("button",{onClick:l,style:{marginLeft:"12px",background:"none",border:"none",color:"#888",cursor:"pointer",fontSize:"0.8rem"},children:"Logout"})]})]}),X.jsxs("div",{style:{display:"flex",flex:1,overflow:"hidden"},children:[X.jsxs("aside",{style:{width:"200px",background:"#16213e",borderRight:"1px solid #1a1a2e",display:"flex",flexDirection:"column",overflowY:"auto"},children:[!m&&X.jsx(pT,{squads:p,selectedSquad:v,onSelect:E}),!m&&X.jsx("hr",{style:{border:"none",borderTop:"1px solid #333",margin:"8px 12px"}}),X.jsxs("nav",{style:{padding:"8px"},children:[X.jsx("div",{style:{color:"#888",fontSize:"0.7rem",textTransform:"uppercase",marginBottom:"8px",padding:"0 12px"},children:"Views"}),X.jsx(Qh,{to:"/office",style:({isActive:G})=>H(G),children:"Office"}),X.jsx("br",{}),X.jsx(Qh,{to:"/chat",style:({isActive:G})=>H(G),children:"Chat"}),X.jsx("br",{}),X.jsx(Qh,{to:"/kanban",style:({isActive:G})=>H(G),children:"Kanban"}),X.jsx("br",{}),X.jsx(Qh,{to:"/settings",style:({isActive:G})=>H(G),children:"Settings"})]})]}),X.jsx("main",{style:{flex:1,overflow:"auto"},children:X.jsx(Eb,{})})]}),X.jsx(gT,{state:_})]})}function NT(){const[n,t]=Y.useState(""),[a,l]=Y.useState(""),o=Al(_=>_.login),c=Al(_=>_.loading),d=Al(_=>_.error),m=Al(_=>_.isAuthenticated),p=Rp();Y.useEffect(()=>{m&&p("/",{replace:!0})},[m,p]);const v=_=>{_.preventDefault(),o(n,a)};return X.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",background:"#0f0f1a"},children:X.jsxs("form",{onSubmit:v,style:{background:"#1a1a2e",padding:"2rem",borderRadius:"8px",width:"320px"},children:[X.jsx("h1",{style:{color:"#4fc3f7",marginBottom:"1.5rem",textAlign:"center",fontSize:"1.5rem"},children:"ExpxAgents"}),d&&X.jsx("div",{style:{color:"#ef5350",marginBottom:"1rem",fontSize:"0.875rem"},children:d}),X.jsx("input",{type:"text",placeholder:"Username",value:n,onChange:_=>t(_.target.value),style:{width:"100%",padding:"0.75rem",marginBottom:"0.75rem",background:"#16213e",border:"1px solid #333",borderRadius:"4px",color:"#e0e0e0",fontSize:"1rem"}}),X.jsx("input",{type:"password",placeholder:"Password",value:a,onChange:_=>l(_.target.value),style:{width:"100%",padding:"0.75rem",marginBottom:"1rem",background:"#16213e",border:"1px solid #333",borderRadius:"4px",color:"#e0e0e0",fontSize:"1rem"}}),X.jsx("button",{type:"submit",disabled:c,style:{width:"100%",padding:"0.75rem",background:"#4fc3f7",color:"#0f0f1a",border:"none",borderRadius:"4px",fontSize:"1rem",fontWeight:"bold",cursor:c?"wait":"pointer"},children:c?"Logging in...":"Login"})]})})}function jx(n,t,a){if(!n)return;if(a(n)===!0)return n;let l=n.child;for(;l;){const o=jx(l,t,a);if(o)return o;l=l.sibling}}function Yx(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const ky=Yx(Y.createContext(null));let qx=class extends Y.Component{render(){return Y.createElement(ky.Provider,{value:this._reactInternals},this.props.children)}};function wT(){const n=Y.useContext(ky);if(n===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=Y.useId();return Y.useMemo(()=>{for(const a of[n,n==null?void 0:n.alternate]){if(!a)continue;const l=jx(a,!1,o=>{let c=o.memoizedState;for(;c;){if(c.memoizedState===t)return!0;c=c.next}});if(l)return l}},[n,t])}const BT=Symbol.for("react.context"),UT=n=>n!==null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===BT;function HT(){const n=wT(),[t]=Y.useState(()=>new Map);t.clear();let a=n;for(;a;){const l=a.type;UT(l)&&l!==ky&&!t.has(l)&&t.set(l,Y.use(Yx(l))),a=a.return}return t}function GT(){const n=HT();return Y.useMemo(()=>Array.from(n.keys()).reduce((t,a)=>l=>Y.createElement(t,null,Y.createElement(a.Provider,{...l,value:n.get(a)})),t=>Y.createElement(qx,{...t})),[n])}const jT="modulepreload",YT=function(n){return"/"+n},N1={},Wh=function(t,a,l){let o=Promise.resolve();if(a&&a.length>0){let d=function(v){return Promise.all(v.map(_=>Promise.resolve(_).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const m=document.querySelector("meta[property=csp-nonce]"),p=(m==null?void 0:m.nonce)||(m==null?void 0:m.getAttribute("nonce"));o=d(a.map(v=>{if(v=YT(v),v in N1)return;N1[v]=!0;const _=v.endsWith(".css"),b=_?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${b}`))return;const E=document.createElement("link");if(E.rel=_?"stylesheet":jT,_||(E.as="script"),E.crossOrigin="",E.href=v,p&&E.setAttribute("nonce",p),document.head.appendChild(E),_)return new Promise((C,R)=>{E.addEventListener("load",C),E.addEventListener("error",()=>R(new Error(`Unable to preload CSS for ${v}`)))})}))}function c(d){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=d,window.dispatchEvent(m),!m.defaultPrevented)throw d}return o.then(d=>{for(const m of d||[])m.status==="rejected"&&c(m.reason);return t().catch(c)})};var Pt=(n=>(n.Application="application",n.WebGLPipes="webgl-pipes",n.WebGLPipesAdaptor="webgl-pipes-adaptor",n.WebGLSystem="webgl-system",n.WebGPUPipes="webgpu-pipes",n.WebGPUPipesAdaptor="webgpu-pipes-adaptor",n.WebGPUSystem="webgpu-system",n.CanvasSystem="canvas-system",n.CanvasPipesAdaptor="canvas-pipes-adaptor",n.CanvasPipes="canvas-pipes",n.Asset="asset",n.LoadParser="load-parser",n.ResolveParser="resolve-parser",n.CacheParser="cache-parser",n.DetectionParser="detection-parser",n.MaskEffect="mask-effect",n.BlendMode="blend-mode",n.TextureSource="texture-source",n.Environment="environment",n.ShapeBuilder="shape-builder",n.Batcher="batcher",n))(Pt||{});const py=n=>{if(typeof n=="function"||typeof n=="object"&&n.extension){if(!n.extension)throw new Error("Extension class must have an extension object");n={...typeof n.extension!="object"?{type:n.extension}:n.extension,ref:n}}if(typeof n=="object")n={...n};else throw new Error("Invalid extension type");return typeof n.type=="string"&&(n.type=[n.type]),n},Zm=(n,t)=>py(n).priority??t,Ie={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...n){return n.map(py).forEach(t=>{t.type.forEach(a=>{var l,o;return(o=(l=this._removeHandlers)[a])==null?void 0:o.call(l,t)})}),this},add(...n){return n.map(py).forEach(t=>{t.type.forEach(a=>{var c,d;const l=this._addHandlers,o=this._queue;l[a]?(d=l[a])==null||d.call(l,t):(o[a]=o[a]||[],(c=o[a])==null||c.push(t))})}),this},handle(n,t,a){var d;const l=this._addHandlers,o=this._removeHandlers;if(l[n]||o[n])throw new Error(`Extension type ${n} already has a handler`);l[n]=t,o[n]=a;const c=this._queue;return c[n]&&((d=c[n])==null||d.forEach(m=>t(m)),delete c[n]),this},handleByMap(n,t){return this.handle(n,a=>{a.name&&(t[a.name]=a.ref)},a=>{a.name&&delete t[a.name]})},handleByNamedList(n,t,a=-1){return this.handle(n,l=>{t.findIndex(c=>c.name===l.name)>=0||(t.push({name:l.name,value:l.ref}),t.sort((c,d)=>Zm(d.value,a)-Zm(c.value,a)))},l=>{const o=t.findIndex(c=>c.name===l.name);o!==-1&&t.splice(o,1)})},handleByList(n,t,a=-1){return this.handle(n,l=>{t.includes(l.ref)||(t.push(l.ref),t.sort((o,c)=>Zm(c,a)-Zm(o,a)))},l=>{const o=t.indexOf(l.ref);o!==-1&&t.splice(o,1)})},mixin(n,...t){for(const a of t)Object.defineProperties(n.prototype,Object.getOwnPropertyDescriptors(a))}},qT={extension:{type:Pt.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await Wh(()=>import("./browserAll-BUIMCzCP.js"),__vite__mapDeps([0,1]))}},LT={extension:{type:Pt.Environment,name:"webworker",priority:0},test:()=>typeof self<"u"&&self.WorkerGlobalScope!==void 0,load:async()=>{await Wh(()=>import("./webworkerAll-Kw76R3HQ.js"),[])}};class Pn{constructor(t,a,l){this._x=a||0,this._y=l||0,this._observer=t}clone(t){return new Pn(t??this._observer,this._x,this._y)}set(t=0,a=t){return(this._x!==t||this._y!==a)&&(this._x=t,this._y=a,this._observer._onUpdate(this)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this._observer._onUpdate(this)),this}copyTo(t){return t.set(this._x,this._y),t}equals(t){return t.x===this._x&&t.y===this._y}toString(){return`[pixi.js/math:ObservablePoint x=${this._x} y=${this._y} scope=${this._observer}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this._observer._onUpdate(this))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this._observer._onUpdate(this))}}var D0={exports:{}},w1;function XT(){return w1||(w1=1,(function(n){var t=Object.prototype.hasOwnProperty,a="~";function l(){}Object.create&&(l.prototype=Object.create(null),new l().__proto__||(a=!1));function o(p,v,_){this.fn=p,this.context=v,this.once=_||!1}function c(p,v,_,b,E){if(typeof _!="function")throw new TypeError("The listener must be a function");var C=new o(_,b||p,E),R=a?a+v:v;return p._events[R]?p._events[R].fn?p._events[R]=[p._events[R],C]:p._events[R].push(C):(p._events[R]=C,p._eventsCount++),p}function d(p,v){--p._eventsCount===0?p._events=new l:delete p._events[v]}function m(){this._events=new l,this._eventsCount=0}m.prototype.eventNames=function(){var v=[],_,b;if(this._eventsCount===0)return v;for(b in _=this._events)t.call(_,b)&&v.push(a?b.slice(1):b);return Object.getOwnPropertySymbols?v.concat(Object.getOwnPropertySymbols(_)):v},m.prototype.listeners=function(v){var _=a?a+v:v,b=this._events[_];if(!b)return[];if(b.fn)return[b.fn];for(var E=0,C=b.length,R=new Array(C);E<C;E++)R[E]=b[E].fn;return R},m.prototype.listenerCount=function(v){var _=a?a+v:v,b=this._events[_];return b?b.fn?1:b.length:0},m.prototype.emit=function(v,_,b,E,C,R){var z=a?a+v:v;if(!this._events[z])return!1;var M=this._events[z],D=arguments.length,w,B;if(M.fn){switch(M.once&&this.removeListener(v,M.fn,void 0,!0),D){case 1:return M.fn.call(M.context),!0;case 2:return M.fn.call(M.context,_),!0;case 3:return M.fn.call(M.context,_,b),!0;case 4:return M.fn.call(M.context,_,b,E),!0;case 5:return M.fn.call(M.context,_,b,E,C),!0;case 6:return M.fn.call(M.context,_,b,E,C,R),!0}for(B=1,w=new Array(D-1);B<D;B++)w[B-1]=arguments[B];M.fn.apply(M.context,w)}else{var U=M.length,k;for(B=0;B<U;B++)switch(M[B].once&&this.removeListener(v,M[B].fn,void 0,!0),D){case 1:M[B].fn.call(M[B].context);break;case 2:M[B].fn.call(M[B].context,_);break;case 3:M[B].fn.call(M[B].context,_,b);break;case 4:M[B].fn.call(M[B].context,_,b,E);break;default:if(!w)for(k=1,w=new Array(D-1);k<D;k++)w[k-1]=arguments[k];M[B].fn.apply(M[B].context,w)}}return!0},m.prototype.on=function(v,_,b){return c(this,v,_,b,!1)},m.prototype.once=function(v,_,b){return c(this,v,_,b,!0)},m.prototype.removeListener=function(v,_,b,E){var C=a?a+v:v;if(!this._events[C])return this;if(!_)return d(this,C),this;var R=this._events[C];if(R.fn)R.fn===_&&(!E||R.once)&&(!b||R.context===b)&&d(this,C);else{for(var z=0,M=[],D=R.length;z<D;z++)(R[z].fn!==_||E&&!R[z].once||b&&R[z].context!==b)&&M.push(R[z]);M.length?this._events[C]=M.length===1?M[0]:M:d(this,C)}return this},m.prototype.removeAllListeners=function(v){var _;return v?(_=a?a+v:v,this._events[_]&&d(this,_)):(this._events=new l,this._eventsCount=0),this},m.prototype.off=m.prototype.removeListener,m.prototype.addListener=m.prototype.on,m.prefixed=a,m.EventEmitter=m,n.exports=m})(D0)),D0.exports}var VT=XT();const ps=Ep(VT),QT=Math.PI*2,kT=180/Math.PI,KT=Math.PI/180;class ma{constructor(t=0,a=0){this.x=0,this.y=0,this.x=t,this.y=a}clone(){return new ma(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,a=t){return this.x=t,this.y=a,this}toString(){return`[pixi.js/math:Point x=${this.x} y=${this.y}]`}static get shared(){return O0.x=0,O0.y=0,O0}}const O0=new ma;class le{constructor(t=1,a=0,l=0,o=1,c=0,d=0){this.array=null,this.a=t,this.b=a,this.c=l,this.d=o,this.tx=c,this.ty=d}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,a,l,o,c,d){return this.a=t,this.b=a,this.c=l,this.d=o,this.tx=c,this.ty=d,this}toArray(t,a){this.array||(this.array=new Float32Array(9));const l=a||this.array;return t?(l[0]=this.a,l[1]=this.b,l[2]=0,l[3]=this.c,l[4]=this.d,l[5]=0,l[6]=this.tx,l[7]=this.ty,l[8]=1):(l[0]=this.a,l[1]=this.c,l[2]=this.tx,l[3]=this.b,l[4]=this.d,l[5]=this.ty,l[6]=0,l[7]=0,l[8]=1),l}apply(t,a){a=a||new ma;const l=t.x,o=t.y;return a.x=this.a*l+this.c*o+this.tx,a.y=this.b*l+this.d*o+this.ty,a}applyInverse(t,a){a=a||new ma;const l=this.a,o=this.b,c=this.c,d=this.d,m=this.tx,p=this.ty,v=1/(l*d+c*-o),_=t.x,b=t.y;return a.x=d*v*_+-c*v*b+(p*c-m*d)*v,a.y=l*v*b+-o*v*_+(-p*l+m*o)*v,a}translate(t,a){return this.tx+=t,this.ty+=a,this}scale(t,a){return this.a*=t,this.d*=a,this.c*=t,this.b*=a,this.tx*=t,this.ty*=a,this}rotate(t){const a=Math.cos(t),l=Math.sin(t),o=this.a,c=this.c,d=this.tx;return this.a=o*a-this.b*l,this.b=o*l+this.b*a,this.c=c*a-this.d*l,this.d=c*l+this.d*a,this.tx=d*a-this.ty*l,this.ty=d*l+this.ty*a,this}append(t){const a=this.a,l=this.b,o=this.c,c=this.d;return this.a=t.a*a+t.b*o,this.b=t.a*l+t.b*c,this.c=t.c*a+t.d*o,this.d=t.c*l+t.d*c,this.tx=t.tx*a+t.ty*o+this.tx,this.ty=t.tx*l+t.ty*c+this.ty,this}appendFrom(t,a){const l=t.a,o=t.b,c=t.c,d=t.d,m=t.tx,p=t.ty,v=a.a,_=a.b,b=a.c,E=a.d;return this.a=l*v+o*b,this.b=l*_+o*E,this.c=c*v+d*b,this.d=c*_+d*E,this.tx=m*v+p*b+a.tx,this.ty=m*_+p*E+a.ty,this}setTransform(t,a,l,o,c,d,m,p,v){return this.a=Math.cos(m+v)*c,this.b=Math.sin(m+v)*c,this.c=-Math.sin(m-p)*d,this.d=Math.cos(m-p)*d,this.tx=t-(l*this.a+o*this.c),this.ty=a-(l*this.b+o*this.d),this}prepend(t){const a=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const l=this.a,o=this.c;this.a=l*t.a+this.b*t.c,this.b=l*t.b+this.b*t.d,this.c=o*t.a+this.d*t.c,this.d=o*t.b+this.d*t.d}return this.tx=a*t.a+this.ty*t.c+t.tx,this.ty=a*t.b+this.ty*t.d+t.ty,this}decompose(t){const a=this.a,l=this.b,o=this.c,c=this.d,d=t.pivot,m=-Math.atan2(-o,c),p=Math.atan2(l,a),v=Math.abs(m+p);return v<1e-5||Math.abs(QT-v)<1e-5?(t.rotation=p,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=m,t.skew.y=p),t.scale.x=Math.sqrt(a*a+l*l),t.scale.y=Math.sqrt(o*o+c*c),t.position.x=this.tx+(d.x*a+d.y*o),t.position.y=this.ty+(d.x*l+d.y*c),t}invert(){const t=this.a,a=this.b,l=this.c,o=this.d,c=this.tx,d=t*o-a*l;return this.a=o/d,this.b=-a/d,this.c=-l/d,this.d=t/d,this.tx=(l*this.ty-o*c)/d,this.ty=-(t*this.ty-a*c)/d,this}isIdentity(){return this.a===1&&this.b===0&&this.c===0&&this.d===1&&this.tx===0&&this.ty===0}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const t=new le;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}equals(t){return t.a===this.a&&t.b===this.b&&t.c===this.c&&t.d===this.d&&t.tx===this.tx&&t.ty===this.ty}toString(){return`[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return JT.identity()}static get shared(){return ZT.identity()}}const ZT=new le,JT=new le,io=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],lo=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],so=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],ro=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],yy=[],Lx=[],Jm=Math.sign;function WT(){for(let n=0;n<16;n++){const t=[];yy.push(t);for(let a=0;a<16;a++){const l=Jm(io[n]*io[a]+so[n]*lo[a]),o=Jm(lo[n]*io[a]+ro[n]*lo[a]),c=Jm(io[n]*so[a]+so[n]*ro[a]),d=Jm(lo[n]*so[a]+ro[n]*ro[a]);for(let m=0;m<16;m++)if(io[m]===l&&lo[m]===o&&so[m]===c&&ro[m]===d){t.push(m);break}}}for(let n=0;n<16;n++){const t=new le;t.set(io[n],lo[n],so[n],ro[n],0,0),Lx.push(t)}}WT();const Ue={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:n=>io[n],uY:n=>lo[n],vX:n=>so[n],vY:n=>ro[n],inv:n=>n&8?n&15:-n&7,add:(n,t)=>yy[n][t],sub:(n,t)=>yy[n][Ue.inv(t)],rotate180:n=>n^4,isVertical:n=>(n&3)===2,byDirection:(n,t)=>Math.abs(n)*2<=Math.abs(t)?t>=0?Ue.S:Ue.N:Math.abs(t)*2<=Math.abs(n)?n>0?Ue.E:Ue.W:t>0?n>0?Ue.SE:Ue.SW:n>0?Ue.NE:Ue.NW,matrixAppendRotationInv:(n,t,a=0,l=0,o=0,c=0)=>{const d=Lx[Ue.inv(t)],m=d.a,p=d.b,v=d.c,_=d.d,b=a-Math.min(0,m*o,v*c,m*o+v*c),E=l-Math.min(0,p*o,_*c,p*o+_*c),C=n.a,R=n.b,z=n.c,M=n.d;n.a=m*C+p*z,n.b=m*R+p*M,n.c=v*C+_*z,n.d=v*R+_*M,n.tx=b*C+E*z+n.tx,n.ty=b*R+E*M+n.ty},transformRectCoords:(n,t,a,l)=>{const{x:o,y:c,width:d,height:m}=n,{x:p,y:v,width:_,height:b}=t;return a===Ue.E?(l.set(o+p,c+v,d,m),l):a===Ue.S?l.set(_-c-m+p,o+v,m,d):a===Ue.W?l.set(_-o-d+p,b-c-m+v,d,m):a===Ue.N?l.set(c+p,b-o-d+v,m,d):l.set(o+p,c+v,d,m)}},Wm=[new ma,new ma,new ma,new ma];class mn{constructor(t=0,a=0,l=0,o=0){this.type="rectangle",this.x=Number(t),this.y=Number(a),this.width=Number(l),this.height=Number(o)}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}isEmpty(){return this.left===this.right||this.top===this.bottom}static get EMPTY(){return new mn(0,0,0,0)}clone(){return new mn(this.x,this.y,this.width,this.height)}copyFromBounds(t){return this.x=t.minX,this.y=t.minY,this.width=t.maxX-t.minX,this.height=t.maxY-t.minY,this}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.copyFrom(this),t}contains(t,a){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&a>=this.y&&a<this.y+this.height}strokeContains(t,a,l,o=.5){const{width:c,height:d}=this;if(c<=0||d<=0)return!1;const m=this.x,p=this.y,v=l*(1-o),_=l-v,b=m-v,E=m+c+v,C=p-v,R=p+d+v,z=m+_,M=m+c-_,D=p+_,w=p+d-_;return t>=b&&t<=E&&a>=C&&a<=R&&!(t>z&&t<M&&a>D&&a<w)}intersects(t,a){if(!a){const ft=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=ft)return!1;const st=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>st}const l=this.left,o=this.right,c=this.top,d=this.bottom;if(o<=l||d<=c)return!1;const m=Wm[0].set(t.left,t.top),p=Wm[1].set(t.left,t.bottom),v=Wm[2].set(t.right,t.top),_=Wm[3].set(t.right,t.bottom);if(v.x<=m.x||p.y<=m.y)return!1;const b=Math.sign(a.a*a.d-a.b*a.c);if(b===0||(a.apply(m,m),a.apply(p,p),a.apply(v,v),a.apply(_,_),Math.max(m.x,p.x,v.x,_.x)<=l||Math.min(m.x,p.x,v.x,_.x)>=o||Math.max(m.y,p.y,v.y,_.y)<=c||Math.min(m.y,p.y,v.y,_.y)>=d))return!1;const E=b*(p.y-m.y),C=b*(m.x-p.x),R=E*l+C*c,z=E*o+C*c,M=E*l+C*d,D=E*o+C*d;if(Math.max(R,z,M,D)<=E*m.x+C*m.y||Math.min(R,z,M,D)>=E*_.x+C*_.y)return!1;const w=b*(m.y-v.y),B=b*(v.x-m.x),U=w*l+B*c,k=w*o+B*c,Q=w*l+B*d,V=w*o+B*d;return!(Math.max(U,k,Q,V)<=w*m.x+B*m.y||Math.min(U,k,Q,V)>=w*_.x+B*_.y)}pad(t=0,a=t){return this.x-=t,this.y-=a,this.width+=t*2,this.height+=a*2,this}fit(t){const a=Math.max(this.x,t.x),l=Math.min(this.x+this.width,t.x+t.width),o=Math.max(this.y,t.y),c=Math.min(this.y+this.height,t.y+t.height);return this.x=a,this.width=Math.max(l-a,0),this.y=o,this.height=Math.max(c-o,0),this}ceil(t=1,a=.001){const l=Math.ceil((this.x+this.width-a)*t)/t,o=Math.ceil((this.y+this.height-a)*t)/t;return this.x=Math.floor((this.x+a)*t)/t,this.y=Math.floor((this.y+a)*t)/t,this.width=l-this.x,this.height=o-this.y,this}scale(t,a=t){return this.x*=t,this.y*=a,this.width*=t,this.height*=a,this}enlarge(t){const a=Math.min(this.x,t.x),l=Math.max(this.x+this.width,t.x+t.width),o=Math.min(this.y,t.y),c=Math.max(this.y+this.height,t.y+t.height);return this.x=a,this.width=l-a,this.y=o,this.height=c-o,this}getBounds(t){return t||(t=new mn),t.copyFrom(this),t}containsRect(t){if(this.width<=0||this.height<=0)return!1;const a=t.x,l=t.y,o=t.x+t.width,c=t.y+t.height;return a>=this.x&&a<this.x+this.width&&l>=this.y&&l<this.y+this.height&&o>=this.x&&o<this.x+this.width&&c>=this.y&&c<this.y+this.height}set(t,a,l,o){return this.x=t,this.y=a,this.width=l,this.height=o,this}toString(){return`[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}const N0={default:-1};function on(n="default"){return N0[n]===void 0&&(N0[n]=-1),++N0[n]}const B1=new Set,un="8.0.0",PT="8.3.4",Lc={quiet:!1,noColor:!1},de=((n,t,a=3)=>{if(Lc.quiet||B1.has(t))return;let l=new Error().stack;const o=`${t}
62
+ Deprecated since v${n}`,c=typeof console.groupCollapsed=="function"&&!Lc.noColor;typeof l>"u"?console.warn("PixiJS Deprecation Warning: ",o):(l=l.split(`
63
+ `).splice(a).join(`
64
+ `),c?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",o),console.warn(l),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",o),console.warn(l))),B1.add(t)});Object.defineProperties(de,{quiet:{get:()=>Lc.quiet,set:n=>{Lc.quiet=n},enumerable:!0,configurable:!1},noColor:{get:()=>Lc.noColor,set:n=>{Lc.noColor=n},enumerable:!0,configurable:!1}});const Xx=()=>{};function kc(n){return n+=n===0?1:0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1}function U1(n){return!(n&n-1)&&!!n}function Vx(n){const t={};for(const a in n)n[a]!==void 0&&(t[a]=n[a]);return t}const H1=Object.create(null);function FT(n){const t=H1[n];return t===void 0&&(H1[n]=on("resource")),t}const Qx=class kx extends ps{constructor(t={}){super(),this._resourceType="textureSampler",this._touched=0,this._maxAnisotropy=1,this.destroyed=!1,t={...kx.defaultOptions,...t},this.addressMode=t.addressMode,this.addressModeU=t.addressModeU??this.addressModeU,this.addressModeV=t.addressModeV??this.addressModeV,this.addressModeW=t.addressModeW??this.addressModeW,this.scaleMode=t.scaleMode,this.magFilter=t.magFilter??this.magFilter,this.minFilter=t.minFilter??this.minFilter,this.mipmapFilter=t.mipmapFilter??this.mipmapFilter,this.lodMinClamp=t.lodMinClamp,this.lodMaxClamp=t.lodMaxClamp,this.compare=t.compare,this.maxAnisotropy=t.maxAnisotropy??1}set addressMode(t){this.addressModeU=t,this.addressModeV=t,this.addressModeW=t}get addressMode(){return this.addressModeU}set wrapMode(t){de(un,"TextureStyle.wrapMode is now TextureStyle.addressMode"),this.addressMode=t}get wrapMode(){return this.addressMode}set scaleMode(t){this.magFilter=t,this.minFilter=t,this.mipmapFilter=t}get scaleMode(){return this.magFilter}set maxAnisotropy(t){this._maxAnisotropy=Math.min(t,16),this._maxAnisotropy>1&&(this.scaleMode="linear")}get maxAnisotropy(){return this._maxAnisotropy}get _resourceId(){return this._sharedResourceId||this._generateResourceId()}update(){this._sharedResourceId=null,this.emit("change",this)}_generateResourceId(){const t=`${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.minFilter}-${this.mipmapFilter}-${this.lodMinClamp}-${this.lodMaxClamp}-${this.compare}-${this._maxAnisotropy}`;return this._sharedResourceId=FT(t),this._resourceId}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this.removeAllListeners()}};Qx.defaultOptions={addressMode:"clamp-to-edge",scaleMode:"linear"};let Kc=Qx;const Kx=class Zx extends ps{constructor(t={}){super(),this.options=t,this._gpuData=Object.create(null),this._gcLastUsed=-1,this.uid=on("textureSource"),this._resourceType="textureSource",this._resourceId=on("resource"),this.uploadMethodId="unknown",this._resolution=1,this.pixelWidth=1,this.pixelHeight=1,this.width=1,this.height=1,this.sampleCount=1,this.mipLevelCount=1,this.autoGenerateMipmaps=!1,this.format="rgba8unorm",this.dimension="2d",this.viewDimension="2d",this.arrayLayerCount=1,this.antialias=!1,this._touched=0,this._batchTick=-1,this._textureBindLocation=-1,t={...Zx.defaultOptions,...t},this.label=t.label??"",this.resource=t.resource,this.autoGarbageCollect=t.autoGarbageCollect,this._resolution=t.resolution,t.width?this.pixelWidth=t.width*this._resolution:this.pixelWidth=this.resource?this.resourceWidth??1:1,t.height?this.pixelHeight=t.height*this._resolution:this.pixelHeight=this.resource?this.resourceHeight??1:1,this.width=this.pixelWidth/this._resolution,this.height=this.pixelHeight/this._resolution,this.format=t.format,this.dimension=t.dimensions,this.viewDimension=t.viewDimension??t.dimensions,this.arrayLayerCount=t.arrayLayerCount,this.mipLevelCount=t.mipLevelCount,this.autoGenerateMipmaps=t.autoGenerateMipmaps,this.sampleCount=t.sampleCount,this.antialias=t.antialias,this.alphaMode=t.alphaMode,this.style=new Kc(Vx(t)),this.destroyed=!1,this._refreshPOT()}get source(){return this}get style(){return this._style}set style(t){var a,l;this.style!==t&&((a=this._style)==null||a.off("change",this._onStyleChange,this),this._style=t,(l=this._style)==null||l.on("change",this._onStyleChange,this),this._onStyleChange())}set maxAnisotropy(t){this._style.maxAnisotropy=t}get maxAnisotropy(){return this._style.maxAnisotropy}get addressMode(){return this._style.addressMode}set addressMode(t){this._style.addressMode=t}get repeatMode(){return this._style.addressMode}set repeatMode(t){this._style.addressMode=t}get magFilter(){return this._style.magFilter}set magFilter(t){this._style.magFilter=t}get minFilter(){return this._style.minFilter}set minFilter(t){this._style.minFilter=t}get mipmapFilter(){return this._style.mipmapFilter}set mipmapFilter(t){this._style.mipmapFilter=t}get lodMinClamp(){return this._style.lodMinClamp}set lodMinClamp(t){this._style.lodMinClamp=t}get lodMaxClamp(){return this._style.lodMaxClamp}set lodMaxClamp(t){this._style.lodMaxClamp=t}_onStyleChange(){this.emit("styleChange",this)}update(){if(this.resource){const t=this._resolution;if(this.resize(this.resourceWidth/t,this.resourceHeight/t))return}this.emit("update",this)}destroy(){this.destroyed=!0,this.unload(),this.emit("destroy",this),this._style&&(this._style.destroy(),this._style=null),this.uploadMethodId=null,this.resource=null,this.removeAllListeners()}unload(){var t,a;this._resourceId=on("resource"),this.emit("change",this),this.emit("unload",this);for(const l in this._gpuData)(a=(t=this._gpuData[l])==null?void 0:t.destroy)==null||a.call(t);this._gpuData=Object.create(null)}get resourceWidth(){const{resource:t}=this;return t.naturalWidth||t.videoWidth||t.displayWidth||t.width}get resourceHeight(){const{resource:t}=this;return t.naturalHeight||t.videoHeight||t.displayHeight||t.height}get resolution(){return this._resolution}set resolution(t){this._resolution!==t&&(this._resolution=t,this.width=this.pixelWidth/t,this.height=this.pixelHeight/t)}resize(t,a,l){l||(l=this._resolution),t||(t=this.width),a||(a=this.height);const o=Math.round(t*l),c=Math.round(a*l);return this.width=o/l,this.height=c/l,this._resolution=l,this.pixelWidth===o&&this.pixelHeight===c?!1:(this._refreshPOT(),this.pixelWidth=o,this.pixelHeight=c,this.emit("resize",this),this._resourceId=on("resource"),this.emit("change",this),!0)}updateMipmaps(){this.autoGenerateMipmaps&&this.mipLevelCount>1&&this.emit("updateMipmaps",this)}set wrapMode(t){this._style.wrapMode=t}get wrapMode(){return this._style.wrapMode}set scaleMode(t){this._style.scaleMode=t}get scaleMode(){return this._style.scaleMode}_refreshPOT(){this.isPowerOfTwo=U1(this.pixelWidth)&&U1(this.pixelHeight)}static test(t){throw new Error("Unimplemented")}};Kx.defaultOptions={resolution:1,format:"bgra8unorm",alphaMode:"premultiply-alpha-on-upload",dimensions:"2d",viewDimension:"2d",arrayLayerCount:1,mipLevelCount:1,autoGenerateMipmaps:!1,sampleCount:1,antialias:!1,autoGarbageCollect:!1};let Pi=Kx;class Ky extends Pi{constructor(t){const a=t.resource||new Float32Array(t.width*t.height*4);let l=t.format;l||(a instanceof Float32Array?l="rgba32float":a instanceof Int32Array||a instanceof Uint32Array?l="rgba32uint":a instanceof Int16Array||a instanceof Uint16Array?l="rgba16uint":(a instanceof Int8Array,l="bgra8unorm")),super({...t,resource:a,format:l}),this.uploadMethodId="buffer"}static test(t){return t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array}}Ky.extension=Pt.TextureSource;const G1=new le;class IT{constructor(t,a){this.mapCoord=new le,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,typeof a>"u"?this.clampMargin=t.width<10?0:.5:this.clampMargin=a,this.isSimple=!1,this.texture=t}get texture(){return this._texture}set texture(t){var a;this.texture!==t&&((a=this._texture)==null||a.removeListener("update",this.update,this),this._texture=t,this._texture.addListener("update",this.update,this),this.update())}multiplyUvs(t,a){a===void 0&&(a=t);const l=this.mapCoord;for(let o=0;o<t.length;o+=2){const c=t[o],d=t[o+1];a[o]=c*l.a+d*l.c+l.tx,a[o+1]=c*l.b+d*l.d+l.ty}return a}update(){const t=this._texture;this._updateID++;const a=t.uvs;this.mapCoord.set(a.x1-a.x0,a.y1-a.y0,a.x3-a.x0,a.y3-a.y0,a.x0,a.y0);const l=t.orig,o=t.trim;o&&(G1.set(l.width/o.width,0,0,l.height/o.height,-o.x/o.width,-o.y/o.height),this.mapCoord.append(G1));const c=t.source,d=this.uClampFrame,m=this.clampMargin/c._resolution,p=this.clampOffset/c._resolution;return d[0]=(t.frame.x+m+p)/c.width,d[1]=(t.frame.y+m+p)/c.height,d[2]=(t.frame.x+t.frame.width-m+p)/c.width,d[3]=(t.frame.y+t.frame.height-m+p)/c.height,this.uClampOffset[0]=this.clampOffset/c.pixelWidth,this.uClampOffset[1]=this.clampOffset/c.pixelHeight,this.isSimple=t.frame.width===c.width&&t.frame.height===c.height&&t.rotate===0,!0}}class ze extends ps{constructor({source:t,label:a,frame:l,orig:o,trim:c,defaultAnchor:d,defaultBorders:m,rotate:p,dynamic:v}={}){if(super(),this.uid=on("texture"),this.uvs={x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},this.frame=new mn,this.noFrame=!1,this.dynamic=!1,this.isTexture=!0,this.label=a,this.source=(t==null?void 0:t.source)??new Pi,this.noFrame=!l,l)this.frame.copyFrom(l);else{const{width:_,height:b}=this._source;this.frame.width=_,this.frame.height=b}this.orig=o||this.frame,this.trim=c,this.rotate=p??0,this.defaultAnchor=d,this.defaultBorders=m,this.destroyed=!1,this.dynamic=v||!1,this.updateUvs()}set source(t){this._source&&this._source.off("resize",this.update,this),this._source=t,t.on("resize",this.update,this),this.emit("update",this)}get source(){return this._source}get textureMatrix(){return this._textureMatrix||(this._textureMatrix=new IT(this)),this._textureMatrix}get width(){return this.orig.width}get height(){return this.orig.height}updateUvs(){const{uvs:t,frame:a}=this,{width:l,height:o}=this._source,c=a.x/l,d=a.y/o,m=a.width/l,p=a.height/o;let v=this.rotate;if(v){const _=m/2,b=p/2,E=c+_,C=d+b;v=Ue.add(v,Ue.NW),t.x0=E+_*Ue.uX(v),t.y0=C+b*Ue.uY(v),v=Ue.add(v,2),t.x1=E+_*Ue.uX(v),t.y1=C+b*Ue.uY(v),v=Ue.add(v,2),t.x2=E+_*Ue.uX(v),t.y2=C+b*Ue.uY(v),v=Ue.add(v,2),t.x3=E+_*Ue.uX(v),t.y3=C+b*Ue.uY(v)}else t.x0=c,t.y0=d,t.x1=c+m,t.y1=d,t.x2=c+m,t.y2=d+p,t.x3=c,t.y3=d+p}destroy(t=!1){this._source&&(this._source.off("resize",this.update,this),t&&(this._source.destroy(),this._source=null)),this._textureMatrix=null,this.destroyed=!0,this.emit("destroy",this),this.removeAllListeners()}update(){this.noFrame&&(this.frame.width=this._source.width,this.frame.height=this._source.height),this.updateUvs(),this.emit("update",this)}get baseTexture(){return de(un,"Texture.baseTexture is now Texture.source"),this._source}}ze.EMPTY=new ze({label:"EMPTY",source:new Pi({label:"EMPTY"})});ze.EMPTY.destroy=Xx;ze.WHITE=new ze({source:new Ky({resource:new Uint8Array([255,255,255,255]),width:1,height:1,alphaMode:"premultiply-alpha-on-upload",label:"WHITE"}),label:"WHITE"});ze.WHITE.destroy=Xx;function Jx(n,t,a){const{width:l,height:o}=a.orig,c=a.trim;if(c){const d=c.width,m=c.height;n.minX=c.x-t._x*l,n.maxX=n.minX+d,n.minY=c.y-t._y*o,n.maxY=n.minY+m}else n.minX=-t._x*l,n.maxX=n.minX+l,n.minY=-t._y*o,n.maxY=n.minY+o}const j1=new le;class Wi{constructor(t=1/0,a=1/0,l=-1/0,o=-1/0){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=j1,this.minX=t,this.minY=a,this.maxX=l,this.maxY=o}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}get rectangle(){this._rectangle||(this._rectangle=new mn);const t=this._rectangle;return this.minX>this.maxX||this.minY>this.maxY?(t.x=0,t.y=0,t.width=0,t.height=0):t.copyFromBounds(this),t}clear(){return this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=j1,this}set(t,a,l,o){this.minX=t,this.minY=a,this.maxX=l,this.maxY=o}addFrame(t,a,l,o,c){c||(c=this.matrix);const d=c.a,m=c.b,p=c.c,v=c.d,_=c.tx,b=c.ty;let E=this.minX,C=this.minY,R=this.maxX,z=this.maxY,M=d*t+p*a+_,D=m*t+v*a+b;M<E&&(E=M),D<C&&(C=D),M>R&&(R=M),D>z&&(z=D),M=d*l+p*a+_,D=m*l+v*a+b,M<E&&(E=M),D<C&&(C=D),M>R&&(R=M),D>z&&(z=D),M=d*t+p*o+_,D=m*t+v*o+b,M<E&&(E=M),D<C&&(C=D),M>R&&(R=M),D>z&&(z=D),M=d*l+p*o+_,D=m*l+v*o+b,M<E&&(E=M),D<C&&(C=D),M>R&&(R=M),D>z&&(z=D),this.minX=E,this.minY=C,this.maxX=R,this.maxY=z}addRect(t,a){this.addFrame(t.x,t.y,t.x+t.width,t.y+t.height,a)}addBounds(t,a){this.addFrame(t.minX,t.minY,t.maxX,t.maxY,a)}addBoundsMask(t){this.minX=this.minX>t.minX?this.minX:t.minX,this.minY=this.minY>t.minY?this.minY:t.minY,this.maxX=this.maxX<t.maxX?this.maxX:t.maxX,this.maxY=this.maxY<t.maxY?this.maxY:t.maxY}applyMatrix(t){const a=this.minX,l=this.minY,o=this.maxX,c=this.maxY,{a:d,b:m,c:p,d:v,tx:_,ty:b}=t;let E=d*a+p*l+_,C=m*a+v*l+b;this.minX=E,this.minY=C,this.maxX=E,this.maxY=C,E=d*o+p*l+_,C=m*o+v*l+b,this.minX=E<this.minX?E:this.minX,this.minY=C<this.minY?C:this.minY,this.maxX=E>this.maxX?E:this.maxX,this.maxY=C>this.maxY?C:this.maxY,E=d*a+p*c+_,C=m*a+v*c+b,this.minX=E<this.minX?E:this.minX,this.minY=C<this.minY?C:this.minY,this.maxX=E>this.maxX?E:this.maxX,this.maxY=C>this.maxY?C:this.maxY,E=d*o+p*c+_,C=m*o+v*c+b,this.minX=E<this.minX?E:this.minX,this.minY=C<this.minY?C:this.minY,this.maxX=E>this.maxX?E:this.maxX,this.maxY=C>this.maxY?C:this.maxY}fit(t){return this.minX<t.left&&(this.minX=t.left),this.maxX>t.right&&(this.maxX=t.right),this.minY<t.top&&(this.minY=t.top),this.maxY>t.bottom&&(this.maxY=t.bottom),this}fitBounds(t,a,l,o){return this.minX<t&&(this.minX=t),this.maxX>a&&(this.maxX=a),this.minY<l&&(this.minY=l),this.maxY>o&&(this.maxY=o),this}pad(t,a=t){return this.minX-=t,this.maxX+=t,this.minY-=a,this.maxY+=a,this}ceil(){return this.minX=Math.floor(this.minX),this.minY=Math.floor(this.minY),this.maxX=Math.ceil(this.maxX),this.maxY=Math.ceil(this.maxY),this}clone(){return new Wi(this.minX,this.minY,this.maxX,this.maxY)}scale(t,a=t){return this.minX*=t,this.minY*=a,this.maxX*=t,this.maxY*=a,this}get x(){return this.minX}set x(t){const a=this.maxX-this.minX;this.minX=t,this.maxX=t+a}get y(){return this.minY}set y(t){const a=this.maxY-this.minY;this.minY=t,this.maxY=t+a}get width(){return this.maxX-this.minX}set width(t){this.maxX=this.minX+t}get height(){return this.maxY-this.minY}set height(t){this.maxY=this.minY+t}get left(){return this.minX}get right(){return this.maxX}get top(){return this.minY}get bottom(){return this.maxY}get isPositive(){return this.maxX-this.minX>0&&this.maxY-this.minY>0}get isValid(){return this.minX+this.minY!==1/0}addVertexData(t,a,l,o){let c=this.minX,d=this.minY,m=this.maxX,p=this.maxY;o||(o=this.matrix);const v=o.a,_=o.b,b=o.c,E=o.d,C=o.tx,R=o.ty;for(let z=a;z<l;z+=2){const M=t[z],D=t[z+1],w=v*M+b*D+C,B=_*M+E*D+R;c=w<c?w:c,d=B<d?B:d,m=w>m?w:m,p=B>p?B:p}this.minX=c,this.minY=d,this.maxX=m,this.maxY=p}containsPoint(t,a){return this.minX<=t&&this.minY<=a&&this.maxX>=t&&this.maxY>=a}toString(){return`[pixi.js:Bounds minX=${this.minX} minY=${this.minY} maxX=${this.maxX} maxY=${this.maxY} width=${this.width} height=${this.height}]`}copyFrom(t){return this.minX=t.minX,this.minY=t.minY,this.maxX=t.maxX,this.maxY=t.maxY,this}}var $T={grad:.9,turn:360,rad:360/(2*Math.PI)},Ps=function(n){return typeof n=="string"?n.length>0:typeof n=="number"},Yn=function(n,t,a){return t===void 0&&(t=0),a===void 0&&(a=Math.pow(10,t)),Math.round(a*n)/a+0},Zi=function(n,t,a){return t===void 0&&(t=0),a===void 0&&(a=1),n>a?a:n>t?n:t},Wx=function(n){return(n=isFinite(n)?n%360:0)>0?n:n+360},Y1=function(n){return{r:Zi(n.r,0,255),g:Zi(n.g,0,255),b:Zi(n.b,0,255),a:Zi(n.a)}},w0=function(n){return{r:Yn(n.r),g:Yn(n.g),b:Yn(n.b),a:Yn(n.a,3)}},t3=/^#([0-9a-f]{3,8})$/i,Pm=function(n){var t=n.toString(16);return t.length<2?"0"+t:t},Px=function(n){var t=n.r,a=n.g,l=n.b,o=n.a,c=Math.max(t,a,l),d=c-Math.min(t,a,l),m=d?c===t?(a-l)/d:c===a?2+(l-t)/d:4+(t-a)/d:0;return{h:60*(m<0?m+6:m),s:c?d/c*100:0,v:c/255*100,a:o}},Fx=function(n){var t=n.h,a=n.s,l=n.v,o=n.a;t=t/360*6,a/=100,l/=100;var c=Math.floor(t),d=l*(1-a),m=l*(1-(t-c)*a),p=l*(1-(1-t+c)*a),v=c%6;return{r:255*[l,m,d,d,p,l][v],g:255*[p,l,l,m,d,d][v],b:255*[d,d,p,l,l,m][v],a:o}},q1=function(n){return{h:Wx(n.h),s:Zi(n.s,0,100),l:Zi(n.l,0,100),a:Zi(n.a)}},L1=function(n){return{h:Yn(n.h),s:Yn(n.s),l:Yn(n.l),a:Yn(n.a,3)}},X1=function(n){return Fx((a=(t=n).s,{h:t.h,s:(a*=((l=t.l)<50?l:100-l)/100)>0?2*a/(l+a)*100:0,v:l+a,a:t.a}));var t,a,l},Ph=function(n){return{h:(t=Px(n)).h,s:(o=(200-(a=t.s))*(l=t.v)/100)>0&&o<200?a*l/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,a,l,o},e3=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,n3=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,a3=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,i3=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,gy={string:[[function(n){var t=t3.exec(n);return t?(n=t[1]).length<=4?{r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:n.length===4?Yn(parseInt(n[3]+n[3],16)/255,2):1}:n.length===6||n.length===8?{r:parseInt(n.substr(0,2),16),g:parseInt(n.substr(2,2),16),b:parseInt(n.substr(4,2),16),a:n.length===8?Yn(parseInt(n.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(n){var t=a3.exec(n)||i3.exec(n);return t?t[2]!==t[4]||t[4]!==t[6]?null:Y1({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(n){var t=e3.exec(n)||n3.exec(n);if(!t)return null;var a,l,o=q1({h:(a=t[1],l=t[2],l===void 0&&(l="deg"),Number(a)*($T[l]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return X1(o)},"hsl"]],object:[[function(n){var t=n.r,a=n.g,l=n.b,o=n.a,c=o===void 0?1:o;return Ps(t)&&Ps(a)&&Ps(l)?Y1({r:Number(t),g:Number(a),b:Number(l),a:Number(c)}):null},"rgb"],[function(n){var t=n.h,a=n.s,l=n.l,o=n.a,c=o===void 0?1:o;if(!Ps(t)||!Ps(a)||!Ps(l))return null;var d=q1({h:Number(t),s:Number(a),l:Number(l),a:Number(c)});return X1(d)},"hsl"],[function(n){var t=n.h,a=n.s,l=n.v,o=n.a,c=o===void 0?1:o;if(!Ps(t)||!Ps(a)||!Ps(l))return null;var d=(function(m){return{h:Wx(m.h),s:Zi(m.s,0,100),v:Zi(m.v,0,100),a:Zi(m.a)}})({h:Number(t),s:Number(a),v:Number(l),a:Number(c)});return Fx(d)},"hsv"]]},V1=function(n,t){for(var a=0;a<t.length;a++){var l=t[a][0](n);if(l)return[l,t[a][1]]}return[null,void 0]},l3=function(n){return typeof n=="string"?V1(n.trim(),gy.string):typeof n=="object"&&n!==null?V1(n,gy.object):[null,void 0]},B0=function(n,t){var a=Ph(n);return{h:a.h,s:Zi(a.s+100*t,0,100),l:a.l,a:a.a}},U0=function(n){return(299*n.r+587*n.g+114*n.b)/1e3/255},Q1=function(n,t){var a=Ph(n);return{h:a.h,s:a.s,l:Zi(a.l+100*t,0,100),a:a.a}},vy=(function(){function n(t){this.parsed=l3(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return n.prototype.isValid=function(){return this.parsed!==null},n.prototype.brightness=function(){return Yn(U0(this.rgba),2)},n.prototype.isDark=function(){return U0(this.rgba)<.5},n.prototype.isLight=function(){return U0(this.rgba)>=.5},n.prototype.toHex=function(){return t=w0(this.rgba),a=t.r,l=t.g,o=t.b,d=(c=t.a)<1?Pm(Yn(255*c)):"","#"+Pm(a)+Pm(l)+Pm(o)+d;var t,a,l,o,c,d},n.prototype.toRgb=function(){return w0(this.rgba)},n.prototype.toRgbString=function(){return t=w0(this.rgba),a=t.r,l=t.g,o=t.b,(c=t.a)<1?"rgba("+a+", "+l+", "+o+", "+c+")":"rgb("+a+", "+l+", "+o+")";var t,a,l,o,c},n.prototype.toHsl=function(){return L1(Ph(this.rgba))},n.prototype.toHslString=function(){return t=L1(Ph(this.rgba)),a=t.h,l=t.s,o=t.l,(c=t.a)<1?"hsla("+a+", "+l+"%, "+o+"%, "+c+")":"hsl("+a+", "+l+"%, "+o+"%)";var t,a,l,o,c},n.prototype.toHsv=function(){return t=Px(this.rgba),{h:Yn(t.h),s:Yn(t.s),v:Yn(t.v),a:Yn(t.a,3)};var t},n.prototype.invert=function(){return fs({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},n.prototype.saturate=function(t){return t===void 0&&(t=.1),fs(B0(this.rgba,t))},n.prototype.desaturate=function(t){return t===void 0&&(t=.1),fs(B0(this.rgba,-t))},n.prototype.grayscale=function(){return fs(B0(this.rgba,-1))},n.prototype.lighten=function(t){return t===void 0&&(t=.1),fs(Q1(this.rgba,t))},n.prototype.darken=function(t){return t===void 0&&(t=.1),fs(Q1(this.rgba,-t))},n.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},n.prototype.alpha=function(t){return typeof t=="number"?fs({r:(a=this.rgba).r,g:a.g,b:a.b,a:t}):Yn(this.rgba.a,3);var a},n.prototype.hue=function(t){var a=Ph(this.rgba);return typeof t=="number"?fs({h:t,s:a.s,l:a.l,a:a.a}):Yn(a.h)},n.prototype.isEqual=function(t){return this.toHex()===fs(t).toHex()},n})(),fs=function(n){return n instanceof vy?n:new vy(n)},k1=[],s3=function(n){n.forEach(function(t){k1.indexOf(t)<0&&(t(vy,gy),k1.push(t))})};function r3(n,t){var a={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},l={};for(var o in a)l[a[o]]=o;var c={};n.prototype.toName=function(d){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var m,p,v=l[this.toHex()];if(v)return v;if(d!=null&&d.closest){var _=this.toRgb(),b=1/0,E="black";if(!c.length)for(var C in a)c[C]=new n(a[C]).toRgb();for(var R in a){var z=(m=_,p=c[R],Math.pow(m.r-p.r,2)+Math.pow(m.g-p.g,2)+Math.pow(m.b-p.b,2));z<b&&(b=z,E=R)}return E}},t.string.push([function(d){var m=d.toLowerCase(),p=m==="transparent"?"#0000":a[m];return p?new n(p).toRgb():null},"name"])}s3([r3]);const Zc=class kh{constructor(t=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=t}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(t){return this.value=t,this}set value(t){if(t instanceof kh)this._value=this._cloneSource(t._value),this._int=t._int,this._components.set(t._components);else{if(t===null)throw new Error("Cannot set Color#value to null");(this._value===null||!this._isSourceEqual(this._value,t))&&(this._value=this._cloneSource(t),this._normalize(this._value))}}get value(){return this._value}_cloneSource(t){return typeof t=="string"||typeof t=="number"||t instanceof Number||t===null?t:Array.isArray(t)||ArrayBuffer.isView(t)?t.slice(0):typeof t=="object"&&t!==null?{...t}:t}_isSourceEqual(t,a){const l=typeof t;if(l!==typeof a)return!1;if(l==="number"||l==="string"||t instanceof Number)return t===a;if(Array.isArray(t)&&Array.isArray(a)||ArrayBuffer.isView(t)&&ArrayBuffer.isView(a))return t.length!==a.length?!1:t.every((c,d)=>c===a[d]);if(t!==null&&a!==null){const c=Object.keys(t),d=Object.keys(a);return c.length!==d.length?!1:c.every(m=>t[m]===a[m])}return t===a}toRgba(){const[t,a,l,o]=this._components;return{r:t,g:a,b:l,a:o}}toRgb(){const[t,a,l]=this._components;return{r:t,g:a,b:l}}toRgbaString(){const[t,a,l]=this.toUint8RgbArray();return`rgba(${t},${a},${l},${this.alpha})`}toUint8RgbArray(t){const[a,l,o]=this._components;return this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb),t[0]=Math.round(a*255),t[1]=Math.round(l*255),t[2]=Math.round(o*255),t}toArray(t){this._arrayRgba||(this._arrayRgba=[]),t||(t=this._arrayRgba);const[a,l,o,c]=this._components;return t[0]=a,t[1]=l,t[2]=o,t[3]=c,t}toRgbArray(t){this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb);const[a,l,o]=this._components;return t[0]=a,t[1]=l,t[2]=o,t}toNumber(){return this._int}toBgrNumber(){const[t,a,l]=this.toUint8RgbArray();return(l<<16)+(a<<8)+t}toLittleEndianNumber(){const t=this._int;return(t>>16)+(t&65280)+((t&255)<<16)}multiply(t){const[a,l,o,c]=kh._temp.setValue(t)._components;return this._components[0]*=a,this._components[1]*=l,this._components[2]*=o,this._components[3]*=c,this._refreshInt(),this._value=null,this}premultiply(t,a=!0){return a&&(this._components[0]*=t,this._components[1]*=t,this._components[2]*=t),this._components[3]=t,this._refreshInt(),this._value=null,this}toPremultiplied(t,a=!0){if(t===1)return(255<<24)+this._int;if(t===0)return a?0:this._int;let l=this._int>>16&255,o=this._int>>8&255,c=this._int&255;return a&&(l=l*t+.5|0,o=o*t+.5|0,c=c*t+.5|0),(t*255<<24)+(l<<16)+(o<<8)+c}toHex(){const t=this._int.toString(16);return`#${"000000".substring(0,6-t.length)+t}`}toHexa(){const a=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-a.length)+a}setAlpha(t){return this._components[3]=this._clamp(t),this._value=null,this}_normalize(t){let a,l,o,c;if((typeof t=="number"||t instanceof Number)&&t>=0&&t<=16777215){const d=t;a=(d>>16&255)/255,l=(d>>8&255)/255,o=(d&255)/255,c=1}else if((Array.isArray(t)||t instanceof Float32Array)&&t.length>=3&&t.length<=4)t=this._clamp(t),[a,l,o,c=1]=t;else if((t instanceof Uint8Array||t instanceof Uint8ClampedArray)&&t.length>=3&&t.length<=4)t=this._clamp(t,0,255),[a,l,o,c=255]=t,a/=255,l/=255,o/=255,c/=255;else if(typeof t=="string"||typeof t=="object"){if(typeof t=="string"){const m=kh.HEX_PATTERN.exec(t);m&&(t=`#${m[2]}`)}const d=fs(t);d.isValid()&&({r:a,g:l,b:o,a:c}=d.rgba,a/=255,l/=255,o/=255)}if(a!==void 0)this._components[0]=a,this._components[1]=l,this._components[2]=o,this._components[3]=c,this._refreshInt();else throw new Error(`Unable to convert color ${t}`)}_refreshInt(){this._clamp(this._components);const[t,a,l]=this._components;this._int=(t*255<<16)+(a*255<<8)+(l*255|0)}_clamp(t,a=0,l=1){return typeof t=="number"?Math.min(Math.max(t,a),l):(t.forEach((o,c)=>{t[c]=Math.min(Math.max(o,a),l)}),t)}static isColorLike(t){return typeof t=="number"||typeof t=="string"||t instanceof Number||t instanceof kh||Array.isArray(t)||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Float32Array||t.r!==void 0&&t.g!==void 0&&t.b!==void 0||t.r!==void 0&&t.g!==void 0&&t.b!==void 0&&t.a!==void 0||t.h!==void 0&&t.s!==void 0&&t.l!==void 0||t.h!==void 0&&t.s!==void 0&&t.l!==void 0&&t.a!==void 0||t.h!==void 0&&t.s!==void 0&&t.v!==void 0||t.h!==void 0&&t.s!==void 0&&t.v!==void 0&&t.a!==void 0}};Zc.shared=new Zc;Zc._temp=new Zc;Zc.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let Rn=Zc;const u3={cullArea:null,cullable:!1,cullableChildren:!0};let H0=0;const K1=500;function Ga(...n){H0!==K1&&(H0++,H0===K1?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...n))}const od={_registeredResources:new Set,register(n){this._registeredResources.add(n)},unregister(n){this._registeredResources.delete(n)},release(){this._registeredResources.forEach(n=>n.clear())},get registeredCount(){return this._registeredResources.size},isRegistered(n){return this._registeredResources.has(n)},reset(){this._registeredResources.clear()}};class o3{constructor(t,a){this._pool=[],this._count=0,this._index=0,this._classType=t,a&&this.prepopulate(a)}prepopulate(t){for(let a=0;a<t;a++)this._pool[this._index++]=new this._classType;this._count+=t}get(t){var l;let a;return this._index>0?a=this._pool[--this._index]:(a=new this._classType,this._count++),(l=a.init)==null||l.call(a,t),a}return(t){var a;(a=t.reset)==null||a.call(t),this._pool[this._index++]=t}get totalSize(){return this._count}get totalFree(){return this._index}get totalUsed(){return this._count-this._index}clear(){if(this._pool.length>0&&this._pool[0].destroy)for(let t=0;t<this._index;t++)this._pool[t].destroy();this._pool.length=0,this._count=0,this._index=0}}class c3{constructor(){this._poolsByClass=new Map}prepopulate(t,a){this.getPool(t).prepopulate(a)}get(t,a){return this.getPool(t).get(a)}return(t){this.getPool(t.constructor).return(t)}getPool(t){return this._poolsByClass.has(t)||this._poolsByClass.set(t,new o3(t)),this._poolsByClass.get(t)}stats(){const t={};return this._poolsByClass.forEach(a=>{const l=t[a._classType.name]?a._classType.name+a._classType.ID:a._classType.name;t[l]={free:a.totalFree,used:a.totalUsed,size:a.totalSize}}),t}clear(){this._poolsByClass.forEach(t=>t.clear()),this._poolsByClass.clear()}}const ti=new c3;od.register(ti);const f3={get isCachedAsTexture(){var n;return!!((n=this.renderGroup)!=null&&n.isCachedAsTexture)},cacheAsTexture(n){typeof n=="boolean"&&n===!1?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(n===!0?{}:n))},updateCacheTexture(){var n;(n=this.renderGroup)==null||n.updateCacheTexture()},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(n){de("v8.6.0","cacheAsBitmap is deprecated, use cacheAsTexture instead."),this.cacheAsTexture(n)}};function h3(n,t,a){const l=n.length;let o;if(t>=l||a===0)return;a=t+a>l?l-t:a;const c=l-a;for(o=t;o<c;++o)n[o]=n[o+a];n.length=c}const d3={allowChildren:!0,removeChildren(n=0,t){var c;const a=t??this.children.length,l=a-n,o=[];if(l>0&&l<=a){for(let m=a-1;m>=n;m--){const p=this.children[m];p&&(o.push(p),p.parent=null)}h3(this.children,n,a);const d=this.renderGroup||this.parentRenderGroup;d&&d.removeChildren(o);for(let m=0;m<o.length;++m){const p=o[m];(c=p.parentRenderLayer)==null||c.detach(p),this.emit("childRemoved",p,this,m),o[m].emit("removed",this)}return o.length>0&&this._didViewChangeTick++,o}else if(l===0&&this.children.length===0)return o;throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},removeChildAt(n){const t=this.getChildAt(n);return this.removeChild(t)},getChildAt(n){if(n<0||n>=this.children.length)throw new Error(`getChildAt: Index (${n}) does not exist.`);return this.children[n]},setChildIndex(n,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);this.getChildIndex(n),this.addChildAt(n,t)},getChildIndex(n){const t=this.children.indexOf(n);if(t===-1)throw new Error("The supplied Container must be a child of the caller");return t},addChildAt(n,t){this.allowChildren||de(un,"addChildAt: Only Containers will be allowed to add children in v8.0.0");const{children:a}=this;if(t<0||t>a.length)throw new Error(`${n}addChildAt: The index ${t} supplied is out of bounds ${a.length}`);const l=n.parent===this;if(n.parent){const c=n.parent.children.indexOf(n);if(l){if(c===t)return n;n.parent.children.splice(c,1)}else n.removeFromParent()}t===a.length?a.push(n):a.splice(t,0,n),n.parent=this,n.didChange=!0,n._updateFlags=15;const o=this.renderGroup||this.parentRenderGroup;return o&&o.addChild(n),this.sortableChildren&&(this.sortDirty=!0),l||(this.emit("childAdded",n,this,t),n.emit("added",this)),n},swapChildren(n,t){if(n===t)return;const a=this.getChildIndex(n),l=this.getChildIndex(t);this.children[a]=t,this.children[l]=n;const o=this.renderGroup||this.parentRenderGroup;o&&(o.structureDidChange=!0),this._didContainerChangeTick++},removeFromParent(){var n;(n=this.parent)==null||n.removeChild(this)},reparentChild(...n){return n.length===1?this.reparentChildAt(n[0],this.children.length):(n.forEach(t=>this.reparentChildAt(t,this.children.length)),n[0])},reparentChildAt(n,t){if(n.parent===this)return this.setChildIndex(n,t),n;const a=n.worldTransform.clone();n.removeFromParent(),this.addChildAt(n,t);const l=this.worldTransform.clone();return l.invert(),a.prepend(l),n.setFromMatrix(a),n},replaceChild(n,t){n.updateLocalTransform(),this.addChildAt(t,this.getChildIndex(n)),t.setFromMatrix(n.localTransform),t.updateLocalTransform(),this.removeChild(n)}},m3={collectRenderables(n,t,a){this.parentRenderLayer&&this.parentRenderLayer!==a||this.globalDisplayStatus<7||!this.includeInBuild||(this.sortableChildren&&this.sortChildren(),this.isSimple?this.collectRenderablesSimple(n,t,a):this.renderGroup?t.renderPipes.renderGroup.addRenderGroup(this.renderGroup,n):this.collectRenderablesWithEffects(n,t,a))},collectRenderablesSimple(n,t,a){const l=this.children,o=l.length;for(let c=0;c<o;c++)l[c].collectRenderables(n,t,a)},collectRenderablesWithEffects(n,t,a){const{renderPipes:l}=t;for(let o=0;o<this.effects.length;o++){const c=this.effects[o];l[c.pipe].push(c,this,n)}this.collectRenderablesSimple(n,t,a);for(let o=this.effects.length-1;o>=0;o--){const c=this.effects[o];l[c.pipe].pop(c,this,n)}}};class Z1{constructor(){this.pipe="filter",this.priority=1}destroy(){for(let t=0;t<this.filters.length;t++)this.filters[t].destroy();this.filters=null,this.filterArea=null}}class p3{constructor(){this._effectClasses=[],this._tests=[],this._initialized=!1}init(){this._initialized||(this._initialized=!0,this._effectClasses.forEach(t=>{this.add({test:t.test,maskClass:t})}))}add(t){this._tests.push(t)}getMaskEffect(t){this._initialized||this.init();for(let a=0;a<this._tests.length;a++){const l=this._tests[a];if(l.test(t))return ti.get(l.maskClass,t)}return t}returnMaskEffect(t){ti.return(t)}}const xy=new p3;Ie.handleByList(Pt.MaskEffect,xy._effectClasses);const y3={_maskEffect:null,_maskOptions:{inverse:!1},_filterEffect:null,effects:[],_markStructureAsChanged(){const n=this.renderGroup||this.parentRenderGroup;n&&(n.structureDidChange=!0)},addEffect(n){this.effects.indexOf(n)===-1&&(this.effects.push(n),this.effects.sort((a,l)=>a.priority-l.priority),this._markStructureAsChanged(),this._updateIsSimple())},removeEffect(n){const t=this.effects.indexOf(n);t!==-1&&(this.effects.splice(t,1),this._markStructureAsChanged(),this._updateIsSimple())},set mask(n){const t=this._maskEffect;(t==null?void 0:t.mask)!==n&&(t&&(this.removeEffect(t),xy.returnMaskEffect(t),this._maskEffect=null),n!=null&&(this._maskEffect=xy.getMaskEffect(n),this.addEffect(this._maskEffect)))},get mask(){var n;return(n=this._maskEffect)==null?void 0:n.mask},setMask(n){this._maskOptions={...this._maskOptions,...n},n.mask&&(this.mask=n.mask),this._markStructureAsChanged()},set filters(n){var c;!Array.isArray(n)&&n&&(n=[n]);const t=this._filterEffect||(this._filterEffect=new Z1);n=n;const a=(n==null?void 0:n.length)>0,l=((c=t.filters)==null?void 0:c.length)>0,o=a!==l;n=Array.isArray(n)?n.slice(0):n,t.filters=Object.freeze(n),o&&(a?this.addEffect(t):(this.removeEffect(t),t.filters=n??null))},get filters(){var n;return(n=this._filterEffect)==null?void 0:n.filters},set filterArea(n){this._filterEffect||(this._filterEffect=new Z1),this._filterEffect.filterArea=n},get filterArea(){var n;return(n=this._filterEffect)==null?void 0:n.filterArea}},g3={label:null,get name(){return de(un,"Container.name property has been removed, use Container.label instead"),this.label},set name(n){de(un,"Container.name property has been removed, use Container.label instead"),this.label=n},getChildByName(n,t=!1){return this.getChildByLabel(n,t)},getChildByLabel(n,t=!1){const a=this.children;for(let l=0;l<a.length;l++){const o=a[l];if(o.label===n||n instanceof RegExp&&n.test(o.label))return o}if(t)for(let l=0;l<a.length;l++){const c=a[l].getChildByLabel(n,!0);if(c)return c}return null},getChildrenByLabel(n,t=!1,a=[]){const l=this.children;for(let o=0;o<l.length;o++){const c=l[o];(c.label===n||n instanceof RegExp&&n.test(c.label))&&a.push(c)}if(t)for(let o=0;o<l.length;o++)l[o].getChildrenByLabel(n,!0,a);return a}},Ha=ti.getPool(le),er=ti.getPool(Wi),v3=new le,x3={getFastGlobalBounds(n,t){t||(t=new Wi),t.clear(),this._getGlobalBoundsRecursive(!!n,t,this.parentRenderLayer),t.isValid||t.set(0,0,0,0);const a=this.renderGroup||this.parentRenderGroup;return t.applyMatrix(a.worldTransform),t},_getGlobalBoundsRecursive(n,t,a){let l=t;if(n&&this.parentRenderLayer&&this.parentRenderLayer!==a||this.localDisplayStatus!==7||!this.measurable)return;const o=!!this.effects.length;if((this.renderGroup||o)&&(l=er.get().clear()),this.boundsArea)t.addRect(this.boundsArea,this.worldTransform);else{if(this.renderPipeId){const d=this.bounds;l.addFrame(d.minX,d.minY,d.maxX,d.maxY,this.groupTransform)}const c=this.children;for(let d=0;d<c.length;d++)c[d]._getGlobalBoundsRecursive(n,l,a)}if(o){let c=!1;const d=this.renderGroup||this.parentRenderGroup;for(let m=0;m<this.effects.length;m++)this.effects[m].addBounds&&(c||(c=!0,l.applyMatrix(d.worldTransform)),this.effects[m].addBounds(l,!0));c&&l.applyMatrix(d.worldTransform.copyTo(v3).invert()),t.addBounds(l),er.return(l)}else this.renderGroup&&(t.addBounds(l,this.relativeGroupTransform),er.return(l))}};function Ix(n,t,a){a.clear();let l,o;return n.parent?t?l=n.parent.worldTransform:(o=Ha.get().identity(),l=Zy(n,o)):l=le.IDENTITY,$x(n,a,l,t),o&&Ha.return(o),a.isValid||a.set(0,0,0,0),a}function $x(n,t,a,l){var m,p;if(!n.visible||!n.measurable)return;let o;l?o=n.worldTransform:(n.updateLocalTransform(),o=Ha.get(),o.appendFrom(n.localTransform,a));const c=t,d=!!n.effects.length;if(d&&(t=er.get().clear()),n.boundsArea)t.addRect(n.boundsArea,o);else{const v=n.bounds;v&&!v.isEmpty()&&(t.matrix=o,t.addBounds(v));for(let _=0;_<n.children.length;_++)$x(n.children[_],t,o,l)}if(d){for(let v=0;v<n.effects.length;v++)(p=(m=n.effects[v]).addBounds)==null||p.call(m,t);c.addBounds(t,le.IDENTITY),er.return(t)}l||Ha.return(o)}function Zy(n,t){const a=n.parent;return a&&(Zy(a,t),a.updateLocalTransform(),t.append(a.localTransform)),t}function t_(n,t){if(n===16777215||!t)return t;if(t===16777215||!n)return n;const a=n>>16&255,l=n>>8&255,o=n&255,c=t>>16&255,d=t>>8&255,m=t&255,p=a*c/255|0,v=l*d/255|0,_=o*m/255|0;return(p<<16)+(v<<8)+_}const J1=16777215;function W1(n,t){return n===J1?t:t===J1?n:t_(n,t)}function mp(n){return((n&255)<<16)+(n&65280)+(n>>16&255)}const _3={getGlobalAlpha(n){if(n)return this.renderGroup?this.renderGroup.worldAlpha:this.parentRenderGroup?this.parentRenderGroup.worldAlpha*this.alpha:this.alpha;let t=this.alpha,a=this.parent;for(;a;)t*=a.alpha,a=a.parent;return t},getGlobalTransform(n=new le,t){if(t)return n.copyFrom(this.worldTransform);this.updateLocalTransform();const a=Zy(this,Ha.get().identity());return n.appendFrom(this.localTransform,a),Ha.return(a),n},getGlobalTint(n){if(n)return this.renderGroup?mp(this.renderGroup.worldColor):this.parentRenderGroup?mp(W1(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let t=this.localColor,a=this.parent;for(;a;)t=W1(t,a.localColor),a=a.parent;return mp(t)}};function e_(n,t,a){return t.clear(),a||(a=le.IDENTITY),n_(n,t,a,n,!0),t.isValid||t.set(0,0,0,0),t}function n_(n,t,a,l,o){var p,v;let c;if(o)c=Ha.get(),c=a.copyTo(c);else{if(!n.visible||!n.measurable)return;n.updateLocalTransform();const _=n.localTransform;c=Ha.get(),c.appendFrom(_,a)}const d=t,m=!!n.effects.length;if(m&&(t=er.get().clear()),n.boundsArea)t.addRect(n.boundsArea,c);else{n.renderPipeId&&(t.matrix=c,t.addBounds(n.bounds));const _=n.children;for(let b=0;b<_.length;b++)n_(_[b],t,c,l,!1)}if(m){for(let _=0;_<n.effects.length;_++)(v=(p=n.effects[_]).addLocalBounds)==null||v.call(p,t,l);d.addBounds(t,le.IDENTITY),er.return(t)}Ha.return(c)}function a_(n,t){const a=n.children;for(let l=0;l<a.length;l++){const o=a[l],c=o.uid,d=(o._didViewChangeTick&65535)<<16|o._didContainerChangeTick&65535,m=t.index;(t.data[m]!==c||t.data[m+1]!==d)&&(t.data[t.index]=c,t.data[t.index+1]=d,t.didChange=!0),t.index=m+2,o.children.length&&a_(o,t)}return t.didChange}const S3=new le,b3={_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(n,t){const a=Math.sign(this.scale.x)||1;t!==0?this.scale.x=n/t*a:this.scale.x=a},_setHeight(n,t){const a=Math.sign(this.scale.y)||1;t!==0?this.scale.y=n/t*a:this.scale.y=a},getLocalBounds(){this._localBoundsCacheData||(this._localBoundsCacheData={data:[],index:1,didChange:!1,localBounds:new Wi});const n=this._localBoundsCacheData;return n.index=1,n.didChange=!1,n.data[0]!==this._didViewChangeTick&&(n.didChange=!0,n.data[0]=this._didViewChangeTick),a_(this,n),n.didChange&&e_(this,n.localBounds,S3),n.localBounds},getBounds(n,t){return Ix(this,n,t||new Wi)}},T3={_onRender:null,set onRender(n){const t=this.renderGroup||this.parentRenderGroup;if(!n){this._onRender&&(t==null||t.removeOnRender(this)),this._onRender=null;return}this._onRender||t==null||t.addOnRender(this),this._onRender=n},get onRender(){return this._onRender}},E3={_zIndex:0,sortDirty:!1,sortableChildren:!1,get zIndex(){return this._zIndex},set zIndex(n){this._zIndex!==n&&(this._zIndex=n,this.depthOfChildModified())},depthOfChildModified(){this.parent&&(this.parent.sortableChildren=!0,this.parent.sortDirty=!0),this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0)},sortChildren(){this.sortDirty&&(this.sortDirty=!1,this.children.sort(C3))}};function C3(n,t){return n._zIndex-t._zIndex}const A3={getGlobalPosition(n=new ma,t=!1){return this.parent?this.parent.toGlobal(this._position,n,t):(n.x=this._position.x,n.y=this._position.y),n},toGlobal(n,t,a=!1){const l=this.getGlobalTransform(Ha.get(),a);return t=l.apply(n,t),Ha.return(l),t},toLocal(n,t,a,l){t&&(n=t.toGlobal(n,a,l));const o=this.getGlobalTransform(Ha.get(),l);return a=o.applyInverse(n,a),Ha.return(o),a}};class Jy{constructor(){this.uid=on("instructionSet"),this.instructions=[],this.instructionSize=0,this.renderables=[],this.gcTick=0}reset(){this.instructionSize=0}destroy(){this.instructions.length=0,this.renderables.length=0,this.renderPipes=null,this.gcTick=0}add(t){this.instructions[this.instructionSize++]=t}log(){this.instructions.length=this.instructionSize,console.table(this.instructions,["type","action"])}}let M3=0;class R3{constructor(t){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this.textureStyle=new Kc(this.textureOptions)}createTexture(t,a,l,o){const c=new Pi({...this.textureOptions,width:t,height:a,resolution:1,antialias:l,autoGarbageCollect:!1,autoGenerateMipmaps:o});return new ze({source:c,label:`texturePool_${M3++}`})}getOptimalTexture(t,a,l=1,o,c=!1){let d=Math.ceil(t*l-1e-6),m=Math.ceil(a*l-1e-6);d=kc(d),m=kc(m);const p=o?1:0,v=c?1:0,_=(d<<17)+(m<<2)+(v<<1)+p;this._texturePool[_]||(this._texturePool[_]=[]);let b=this._texturePool[_].pop();return b||(b=this.createTexture(d,m,o,c)),b.source._resolution=l,b.source.width=d/l,b.source.height=m/l,b.source.pixelWidth=d,b.source.pixelHeight=m,b.frame.x=0,b.frame.y=0,b.frame.width=t,b.frame.height=a,b.updateUvs(),this._poolKeyHash[b.uid]=_,b}getSameSizeTexture(t,a=!1){const l=t.source;return this.getOptimalTexture(t.width,t.height,l._resolution,a)}returnTexture(t,a=!1){const l=this._poolKeyHash[t.uid];a&&(t.source.style=this.textureStyle),this._texturePool[l].push(t)}clear(t){if(t=t!==!1,t)for(const a in this._texturePool){const l=this._texturePool[a];if(l)for(let o=0;o<l.length;o++)l[o].destroy(!0)}this._texturePool={}}}const Op=new R3;od.register(Op);class z3{constructor(){this.renderPipeId="renderGroup",this.root=null,this.canBundle=!1,this.renderGroupParent=null,this.renderGroupChildren=[],this.worldTransform=new le,this.worldColorAlpha=4294967295,this.worldColor=16777215,this.worldAlpha=1,this.childrenToUpdate=Object.create(null),this.updateTick=0,this.gcTick=0,this.childrenRenderablesToUpdate={list:[],index:0},this.structureDidChange=!0,this.instructionSet=new Jy,this._onRenderContainers=[],this.textureNeedsUpdate=!0,this.isCachedAsTexture=!1,this._matrixDirty=7}init(t){this.root=t,t._onRender&&this.addOnRender(t),t.didChange=!0;const a=t.children;for(let l=0;l<a.length;l++){const o=a[l];o._updateFlags=15,this.addChild(o)}}enableCacheAsTexture(t={}){this.textureOptions=t,this.isCachedAsTexture=!0,this.textureNeedsUpdate=!0}disableCacheAsTexture(){this.isCachedAsTexture=!1,this.texture&&(Op.returnTexture(this.texture,!0),this.texture=null)}updateCacheTexture(){this.textureNeedsUpdate=!0;const t=this._parentCacheAsTextureRenderGroup;t&&!t.textureNeedsUpdate&&t.updateCacheTexture()}reset(){this.renderGroupChildren.length=0;for(const t in this.childrenToUpdate){const a=this.childrenToUpdate[t];a.list.fill(null),a.index=0}this.childrenRenderablesToUpdate.index=0,this.childrenRenderablesToUpdate.list.fill(null),this.root=null,this.updateTick=0,this.structureDidChange=!0,this._onRenderContainers.length=0,this.renderGroupParent=null,this.disableCacheAsTexture()}get localTransform(){return this.root.localTransform}addRenderGroupChild(t){t.renderGroupParent&&t.renderGroupParent._removeRenderGroupChild(t),t.renderGroupParent=this,this.renderGroupChildren.push(t)}_removeRenderGroupChild(t){const a=this.renderGroupChildren.indexOf(t);a>-1&&this.renderGroupChildren.splice(a,1),t.renderGroupParent=null}addChild(t){if(this.structureDidChange=!0,t.parentRenderGroup=this,t.updateTick=-1,t.parent===this.root?t.relativeRenderGroupDepth=1:t.relativeRenderGroupDepth=t.parent.relativeRenderGroupDepth+1,t.didChange=!0,this.onChildUpdate(t),t.renderGroup){this.addRenderGroupChild(t.renderGroup);return}t._onRender&&this.addOnRender(t);const a=t.children;for(let l=0;l<a.length;l++)this.addChild(a[l])}removeChild(t){if(this.structureDidChange=!0,t._onRender&&(t.renderGroup||this.removeOnRender(t)),t.parentRenderGroup=null,t.renderGroup){this._removeRenderGroupChild(t.renderGroup);return}const a=t.children;for(let l=0;l<a.length;l++)this.removeChild(a[l])}removeChildren(t){for(let a=0;a<t.length;a++)this.removeChild(t[a])}onChildUpdate(t){let a=this.childrenToUpdate[t.relativeRenderGroupDepth];a||(a=this.childrenToUpdate[t.relativeRenderGroupDepth]={index:0,list:[]}),a.list[a.index++]=t}updateRenderable(t){t.globalDisplayStatus<7||(this.instructionSet.renderPipes[t.renderPipeId].updateRenderable(t),t.didViewUpdate=!1)}onChildViewUpdate(t){this.childrenRenderablesToUpdate.list[this.childrenRenderablesToUpdate.index++]=t}get isRenderable(){return this.root.localDisplayStatus===7&&this.worldAlpha>0}addOnRender(t){this._onRenderContainers.push(t)}removeOnRender(t){this._onRenderContainers.splice(this._onRenderContainers.indexOf(t),1)}runOnRender(t){for(let a=0;a<this._onRenderContainers.length;a++)this._onRenderContainers[a]._onRender(t)}destroy(){this.disableCacheAsTexture(),this.renderGroupParent=null,this.root=null,this.childrenRenderablesToUpdate=null,this.childrenToUpdate=null,this.renderGroupChildren=null,this._onRenderContainers=null,this.instructionSet=null}getChildren(t=[]){const a=this.root.children;for(let l=0;l<a.length;l++)this._getChildren(a[l],t);return t}_getChildren(t,a=[]){if(a.push(t),t.renderGroup)return a;const l=t.children;for(let o=0;o<l.length;o++)this._getChildren(l[o],a);return a}invalidateMatrices(){this._matrixDirty=7}get inverseWorldTransform(){return(this._matrixDirty&1)===0?this._inverseWorldTransform:(this._matrixDirty&=-2,this._inverseWorldTransform||(this._inverseWorldTransform=new le),this._inverseWorldTransform.copyFrom(this.worldTransform).invert())}get textureOffsetInverseTransform(){return(this._matrixDirty&2)===0?this._textureOffsetInverseTransform:(this._matrixDirty&=-3,this._textureOffsetInverseTransform||(this._textureOffsetInverseTransform=new le),this._textureOffsetInverseTransform.copyFrom(this.inverseWorldTransform).translate(-this._textureBounds.x,-this._textureBounds.y))}get inverseParentTextureTransform(){if((this._matrixDirty&4)===0)return this._inverseParentTextureTransform;this._matrixDirty&=-5;const t=this._parentCacheAsTextureRenderGroup;return t?(this._inverseParentTextureTransform||(this._inverseParentTextureTransform=new le),this._inverseParentTextureTransform.copyFrom(this.worldTransform).prepend(t.inverseWorldTransform).translate(-t._textureBounds.x,-t._textureBounds.y)):this.worldTransform}get cacheToLocalTransform(){return this.isCachedAsTexture?this.textureOffsetInverseTransform:this._parentCacheAsTextureRenderGroup?this._parentCacheAsTextureRenderGroup.textureOffsetInverseTransform:null}}function D3(n,t,a={}){for(const l in t)!a[l]&&t[l]!==void 0&&(n[l]=t[l])}const G0=new Pn(null),Fm=new Pn(null),j0=new Pn(null,1,1),Im=new Pn(null),P1=1,O3=2,Y0=4;class Fn extends ps{constructor(t={}){var a,l;super(),this.uid=on("renderable"),this._updateFlags=15,this.renderGroup=null,this.parentRenderGroup=null,this.parentRenderGroupIndex=0,this.didChange=!1,this.didViewUpdate=!1,this.relativeRenderGroupDepth=0,this.children=[],this.parent=null,this.includeInBuild=!0,this.measurable=!0,this.isSimple=!0,this.parentRenderLayer=null,this.updateTick=-1,this.localTransform=new le,this.relativeGroupTransform=new le,this.groupTransform=this.relativeGroupTransform,this.destroyed=!1,this._position=new Pn(this,0,0),this._scale=j0,this._pivot=Fm,this._origin=Im,this._skew=G0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._rotation=0,this.localColor=16777215,this.localAlpha=1,this.groupAlpha=1,this.groupColor=16777215,this.groupColorAlpha=4294967295,this.localBlendMode="inherit",this.groupBlendMode="normal",this.localDisplayStatus=7,this.globalDisplayStatus=7,this._didContainerChangeTick=0,this._didViewChangeTick=0,this._didLocalTransformChangeId=-1,this.effects=[],D3(this,t,{children:!0,parent:!0,effects:!0}),(a=t.children)==null||a.forEach(o=>this.addChild(o)),(l=t.parent)==null||l.addChild(this)}static mixin(t){de("8.8.0","Container.mixin is deprecated, please use extensions.mixin instead."),Ie.mixin(Fn,t)}set _didChangeId(t){this._didViewChangeTick=t>>12&4095,this._didContainerChangeTick=t&4095}get _didChangeId(){return this._didContainerChangeTick&4095|(this._didViewChangeTick&4095)<<12}addChild(...t){if(this.allowChildren||de(un,"addChild: Only Containers will be allowed to add children in v8.0.0"),t.length>1){for(let o=0;o<t.length;o++)this.addChild(t[o]);return t[0]}const a=t[0],l=this.renderGroup||this.parentRenderGroup;return a.parent===this?(this.children.splice(this.children.indexOf(a),1),this.children.push(a),l&&(l.structureDidChange=!0),a):(a.parent&&a.parent.removeChild(a),this.children.push(a),this.sortableChildren&&(this.sortDirty=!0),a.parent=this,a.didChange=!0,a._updateFlags=15,l&&l.addChild(a),this.emit("childAdded",a,this,this.children.length-1),a.emit("added",this),this._didViewChangeTick++,a._zIndex!==0&&a.depthOfChildModified(),a)}removeChild(...t){if(t.length>1){for(let o=0;o<t.length;o++)this.removeChild(t[o]);return t[0]}const a=t[0],l=this.children.indexOf(a);return l>-1&&(this._didViewChangeTick++,this.children.splice(l,1),this.renderGroup?this.renderGroup.removeChild(a):this.parentRenderGroup&&this.parentRenderGroup.removeChild(a),a.parentRenderLayer&&a.parentRenderLayer.detach(a),a.parent=null,this.emit("childRemoved",a,this,l),a.emit("removed",this)),a}_onUpdate(t){t&&t===this._skew&&this._updateSkew(),this._didContainerChangeTick++,!this.didChange&&(this.didChange=!0,this.parentRenderGroup&&this.parentRenderGroup.onChildUpdate(this))}set isRenderGroup(t){!!this.renderGroup!==t&&(t?this.enableRenderGroup():this.disableRenderGroup())}get isRenderGroup(){return!!this.renderGroup}enableRenderGroup(){if(this.renderGroup)return;const t=this.parentRenderGroup;t==null||t.removeChild(this),this.renderGroup=ti.get(z3,this),this.groupTransform=le.IDENTITY,t==null||t.addChild(this),this._updateIsSimple()}disableRenderGroup(){if(!this.renderGroup)return;const t=this.parentRenderGroup;t==null||t.removeChild(this),ti.return(this.renderGroup),this.renderGroup=null,this.groupTransform=this.relativeGroupTransform,t==null||t.addChild(this),this._updateIsSimple()}_updateIsSimple(){this.isSimple=!this.renderGroup&&this.effects.length===0}get worldTransform(){return this._worldTransform||(this._worldTransform=new le),this.renderGroup?this._worldTransform.copyFrom(this.renderGroup.worldTransform):this.parentRenderGroup&&this._worldTransform.appendFrom(this.relativeGroupTransform,this.parentRenderGroup.worldTransform),this._worldTransform}get x(){return this._position.x}set x(t){this._position.x=t}get y(){return this._position.y}set y(t){this._position.y=t}get position(){return this._position}set position(t){this._position.copyFrom(t)}get rotation(){return this._rotation}set rotation(t){this._rotation!==t&&(this._rotation=t,this._onUpdate(this._skew))}get angle(){return this.rotation*kT}set angle(t){this.rotation=t*KT}get pivot(){return this._pivot===Fm&&(this._pivot=new Pn(this,0,0)),this._pivot}set pivot(t){this._pivot===Fm&&(this._pivot=new Pn(this,0,0),this._origin!==Im&&Ga("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),typeof t=="number"?this._pivot.set(t):this._pivot.copyFrom(t)}get skew(){return this._skew===G0&&(this._skew=new Pn(this,0,0)),this._skew}set skew(t){this._skew===G0&&(this._skew=new Pn(this,0,0)),this._skew.copyFrom(t)}get scale(){return this._scale===j0&&(this._scale=new Pn(this,1,1)),this._scale}set scale(t){this._scale===j0&&(this._scale=new Pn(this,0,0)),typeof t=="string"&&(t=parseFloat(t)),typeof t=="number"?this._scale.set(t):this._scale.copyFrom(t)}get origin(){return this._origin===Im&&(this._origin=new Pn(this,0,0)),this._origin}set origin(t){this._origin===Im&&(this._origin=new Pn(this,0,0),this._pivot!==Fm&&Ga("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),typeof t=="number"?this._origin.set(t):this._origin.copyFrom(t)}get width(){return Math.abs(this.scale.x*this.getLocalBounds().width)}set width(t){const a=this.getLocalBounds().width;this._setWidth(t,a)}get height(){return Math.abs(this.scale.y*this.getLocalBounds().height)}set height(t){const a=this.getLocalBounds().height;this._setHeight(t,a)}getSize(t){t||(t={});const a=this.getLocalBounds();return t.width=Math.abs(this.scale.x*a.width),t.height=Math.abs(this.scale.y*a.height),t}setSize(t,a){const l=this.getLocalBounds();typeof t=="object"?(a=t.height??t.width,t=t.width):a??(a=t),t!==void 0&&this._setWidth(t,l.width),a!==void 0&&this._setHeight(a,l.height)}_updateSkew(){const t=this._rotation,a=this._skew;this._cx=Math.cos(t+a._y),this._sx=Math.sin(t+a._y),this._cy=-Math.sin(t-a._x),this._sy=Math.cos(t-a._x)}updateTransform(t){return this.position.set(typeof t.x=="number"?t.x:this.position.x,typeof t.y=="number"?t.y:this.position.y),this.scale.set(typeof t.scaleX=="number"?t.scaleX||1:this.scale.x,typeof t.scaleY=="number"?t.scaleY||1:this.scale.y),this.rotation=typeof t.rotation=="number"?t.rotation:this.rotation,this.skew.set(typeof t.skewX=="number"?t.skewX:this.skew.x,typeof t.skewY=="number"?t.skewY:this.skew.y),this.pivot.set(typeof t.pivotX=="number"?t.pivotX:this.pivot.x,typeof t.pivotY=="number"?t.pivotY:this.pivot.y),this.origin.set(typeof t.originX=="number"?t.originX:this.origin.x,typeof t.originY=="number"?t.originY:this.origin.y),this}setFromMatrix(t){t.decompose(this)}updateLocalTransform(){const t=this._didContainerChangeTick;if(this._didLocalTransformChangeId===t)return;this._didLocalTransformChangeId=t;const a=this.localTransform,l=this._scale,o=this._pivot,c=this._origin,d=this._position,m=l._x,p=l._y,v=o._x,_=o._y,b=-c._x,E=-c._y;a.a=this._cx*m,a.b=this._sx*m,a.c=this._cy*p,a.d=this._sy*p,a.tx=d._x-(v*a.a+_*a.c)+(b*a.a+E*a.c)-b,a.ty=d._y-(v*a.b+_*a.d)+(b*a.b+E*a.d)-E}set alpha(t){t!==this.localAlpha&&(this.localAlpha=t,this._updateFlags|=P1,this._onUpdate())}get alpha(){return this.localAlpha}set tint(t){const l=Rn.shared.setValue(t??16777215).toBgrNumber();l!==this.localColor&&(this.localColor=l,this._updateFlags|=P1,this._onUpdate())}get tint(){return mp(this.localColor)}set blendMode(t){this.localBlendMode!==t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=O3,this.localBlendMode=t,this._onUpdate())}get blendMode(){return this.localBlendMode}get visible(){return!!(this.localDisplayStatus&2)}set visible(t){const a=t?2:0;(this.localDisplayStatus&2)!==a&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=Y0,this.localDisplayStatus^=2,this._onUpdate(),this.emit("visibleChanged",t))}get culled(){return!(this.localDisplayStatus&4)}set culled(t){const a=t?0:4;(this.localDisplayStatus&4)!==a&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=Y0,this.localDisplayStatus^=4,this._onUpdate())}get renderable(){return!!(this.localDisplayStatus&1)}set renderable(t){const a=t?1:0;(this.localDisplayStatus&1)!==a&&(this._updateFlags|=Y0,this.localDisplayStatus^=1,this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._onUpdate())}get isRenderable(){return this.localDisplayStatus===7&&this.groupAlpha>0}destroy(t=!1){var o;if(this.destroyed)return;this.destroyed=!0;let a;if(this.children.length&&(a=this.removeChildren(0,this.children.length)),this.removeFromParent(),this.parent=null,this._maskEffect=null,this._filterEffect=null,this.effects=null,this._position=null,this._scale=null,this._pivot=null,this._origin=null,this._skew=null,this.emit("destroyed",this),this.removeAllListeners(),(typeof t=="boolean"?t:t==null?void 0:t.children)&&a)for(let c=0;c<a.length;++c)a[c].destroy(t);(o=this.renderGroup)==null||o.destroy(),this.renderGroup=null}}Ie.mixin(Fn,d3,x3,A3,T3,b3,y3,g3,E3,u3,f3,_3,m3);class Wy extends Fn{constructor(t){super(t),this.canBundle=!0,this.allowChildren=!1,this._roundPixels=0,this._lastUsed=-1,this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this._bounds=new Wi(0,1,0,0),this._boundsDirty=!0,this.autoGarbageCollect=t.autoGarbageCollect??!0}get bounds(){return this._boundsDirty?(this.updateBounds(),this._boundsDirty=!1,this._bounds):this._bounds}get roundPixels(){return!!this._roundPixels}set roundPixels(t){this._roundPixels=t?1:0}containsPoint(t){const a=this.bounds,{x:l,y:o}=t;return l>=a.minX&&l<=a.maxX&&o>=a.minY&&o<=a.maxY}onViewUpdate(){if(this._didViewChangeTick++,this._boundsDirty=!0,this.didViewUpdate)return;this.didViewUpdate=!0;const t=this.renderGroup||this.parentRenderGroup;t&&t.onChildViewUpdate(this)}unload(){var t;this.emit("unload",this);for(const a in this._gpuData)(t=this._gpuData[a])==null||t.destroy();this._gpuData=Object.create(null),this.onViewUpdate()}destroy(t){this.unload(),super.destroy(t),this._bounds=null}collectRenderablesSimple(t,a,l){const{renderPipes:o}=a;o.blendMode.pushBlendMode(this,this.groupBlendMode,t);const d=o[this.renderPipeId];d!=null&&d.addRenderable&&d.addRenderable(this,t),this.didViewUpdate=!1;const m=this.children,p=m.length;for(let v=0;v<p;v++)m[v].collectRenderables(t,a,l);o.blendMode.popBlendMode(t)}}class Jc extends Wy{constructor(t=ze.EMPTY){t instanceof ze&&(t={texture:t});const{texture:a=ze.EMPTY,anchor:l,roundPixels:o,width:c,height:d,...m}=t;super({label:"Sprite",...m}),this.renderPipeId="sprite",this.batched=!0,this._visualBounds={minX:0,maxX:1,minY:0,maxY:0},this._anchor=new Pn({_onUpdate:()=>{this.onViewUpdate()}}),l?this.anchor=l:a.defaultAnchor&&(this.anchor=a.defaultAnchor),this.texture=a,this.allowChildren=!1,this.roundPixels=o??!1,c!==void 0&&(this.width=c),d!==void 0&&(this.height=d)}static from(t,a=!1){return t instanceof ze?new Jc(t):new Jc(ze.from(t,a))}set texture(t){t||(t=ze.EMPTY);const a=this._texture;a!==t&&(a&&a.dynamic&&a.off("update",this.onViewUpdate,this),t.dynamic&&t.on("update",this.onViewUpdate,this),this._texture=t,this._width&&this._setWidth(this._width,this._texture.orig.width),this._height&&this._setHeight(this._height,this._texture.orig.height),this.onViewUpdate())}get texture(){return this._texture}get visualBounds(){return Jx(this._visualBounds,this._anchor,this._texture),this._visualBounds}get sourceBounds(){return de("8.6.1","Sprite.sourceBounds is deprecated, use visualBounds instead."),this.visualBounds}updateBounds(){const t=this._anchor,a=this._texture,l=this._bounds,{width:o,height:c}=a.orig;l.minX=-t._x*o,l.maxX=l.minX+o,l.minY=-t._y*c,l.maxY=l.minY+c}destroy(t=!1){if(super.destroy(t),typeof t=="boolean"?t:t==null?void 0:t.texture){const l=typeof t=="boolean"?t:t==null?void 0:t.textureSource;this._texture.destroy(l)}this._texture=null,this._visualBounds=null,this._bounds=null,this._anchor=null}get anchor(){return this._anchor}set anchor(t){typeof t=="number"?this._anchor.set(t):this._anchor.copyFrom(t)}get width(){return Math.abs(this.scale.x)*this._texture.orig.width}set width(t){this._setWidth(t,this._texture.orig.width),this._width=t}get height(){return Math.abs(this.scale.y)*this._texture.orig.height}set height(t){this._setHeight(t,this._texture.orig.height),this._height=t}getSize(t){return t||(t={}),t.width=Math.abs(this.scale.x)*this._texture.orig.width,t.height=Math.abs(this.scale.y)*this._texture.orig.height,t}setSize(t,a){typeof t=="object"?(a=t.height??t.width,t=t.width):a??(a=t),t!==void 0&&this._setWidth(t,this._texture.orig.width),a!==void 0&&this._setHeight(a,this._texture.orig.height)}}const N3=new Wi;function i_(n,t,a){const l=N3;n.measurable=!0,Ix(n,a,l),t.addBoundsMask(l),n.measurable=!1}function l_(n,t,a){const l=er.get();n.measurable=!0;const o=Ha.get().identity(),c=s_(n,a,o);e_(n,l,c),n.measurable=!1,t.addBoundsMask(l),Ha.return(o),er.return(l)}function s_(n,t,a){return n?(n!==t&&(s_(n.parent,t,a),n.updateLocalTransform(),a.append(n.localTransform)),a):(Ga("Mask bounds, renderable is not inside the root container"),a)}class r_{constructor(t){this.priority=0,this.inverse=!1,this.pipe="alphaMask",t!=null&&t.mask&&this.init(t.mask)}init(t){this.mask=t,this.renderMaskToTexture=!(t instanceof Jc),this.mask.renderable=this.renderMaskToTexture,this.mask.includeInBuild=!this.renderMaskToTexture,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask=null)}addBounds(t,a){this.inverse||i_(this.mask,t,a)}addLocalBounds(t,a){l_(this.mask,t,a)}containsPoint(t,a){const l=this.mask;return a(l,t)}destroy(){this.reset()}static test(t){return t instanceof Jc}}r_.extension=Pt.MaskEffect;class u_{constructor(t){this.priority=0,this.pipe="colorMask",t!=null&&t.mask&&this.init(t.mask)}init(t){this.mask=t}destroy(){}static test(t){return typeof t=="number"}}u_.extension=Pt.MaskEffect;class o_{constructor(t){this.priority=0,this.pipe="stencilMask",t!=null&&t.mask&&this.init(t.mask)}init(t){this.mask=t,this.mask.includeInBuild=!1,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask.includeInBuild=!0,this.mask=null)}addBounds(t,a){i_(this.mask,t,a)}addLocalBounds(t,a){l_(this.mask,t,a)}containsPoint(t,a){const l=this.mask;return a(l,t)}destroy(){this.reset()}static test(t){return t instanceof Fn}}o_.extension=Pt.MaskEffect;const w3={createCanvas:(n,t)=>{const a=document.createElement("canvas");return a.width=n,a.height=t,a},createImage:()=>new Image,getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(n,t)=>fetch(n,t),parseXML:n=>new DOMParser().parseFromString(n,"text/xml")};let F1=w3;const vi={get(){return F1},set(n){F1=n}};class c_ extends Pi{constructor(t){t.resource||(t.resource=vi.get().createCanvas()),t.width||(t.width=t.resource.width,t.autoDensity||(t.width/=t.resolution)),t.height||(t.height=t.resource.height,t.autoDensity||(t.height/=t.resolution)),super(t),this.uploadMethodId="image",this.autoDensity=t.autoDensity,this.resizeCanvas(),this.transparent=!!t.transparent}resizeCanvas(){this.autoDensity&&"style"in this.resource&&(this.resource.style.width=`${this.width}px`,this.resource.style.height=`${this.height}px`),(this.resource.width!==this.pixelWidth||this.resource.height!==this.pixelHeight)&&(this.resource.width=this.pixelWidth,this.resource.height=this.pixelHeight)}resize(t=this.width,a=this.height,l=this._resolution){const o=super.resize(t,a,l);return o&&this.resizeCanvas(),o}static test(t){return globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement||globalThis.OffscreenCanvas&&t instanceof OffscreenCanvas}get context2D(){return this._context2D||(this._context2D=this.resource.getContext("2d"))}}c_.extension=Pt.TextureSource;class gp extends Pi{constructor(t){super(t),this.uploadMethodId="image",this.autoGarbageCollect=!0}static test(t){return globalThis.HTMLImageElement&&t instanceof HTMLImageElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap||globalThis.VideoFrame&&t instanceof VideoFrame}}gp.extension=Pt.TextureSource;var vp=(n=>(n[n.INTERACTION=50]="INTERACTION",n[n.HIGH=25]="HIGH",n[n.NORMAL=0]="NORMAL",n[n.LOW=-25]="LOW",n[n.UTILITY=-50]="UTILITY",n))(vp||{});class q0{constructor(t,a=null,l=0,o=!1){this.next=null,this.previous=null,this._destroyed=!1,this._fn=t,this._context=a,this.priority=l,this._once=o}match(t,a=null){return this._fn===t&&this._context===a}emit(t){this._fn&&(this._context?this._fn.call(this._context,t):this._fn(t));const a=this.next;return this._once&&this.destroy(!0),this._destroyed&&(this.next=null),a}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!1){this._destroyed=!0,this._fn=null,this._context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const a=this.next;return this.next=t?null:a,this.previous=null,a}}const f_=class yi{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new q0(null,null,1/0),this.deltaMS=1/yi.targetFPMS,this.elapsedMS=1/yi.targetFPMS,this._tick=t=>{this._requestId=null,this.started&&(this.update(t),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(t,a,l=vp.NORMAL){return this._addListener(new q0(t,a,l))}addOnce(t,a,l=vp.NORMAL){return this._addListener(new q0(t,a,l,!0))}_addListener(t){let a=this._head.next,l=this._head;if(!a)t.connect(l);else{for(;a;){if(t.priority>a.priority){t.connect(l);break}l=a,a=a.next}t.previous||t.connect(l)}return this._startIfPossible(),this}remove(t,a){let l=this._head.next;for(;l;)l.match(t,a)?l=l.destroy():l=l.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let t=0,a=this._head;for(;a=a.next;)t++;return t}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let t=this._head.next;for(;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}}update(t=performance.now()){let a;if(t>this.lastTime){if(a=this.elapsedMS=t-this.lastTime,a>this._maxElapsedMS&&(a=this._maxElapsedMS),a*=this.speed,this._minElapsedMS){const c=t-this._lastFrame|0;if(c<this._minElapsedMS)return;this._lastFrame=t-c%this._minElapsedMS}this.deltaMS=a,this.deltaTime=this.deltaMS*yi.targetFPMS;const l=this._head;let o=l.next;for(;o;)o=o.emit(this);l.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(t){const a=Math.min(Math.max(0,t)/1e3,yi.targetFPMS);this._maxElapsedMS=1/a,this._minElapsedMS&&t>this.maxFPS&&(this.maxFPS=t)}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(t){t===0?this._minElapsedMS=0:(t<this.minFPS&&(this.minFPS=t),this._minElapsedMS=1/(t/1e3))}static get shared(){if(!yi._shared){const t=yi._shared=new yi;t.autoStart=!0,t._protected=!0}return yi._shared}static get system(){if(!yi._system){const t=yi._system=new yi;t.autoStart=!0,t._protected=!0}return yi._system}};f_.targetFPMS=.06;let Xc=f_,L0;async function B3(){return L0??(L0=(async()=>{var d;const t=vi.get().createCanvas(1,1).getContext("webgl");if(!t)return"premultiply-alpha-on-upload";const a=await new Promise(m=>{const p=document.createElement("video");p.onloadeddata=()=>m(p),p.onerror=()=>m(null),p.autoplay=!1,p.crossOrigin="anonymous",p.preload="auto",p.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",p.load()});if(!a)return"premultiply-alpha-on-upload";const l=t.createTexture();t.bindTexture(t.TEXTURE_2D,l);const o=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,o),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,l,0),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,t.NONE),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,a);const c=new Uint8Array(4);return t.readPixels(0,0,1,1,t.RGBA,t.UNSIGNED_BYTE,c),t.deleteFramebuffer(o),t.deleteTexture(l),(d=t.getExtension("WEBGL_lose_context"))==null||d.loseContext(),c[0]<=c[3]?"premultiplied-alpha":"premultiply-alpha-on-upload"})()),L0}const Np=class h_ extends Pi{constructor(t){super(t),this.isReady=!1,this.uploadMethodId="video",t={...h_.defaultOptions,...t},this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this.alphaMode=t.alphaMode??"premultiply-alpha-on-upload",this._videoFrameRequestCallback=this._videoFrameRequestCallback.bind(this),this._videoFrameRequestCallbackHandle=null,this._load=null,this._resolve=null,this._reject=null,this._onCanPlay=this._onCanPlay.bind(this),this._onCanPlayThrough=this._onCanPlayThrough.bind(this),this._onError=this._onError.bind(this),this._onPlayStart=this._onPlayStart.bind(this),this._onPlayStop=this._onPlayStop.bind(this),this._onSeeked=this._onSeeked.bind(this),t.autoLoad!==!1&&this.load()}updateFrame(){if(!this.destroyed){if(this._updateFPS){const t=Xc.shared.elapsedMS*this.resource.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-t)}(!this._updateFPS||this._msToNextUpdate<=0)&&(this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0),this.isValid&&this.update()}}_videoFrameRequestCallback(){this.updateFrame(),this.destroyed?this._videoFrameRequestCallbackHandle=null:this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback)}get isValid(){return!!this.resource.videoWidth&&!!this.resource.videoHeight}async load(){if(this._load)return this._load;const t=this.resource,a=this.options;return(t.readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),t.addEventListener("play",this._onPlayStart),t.addEventListener("pause",this._onPlayStop),t.addEventListener("seeked",this._onSeeked),this._isSourceReady()?this._mediaReady():(a.preload||t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlayThrough),t.addEventListener("error",this._onError,!0)),this.alphaMode=await B3(),this._load=new Promise((l,o)=>{this.isValid?l(this):(this._resolve=l,this._reject=o,a.preloadTimeoutMs!==void 0&&(this._preloadTimeout=setTimeout(()=>{this._onError(new ErrorEvent(`Preload exceeded timeout of ${a.preloadTimeoutMs}ms`))})),t.load())}),this._load}_onError(t){this.resource.removeEventListener("error",this._onError,!0),this.emit("error",t),this._reject&&(this._reject(t),this._reject=null,this._resolve=null)}_isSourcePlaying(){const t=this.resource;return!t.paused&&!t.ended}_isSourceReady(){return this.resource.readyState>2}_onPlayStart(){this.isValid||this._mediaReady(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0)}_onCanPlay(){this.resource.removeEventListener("canplay",this._onCanPlay),this._mediaReady()}_onCanPlayThrough(){this.resource.removeEventListener("canplaythrough",this._onCanPlay),this._preloadTimeout&&(clearTimeout(this._preloadTimeout),this._preloadTimeout=void 0),this._mediaReady()}_mediaReady(){const t=this.resource;this.isValid&&(this.isReady=!0,this.resize(t.videoWidth,t.videoHeight)),this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0,this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.resource.play()}destroy(){this._configureAutoUpdate();const t=this.resource;t&&(t.removeEventListener("play",this._onPlayStart),t.removeEventListener("pause",this._onPlayStop),t.removeEventListener("seeked",this._onSeeked),t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlayThrough),t.removeEventListener("error",this._onError,!0),t.pause(),t.src="",t.load()),super.destroy()}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(t){t!==this._updateFPS&&(this._updateFPS=t,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.resource.requestVideoFrameCallback?(this._isConnectedToTicker&&(Xc.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(Xc.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(Xc.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(t){return globalThis.HTMLVideoElement&&t instanceof HTMLVideoElement}};Np.extension=Pt.TextureSource;Np.defaultOptions={...Pi.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1};Np.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let U3=Np;const Yc=(n,t,a=!1)=>(Array.isArray(n)||(n=[n]),t?n.map(l=>typeof l=="string"||a?t(l):l):n);class H3{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(t){return this._cache.has(t)}get(t){const a=this._cache.get(t);return a||Ga(`[Assets] Asset id ${t} was not found in the Cache`),a}set(t,a){const l=Yc(t);let o;for(let p=0;p<this.parsers.length;p++){const v=this.parsers[p];if(v.test(a)){o=v.getCacheableAssets(l,a);break}}const c=new Map(Object.entries(o||{}));o||l.forEach(p=>{c.set(p,a)});const d=[...c.keys()],m={cacheKeys:d,keys:l};l.forEach(p=>{this._cacheMap.set(p,m)}),d.forEach(p=>{const v=o?o[p]:a;this._cache.has(p)&&this._cache.get(p)!==v&&Ga("[Cache] already has key:",p),this._cache.set(p,c.get(p))})}remove(t){if(!this._cacheMap.has(t)){Ga(`[Assets] Asset id ${t} was not found in the Cache`);return}const a=this._cacheMap.get(t);a.cacheKeys.forEach(o=>{this._cache.delete(o)}),a.keys.forEach(o=>{this._cacheMap.delete(o)})}get parsers(){return this._parsers}}const qc=new H3,_y=[];Ie.handleByList(Pt.TextureSource,_y);function d_(n={}){const t=n&&n.resource,a=t?n.resource:n,l=t?n:{resource:n};for(let o=0;o<_y.length;o++){const c=_y[o];if(c.test(a))return new c(l)}throw new Error(`Could not find a source type for resource: ${l.resource}`)}function G3(n={},t=!1){const a=n&&n.resource,l=a?n.resource:n,o=a?n:{resource:n};if(!t&&qc.has(l))return qc.get(l);const c=new ze({source:d_(o)});return c.on("destroy",()=>{qc.has(l)&&qc.remove(l)}),t||qc.set(l,c),c}function j3(n,t=!1){return typeof n=="string"?qc.get(n):n instanceof Pi?new ze({source:n}):G3(n,t)}ze.from=j3;Pi.from=d_;Ie.add(r_,u_,o_,U3,gp,c_,Ky);var m_=(n=>(n[n.Low=0]="Low",n[n.Normal=1]="Normal",n[n.High=2]="High",n))(m_||{});function Tl(n){if(typeof n!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(n)}`)}function Gh(n){return n.split("?")[0].split("#")[0]}function Y3(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function q3(n,t,a){return n.replace(new RegExp(Y3(t),"g"),a)}function L3(n,t){let a="",l=0,o=-1,c=0,d=-1;for(let m=0;m<=n.length;++m){if(m<n.length)d=n.charCodeAt(m);else{if(d===47)break;d=47}if(d===47){if(!(o===m-1||c===1))if(o!==m-1&&c===2){if(a.length<2||l!==2||a.charCodeAt(a.length-1)!==46||a.charCodeAt(a.length-2)!==46){if(a.length>2){const p=a.lastIndexOf("/");if(p!==a.length-1){p===-1?(a="",l=0):(a=a.slice(0,p),l=a.length-1-a.lastIndexOf("/")),o=m,c=0;continue}}else if(a.length===2||a.length===1){a="",l=0,o=m,c=0;continue}}}else a.length>0?a+=`/${n.slice(o+1,m)}`:a=n.slice(o+1,m),l=m-o-1;o=m,c=0}else d===46&&c!==-1?++c:c=-1}return a}const ed={toPosix(n){return q3(n,"\\","/")},isUrl(n){return/^https?:/.test(this.toPosix(n))},isDataUrl(n){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(n)},isBlobUrl(n){return n.startsWith("blob:")},hasProtocol(n){return/^[^/:]+:/.test(this.toPosix(n))},getProtocol(n){Tl(n),n=this.toPosix(n);const t=/^file:\/\/\//.exec(n);if(t)return t[0];const a=/^[^/:]+:\/{0,2}/.exec(n);return a?a[0]:""},toAbsolute(n,t,a){if(Tl(n),this.isDataUrl(n)||this.isBlobUrl(n))return n;const l=Gh(this.toPosix(t??vi.get().getBaseUrl())),o=Gh(this.toPosix(a??this.rootname(l)));return n=this.toPosix(n),n.startsWith("/")?ed.join(o,n.slice(1)):this.isAbsolute(n)?n:this.join(l,n)},normalize(n){if(Tl(n),n.length===0)return".";if(this.isDataUrl(n)||this.isBlobUrl(n))return n;n=this.toPosix(n);let t="";const a=n.startsWith("/");this.hasProtocol(n)&&(t=this.rootname(n),n=n.slice(t.length));const l=n.endsWith("/");return n=L3(n),n.length>0&&l&&(n+="/"),a?`/${n}`:t+n},isAbsolute(n){return Tl(n),n=this.toPosix(n),this.hasProtocol(n)?!0:n.startsWith("/")},join(...n){if(n.length===0)return".";let t;for(let a=0;a<n.length;++a){const l=n[a];if(Tl(l),l.length>0)if(t===void 0)t=l;else{const o=n[a-1]??"";this.joinExtensions.includes(this.extname(o).toLowerCase())?t+=`/../${l}`:t+=`/${l}`}}return t===void 0?".":this.normalize(t)},dirname(n){if(Tl(n),n.length===0)return".";n=this.toPosix(n);let t=n.charCodeAt(0);const a=t===47;let l=-1,o=!0;const c=this.getProtocol(n),d=n;n=n.slice(c.length);for(let m=n.length-1;m>=1;--m)if(t=n.charCodeAt(m),t===47){if(!o){l=m;break}}else o=!1;return l===-1?a?"/":this.isUrl(d)?c+n:c:a&&l===1?"//":c+n.slice(0,l)},rootname(n){Tl(n),n=this.toPosix(n);let t="";if(n.startsWith("/")?t="/":t=this.getProtocol(n),this.isUrl(n)){const a=n.indexOf("/",t.length);a!==-1?t=n.slice(0,a):t=n,t.endsWith("/")||(t+="/")}return t},basename(n,t){Tl(n),t&&Tl(t),n=Gh(this.toPosix(n));let a=0,l=-1,o=!0,c;if(t!==void 0&&t.length>0&&t.length<=n.length){if(t.length===n.length&&t===n)return"";let d=t.length-1,m=-1;for(c=n.length-1;c>=0;--c){const p=n.charCodeAt(c);if(p===47){if(!o){a=c+1;break}}else m===-1&&(o=!1,m=c+1),d>=0&&(p===t.charCodeAt(d)?--d===-1&&(l=c):(d=-1,l=m))}return a===l?l=m:l===-1&&(l=n.length),n.slice(a,l)}for(c=n.length-1;c>=0;--c)if(n.charCodeAt(c)===47){if(!o){a=c+1;break}}else l===-1&&(o=!1,l=c+1);return l===-1?"":n.slice(a,l)},extname(n){Tl(n),n=Gh(this.toPosix(n));let t=-1,a=0,l=-1,o=!0,c=0;for(let d=n.length-1;d>=0;--d){const m=n.charCodeAt(d);if(m===47){if(!o){a=d+1;break}continue}l===-1&&(o=!1,l=d+1),m===46?t===-1?t=d:c!==1&&(c=1):t!==-1&&(c=-1)}return t===-1||l===-1||c===0||c===1&&t===l-1&&t===a+1?"":n.slice(t,l)},parse(n){Tl(n);const t={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return t;n=Gh(this.toPosix(n));let a=n.charCodeAt(0);const l=this.isAbsolute(n);let o;t.root=this.rootname(n),l||this.hasProtocol(n)?o=1:o=0;let c=-1,d=0,m=-1,p=!0,v=n.length-1,_=0;for(;v>=o;--v){if(a=n.charCodeAt(v),a===47){if(!p){d=v+1;break}continue}m===-1&&(p=!1,m=v+1),a===46?c===-1?c=v:_!==1&&(_=1):c!==-1&&(_=-1)}return c===-1||m===-1||_===0||_===1&&c===m-1&&c===d+1?m!==-1&&(d===0&&l?t.base=t.name=n.slice(1,m):t.base=t.name=n.slice(d,m)):(d===0&&l?(t.name=n.slice(1,c),t.base=n.slice(1,m)):(t.name=n.slice(d,c),t.base=n.slice(d,m)),t.ext=n.slice(c,m)),t.dir=this.dirname(n),t},sep:"/",delimiter:":",joinExtensions:[".html"]};function p_(n,t,a,l,o){const c=t[a];for(let d=0;d<c.length;d++){const m=c[d];a<t.length-1?p_(n.replace(l[a],m),t,a+1,l,o):o.push(n.replace(l[a],m))}}function X3(n){const t=/\{(.*?)\}/g,a=n.match(t),l=[];if(a){const o=[];a.forEach(c=>{const d=c.substring(1,c.length-1).split(",");o.push(d)}),p_(n,o,0,a,l)}else l.push(n);return l}const I1=n=>!Array.isArray(n);class y_{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(t,a)=>`${t}${this._bundleIdConnector}${a}`,extractAssetIdFromBundle:(t,a)=>a.replace(`${t}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(t){if(this._bundleIdConnector=t.connector??this._bundleIdConnector,this._createBundleAssetId=t.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=t.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...t){t.forEach(a=>{this._preferredOrder.push(a),a.priority||(a.priority=Object.keys(a.params))}),this._resolverHash={}}set basePath(t){this._basePath=t}get basePath(){return this._basePath}set rootPath(t){this._rootPath=t}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(t){if(typeof t=="string")this._defaultSearchParams=t;else{const a=t;this._defaultSearchParams=Object.keys(a).map(l=>`${encodeURIComponent(l)}=${encodeURIComponent(a[l])}`).join("&")}}getAlias(t){const{alias:a,src:l}=t;return Yc(a||l,c=>typeof c=="string"?c:Array.isArray(c)?c.map(d=>(d==null?void 0:d.src)??d):c!=null&&c.src?c.src:c,!0)}removeAlias(t,a){this._assetMap[t]&&(a&&a!==this._resolverHash[t]||(delete this._resolverHash[t],delete this._assetMap[t]))}addManifest(t){this._manifest&&Ga("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=t,t.bundles.forEach(a=>{this.addBundle(a.name,a.assets)})}addBundle(t,a){const l=[];let o=a;Array.isArray(a)||(o=Object.entries(a).map(([c,d])=>typeof d=="string"||Array.isArray(d)?{alias:c,src:d}:{alias:c,...d})),o.forEach(c=>{const d=c.src,m=c.alias;let p;if(typeof m=="string"){const v=this._createBundleAssetId(t,m);l.push(v),p=[m,v]}else{const v=m.map(_=>this._createBundleAssetId(t,_));l.push(...v),p=[...m,...v]}this.add({...c,alias:p,src:d})}),this._bundles[t]=l}add(t){const a=[];Array.isArray(t)?a.push(...t):a.push(t);let l;l=c=>{this.hasKey(c)&&Ga(`[Resolver] already has key: ${c} overwriting`)},Yc(a).forEach(c=>{const{src:d}=c;let{data:m,format:p,loadParser:v,parser:_}=c;const b=Yc(d).map(z=>typeof z=="string"?X3(z):Array.isArray(z)?z:[z]),E=this.getAlias(c);Array.isArray(E)?E.forEach(l):l(E);const C=[],R=z=>{const M=this._parsers.find(D=>D.test(z));return{src:z,...M==null?void 0:M.parse(z)}};b.forEach(z=>{z.forEach(M=>{let D={};if(typeof M!="object"?D=R(M):(m=M.data??m,p=M.format??p,(M.loadParser||M.parser)&&(v=M.loadParser??v,_=M.parser??_),D={...R(M.src),...M}),!E)throw new Error(`[Resolver] alias is undefined for this asset: ${D.src}`);D=this._buildResolvedAsset(D,{aliases:E,data:m,format:p,loadParser:v,parser:_,progressSize:c.progressSize}),C.push(D)})}),E.forEach(z=>{this._assetMap[z]=C})})}resolveBundle(t){const a=I1(t);t=Yc(t);const l={};return t.forEach(o=>{const c=this._bundles[o];if(c){const d=this.resolve(c),m={};for(const p in d){const v=d[p];m[this._extractAssetIdFromBundle(o,p)]=v}l[o]=m}}),a?l[t[0]]:l}resolveUrl(t){const a=this.resolve(t);if(typeof t!="string"){const l={};for(const o in a)l[o]=a[o].src;return l}return a.src}resolve(t){const a=I1(t);t=Yc(t);const l={};return t.forEach(o=>{if(!this._resolverHash[o])if(this._assetMap[o]){let c=this._assetMap[o];const d=this._getPreferredOrder(c);d==null||d.priority.forEach(m=>{d.params[m].forEach(p=>{const v=c.filter(_=>_[m]?_[m]===p:!1);v.length&&(c=v)})}),this._resolverHash[o]=c[0]}else this._resolverHash[o]=this._buildResolvedAsset({alias:[o],src:o},{});l[o]=this._resolverHash[o]}),a?l[t[0]]:l}hasKey(t){return!!this._assetMap[t]}hasBundle(t){return!!this._bundles[t]}_getPreferredOrder(t){for(let a=0;a<t.length;a++){const l=t[a],o=this._preferredOrder.find(c=>c.params.format.includes(l.format));if(o)return o}return this._preferredOrder[0]}_appendDefaultSearchParams(t){if(!this._defaultSearchParams)return t;const a=/\?/.test(t)?"&":"?";return`${t}${a}${this._defaultSearchParams}`}_buildResolvedAsset(t,a){const{aliases:l,data:o,loadParser:c,parser:d,format:m,progressSize:p}=a;return(this._basePath||this._rootPath)&&(t.src=ed.toAbsolute(t.src,this._basePath,this._rootPath)),t.alias=l??t.alias??[t.src],t.src=this._appendDefaultSearchParams(t.src),t.data={...o||{},...t.data},t.loadParser=c??t.loadParser,t.parser=d??t.parser,t.format=m??t.format??V3(t.src),p!==void 0&&(t.progressSize=p),t}}y_.RETINA_PREFIX=/@([0-9\.]+)x/;function V3(n){return n.split(".").pop().split("?").shift().split("#").shift()}const $1=(n,t)=>{const a=t.split("?")[1];return a&&(n+=`?${a}`),n},g_=class Kh{constructor(t,a){this.linkedSheets=[];let l=t;(t==null?void 0:t.source)instanceof Pi&&(l={texture:t,data:a});const{texture:o,data:c,cachePrefix:d=""}=l;this.cachePrefix=d,this._texture=o instanceof ze?o:null,this.textureSource=o.source,this.textures={},this.animations={},this.data=c;const m=parseFloat(c.meta.scale);m?(this.resolution=m,o.source.resolution=this.resolution):this.resolution=o.source._resolution,this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}parse(){return new Promise(t=>{this._callback=t,this._batchIndex=0,this._frameKeys.length<=Kh.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}parseSync(){return this._processFrames(0,!0),this._processAnimations(),this.textures}_processFrames(t,a=!1){let l=t;const o=a?1/0:Kh.BATCH_SIZE;for(;l-t<o&&l<this._frameKeys.length;){const c=this._frameKeys[l],d=this._frames[c],m=d.frame;if(m){let p=null,v=null;const _=d.trimmed!==!1&&d.sourceSize?d.sourceSize:d.frame,b=new mn(0,0,Math.floor(_.w)/this.resolution,Math.floor(_.h)/this.resolution);d.rotated?p=new mn(Math.floor(m.x)/this.resolution,Math.floor(m.y)/this.resolution,Math.floor(m.h)/this.resolution,Math.floor(m.w)/this.resolution):p=new mn(Math.floor(m.x)/this.resolution,Math.floor(m.y)/this.resolution,Math.floor(m.w)/this.resolution,Math.floor(m.h)/this.resolution),d.trimmed!==!1&&d.spriteSourceSize&&(v=new mn(Math.floor(d.spriteSourceSize.x)/this.resolution,Math.floor(d.spriteSourceSize.y)/this.resolution,Math.floor(m.w)/this.resolution,Math.floor(m.h)/this.resolution)),this.textures[c]=new ze({source:this.textureSource,frame:p,orig:b,trim:v,rotate:d.rotated?2:0,defaultAnchor:d.anchor,defaultBorders:d.borders,label:c.toString()})}l++}}_processAnimations(){const t=this.data.animations||{};for(const a in t){this.animations[a]=[];for(let l=0;l<t[a].length;l++){const o=t[a][l];this.animations[a].push(this.textures[o])}}}_parseComplete(){const t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*Kh.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*Kh.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(t=!1){var a;for(const l in this.textures)this.textures[l].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&((a=this._texture)==null||a.destroy(),this.textureSource.destroy()),this._texture=null,this.textureSource=null,this.linkedSheets=[]}};g_.BATCH_SIZE=1e3;let tv=g_;const Q3=["jpg","png","jpeg","avif","webp","basis","etc2","bc7","bc6h","bc5","bc4","bc3","bc2","bc1","eac","astc"];function v_(n,t,a){const l={};if(n.forEach(o=>{l[o]=t}),Object.keys(t.textures).forEach(o=>{l[`${t.cachePrefix}${o}`]=t.textures[o]}),!a){const o=ed.dirname(n[0]);t.linkedSheets.forEach((c,d)=>{const m=v_([`${o}/${t.data.meta.related_multi_packs[d]}`],c,!0);Object.assign(l,m)})}return l}const k3={extension:Pt.Asset,cache:{test:n=>n instanceof tv,getCacheableAssets:(n,t)=>v_(n,t,!1)},resolver:{extension:{type:Pt.ResolveParser,name:"resolveSpritesheet"},test:n=>{const a=n.split("?")[0].split("."),l=a.pop(),o=a.pop();return l==="json"&&Q3.includes(o)},parse:n=>{var a;const t=n.split(".");return{resolution:parseFloat(((a=y_.RETINA_PREFIX.exec(n))==null?void 0:a[1])??"1"),format:t[t.length-2],src:n}}},loader:{name:"spritesheetLoader",id:"spritesheet",extension:{type:Pt.LoadParser,priority:m_.Normal,name:"spritesheetLoader"},async testParse(n,t){return ed.extname(t.src).toLowerCase()===".json"&&!!n.frames},async parse(n,t,a){var b,E;const{texture:l,imageFilename:o,textureOptions:c,cachePrefix:d}=(t==null?void 0:t.data)??{};let m=ed.dirname(t.src);m&&m.lastIndexOf("/")!==m.length-1&&(m+="/");let p;if(l instanceof ze)p=l;else{const C=$1(m+(o??n.meta.image),t.src);p=(await a.load([{src:C,data:c}]))[C]}const v=new tv({texture:p.source,data:n,cachePrefix:d});await v.parse();const _=(b=n==null?void 0:n.meta)==null?void 0:b.related_multi_packs;if(Array.isArray(_)){const C=[];for(const z of _){if(typeof z!="string")continue;let M=m+z;(E=t.data)!=null&&E.ignoreMultiPack||(M=$1(M,t.src),C.push(a.load({src:M,data:{textureOptions:c,ignoreMultiPack:!0}})))}const R=await Promise.all(C);v.linkedSheets=R,R.forEach(z=>{z.linkedSheets=[v].concat(v.linkedSheets.filter(M=>M!==z))})}return v},async unload(n,t,a){await a.unload(n.textureSource._sourceOrigin),n.destroy(!1)}}};Ie.add(k3);const X0=Object.create(null),ev=Object.create(null);function Py(n,t){let a=ev[n];return a===void 0&&(X0[t]===void 0&&(X0[t]=1),ev[n]=a=X0[t]++),a}let Bc;function x_(){return(!Bc||Bc!=null&&Bc.isContextLost())&&(Bc=vi.get().createCanvas().getContext("webgl",{})),Bc}let $m;function K3(){if(!$m){$m="mediump";const n=x_();n&&n.getShaderPrecisionFormat&&($m=n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision?"highp":"mediump")}return $m}function Z3(n,t,a){return t?n:a?(n=n.replace("out vec4 finalColor;",""),`
65
+
66
+ #ifdef GL_ES // This checks if it is WebGL1
67
+ #define in varying
68
+ #define finalColor gl_FragColor
69
+ #define texture texture2D
70
+ #endif
71
+ ${n}
72
+ `):`
73
+
74
+ #ifdef GL_ES // This checks if it is WebGL1
75
+ #define in attribute
76
+ #define out varying
77
+ #endif
78
+ ${n}
79
+ `}function J3(n,t,a){const l=a?t.maxSupportedFragmentPrecision:t.maxSupportedVertexPrecision;if(n.substring(0,9)!=="precision"){let o=a?t.requestedFragmentPrecision:t.requestedVertexPrecision;return o==="highp"&&l!=="highp"&&(o="mediump"),`precision ${o} float;
80
+ ${n}`}else if(l!=="highp"&&n.substring(0,15)==="precision highp")return n.replace("precision highp","precision mediump");return n}function W3(n,t){return t?`#version 300 es
81
+ ${n}`:n}const P3={},F3={};function I3(n,{name:t="pixi-program"},a=!0){t=t.replace(/\s+/g,"-"),t+=a?"-fragment":"-vertex";const l=a?P3:F3;return l[t]?(l[t]++,t+=`-${l[t]}`):l[t]=1,n.indexOf("#define SHADER_NAME")!==-1?n:`${`#define SHADER_NAME ${t}`}
82
+ ${n}`}function $3(n,t){return t?n.replace("#version 300 es",""):n}const V0={stripVersion:$3,ensurePrecision:J3,addProgramDefines:Z3,setProgramName:I3,insertVersion:W3},jh=Object.create(null),__=class Sy{constructor(t){t={...Sy.defaultOptions,...t};const a=t.fragment.indexOf("#version 300 es")!==-1,l={stripVersion:a,ensurePrecision:{requestedFragmentPrecision:t.preferredFragmentPrecision,requestedVertexPrecision:t.preferredVertexPrecision,maxSupportedVertexPrecision:"highp",maxSupportedFragmentPrecision:K3()},setProgramName:{name:t.name},addProgramDefines:a,insertVersion:a};let o=t.fragment,c=t.vertex;Object.keys(V0).forEach(d=>{const m=l[d];o=V0[d](o,m,!0),c=V0[d](c,m,!1)}),this.fragment=o,this.vertex=c,this.transformFeedbackVaryings=t.transformFeedbackVaryings,this._key=Py(`${this.vertex}:${this.fragment}`,"gl-program")}destroy(){this.fragment=null,this.vertex=null,this._attributeData=null,this._uniformData=null,this._uniformBlockData=null,this.transformFeedbackVaryings=null,jh[this._cacheKey]=null}static from(t){const a=`${t.vertex}:${t.fragment}`;return jh[a]||(jh[a]=new Sy(t),jh[a]._cacheKey=a),jh[a]}};__.defaultOptions={preferredVertexPrecision:"highp",preferredFragmentPrecision:"mediump"};let Fy=__;const nv={uint8x2:{size:2,stride:2,normalised:!1},uint8x4:{size:4,stride:4,normalised:!1},sint8x2:{size:2,stride:2,normalised:!1},sint8x4:{size:4,stride:4,normalised:!1},unorm8x2:{size:2,stride:2,normalised:!0},unorm8x4:{size:4,stride:4,normalised:!0},snorm8x2:{size:2,stride:2,normalised:!0},snorm8x4:{size:4,stride:4,normalised:!0},uint16x2:{size:2,stride:4,normalised:!1},uint16x4:{size:4,stride:8,normalised:!1},sint16x2:{size:2,stride:4,normalised:!1},sint16x4:{size:4,stride:8,normalised:!1},unorm16x2:{size:2,stride:4,normalised:!0},unorm16x4:{size:4,stride:8,normalised:!0},snorm16x2:{size:2,stride:4,normalised:!0},snorm16x4:{size:4,stride:8,normalised:!0},float16x2:{size:2,stride:4,normalised:!1},float16x4:{size:4,stride:8,normalised:!1},float32:{size:1,stride:4,normalised:!1},float32x2:{size:2,stride:8,normalised:!1},float32x3:{size:3,stride:12,normalised:!1},float32x4:{size:4,stride:16,normalised:!1},uint32:{size:1,stride:4,normalised:!1},uint32x2:{size:2,stride:8,normalised:!1},uint32x3:{size:3,stride:12,normalised:!1},uint32x4:{size:4,stride:16,normalised:!1},sint32:{size:1,stride:4,normalised:!1},sint32x2:{size:2,stride:8,normalised:!1},sint32x3:{size:3,stride:12,normalised:!1},sint32x4:{size:4,stride:16,normalised:!1}};function tE(n){return nv[n]??nv.float32}const eE={f32:"float32","vec2<f32>":"float32x2","vec3<f32>":"float32x3","vec4<f32>":"float32x4",vec2f:"float32x2",vec3f:"float32x3",vec4f:"float32x4",i32:"sint32","vec2<i32>":"sint32x2","vec3<i32>":"sint32x3","vec4<i32>":"sint32x4",vec2i:"sint32x2",vec3i:"sint32x3",vec4i:"sint32x4",u32:"uint32","vec2<u32>":"uint32x2","vec3<u32>":"uint32x3","vec4<u32>":"uint32x4",vec2u:"uint32x2",vec3u:"uint32x3",vec4u:"uint32x4",bool:"uint32","vec2<bool>":"uint32x2","vec3<bool>":"uint32x3","vec4<bool>":"uint32x4"},av=/@location\((\d+)\)\s+([a-zA-Z0-9_]+)\s*:\s*([a-zA-Z0-9_<>]+)(?:,|\s|\)|$)/g;function iv(n,t){let a;for(;(a=av.exec(n))!==null;){const l=eE[a[3]]??"float32";t[a[2]]={location:parseInt(a[1],10),format:l,stride:tE(l).stride,offset:0,instance:!1,start:0}}av.lastIndex=0}function nE(n){return n.replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"")}function aE({source:n,entryPoint:t}){const a={},l=nE(n),o=l.indexOf(`fn ${t}(`);if(o===-1)return a;const c=l.indexOf("->",o);if(c===-1)return a;const d=l.substring(o,c);if(iv(d,a),Object.keys(a).length===0){const m=d.match(/\(\s*\w+\s*:\s*(\w+)/);if(m){const p=m[1],v=new RegExp(`struct\\s+${p}\\s*\\{([^}]+)\\}`,"s"),_=l.match(v);_&&iv(_[1],a)}}return a}function Q0(n){var b,E;const t=/(^|[^/])@(group|binding)\(\d+\)[^;]+;/g,a=/@group\((\d+)\)/,l=/@binding\((\d+)\)/,o=/var(<[^>]+>)? (\w+)/,c=/:\s*([\w<>]+)/,d=/struct\s+(\w+)\s*{([^}]+)}/g,m=/(\w+)\s*:\s*([\w\<\>]+)/g,p=/struct\s+(\w+)/,v=(b=n.match(t))==null?void 0:b.map(C=>({group:parseInt(C.match(a)[1],10),binding:parseInt(C.match(l)[1],10),name:C.match(o)[2],isUniform:C.match(o)[1]==="<uniform>",type:C.match(c)[1]}));if(!v)return{groups:[],structs:[]};const _=((E=n.match(d))==null?void 0:E.map(C=>{const R=C.match(p)[1],z=C.match(m).reduce((M,D)=>{const[w,B]=D.split(":");return M[w.trim()]=B.trim(),M},{});return z?{name:R,members:z}:null}).filter(({name:C})=>v.some(R=>R.type===C||R.type.includes(`<${C}>`))))??[];return{groups:v,structs:_}}var uo=(n=>(n[n.VERTEX=1]="VERTEX",n[n.FRAGMENT=2]="FRAGMENT",n[n.COMPUTE=4]="COMPUTE",n))(uo||{});function iE({groups:n}){const t=[];for(let a=0;a<n.length;a++){const l=n[a];t[l.group]||(t[l.group]=[]),l.isUniform?t[l.group].push({binding:l.binding,visibility:uo.VERTEX|uo.FRAGMENT,buffer:{type:"uniform"}}):l.type==="sampler"?t[l.group].push({binding:l.binding,visibility:uo.FRAGMENT,sampler:{type:"filtering"}}):l.type==="texture_2d"||l.type.startsWith("texture_2d<")?t[l.group].push({binding:l.binding,visibility:uo.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d",multisampled:!1}}):l.type==="texture_2d_array"||l.type.startsWith("texture_2d_array<")?t[l.group].push({binding:l.binding,visibility:uo.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d-array",multisampled:!1}}):(l.type==="texture_cube"||l.type.startsWith("texture_cube<"))&&t[l.group].push({binding:l.binding,visibility:uo.FRAGMENT,texture:{sampleType:"float",viewDimension:"cube",multisampled:!1}})}for(let a=0;a<t.length;a++)t[a]||(t[a]=[]);return t}function lE({groups:n}){const t=[];for(let a=0;a<n.length;a++){const l=n[a];t[l.group]||(t[l.group]={}),t[l.group][l.name]=l.binding}return t}function sE(n,t){const a=new Set,l=new Set,o=[...n.structs,...t.structs].filter(d=>a.has(d.name)?!1:(a.add(d.name),!0)),c=[...n.groups,...t.groups].filter(d=>{const m=`${d.name}-${d.binding}`;return l.has(m)?!1:(l.add(m),!0)});return{structs:o,groups:c}}const Yh=Object.create(null);class cd{constructor(t){var m,p;this._layoutKey=0,this._attributeLocationsKey=0;const{fragment:a,vertex:l,layout:o,gpuLayout:c,name:d}=t;if(this.name=d,this.fragment=a,this.vertex=l,a.source===l.source){const v=Q0(a.source);this.structsAndGroups=v}else{const v=Q0(l.source),_=Q0(a.source);this.structsAndGroups=sE(v,_)}this.layout=o??lE(this.structsAndGroups),this.gpuLayout=c??iE(this.structsAndGroups),this.autoAssignGlobalUniforms=((m=this.layout[0])==null?void 0:m.globalUniforms)!==void 0,this.autoAssignLocalUniforms=((p=this.layout[1])==null?void 0:p.localUniforms)!==void 0,this._generateProgramKey()}_generateProgramKey(){const{vertex:t,fragment:a}=this,l=t.source+a.source+t.entryPoint+a.entryPoint;this._layoutKey=Py(l,"program")}get attributeData(){return this._attributeData??(this._attributeData=aE(this.vertex)),this._attributeData}destroy(){this.gpuLayout=null,this.layout=null,this.structsAndGroups=null,this.fragment=null,this.vertex=null,Yh[this._cacheKey]=null}static from(t){const a=`${t.vertex.source}:${t.fragment.source}:${t.fragment.entryPoint}:${t.vertex.entryPoint}`;return Yh[a]||(Yh[a]=new cd(t),Yh[a]._cacheKey=a),Yh[a]}}const S_=["f32","i32","vec2<f32>","vec3<f32>","vec4<f32>","mat2x2<f32>","mat3x3<f32>","mat4x4<f32>","mat3x2<f32>","mat4x2<f32>","mat2x3<f32>","mat4x3<f32>","mat2x4<f32>","mat3x4<f32>","vec2<i32>","vec3<i32>","vec4<i32>"],rE=S_.reduce((n,t)=>(n[t]=!0,n),{});function uE(n,t){switch(n){case"f32":return 0;case"vec2<f32>":return new Float32Array(2*t);case"vec3<f32>":return new Float32Array(3*t);case"vec4<f32>":return new Float32Array(4*t);case"mat2x2<f32>":return new Float32Array([1,0,0,1]);case"mat3x3<f32>":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4x4<f32>":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const b_=class T_{constructor(t,a){this._touched=0,this.uid=on("uniform"),this._resourceType="uniformGroup",this._resourceId=on("resource"),this.isUniformGroup=!0,this._dirtyId=0,this.destroyed=!1,a={...T_.defaultOptions,...a},this.uniformStructures=t;const l={};for(const o in t){const c=t[o];if(c.name=o,c.size=c.size??1,!rE[c.type]){const d=c.type.match(/^array<(\w+(?:<\w+>)?),\s*(\d+)>$/);if(d){const[,m,p]=d;throw new Error(`Uniform type ${c.type} is not supported. Use type: '${m}', size: ${p} instead.`)}throw new Error(`Uniform type ${c.type} is not supported. Supported uniform types are: ${S_.join(", ")}`)}c.value??(c.value=uE(c.type,c.size)),l[o]=c.value}this.uniforms=l,this._dirtyId=1,this.ubo=a.ubo,this.isStatic=a.isStatic,this._signature=Py(Object.keys(l).map(o=>`${o}-${t[o].type}`).join("-"),"uniform-group")}update(){this._dirtyId++}};b_.defaultOptions={ubo:!1,isStatic:!1};let E_=b_;class pp{constructor(t){this.resources=Object.create(null),this._dirty=!0;let a=0;for(const l in t){const o=t[l];this.setResource(o,a++)}this._updateKey()}_updateKey(){if(!this._dirty)return;this._dirty=!1;const t=[];let a=0;for(const l in this.resources)t[a++]=this.resources[l]._resourceId;this._key=t.join("|")}setResource(t,a){var o,c;const l=this.resources[a];t!==l&&((o=l==null?void 0:l.off)==null||o.call(l,"change",this.onResourceChange,this),(c=t.on)==null||c.call(t,"change",this.onResourceChange,this),this.resources[a]=t,this._dirty=!0)}getResource(t){return this.resources[t]}_touch(t,a){const l=this.resources;for(const o in l)l[o]._gcLastUsed=t,l[o]._touched=a}destroy(){var a;const t=this.resources;for(const l in t){const o=t[l];(a=o==null?void 0:o.off)==null||a.call(o,"change",this.onResourceChange,this)}this.resources=null}onResourceChange(t){this._dirty=!0,t.destroyed?this.destroy():this._updateKey()}}var by=(n=>(n[n.WEBGL=1]="WEBGL",n[n.WEBGPU=2]="WEBGPU",n[n.CANVAS=4]="CANVAS",n[n.BOTH=3]="BOTH",n))(by||{});class wp extends ps{constructor(t){super(),this.uid=on("shader"),this._uniformBindMap=Object.create(null),this._ownedBindGroups=[],this._destroyed=!1;let{gpuProgram:a,glProgram:l,groups:o,resources:c,compatibleRenderers:d,groupMap:m}=t;this.gpuProgram=a,this.glProgram=l,d===void 0&&(d=0,a&&(d|=by.WEBGPU),l&&(d|=by.WEBGL)),this.compatibleRenderers=d;const p={};if(!c&&!o&&(c={}),c&&o)throw new Error("[Shader] Cannot have both resources and groups");if(!a&&o&&!m)throw new Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");if(!a&&o&&m)for(const v in m)for(const _ in m[v]){const b=m[v][_];p[b]={group:v,binding:_,name:b}}else if(a&&o&&!m){const v=a.structsAndGroups.groups;m={},v.forEach(_=>{m[_.group]=m[_.group]||{},m[_.group][_.binding]=_.name,p[_.name]=_})}else if(c){o={},m={},a&&a.structsAndGroups.groups.forEach(b=>{m[b.group]=m[b.group]||{},m[b.group][b.binding]=b.name,p[b.name]=b});let v=0;for(const _ in c)p[_]||(o[99]||(o[99]=new pp,this._ownedBindGroups.push(o[99])),p[_]={group:99,binding:v,name:_},m[99]=m[99]||{},m[99][v]=_,v++);for(const _ in c){const b=_;let E=c[_];!E.source&&!E._resourceType&&(E=new E_(E));const C=p[b];C&&(o[C.group]||(o[C.group]=new pp,this._ownedBindGroups.push(o[C.group])),o[C.group].setResource(E,C.binding))}}this.groups=o,this._uniformBindMap=m,this.resources=this._buildResourceAccessor(o,p)}addResource(t,a,l){var o,c;(o=this._uniformBindMap)[a]||(o[a]={}),(c=this._uniformBindMap[a])[l]||(c[l]=t),this.groups[a]||(this.groups[a]=new pp,this._ownedBindGroups.push(this.groups[a]))}_buildResourceAccessor(t,a){const l={};for(const o in a){const c=a[o];Object.defineProperty(l,c.name,{get(){return t[c.group].getResource(c.binding)},set(d){t[c.group].setResource(d,c.binding)}})}return l}destroy(t=!1){var a,l;this._destroyed||(this._destroyed=!0,this.emit("destroy",this),t&&((a=this.gpuProgram)==null||a.destroy(),(l=this.glProgram)==null||l.destroy()),this.gpuProgram=null,this.glProgram=null,this.removeAllListeners(),this._uniformBindMap=null,this._ownedBindGroups.forEach(o=>{o.destroy()}),this._ownedBindGroups=null,this.resources=null,this.groups=null)}static from(t){const{gpu:a,gl:l,...o}=t;let c,d;return a&&(c=cd.from(a)),l&&(d=Fy.from(l)),new wp({gpuProgram:c,glProgram:d,...o})}}const oE={normal:0,add:1,multiply:2,screen:3,overlay:4,erase:5,"normal-npm":6,"add-npm":7,"screen-npm":8,min:9,max:10},k0=0,K0=1,Z0=2,J0=3,W0=4,P0=5,Ty=class C_{constructor(){this.data=0,this.blendMode="normal",this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<k0)}set blend(t){!!(this.data&1<<k0)!==t&&(this.data^=1<<k0)}get offsets(){return!!(this.data&1<<K0)}set offsets(t){!!(this.data&1<<K0)!==t&&(this.data^=1<<K0)}set cullMode(t){if(t==="none"){this.culling=!1;return}this.culling=!0,this.clockwiseFrontFace=t==="front"}get cullMode(){return this.culling?this.clockwiseFrontFace?"front":"back":"none"}get culling(){return!!(this.data&1<<Z0)}set culling(t){!!(this.data&1<<Z0)!==t&&(this.data^=1<<Z0)}get depthTest(){return!!(this.data&1<<J0)}set depthTest(t){!!(this.data&1<<J0)!==t&&(this.data^=1<<J0)}get depthMask(){return!!(this.data&1<<P0)}set depthMask(t){!!(this.data&1<<P0)!==t&&(this.data^=1<<P0)}get clockwiseFrontFace(){return!!(this.data&1<<W0)}set clockwiseFrontFace(t){!!(this.data&1<<W0)!==t&&(this.data^=1<<W0)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!=="none",this._blendMode=t,this._blendModeId=oE[t]||0}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}toString(){return`[pixi.js/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const t=new C_;return t.depthTest=!1,t.blend=!0,t}};Ty.default2d=Ty.for2d();let Iy=Ty;const A_=class Ey extends wp{constructor(t){t={...Ey.defaultOptions,...t},super(t),this.enabled=!0,this._state=Iy.for2d(),this.blendMode=t.blendMode,this.padding=t.padding,typeof t.antialias=="boolean"?this.antialias=t.antialias?"on":"off":this.antialias=t.antialias,this.resolution=t.resolution,this.blendRequired=t.blendRequired,this.clipToViewport=t.clipToViewport,this.addResource("uTexture",0,1),t.blendRequired&&this.addResource("uBackTexture",0,3)}apply(t,a,l,o){t.applyFilter(this,a,l,o)}get blendMode(){return this._state.blendMode}set blendMode(t){this._state.blendMode=t}static from(t){const{gpu:a,gl:l,...o}=t;let c,d;return a&&(c=cd.from(a)),l&&(d=Fy.from(l)),new Ey({gpuProgram:c,glProgram:d,...o})}};A_.defaultOptions={blendMode:"normal",resolution:1,padding:0,antialias:"off",blendRequired:!1,clipToViewport:!0};let yo=A_;const Cy=[];Ie.handleByNamedList(Pt.Environment,Cy);async function cE(n){if(!n)for(let t=0;t<Cy.length;t++){const a=Cy[t];if(a.value.test()){await a.value.load();return}}}let qh;function fE(){if(typeof qh=="boolean")return qh;try{qh=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{qh=!1}return qh}function lv(n,t,a=2){const l=t&&t.length,o=l?t[0]*a:n.length;let c=M_(n,0,o,a,!0);const d=[];if(!c||c.next===c.prev)return d;let m,p,v;if(l&&(c=yE(n,t,c,a)),n.length>80*a){m=n[0],p=n[1];let _=m,b=p;for(let E=a;E<o;E+=a){const C=n[E],R=n[E+1];C<m&&(m=C),R<p&&(p=R),C>_&&(_=C),R>b&&(b=R)}v=Math.max(_-m,b-p),v=v!==0?32767/v:0}return nd(c,d,a,m,p,v,0),d}function M_(n,t,a,l,o){let c;if(o===ME(n,t,a,l)>0)for(let d=t;d<a;d+=l)c=sv(d/l|0,n[d],n[d+1],c);else for(let d=a-l;d>=t;d-=l)c=sv(d/l|0,n[d],n[d+1],c);return c&&Wc(c,c.next)&&(id(c),c=c.next),c}function mo(n,t){if(!n)return n;t||(t=n);let a=n,l;do if(l=!1,!a.steiner&&(Wc(a,a.next)||Fe(a.prev,a,a.next)===0)){if(id(a),a=t=a.prev,a===a.next)break;l=!0}else a=a.next;while(l||a!==t);return t}function nd(n,t,a,l,o,c,d){if(!n)return;!d&&c&&SE(n,l,o,c);let m=n;for(;n.prev!==n.next;){const p=n.prev,v=n.next;if(c?dE(n,l,o,c):hE(n)){t.push(p.i,n.i,v.i),id(n),n=v.next,m=v.next;continue}if(n=v,n===m){d?d===1?(n=mE(mo(n),t),nd(n,t,a,l,o,c,2)):d===2&&pE(n,t,a,l,o,c):nd(mo(n),t,a,l,o,c,1);break}}}function hE(n){const t=n.prev,a=n,l=n.next;if(Fe(t,a,l)>=0)return!1;const o=t.x,c=a.x,d=l.x,m=t.y,p=a.y,v=l.y,_=Math.min(o,c,d),b=Math.min(m,p,v),E=Math.max(o,c,d),C=Math.max(m,p,v);let R=l.next;for(;R!==t;){if(R.x>=_&&R.x<=E&&R.y>=b&&R.y<=C&&Zh(o,m,c,p,d,v,R.x,R.y)&&Fe(R.prev,R,R.next)>=0)return!1;R=R.next}return!0}function dE(n,t,a,l){const o=n.prev,c=n,d=n.next;if(Fe(o,c,d)>=0)return!1;const m=o.x,p=c.x,v=d.x,_=o.y,b=c.y,E=d.y,C=Math.min(m,p,v),R=Math.min(_,b,E),z=Math.max(m,p,v),M=Math.max(_,b,E),D=Ay(C,R,t,a,l),w=Ay(z,M,t,a,l);let B=n.prevZ,U=n.nextZ;for(;B&&B.z>=D&&U&&U.z<=w;){if(B.x>=C&&B.x<=z&&B.y>=R&&B.y<=M&&B!==o&&B!==d&&Zh(m,_,p,b,v,E,B.x,B.y)&&Fe(B.prev,B,B.next)>=0||(B=B.prevZ,U.x>=C&&U.x<=z&&U.y>=R&&U.y<=M&&U!==o&&U!==d&&Zh(m,_,p,b,v,E,U.x,U.y)&&Fe(U.prev,U,U.next)>=0))return!1;U=U.nextZ}for(;B&&B.z>=D;){if(B.x>=C&&B.x<=z&&B.y>=R&&B.y<=M&&B!==o&&B!==d&&Zh(m,_,p,b,v,E,B.x,B.y)&&Fe(B.prev,B,B.next)>=0)return!1;B=B.prevZ}for(;U&&U.z<=w;){if(U.x>=C&&U.x<=z&&U.y>=R&&U.y<=M&&U!==o&&U!==d&&Zh(m,_,p,b,v,E,U.x,U.y)&&Fe(U.prev,U,U.next)>=0)return!1;U=U.nextZ}return!0}function mE(n,t){let a=n;do{const l=a.prev,o=a.next.next;!Wc(l,o)&&z_(l,a,a.next,o)&&ad(l,o)&&ad(o,l)&&(t.push(l.i,a.i,o.i),id(a),id(a.next),a=n=o),a=a.next}while(a!==n);return mo(a)}function pE(n,t,a,l,o,c){let d=n;do{let m=d.next.next;for(;m!==d.prev;){if(d.i!==m.i&&EE(d,m)){let p=D_(d,m);d=mo(d,d.next),p=mo(p,p.next),nd(d,t,a,l,o,c,0),nd(p,t,a,l,o,c,0);return}m=m.next}d=d.next}while(d!==n)}function yE(n,t,a,l){const o=[];for(let c=0,d=t.length;c<d;c++){const m=t[c]*l,p=c<d-1?t[c+1]*l:n.length,v=M_(n,m,p,l,!1);v===v.next&&(v.steiner=!0),o.push(TE(v))}o.sort(gE);for(let c=0;c<o.length;c++)a=vE(o[c],a);return a}function gE(n,t){let a=n.x-t.x;if(a===0&&(a=n.y-t.y,a===0)){const l=(n.next.y-n.y)/(n.next.x-n.x),o=(t.next.y-t.y)/(t.next.x-t.x);a=l-o}return a}function vE(n,t){const a=xE(n,t);if(!a)return t;const l=D_(a,n);return mo(l,l.next),mo(a,a.next)}function xE(n,t){let a=t;const l=n.x,o=n.y;let c=-1/0,d;if(Wc(n,a))return a;do{if(Wc(n,a.next))return a.next;if(o<=a.y&&o>=a.next.y&&a.next.y!==a.y){const b=a.x+(o-a.y)*(a.next.x-a.x)/(a.next.y-a.y);if(b<=l&&b>c&&(c=b,d=a.x<a.next.x?a:a.next,b===l))return d}a=a.next}while(a!==t);if(!d)return null;const m=d,p=d.x,v=d.y;let _=1/0;a=d;do{if(l>=a.x&&a.x>=p&&l!==a.x&&R_(o<v?l:c,o,p,v,o<v?c:l,o,a.x,a.y)){const b=Math.abs(o-a.y)/(l-a.x);ad(a,n)&&(b<_||b===_&&(a.x>d.x||a.x===d.x&&_E(d,a)))&&(d=a,_=b)}a=a.next}while(a!==m);return d}function _E(n,t){return Fe(n.prev,n,t.prev)<0&&Fe(t.next,n,n.next)<0}function SE(n,t,a,l){let o=n;do o.z===0&&(o.z=Ay(o.x,o.y,t,a,l)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next;while(o!==n);o.prevZ.nextZ=null,o.prevZ=null,bE(o)}function bE(n){let t,a=1;do{let l=n,o;n=null;let c=null;for(t=0;l;){t++;let d=l,m=0;for(let v=0;v<a&&(m++,d=d.nextZ,!!d);v++);let p=a;for(;m>0||p>0&&d;)m!==0&&(p===0||!d||l.z<=d.z)?(o=l,l=l.nextZ,m--):(o=d,d=d.nextZ,p--),c?c.nextZ=o:n=o,o.prevZ=c,c=o;l=d}c.nextZ=null,a*=2}while(t>1);return n}function Ay(n,t,a,l,o){return n=(n-a)*o|0,t=(t-l)*o|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,n|t<<1}function TE(n){let t=n,a=n;do(t.x<a.x||t.x===a.x&&t.y<a.y)&&(a=t),t=t.next;while(t!==n);return a}function R_(n,t,a,l,o,c,d,m){return(o-d)*(t-m)>=(n-d)*(c-m)&&(n-d)*(l-m)>=(a-d)*(t-m)&&(a-d)*(c-m)>=(o-d)*(l-m)}function Zh(n,t,a,l,o,c,d,m){return!(n===d&&t===m)&&R_(n,t,a,l,o,c,d,m)}function EE(n,t){return n.next.i!==t.i&&n.prev.i!==t.i&&!CE(n,t)&&(ad(n,t)&&ad(t,n)&&AE(n,t)&&(Fe(n.prev,n,t.prev)||Fe(n,t.prev,t))||Wc(n,t)&&Fe(n.prev,n,n.next)>0&&Fe(t.prev,t,t.next)>0)}function Fe(n,t,a){return(t.y-n.y)*(a.x-t.x)-(t.x-n.x)*(a.y-t.y)}function Wc(n,t){return n.x===t.x&&n.y===t.y}function z_(n,t,a,l){const o=ep(Fe(n,t,a)),c=ep(Fe(n,t,l)),d=ep(Fe(a,l,n)),m=ep(Fe(a,l,t));return!!(o!==c&&d!==m||o===0&&tp(n,a,t)||c===0&&tp(n,l,t)||d===0&&tp(a,n,l)||m===0&&tp(a,t,l))}function tp(n,t,a){return t.x<=Math.max(n.x,a.x)&&t.x>=Math.min(n.x,a.x)&&t.y<=Math.max(n.y,a.y)&&t.y>=Math.min(n.y,a.y)}function ep(n){return n>0?1:n<0?-1:0}function CE(n,t){let a=n;do{if(a.i!==n.i&&a.next.i!==n.i&&a.i!==t.i&&a.next.i!==t.i&&z_(a,a.next,n,t))return!0;a=a.next}while(a!==n);return!1}function ad(n,t){return Fe(n.prev,n,n.next)<0?Fe(n,t,n.next)>=0&&Fe(n,n.prev,t)>=0:Fe(n,t,n.prev)<0||Fe(n,n.next,t)<0}function AE(n,t){let a=n,l=!1;const o=(n.x+t.x)/2,c=(n.y+t.y)/2;do a.y>c!=a.next.y>c&&a.next.y!==a.y&&o<(a.next.x-a.x)*(c-a.y)/(a.next.y-a.y)+a.x&&(l=!l),a=a.next;while(a!==n);return l}function D_(n,t){const a=My(n.i,n.x,n.y),l=My(t.i,t.x,t.y),o=n.next,c=t.prev;return n.next=t,t.prev=n,a.next=o,o.prev=a,l.next=a,a.prev=l,c.next=l,l.prev=c,l}function sv(n,t,a,l){const o=My(n,t,a);return l?(o.next=l.next,o.prev=l,l.next.prev=o,l.next=o):(o.prev=o,o.next=o),o}function id(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function My(n,t,a){return{i:n,x:t,y:a,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function ME(n,t,a,l){let o=0;for(let c=t,d=a-l;c<a;c+=l)o+=(n[d]-n[c])*(n[c+1]+n[d+1]),d=c;return o}const RE=lv.default||lv;var O_=(n=>(n[n.NONE=0]="NONE",n[n.COLOR=16384]="COLOR",n[n.STENCIL=1024]="STENCIL",n[n.DEPTH=256]="DEPTH",n[n.COLOR_DEPTH=16640]="COLOR_DEPTH",n[n.COLOR_STENCIL=17408]="COLOR_STENCIL",n[n.DEPTH_STENCIL=1280]="DEPTH_STENCIL",n[n.ALL=17664]="ALL",n))(O_||{});class zE{constructor(t){this.items=[],this._name=t}emit(t,a,l,o,c,d,m,p){const{name:v,items:_}=this;for(let b=0,E=_.length;b<E;b++)_[b][v](t,a,l,o,c,d,m,p);return this}add(t){return t[this._name]&&(this.remove(t),this.items.push(t)),this}remove(t){const a=this.items.indexOf(t);return a!==-1&&this.items.splice(a,1),this}contains(t){return this.items.indexOf(t)!==-1}removeAll(){return this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}const DE=["init","destroy","contextChange","resolutionChange","resetState","renderEnd","renderStart","render","update","postrender","prerender"],N_=class w_ extends ps{constructor(t){super(),this.tick=0,this.uid=on("renderer"),this.runners=Object.create(null),this.renderPipes=Object.create(null),this._initOptions={},this._systemsHash=Object.create(null),this.type=t.type,this.name=t.name,this.config=t;const a=[...DE,...this.config.runners??[]];this._addRunners(...a),this._unsafeEvalCheck()}async init(t={}){const a=t.skipExtensionImports===!0?!0:t.manageImports===!1;await cE(a),this._addSystems(this.config.systems),this._addPipes(this.config.renderPipes,this.config.renderPipeAdaptors);for(const l in this._systemsHash)t={...this._systemsHash[l].constructor.defaultOptions,...t};t={...w_.defaultOptions,...t},this._roundPixels=t.roundPixels?1:0;for(let l=0;l<this.runners.init.items.length;l++)await this.runners.init.items[l].init(t);this._initOptions=t}render(t,a){this.tick++;let l=t;if(l instanceof Fn&&(l={container:l},a&&(de(un,"passing a second argument is deprecated, please use render options instead"),l.target=a.renderTexture)),l.target||(l.target=this.view.renderTarget),l.target===this.view.renderTarget&&(this._lastObjectRendered=l.container,l.clearColor??(l.clearColor=this.background.colorRgba),l.clear??(l.clear=this.background.clearBeforeRender)),l.clearColor){const o=Array.isArray(l.clearColor)&&l.clearColor.length===4;l.clearColor=o?l.clearColor:Rn.shared.setValue(l.clearColor).toArray()}l.transform||(l.container.updateLocalTransform(),l.transform=l.container.localTransform),l.container.visible&&(l.container.enableRenderGroup(),this.runners.prerender.emit(l),this.runners.renderStart.emit(l),this.runners.render.emit(l),this.runners.renderEnd.emit(l),this.runners.postrender.emit(l))}resize(t,a,l){const o=this.view.resolution;this.view.resize(t,a,l),this.emit("resize",this.view.screen.width,this.view.screen.height,this.view.resolution),l!==void 0&&l!==o&&this.runners.resolutionChange.emit(l)}clear(t={}){const a=this;t.target||(t.target=a.renderTarget.renderTarget),t.clearColor||(t.clearColor=this.background.colorRgba),t.clear??(t.clear=O_.ALL);const{clear:l,clearColor:o,target:c,mipLevel:d,layer:m}=t;Rn.shared.setValue(o??this.background.colorRgba),a.renderTarget.clear(c,l,Rn.shared.toArray(),d??0,m??0)}get resolution(){return this.view.resolution}set resolution(t){this.view.resolution=t,this.runners.resolutionChange.emit(t)}get width(){return this.view.texture.frame.width}get height(){return this.view.texture.frame.height}get canvas(){return this.view.canvas}get lastObjectRendered(){return this._lastObjectRendered}get renderingToScreen(){return this.renderTarget.renderingToScreen}get screen(){return this.view.screen}_addRunners(...t){t.forEach(a=>{this.runners[a]=new zE(a)})}_addSystems(t){let a;for(a in t){const l=t[a];this._addSystem(l.value,l.name)}}_addSystem(t,a){const l=new t(this);if(this[a])throw new Error(`Whoops! The name "${a}" is already in use`);this[a]=l,this._systemsHash[a]=l;for(const o in this.runners)this.runners[o].add(l);return this}_addPipes(t,a){const l=a.reduce((o,c)=>(o[c.name]=c.value,o),{});t.forEach(o=>{const c=o.value,d=o.name,m=l[d];this.renderPipes[d]=new c(this,m?new m:null),this.runners.destroy.add(this.renderPipes[d])})}destroy(t=!1){this.runners.destroy.items.reverse(),this.runners.destroy.emit(t),(t===!0||typeof t=="object"&&t.releaseGlobalResources)&&od.release(),Object.values(this.runners).forEach(a=>{a.destroy()}),this._systemsHash=null,this.renderPipes=null,this.removeAllListeners()}generateTexture(t){return this.textureGenerator.generateTexture(t)}get roundPixels(){return!!this._roundPixels}_unsafeEvalCheck(){if(!fE())throw new Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.")}resetState(){this.runners.resetState.emit()}};N_.defaultOptions={resolution:1,failIfMajorPerformanceCaveat:!1,roundPixels:!1};let B_=N_,np;function OE(n){return np!==void 0||(np=(()=>{var a;const t={stencil:!0,failIfMajorPerformanceCaveat:n??B_.defaultOptions.failIfMajorPerformanceCaveat};try{if(!vi.get().getWebGLRenderingContext())return!1;let o=vi.get().createCanvas().getContext("webgl",t);const c=!!((a=o==null?void 0:o.getContextAttributes())!=null&&a.stencil);if(o){const d=o.getExtension("WEBGL_lose_context");d&&d.loseContext()}return o=null,c}catch{return!1}})()),np}let ap;async function NE(n={}){return ap!==void 0||(ap=await(async()=>{const t=vi.get().getNavigator().gpu;if(!t)return!1;try{return await(await t.requestAdapter(n)).requestDevice(),!0}catch{return!1}})()),ap}const rv=["webgl","webgpu","canvas"];async function wE(n){let t=[];n.preference?(t.push(n.preference),rv.forEach(c=>{c!==n.preference&&t.push(c)})):t=rv.slice();let a,l={};for(let c=0;c<t.length;c++){const d=t[c];if(d==="webgpu"&&await NE()){const{WebGPURenderer:m}=await Wh(async()=>{const{WebGPURenderer:p}=await import("./WebGPURenderer-C5qxFAzO.js");return{WebGPURenderer:p}},__vite__mapDeps([2,3,4]));a=m,l={...n,...n.webgpu};break}else if(d==="webgl"&&OE(n.failIfMajorPerformanceCaveat??B_.defaultOptions.failIfMajorPerformanceCaveat)){const{WebGLRenderer:m}=await Wh(async()=>{const{WebGLRenderer:p}=await import("./WebGLRenderer-DYZKskuK.js");return{WebGLRenderer:p}},__vite__mapDeps([5,3,4]));a=m,l={...n,...n.webgl};break}else if(d==="canvas"){const{CanvasRenderer:m}=await Wh(async()=>{const{CanvasRenderer:p}=await import("./CanvasRenderer-CQDKSCiw.js");return{CanvasRenderer:p}},__vite__mapDeps([6,4]));a=m,l={...n,...n.canvasOptions};break}}if(delete l.webgpu,delete l.webgl,delete l.canvasOptions,!a)throw new Error("No available renderer for the current environment");const o=new a;return await o.init(l),o}const U_="8.17.0";class H_{static init(){var t;(t=globalThis.__PIXI_APP_INIT__)==null||t.call(globalThis,this,U_)}static destroy(){}}H_.extension=Pt.Application;class BE{constructor(t){this._renderer=t}init(){var t;(t=globalThis.__PIXI_RENDERER_INIT__)==null||t.call(globalThis,this._renderer,U_)}destroy(){this._renderer=null}}BE.extension={type:[Pt.WebGLSystem,Pt.WebGPUSystem],name:"initHook",priority:-10};class G_{static init(t){Object.defineProperty(this,"resizeTo",{configurable:!0,set(a){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=a,a&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this._cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this._cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this._cancelResize();let a,l;if(this._resizeTo===globalThis.window)a=globalThis.innerWidth,l=globalThis.innerHeight;else{const{clientWidth:o,clientHeight:c}=this._resizeTo;a=o,l=c}this.renderer.resize(a,l),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=t.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this._cancelResize(),this._cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}G_.extension=Pt.Application;class j_{static init(t){t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{configurable:!0,set(a){this._ticker&&this._ticker.remove(this.render,this),this._ticker=a,a&&a.add(this.render,this,vp.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?Xc.shared:new Xc,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}j_.extension=Pt.Application;Ie.add(G_);Ie.add(j_);const Y_=class Ry{constructor(...t){this.stage=new Fn,t[0]!==void 0&&de(un,"Application constructor options are deprecated, please use Application.init() instead.")}async init(t){t={...t},this.stage||(this.stage=new Fn),this.renderer=await wE(t),Ry._plugins.forEach(a=>{a.init.call(this,t)})}render(){this.renderer.render({container:this.stage})}get canvas(){return this.renderer.canvas}get view(){return de(un,"Application.view is deprecated, please use Application.canvas instead."),this.renderer.canvas}get screen(){return this.renderer.screen}destroy(t=!1,a=!1){const l=Ry._plugins.slice(0);l.reverse(),l.forEach(o=>{o.destroy.call(this)}),this.stage.destroy(a),this.stage=null,this.renderer.destroy(t),this.renderer=null}};Y_._plugins=[];let $y=Y_;Ie.handleByList(Pt.Application,$y._plugins);Ie.add(H_);var F0,uv;function UE(){if(uv)return F0;uv=1,F0=a;var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},t=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function a(c){var d=[];return c.replace(t,function(m,p,v){var _=p.toLowerCase();for(v=o(v),_=="m"&&v.length>2&&(d.push([p].concat(v.splice(0,2))),_="l",p=p=="m"?"l":"L");;){if(v.length==n[_])return v.unshift(p),d.push(v);if(v.length<n[_])throw new Error("malformed path data");d.push([p].concat(v.splice(0,n[_])))}}),d}var l=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function o(c){var d=c.match(l);return d?d.map(Number):[]}return F0}var HE=UE();const GE=Ep(HE);function jE(n,t){const a=GE(n),l=[];let o=null,c=0,d=0;for(let m=0;m<a.length;m++){const p=a[m],v=p[0],_=p;switch(v){case"M":c=_[1],d=_[2],t.moveTo(c,d);break;case"m":c+=_[1],d+=_[2],t.moveTo(c,d);break;case"H":c=_[1],t.lineTo(c,d);break;case"h":c+=_[1],t.lineTo(c,d);break;case"V":d=_[1],t.lineTo(c,d);break;case"v":d+=_[1],t.lineTo(c,d);break;case"L":c=_[1],d=_[2],t.lineTo(c,d);break;case"l":c+=_[1],d+=_[2],t.lineTo(c,d);break;case"C":c=_[5],d=_[6],t.bezierCurveTo(_[1],_[2],_[3],_[4],c,d);break;case"c":t.bezierCurveTo(c+_[1],d+_[2],c+_[3],d+_[4],c+_[5],d+_[6]),c+=_[5],d+=_[6];break;case"S":c=_[3],d=_[4],t.bezierCurveToShort(_[1],_[2],c,d);break;case"s":t.bezierCurveToShort(c+_[1],d+_[2],c+_[3],d+_[4]),c+=_[3],d+=_[4];break;case"Q":c=_[3],d=_[4],t.quadraticCurveTo(_[1],_[2],c,d);break;case"q":t.quadraticCurveTo(c+_[1],d+_[2],c+_[3],d+_[4]),c+=_[3],d+=_[4];break;case"T":c=_[1],d=_[2],t.quadraticCurveToShort(c,d);break;case"t":c+=_[1],d+=_[2],t.quadraticCurveToShort(c,d);break;case"A":c=_[6],d=_[7],t.arcToSvg(_[1],_[2],_[3],_[4],_[5],c,d);break;case"a":c+=_[6],d+=_[7],t.arcToSvg(_[1],_[2],_[3],_[4],_[5],c,d);break;case"Z":case"z":t.closePath(),l.length>0&&(o=l.pop(),o?(c=o.startX,d=o.startY):(c=0,d=0)),o=null;break;default:Ga(`Unknown SVG path command: ${v}`)}v!=="Z"&&v!=="z"&&o===null&&(o={startX:c,startY:d},l.push(o))}return t}class tg{constructor(t=0,a=0,l=0){this.type="circle",this.x=t,this.y=a,this.radius=l}clone(){return new tg(this.x,this.y,this.radius)}contains(t,a){if(this.radius<=0)return!1;const l=this.radius*this.radius;let o=this.x-t,c=this.y-a;return o*=o,c*=c,o+c<=l}strokeContains(t,a,l,o=.5){if(this.radius===0)return!1;const c=this.x-t,d=this.y-a,m=this.radius,p=(1-o)*l,v=Math.sqrt(c*c+d*d);return v<=m+p&&v>m-(l-p)}getBounds(t){return t||(t=new mn),t.x=this.x-this.radius,t.y=this.y-this.radius,t.width=this.radius*2,t.height=this.radius*2,t}copyFrom(t){return this.x=t.x,this.y=t.y,this.radius=t.radius,this}copyTo(t){return t.copyFrom(this),t}toString(){return`[pixi.js/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}class eg{constructor(t=0,a=0,l=0,o=0){this.type="ellipse",this.x=t,this.y=a,this.halfWidth=l,this.halfHeight=o}clone(){return new eg(this.x,this.y,this.halfWidth,this.halfHeight)}contains(t,a){if(this.halfWidth<=0||this.halfHeight<=0)return!1;let l=(t-this.x)/this.halfWidth,o=(a-this.y)/this.halfHeight;return l*=l,o*=o,l+o<=1}strokeContains(t,a,l,o=.5){const{halfWidth:c,halfHeight:d}=this;if(c<=0||d<=0)return!1;const m=l*(1-o),p=l-m,v=c-p,_=d-p,b=c+m,E=d+m,C=t-this.x,R=a-this.y,z=C*C/(v*v)+R*R/(_*_),M=C*C/(b*b)+R*R/(E*E);return z>1&&M<=1}getBounds(t){return t||(t=new mn),t.x=this.x-this.halfWidth,t.y=this.y-this.halfHeight,t.width=this.halfWidth*2,t.height=this.halfHeight*2,t}copyFrom(t){return this.x=t.x,this.y=t.y,this.halfWidth=t.halfWidth,this.halfHeight=t.halfHeight,this}copyTo(t){return t.copyFrom(this),t}toString(){return`[pixi.js/math:Ellipse x=${this.x} y=${this.y} halfWidth=${this.halfWidth} halfHeight=${this.halfHeight}]`}}function YE(n,t,a,l,o,c){const d=n-a,m=t-l,p=o-a,v=c-l,_=d*p+m*v,b=p*p+v*v;let E=-1;b!==0&&(E=_/b);let C,R;E<0?(C=a,R=l):E>1?(C=o,R=c):(C=a+E*p,R=l+E*v);const z=n-C,M=t-R;return z*z+M*M}let qE,LE;class Fh{constructor(...t){this.type="polygon";let a=Array.isArray(t[0])?t[0]:t;if(typeof a[0]!="number"){const l=[];for(let o=0,c=a.length;o<c;o++)l.push(a[o].x,a[o].y);a=l}this.points=a,this.closePath=!0}isClockwise(){let t=0;const a=this.points,l=a.length;for(let o=0;o<l;o+=2){const c=a[o],d=a[o+1],m=a[(o+2)%l],p=a[(o+3)%l];t+=(m-c)*(p+d)}return t<0}containsPolygon(t){const a=this.getBounds(qE),l=t.getBounds(LE);if(!a.containsRect(l))return!1;const o=t.points;for(let c=0;c<o.length;c+=2){const d=o[c],m=o[c+1];if(!this.contains(d,m))return!1}return!0}clone(){const t=this.points.slice(),a=new Fh(t);return a.closePath=this.closePath,a}contains(t,a){let l=!1;const o=this.points.length/2;for(let c=0,d=o-1;c<o;d=c++){const m=this.points[c*2],p=this.points[c*2+1],v=this.points[d*2],_=this.points[d*2+1];p>a!=_>a&&t<(v-m)*((a-p)/(_-p))+m&&(l=!l)}return l}strokeContains(t,a,l,o=.5){const c=l*l,d=c*(1-o),m=c-d,{points:p}=this,v=p.length-(this.closePath?0:2);for(let _=0;_<v;_+=2){const b=p[_],E=p[_+1],C=p[(_+2)%p.length],R=p[(_+3)%p.length],z=YE(t,a,b,E,C,R),M=Math.sign((C-b)*(a-E)-(R-E)*(t-b));if(z<=(M<0?m:d))return!0}return!1}getBounds(t){t||(t=new mn);const a=this.points;let l=1/0,o=-1/0,c=1/0,d=-1/0;for(let m=0,p=a.length;m<p;m+=2){const v=a[m],_=a[m+1];l=v<l?v:l,o=v>o?v:o,c=_<c?_:c,d=_>d?_:d}return t.x=l,t.width=o-l,t.y=c,t.height=d-c,t}copyFrom(t){return this.points=t.points.slice(),this.closePath=t.closePath,this}copyTo(t){return t.copyFrom(this),t}toString(){return`[pixi.js/math:PolygoncloseStroke=${this.closePath}points=${this.points.reduce((t,a)=>`${t}, ${a}`,"")}]`}get lastX(){return this.points[this.points.length-2]}get lastY(){return this.points[this.points.length-1]}get x(){return de("8.11.0","Polygon.lastX is deprecated, please use Polygon.lastX instead."),this.points[this.points.length-2]}get y(){return de("8.11.0","Polygon.y is deprecated, please use Polygon.lastY instead."),this.points[this.points.length-1]}get startX(){return this.points[0]}get startY(){return this.points[1]}}const ip=(n,t,a,l,o,c,d)=>{const m=n-a,p=t-l,v=Math.sqrt(m*m+p*p);return v>=o-c&&v<=o+d};class ng{constructor(t=0,a=0,l=0,o=0,c=20){this.type="roundedRectangle",this.x=t,this.y=a,this.width=l,this.height=o,this.radius=c}getBounds(t){return t||(t=new mn),t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}clone(){return new ng(this.x,this.y,this.width,this.height,this.radius)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.copyFrom(this),t}contains(t,a){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&a>=this.y&&a<=this.y+this.height){const l=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(a>=this.y+l&&a<=this.y+this.height-l||t>=this.x+l&&t<=this.x+this.width-l)return!0;let o=t-(this.x+l),c=a-(this.y+l);const d=l*l;if(o*o+c*c<=d||(o=t-(this.x+this.width-l),o*o+c*c<=d)||(c=a-(this.y+this.height-l),o*o+c*c<=d)||(o=t-(this.x+l),o*o+c*c<=d))return!0}return!1}strokeContains(t,a,l,o=.5){const{x:c,y:d,width:m,height:p,radius:v}=this,_=l*(1-o),b=l-_,E=c+v,C=d+v,R=m-v*2,z=p-v*2,M=c+m,D=d+p;return(t>=c-_&&t<=c+b||t>=M-b&&t<=M+_)&&a>=C&&a<=C+z||(a>=d-_&&a<=d+b||a>=D-b&&a<=D+_)&&t>=E&&t<=E+R?!0:t<E&&a<C&&ip(t,a,E,C,v,b,_)||t>M-v&&a<C&&ip(t,a,M-v,C,v,b,_)||t>M-v&&a>D-v&&ip(t,a,M-v,D-v,v,b,_)||t<E&&a>D-v&&ip(t,a,E,D-v,v,b,_)}toString(){return`[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}const q_={};function XE(n,t,a){let l=2166136261;for(let o=0;o<t;o++)l^=n[o].uid,l=Math.imul(l,16777619),l>>>=0;return q_[l]||VE(n,t,l,a)}function VE(n,t,a,l){const o={};let c=0;for(let m=0;m<l;m++){const p=m<t?n[m]:ze.EMPTY.source;o[c++]=p.source,o[c++]=p.style}const d=new pp(o);return q_[a]=d,d}class ov{constructor(t){typeof t=="number"?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData),this.size=this.rawBinaryData.byteLength}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}get float64View(){return this._float64Array||(this._float64Array=new Float64Array(this.rawBinaryData)),this._float64Array}get bigUint64View(){return this._bigUint64Array||(this._bigUint64Array=new BigUint64Array(this.rawBinaryData)),this._bigUint64Array}view(t){return this[`${t}View`]}destroy(){this.rawBinaryData=null,this.uint32View=null,this.float32View=null,this.uint16View=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._int32View=null,this._float64Array=null,this._bigUint64Array=null}static sizeOf(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${t} isn't a valid view type`)}}}function cv(n,t,a,l){if(a??(a=0),l??(l=Math.min(n.byteLength-a,t.byteLength)),!(a&7)&&!(l&7)){const o=l/8;new Float64Array(t,0,o).set(new Float64Array(n,a,o))}else if(!(a&3)&&!(l&3)){const o=l/4;new Float32Array(t,0,o).set(new Float32Array(n,a,o))}else new Uint8Array(t).set(new Uint8Array(n,a,l))}const QE={normal:"normal-npm",add:"add-npm",screen:"screen-npm"};var kE=(n=>(n[n.DISABLED=0]="DISABLED",n[n.RENDERING_MASK_ADD=1]="RENDERING_MASK_ADD",n[n.MASK_ACTIVE=2]="MASK_ACTIVE",n[n.INVERSE_MASK_ACTIVE=3]="INVERSE_MASK_ACTIVE",n[n.RENDERING_MASK_REMOVE=4]="RENDERING_MASK_REMOVE",n[n.NONE=5]="NONE",n))(kE||{});function fv(n,t){return t.alphaMode==="no-premultiply-alpha"&&QE[n]||n}const KE=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
83
+ `);function ZE(n){let t="";for(let a=0;a<n;++a)a>0&&(t+=`
84
+ else `),a<n-1&&(t+=`if(test == ${a}.0){}`);return t}function JE(n,t){if(n===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const a=t.createShader(t.FRAGMENT_SHADER);try{for(;;){const l=KE.replace(/%forloop%/gi,ZE(n));if(t.shaderSource(a,l),t.compileShader(a),!t.getShaderParameter(a,t.COMPILE_STATUS))n=n/2|0;else break}}finally{t.deleteShader(a)}return n}let Uc=null;function WE(){var t;if(Uc)return Uc;const n=x_();return Uc=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),Uc=JE(Uc,n),(t=n.getExtension("WEBGL_lose_context"))==null||t.loseContext(),Uc}class PE{constructor(){this.ids=Object.create(null),this.textures=[],this.count=0}clear(){for(let t=0;t<this.count;t++){const a=this.textures[t];this.textures[t]=null,this.ids[a.uid]=null}this.count=0}}class FE{constructor(){this.renderPipeId="batch",this.action="startBatch",this.start=0,this.size=0,this.textures=new PE,this.blendMode="normal",this.topology="triangle-strip",this.canBundle=!0}destroy(){this.textures=null,this.gpuBindGroup=null,this.bindGroup=null,this.batcher=null,this.elements=null}}const Ih=[];let xp=0;od.register({clear:()=>{if(Ih.length>0)for(const n of Ih)n&&n.destroy();Ih.length=0,xp=0}});function hv(){return xp>0?Ih[--xp]:new FE}function dv(n){n.elements=null,Ih[xp++]=n}let Lh=0;const L_=class X_{constructor(t){this.uid=on("batcher"),this.dirty=!0,this.batchIndex=0,this.batches=[],this._elements=[],t={...X_.defaultOptions,...t},t.maxTextures||(de("v8.8.0","maxTextures is a required option for Batcher now, please pass it in the options"),t.maxTextures=WE());const{maxTextures:a,attributesInitialSize:l,indicesInitialSize:o}=t;this.attributeBuffer=new ov(l*4),this.indexBuffer=new Uint16Array(o),this.maxTextures=a}begin(){this.elementSize=0,this.elementStart=0,this.indexSize=0,this.attributeSize=0;for(let t=0;t<this.batchIndex;t++)dv(this.batches[t]);this.batchIndex=0,this._batchIndexStart=0,this._batchIndexSize=0,this.dirty=!0}add(t){this._elements[this.elementSize++]=t,t._indexStart=this.indexSize,t._attributeStart=this.attributeSize,t._batcher=this,this.indexSize+=t.indexSize,this.attributeSize+=t.attributeSize*this.vertexSize}checkAndUpdateTexture(t,a){const l=t._batch.textures.ids[a._source.uid];return!l&&l!==0?!1:(t._textureId=l,t.texture=a,!0)}updateElement(t){this.dirty=!0;const a=this.attributeBuffer;t.packAsQuad?this.packQuadAttributes(t,a.float32View,a.uint32View,t._attributeStart,t._textureId):this.packAttributes(t,a.float32View,a.uint32View,t._attributeStart,t._textureId)}break(t){const a=this._elements;if(!a[this.elementStart])return;let l=hv(),o=l.textures;o.clear();const c=a[this.elementStart];let d=fv(c.blendMode,c.texture._source),m=c.topology;this.attributeSize*4>this.attributeBuffer.size&&this._resizeAttributeBuffer(this.attributeSize*4),this.indexSize>this.indexBuffer.length&&this._resizeIndexBuffer(this.indexSize);const p=this.attributeBuffer.float32View,v=this.attributeBuffer.uint32View,_=this.indexBuffer;let b=this._batchIndexSize,E=this._batchIndexStart,C="startBatch",R=[];const z=this.maxTextures;for(let M=this.elementStart;M<this.elementSize;++M){const D=a[M];a[M]=null;const B=D.texture._source,U=fv(D.blendMode,B),k=d!==U||m!==D.topology;if(B._batchTick===Lh&&!k){D._textureId=B._textureBindLocation,b+=D.indexSize,D.packAsQuad?(this.packQuadAttributes(D,p,v,D._attributeStart,D._textureId),this.packQuadIndex(_,D._indexStart,D._attributeStart/this.vertexSize)):(this.packAttributes(D,p,v,D._attributeStart,D._textureId),this.packIndex(D,_,D._indexStart,D._attributeStart/this.vertexSize)),D._batch=l,R.push(D);continue}B._batchTick=Lh,(o.count>=z||k)&&(this._finishBatch(l,E,b-E,o,d,m,t,C,R),C="renderBatch",E=b,d=U,m=D.topology,l=hv(),o=l.textures,o.clear(),R=[],++Lh),D._textureId=B._textureBindLocation=o.count,o.ids[B.uid]=o.count,o.textures[o.count++]=B,D._batch=l,R.push(D),b+=D.indexSize,D.packAsQuad?(this.packQuadAttributes(D,p,v,D._attributeStart,D._textureId),this.packQuadIndex(_,D._indexStart,D._attributeStart/this.vertexSize)):(this.packAttributes(D,p,v,D._attributeStart,D._textureId),this.packIndex(D,_,D._indexStart,D._attributeStart/this.vertexSize))}o.count>0&&(this._finishBatch(l,E,b-E,o,d,m,t,C,R),E=b,++Lh),this.elementStart=this.elementSize,this._batchIndexStart=E,this._batchIndexSize=b}_finishBatch(t,a,l,o,c,d,m,p,v){t.gpuBindGroup=null,t.bindGroup=null,t.action=p,t.batcher=this,t.textures=o,t.blendMode=c,t.topology=d,t.start=a,t.size=l,t.elements=v,++Lh,this.batches[this.batchIndex++]=t,m.add(t)}finish(t){this.break(t)}ensureAttributeBuffer(t){t*4<=this.attributeBuffer.size||this._resizeAttributeBuffer(t*4)}ensureIndexBuffer(t){t<=this.indexBuffer.length||this._resizeIndexBuffer(t)}_resizeAttributeBuffer(t){const a=Math.max(t,this.attributeBuffer.size*2),l=new ov(a);cv(this.attributeBuffer.rawBinaryData,l.rawBinaryData),this.attributeBuffer=l}_resizeIndexBuffer(t){const a=this.indexBuffer;let l=Math.max(t,a.length*1.5);l+=l%2;const o=l>65535?new Uint32Array(l):new Uint16Array(l);if(o.BYTES_PER_ELEMENT!==a.BYTES_PER_ELEMENT)for(let c=0;c<a.length;c++)o[c]=a[c];else cv(a.buffer,o.buffer);this.indexBuffer=o}packQuadIndex(t,a,l){t[a]=l+0,t[a+1]=l+1,t[a+2]=l+2,t[a+3]=l+0,t[a+4]=l+2,t[a+5]=l+3}packIndex(t,a,l,o){const c=t.indices,d=t.indexSize,m=t.indexOffset,p=t.attributeOffset;for(let v=0;v<d;v++)a[l++]=o+c[v+m]-p}destroy(t={}){var a;if(this.batches!==null){for(let l=0;l<this.batchIndex;l++)dv(this.batches[l]);this.batches=null,this.geometry.destroy(!0),this.geometry=null,t.shader&&((a=this.shader)==null||a.destroy(),this.shader=null);for(let l=0;l<this._elements.length;l++)this._elements[l]&&(this._elements[l]._batch=null);this._elements=null,this.indexBuffer=null,this.attributeBuffer.destroy(),this.attributeBuffer=null}}};L_.defaultOptions={maxTextures:null,attributesInitialSize:4,indicesInitialSize:6};let IE=L_;var Ia=(n=>(n[n.MAP_READ=1]="MAP_READ",n[n.MAP_WRITE=2]="MAP_WRITE",n[n.COPY_SRC=4]="COPY_SRC",n[n.COPY_DST=8]="COPY_DST",n[n.INDEX=16]="INDEX",n[n.VERTEX=32]="VERTEX",n[n.UNIFORM=64]="UNIFORM",n[n.STORAGE=128]="STORAGE",n[n.INDIRECT=256]="INDIRECT",n[n.QUERY_RESOLVE=512]="QUERY_RESOLVE",n[n.STATIC=1024]="STATIC",n))(Ia||{});class ld extends ps{constructor(t){let{data:a,size:l}=t;const{usage:o,label:c,shrinkToFit:d}=t;super(),this._gpuData=Object.create(null),this._gcLastUsed=-1,this.autoGarbageCollect=!0,this.uid=on("buffer"),this._resourceType="buffer",this._resourceId=on("resource"),this._touched=0,this._updateID=1,this._dataInt32=null,this.shrinkToFit=!0,this.destroyed=!1,a instanceof Array&&(a=new Float32Array(a)),this._data=a,l??(l=a==null?void 0:a.byteLength);const m=!!a;this.descriptor={size:l,usage:o,mappedAtCreation:m,label:c},this.shrinkToFit=d??!0}get data(){return this._data}set data(t){this.setDataWithSize(t,t.length,!0)}get dataInt32(){return this._dataInt32||(this._dataInt32=new Int32Array(this.data.buffer)),this._dataInt32}get static(){return!!(this.descriptor.usage&Ia.STATIC)}set static(t){t?this.descriptor.usage|=Ia.STATIC:this.descriptor.usage&=~Ia.STATIC}setDataWithSize(t,a,l){if(this._updateID++,this._updateSize=a*t.BYTES_PER_ELEMENT,this._data===t){l&&this.emit("update",this);return}const o=this._data;if(this._data=t,this._dataInt32=null,!o||o.length!==t.length){!this.shrinkToFit&&o&&t.byteLength<o.byteLength?l&&this.emit("update",this):(this.descriptor.size=t.byteLength,this._resourceId=on("resource"),this.emit("change",this));return}l&&this.emit("update",this)}update(t){this._updateSize=t??this._updateSize,this._updateID++,this.emit("update",this)}unload(){var t;this.emit("unload",this);for(const a in this._gpuData)(t=this._gpuData[a])==null||t.destroy();this._gpuData=Object.create(null)}destroy(){this.destroyed=!0,this.unload(),this.emit("destroy",this),this.emit("change",this),this._data=null,this.descriptor=null,this.removeAllListeners()}}function V_(n,t){if(!(n instanceof ld)){let a=t?Ia.INDEX:Ia.VERTEX;n instanceof Array&&(t?(n=new Uint32Array(n),a=Ia.INDEX|Ia.COPY_DST):(n=new Float32Array(n),a=Ia.VERTEX|Ia.COPY_DST)),n=new ld({data:n,label:t?"index-mesh-buffer":"vertex-mesh-buffer",usage:a})}return n}function $E(n,t,a){const l=n.getAttribute(t);if(!l)return a.minX=0,a.minY=0,a.maxX=0,a.maxY=0,a;const o=l.buffer.data;let c=1/0,d=1/0,m=-1/0,p=-1/0;const v=o.BYTES_PER_ELEMENT,_=(l.offset||0)/v,b=(l.stride||8)/v;for(let E=_;E<o.length;E+=b){const C=o[E],R=o[E+1];C>m&&(m=C),R>p&&(p=R),C<c&&(c=C),R<d&&(d=R)}return a.minX=c,a.minY=d,a.maxX=m,a.maxY=p,a}function t4(n){return(n instanceof ld||Array.isArray(n)||n.BYTES_PER_ELEMENT)&&(n={buffer:n}),n.buffer=V_(n.buffer,!1),n}class e4 extends ps{constructor(t={}){super(),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=on("geometry"),this._layoutKey=0,this.instanceCount=1,this._bounds=new Wi,this._boundsDirty=!0;const{attributes:a,indexBuffer:l,topology:o}=t;if(this.buffers=[],this.attributes={},a)for(const c in a)this.addAttribute(c,a[c]);this.instanceCount=t.instanceCount??1,l&&this.addIndex(l),this.topology=o||"triangle-list"}onBufferUpdate(){this._boundsDirty=!0,this.emit("update",this)}getAttribute(t){return this.attributes[t]}getIndex(){return this.indexBuffer}getBuffer(t){return this.getAttribute(t).buffer}getSize(){for(const t in this.attributes){const a=this.attributes[t];return a.buffer.data.length/(a.stride/4||a.size)}return 0}addAttribute(t,a){const l=t4(a);this.buffers.indexOf(l.buffer)===-1&&(this.buffers.push(l.buffer),l.buffer.on("update",this.onBufferUpdate,this),l.buffer.on("change",this.onBufferUpdate,this)),this.attributes[t]=l}addIndex(t){this.indexBuffer=V_(t,!0),this.buffers.push(this.indexBuffer)}get bounds(){return this._boundsDirty?(this._boundsDirty=!1,$E(this,"aPosition",this._bounds)):this._bounds}unload(){var t;this.emit("unload",this);for(const a in this._gpuData)(t=this._gpuData[a])==null||t.destroy();this._gpuData=Object.create(null)}destroy(t=!1){var a;this.emit("destroy",this),this.removeAllListeners(),t&&this.buffers.forEach(l=>l.destroy()),this.unload(),(a=this.indexBuffer)==null||a.destroy(),this.attributes=null,this.buffers=null,this.indexBuffer=null,this._bounds=null}}const n4=new Float32Array(1),a4=new Uint32Array(1);class i4 extends e4{constructor(){const a=new ld({data:n4,label:"attribute-batch-buffer",usage:Ia.VERTEX|Ia.COPY_DST,shrinkToFit:!1}),l=new ld({data:a4,label:"index-batch-buffer",usage:Ia.INDEX|Ia.COPY_DST,shrinkToFit:!1}),o=24;super({attributes:{aPosition:{buffer:a,format:"float32x2",stride:o,offset:0},aUV:{buffer:a,format:"float32x2",stride:o,offset:8},aColor:{buffer:a,format:"unorm8x4",stride:o,offset:16},aTextureIdAndRound:{buffer:a,format:"uint16x2",stride:o,offset:20}},indexBuffer:l})}}function mv(n,t,a){if(n)for(const l in n){const o=l.toLocaleLowerCase(),c=t[o];if(c){let d=n[l];l==="header"&&(d=d.replace(/@in\s+[^;]+;\s*/g,"").replace(/@out\s+[^;]+;\s*/g,"")),a&&c.push(`//----${a}----//`),c.push(d)}else Ga(`${l} placement hook does not exist in shader`)}}const l4=/\{\{(.*?)\}\}/g;function pv(n){var l;const t={};return(((l=n.match(l4))==null?void 0:l.map(o=>o.replace(/[{()}]/g,"")))??[]).forEach(o=>{t[o]=[]}),t}function yv(n,t){let a;const l=/@in\s+([^;]+);/g;for(;(a=l.exec(n))!==null;)t.push(a[1])}function gv(n,t,a=!1){const l=[];yv(t,l),n.forEach(m=>{m.header&&yv(m.header,l)});const o=l;a&&o.sort();const c=o.map((m,p)=>` @location(${p}) ${m},`).join(`
85
+ `);let d=t.replace(/@in\s+[^;]+;\s*/g,"");return d=d.replace("{{in}}",`
86
+ ${c}
87
+ `),d}function vv(n,t){let a;const l=/@out\s+([^;]+);/g;for(;(a=l.exec(n))!==null;)t.push(a[1])}function s4(n){const a=/\b(\w+)\s*:/g.exec(n);return a?a[1]:""}function r4(n){const t=/@.*?\s+/g;return n.replace(t,"")}function u4(n,t){const a=[];vv(t,a),n.forEach(p=>{p.header&&vv(p.header,a)});let l=0;const o=a.sort().map(p=>p.indexOf("builtin")>-1?p:`@location(${l++}) ${p}`).join(`,
88
+ `),c=a.sort().map(p=>` var ${r4(p)};`).join(`
89
+ `),d=`return VSOutput(
90
+ ${a.sort().map(p=>` ${s4(p)}`).join(`,
91
+ `)});`;let m=t.replace(/@out\s+[^;]+;\s*/g,"");return m=m.replace("{{struct}}",`
92
+ ${o}
93
+ `),m=m.replace("{{start}}",`
94
+ ${c}
95
+ `),m=m.replace("{{return}}",`
96
+ ${d}
97
+ `),m}function xv(n,t){let a=n;for(const l in t){const o=t[l];o.join(`
98
+ `).length?a=a.replace(`{{${l}}}`,`//-----${l} START-----//
99
+ ${o.join(`
100
+ `)}
101
+ //----${l} FINISH----//`):a=a.replace(`{{${l}}}`,"")}return a}const $r=Object.create(null),I0=new Map;let o4=0;function c4({template:n,bits:t}){const a=Q_(n,t);if($r[a])return $r[a];const{vertex:l,fragment:o}=h4(n,t);return $r[a]=k_(l,o,t),$r[a]}function f4({template:n,bits:t}){const a=Q_(n,t);return $r[a]||($r[a]=k_(n.vertex,n.fragment,t)),$r[a]}function h4(n,t){const a=t.map(d=>d.vertex).filter(d=>!!d),l=t.map(d=>d.fragment).filter(d=>!!d);let o=gv(a,n.vertex,!0);o=u4(a,o);const c=gv(l,n.fragment,!0);return{vertex:o,fragment:c}}function Q_(n,t){return t.map(a=>(I0.has(a)||I0.set(a,o4++),I0.get(a))).sort((a,l)=>a-l).join("-")+n.vertex+n.fragment}function k_(n,t,a){const l=pv(n),o=pv(t);return a.forEach(c=>{mv(c.vertex,l,c.name),mv(c.fragment,o,c.name)}),{vertex:xv(n,l),fragment:xv(t,o)}}const d4=`
102
+ @in aPosition: vec2<f32>;
103
+ @in aUV: vec2<f32>;
104
+
105
+ @out @builtin(position) vPosition: vec4<f32>;
106
+ @out vUV : vec2<f32>;
107
+ @out vColor : vec4<f32>;
108
+
109
+ {{header}}
110
+
111
+ struct VSOutput {
112
+ {{struct}}
113
+ };
114
+
115
+ @vertex
116
+ fn main( {{in}} ) -> VSOutput {
117
+
118
+ var worldTransformMatrix = globalUniforms.uWorldTransformMatrix;
119
+ var modelMatrix = mat3x3<f32>(
120
+ 1.0, 0.0, 0.0,
121
+ 0.0, 1.0, 0.0,
122
+ 0.0, 0.0, 1.0
123
+ );
124
+ var position = aPosition;
125
+ var uv = aUV;
126
+
127
+ {{start}}
128
+
129
+ vColor = vec4<f32>(1., 1., 1., 1.);
130
+
131
+ {{main}}
132
+
133
+ vUV = uv;
134
+
135
+ var modelViewProjectionMatrix = globalUniforms.uProjectionMatrix * worldTransformMatrix * modelMatrix;
136
+
137
+ vPosition = vec4<f32>((modelViewProjectionMatrix * vec3<f32>(position, 1.0)).xy, 0.0, 1.0);
138
+
139
+ vColor *= globalUniforms.uWorldColorAlpha;
140
+
141
+ {{end}}
142
+
143
+ {{return}}
144
+ };
145
+ `,m4=`
146
+ @in vUV : vec2<f32>;
147
+ @in vColor : vec4<f32>;
148
+
149
+ {{header}}
150
+
151
+ @fragment
152
+ fn main(
153
+ {{in}}
154
+ ) -> @location(0) vec4<f32> {
155
+
156
+ {{start}}
157
+
158
+ var outColor:vec4<f32>;
159
+
160
+ {{main}}
161
+
162
+ var finalColor:vec4<f32> = outColor * vColor;
163
+
164
+ {{end}}
165
+
166
+ return finalColor;
167
+ };
168
+ `,p4=`
169
+ in vec2 aPosition;
170
+ in vec2 aUV;
171
+
172
+ out vec4 vColor;
173
+ out vec2 vUV;
174
+
175
+ {{header}}
176
+
177
+ void main(void){
178
+
179
+ mat3 worldTransformMatrix = uWorldTransformMatrix;
180
+ mat3 modelMatrix = mat3(
181
+ 1.0, 0.0, 0.0,
182
+ 0.0, 1.0, 0.0,
183
+ 0.0, 0.0, 1.0
184
+ );
185
+ vec2 position = aPosition;
186
+ vec2 uv = aUV;
187
+
188
+ {{start}}
189
+
190
+ vColor = vec4(1.);
191
+
192
+ {{main}}
193
+
194
+ vUV = uv;
195
+
196
+ mat3 modelViewProjectionMatrix = uProjectionMatrix * worldTransformMatrix * modelMatrix;
197
+
198
+ gl_Position = vec4((modelViewProjectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
199
+
200
+ vColor *= uWorldColorAlpha;
201
+
202
+ {{end}}
203
+ }
204
+ `,y4=`
205
+
206
+ in vec4 vColor;
207
+ in vec2 vUV;
208
+
209
+ out vec4 finalColor;
210
+
211
+ {{header}}
212
+
213
+ void main(void) {
214
+
215
+ {{start}}
216
+
217
+ vec4 outColor;
218
+
219
+ {{main}}
220
+
221
+ finalColor = outColor * vColor;
222
+
223
+ {{end}}
224
+ }
225
+ `,g4={name:"global-uniforms-bit",vertex:{header:`
226
+ struct GlobalUniforms {
227
+ uProjectionMatrix:mat3x3<f32>,
228
+ uWorldTransformMatrix:mat3x3<f32>,
229
+ uWorldColorAlpha: vec4<f32>,
230
+ uResolution: vec2<f32>,
231
+ }
232
+
233
+ @group(0) @binding(0) var<uniform> globalUniforms : GlobalUniforms;
234
+ `}},v4={name:"global-uniforms-bit",vertex:{header:`
235
+ uniform mat3 uProjectionMatrix;
236
+ uniform mat3 uWorldTransformMatrix;
237
+ uniform vec4 uWorldColorAlpha;
238
+ uniform vec2 uResolution;
239
+ `}};function x4({bits:n,name:t}){const a=c4({template:{fragment:m4,vertex:d4},bits:[g4,...n]});return cd.from({name:t,vertex:{source:a.vertex,entryPoint:"main"},fragment:{source:a.fragment,entryPoint:"main"}})}function _4({bits:n,name:t}){return new Fy({name:t,...f4({template:{vertex:p4,fragment:y4},bits:[v4,...n]})})}const S4={name:"color-bit",vertex:{header:`
240
+ @in aColor: vec4<f32>;
241
+ `,main:`
242
+ vColor *= vec4<f32>(aColor.rgb * aColor.a, aColor.a);
243
+ `}},b4={name:"color-bit",vertex:{header:`
244
+ in vec4 aColor;
245
+ `,main:`
246
+ vColor *= vec4(aColor.rgb * aColor.a, aColor.a);
247
+ `}},$0={};function T4(n){const t=[];if(n===1)t.push("@group(1) @binding(0) var textureSource1: texture_2d<f32>;"),t.push("@group(1) @binding(1) var textureSampler1: sampler;");else{let a=0;for(let l=0;l<n;l++)t.push(`@group(1) @binding(${a++}) var textureSource${l+1}: texture_2d<f32>;`),t.push(`@group(1) @binding(${a++}) var textureSampler${l+1}: sampler;`)}return t.join(`
248
+ `)}function E4(n){const t=[];if(n===1)t.push("outColor = textureSampleGrad(textureSource1, textureSampler1, vUV, uvDx, uvDy);");else{t.push("switch vTextureId {");for(let a=0;a<n;a++)a===n-1?t.push(" default:{"):t.push(` case ${a}:{`),t.push(` outColor = textureSampleGrad(textureSource${a+1}, textureSampler${a+1}, vUV, uvDx, uvDy);`),t.push(" break;}");t.push("}")}return t.join(`
249
+ `)}function C4(n){return $0[n]||($0[n]={name:"texture-batch-bit",vertex:{header:`
250
+ @in aTextureIdAndRound: vec2<u32>;
251
+ @out @interpolate(flat) vTextureId : u32;
252
+ `,main:`
253
+ vTextureId = aTextureIdAndRound.y;
254
+ `,end:`
255
+ if(aTextureIdAndRound.x == 1)
256
+ {
257
+ vPosition = vec4<f32>(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
258
+ }
259
+ `},fragment:{header:`
260
+ @in @interpolate(flat) vTextureId: u32;
261
+
262
+ ${T4(n)}
263
+ `,main:`
264
+ var uvDx = dpdx(vUV);
265
+ var uvDy = dpdy(vUV);
266
+
267
+ ${E4(n)}
268
+ `}}),$0[n]}const ty={};function A4(n){const t=[];for(let a=0;a<n;a++)a>0&&t.push("else"),a<n-1&&t.push(`if(vTextureId < ${a}.5)`),t.push("{"),t.push(` outColor = texture(uTextures[${a}], vUV);`),t.push("}");return t.join(`
269
+ `)}function M4(n){return ty[n]||(ty[n]={name:"texture-batch-bit",vertex:{header:`
270
+ in vec2 aTextureIdAndRound;
271
+ out float vTextureId;
272
+
273
+ `,main:`
274
+ vTextureId = aTextureIdAndRound.y;
275
+ `,end:`
276
+ if(aTextureIdAndRound.x == 1.)
277
+ {
278
+ gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
279
+ }
280
+ `},fragment:{header:`
281
+ in float vTextureId;
282
+
283
+ uniform sampler2D uTextures[${n}];
284
+
285
+ `,main:`
286
+
287
+ ${A4(n)}
288
+ `}}),ty[n]}const R4={name:"round-pixels-bit",vertex:{header:`
289
+ fn roundPixels(position: vec2<f32>, targetSize: vec2<f32>) -> vec2<f32>
290
+ {
291
+ return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
292
+ }
293
+ `}},z4={name:"round-pixels-bit",vertex:{header:`
294
+ vec2 roundPixels(vec2 position, vec2 targetSize)
295
+ {
296
+ return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
297
+ }
298
+ `}},_v={};function D4(n){let t=_v[n];if(t)return t;const a=new Int32Array(n);for(let l=0;l<n;l++)a[l]=l;return t=_v[n]=new E_({uTextures:{value:a,type:"i32",size:n}},{isStatic:!0}),t}class Sv extends wp{constructor(t){const a=_4({name:"batch",bits:[b4,M4(t),z4]}),l=x4({name:"batch",bits:[S4,C4(t),R4]});super({glProgram:a,gpuProgram:l,resources:{batchSamplers:D4(t)}}),this.maxTextures=t}}let Xh=null;const K_=class Z_ extends IE{constructor(t){super(t),this.geometry=new i4,this.name=Z_.extension.name,this.vertexSize=6,Xh??(Xh=new Sv(t.maxTextures)),this.shader=Xh}packAttributes(t,a,l,o,c){const d=c<<16|t.roundPixels&65535,m=t.transform,p=m.a,v=m.b,_=m.c,b=m.d,E=m.tx,C=m.ty,{positions:R,uvs:z}=t,M=t.color,D=t.attributeOffset,w=D+t.attributeSize;for(let B=D;B<w;B++){const U=B*2,k=R[U],Q=R[U+1];a[o++]=p*k+_*Q+E,a[o++]=b*Q+v*k+C,a[o++]=z[U],a[o++]=z[U+1],l[o++]=M,l[o++]=d}}packQuadAttributes(t,a,l,o,c){const d=t.texture,m=t.transform,p=m.a,v=m.b,_=m.c,b=m.d,E=m.tx,C=m.ty,R=t.bounds,z=R.maxX,M=R.minX,D=R.maxY,w=R.minY,B=d.uvs,U=t.color,k=c<<16|t.roundPixels&65535;a[o+0]=p*M+_*w+E,a[o+1]=b*w+v*M+C,a[o+2]=B.x0,a[o+3]=B.y0,l[o+4]=U,l[o+5]=k,a[o+6]=p*z+_*w+E,a[o+7]=b*w+v*z+C,a[o+8]=B.x1,a[o+9]=B.y1,l[o+10]=U,l[o+11]=k,a[o+12]=p*z+_*D+E,a[o+13]=b*D+v*z+C,a[o+14]=B.x2,a[o+15]=B.y2,l[o+16]=U,l[o+17]=k,a[o+18]=p*M+_*D+E,a[o+19]=b*D+v*M+C,a[o+20]=B.x3,a[o+21]=B.y3,l[o+22]=U,l[o+23]=k}_updateMaxTextures(t){this.shader.maxTextures!==t&&(Xh=new Sv(t),this.shader=Xh)}destroy(){this.shader=null,super.destroy()}};K_.extension={type:[Pt.Batcher],name:"default"};let O4=K_;class fd{constructor(t){this.items=Object.create(null);const{renderer:a,type:l,onUnload:o,priority:c,name:d}=t;this._renderer=a,a.gc.addResourceHash(this,"items",l,c??0),this._onUnload=o,this.name=d}add(t){return this.items[t.uid]?!1:(this.items[t.uid]=t,t.once("unload",this.remove,this),t._gcLastUsed=this._renderer.gc.now,!0)}remove(t,...a){var o;if(!this.items[t.uid])return;const l=t._gpuData[this._renderer.uid];l&&((o=this._onUnload)==null||o.call(this,t,...a),l.destroy(),t._gpuData[this._renderer.uid]=null,this.items[t.uid]=null)}removeAll(...t){Object.values(this.items).forEach(a=>a&&this.remove(a,...t))}destroy(...t){this.removeAll(...t),this.items=Object.create(null),this._renderer=null,this._onUnload=null}}function N4(n,t,a,l,o,c,d,m=null){let p=0;a*=t,o*=c;const v=m.a,_=m.b,b=m.c,E=m.d,C=m.tx,R=m.ty;for(;p<d;){const z=n[a],M=n[a+1];l[o]=v*z+b*M+C,l[o+1]=_*z+E*M+R,o+=c,a+=t,p++}}function w4(n,t,a,l){let o=0;for(t*=a;o<l;)n[t]=0,n[t+1]=0,t+=a,o++}function J_(n,t,a,l,o){const c=t.a,d=t.b,m=t.c,p=t.d,v=t.tx,_=t.ty;a||(a=0),l||(l=2),o||(o=n.length/l-a);let b=a*l;for(let E=0;E<o;E++){const C=n[b],R=n[b+1];n[b]=c*C+m*R+v,n[b+1]=d*C+p*R+_,b+=l}}const B4=new le;class ag{constructor(){this.packAsQuad=!1,this.batcherName="default",this.topology="triangle-list",this.applyTransform=!0,this.roundPixels=0,this._batcher=null,this._batch=null}get uvs(){return this.geometryData.uvs}get positions(){return this.geometryData.vertices}get indices(){return this.geometryData.indices}get blendMode(){return this.renderable&&this.applyTransform?this.renderable.groupBlendMode:"normal"}get color(){const t=this.baseColor,a=t>>16|t&65280|(t&255)<<16,l=this.renderable;return l?t_(a,l.groupColor)+(this.alpha*l.groupAlpha*255<<24):a+(this.alpha*255<<24)}get transform(){var t;return((t=this.renderable)==null?void 0:t.groupTransform)||B4}copyTo(t){t.indexOffset=this.indexOffset,t.indexSize=this.indexSize,t.attributeOffset=this.attributeOffset,t.attributeSize=this.attributeSize,t.baseColor=this.baseColor,t.alpha=this.alpha,t.texture=this.texture,t.geometryData=this.geometryData,t.topology=this.topology}reset(){this.applyTransform=!0,this.renderable=null,this.topology="triangle-list"}destroy(){this.renderable=null,this.texture=null,this.geometryData=null,this._batcher=null,this._batch=null}}const sd={extension:{type:Pt.ShapeBuilder,name:"circle"},build(n,t){let a,l,o,c,d,m;if(n.type==="circle"){const U=n;if(d=m=U.radius,d<=0)return!1;a=U.x,l=U.y,o=c=0}else if(n.type==="ellipse"){const U=n;if(d=U.halfWidth,m=U.halfHeight,d<=0||m<=0)return!1;a=U.x,l=U.y,o=c=0}else{const U=n,k=U.width/2,Q=U.height/2;a=U.x+k,l=U.y+Q,d=m=Math.max(0,Math.min(U.radius,Math.min(k,Q))),o=k-d,c=Q-m}if(o<0||c<0)return!1;const p=Math.ceil(2.3*Math.sqrt(d+m)),v=p*8+(o?4:0)+(c?4:0);if(v===0)return!1;if(p===0)return t[0]=t[6]=a+o,t[1]=t[3]=l+c,t[2]=t[4]=a-o,t[5]=t[7]=l-c,!0;let _=0,b=p*4+(o?2:0)+2,E=b,C=v,R=o+d,z=c,M=a+R,D=a-R,w=l+z;if(t[_++]=M,t[_++]=w,t[--b]=w,t[--b]=D,c){const U=l-z;t[E++]=D,t[E++]=U,t[--C]=U,t[--C]=M}for(let U=1;U<p;U++){const k=Math.PI/2*(U/p),Q=o+Math.cos(k)*d,V=c+Math.sin(k)*m,ft=a+Q,lt=a-Q,st=l+V,ut=l-V;t[_++]=ft,t[_++]=st,t[--b]=st,t[--b]=lt,t[E++]=lt,t[E++]=ut,t[--C]=ut,t[--C]=ft}R=o,z=c+m,M=a+R,D=a-R,w=l+z;const B=l-z;return t[_++]=M,t[_++]=w,t[--C]=B,t[--C]=M,o&&(t[_++]=D,t[_++]=w,t[--C]=B,t[--C]=D),!0},triangulate(n,t,a,l,o,c){if(n.length===0)return;let d=0,m=0;for(let _=0;_<n.length;_+=2)d+=n[_],m+=n[_+1];d/=n.length/2,m/=n.length/2;let p=l;t[p*a]=d,t[p*a+1]=m;const v=p++;for(let _=0;_<n.length;_+=2)t[p*a]=n[_],t[p*a+1]=n[_+1],_>0&&(o[c++]=p,o[c++]=v,o[c++]=p-1),p++;o[c++]=v+1,o[c++]=v,o[c++]=p-1}},U4={...sd,extension:{...sd.extension,name:"ellipse"}},H4={...sd,extension:{...sd.extension,name:"roundedRectangle"}},W_=1e-4,bv=1e-4;function G4(n){const t=n.length;if(t<6)return 1;let a=0;for(let l=0,o=n[t-2],c=n[t-1];l<t;l+=2){const d=n[l],m=n[l+1];a+=(d-o)*(m+c),o=d,c=m}return a<0?-1:1}function Tv(n,t,a,l,o,c,d,m){const p=n-a*o,v=t-l*o,_=n+a*c,b=t+l*c;let E,C;d?(E=l,C=-a):(E=-l,C=a);const R=p+E,z=v+C,M=_+E,D=b+C;return m.push(R,z),m.push(M,D),2}function no(n,t,a,l,o,c,d,m){const p=a-n,v=l-t;let _=Math.atan2(p,v),b=Math.atan2(o-n,c-t);m&&_<b?_+=Math.PI*2:!m&&_>b&&(b+=Math.PI*2);let E=_;const C=b-_,R=Math.abs(C),z=Math.sqrt(p*p+v*v),M=(15*R*Math.sqrt(z)/Math.PI>>0)+1,D=C/M;if(E+=D,m){d.push(n,t),d.push(a,l);for(let w=1,B=E;w<M;w++,B+=D)d.push(n,t),d.push(n+Math.sin(B)*z,t+Math.cos(B)*z);d.push(n,t),d.push(o,c)}else{d.push(a,l),d.push(n,t);for(let w=1,B=E;w<M;w++,B+=D)d.push(n+Math.sin(B)*z,t+Math.cos(B)*z),d.push(n,t);d.push(o,c),d.push(n,t)}return M*2}function j4(n,t,a,l,o,c){const d=W_;if(n.length===0)return;const m=t;let p=m.alignment;if(t.alignment!==.5){let et=G4(n);p=(p-.5)*et+.5}const v=new ma(n[0],n[1]),_=new ma(n[n.length-2],n[n.length-1]),b=l,E=Math.abs(v.x-_.x)<d&&Math.abs(v.y-_.y)<d;if(b){n=n.slice(),E&&(n.pop(),n.pop(),_.set(n[n.length-2],n[n.length-1]));const et=(v.x+_.x)*.5,mt=(_.y+v.y)*.5;n.unshift(et,mt),n.push(et,mt)}const C=o,R=n.length/2;let z=n.length;const M=C.length/2,D=m.width/2,w=D*D,B=m.miterLimit*m.miterLimit;let U=n[0],k=n[1],Q=n[2],V=n[3],ft=0,lt=0,st=-(k-V),ut=U-Q,pt=0,gt=0,xt=Math.sqrt(st*st+ut*ut);st/=xt,ut/=xt,st*=D,ut*=D;const Ct=p,H=(1-Ct)*2,G=Ct*2;b||(m.cap==="round"?z+=no(U-st*(H-G)*.5,k-ut*(H-G)*.5,U-st*H,k-ut*H,U+st*G,k+ut*G,C,!0)+2:m.cap==="square"&&(z+=Tv(U,k,st,ut,H,G,!0,C))),C.push(U-st*H,k-ut*H),C.push(U+st*G,k+ut*G);for(let et=1;et<R-1;++et){U=n[(et-1)*2],k=n[(et-1)*2+1],Q=n[et*2],V=n[et*2+1],ft=n[(et+1)*2],lt=n[(et+1)*2+1],st=-(k-V),ut=U-Q,xt=Math.sqrt(st*st+ut*ut),st/=xt,ut/=xt,st*=D,ut*=D,pt=-(V-lt),gt=Q-ft,xt=Math.sqrt(pt*pt+gt*gt),pt/=xt,gt/=xt,pt*=D,gt*=D;const mt=Q-U,j=k-V,I=Q-ft,ot=lt-V,vt=mt*I+j*ot,Tt=j*I-ot*mt,Ot=Tt<0;if(Math.abs(Tt)<.001*Math.abs(vt)){C.push(Q-st*H,V-ut*H),C.push(Q+st*G,V+ut*G),vt>=0&&(m.join==="round"?z+=no(Q,V,Q-st*H,V-ut*H,Q-pt*H,V-gt*H,C,!1)+4:z+=2,C.push(Q-pt*G,V-gt*G),C.push(Q+pt*H,V+gt*H));continue}const Bt=(-st+U)*(-ut+V)-(-st+Q)*(-ut+k),fe=(-pt+ft)*(-gt+V)-(-pt+Q)*(-gt+lt),ce=(mt*fe-I*Bt)/Tt,pa=(ot*Bt-j*fe)/Tt,ja=(ce-Q)*(ce-Q)+(pa-V)*(pa-V),qn=Q+(ce-Q)*H,In=V+(pa-V)*H,pn=Q-(ce-Q)*G,$n=V-(pa-V)*G,ys=Math.min(mt*mt+j*j,I*I+ot*ot),ei=Ot?H:G,eu=ys+ei*ei*w;ja<=eu?m.join==="bevel"||ja/w>B?(Ot?(C.push(qn,In),C.push(Q+st*G,V+ut*G),C.push(qn,In),C.push(Q+pt*G,V+gt*G)):(C.push(Q-st*H,V-ut*H),C.push(pn,$n),C.push(Q-pt*H,V-gt*H),C.push(pn,$n)),z+=2):m.join==="round"?Ot?(C.push(qn,In),C.push(Q+st*G,V+ut*G),z+=no(Q,V,Q+st*G,V+ut*G,Q+pt*G,V+gt*G,C,!0)+4,C.push(qn,In),C.push(Q+pt*G,V+gt*G)):(C.push(Q-st*H,V-ut*H),C.push(pn,$n),z+=no(Q,V,Q-st*H,V-ut*H,Q-pt*H,V-gt*H,C,!1)+4,C.push(Q-pt*H,V-gt*H),C.push(pn,$n)):(C.push(qn,In),C.push(pn,$n)):(C.push(Q-st*H,V-ut*H),C.push(Q+st*G,V+ut*G),m.join==="round"?Ot?z+=no(Q,V,Q+st*G,V+ut*G,Q+pt*G,V+gt*G,C,!0)+2:z+=no(Q,V,Q-st*H,V-ut*H,Q-pt*H,V-gt*H,C,!1)+2:m.join==="miter"&&ja/w<=B&&(Ot?(C.push(pn,$n),C.push(pn,$n)):(C.push(qn,In),C.push(qn,In)),z+=2),C.push(Q-pt*H,V-gt*H),C.push(Q+pt*G,V+gt*G),z+=2)}U=n[(R-2)*2],k=n[(R-2)*2+1],Q=n[(R-1)*2],V=n[(R-1)*2+1],st=-(k-V),ut=U-Q,xt=Math.sqrt(st*st+ut*ut),st/=xt,ut/=xt,st*=D,ut*=D,C.push(Q-st*H,V-ut*H),C.push(Q+st*G,V+ut*G),b||(m.cap==="round"?z+=no(Q-st*(H-G)*.5,V-ut*(H-G)*.5,Q-st*H,V-ut*H,Q+st*G,V+ut*G,C,!1)+2:m.cap==="square"&&(z+=Tv(Q,V,st,ut,H,G,!1,C)));const at=bv*bv;for(let et=M;et<z+M-2;++et)U=C[et*2],k=C[et*2+1],Q=C[(et+1)*2],V=C[(et+1)*2+1],ft=C[(et+2)*2],lt=C[(et+2)*2+1],!(Math.abs(U*(V-lt)+Q*(lt-k)+ft*(k-V))<at)&&c.push(et,et+1,et+2)}function Y4(n,t,a,l){const o=W_;if(n.length===0)return;const c=n[0],d=n[1],m=n[n.length-2],p=n[n.length-1],v=t||Math.abs(c-m)<o&&Math.abs(d-p)<o,_=a,b=n.length/2,E=_.length/2;for(let C=0;C<b;C++)_.push(n[C*2]),_.push(n[C*2+1]);for(let C=0;C<b-1;C++)l.push(E+C,E+C+1);v&&l.push(E+b-1,E)}function P_(n,t,a,l,o,c,d){const m=RE(n,t,2);if(!m)return;for(let v=0;v<m.length;v+=3)c[d++]=m[v]+o,c[d++]=m[v+1]+o,c[d++]=m[v+2]+o;let p=o*l;for(let v=0;v<n.length;v+=2)a[p]=n[v],a[p+1]=n[v+1],p+=l}const q4=[],L4={extension:{type:Pt.ShapeBuilder,name:"polygon"},build(n,t){for(let a=0;a<n.points.length;a++)t[a]=n.points[a];return!0},triangulate(n,t,a,l,o,c){P_(n,q4,t,a,l,o,c)}},X4={extension:{type:Pt.ShapeBuilder,name:"rectangle"},build(n,t){const a=n,l=a.x,o=a.y,c=a.width,d=a.height;return c>0&&d>0?(t[0]=l,t[1]=o,t[2]=l+c,t[3]=o,t[4]=l+c,t[5]=o+d,t[6]=l,t[7]=o+d,!0):!1},triangulate(n,t,a,l,o,c){let d=0;l*=a,t[l+d]=n[0],t[l+d+1]=n[1],d+=a,t[l+d]=n[2],t[l+d+1]=n[3],d+=a,t[l+d]=n[6],t[l+d+1]=n[7],d+=a,t[l+d]=n[4],t[l+d+1]=n[5],d+=a;const m=l/a;o[c++]=m,o[c++]=m+1,o[c++]=m+2,o[c++]=m+1,o[c++]=m+3,o[c++]=m+2}},V4={extension:{type:Pt.ShapeBuilder,name:"triangle"},build(n,t){return t[0]=n.x,t[1]=n.y,t[2]=n.x2,t[3]=n.y2,t[4]=n.x3,t[5]=n.y3,!0},triangulate(n,t,a,l,o,c){let d=0;l*=a,t[l+d]=n[0],t[l+d+1]=n[1],d+=a,t[l+d]=n[2],t[l+d+1]=n[3],d+=a,t[l+d]=n[4],t[l+d+1]=n[5];const m=l/a;o[c++]=m,o[c++]=m+1,o[c++]=m+2}},Ev=[{offset:0,color:"white"},{offset:1,color:"black"}],ig=class zy{constructor(...t){this.uid=on("fillGradient"),this._tick=0,this.type="linear",this.colorStops=[];let a=Q4(t);a={...a.type==="radial"?zy.defaultRadialOptions:zy.defaultLinearOptions,...Vx(a)},this._textureSize=a.textureSize,this._wrapMode=a.wrapMode,a.type==="radial"?(this.center=a.center,this.outerCenter=a.outerCenter??this.center,this.innerRadius=a.innerRadius,this.outerRadius=a.outerRadius,this.scale=a.scale,this.rotation=a.rotation):(this.start=a.start,this.end=a.end),this.textureSpace=a.textureSpace,this.type=a.type,a.colorStops.forEach(o=>{this.addColorStop(o.offset,o.color)})}addColorStop(t,a){return this.colorStops.push({offset:t,color:Rn.shared.setValue(a).toHexa()}),this}buildLinearGradient(){if(this.texture)return;let{x:t,y:a}=this.start,{x:l,y:o}=this.end,c=l-t,d=o-a;const m=c<0||d<0;if(this._wrapMode==="clamp-to-edge"){if(c<0){const M=t;t=l,l=M,c*=-1}if(d<0){const M=a;a=o,o=M,d*=-1}}const p=this.colorStops.length?this.colorStops:Ev,v=this._textureSize,{canvas:_,context:b}=Av(v,1),E=m?b.createLinearGradient(this._textureSize,0,0,0):b.createLinearGradient(0,0,this._textureSize,0);Cv(E,p),b.fillStyle=E,b.fillRect(0,0,v,1),this.texture=new ze({source:new gp({resource:_,addressMode:this._wrapMode})});const C=Math.sqrt(c*c+d*d),R=Math.atan2(d,c),z=new le;z.scale(C/v,1),z.rotate(R),z.translate(t,a),this.textureSpace==="local"&&z.scale(v,v),this.transform=z}buildGradient(){this.texture||this._tick++,this.type==="linear"?this.buildLinearGradient():this.buildRadialGradient()}buildRadialGradient(){if(this.texture)return;const t=this.colorStops.length?this.colorStops:Ev,a=this._textureSize,{canvas:l,context:o}=Av(a,a),{x:c,y:d}=this.center,{x:m,y:p}=this.outerCenter,v=this.innerRadius,_=this.outerRadius,b=m-_,E=p-_,C=a/(_*2),R=(c-b)*C,z=(d-E)*C,M=o.createRadialGradient(R,z,v*C,(m-b)*C,(p-E)*C,_*C);Cv(M,t),o.fillStyle=t[t.length-1].color,o.fillRect(0,0,a,a),o.fillStyle=M,o.translate(R,z),o.rotate(this.rotation),o.scale(1,this.scale),o.translate(-R,-z),o.fillRect(0,0,a,a),this.texture=new ze({source:new gp({resource:l,addressMode:this._wrapMode})});const D=new le;D.scale(1/C,1/C),D.translate(b,E),this.textureSpace==="local"&&D.scale(a,a),this.transform=D}destroy(){var t;(t=this.texture)==null||t.destroy(!0),this.texture=null,this.transform=null,this.colorStops=[],this.start=null,this.end=null,this.center=null,this.outerCenter=null}get styleKey(){return`fill-gradient-${this.uid}-${this._tick}`}};ig.defaultLinearOptions={start:{x:0,y:0},end:{x:0,y:1},colorStops:[],textureSpace:"local",type:"linear",textureSize:256,wrapMode:"clamp-to-edge"};ig.defaultRadialOptions={center:{x:.5,y:.5},innerRadius:0,outerRadius:.5,colorStops:[],scale:1,textureSpace:"local",type:"radial",textureSize:256,wrapMode:"clamp-to-edge"};let ir=ig;function Cv(n,t){for(let a=0;a<t.length;a++){const l=t[a];n.addColorStop(l.offset,l.color)}}function Av(n,t){const a=vi.get().createCanvas(n,t),l=a.getContext("2d");return{canvas:a,context:l}}function Q4(n){let t=n[0]??{};return(typeof t=="number"||n[1])&&(de("8.5.2","use options object instead"),t={type:"linear",start:{x:n[0],y:n[1]},end:{x:n[2],y:n[3]},textureSpace:n[4],textureSize:n[5]??ir.defaultLinearOptions.textureSize}),t}const k4=new le,K4=new mn;function Z4(n,t,a,l){const o=t.matrix?n.copyFrom(t.matrix).invert():n.identity();if(t.textureSpace==="local"){const d=a.getBounds(K4);t.width&&d.pad(t.width);const{x:m,y:p}=d,v=1/d.width,_=1/d.height,b=-m*v,E=-p*_,C=o.a,R=o.b,z=o.c,M=o.d;o.a*=v,o.b*=v,o.c*=_,o.d*=_,o.tx=b*C+E*z+o.tx,o.ty=b*R+E*M+o.ty}else o.translate(t.texture.frame.x,t.texture.frame.y),o.scale(1/t.texture.source.width,1/t.texture.source.height);const c=t.texture.source.style;return!(t.fill instanceof ir)&&c.addressMode==="clamp-to-edge"&&(c.addressMode="repeat",c.update()),l&&o.append(k4.copyFrom(l).invert()),o}const Bp={};Ie.handleByMap(Pt.ShapeBuilder,Bp);Ie.add(X4,L4,V4,sd,U4,H4);const J4=new mn,W4=new le;function P4(n,t){const{geometryData:a,batches:l}=t;l.length=0,a.indices.length=0,a.vertices.length=0,a.uvs.length=0;for(let o=0;o<n.instructions.length;o++){const c=n.instructions[o];if(c.action==="texture")F4(c.data,l,a);else if(c.action==="fill"||c.action==="stroke"){const d=c.action==="stroke",m=c.data.path.shapePath,p=c.data.style,v=c.data.hole;d&&v&&Mv(v.shapePath,p,!0,l,a),v&&(m.shapePrimitives[m.shapePrimitives.length-1].holes=v.shapePath.shapePrimitives),Mv(m,p,d,l,a)}}}function F4(n,t,a){const l=[],o=Bp.rectangle,c=J4;c.x=n.dx,c.y=n.dy,c.width=n.dw,c.height=n.dh;const d=n.transform;if(!o.build(c,l))return;const{vertices:m,uvs:p,indices:v}=a,_=v.length,b=m.length/2;d&&J_(l,d),o.triangulate(l,m,2,b,v,_);const E=n.image,C=E.uvs;p.push(C.x0,C.y0,C.x1,C.y1,C.x3,C.y3,C.x2,C.y2);const R=ti.get(ag);R.indexOffset=_,R.indexSize=v.length-_,R.attributeOffset=b,R.attributeSize=m.length/2-b,R.baseColor=n.style,R.alpha=n.alpha,R.texture=E,R.geometryData=a,t.push(R)}function Mv(n,t,a,l,o){const{vertices:c,uvs:d,indices:m}=o;n.shapePrimitives.forEach(({shape:p,transform:v,holes:_})=>{const b=[],E=Bp[p.type];if(!E.build(p,b))return;const C=m.length,R=c.length/2;let z="triangle-list";if(v&&J_(b,v),a){const B=p.closePath??!0,U=t;U.pixelLine?(Y4(b,B,c,m),z="line-list"):j4(b,U,!1,B,c,m)}else if(_){const B=[],U=b.slice();I4(_).forEach(Q=>{B.push(U.length/2),U.push(...Q)}),P_(U,B,c,2,R,m,C)}else E.triangulate(b,c,2,R,m,C);const M=d.length/2,D=t.texture;if(D!==ze.WHITE){const B=Z4(W4,t,p,v);N4(c,2,R,d,M,2,c.length/2-R,B)}else w4(d,M,2,c.length/2-R);const w=ti.get(ag);w.indexOffset=C,w.indexSize=m.length-C,w.attributeOffset=R,w.attributeSize=c.length/2-R,w.baseColor=t.color,w.alpha=t.alpha,w.texture=D,w.geometryData=o,w.topology=z,l.push(w)})}function I4(n){const t=[];for(let a=0;a<n.length;a++){const l=n[a].shape,o=[];Bp[l.type].build(l,o)&&t.push(o)}return t}class $4{constructor(){this.batches=[],this.geometryData={vertices:[],uvs:[],indices:[]}}reset(){this.batches&&this.batches.forEach(t=>{ti.return(t)}),this.graphicsData&&ti.return(this.graphicsData),this.isBatchable=!1,this.context=null,this.batches.length=0,this.geometryData.indices.length=0,this.geometryData.vertices.length=0,this.geometryData.uvs.length=0,this.graphicsData=null}destroy(){this.reset(),this.batches=null,this.geometryData=null}}class tC{constructor(){this.instructions=new Jy}init(t){const a=t.maxTextures;this.batcher?this.batcher._updateMaxTextures(a):this.batcher=new O4({maxTextures:a}),this.instructions.reset()}get geometry(){return de(PT,"GraphicsContextRenderData#geometry is deprecated, please use batcher.geometry instead."),this.batcher.geometry}destroy(){this.batcher.destroy(),this.instructions.destroy(),this.batcher=null,this.instructions=null}}const lg=class Dy{constructor(t){this._renderer=t,this._managedContexts=new fd({renderer:t,type:"resource",name:"graphicsContext"})}init(t){Dy.defaultOptions.bezierSmoothness=(t==null?void 0:t.bezierSmoothness)??Dy.defaultOptions.bezierSmoothness}getContextRenderData(t){return t._gpuData[this._renderer.uid].graphicsData||this._initContextRenderData(t)}updateGpuContext(t){const a=!!t._gpuData[this._renderer.uid],l=t._gpuData[this._renderer.uid]||this._initContext(t);if(t.dirty||!a){a&&l.reset(),P4(t,l);const o=t.batchMode;t.customShader||o==="no-batch"?l.isBatchable=!1:o==="auto"?l.isBatchable=l.geometryData.vertices.length<400:l.isBatchable=!0,t.dirty=!1}return l}getGpuContext(t){return t._gpuData[this._renderer.uid]||this._initContext(t)}_initContextRenderData(t){const a=ti.get(tC,{maxTextures:this._renderer.limits.maxBatchableTextures}),l=t._gpuData[this._renderer.uid],{batches:o,geometryData:c}=l;l.graphicsData=a;const d=c.vertices.length,m=c.indices.length;for(let b=0;b<o.length;b++)o[b].applyTransform=!1;const p=a.batcher;p.ensureAttributeBuffer(d),p.ensureIndexBuffer(m),p.begin();for(let b=0;b<o.length;b++){const E=o[b];p.add(E)}p.finish(a.instructions);const v=p.geometry;v.indexBuffer.setDataWithSize(p.indexBuffer,p.indexSize,!0),v.buffers[0].setDataWithSize(p.attributeBuffer.float32View,p.attributeSize,!0);const _=p.batches;for(let b=0;b<_.length;b++){const E=_[b];E.bindGroup=XE(E.textures.textures,E.textures.count,this._renderer.limits.maxBatchableTextures)}return a}_initContext(t){const a=new $4;return a.context=t,t._gpuData[this._renderer.uid]=a,this._managedContexts.add(t),a}destroy(){this._managedContexts.destroy(),this._renderer=null}};lg.extension={type:[Pt.WebGLSystem,Pt.WebGPUSystem],name:"graphicsContext"};lg.defaultOptions={bezierSmoothness:.5};let sg=lg;const eC=8,lp=11920929e-14,nC=1;function F_(n,t,a,l,o,c,d,m,p,v){const b=Math.min(.99,Math.max(0,v??sg.defaultOptions.bezierSmoothness));let E=(nC-b)/1;return E*=E,aC(t,a,l,o,c,d,m,p,n,E),n}function aC(n,t,a,l,o,c,d,m,p,v){Oy(n,t,a,l,o,c,d,m,p,v,0),p.push(d,m)}function Oy(n,t,a,l,o,c,d,m,p,v,_){if(_>eC)return;const b=(n+a)/2,E=(t+l)/2,C=(a+o)/2,R=(l+c)/2,z=(o+d)/2,M=(c+m)/2,D=(b+C)/2,w=(E+R)/2,B=(C+z)/2,U=(R+M)/2,k=(D+B)/2,Q=(w+U)/2;if(_>0){let V=d-n,ft=m-t;const lt=Math.abs((a-d)*ft-(l-m)*V),st=Math.abs((o-d)*ft-(c-m)*V);if(lt>lp&&st>lp){if((lt+st)*(lt+st)<=v*(V*V+ft*ft)){p.push(k,Q);return}}else if(lt>lp){if(lt*lt<=v*(V*V+ft*ft)){p.push(k,Q);return}}else if(st>lp){if(st*st<=v*(V*V+ft*ft)){p.push(k,Q);return}}else if(V=k-(n+d)/2,ft=Q-(t+m)/2,V*V+ft*ft<=v){p.push(k,Q);return}}Oy(n,t,b,E,D,w,k,Q,p,v,_+1),Oy(k,Q,B,U,z,M,d,m,p,v,_+1)}const iC=8,lC=11920929e-14,sC=1;function rC(n,t,a,l,o,c,d,m){const v=Math.min(.99,Math.max(0,m??sg.defaultOptions.bezierSmoothness));let _=(sC-v)/1;return _*=_,uC(t,a,l,o,c,d,n,_),n}function uC(n,t,a,l,o,c,d,m){Ny(d,n,t,a,l,o,c,m,0),d.push(o,c)}function Ny(n,t,a,l,o,c,d,m,p){if(p>iC)return;const v=(t+l)/2,_=(a+o)/2,b=(l+c)/2,E=(o+d)/2,C=(v+b)/2,R=(_+E)/2;let z=c-t,M=d-a;const D=Math.abs((l-c)*M-(o-d)*z);if(D>lC){if(D*D<=m*(z*z+M*M)){n.push(C,R);return}}else if(z=C-(t+c)/2,M=R-(a+d)/2,z*z+M*M<=m){n.push(C,R);return}Ny(n,t,a,v,_,C,R,m,p+1),Ny(n,C,R,b,E,c,d,m,p+1)}function I_(n,t,a,l,o,c,d,m){let p=Math.abs(o-c);(!d&&o>c||d&&c>o)&&(p=2*Math.PI-p),m||(m=Math.max(6,Math.floor(6*Math.pow(l,1/3)*(p/Math.PI)))),m=Math.max(m,3);let v=p/m,_=o;v*=d?-1:1;for(let b=0;b<m+1;b++){const E=Math.cos(_),C=Math.sin(_),R=t+E*l,z=a+C*l;n.push(R,z),_+=v}}function oC(n,t,a,l,o,c){const d=n[n.length-2],p=n[n.length-1]-a,v=d-t,_=o-a,b=l-t,E=Math.abs(p*b-v*_);if(E<1e-8||c===0){(n[n.length-2]!==t||n[n.length-1]!==a)&&n.push(t,a);return}const C=p*p+v*v,R=_*_+b*b,z=p*_+v*b,M=c*Math.sqrt(C)/E,D=c*Math.sqrt(R)/E,w=M*z/C,B=D*z/R,U=M*b+D*v,k=M*_+D*p,Q=v*(D+w),V=p*(D+w),ft=b*(M+B),lt=_*(M+B),st=Math.atan2(V-k,Q-U),ut=Math.atan2(lt-k,ft-U);I_(n,U+t,k+a,c,st,ut,v*_>b*p)}const $h=Math.PI*2,ey={centerX:0,centerY:0,ang1:0,ang2:0},ny=({x:n,y:t},a,l,o,c,d,m,p)=>{n*=a,t*=l;const v=o*n-c*t,_=c*n+o*t;return p.x=v+d,p.y=_+m,p};function cC(n,t){const a=t===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(t/4),l=t===1.5707963267948966?.551915024494:a,o=Math.cos(n),c=Math.sin(n),d=Math.cos(n+t),m=Math.sin(n+t);return[{x:o-c*l,y:c+o*l},{x:d+m*l,y:m-d*l},{x:d,y:m}]}const Rv=(n,t,a,l)=>{const o=n*l-t*a<0?-1:1;let c=n*a+t*l;return c>1&&(c=1),c<-1&&(c=-1),o*Math.acos(c)},fC=(n,t,a,l,o,c,d,m,p,v,_,b,E)=>{const C=Math.pow(o,2),R=Math.pow(c,2),z=Math.pow(_,2),M=Math.pow(b,2);let D=C*R-C*M-R*z;D<0&&(D=0),D/=C*M+R*z,D=Math.sqrt(D)*(d===m?-1:1);const w=D*o/c*b,B=D*-c/o*_,U=v*w-p*B+(n+a)/2,k=p*w+v*B+(t+l)/2,Q=(_-w)/o,V=(b-B)/c,ft=(-_-w)/o,lt=(-b-B)/c,st=Rv(1,0,Q,V);let ut=Rv(Q,V,ft,lt);m===0&&ut>0&&(ut-=$h),m===1&&ut<0&&(ut+=$h),E.centerX=U,E.centerY=k,E.ang1=st,E.ang2=ut};function hC(n,t,a,l,o,c,d,m=0,p=0,v=0){if(c===0||d===0)return;const _=Math.sin(m*$h/360),b=Math.cos(m*$h/360),E=b*(t-l)/2+_*(a-o)/2,C=-_*(t-l)/2+b*(a-o)/2;if(E===0&&C===0)return;c=Math.abs(c),d=Math.abs(d);const R=Math.pow(E,2)/Math.pow(c,2)+Math.pow(C,2)/Math.pow(d,2);R>1&&(c*=Math.sqrt(R),d*=Math.sqrt(R)),fC(t,a,l,o,c,d,p,v,_,b,E,C,ey);let{ang1:z,ang2:M}=ey;const{centerX:D,centerY:w}=ey;let B=Math.abs(M)/($h/4);Math.abs(1-B)<1e-7&&(B=1);const U=Math.max(Math.ceil(B),1);M/=U;let k=n[n.length-2],Q=n[n.length-1];const V={x:0,y:0};for(let ft=0;ft<U;ft++){const lt=cC(z,M),{x:st,y:ut}=ny(lt[0],c,d,b,_,D,w,V),{x:pt,y:gt}=ny(lt[1],c,d,b,_,D,w,V),{x:xt,y:Ct}=ny(lt[2],c,d,b,_,D,w,V);F_(n,k,Q,st,ut,pt,gt,xt,Ct),k=xt,Q=Ct,z+=M}}function dC(n,t,a){const l=(d,m)=>{const p=m.x-d.x,v=m.y-d.y,_=Math.sqrt(p*p+v*v),b=p/_,E=v/_;return{len:_,nx:b,ny:E}},o=(d,m)=>{d===0?n.moveTo(m.x,m.y):n.lineTo(m.x,m.y)};let c=t[t.length-1];for(let d=0;d<t.length;d++){const m=t[d%t.length],p=m.radius??a;if(p<=0){o(d,m),c=m;continue}const v=t[(d+1)%t.length],_=l(m,c),b=l(m,v);if(_.len<1e-4||b.len<1e-4){o(d,m),c=m;continue}let E=Math.asin(_.nx*b.ny-_.ny*b.nx),C=1,R=!1;_.nx*b.nx-_.ny*-b.ny<0?E<0?E=Math.PI+E:(E=Math.PI-E,C=-1,R=!0):E>0&&(C=-1,R=!0);const z=E/2;let M,D=Math.abs(Math.cos(z)*p/Math.sin(z));D>Math.min(_.len/2,b.len/2)?(D=Math.min(_.len/2,b.len/2),M=Math.abs(D*Math.sin(z)/Math.cos(z))):M=p;const w=m.x+b.nx*D+-b.ny*M*C,B=m.y+b.ny*D+b.nx*M*C,U=Math.atan2(_.ny,_.nx)+Math.PI/2*C,k=Math.atan2(b.ny,b.nx)-Math.PI/2*C;d===0&&n.moveTo(w+Math.cos(U)*M,B+Math.sin(U)*M),n.arc(w,B,M,U,k,R),c=m}}function mC(n,t,a,l){const o=(m,p)=>Math.sqrt((m.x-p.x)**2+(m.y-p.y)**2),c=(m,p,v)=>({x:m.x+(p.x-m.x)*v,y:m.y+(p.y-m.y)*v}),d=t.length;for(let m=0;m<d;m++){const p=t[(m+1)%d],v=p.radius??a;if(v<=0){m===0?n.moveTo(p.x,p.y):n.lineTo(p.x,p.y);continue}const _=t[m],b=t[(m+2)%d],E=o(_,p);let C;if(E<1e-4)C=p;else{const M=Math.min(E/2,v);C=c(p,_,M/E)}const R=o(b,p);let z;if(R<1e-4)z=p;else{const M=Math.min(R/2,v);z=c(p,b,M/R)}m===0?n.moveTo(C.x,C.y):n.lineTo(C.x,C.y),n.quadraticCurveTo(p.x,p.y,z.x,z.y,l)}}const pC=new mn;class yC{constructor(t){this.shapePrimitives=[],this._currentPoly=null,this._bounds=new Wi,this._graphicsPath2D=t,this.signed=t.checkForHoles}moveTo(t,a){return this.startPoly(t,a),this}lineTo(t,a){this._ensurePoly();const l=this._currentPoly.points,o=l[l.length-2],c=l[l.length-1];return(o!==t||c!==a)&&l.push(t,a),this}arc(t,a,l,o,c,d){this._ensurePoly(!1);const m=this._currentPoly.points;return I_(m,t,a,l,o,c,d),this}arcTo(t,a,l,o,c){this._ensurePoly();const d=this._currentPoly.points;return oC(d,t,a,l,o,c),this}arcToSvg(t,a,l,o,c,d,m){const p=this._currentPoly.points;return hC(p,this._currentPoly.lastX,this._currentPoly.lastY,d,m,t,a,l,o,c),this}bezierCurveTo(t,a,l,o,c,d,m){this._ensurePoly();const p=this._currentPoly;return F_(this._currentPoly.points,p.lastX,p.lastY,t,a,l,o,c,d,m),this}quadraticCurveTo(t,a,l,o,c){this._ensurePoly();const d=this._currentPoly;return rC(this._currentPoly.points,d.lastX,d.lastY,t,a,l,o,c),this}closePath(){return this.endPoly(!0),this}addPath(t,a){this.endPoly(),a&&!a.isIdentity()&&(t=t.clone(!0),t.transform(a));const l=this.shapePrimitives,o=l.length;for(let c=0;c<t.instructions.length;c++){const d=t.instructions[c];this[d.action](...d.data)}if(t.checkForHoles&&l.length-o>1){let c=null;for(let d=o;d<l.length;d++){const m=l[d];if(m.shape.type==="polygon"){const p=m.shape,v=c==null?void 0:c.shape;v&&v.containsPolygon(p)?(c.holes||(c.holes=[]),c.holes.push(m),l.copyWithin(d,d+1),l.length--,d--):c=m}}}return this}finish(t=!1){this.endPoly(t)}rect(t,a,l,o,c){return this.drawShape(new mn(t,a,l,o),c),this}circle(t,a,l,o){return this.drawShape(new tg(t,a,l),o),this}poly(t,a,l){const o=new Fh(t);return o.closePath=a,this.drawShape(o,l),this}regularPoly(t,a,l,o,c=0,d){o=Math.max(o|0,3);const m=-1*Math.PI/2+c,p=Math.PI*2/o,v=[];for(let _=0;_<o;_++){const b=m-_*p;v.push(t+l*Math.cos(b),a+l*Math.sin(b))}return this.poly(v,!0,d),this}roundPoly(t,a,l,o,c,d=0,m){if(o=Math.max(o|0,3),c<=0)return this.regularPoly(t,a,l,o,d);const p=l*Math.sin(Math.PI/o)-.001;c=Math.min(c,p);const v=-1*Math.PI/2+d,_=Math.PI*2/o,b=(o-2)*Math.PI/o/2;for(let E=0;E<o;E++){const C=E*_+v,R=t+l*Math.cos(C),z=a+l*Math.sin(C),M=C+Math.PI+b,D=C-Math.PI-b,w=R+c*Math.cos(M),B=z+c*Math.sin(M),U=R+c*Math.cos(D),k=z+c*Math.sin(D);E===0?this.moveTo(w,B):this.lineTo(w,B),this.quadraticCurveTo(R,z,U,k,m)}return this.closePath()}roundShape(t,a,l=!1,o){return t.length<3?this:(l?mC(this,t,a,o):dC(this,t,a),this.closePath())}filletRect(t,a,l,o,c){if(c===0)return this.rect(t,a,l,o);const d=Math.min(l,o)/2,m=Math.min(d,Math.max(-d,c)),p=t+l,v=a+o,_=m<0?-m:0,b=Math.abs(m);return this.moveTo(t,a+b).arcTo(t+_,a+_,t+b,a,b).lineTo(p-b,a).arcTo(p-_,a+_,p,a+b,b).lineTo(p,v-b).arcTo(p-_,v-_,t+l-b,v,b).lineTo(t+b,v).arcTo(t+_,v-_,t,v-b,b).closePath()}chamferRect(t,a,l,o,c,d){if(c<=0)return this.rect(t,a,l,o);const m=Math.min(c,Math.min(l,o)/2),p=t+l,v=a+o,_=[t+m,a,p-m,a,p,a+m,p,v-m,p-m,v,t+m,v,t,v-m,t,a+m];for(let b=_.length-1;b>=2;b-=2)_[b]===_[b-2]&&_[b-1]===_[b-3]&&_.splice(b-1,2);return this.poly(_,!0,d)}ellipse(t,a,l,o,c){return this.drawShape(new eg(t,a,l,o),c),this}roundRect(t,a,l,o,c,d){return this.drawShape(new ng(t,a,l,o,c),d),this}drawShape(t,a){return this.endPoly(),this.shapePrimitives.push({shape:t,transform:a}),this}startPoly(t,a){let l=this._currentPoly;return l&&this.endPoly(),l=new Fh,l.points.push(t,a),this._currentPoly=l,this}endPoly(t=!1){const a=this._currentPoly;return a&&a.points.length>2&&(a.closePath=t,this.shapePrimitives.push({shape:a})),this._currentPoly=null,this}_ensurePoly(t=!0){if(!this._currentPoly&&(this._currentPoly=new Fh,t)){const a=this.shapePrimitives[this.shapePrimitives.length-1];if(a){let l=a.shape.x,o=a.shape.y;if(a.transform&&!a.transform.isIdentity()){const c=a.transform,d=l;l=c.a*l+c.c*o+c.tx,o=c.b*d+c.d*o+c.ty}this._currentPoly.points.push(l,o)}else this._currentPoly.points.push(0,0)}}buildPath(){const t=this._graphicsPath2D;this.shapePrimitives.length=0,this._currentPoly=null;for(let a=0;a<t.instructions.length;a++){const l=t.instructions[a];this[l.action](...l.data)}this.finish()}get bounds(){const t=this._bounds;t.clear();const a=this.shapePrimitives;for(let l=0;l<a.length;l++){const o=a[l],c=o.shape.getBounds(pC);o.transform?t.addRect(c,o.transform):t.addRect(c)}return t}}class nr{constructor(t,a=!1){this.instructions=[],this.uid=on("graphicsPath"),this._dirty=!0,this.checkForHoles=a,typeof t=="string"?jE(t,this):this.instructions=(t==null?void 0:t.slice())??[]}get shapePath(){return this._shapePath||(this._shapePath=new yC(this)),this._dirty&&(this._dirty=!1,this._shapePath.buildPath()),this._shapePath}addPath(t,a){return t=t.clone(),this.instructions.push({action:"addPath",data:[t,a]}),this._dirty=!0,this}arc(...t){return this.instructions.push({action:"arc",data:t}),this._dirty=!0,this}arcTo(...t){return this.instructions.push({action:"arcTo",data:t}),this._dirty=!0,this}arcToSvg(...t){return this.instructions.push({action:"arcToSvg",data:t}),this._dirty=!0,this}bezierCurveTo(...t){return this.instructions.push({action:"bezierCurveTo",data:t}),this._dirty=!0,this}bezierCurveToShort(t,a,l,o,c){const d=this.instructions[this.instructions.length-1],m=this.getLastPoint(ma.shared);let p=0,v=0;if(!d||d.action!=="bezierCurveTo")p=m.x,v=m.y;else{p=d.data[2],v=d.data[3];const _=m.x,b=m.y;p=_+(_-p),v=b+(b-v)}return this.instructions.push({action:"bezierCurveTo",data:[p,v,t,a,l,o,c]}),this._dirty=!0,this}closePath(){return this.instructions.push({action:"closePath",data:[]}),this._dirty=!0,this}ellipse(...t){return this.instructions.push({action:"ellipse",data:t}),this._dirty=!0,this}lineTo(...t){return this.instructions.push({action:"lineTo",data:t}),this._dirty=!0,this}moveTo(...t){return this.instructions.push({action:"moveTo",data:t}),this}quadraticCurveTo(...t){return this.instructions.push({action:"quadraticCurveTo",data:t}),this._dirty=!0,this}quadraticCurveToShort(t,a,l){const o=this.instructions[this.instructions.length-1],c=this.getLastPoint(ma.shared);let d=0,m=0;if(!o||o.action!=="quadraticCurveTo")d=c.x,m=c.y;else{d=o.data[0],m=o.data[1];const p=c.x,v=c.y;d=p+(p-d),m=v+(v-m)}return this.instructions.push({action:"quadraticCurveTo",data:[d,m,t,a,l]}),this._dirty=!0,this}rect(t,a,l,o,c){return this.instructions.push({action:"rect",data:[t,a,l,o,c]}),this._dirty=!0,this}circle(t,a,l,o){return this.instructions.push({action:"circle",data:[t,a,l,o]}),this._dirty=!0,this}roundRect(...t){return this.instructions.push({action:"roundRect",data:t}),this._dirty=!0,this}poly(...t){return this.instructions.push({action:"poly",data:t}),this._dirty=!0,this}regularPoly(...t){return this.instructions.push({action:"regularPoly",data:t}),this._dirty=!0,this}roundPoly(...t){return this.instructions.push({action:"roundPoly",data:t}),this._dirty=!0,this}roundShape(...t){return this.instructions.push({action:"roundShape",data:t}),this._dirty=!0,this}filletRect(...t){return this.instructions.push({action:"filletRect",data:t}),this._dirty=!0,this}chamferRect(...t){return this.instructions.push({action:"chamferRect",data:t}),this._dirty=!0,this}star(t,a,l,o,c,d,m){c||(c=o/2);const p=-1*Math.PI/2+d,v=l*2,_=Math.PI*2/v,b=[];for(let E=0;E<v;E++){const C=E%2?c:o,R=E*_+p;b.push(t+C*Math.cos(R),a+C*Math.sin(R))}return this.poly(b,!0,m),this}clone(t=!1){const a=new nr;if(a.checkForHoles=this.checkForHoles,!t)a.instructions=this.instructions.slice();else for(let l=0;l<this.instructions.length;l++){const o=this.instructions[l];a.instructions.push({action:o.action,data:o.data.slice()})}return a}clear(){return this.instructions.length=0,this._dirty=!0,this}transform(t){if(t.isIdentity())return this;const a=t.a,l=t.b,o=t.c,c=t.d,d=t.tx,m=t.ty;let p=0,v=0,_=0,b=0,E=0,C=0,R=0,z=0;for(let M=0;M<this.instructions.length;M++){const D=this.instructions[M],w=D.data;switch(D.action){case"moveTo":case"lineTo":p=w[0],v=w[1],w[0]=a*p+o*v+d,w[1]=l*p+c*v+m;break;case"bezierCurveTo":_=w[0],b=w[1],E=w[2],C=w[3],p=w[4],v=w[5],w[0]=a*_+o*b+d,w[1]=l*_+c*b+m,w[2]=a*E+o*C+d,w[3]=l*E+c*C+m,w[4]=a*p+o*v+d,w[5]=l*p+c*v+m;break;case"quadraticCurveTo":_=w[0],b=w[1],p=w[2],v=w[3],w[0]=a*_+o*b+d,w[1]=l*_+c*b+m,w[2]=a*p+o*v+d,w[3]=l*p+c*v+m;break;case"arcToSvg":p=w[5],v=w[6],R=w[0],z=w[1],w[0]=a*R+o*z,w[1]=l*R+c*z,w[5]=a*p+o*v+d,w[6]=l*p+c*v+m;break;case"circle":w[4]=Vh(w[3],t);break;case"rect":w[4]=Vh(w[4],t);break;case"ellipse":w[8]=Vh(w[8],t);break;case"roundRect":w[5]=Vh(w[5],t);break;case"addPath":w[0].transform(t);break;case"poly":w[2]=Vh(w[2],t);break;default:Ga("unknown transform action",D.action);break}}return this._dirty=!0,this}get bounds(){return this.shapePath.bounds}getLastPoint(t){let a=this.instructions.length-1,l=this.instructions[a];if(!l)return t.x=0,t.y=0,t;for(;l.action==="closePath";){if(a--,a<0)return t.x=0,t.y=0,t;l=this.instructions[a]}switch(l.action){case"moveTo":case"lineTo":t.x=l.data[0],t.y=l.data[1];break;case"quadraticCurveTo":t.x=l.data[2],t.y=l.data[3];break;case"bezierCurveTo":t.x=l.data[4],t.y=l.data[5];break;case"arc":case"arcToSvg":t.x=l.data[5],t.y=l.data[6];break;case"addPath":l.data[0].getLastPoint(t);break}return t}}function Vh(n,t){return n?n.prepend(t):t.clone()}function rn(n,t,a){const l=n.getAttribute(t);return l?Number(l):a}function gC(n,t){const a=n.querySelectorAll("defs");for(let l=0;l<a.length;l++){const o=a[l];for(let c=0;c<o.children.length;c++){const d=o.children[c];switch(d.nodeName.toLowerCase()){case"lineargradient":t.defs[d.id]=vC(d);break;case"radialgradient":t.defs[d.id]=xC();break}}}}function vC(n){const t=rn(n,"x1",0),a=rn(n,"y1",0),l=rn(n,"x2",1),o=rn(n,"y2",0),c=n.getAttribute("gradientUnits")||"objectBoundingBox",d=new ir(t,a,l,o,c==="objectBoundingBox"?"local":"global");for(let m=0;m<n.children.length;m++){const p=n.children[m],v=rn(p,"offset",0),_=Rn.shared.setValue(p.getAttribute("stop-color")).toNumber();d.addColorStop(v,_)}return d}function xC(n){return Ga("[SVG Parser] Radial gradients are not yet supported"),new ir(0,0,1,0)}function zv(n){const t=n.match(/url\s*\(\s*['"]?\s*#([^'"\s)]+)\s*['"]?\s*\)/i);return t?t[1]:""}const Dv={fill:{type:"paint",default:0},"fill-opacity":{type:"number",default:1},stroke:{type:"paint",default:0},"stroke-width":{type:"number",default:1},"stroke-opacity":{type:"number",default:1},"stroke-linecap":{type:"string",default:"butt"},"stroke-linejoin":{type:"string",default:"miter"},"stroke-miterlimit":{type:"number",default:10},"stroke-dasharray":{type:"string",default:"none"},"stroke-dashoffset":{type:"number",default:0},opacity:{type:"number",default:1}};function $_(n,t){const a=n.getAttribute("style"),l={},o={},c={strokeStyle:l,fillStyle:o,useFill:!1,useStroke:!1};for(const d in Dv){const m=n.getAttribute(d);m&&Ov(t,c,d,m.trim())}if(a){const d=a.split(";");for(let m=0;m<d.length;m++){const p=d[m].trim(),[v,_]=p.split(":");Dv[v]&&Ov(t,c,v,_.trim())}}return{strokeStyle:c.useStroke?l:null,fillStyle:c.useFill?o:null,useFill:c.useFill,useStroke:c.useStroke}}function Ov(n,t,a,l){switch(a){case"stroke":if(l!=="none"){if(l.startsWith("url(")){const o=zv(l);t.strokeStyle.fill=n.defs[o]}else t.strokeStyle.color=Rn.shared.setValue(l).toNumber();t.useStroke=!0}break;case"stroke-width":t.strokeStyle.width=Number(l);break;case"fill":if(l!=="none"){if(l.startsWith("url(")){const o=zv(l);t.fillStyle.fill=n.defs[o]}else t.fillStyle.color=Rn.shared.setValue(l).toNumber();t.useFill=!0}break;case"fill-opacity":t.fillStyle.alpha=Number(l);break;case"stroke-opacity":t.strokeStyle.alpha=Number(l);break;case"opacity":t.fillStyle.alpha=Number(l),t.strokeStyle.alpha=Number(l);break}}function _C(n){if(n.length<=2)return!0;const t=n.map(m=>m.area).sort((m,p)=>p-m),[a,l]=t,o=t[t.length-1],c=a/l,d=l/o;return!(c>3&&d<2)}function SC(n){return n.split(/(?=[Mm])/).filter(l=>l.trim().length>0)}function bC(n){const t=n.match(/[-+]?[0-9]*\.?[0-9]+/g);if(!t||t.length<4)return 0;const a=t.map(Number),l=[],o=[];for(let _=0;_<a.length;_+=2)_+1<a.length&&(l.push(a[_]),o.push(a[_+1]));if(l.length===0||o.length===0)return 0;const c=Math.min(...l),d=Math.max(...l),m=Math.min(...o),p=Math.max(...o);return(d-c)*(p-m)}function Nv(n,t){const a=new nr(n,!1);for(const l of a.instructions)t.instructions.push(l)}function TC(n,t){if(typeof n=="string"){const d=document.createElement("div");d.innerHTML=n.trim(),n=d.querySelector("svg")}const a={context:t,defs:{},path:new nr};gC(n,a);const l=n.children,{fillStyle:o,strokeStyle:c}=$_(n,a);for(let d=0;d<l.length;d++){const m=l[d];m.nodeName.toLowerCase()!=="defs"&&t2(m,a,o,c)}return t}function t2(n,t,a,l){const o=n.children,{fillStyle:c,strokeStyle:d}=$_(n,t);c&&a?a={...a,...c}:c&&(a=c),d&&l?l={...l,...d}:d&&(l=d);const m=!a&&!l;m&&(a={color:0});let p,v,_,b,E,C,R,z,M,D,w,B,U,k,Q,V,ft;switch(n.nodeName.toLowerCase()){case"path":{k=n.getAttribute("d");const lt=n.getAttribute("fill-rule"),st=SC(k),ut=lt==="evenodd",pt=st.length>1;if(ut&&pt){const xt=st.map(H=>({path:H,area:bC(H)}));if(xt.sort((H,G)=>G.area-H.area),st.length>3||!_C(xt))for(let H=0;H<xt.length;H++){const G=xt[H],at=H===0;t.context.beginPath();const et=new nr(void 0,!0);Nv(G.path,et),t.context.path(et),at?(a&&t.context.fill(a),l&&t.context.stroke(l)):t.context.cut()}else for(let H=0;H<xt.length;H++){const G=xt[H],at=H%2===1;t.context.beginPath();const et=new nr(void 0,!0);Nv(G.path,et),t.context.path(et),at?t.context.cut():(a&&t.context.fill(a),l&&t.context.stroke(l))}}else{const xt=lt?lt==="evenodd":!0;Q=new nr(k,xt),t.context.path(Q),a&&t.context.fill(a),l&&t.context.stroke(l)}break}case"circle":R=rn(n,"cx",0),z=rn(n,"cy",0),M=rn(n,"r",0),t.context.ellipse(R,z,M,M),a&&t.context.fill(a),l&&t.context.stroke(l);break;case"rect":p=rn(n,"x",0),v=rn(n,"y",0),V=rn(n,"width",0),ft=rn(n,"height",0),D=rn(n,"rx",0),w=rn(n,"ry",0),D||w?t.context.roundRect(p,v,V,ft,D||w):t.context.rect(p,v,V,ft),a&&t.context.fill(a),l&&t.context.stroke(l);break;case"ellipse":R=rn(n,"cx",0),z=rn(n,"cy",0),D=rn(n,"rx",0),w=rn(n,"ry",0),t.context.beginPath(),t.context.ellipse(R,z,D,w),a&&t.context.fill(a),l&&t.context.stroke(l);break;case"line":_=rn(n,"x1",0),b=rn(n,"y1",0),E=rn(n,"x2",0),C=rn(n,"y2",0),t.context.beginPath(),t.context.moveTo(_,b),t.context.lineTo(E,C),l&&t.context.stroke(l);break;case"polygon":U=n.getAttribute("points"),B=U.match(/-?\d+/g).map(lt=>parseInt(lt,10)),t.context.poly(B,!0),a&&t.context.fill(a),l&&t.context.stroke(l);break;case"polyline":U=n.getAttribute("points"),B=U.match(/-?\d+/g).map(lt=>parseInt(lt,10)),t.context.poly(B,!1),l&&t.context.stroke(l);break;case"g":case"svg":break;default:{Ga(`[SVG parser] <${n.nodeName}> elements unsupported`);break}}m&&(a=null);for(let lt=0;lt<o.length;lt++)t2(o[lt],t,a,l)}const wv={repeat:{addressModeU:"repeat",addressModeV:"repeat"},"repeat-x":{addressModeU:"repeat",addressModeV:"clamp-to-edge"},"repeat-y":{addressModeU:"clamp-to-edge",addressModeV:"repeat"},"no-repeat":{addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"}};class Up{constructor(t,a){this.uid=on("fillPattern"),this._tick=0,this.transform=new le,this.texture=t,this.transform.scale(1/t.frame.width,1/t.frame.height),a&&(t.source.style.addressModeU=wv[a].addressModeU,t.source.style.addressModeV=wv[a].addressModeV)}setTransform(t){const a=this.texture;this.transform.copyFrom(t),this.transform.invert(),this.transform.scale(1/a.frame.width,1/a.frame.height),this._tick++}get texture(){return this._texture}set texture(t){this._texture!==t&&(this._texture=t,this._tick++)}get styleKey(){return`fill-pattern-${this.uid}-${this._tick}`}destroy(){this.texture.destroy(!0),this.texture=null}}function EC(n){return Rn.isColorLike(n)}function Bv(n){return n instanceof Up}function Uv(n){return n instanceof ir}function CC(n){return n instanceof ze}function AC(n,t,a){const l=Rn.shared.setValue(t??0);return n.color=l.toNumber(),n.alpha=l.alpha===1?a.alpha:l.alpha,n.texture=ze.WHITE,{...a,...n}}function MC(n,t,a){return n.texture=t,{...a,...n}}function Hv(n,t,a){return n.fill=t,n.color=16777215,n.texture=t.texture,n.matrix=t.transform,{...a,...n}}function Gv(n,t,a){return t.buildGradient(),n.fill=t,n.color=16777215,n.texture=t.texture,n.matrix=t.transform,n.textureSpace=t.textureSpace,{...a,...n}}function RC(n,t){const a={...t,...n},l=Rn.shared.setValue(a.color);return a.alpha*=l.alpha,a.color=l.toNumber(),a}function fo(n,t){if(n==null)return null;const a={},l=n;return EC(n)?AC(a,n,t):CC(n)?MC(a,n,t):Bv(n)?Hv(a,n,t):Uv(n)?Gv(a,n,t):l.fill&&Bv(l.fill)?Hv(l,l.fill,t):l.fill&&Uv(l.fill)?Gv(l,l.fill,t):RC(l,t)}function _p(n,t){const{width:a,alignment:l,miterLimit:o,cap:c,join:d,pixelLine:m,...p}=t,v=fo(n,p);return v?{width:a,alignment:l,miterLimit:o,cap:c,join:d,pixelLine:m,...v}:null}function zC(n,t){let a=1;const l=n.shapePath.shapePrimitives;for(let o=0;o<l.length;o++){const c=l[o].shape;if(c.type!=="polygon")continue;const d=c.points,m=d.length;if(m<6)continue;const p=c.closePath;for(let v=0;v<m;v+=2){if(!p&&(v===0||v===m-2))continue;const _=(v-2+m)%m,b=(v+2)%m,E=d[_],C=d[_+1],R=d[v],z=d[v+1],M=d[b],D=d[b+1],w=E-R,B=C-z,U=M-R,k=D-z,Q=w*w+B*B,V=U*U+k*k;if(Q<1e-12||V<1e-12)continue;let st=(w*U+B*k)/Math.sqrt(Q*V);st<-1?st=-1:st>1&&(st=1);const ut=Math.sqrt((1-st)*.5);if(ut<1e-6)continue;const pt=Math.min(1/ut,t);pt>a&&(a=pt)}}return a}const DC=new ma,jv=new le,rg=class hs extends ps{constructor(){super(...arguments),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=on("graphicsContext"),this.dirty=!0,this.batchMode="auto",this.instructions=[],this.destroyed=!1,this._activePath=new nr,this._transform=new le,this._fillStyle={...hs.defaultFillStyle},this._strokeStyle={...hs.defaultStrokeStyle},this._stateStack=[],this._tick=0,this._bounds=new Wi,this._boundsDirty=!0}clone(){const t=new hs;return t.batchMode=this.batchMode,t.instructions=this.instructions.slice(),t._activePath=this._activePath.clone(),t._transform=this._transform.clone(),t._fillStyle={...this._fillStyle},t._strokeStyle={...this._strokeStyle},t._stateStack=this._stateStack.slice(),t._bounds=this._bounds.clone(),t._boundsDirty=!0,t}get fillStyle(){return this._fillStyle}set fillStyle(t){this._fillStyle=fo(t,hs.defaultFillStyle)}get strokeStyle(){return this._strokeStyle}set strokeStyle(t){this._strokeStyle=_p(t,hs.defaultStrokeStyle)}setFillStyle(t){return this._fillStyle=fo(t,hs.defaultFillStyle),this}setStrokeStyle(t){return this._strokeStyle=fo(t,hs.defaultStrokeStyle),this}texture(t,a,l,o,c,d){return this.instructions.push({action:"texture",data:{image:t,dx:l||0,dy:o||0,dw:c||t.frame.width,dh:d||t.frame.height,transform:this._transform.clone(),alpha:this._fillStyle.alpha,style:a||a===0?Rn.shared.setValue(a).toNumber():16777215}}),this.onUpdate(),this}beginPath(){return this._activePath=new nr,this}fill(t,a){let l;const o=this.instructions[this.instructions.length-1];return this._tick===0&&(o==null?void 0:o.action)==="stroke"?l=o.data.path:l=this._activePath.clone(),l?(t!=null&&(a!==void 0&&typeof t=="number"&&(de(un,"GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead"),t={color:t,alpha:a}),this._fillStyle=fo(t,hs.defaultFillStyle)),this.instructions.push({action:"fill",data:{style:this.fillStyle,path:l}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}_initNextPathLocation(){const{x:t,y:a}=this._activePath.getLastPoint(ma.shared);this._activePath.clear(),this._activePath.moveTo(t,a)}stroke(t){let a;const l=this.instructions[this.instructions.length-1];return this._tick===0&&(l==null?void 0:l.action)==="fill"?a=l.data.path:a=this._activePath.clone(),a?(t!=null&&(this._strokeStyle=_p(t,hs.defaultStrokeStyle)),this.instructions.push({action:"stroke",data:{style:this.strokeStyle,path:a}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}cut(){for(let t=0;t<2;t++){const a=this.instructions[this.instructions.length-1-t],l=this._activePath.clone();if(a&&(a.action==="stroke"||a.action==="fill"))if(a.data.hole)a.data.hole.addPath(l);else{a.data.hole=l;break}}return this._initNextPathLocation(),this}arc(t,a,l,o,c,d){this._tick++;const m=this._transform;return this._activePath.arc(m.a*t+m.c*a+m.tx,m.b*t+m.d*a+m.ty,l,o,c,d),this}arcTo(t,a,l,o,c){this._tick++;const d=this._transform;return this._activePath.arcTo(d.a*t+d.c*a+d.tx,d.b*t+d.d*a+d.ty,d.a*l+d.c*o+d.tx,d.b*l+d.d*o+d.ty,c),this}arcToSvg(t,a,l,o,c,d,m){this._tick++;const p=this._transform;return this._activePath.arcToSvg(t,a,l,o,c,p.a*d+p.c*m+p.tx,p.b*d+p.d*m+p.ty),this}bezierCurveTo(t,a,l,o,c,d,m){this._tick++;const p=this._transform;return this._activePath.bezierCurveTo(p.a*t+p.c*a+p.tx,p.b*t+p.d*a+p.ty,p.a*l+p.c*o+p.tx,p.b*l+p.d*o+p.ty,p.a*c+p.c*d+p.tx,p.b*c+p.d*d+p.ty,m),this}closePath(){var t;return this._tick++,(t=this._activePath)==null||t.closePath(),this}ellipse(t,a,l,o){return this._tick++,this._activePath.ellipse(t,a,l,o,this._transform.clone()),this}circle(t,a,l){return this._tick++,this._activePath.circle(t,a,l,this._transform.clone()),this}path(t){return this._tick++,this._activePath.addPath(t,this._transform.clone()),this}lineTo(t,a){this._tick++;const l=this._transform;return this._activePath.lineTo(l.a*t+l.c*a+l.tx,l.b*t+l.d*a+l.ty),this}moveTo(t,a){this._tick++;const l=this._transform,o=this._activePath.instructions,c=l.a*t+l.c*a+l.tx,d=l.b*t+l.d*a+l.ty;return o.length===1&&o[0].action==="moveTo"?(o[0].data[0]=c,o[0].data[1]=d,this):(this._activePath.moveTo(c,d),this)}quadraticCurveTo(t,a,l,o,c){this._tick++;const d=this._transform;return this._activePath.quadraticCurveTo(d.a*t+d.c*a+d.tx,d.b*t+d.d*a+d.ty,d.a*l+d.c*o+d.tx,d.b*l+d.d*o+d.ty,c),this}rect(t,a,l,o){return this._tick++,this._activePath.rect(t,a,l,o,this._transform.clone()),this}roundRect(t,a,l,o,c){return this._tick++,this._activePath.roundRect(t,a,l,o,c,this._transform.clone()),this}poly(t,a){return this._tick++,this._activePath.poly(t,a,this._transform.clone()),this}regularPoly(t,a,l,o,c=0,d){return this._tick++,this._activePath.regularPoly(t,a,l,o,c,d),this}roundPoly(t,a,l,o,c,d){return this._tick++,this._activePath.roundPoly(t,a,l,o,c,d),this}roundShape(t,a,l,o){return this._tick++,this._activePath.roundShape(t,a,l,o),this}filletRect(t,a,l,o,c){return this._tick++,this._activePath.filletRect(t,a,l,o,c),this}chamferRect(t,a,l,o,c,d){return this._tick++,this._activePath.chamferRect(t,a,l,o,c,d),this}star(t,a,l,o,c=0,d=0){return this._tick++,this._activePath.star(t,a,l,o,c,d,this._transform.clone()),this}svg(t){return this._tick++,TC(t,this),this}restore(){const t=this._stateStack.pop();return t&&(this._transform=t.transform,this._fillStyle=t.fillStyle,this._strokeStyle=t.strokeStyle),this}save(){return this._stateStack.push({transform:this._transform.clone(),fillStyle:{...this._fillStyle},strokeStyle:{...this._strokeStyle}}),this}getTransform(){return this._transform}resetTransform(){return this._transform.identity(),this}rotate(t){return this._transform.rotate(t),this}scale(t,a=t){return this._transform.scale(t,a),this}setTransform(t,a,l,o,c,d){return t instanceof le?(this._transform.set(t.a,t.b,t.c,t.d,t.tx,t.ty),this):(this._transform.set(t,a,l,o,c,d),this)}transform(t,a,l,o,c,d){return t instanceof le?(this._transform.append(t),this):(jv.set(t,a,l,o,c,d),this._transform.append(jv),this)}translate(t,a=t){return this._transform.translate(t,a),this}clear(){return this._activePath.clear(),this.instructions.length=0,this.resetTransform(),this.onUpdate(),this}onUpdate(){this._boundsDirty=!0,this.dirty=!0,this.emit("update",this,16)}get bounds(){if(!this._boundsDirty)return this._bounds;this._boundsDirty=!1;const t=this._bounds;t.clear();for(let a=0;a<this.instructions.length;a++){const l=this.instructions[a],o=l.action;if(o==="fill"){const c=l.data;t.addBounds(c.path.bounds)}else if(o==="texture"){const c=l.data;t.addFrame(c.dx,c.dy,c.dx+c.dw,c.dy+c.dh,c.transform)}if(o==="stroke"){const c=l.data,d=c.style.alignment;let m=c.style.width*(1-d);c.style.join==="miter"&&(m*=zC(c.path,c.style.miterLimit));const p=c.path.bounds;t.addFrame(p.minX-m,p.minY-m,p.maxX+m,p.maxY+m)}}return t.isValid||t.set(0,0,0,0),t}containsPoint(t){var o;if(!this.bounds.containsPoint(t.x,t.y))return!1;const a=this.instructions;let l=!1;for(let c=0;c<a.length;c++){const d=a[c],m=d.data,p=m.path;if(!d.action||!p)continue;const v=m.style,_=p.shapePath.shapePrimitives;for(let b=0;b<_.length;b++){const E=_[b].shape;if(!v||!E)continue;const C=_[b].transform,R=C?C.applyInverse(t,DC):t;if(d.action==="fill")l=E.contains(R.x,R.y);else{const M=v;l=E.strokeContains(R.x,R.y,M.width,M.alignment)}const z=m.hole;if(z){const M=(o=z.shapePath)==null?void 0:o.shapePrimitives;if(M)for(let D=0;D<M.length;D++)M[D].shape.contains(R.x,R.y)&&(l=!1)}if(l)return!0}}return l}unload(){var t;this.emit("unload",this);for(const a in this._gpuData)(t=this._gpuData[a])==null||t.destroy();this._gpuData=Object.create(null)}destroy(t=!1){if(this.destroyed)return;if(this.destroyed=!0,this._stateStack.length=0,this._transform=null,this.unload(),this.emit("destroy",this),this.removeAllListeners(),typeof t=="boolean"?t:t==null?void 0:t.texture){const l=typeof t=="boolean"?t:t==null?void 0:t.textureSource;this._fillStyle.texture&&(this._fillStyle.fill&&"uid"in this._fillStyle.fill?this._fillStyle.fill.destroy():this._fillStyle.texture.destroy(l)),this._strokeStyle.texture&&(this._strokeStyle.fill&&"uid"in this._strokeStyle.fill?this._strokeStyle.fill.destroy():this._strokeStyle.texture.destroy(l))}this._fillStyle=null,this._strokeStyle=null,this.instructions=null,this._activePath=null,this._bounds=null,this._stateStack=null,this.customShader=null,this._transform=null}};rg.defaultFillStyle={color:16777215,alpha:1,texture:ze.WHITE,matrix:null,fill:null,textureSpace:"local"};rg.defaultStrokeStyle={width:1,color:16777215,alpha:1,alignment:.5,miterLimit:10,cap:"butt",join:"miter",texture:ze.WHITE,matrix:null,fill:null,textureSpace:"local",pixelLine:!1};let Cl=rg;class OC{constructor(){this.isBatchable=!1}reset(){this.isBatchable=!1,this.context=null,this.graphicsData&&(this.graphicsData.destroy(),this.graphicsData=null)}destroy(){this.reset()}}class NC{constructor(){this.instructions=new Jy}init(){this.instructions.reset()}destroy(){this.instructions.destroy(),this.instructions=null}}const ug=class wy{constructor(t){this._renderer=t,this._managedContexts=new fd({renderer:t,type:"resource",name:"graphicsContext"})}init(t){wy.defaultOptions.bezierSmoothness=(t==null?void 0:t.bezierSmoothness)??wy.defaultOptions.bezierSmoothness}getContextRenderData(t){return this.getGpuContext(t).graphicsData||this._initContextRenderData(t)}updateGpuContext(t){const a=t._gpuData,l=!!a[this._renderer.uid],o=a[this._renderer.uid]||this._initContext(t);return(t.dirty||!l)&&(l&&o.reset(),o.isBatchable=!1,t.dirty=!1),o}getGpuContext(t){return t._gpuData[this._renderer.uid]||this._initContext(t)}_initContextRenderData(t){const a=new NC,l=this.getGpuContext(t);return l.graphicsData=a,a.init(),a}_initContext(t){const a=new OC;return a.context=t,t._gpuData[this._renderer.uid]=a,this._managedContexts.add(t),a}destroy(){this._managedContexts.destroy(),this._renderer=null}};ug.extension={type:[Pt.CanvasSystem],name:"graphicsContext"};ug.defaultOptions={bezierSmoothness:.5};let wC=ug;class e2{constructor(t,a){this.state=Iy.for2d(),this.renderer=t,this._adaptor=a,this.renderer.runners.contextChange.add(this),this._managedGraphics=new fd({renderer:t,type:"renderable",priority:-1,name:"graphics"})}contextChange(){this._adaptor.contextChange(this.renderer)}validateRenderable(t){return!1}addRenderable(t,a){this._managedGraphics.add(t),this.renderer.renderPipes.batch.break(a),a.add(t)}updateRenderable(t){}execute(t){t.isRenderable&&this._adaptor.execute(this,t)}destroy(){this._managedGraphics.destroy(),this.renderer=null,this._adaptor.destroy(),this._adaptor=null}}e2.extension={type:[Pt.CanvasPipes],name:"graphics"};function BC(n,t,a){const l=(n>>24&255)/255;t[a++]=(n&255)/255*l,t[a++]=(n>>8&255)/255*l,t[a++]=(n>>16&255)/255*l,t[a++]=l}class UC{constructor(){this.batches=[],this.batched=!1}destroy(){this.batches.forEach(t=>{ti.return(t)}),this.batches.length=0}}class n2{constructor(t,a){this.state=Iy.for2d(),this.renderer=t,this._adaptor=a,this.renderer.runners.contextChange.add(this),this._managedGraphics=new fd({renderer:t,type:"renderable",priority:-1,name:"graphics"})}contextChange(){this._adaptor.contextChange(this.renderer)}validateRenderable(t){const a=t.context,l=!!t._gpuData,c=this.renderer.graphicsContext.updateGpuContext(a);return!!(c.isBatchable||l!==c.isBatchable)}addRenderable(t,a){const o=this.renderer.graphicsContext.updateGpuContext(t.context);t.didViewUpdate&&this._rebuild(t),o.isBatchable?this._addToBatcher(t,a):(this.renderer.renderPipes.batch.break(a),a.add(t))}updateRenderable(t){const l=this._getGpuDataForRenderable(t).batches;for(let o=0;o<l.length;o++){const c=l[o];c._batcher.updateElement(c)}}execute(t){if(!t.isRenderable)return;const a=this.renderer,l=t.context;if(!a.graphicsContext.getGpuContext(l).batches.length)return;const c=l.customShader||this._adaptor.shader;this.state.blendMode=t.groupBlendMode;const d=c.resources.localUniforms.uniforms;d.uTransformMatrix=t.groupTransform,d.uRound=a._roundPixels|t._roundPixels,BC(t.groupColorAlpha,d.uColor,0),this._adaptor.execute(this,t)}_rebuild(t){const a=this._getGpuDataForRenderable(t),o=this.renderer.graphicsContext.updateGpuContext(t.context);a.destroy(),o.isBatchable&&this._updateBatchesForRenderable(t,a)}_addToBatcher(t,a){const l=this.renderer.renderPipes.batch,o=this._getGpuDataForRenderable(t).batches;for(let c=0;c<o.length;c++){const d=o[c];l.addToBatch(d,a)}}_getGpuDataForRenderable(t){return t._gpuData[this.renderer.uid]||this._initGpuDataForRenderable(t)}_initGpuDataForRenderable(t){const a=new UC;return t._gpuData[this.renderer.uid]=a,this._managedGraphics.add(t),a}_updateBatchesForRenderable(t,a){const l=t.context,c=this.renderer.graphicsContext.getGpuContext(l),d=this.renderer._roundPixels|t._roundPixels;a.batches=c.batches.map(m=>{const p=ti.get(ag);return m.copyTo(p),p.renderable=t,p.roundPixels=d,p})}destroy(){this._managedGraphics.destroy(),this.renderer=null,this._adaptor.destroy(),this._adaptor=null,this.state=null}}n2.extension={type:[Pt.WebGLPipes,Pt.WebGPUPipes],name:"graphics"};Ie.add(e2);Ie.add(n2);Ie.add(wC);Ie.add(sg);class $a extends Wy{constructor(t){t instanceof Cl&&(t={context:t});const{context:a,roundPixels:l,...o}=t||{};super({label:"Graphics",...o}),this.renderPipeId="graphics",a?this.context=a:(this.context=this._ownedContext=new Cl,this.context.autoGarbageCollect=this.autoGarbageCollect),this.didViewUpdate=!0,this.allowChildren=!1,this.roundPixels=l??!1}set context(t){t!==this._context&&(this._context&&(this._context.off("update",this.onViewUpdate,this),this._context.off("unload",this.unload,this)),this._context=t,this._context.on("update",this.onViewUpdate,this),this._context.on("unload",this.unload,this),this.onViewUpdate())}get context(){return this._context}get bounds(){return this._context.bounds}updateBounds(){}containsPoint(t){return this._context.containsPoint(t)}destroy(t){this._ownedContext&&!t?this._ownedContext.destroy(t):(t===!0||(t==null?void 0:t.context)===!0)&&this._context.destroy(t),this._ownedContext=null,this._context=null,super.destroy(t)}_onTouch(t){this._gcLastUsed=t,this._context._gcLastUsed=t}_callContextMethod(t,a){return this.context[t](...a),this}setFillStyle(...t){return this._callContextMethod("setFillStyle",t)}setStrokeStyle(...t){return this._callContextMethod("setStrokeStyle",t)}fill(...t){return this._callContextMethod("fill",t)}stroke(...t){return this._callContextMethod("stroke",t)}texture(...t){return this._callContextMethod("texture",t)}beginPath(){return this._callContextMethod("beginPath",[])}cut(){return this._callContextMethod("cut",[])}arc(...t){return this._callContextMethod("arc",t)}arcTo(...t){return this._callContextMethod("arcTo",t)}arcToSvg(...t){return this._callContextMethod("arcToSvg",t)}bezierCurveTo(...t){return this._callContextMethod("bezierCurveTo",t)}closePath(){return this._callContextMethod("closePath",[])}ellipse(...t){return this._callContextMethod("ellipse",t)}circle(...t){return this._callContextMethod("circle",t)}path(...t){return this._callContextMethod("path",t)}lineTo(...t){return this._callContextMethod("lineTo",t)}moveTo(...t){return this._callContextMethod("moveTo",t)}quadraticCurveTo(...t){return this._callContextMethod("quadraticCurveTo",t)}rect(...t){return this._callContextMethod("rect",t)}roundRect(...t){return this._callContextMethod("roundRect",t)}poly(...t){return this._callContextMethod("poly",t)}regularPoly(...t){return this._callContextMethod("regularPoly",t)}roundPoly(...t){return this._callContextMethod("roundPoly",t)}roundShape(...t){return this._callContextMethod("roundShape",t)}filletRect(...t){return this._callContextMethod("filletRect",t)}chamferRect(...t){return this._callContextMethod("chamferRect",t)}star(...t){return this._callContextMethod("star",t)}svg(...t){return this._callContextMethod("svg",t)}restore(...t){return this._callContextMethod("restore",t)}save(){return this._callContextMethod("save",[])}getTransform(){return this.context.getTransform()}resetTransform(){return this._callContextMethod("resetTransform",[])}rotateTransform(...t){return this._callContextMethod("rotate",t)}scaleTransform(...t){return this._callContextMethod("scale",t)}setTransform(...t){return this._callContextMethod("setTransform",t)}transform(...t){return this._callContextMethod("transform",t)}translateTransform(...t){return this._callContextMethod("translate",t)}clear(){return this._callContextMethod("clear",[])}get fillStyle(){return this._context.fillStyle}set fillStyle(t){this._context.fillStyle=t}get strokeStyle(){return this._context.strokeStyle}set strokeStyle(t){this._context.strokeStyle=t}clone(t=!1){return t?new $a(this._context.clone()):(this._ownedContext=null,new $a(this._context))}lineStyle(t,a,l){de(un,"Graphics#lineStyle is no longer needed. Use Graphics#setStrokeStyle to set the stroke style.");const o={};return t&&(o.width=t),a&&(o.color=a),l&&(o.alpha=l),this.context.strokeStyle=o,this}beginFill(t,a){de(un,"Graphics#beginFill is no longer needed. Use Graphics#fill to fill the shape with the desired style.");const l={};return t!==void 0&&(l.color=t),a!==void 0&&(l.alpha=a),this.context.fillStyle=l,this}endFill(){de(un,"Graphics#endFill is no longer needed. Use Graphics#fill to fill the shape with the desired style."),this.context.fill();const t=this.context.strokeStyle;return(t.width!==Cl.defaultStrokeStyle.width||t.color!==Cl.defaultStrokeStyle.color||t.alpha!==Cl.defaultStrokeStyle.alpha)&&this.context.stroke(),this}drawCircle(...t){return de(un,"Graphics#drawCircle has been renamed to Graphics#circle"),this._callContextMethod("circle",t)}drawEllipse(...t){return de(un,"Graphics#drawEllipse has been renamed to Graphics#ellipse"),this._callContextMethod("ellipse",t)}drawPolygon(...t){return de(un,"Graphics#drawPolygon has been renamed to Graphics#poly"),this._callContextMethod("poly",t)}drawRect(...t){return de(un,"Graphics#drawRect has been renamed to Graphics#rect"),this._callContextMethod("rect",t)}drawRoundedRect(...t){return de(un,"Graphics#drawRoundedRect has been renamed to Graphics#roundRect"),this._callContextMethod("roundRect",t)}drawStar(...t){return de(un,"Graphics#drawStar has been renamed to Graphics#star"),this._callContextMethod("star",t)}}class HC extends Wy{constructor(t,a){const{text:l,resolution:o,style:c,anchor:d,width:m,height:p,roundPixels:v,..._}=t;super({..._}),this.batched=!0,this._resolution=null,this._autoResolution=!0,this._didTextUpdate=!0,this._styleClass=a,this.text=l??"",this.style=c,this.resolution=o??null,this.allowChildren=!1,this._anchor=new Pn({_onUpdate:()=>{this.onViewUpdate()}}),d&&(this.anchor=d),this.roundPixels=v??!1,m!==void 0&&(this.width=m),p!==void 0&&(this.height=p)}get anchor(){return this._anchor}set anchor(t){typeof t=="number"?this._anchor.set(t):this._anchor.copyFrom(t)}set text(t){t=t.toString(),this._text!==t&&(this._text=t,this.onViewUpdate())}get text(){return this._text}set resolution(t){this._autoResolution=t===null,this._resolution=t,this.onViewUpdate()}get resolution(){return this._resolution}get style(){return this._style}set style(t){var a;t||(t={}),(a=this._style)==null||a.off("update",this.onViewUpdate,this),t instanceof this._styleClass?this._style=t:this._style=new this._styleClass(t),this._style.on("update",this.onViewUpdate,this),this.onViewUpdate()}get width(){return Math.abs(this.scale.x)*this.bounds.width}set width(t){this._setWidth(t,this.bounds.width)}get height(){return Math.abs(this.scale.y)*this.bounds.height}set height(t){this._setHeight(t,this.bounds.height)}getSize(t){return t||(t={}),t.width=Math.abs(this.scale.x)*this.bounds.width,t.height=Math.abs(this.scale.y)*this.bounds.height,t}setSize(t,a){typeof t=="object"?(a=t.height??t.width,t=t.width):a??(a=t),t!==void 0&&this._setWidth(t,this.bounds.width),a!==void 0&&this._setHeight(a,this.bounds.height)}containsPoint(t){const a=this.bounds.width,l=this.bounds.height,o=-a*this.anchor.x;let c=0;return t.x>=o&&t.x<=o+a&&(c=-l*this.anchor.y,t.y>=c&&t.y<=c+l)}onViewUpdate(){this.didViewUpdate||(this._didTextUpdate=!0),super.onViewUpdate()}destroy(t=!1){super.destroy(t),this.owner=null,this._bounds=null,this._anchor=null,(typeof t=="boolean"?t:t!=null&&t.style)&&this._style.destroy(t),this._style=null,this._text=null}get styleKey(){return`${this._text}:${this._style.styleKey}:${this._resolution}`}}function GC(n,t){let a=n[0]??{};return(typeof a=="string"||n[1])&&(de(un,`use new ${t}({ text: "hi!", style }) instead`),a={text:a,style:n[1]}),a}class jC{constructor(t){this._canvasPool=Object.create(null),this.canvasOptions=t||{},this.enableFullScreen=!1}_createCanvasAndContext(t,a){const l=vi.get().createCanvas();l.width=t,l.height=a;const o=l.getContext("2d");return{canvas:l,context:o}}getOptimalCanvasAndContext(t,a,l=1){t=Math.ceil(t*l-1e-6),a=Math.ceil(a*l-1e-6),t=kc(t),a=kc(a);const o=(t<<17)+(a<<1);this._canvasPool[o]||(this._canvasPool[o]=[]);let c=this._canvasPool[o].pop();return c||(c=this._createCanvasAndContext(t,a)),c}returnCanvasAndContext(t){const a=t.canvas,{width:l,height:o}=a,c=(l<<17)+(o<<1);t.context.resetTransform(),t.context.clearRect(0,0,l,o),this._canvasPool[c].push(t)}clear(){this._canvasPool={}}}const By=new jC;od.register(By);let ao=null,$s=null;function YC(n,t){ao||(ao=vi.get().createCanvas(256,128),$s=ao.getContext("2d",{willReadFrequently:!0}),$s.globalCompositeOperation="copy",$s.globalAlpha=1),(ao.width<n||ao.height<t)&&(ao.width=kc(n),ao.height=kc(t))}function Yv(n,t,a){for(let l=0,o=4*a*t;l<t;++l,o+=4)if(n[o+3]!==0)return!1;return!0}function qv(n,t,a,l,o){const c=4*t;for(let d=l,m=l*c+4*a;d<=o;++d,m+=c)if(n[m+3]!==0)return!1;return!0}function qC(...n){let t=n[0];t.canvas||(t={canvas:n[0],resolution:n[1]});const{canvas:a}=t,l=Math.min(t.resolution??1,1),o=t.width??a.width,c=t.height??a.height;let d=t.output;if(YC(o,c),!$s)throw new TypeError("Failed to get canvas 2D context");$s.drawImage(a,0,0,o,c,0,0,o*l,c*l);const p=$s.getImageData(0,0,o,c).data;let v=0,_=0,b=o-1,E=c-1;for(;_<c&&Yv(p,o,_);)++_;if(_===c)return mn.EMPTY;for(;Yv(p,o,E);)--E;for(;qv(p,o,v,_,E);)++v;for(;qv(p,o,b,_,E);)--b;return++b,++E,$s.globalCompositeOperation="source-over",$s.strokeRect(v,_,b-v,E-_),$s.globalCompositeOperation="copy",d??(d=new mn),d.set(v/l,_/l,(b-v)/l,(E-_)/l),d}/**
299
+ * tiny-lru
300
+ *
301
+ * @copyright 2026 Jason Mulligan <jason.mulligan@avoidwork.com>
302
+ * @license BSD-3-Clause
303
+ * @version 11.4.7
304
+ */class LC{constructor(t=0,a=0,l=!1){this.first=null,this.items=Object.create(null),this.last=null,this.max=t,this.resetTtl=l,this.size=0,this.ttl=a}clear(){return this.first=null,this.items=Object.create(null),this.last=null,this.size=0,this}delete(t){if(this.has(t)){const a=this.items[t];delete this.items[t],this.size--,a.prev!==null&&(a.prev.next=a.next),a.next!==null&&(a.next.prev=a.prev),this.first===a&&(this.first=a.next),this.last===a&&(this.last=a.prev)}return this}entries(t=this.keys()){const a=new Array(t.length);for(let l=0;l<t.length;l++){const o=t[l];a[l]=[o,this.get(o)]}return a}evict(t=!1){if(t||this.size>0){const a=this.first;delete this.items[a.key],--this.size===0?(this.first=null,this.last=null):(this.first=a.next,this.first.prev=null)}return this}expiresAt(t){let a;return this.has(t)&&(a=this.items[t].expiry),a}get(t){const a=this.items[t];if(a!==void 0){if(this.ttl>0&&a.expiry<=Date.now()){this.delete(t);return}return this.moveToEnd(a),a.value}}has(t){return t in this.items}moveToEnd(t){this.last!==t&&(t.prev!==null&&(t.prev.next=t.next),t.next!==null&&(t.next.prev=t.prev),this.first===t&&(this.first=t.next),t.prev=this.last,t.next=null,this.last!==null&&(this.last.next=t),this.last=t,this.first===null&&(this.first=t))}keys(){const t=new Array(this.size);let a=this.first,l=0;for(;a!==null;)t[l++]=a.key,a=a.next;return t}setWithEvicted(t,a,l=this.resetTtl){let o=null;if(this.has(t))this.set(t,a,!0,l);else{this.max>0&&this.size===this.max&&(o={...this.first},this.evict(!0));let c=this.items[t]={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:a};++this.size===1?this.first=c:this.last.next=c,this.last=c}return o}set(t,a,l=!1,o=this.resetTtl){let c=this.items[t];return l||c!==void 0?(c.value=a,l===!1&&o&&(c.expiry=this.ttl>0?Date.now()+this.ttl:this.ttl),this.moveToEnd(c)):(this.max>0&&this.size===this.max&&this.evict(!0),c=this.items[t]={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:a},++this.size===1?this.first=c:this.last.next=c,this.last=c),this}values(t=this.keys()){const a=new Array(t.length);for(let l=0;l<t.length;l++)a[l]=this.get(t[l]);return a}}function XC(n=1e3,t=0,a=!1){if(isNaN(n)||n<0)throw new TypeError("Invalid max value");if(isNaN(t)||t<0)throw new TypeError("Invalid ttl value");if(typeof a!="boolean")throw new TypeError("Invalid resetTtl value");return new LC(n,t,a)}function a2(n){return!!n.tagStyles&&Object.keys(n.tagStyles).length>0}function i2(n){return n.includes("<")}function VC(n,t){return n.clone().assign(t)}function QC(n,t){const a=[],l=t.tagStyles;if(!a2(t)||!i2(n))return a.push({text:n,style:t}),a;const o=[t],c=[];let d="",m=0;for(;m<n.length;){const p=n[m];if(p==="<"){const v=n.indexOf(">",m);if(v===-1){d+=p,m++;continue}const _=n.slice(m+1,v);if(_.startsWith("/")){const b=_.slice(1).trim();if(c.length>0&&c[c.length-1]===b){d.length>0&&(a.push({text:d,style:o[o.length-1]}),d=""),o.pop(),c.pop(),m=v+1;continue}else{d+=n.slice(m,v+1),m=v+1;continue}}else{const b=_.trim();if(l[b]){d.length>0&&(a.push({text:d,style:o[o.length-1]}),d="");const E=o[o.length-1],C=VC(E,l[b]);o.push(C),c.push(b),m=v+1;continue}else{d+=n.slice(m,v+1),m=v+1;continue}}}else d+=p,m++}return d.length>0&&a.push({text:d,style:o[o.length-1]}),a}const kC=[10,13],KC=new Set(kC),ZC=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288],JC=new Set(ZC),WC=[9,32];new Set(WC);const PC=[45,8208,8211,8212,173],FC=new Set(PC),IC=/(\r\n|\r|\n)/,$C=/(?:\r\n|\r|\n)/;function Sp(n){return typeof n!="string"?!1:KC.has(n.charCodeAt(0))}function Ji(n,t){return typeof n!="string"?!1:JC.has(n.charCodeAt(0))}function tA(n){return typeof n!="string"?!1:FC.has(n.charCodeAt(0))}function l2(n){return n==="normal"||n==="pre-line"}function s2(n){return n==="normal"}function Is(n){if(typeof n!="string")return"";let t=n.length-1;for(;t>=0&&Ji(n[t]);)t--;return t<n.length-1?n.slice(0,t+1):n}function r2(n){const t=[],a=[];if(typeof n!="string")return t;for(let l=0;l<n.length;l++){const o=n[l],c=n[l+1];if(Ji(o)||Sp(o)){a.length>0&&(t.push(a.join("")),a.length=0),o==="\r"&&c===`
305
+ `?(t.push(`\r
306
+ `),l++):t.push(o);continue}a.push(o),tA(o)&&c&&!Ji(c)&&!Sp(c)&&(t.push(a.join("")),a.length=0)}return a.length>0&&t.push(a.join("")),t}function u2(n,t,a,l){const o=a(n),c=[];for(let d=0;d<o.length;d++){let m=o[d],p=m,v=1;for(;o[d+v];){const _=o[d+v];if(!l(p,_,n,d,t))m+=_,p=_,v++;else break}d+=v-1,c.push(m)}return c}const eA=/\r\n|\r|\n/g;function nA(n,t,a,l,o,c,d,m){var Ct,H;const p=QC(n,t);if(s2(t.whiteSpace))for(let G=0;G<p.length;G++){const at=p[G];p[G]={text:at.text.replace(eA," "),style:at.style}}const _=[];let b=[];for(const G of p){const at=G.text.split(IC);for(let et=0;et<at.length;et++){const mt=at[et];mt===`\r
307
+ `||mt==="\r"||mt===`
308
+ `?(_.push(b),b=[]):mt.length>0&&b.push({text:mt,style:G.style})}}(b.length>0||_.length===0)&&_.push(b);const E=a?aA(_,t,l,o,d,m):_,C=[],R=[],z=[],M=[],D=[];let w=0;const B=t._fontString,U=c(B);U.fontSize===0&&(U.fontSize=t.fontSize,U.ascent=t.fontSize);let k="",Q=!!t.dropShadow,V=((Ct=t._stroke)==null?void 0:Ct.width)||0;for(const G of E){let at=0,et=U.ascent,mt=U.descent,j="";for(const ot of G){const vt=ot.style._fontString,Tt=c(vt);vt!==k&&(l.font=vt,k=vt);const Ot=o(ot.text,ot.style.letterSpacing,l);at+=Ot,et=Math.max(et,Tt.ascent),mt=Math.max(mt,Tt.descent),j+=ot.text;const Bt=((H=ot.style._stroke)==null?void 0:H.width)||0;Bt>V&&(V=Bt),!Q&&ot.style.dropShadow&&(Q=!0)}G.length===0&&(et=U.ascent,mt=U.descent),C.push(at),R.push(et),z.push(mt),D.push(j);const I=t.lineHeight||et+mt;M.push(I+t.leading),w=Math.max(w,at)}const ft=V,ut=(a&&t.align!=="left"?Math.max(w,t.wordWrapWidth):w)+ft+(t.dropShadow?t.dropShadow.distance:0);let pt=0;for(let G=0;G<M.length;G++)pt+=M[G];pt=Math.max(pt,M[0]+ft);const gt=pt+(t.dropShadow?t.dropShadow.distance:0),xt=t.lineHeight||U.fontSize;return{width:ut,height:gt,lines:D,lineWidths:C,lineHeight:xt+t.leading,maxLineWidth:w,fontProperties:U,runsByLine:E,lineAscents:R,lineDescents:z,lineHeights:M,hasDropShadow:Q}}function aA(n,t,a,l,o,c){var M;const{letterSpacing:d,whiteSpace:m,wordWrapWidth:p,breakWords:v}=t,_=l2(m),b=p+d,E={};let C="";const R=(D,w)=>{const B=`${D}|${w.styleKey}`;let U=E[B];if(U===void 0){const k=w._fontString;k!==C&&(a.font=k,C=k),U=l(D,w.letterSpacing,a)+w.letterSpacing,E[B]=U}return U},z=[];for(const D of n){const w=iA(D),B=z.length,U=pt=>{let gt=0,xt=pt;do{const{token:Ct,style:H}=w[xt];gt+=R(Ct,H),xt++}while(xt<w.length&&w[xt].continuesFromPrevious);return gt},k=pt=>{const gt=[];let xt=pt;do gt.push({token:w[xt].token,style:w[xt].style}),xt++;while(xt<w.length&&w[xt].continuesFromPrevious);return gt};let Q=[],V=0,ft=!_,lt=null;const st=()=>{lt&&lt.text.length>0&&Q.push(lt),lt=null},ut=()=>{if(st(),Q.length>0){const pt=Q[Q.length-1];pt.text=Is(pt.text),pt.text.length===0&&Q.pop()}z.push(Q),Q=[],V=0,ft=!1};for(let pt=0;pt<w.length;pt++){const{token:gt,style:xt,continuesFromPrevious:Ct}=w[pt],H=R(gt,xt);if(_){const et=Ji(gt),mt=(lt==null?void 0:lt.text[lt.text.length-1])??((M=Q[Q.length-1])==null?void 0:M.text.slice(-1))??"",j=mt?Ji(mt):!1;if(et&&j)continue}const G=!Ct,at=G?U(pt):H;if(at>b&&G)if(V>0&&ut(),v){const et=k(pt);for(let mt=0;mt<et.length;mt++){const j=et[mt].token,I=et[mt].style,ot=u2(j,v,c,o);for(const vt of ot){const Tt=R(vt,I);Tt+V>b&&ut(),!lt||lt.style!==I?(st(),lt={text:vt,style:I}):lt.text+=vt,V+=Tt}}pt+=et.length-1}else{const et=k(pt);st(),z.push(et.map(mt=>({text:mt.token,style:mt.style}))),ft=!1,pt+=et.length-1}else if(at+V>b&&G){if(Ji(gt)){ft=!1;continue}ut(),lt={text:gt,style:xt},V=H}else if(Ct&&!v)!lt||lt.style!==xt?(st(),lt={text:gt,style:xt}):lt.text+=gt,V+=H;else{const et=Ji(gt);if(V===0&&et&&!ft)continue;!lt||lt.style!==xt?(st(),lt={text:gt,style:xt}):lt.text+=gt,V+=H}}if(st(),Q.length>0){const pt=Q[Q.length-1];pt.text=Is(pt.text),pt.text.length===0&&Q.pop()}(Q.length>0||z.length===B)&&z.push(Q)}return z}function iA(n){const t=[];let a=!1;for(const l of n){const o=r2(l.text);let c=!0;for(const d of o){const m=Ji(d)||Sp(d),p=c&&a&&!m;t.push({token:d,style:l.style,continuesFromPrevious:p}),a=!m,c=!1}}return t}const lA={willReadFrequently:!0};function Lv(n,t,a,l,o){let c=a[n];return typeof c!="number"&&(c=o(n,t,l)+t,a[n]=c),c}function sA(n,t,a,l,o,c,d){const m=a.getContext("2d",lA);m.font=t._fontString;let p=0,v="";const _=[],b=Object.create(null),{letterSpacing:E,whiteSpace:C}=t,R=l2(C),z=s2(C);let M=!R;const D=t.wordWrapWidth+E,w=r2(n);for(let U=0;U<w.length;U++){let k=w[U];if(Sp(k)){if(!z){_.push(Is(v)),M=!R,v="",p=0;continue}k=" "}if(R){const V=Ji(k),ft=Ji(v[v.length-1]);if(V&&ft)continue}const Q=Lv(k,E,b,m,l);if(Q>D)if(v!==""&&(_.push(Is(v)),v="",p=0),o(k,t.breakWords)){const V=u2(k,t.breakWords,d,c);for(const ft of V){const lt=Lv(ft,E,b,m,l);lt+p>D&&(_.push(Is(v)),M=!1,v="",p=0),v+=ft,p+=lt}}else v.length>0&&(_.push(Is(v)),v="",p=0),_.push(Is(k)),M=!1,v="",p=0;else Q+p>D&&(M=!1,_.push(Is(v)),v="",p=0),(v.length>0||!Ji(k)||M)&&(v+=k,p+=Q)}const B=Is(v);return B.length>0&&_.push(B),_.join(`
309
+ `)}const Xv={willReadFrequently:!0},lr=class Lt{static get experimentalLetterSpacingSupported(){let t=Lt._experimentalLetterSpacingSupported;if(t===void 0){const a=vi.get().getCanvasRenderingContext2D().prototype;t=Lt._experimentalLetterSpacingSupported="letterSpacing"in a||"textLetterSpacing"in a}return t}constructor(t,a,l,o,c,d,m,p,v,_){this.text=t,this.style=a,this.width=l,this.height=o,this.lines=c,this.lineWidths=d,this.lineHeight=m,this.maxLineWidth=p,this.fontProperties=v,_&&(this.runsByLine=_.runsByLine,this.lineAscents=_.lineAscents,this.lineDescents=_.lineDescents,this.lineHeights=_.lineHeights,this.hasDropShadow=_.hasDropShadow)}static measureText(t=" ",a,l=Lt._canvas,o=a.wordWrap){var k;const c=`${t}-${a.styleKey}-wordWrap-${o}`;if(Lt._measurementCache.has(c))return Lt._measurementCache.get(c);if(a2(a)&&i2(t)){const Q=nA(t,a,o,Lt._context,Lt._measureText,Lt.measureFont,Lt.canBreakChars,Lt.wordWrapSplit),V=new Lt(t,a,Q.width,Q.height,Q.lines,Q.lineWidths,Q.lineHeight,Q.maxLineWidth,Q.fontProperties,{runsByLine:Q.runsByLine,lineAscents:Q.lineAscents,lineDescents:Q.lineDescents,lineHeights:Q.lineHeights,hasDropShadow:Q.hasDropShadow});return Lt._measurementCache.set(c,V),V}const m=a._fontString,p=Lt.measureFont(m);p.fontSize===0&&(p.fontSize=a.fontSize,p.ascent=a.fontSize,p.descent=0);const v=Lt._context;v.font=m;const b=(o?Lt._wordWrap(t,a,l):t).split($C),E=new Array(b.length);let C=0;for(let Q=0;Q<b.length;Q++){const V=Lt._measureText(b[Q],a.letterSpacing,v);E[Q]=V,C=Math.max(C,V)}const R=((k=a._stroke)==null?void 0:k.width)??0,z=a.lineHeight||p.fontSize,M=Lt._getAlignWidth(C,a,o),D=Lt._adjustWidthForStyle(M,a),w=Math.max(z,p.fontSize+R)+(b.length-1)*(z+a.leading),B=Lt._adjustHeightForStyle(w,a),U=new Lt(t,a,D,B,b,E,z+a.leading,C,p);return Lt._measurementCache.set(c,U),U}static _adjustWidthForStyle(t,a){var c;const l=((c=a._stroke)==null?void 0:c.width)||0;let o=t+l;return a.dropShadow&&(o+=a.dropShadow.distance),o}static _adjustHeightForStyle(t,a){let l=t;return a.dropShadow&&(l+=a.dropShadow.distance),l}static _getAlignWidth(t,a,l){return l&&a.align!=="left"?Math.max(t,a.wordWrapWidth):t}static _measureText(t,a,l){let o=!1;Lt.experimentalLetterSpacingSupported&&(Lt.experimentalLetterSpacing?(l.letterSpacing=`${a}px`,l.textLetterSpacing=`${a}px`,o=!0):(l.letterSpacing="0px",l.textLetterSpacing="0px"));const c=l.measureText(t);let d=c.width;const m=-(c.actualBoundingBoxLeft??0);let v=(c.actualBoundingBoxRight??0)-m;if(d>0)if(o)d-=a,v-=a;else{const _=(Lt.graphemeSegmenter(t).length-1)*a;d+=_,v+=_}return Math.max(d,v)}static _wordWrap(t,a,l=Lt._canvas){return sA(t,a,l,Lt._measureText,Lt.canBreakWords,Lt.canBreakChars,Lt.wordWrapSplit)}static isBreakingSpace(t,a){return Ji(t)}static canBreakWords(t,a){return a}static canBreakChars(t,a,l,o,c){return!0}static wordWrapSplit(t){return Lt.graphemeSegmenter(t)}static measureFont(t){if(Lt._fonts[t])return Lt._fonts[t];const a=Lt._context;a.font=t;const l=a.measureText(Lt.METRICS_STRING+Lt.BASELINE_SYMBOL),o=l.actualBoundingBoxAscent??0,c=l.actualBoundingBoxDescent??0,d={ascent:o,descent:c,fontSize:o+c};return Lt._fonts[t]=d,d}static clearMetrics(t=""){t?delete Lt._fonts[t]:Lt._fonts={}}static get _canvas(){if(!Lt.__canvas){let t;try{const a=new OffscreenCanvas(0,0),l=a.getContext("2d",Xv);if(l!=null&&l.measureText)return Lt.__canvas=a,a;t=vi.get().createCanvas()}catch{t=vi.get().createCanvas()}t.width=t.height=10,Lt.__canvas=t}return Lt.__canvas}static get _context(){return Lt.__context||(Lt.__context=Lt._canvas.getContext("2d",Xv)),Lt.__context}};lr.METRICS_STRING="|ÉqÅ";lr.BASELINE_SYMBOL="M";lr.BASELINE_MULTIPLIER=1.4;lr.HEIGHT_MULTIPLIER=2;lr.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const n=new Intl.Segmenter;return t=>{const a=n.segment(t),l=[];let o=0;for(const c of a)l[o++]=c.segment;return l}}return n=>[...n]})();lr.experimentalLetterSpacing=!1;lr._fonts={};lr._measurementCache=XC(1e3);let Ir=lr;const rA=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function Uy(n){const t=typeof n.fontSize=="number"?`${n.fontSize}px`:n.fontSize;let a=n.fontFamily;Array.isArray(n.fontFamily)||(a=n.fontFamily.split(","));for(let l=a.length-1;l>=0;l--){let o=a[l].trim();!/([\"\'])[^\'\"]+\1/.test(o)&&!rA.includes(o)&&(o=`"${o}"`),a[l]=o}return`${n.fontStyle} ${n.fontVariant} ${n.fontWeight} ${t} ${a.join(",")}`}const Vv=1e5;function sp(n,t,a,l=0,o=0,c=0){if(n.texture===ze.WHITE&&!n.fill)return Rn.shared.setValue(n.color).setAlpha(n.alpha??1).toHexa();if(n.fill){if(n.fill instanceof Up){const d=n.fill,m=t.createPattern(d.texture.source.resource,"repeat"),p=d.transform.copyTo(le.shared);return p.scale(d.texture.source.pixelWidth,d.texture.source.pixelHeight),m.setTransform(p),m}else if(n.fill instanceof ir){const d=n.fill,m=d.type==="linear",p=d.textureSpace==="local";let v=1,_=1;p&&a&&(v=a.width+l,_=a.height+l);let b,E=!1;if(m){const{start:C,end:R}=d;b=t.createLinearGradient(C.x*v+o,C.y*_+c,R.x*v+o,R.y*_+c),E=Math.abs(R.x-C.x)<Math.abs((R.y-C.y)*.1)}else{const{center:C,innerRadius:R,outerCenter:z,outerRadius:M}=d;b=t.createRadialGradient(C.x*v+o,C.y*_+c,R*v,z.x*v+o,z.y*_+c,M*v)}if(E&&p&&a){const C=a.lineHeight/_;for(let R=0;R<a.lines.length;R++){const z=(R*a.lineHeight+l/2)/_;d.colorStops.forEach(M=>{let D=z+M.offset*C;D=Math.max(0,Math.min(1,D)),b.addColorStop(Math.floor(D*Vv)/Vv,Rn.shared.setValue(M.color).toHex())})}}else d.colorStops.forEach(C=>{b.addColorStop(C.offset,Rn.shared.setValue(C.color).toHex())});return b}}else{const d=t.createPattern(n.texture.source.resource,"repeat"),m=n.matrix.copyTo(le.shared);return m.scale(n.texture.source.pixelWidth,n.texture.source.pixelHeight),d.setTransform(m),d}return Ga("FillStyle not recognised",n),"red"}const Qv=new mn;function Hc(n){let t=0;for(let a=0;a<n.length;a++)n.charCodeAt(a)===32&&t++;return t}class uA{getCanvasAndContext(t){const{text:a,style:l,resolution:o=1}=t,c=l._getFinalPadding(),d=Ir.measureText(a||" ",l),m=Math.ceil(Math.ceil(Math.max(1,d.width)+c*2)*o),p=Math.ceil(Math.ceil(Math.max(1,d.height)+c*2)*o),v=By.getOptimalCanvasAndContext(m,p);this._renderTextToCanvas(l,c,o,v,d);const _=l.trim?qC({canvas:v.canvas,width:m,height:p,resolution:1,output:Qv}):Qv.set(0,0,m,p);return{canvasAndContext:v,frame:_}}returnCanvasAndContext(t){By.returnCanvasAndContext(t)}_renderTextToCanvas(t,a,l,o,c){var Q,V,ft;if(c.runsByLine&&c.runsByLine.length>0){this._renderTaggedTextToCanvas(c,t,a,l,o);return}const{canvas:d,context:m}=o,p=Uy(t),v=c.lines,_=c.lineHeight,b=c.lineWidths,E=c.maxLineWidth,C=c.fontProperties,R=d.height;if(m.resetTransform(),m.scale(l,l),m.textBaseline=t.textBaseline,(Q=t._stroke)!=null&&Q.width){const lt=t._stroke;m.lineWidth=lt.width,m.miterLimit=lt.miterLimit,m.lineJoin=lt.join,m.lineCap=lt.cap}m.font=p;let z,M;const D=t.dropShadow?2:1,w=t.wordWrap?t.wordWrapWidth:E,U=(((V=t._stroke)==null?void 0:V.width)??0)/2;let k=(_-C.fontSize)/2;_-C.fontSize<0&&(k=0);for(let lt=0;lt<D;++lt){const st=t.dropShadow&&lt===0,ut=st?Math.ceil(Math.max(1,R)+a*2):0,pt=ut*l;if(st)this._setupDropShadow(m,t,l,pt);else{const gt=t._gradientBounds,xt=t._gradientOffset;if(gt){const Ct={width:gt.width,height:gt.height,lineHeight:gt.height,lines:c.lines};this._setFillAndStrokeStyles(m,t,Ct,a,U,(xt==null?void 0:xt.x)??0,(xt==null?void 0:xt.y)??0)}else xt?this._setFillAndStrokeStyles(m,t,c,a,U,xt.x,xt.y):this._setFillAndStrokeStyles(m,t,c,a,U);m.shadowColor="rgba(0,0,0,0)"}for(let gt=0;gt<v.length;gt++){z=U,M=U+gt*_+C.ascent+k,z+=this._getAlignmentOffset(b[gt],w,t.align);let xt=0;if(t.align==="justify"&&t.wordWrap&&gt<v.length-1){const Ct=Hc(v[gt]);Ct>0&&(xt=(w-b[gt])/Ct)}(ft=t._stroke)!=null&&ft.width&&this._drawLetterSpacing(v[gt],t,o,z+a,M+a-ut,!0,xt),t._fill!==void 0&&this._drawLetterSpacing(v[gt],t,o,z+a,M+a-ut,!1,xt)}}}_renderTaggedTextToCanvas(t,a,l,o,c){var U,k,Q;const{canvas:d,context:m}=c,{runsByLine:p,lineWidths:v,maxLineWidth:_,lineAscents:b,lineHeights:E,hasDropShadow:C}=t,R=d.height;m.resetTransform(),m.scale(o,o),m.textBaseline=a.textBaseline;const z=C?2:1,M=a.wordWrap?a.wordWrapWidth:_;let D=((U=a._stroke)==null?void 0:U.width)??0;for(const V of p)for(const ft of V){const lt=((k=ft.style._stroke)==null?void 0:k.width)??0;lt>D&&(D=lt)}const w=D/2,B=[];for(let V=0;V<p.length;V++){const ft=p[V],lt=[];for(const st of ft){const ut=Uy(st.style);m.font=ut,lt.push({width:Ir._measureText(st.text,st.style.letterSpacing,m),font:ut})}B.push(lt)}for(let V=0;V<z;++V){const ft=C&&V===0,lt=ft?Math.ceil(Math.max(1,R)+l*2):0,st=lt*o;ft||(m.shadowColor="rgba(0,0,0,0)");let ut=w;for(let pt=0;pt<p.length;pt++){const gt=p[pt],xt=v[pt],Ct=b[pt],H=E[pt],G=B[pt];let at=w;at+=this._getAlignmentOffset(xt,M,a.align);let et=0;if(a.align==="justify"&&a.wordWrap&&pt<p.length-1){let I=0;for(const ot of gt)I+=Hc(ot.text);I>0&&(et=(M-xt)/I)}const mt=ut+Ct;let j=at+l;for(let I=0;I<gt.length;I++){const ot=gt[I],{width:vt,font:Tt}=G[I];if(m.font=Tt,m.textBaseline=ot.style.textBaseline,(Q=ot.style._stroke)!=null&&Q.width){const Bt=ot.style._stroke;if(m.lineWidth=Bt.width,m.miterLimit=Bt.miterLimit,m.lineJoin=Bt.join,m.lineCap=Bt.cap,ft)if(ot.style.dropShadow)this._setupDropShadow(m,ot.style,o,st);else{const fe=Hc(ot.text);j+=vt+fe*et;continue}else{const fe=Ir.measureFont(Tt),ce=ot.style.lineHeight||fe.fontSize,pa={width:vt,height:ce,lineHeight:ce,lines:[ot.text]};m.strokeStyle=sp(Bt,m,pa,l*2,j-l,ut)}this._drawLetterSpacing(ot.text,ot.style,c,j,mt+l-lt,!0,et)}const Ot=Hc(ot.text);j+=vt+Ot*et}j=at+l;for(let I=0;I<gt.length;I++){const ot=gt[I],{width:vt,font:Tt}=G[I];if(m.font=Tt,m.textBaseline=ot.style.textBaseline,ot.style._fill!==void 0){if(ft)if(ot.style.dropShadow)this._setupDropShadow(m,ot.style,o,st);else{const Bt=Hc(ot.text);j+=vt+Bt*et;continue}else{const Bt=Ir.measureFont(Tt),fe=ot.style.lineHeight||Bt.fontSize,ce={width:vt,height:fe,lineHeight:fe,lines:[ot.text]};m.fillStyle=sp(ot.style._fill,m,ce,l*2,j-l,ut)}this._drawLetterSpacing(ot.text,ot.style,c,j,mt+l-lt,!1,et)}const Ot=Hc(ot.text);j+=vt+Ot*et}ut+=H}}}_setFillAndStrokeStyles(t,a,l,o,c,d=0,m=0){var p;if(t.fillStyle=a._fill?sp(a._fill,t,l,o*2,d,m):null,(p=a._stroke)!=null&&p.width){const v=c+o*2;t.strokeStyle=sp(a._stroke,t,l,v,d,m)}}_setupDropShadow(t,a,l,o){t.fillStyle="black",t.strokeStyle="black";const c=a.dropShadow,d=c.color,m=c.alpha;t.shadowColor=Rn.shared.setValue(d).setAlpha(m).toRgbaString();const p=c.blur*l,v=c.distance*l;t.shadowBlur=p,t.shadowOffsetX=Math.cos(c.angle)*v,t.shadowOffsetY=Math.sin(c.angle)*v+o}_getAlignmentOffset(t,a,l){return l==="right"?a-t:l==="center"?(a-t)/2:0}_drawLetterSpacing(t,a,l,o,c,d=!1,m=0){const{context:p}=l,v=a.letterSpacing;let _=!1;if(Ir.experimentalLetterSpacingSupported&&(Ir.experimentalLetterSpacing?(p.letterSpacing=`${v}px`,p.textLetterSpacing=`${v}px`,_=!0):(p.letterSpacing="0px",p.textLetterSpacing="0px")),(v===0||_)&&m===0){d?p.strokeText(t,o,c):p.fillText(t,o,c);return}if(m!==0&&(v===0||_)){const z=t.split(" ");let M=o;const D=p.measureText(" ").width;for(let w=0;w<z.length;w++)d?p.strokeText(z[w],M,c):p.fillText(z[w],M,c),M+=p.measureText(z[w]).width+D+m;return}let b=o;const E=Ir.graphemeSegmenter(t);let C=p.measureText(t).width,R=0;for(let z=0;z<E.length;++z){const M=E[z];d?p.strokeText(M,b,c):p.fillText(M,b,c);let D="";for(let w=z+1;w<E.length;++w)D+=E[w];R=p.measureText(D).width,b+=C-R+v,M===" "&&(b+=m),C=R}}}const Vc=new uA,og=class oo extends ps{constructor(t={}){super(),this.uid=on("textStyle"),this._tick=0,this._cachedFontString=null,oA(t),t instanceof oo&&(t=t._toObject());const o={...oo.defaultTextStyle,...t};for(const c in o){const d=c;this[d]=o[c]}this._tagStyles=t.tagStyles??void 0,this.update(),this._tick=0}get align(){return this._align}set align(t){this._align!==t&&(this._align=t,this.update())}get breakWords(){return this._breakWords}set breakWords(t){this._breakWords!==t&&(this._breakWords=t,this.update())}get dropShadow(){return this._dropShadow}set dropShadow(t){this._dropShadow!==t&&(t!==null&&typeof t=="object"?this._dropShadow=this._createProxy({...oo.defaultDropShadow,...t}):this._dropShadow=t?this._createProxy({...oo.defaultDropShadow}):null,this.update())}get fontFamily(){return this._fontFamily}set fontFamily(t){this._fontFamily!==t&&(this._fontFamily=t,this.update())}get fontSize(){return this._fontSize}set fontSize(t){this._fontSize!==t&&(typeof t=="string"?this._fontSize=parseInt(t,10):this._fontSize=t,this.update())}get fontStyle(){return this._fontStyle}set fontStyle(t){this._fontStyle!==t&&(this._fontStyle=t.toLowerCase(),this.update())}get fontVariant(){return this._fontVariant}set fontVariant(t){this._fontVariant!==t&&(this._fontVariant=t,this.update())}get fontWeight(){return this._fontWeight}set fontWeight(t){this._fontWeight!==t&&(this._fontWeight=t,this.update())}get leading(){return this._leading}set leading(t){this._leading!==t&&(this._leading=t,this.update())}get letterSpacing(){return this._letterSpacing}set letterSpacing(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.update())}get lineHeight(){return this._lineHeight}set lineHeight(t){this._lineHeight!==t&&(this._lineHeight=t,this.update())}get padding(){return this._padding}set padding(t){this._padding!==t&&(this._padding=t,this.update())}get filters(){return this._filters}set filters(t){this._filters!==t&&(this._filters=Object.freeze(t),this.update())}get trim(){return this._trim}set trim(t){this._trim!==t&&(this._trim=t,this.update())}get textBaseline(){return this._textBaseline}set textBaseline(t){this._textBaseline!==t&&(this._textBaseline=t,this.update())}get whiteSpace(){return this._whiteSpace}set whiteSpace(t){this._whiteSpace!==t&&(this._whiteSpace=t,this.update())}get wordWrap(){return this._wordWrap}set wordWrap(t){this._wordWrap!==t&&(this._wordWrap=t,this.update())}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.update())}get fill(){return this._originalFill}set fill(t){t!==this._originalFill&&(this._originalFill=t,this._isFillStyle(t)&&(this._originalFill=this._createProxy({...Cl.defaultFillStyle,...t},()=>{this._fill=fo({...this._originalFill},Cl.defaultFillStyle)})),this._fill=fo(t===0?"black":t,Cl.defaultFillStyle),this.update())}get stroke(){return this._originalStroke}set stroke(t){t!==this._originalStroke&&(this._originalStroke=t,this._isFillStyle(t)&&(this._originalStroke=this._createProxy({...Cl.defaultStrokeStyle,...t},()=>{this._stroke=_p({...this._originalStroke},Cl.defaultStrokeStyle)})),this._stroke=_p(t,Cl.defaultStrokeStyle),this.update())}get tagStyles(){return this._tagStyles}set tagStyles(t){this._tagStyles!==t&&(this._tagStyles=t??void 0,this.update())}update(){this._tick++,this._cachedFontString=null,this.emit("update",this)}reset(){const t=oo.defaultTextStyle;for(const a in t)this[a]=t[a]}assign(t){for(const a in t){const l=a;this[l]=t[a]}return this}get styleKey(){return`${this.uid}-${this._tick}`}get _fontString(){return this._cachedFontString===null&&(this._cachedFontString=Uy(this)),this._cachedFontString}_toObject(){return{align:this.align,breakWords:this.breakWords,dropShadow:this._dropShadow?{...this._dropShadow}:null,fill:this._fill?{...this._fill}:void 0,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontVariant:this.fontVariant,fontWeight:this.fontWeight,leading:this.leading,letterSpacing:this.letterSpacing,lineHeight:this.lineHeight,padding:this.padding,stroke:this._stroke?{...this._stroke}:void 0,textBaseline:this.textBaseline,trim:this.trim,whiteSpace:this.whiteSpace,wordWrap:this.wordWrap,wordWrapWidth:this.wordWrapWidth,filters:this._filters?[...this._filters]:void 0,tagStyles:this._tagStyles?{...this._tagStyles}:void 0}}clone(){return new oo(this._toObject())}_getFinalPadding(){let t=0;if(this._filters)for(let a=0;a<this._filters.length;a++)t+=this._filters[a].padding;return Math.max(this._padding,t)}destroy(t=!1){var l,o,c,d;if(this.removeAllListeners(),typeof t=="boolean"?t:t==null?void 0:t.texture){const m=typeof t=="boolean"?t:t==null?void 0:t.textureSource;(l=this._fill)!=null&&l.texture&&this._fill.texture.destroy(m),(o=this._originalFill)!=null&&o.texture&&this._originalFill.texture.destroy(m),(c=this._stroke)!=null&&c.texture&&this._stroke.texture.destroy(m),(d=this._originalStroke)!=null&&d.texture&&this._originalStroke.texture.destroy(m)}this._fill=null,this._stroke=null,this.dropShadow=null,this._originalStroke=null,this._originalFill=null}_createProxy(t,a){return new Proxy(t,{set:(l,o,c)=>(l[o]===c||(l[o]=c,a==null||a(o,c),this.update()),!0)})}_isFillStyle(t){return(t??null)!==null&&!(Rn.isColorLike(t)||t instanceof ir||t instanceof Up)}};og.defaultDropShadow={alpha:1,angle:Math.PI/6,blur:0,color:"black",distance:5};og.defaultTextStyle={align:"left",breakWords:!1,dropShadow:null,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,padding:0,stroke:null,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};let po=og;function oA(n){const t=n;if(typeof t.dropShadow=="boolean"&&t.dropShadow){const a=po.defaultDropShadow;n.dropShadow={alpha:t.dropShadowAlpha??a.alpha,angle:t.dropShadowAngle??a.angle,blur:t.dropShadowBlur??a.blur,color:t.dropShadowColor??a.color,distance:t.dropShadowDistance??a.distance}}if(t.strokeThickness!==void 0){de(un,"strokeThickness is now a part of stroke");const a=t.stroke;let l={};if(Rn.isColorLike(a))l.color=a;else if(a instanceof ir||a instanceof Up)l.fill=a;else if(Object.hasOwnProperty.call(a,"color")||Object.hasOwnProperty.call(a,"fill"))l=a;else throw new Error("Invalid stroke value.");n.stroke={...l,width:t.strokeThickness}}if(Array.isArray(t.fillGradientStops)){if(de(un,"gradient fill is now a fill pattern: `new FillGradient(...)`"),!Array.isArray(t.fill)||t.fill.length===0)throw new Error("Invalid fill value. Expected an array of colors for gradient fill.");t.fill.length!==t.fillGradientStops.length&&Ga("The number of fill colors must match the number of fill gradient stops.");const a=new ir({start:{x:0,y:0},end:{x:0,y:1},textureSpace:"local"}),l=t.fillGradientStops.slice(),o=t.fill.map(c=>Rn.shared.setValue(c).toNumber());l.forEach((c,d)=>{a.addColorStop(c,o[d])}),n.fill={fill:a}}}function cA(n,t){const{texture:a,bounds:l}=n,o=t._style._getFinalPadding();Jx(l,t._anchor,a);const c=t._anchor._x*o*2,d=t._anchor._y*o*2;l.minX-=o-c,l.minY-=o-d,l.maxX-=o-c,l.maxY-=o-d}class fA{constructor(){this.batcherName="default",this.topology="triangle-list",this.attributeSize=4,this.indexSize=6,this.packAsQuad=!0,this.roundPixels=0,this._attributeStart=0,this._batcher=null,this._batch=null}get blendMode(){return this.renderable.groupBlendMode}get color(){return this.renderable.groupColorAlpha}reset(){this.renderable=null,this.texture=null,this._batcher=null,this._batch=null,this.bounds=null}destroy(){this.reset()}}class hA extends fA{}class o2{constructor(t){this._renderer=t,t.runners.resolutionChange.add(this),this._managedTexts=new fd({renderer:t,type:"renderable",onUnload:this.onTextUnload.bind(this),name:"canvasText"})}resolutionChange(){for(const t in this._managedTexts.items){const a=this._managedTexts.items[t];a!=null&&a._autoResolution&&a.onViewUpdate()}}validateRenderable(t){const a=this._getGpuText(t),l=t.styleKey;return a.currentKey!==l?!0:t._didTextUpdate}addRenderable(t,a){const l=this._getGpuText(t);if(t._didTextUpdate){const o=t._autoResolution?this._renderer.resolution:t.resolution;(l.currentKey!==t.styleKey||t._resolution!==o)&&this._updateGpuText(t),t._didTextUpdate=!1,cA(l,t)}this._renderer.renderPipes.batch.addToBatch(l,a)}updateRenderable(t){const a=this._getGpuText(t);a._batcher.updateElement(a)}_updateGpuText(t){const a=this._getGpuText(t);a.texture&&this._renderer.canvasText.decreaseReferenceCount(a.currentKey),t._resolution=t._autoResolution?this._renderer.resolution:t.resolution,a.texture=this._renderer.canvasText.getManagedTexture(t),a.currentKey=t.styleKey}_getGpuText(t){return t._gpuData[this._renderer.uid]||this.initGpuText(t)}initGpuText(t){const a=new hA;return a.currentKey="--",a.renderable=t,a.transform=t.groupTransform,a.bounds={minX:0,maxX:1,minY:0,maxY:0},a.roundPixels=this._renderer._roundPixels|t._roundPixels,t._gpuData[this._renderer.uid]=a,this._managedTexts.add(t),a}onTextUnload(t){const a=t._gpuData[this._renderer.uid];if(!a)return;const{canvasText:l}=this._renderer;l.getReferenceCount(a.currentKey)>0?l.decreaseReferenceCount(a.currentKey):a.texture&&l.returnTexture(a.texture)}destroy(){this._managedTexts.destroy(),this._renderer=null}}o2.extension={type:[Pt.WebGLPipes,Pt.WebGPUPipes,Pt.CanvasPipes],name:"text"};const dA=new Wi;function mA(n,t,a,l,o=!1){const c=dA;c.minX=0,c.minY=0,c.maxX=n.width/l|0,c.maxY=n.height/l|0;const d=Op.getOptimalTexture(c.width,c.height,l,!1,o);return d.source.uploadMethodId="image",d.source.resource=n,d.source.alphaMode="premultiply-alpha-on-upload",d.frame.width=t/l,d.frame.height=a/l,d.source.emit("update",d.source),d.updateUvs(),d}class c2{constructor(t,a){this._activeTextures={},this._renderer=t,this._retainCanvasContext=a}getTexture(t,a,l,o){typeof t=="string"&&(de("8.0.0","CanvasTextSystem.getTexture: Use object TextOptions instead of separate arguments"),t={text:t,style:l,resolution:a}),t.style instanceof po||(t.style=new po(t.style)),t.textureStyle instanceof Kc||(t.textureStyle=new Kc(t.textureStyle)),typeof t.text!="string"&&(t.text=t.text.toString());const{text:c,style:d,textureStyle:m,autoGenerateMipmaps:p}=t,v=t.resolution??this._renderer.resolution,{frame:_,canvasAndContext:b}=Vc.getCanvasAndContext({text:c,style:d,resolution:v}),E=mA(b.canvas,_.width,_.height,v,p);if(m&&(E.source.style=m),d.trim&&(_.pad(d.padding),E.frame.copyFrom(_),E.frame.scale(1/v),E.updateUvs()),d.filters){const C=this._applyFilters(E,d.filters);return this.returnTexture(E),Vc.returnCanvasAndContext(b),C}return this._renderer.texture.initSource(E._source),this._retainCanvasContext||Vc.returnCanvasAndContext(b),E}returnTexture(t){const a=t.source,l=a.resource;if(this._retainCanvasContext&&(l!=null&&l.getContext)){const o=l.getContext("2d");o&&Vc.returnCanvasAndContext({canvas:l,context:o})}a.resource=null,a.uploadMethodId="unknown",a.alphaMode="no-premultiply-alpha",Op.returnTexture(t,!0)}renderTextToCanvas(){de("8.10.0","CanvasTextSystem.renderTextToCanvas: no longer supported, use CanvasTextSystem.getTexture instead")}getManagedTexture(t){t._resolution=t._autoResolution?this._renderer.resolution:t.resolution;const a=t.styleKey;if(this._activeTextures[a])return this._increaseReferenceCount(a),this._activeTextures[a].texture;const l=this.getTexture({text:t.text,style:t.style,resolution:t._resolution,textureStyle:t.textureStyle,autoGenerateMipmaps:t.autoGenerateMipmaps});return this._activeTextures[a]={texture:l,usageCount:1},l}decreaseReferenceCount(t){const a=this._activeTextures[t];a&&(a.usageCount--,a.usageCount===0&&(this.returnTexture(a.texture),this._activeTextures[t]=null))}getReferenceCount(t){var a;return((a=this._activeTextures[t])==null?void 0:a.usageCount)??0}_increaseReferenceCount(t){this._activeTextures[t].usageCount++}_applyFilters(t,a){const l=this._renderer.renderTarget.renderTarget,o=this._renderer.filter.generateFilteredTexture({texture:t,filters:a});return this._renderer.renderTarget.bind(l,!1),o}destroy(){this._renderer=null;for(const t in this._activeTextures)this._activeTextures[t]&&this.returnTexture(this._activeTextures[t].texture);this._activeTextures=null}}class f2 extends c2{constructor(t){super(t,!0)}}f2.extension={type:[Pt.CanvasSystem],name:"canvasText"};class h2 extends c2{constructor(t){super(t,!1)}}h2.extension={type:[Pt.WebGLSystem,Pt.WebGPUSystem],name:"canvasText"};Ie.add(f2);Ie.add(h2);Ie.add(o2);class Hp extends HC{constructor(...t){const a=GC(t,"Text");super(a,po),this.renderPipeId="text",a.textureStyle&&(this.textureStyle=a.textureStyle instanceof Kc?a.textureStyle:new Kc(a.textureStyle)),this.autoGenerateMipmaps=a.autoGenerateMipmaps??Pi.defaultOptions.autoGenerateMipmaps}updateBounds(){const t=this._bounds,a=this._anchor;let l=0,o=0;if(this._style.trim){const{frame:c,canvasAndContext:d}=Vc.getCanvasAndContext({text:this.text,style:this._style,resolution:1});Vc.returnCanvasAndContext(d),l=c.width,o=c.height}else{const c=Ir.measureText(this._text,this._style);l=c.width,o=c.height}t.minX=-a._x*l,t.maxX=t.minX+l,t.minY=-a._y*o,t.maxY=t.minY+o}}Ie.add(qT,LT);var ay={exports:{}},Fs={};/**
310
+ * @license React
311
+ * react-reconciler-constants.production.js
312
+ *
313
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
314
+ *
315
+ * This source code is licensed under the MIT license found in the
316
+ * LICENSE file in the root directory of this source tree.
317
+ */var kv;function pA(){return kv||(kv=1,Fs.ConcurrentRoot=1,Fs.ContinuousEventPriority=8,Fs.DefaultEventPriority=32,Fs.DiscreteEventPriority=2,Fs.IdleEventPriority=268435456,Fs.LegacyRoot=0,Fs.NoEventPriority=0),Fs}var Kv;function yA(){return Kv||(Kv=1,ay.exports=pA()),ay.exports}var Qc=yA();const cg=Y.createContext({}),gA=cg.Provider;cg.Consumer;function d2(n,t){const a=Object.getPrototypeOf(n),l=Object.getOwnPropertyDescriptor(a,t);return!(typeof l>"u"||l.writable||l.set)}const tu={currentUpdatePriority:Qc.DefaultEventPriority,unmountQueue:new Set};function Zv(n,...t){}function m2(n,t={}){const a=n;return a.__pixireact=Object.assign({filters:[],parent:null,root:null,type:""},t),a}var vA="0.0.0-development",xA={version:vA};function _A(){}function p2(n,t,a){t instanceof yo&&(t.__pixireact.parent=n,typeof a=="number"?n.__pixireact.filters.splice(a,0,t):n.__pixireact.filters.push(t),n.filters=n.__pixireact.filters)}function iy(n,t){t&&(t instanceof Fn?n.addChild(t):t instanceof yo&&p2(n,t))}function SA(){}function bA(){return!1}const Hy=Object.freeze({onclick:"onClick",onglobalmousemove:"onGlobalMouseMove",onglobalpointermove:"onGlobalPointerMove",onglobaltouchmove:"onGlobalTouchMove",onmousedown:"onMouseDown",onmouseenter:"onMouseEnter",onmouseleave:"onMouseLeave",onmousemove:"onMouseMove",onmouseout:"onMouseOut",onmouseover:"onMouseOver",onmouseup:"onMouseUp",onmouseupoutside:"onMouseUpOutside",onpointercancel:"onPointerCancel",onpointerdown:"onPointerDown",onpointerenter:"onPointerEnter",onpointerleave:"onPointerLeave",onpointermove:"onPointerMove",onpointerout:"onPointerOut",onpointerover:"onPointerOver",onpointertap:"onPointerTap",onpointerup:"onPointerUp",onpointerupoutside:"onPointerUpOutside",onrightclick:"onRightClick",onrightdown:"onRightDown",onrightup:"onRightUp",onrightupoutside:"onRightUpOutside",ontap:"onTap",ontouchcancel:"onTouchCancel",ontouchend:"onTouchEnd",ontouchendoutside:"onTouchEndOutside",ontouchmove:"onTouchMove",ontouchstart:"onTouchStart",onwheel:"onWheel"}),bp=Object.freeze({onClick:"onclick",onGlobalMouseMove:"onglobalmousemove",onGlobalPointerMove:"onglobalpointermove",onGlobalTouchMove:"onglobaltouchmove",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseUpOutside:"onmouseupoutside",onPointerCancel:"onpointercancel",onPointerDown:"onpointerdown",onPointerEnter:"onpointerenter",onPointerLeave:"onpointerleave",onPointerMove:"onpointermove",onPointerOut:"onpointerout",onPointerOver:"onpointerover",onPointerTap:"onpointertap",onPointerUp:"onpointerup",onPointerUpOutside:"onpointerupoutside",onRightClick:"onrightclick",onRightDown:"onrightdown",onRightUp:"onrightup",onRightUpOutside:"onrightupoutside",onTap:"ontap",onTouchCancel:"ontouchcancel",onTouchEnd:"ontouchend",onTouchEndOutside:"ontouchendoutside",onTouchMove:"ontouchmove",onTouchStart:"ontouchstart",onWheel:"onwheel"});function y2(n){return Array.isArray(n)}function g2(n,t,a={arrays:"reference",objects:"reference",strict:!0}){const{arrays:l,objects:o,strict:c}=a;if(typeof n!=typeof t||!!n!=!!t)return!1;if(AA(n)||EA(n))return n===t;const d=CA(n);if(d&&o==="reference")return n===t;const m=y2(n);if(m&&l==="reference")return n===t;if((m||d)&&n===t)return!0;let p;for(p in n)if(!(p in t))return!1;let v=n;if(c&&(v=t),d&&l==="shallow"&&o==="shallow"){for(p in v)if(!g2(n[p],t[p],{strict:c,objects:"reference"}))return!1}else for(p in v)if(n[p]!==t[p])return!1;if(v2(p)){if(m&&n.length===0&&t.length===0||d&&Object.keys(n).length===0&&Object.keys(t).length===0)return!0;if(n!==t)return!1}return!0}function TA(n){return n===null}function EA(n){return typeof n=="number"}function CA(n){return!(n!==Object(n)||y2(n)||typeof n=="function")}function AA(n){return typeof n=="string"}function v2(n){return n===void 0}const MA=Object.freeze(["children","key","ref"]);function RA(n,t=[]){const a={};return Object.entries(n).reduce((l,[o,c])=>(t.includes(o)||(l[o]=c),l),a)}function Gy(n,t=[]){return RA(n,MA.concat(t))}const zA="__default";function x2(n,t={},a=!1){const l=Gy(n),o=Gy(t),c=Object.entries(l),d=[];if(a){const m=Object.keys(o);let p=0;for(;p<m.length;){const v=m[p];!(v in l)&&c.unshift([v,`${zA}remove`]),p+=1}}return c.forEach(([m,p])=>{if(g2(p,o[m]))return;if(m in bp){d.push([m,p,!0,[]]);return}let v=[];m.includes("-")&&(v=m.split("-")),d.push([m,p,!1,v]);for(const _ in l){const b=l[_];_.startsWith(`${m}-`)&&d.push([_,b,!1,_.split("-")])}}),{changes:d}}function DA(n){const t=n;return!(!t||!t.changes)}const OA="__default",Jv=new Map,Wv={};function Pv(n,t){if(n){const a=n[t];if(!v2(a)&&!TA(a))return a}return n}function _2(n,t){const{__pixireact:a={},...l}=n;let o;DA(t)?o=t:o=x2(t,l);const{changes:c}=o;let d=0;for(;d<c.length;){const m=c[d];let p=!1,v=m[0],_=m[1];const b=m[2],E=m[3];let C=n,R=C[v];if(v==="draw"&&typeof _=="function"&&(n instanceof $a?_(n):(p=!0,Zv("warn",`The \`draw\` prop was used on a \`${a.type}\` component, but it's only valid on \`graphics\` components.`))),v in Hy){const z=v;p=!0,Wv[v]||(Wv[v]=!0,Zv("warn",`Event names must be pascal case; instead of \`${v}\`, you probably want \`${Hy[z]}\`.`))}if(!p){if(E.length&&(R=E.reduce(Pv,C),!(R&&R.set))){const[z,...M]=E.reverse();C=M.reverse().reduce(Pv,C),v=z}if(_===`${OA}remove`)if(C instanceof Fn){let z=Jv.get(C.constructor);z||(z=C.constructor,z=new z,Jv.set(C.constructor,z)),_=z[v]}else _=0;if(b&&a){const M=bp[v];_?C[M]=_:delete C[M]}else d2(C,v)||(C[v]=_)}d+=1}return n}function NA(n,t,a,l){const{children:o,...c}=l,{children:d,...m}=a,p=x2(c,m,!0);return p.changes.length?p:null}function wA(n,t,a,l){const o=NA(n,t,a,l);o&&_2(n,o)}const BA=Object.freeze([...Object.keys(Hy),"draw"]),jy={};function UA(n){const t=n.charAt(0),a=n.substring(1);return`${t.toUpperCase()}${a}`}function HA(n,t){return t.toLowerCase()}function GA(n){let t=n;return n.startsWith("pixi")&&(t=n.replace(/^pixi([A-Z])/,HA)),t}function jA(n,t,a){const l=GA(n),o=UA(l);if(!(o in jy))throw new Error(`${o} is not part of the PIXI namespace! Did you forget to extend?`);const c=jy[o],d=Gy(t,BA);Object.entries(t).forEach(([p,v])=>{if(p in bp){const _=bp[p];d[_]=v}});const m=m2(new c(d),{root:a,type:l});return _2(m,t),m}var ly={exports:{}},sy={exports:{}},ry={exports:{}},uy={};/**
318
+ * @license React
319
+ * scheduler.production.js
320
+ *
321
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
322
+ *
323
+ * This source code is licensed under the MIT license found in the
324
+ * LICENSE file in the root directory of this source tree.
325
+ */var Fv;function YA(){return Fv||(Fv=1,(function(n){function t(H,G){var at=H.length;H.push(G);t:for(;0<at;){var et=at-1>>>1,mt=H[et];if(0<o(mt,G))H[et]=G,H[at]=mt,at=et;else break t}}function a(H){return H.length===0?null:H[0]}function l(H){if(H.length===0)return null;var G=H[0],at=H.pop();if(at!==G){H[0]=at;t:for(var et=0,mt=H.length,j=mt>>>1;et<j;){var I=2*(et+1)-1,ot=H[I],vt=I+1,Tt=H[vt];if(0>o(ot,at))vt<mt&&0>o(Tt,ot)?(H[et]=Tt,H[vt]=at,et=vt):(H[et]=ot,H[I]=at,et=I);else if(vt<mt&&0>o(Tt,at))H[et]=Tt,H[vt]=at,et=vt;else break t}}return G}function o(H,G){var at=H.sortIndex-G.sortIndex;return at!==0?at:H.id-G.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var p=[],v=[],_=1,b=null,E=3,C=!1,R=!1,z=!1,M=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function B(H){for(var G=a(v);G!==null;){if(G.callback===null)l(v);else if(G.startTime<=H)l(v),G.sortIndex=G.expirationTime,t(p,G);else break;G=a(v)}}function U(H){if(z=!1,B(H),!R)if(a(p)!==null)R=!0,xt();else{var G=a(v);G!==null&&Ct(U,G.startTime-H)}}var k=!1,Q=-1,V=5,ft=-1;function lt(){return!(n.unstable_now()-ft<V)}function st(){if(k){var H=n.unstable_now();ft=H;var G=!0;try{t:{R=!1,z&&(z=!1,D(Q),Q=-1),C=!0;var at=E;try{e:{for(B(H),b=a(p);b!==null&&!(b.expirationTime>H&&lt());){var et=b.callback;if(typeof et=="function"){b.callback=null,E=b.priorityLevel;var mt=et(b.expirationTime<=H);if(H=n.unstable_now(),typeof mt=="function"){b.callback=mt,B(H),G=!0;break e}b===a(p)&&l(p),B(H)}else l(p);b=a(p)}if(b!==null)G=!0;else{var j=a(v);j!==null&&Ct(U,j.startTime-H),G=!1}}break t}finally{b=null,E=at,C=!1}G=void 0}}finally{G?ut():k=!1}}}var ut;if(typeof w=="function")ut=function(){w(st)};else if(typeof MessageChannel<"u"){var pt=new MessageChannel,gt=pt.port2;pt.port1.onmessage=st,ut=function(){gt.postMessage(null)}}else ut=function(){M(st,0)};function xt(){k||(k=!0,ut())}function Ct(H,G){Q=M(function(){H(n.unstable_now())},G)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(H){H.callback=null},n.unstable_continueExecution=function(){R||C||(R=!0,xt())},n.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<H?Math.floor(1e3/H):5},n.unstable_getCurrentPriorityLevel=function(){return E},n.unstable_getFirstCallbackNode=function(){return a(p)},n.unstable_next=function(H){switch(E){case 1:case 2:case 3:var G=3;break;default:G=E}var at=E;E=G;try{return H()}finally{E=at}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(H,G){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var at=E;E=H;try{return G()}finally{E=at}},n.unstable_scheduleCallback=function(H,G,at){var et=n.unstable_now();switch(typeof at=="object"&&at!==null?(at=at.delay,at=typeof at=="number"&&0<at?et+at:et):at=et,H){case 1:var mt=-1;break;case 2:mt=250;break;case 5:mt=1073741823;break;case 4:mt=1e4;break;default:mt=5e3}return mt=at+mt,H={id:_++,callback:G,priorityLevel:H,startTime:at,expirationTime:mt,sortIndex:-1},at>et?(H.sortIndex=at,t(v,H),a(p)===null&&H===a(v)&&(z?(D(Q),Q=-1):z=!0,Ct(U,at-et))):(H.sortIndex=mt,t(p,H),R||C||(R=!0,xt())),H},n.unstable_shouldYield=lt,n.unstable_wrapCallback=function(H){var G=E;return function(){var at=E;E=G;try{return H.apply(this,arguments)}finally{E=at}}}})(uy)),uy}var Iv;function qA(){return Iv||(Iv=1,ry.exports=YA()),ry.exports}/**
326
+ * @license React
327
+ * react-reconciler.production.js
328
+ *
329
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
330
+ *
331
+ * This source code is licensed under the MIT license found in the
332
+ * LICENSE file in the root directory of this source tree.
333
+ */var $v;function LA(){return $v||($v=1,(function(n){n.exports=function(t){function a(s,r,h,g){return new Bf(s,r,h,g)}function l(){}function o(s){var r="https://react.dev/errors/"+s;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)r+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+s+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(s){return s===null||typeof s!="object"?null:(s=Lf&&s[Lf]||s["@@iterator"],typeof s=="function"?s:null)}function d(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===Us?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case Mr:return"Fragment";case ri:return"Portal";case qf:return"Profiler";case Yf:return"StrictMode";case tc:return"Suspense";case Fl:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case Oi:return(s.displayName||"Context")+".Provider";case Pl:return(s._context.displayName||"Context")+".Consumer";case Rr:var r=s.render;return s=s.displayName,s||(s=r.displayName||r.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case Nu:return r=s.displayName||null,r!==null?r:d(s.type)||"Memo";case ui:r=s._payload,s=s._init;try{return d(s(r))}catch{}}return null}function m(s){if(ec===void 0)try{throw Error()}catch(h){var r=h.stack.trim().match(/\n( *(at )?)/);ec=r&&r[1]||"",Xf=-1<h.stack.indexOf(`
334
+ at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
335
+ `+ec+s+Xf}function p(s,r){if(!s||Il)return"";Il=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var g={DetermineComponentFrameRoot:function(){try{if(r){var St=function(){throw Error()};if(Object.defineProperty(St.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(St,[])}catch(qt){var bt=qt}Reflect.construct(s,[],St)}else{try{St.call()}catch(qt){bt=qt}s.call(St.prototype)}}else{try{throw Error()}catch(qt){bt=qt}(St=s())&&typeof St.catch=="function"&&St.catch(function(){})}}catch(qt){if(qt&&bt&&typeof qt.stack=="string")return[qt.stack,bt.stack]}return[null,null]}};g.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var S=Object.getOwnPropertyDescriptor(g.DetermineComponentFrameRoot,"name");S&&S.configurable&&Object.defineProperty(g.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var T=g.DetermineComponentFrameRoot(),N=T[0],q=T[1];if(N&&q){var W=N.split(`
336
+ `),ct=q.split(`
337
+ `);for(S=g=0;g<W.length&&!W[g].includes("DetermineComponentFrameRoot");)g++;for(;S<ct.length&&!ct[S].includes("DetermineComponentFrameRoot");)S++;if(g===W.length||S===ct.length)for(g=W.length-1,S=ct.length-1;1<=g&&0<=S&&W[g]!==ct[S];)S--;for(;1<=g&&0<=S;g--,S--)if(W[g]!==ct[S]){if(g!==1||S!==1)do if(g--,S--,0>S||W[g]!==ct[S]){var _t=`
338
+ `+W[g].replace(" at new "," at ");return s.displayName&&_t.includes("<anonymous>")&&(_t=_t.replace("<anonymous>",s.displayName)),_t}while(1<=g&&0<=S);break}}}finally{Il=!1,Error.prepareStackTrace=h}return(h=s?s.displayName||s.name:"")?m(h):""}function v(s){switch(s.tag){case 26:case 27:case 5:return m(s.type);case 16:return m("Lazy");case 13:return m("Suspense");case 19:return m("SuspenseList");case 0:case 15:return s=p(s.type,!1),s;case 11:return s=p(s.type.render,!1),s;case 1:return s=p(s.type,!0),s;default:return""}}function _(s){try{var r="";do r+=v(s),s=s.return;while(s);return r}catch(h){return`
339
+ Error generating stack: `+h.message+`
340
+ `+h.stack}}function b(s){var r=s,h=s;if(s.alternate)for(;r.return;)r=r.return;else{s=r;do r=s,(r.flags&4098)!==0&&(h=r.return),s=r.return;while(s)}return r.tag===3?h:null}function E(s){if(b(s)!==s)throw Error(o(188))}function C(s){var r=s.alternate;if(!r){if(r=b(s),r===null)throw Error(o(188));return r!==s?null:s}for(var h=s,g=r;;){var S=h.return;if(S===null)break;var T=S.alternate;if(T===null){if(g=S.return,g!==null){h=g;continue}break}if(S.child===T.child){for(T=S.child;T;){if(T===h)return E(S),s;if(T===g)return E(S),r;T=T.sibling}throw Error(o(188))}if(h.return!==g.return)h=S,g=T;else{for(var N=!1,q=S.child;q;){if(q===h){N=!0,h=S,g=T;break}if(q===g){N=!0,g=S,h=T;break}q=q.sibling}if(!N){for(q=T.child;q;){if(q===h){N=!0,h=T,g=S;break}if(q===g){N=!0,g=T,h=S;break}q=q.sibling}if(!N)throw Error(o(189))}}if(h.alternate!==g)throw Error(o(190))}if(h.tag!==3)throw Error(o(188));return h.stateNode.current===h?s:r}function R(s){var r=s.tag;if(r===5||r===26||r===27||r===6)return s;for(s=s.child;s!==null;){if(r=R(s),r!==null)return r;s=s.sibling}return null}function z(s){var r=s.tag;if(r===5||r===26||r===27||r===6)return s;for(s=s.child;s!==null;){if(s.tag!==4&&(r=z(s),r!==null))return r;s=s.sibling}return null}function M(s){return{current:s}}function D(s){0>ml||(s.current=Lu[ml],Lu[ml]=null,ml--)}function w(s,r){ml++,Lu[ml]=s.current,s.current=r}function B(s){return s>>>=0,s===0?32:31-(Xu(s)/vm|0)|0}function U(s){var r=s&42;if(r!==0)return r;switch(s&-s){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: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 s&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function k(s,r){var h=s.pendingLanes;if(h===0)return 0;var g=0,S=s.suspendedLanes,T=s.pingedLanes,N=s.warmLanes;s=s.finishedLanes!==0;var q=h&134217727;return q!==0?(h=q&~S,h!==0?g=U(h):(T&=q,T!==0?g=U(T):s||(N=q&~N,N!==0&&(g=U(N))))):(q=h&~S,q!==0?g=U(q):T!==0?g=U(T):s||(N=h&~N,N!==0&&(g=U(N)))),g===0?0:r!==0&&r!==g&&(r&S)===0&&(S=g&-g,N=r&-r,S>=N||S===32&&(N&4194176)!==0)?r:g}function Q(s,r){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&r)===0}function V(s,r){switch(s){case 1:case 2:case 4:case 8:return r+250;case 16:case 32:case 64: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 r+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 ft(){var s=Nr;return Nr<<=1,(Nr&4194176)===0&&(Nr=128),s}function lt(){var s=Vu;return Vu<<=1,(Vu&62914560)===0&&(Vu=4194304),s}function st(s){for(var r=[],h=0;31>h;h++)r.push(s);return r}function ut(s,r){s.pendingLanes|=r,r!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function pt(s,r,h,g,S,T){var N=s.pendingLanes;s.pendingLanes=h,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=h,s.entangledLanes&=h,s.errorRecoveryDisabledLanes&=h,s.shellSuspendCounter=0;var q=s.entanglements,W=s.expirationTimes,ct=s.hiddenUpdates;for(h=N&~h;0<h;){var _t=31-la(h),St=1<<_t;q[_t]=0,W[_t]=-1;var bt=ct[_t];if(bt!==null)for(ct[_t]=null,_t=0;_t<bt.length;_t++){var qt=bt[_t];qt!==null&&(qt.lane&=-536870913)}h&=~St}g!==0&&gt(s,g,0),T!==0&&S===0&&s.tag!==0&&(s.suspendedLanes|=T&~(N&~r))}function gt(s,r,h){s.pendingLanes|=r,s.suspendedLanes&=~r;var g=31-la(r);s.entangledLanes|=r,s.entanglements[g]=s.entanglements[g]|1073741824|h&4194218}function xt(s,r){var h=s.entangledLanes|=r;for(s=s.entanglements;h;){var g=31-la(h),S=1<<g;S&r|s[g]&r&&(s[g]|=r),h&=~S}}function Ct(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function H(s){if(sa&&typeof sa.onCommitFiberRoot=="function")try{sa.onCommitFiberRoot(Br,s,void 0,(s.current.flags&128)===128)}catch{}}function G(s){if(typeof bm=="function"&&xh(s),sa&&typeof sa.setStrictMode=="function")try{sa.setStrictMode(Br,s)}catch{}}function at(s,r){return s===r&&(s!==0||1/s===1/r)||s!==s&&r!==r}function et(s,r){if(typeof s=="object"&&s!==null){var h=vc.get(s);return h!==void 0?h:(r={value:s,source:r,stack:_(r)},vc.set(s,r),r)}return{value:s,source:r,stack:_(r)}}function mt(s,r){we[qe++]=Ku,we[qe++]=ku,ku=s,Ku=r}function j(s,r,h){Ca[Aa++]=Hi,Ca[Aa++]=Qa,Ca[Aa++]=oi,oi=s;var g=Hi;s=Qa;var S=32-la(g)-1;g&=~(1<<S),h+=1;var T=32-la(r)+S;if(30<T){var N=S-S%5;T=(g&(1<<N)-1).toString(32),g>>=N,S-=N,Hi=1<<32-la(r)+S|h<<S|g,Qa=T+s}else Hi=1<<T|h<<S|g,Qa=s}function I(s){s.return!==null&&(mt(s,1),j(s,1,0))}function ot(s){for(;s===ku;)ku=we[--qe],we[qe]=null,Ku=we[--qe],we[qe]=null;for(;s===oi;)oi=Ca[--Aa],Ca[Aa]=null,Qa=Ca[--Aa],Ca[Aa]=null,Hi=Ca[--Aa],Ca[Aa]=null}function vt(s,r){w(ci,r),w(Zu,s),w(_n,null),s=Hs(r),D(_n),w(_n,s)}function Tt(){D(_n),D(Zu),D(ci)}function Ot(s){s.memoizedState!==null&&w(Ur,s);var r=_n.current,h=Fd(r,s.type);r!==h&&(w(Zu,s),w(_n,h))}function Bt(s){Zu.current===s&&(D(_n),D(Zu)),Ur.current===s&&(D(Ur),wi?Ht._currentValue=ia:Ht._currentValue2=ia)}function fe(s){var r=Error(o(418,""));throw In(et(r,s)),Ju}function ce(s,r){if(!kn)throw Error(o(175));Qp(s.stateNode,s.type,s.memoizedProps,r,s)||fe(s)}function pa(s){for(Un=s.return;Un;)switch(Un.tag){case 3:case 27:ka=!0;return;case 5:case 13:ka=!1;return;default:Un=Un.return}}function ja(s){if(!kn||s!==Un)return!1;if(!se)return pa(s),se=!0,!1;var r=!1;if(Cn?s.tag!==3&&s.tag!==27&&(s.tag!==5||dm(s.type)&&!es(s.type,s.memoizedProps))&&(r=!0):s.tag!==3&&(s.tag!==5||dm(s.type)&&!es(s.type,s.memoizedProps))&&(r=!0),r&&Mn&&fe(s),pa(s),s.tag===13){if(!kn)throw Error(o(316));if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(o(317));Mn=fm(s)}else Mn=Un?sh(s.stateNode):null;return!0}function qn(){kn&&(Mn=Un=null,se=!1)}function In(s){Ma===null?Ma=[s]:Ma.push(s)}function pn(){for(var s=as,r=Hr=as=0;r<s;){var h=Ra[r];Ra[r++]=null;var g=Ra[r];Ra[r++]=null;var S=Ra[r];Ra[r++]=null;var T=Ra[r];if(Ra[r++]=null,g!==null&&S!==null){var N=g.pending;N===null?S.next=S:(S.next=N.next,N.next=S),g.pending=S}T!==0&&eu(h,S,T)}}function $n(s,r,h,g){Ra[as++]=s,Ra[as++]=r,Ra[as++]=h,Ra[as++]=g,Hr|=g,s.lanes|=g,s=s.alternate,s!==null&&(s.lanes|=g)}function ys(s,r,h,g){return $n(s,r,h,g),gs(s)}function ei(s,r){return $n(s,null,null,r),gs(s)}function eu(s,r,h){s.lanes|=h;var g=s.alternate;g!==null&&(g.lanes|=h);for(var S=!1,T=s.return;T!==null;)T.childLanes|=h,g=T.alternate,g!==null&&(g.childLanes|=h),T.tag===22&&(s=T.stateNode,s===null||s._visibility&1||(S=!0)),s=T,T=T.return;S&&r!==null&&s.tag===3&&(T=s.stateNode,S=31-la(h),T=T.hiddenUpdates,s=T[S],s===null?T[S]=[r]:s.push(r),r.lane=h|536870912)}function gs(s){if(50<Zs)throw Zs=0,Jn=null,Error(o(185));for(var r=s.return;r!==null;)s=r,r=s.return;return s.tag===3?s.stateNode:null}function Ya(s){s!==qs&&s.next===null&&(qs===null?Gr=qs=s:qs=qs.next=s),Pu=!0,Wu||(Wu=!0,md(jp))}function Dl(s,r){if(!fi&&Pu){fi=!0;do for(var h=!1,g=Gr;g!==null;){if(s!==0){var S=g.pendingLanes;if(S===0)var T=0;else{var N=g.suspendedLanes,q=g.pingedLanes;T=(1<<31-la(42|s)+1)-1,T&=S&~(N&~q),T=T&201326677?T&201326677|1:T?T|2:0}T!==0&&(h=!0,dd(g,T))}else T=Kt,T=k(g,g===Wt?T:0),(T&3)===0||Q(g,T)||(h=!0,dd(g,T));g=g.next}while(h);fi=!1}}function jp(){Pu=Wu=!1;var s=0;is!==0&&(ns()&&(s=is),is=0);for(var r=An(),h=null,g=Gr;g!==null;){var S=g.next,T=hd(g,r);T===0?(g.next=null,h===null?Gr=S:h.next=S,S===null&&(qs=h)):(h=g,(s!==0||(T&3)!==0)&&(Pu=!0)),g=S}Dl(s)}function hd(s,r){for(var h=s.suspendedLanes,g=s.pingedLanes,S=s.expirationTimes,T=s.pendingLanes&-62914561;0<T;){var N=31-la(T),q=1<<N,W=S[N];W===-1?((q&h)===0||(q&g)!==0)&&(S[N]=V(q,r)):W<=r&&(s.expiredLanes|=q),T&=~q}if(r=Wt,h=Kt,h=k(s,s===r?h:0),g=s.callbackNode,h===0||s===r&&be===2||s.cancelPendingCommit!==null)return g!==null&&g!==null&&Qu(g),s.callbackNode=null,s.callbackPriority=0;if((h&3)===0||Q(s,h)){if(r=h&-h,r===s.callbackPriority)return r;switch(g!==null&&Qu(g),Ct(h)){case 2:case 8:h=Sm;break;case 32:h=yc;break;case 268435456:h=gc;break;default:h=yc}return g=ta.bind(null,s),h=wr(h,g),s.callbackPriority=r,s.callbackNode=h,r}return g!==null&&g!==null&&Qu(g),s.callbackPriority=2,s.callbackNode=null,2}function ta(s,r){var h=s.callbackNode;if(vn()&&s.callbackNode!==h)return null;var g=Kt;return g=k(s,s===Wt?g:0),g===0?null:(Mu(s,g,r),hd(s,An()),s.callbackNode!=null&&s.callbackNode===h?ta.bind(null,s):null)}function dd(s,r){if(vn())return null;Mu(s,r,!0)}function md(s){en?lc(function(){(zt&6)!==0?wr(vh,s):s()}):wr(vh,s)}function go(){return is===0&&(is=ft()),is}function vo(s,r){if(Fu===null){var h=Fu=[];xc=0,ra=go(),ls={status:"pending",value:void 0,then:function(g){h.push(g)}}}return xc++,r.then(pd,pd),r}function pd(){if(--xc===0&&Fu!==null){ls!==null&&(ls.status="fulfilled");var s=Fu;Fu=null,ra=0,ls=null;for(var r=0;r<s.length;r++)(0,s[r])()}}function yd(s,r){var h=[],g={status:"pending",value:null,reason:null,then:function(S){h.push(S)}};return s.then(function(){g.status="fulfilled",g.value=r;for(var S=0;S<h.length;S++)(0,h[S])(r)},function(S){for(g.status="rejected",g.reason=S,S=0;S<h.length;S++)(0,h[S])(void 0)}),g}function tf(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ef(s,r){s=s.updateQueue,r.updateQueue===s&&(r.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function qa(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function $e(s,r,h){var g=s.updateQueue;if(g===null)return null;if(g=g.shared,(zt&2)!==0){var S=g.pending;return S===null?r.next=r:(r.next=S.next,S.next=r),g.pending=r,r=gs(s),eu(s,null,h),r}return $n(s,g,r,h),gs(s)}function La(s,r,h){if(r=r.updateQueue,r!==null&&(r=r.shared,(h&4194176)!==0)){var g=r.lanes;g&=s.pendingLanes,h|=g,r.lanes=h,xt(s,h)}}function Ln(s,r){var h=s.updateQueue,g=s.alternate;if(g!==null&&(g=g.updateQueue,h===g)){var S=null,T=null;if(h=h.firstBaseUpdate,h!==null){do{var N={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};T===null?S=T=N:T=T.next=N,h=h.next}while(h!==null);T===null?S=T=r:T=T.next=r}else S=T=r;h={baseState:g.baseState,firstBaseUpdate:S,lastBaseUpdate:T,shared:g.shared,callbacks:g.callbacks},s.updateQueue=h;return}s=h.lastBaseUpdate,s===null?h.firstBaseUpdate=r:s.next=r,h.lastBaseUpdate=r}function nu(){if(jr){var s=ls;if(s!==null)throw s}}function au(s,r,h,g){jr=!1;var S=s.updateQueue;pl=!1;var T=S.firstBaseUpdate,N=S.lastBaseUpdate,q=S.shared.pending;if(q!==null){S.shared.pending=null;var W=q,ct=W.next;W.next=null,N===null?T=ct:N.next=ct,N=W;var _t=s.alternate;_t!==null&&(_t=_t.updateQueue,q=_t.lastBaseUpdate,q!==N&&(q===null?_t.firstBaseUpdate=ct:q.next=ct,_t.lastBaseUpdate=W))}if(T!==null){var St=S.baseState;N=0,_t=ct=W=null,q=T;do{var bt=q.lane&-536870913,qt=bt!==q.lane;if(qt?(Kt&bt)===bt:(g&bt)===bt){bt!==0&&bt===ra&&(jr=!0),_t!==null&&(_t=_t.next={lane:0,tag:q.tag,payload:q.payload,callback:null,next:null});t:{var fa=s,eo=q;bt=r;var Js=h;switch(eo.tag){case 1:if(fa=eo.payload,typeof fa=="function"){St=fa.call(Js,St,bt);break t}St=fa;break t;case 3:fa.flags=fa.flags&-65537|128;case 0:if(fa=eo.payload,bt=typeof fa=="function"?fa.call(Js,St,bt):fa,bt==null)break t;St=Bs({},St,bt);break t;case 2:pl=!0}}bt=q.callback,bt!==null&&(s.flags|=64,qt&&(s.flags|=8192),qt=S.callbacks,qt===null?S.callbacks=[bt]:qt.push(bt))}else qt={lane:bt,tag:q.tag,payload:q.payload,callback:q.callback,next:null},_t===null?(ct=_t=qt,W=St):_t=_t.next=qt,N|=bt;if(q=q.next,q===null){if(q=S.shared.pending,q===null)break;qt=q,q=qt.next,qt.next=null,S.lastBaseUpdate=qt,S.shared.pending=null}}while(!0);_t===null&&(W=St),S.baseState=W,S.firstBaseUpdate=ct,S.lastBaseUpdate=_t,T===null&&(S.shared.lanes=0),Na|=N,s.lanes=N,s.memoizedState=St}}function gd(s,r){if(typeof s!="function")throw Error(o(191,s));s.call(r)}function iu(s,r){var h=s.callbacks;if(h!==null)for(s.callbacks=null,s=0;s<h.length;s++)gd(h[s],r)}function vs(s,r){if(Ea(s,r))return!0;if(typeof s!="object"||s===null||typeof r!="object"||r===null)return!1;var h=Object.keys(s),g=Object.keys(r);if(h.length!==g.length)return!1;for(g=0;g<h.length;g++){var S=h[g];if(!Iu.call(r,S)||!Ea(s[S],r[S]))return!1}return!0}function lu(s){return s=s.status,s==="fulfilled"||s==="rejected"}function _i(){}function su(s,r,h){switch(h=s[h],h===void 0?s.push(r):h!==r&&(r.then(_i,_i),r=h),r.status){case"fulfilled":return r.value;case"rejected":throw s=r.reason,s===xe?Error(o(483)):s;default:if(typeof r.status=="string")r.then(_i,_i);else{if(s=Wt,s!==null&&100<s.shellSuspendCounter)throw Error(o(482));s=r,s.status="pending",s.then(function(g){if(r.status==="pending"){var S=r;S.status="fulfilled",S.value=g}},function(g){if(r.status==="pending"){var S=r;S.status="rejected",S.reason=g}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw s=r.reason,s===xe?Error(o(483)):s}throw Ls=r,xe}}function sr(){if(Ls===null)throw Error(o(459));var s=Ls;return Ls=null,s}function xo(s){var r=Ka;return Ka+=1,Gi===null&&(Gi=[]),su(Gi,s,r)}function rr(s,r){r=r.props.ref,s.ref=r!==void 0?r:null}function ur(s,r){throw r.$$typeof===jf?Error(o(525)):(s=Object.prototype.toString.call(r),Error(o(31,s==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":s)))}function or(s){var r=s._init;return r(s._payload)}function vd(s){function r($,Z){if(s){var nt=$.deletions;nt===null?($.deletions=[Z],$.flags|=16):nt.push(Z)}}function h($,Z){if(!s)return null;for(;Z!==null;)r($,Z),Z=Z.sibling;return null}function g($){for(var Z=new Map;$!==null;)$.key!==null?Z.set($.key,$):Z.set($.index,$),$=$.sibling;return Z}function S($,Z){return $=wn($,Z),$.index=0,$.sibling=null,$}function T($,Z,nt){return $.index=nt,s?(nt=$.alternate,nt!==null?(nt=nt.index,nt<Z?($.flags|=33554434,Z):nt):($.flags|=33554434,Z)):($.flags|=1048576,Z)}function N($){return s&&$.alternate===null&&($.flags|=33554434),$}function q($,Z,nt,yt){return Z===null||Z.tag!==6?(Z=Wl(nt,$.mode,yt),Z.return=$,Z):(Z=S(Z,nt),Z.return=$,Z)}function W($,Z,nt,yt){var Mt=nt.type;return Mt===Mr?_t($,Z,nt.props.children,yt,nt.key):Z!==null&&(Z.elementType===Mt||typeof Mt=="object"&&Mt!==null&&Mt.$$typeof===ui&&or(Mt)===Z.type)?(Z=S(Z,nt.props),rr(Z,nt),Z.return=$,Z):(Z=Xa(nt.type,nt.key,nt.props,null,$.mode,yt),rr(Z,nt),Z.return=$,Z)}function ct($,Z,nt,yt){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==nt.containerInfo||Z.stateNode.implementation!==nt.implementation?(Z=Ar(nt,$.mode,yt),Z.return=$,Z):(Z=S(Z,nt.children||[]),Z.return=$,Z)}function _t($,Z,nt,yt,Mt){return Z===null||Z.tag!==7?(Z=ol(nt,$.mode,yt,Mt),Z.return=$,Z):(Z=S(Z,nt),Z.return=$,Z)}function St($,Z,nt){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=Wl(""+Z,$.mode,nt),Z.return=$,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case cl:return nt=Xa(Z.type,Z.key,Z.props,null,$.mode,nt),rr(nt,Z),nt.return=$,nt;case ri:return Z=Ar(Z,$.mode,nt),Z.return=$,Z;case ui:var yt=Z._init;return Z=yt(Z._payload),St($,Z,nt)}if($l(Z)||c(Z))return Z=ol(Z,$.mode,nt,null),Z.return=$,Z;if(typeof Z.then=="function")return St($,xo(Z),nt);if(Z.$$typeof===Oi)return St($,bu($,Z),nt);ur($,Z)}return null}function bt($,Z,nt,yt){var Mt=Z!==null?Z.key:null;if(typeof nt=="string"&&nt!==""||typeof nt=="number"||typeof nt=="bigint")return Mt!==null?null:q($,Z,""+nt,yt);if(typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case cl:return nt.key===Mt?W($,Z,nt,yt):null;case ri:return nt.key===Mt?ct($,Z,nt,yt):null;case ui:return Mt=nt._init,nt=Mt(nt._payload),bt($,Z,nt,yt)}if($l(nt)||c(nt))return Mt!==null?null:_t($,Z,nt,yt,null);if(typeof nt.then=="function")return bt($,Z,xo(nt),yt);if(nt.$$typeof===Oi)return bt($,Z,bu($,nt),yt);ur($,nt)}return null}function qt($,Z,nt,yt,Mt){if(typeof yt=="string"&&yt!==""||typeof yt=="number"||typeof yt=="bigint")return $=$.get(nt)||null,q(Z,$,""+yt,Mt);if(typeof yt=="object"&&yt!==null){switch(yt.$$typeof){case cl:return $=$.get(yt.key===null?nt:yt.key)||null,W(Z,$,yt,Mt);case ri:return $=$.get(yt.key===null?nt:yt.key)||null,ct(Z,$,yt,Mt);case ui:var Ae=yt._init;return yt=Ae(yt._payload),qt($,Z,nt,yt,Mt)}if($l(yt)||c(yt))return $=$.get(nt)||null,_t(Z,$,yt,Mt,null);if(typeof yt.then=="function")return qt($,Z,nt,xo(yt),Mt);if(yt.$$typeof===Oi)return qt($,Z,nt,bu(Z,yt),Mt);ur(Z,yt)}return null}function fa($,Z,nt,yt){for(var Mt=null,Ae=null,Gt=Z,ue=Z=0,dn=null;Gt!==null&&ue<nt.length;ue++){Gt.index>ue?(dn=Gt,Gt=null):dn=Gt.sibling;var oe=bt($,Gt,nt[ue],yt);if(oe===null){Gt===null&&(Gt=dn);break}s&&Gt&&oe.alternate===null&&r($,Gt),Z=T(oe,Z,ue),Ae===null?Mt=oe:Ae.sibling=oe,Ae=oe,Gt=dn}if(ue===nt.length)return h($,Gt),se&&mt($,ue),Mt;if(Gt===null){for(;ue<nt.length;ue++)Gt=St($,nt[ue],yt),Gt!==null&&(Z=T(Gt,Z,ue),Ae===null?Mt=Gt:Ae.sibling=Gt,Ae=Gt);return se&&mt($,ue),Mt}for(Gt=g(Gt);ue<nt.length;ue++)dn=qt(Gt,$,ue,nt[ue],yt),dn!==null&&(s&&dn.alternate!==null&&Gt.delete(dn.key===null?ue:dn.key),Z=T(dn,Z,ue),Ae===null?Mt=dn:Ae.sibling=dn,Ae=dn);return s&&Gt.forEach(function(bl){return r($,bl)}),se&&mt($,ue),Mt}function eo($,Z,nt,yt){if(nt==null)throw Error(o(151));for(var Mt=null,Ae=null,Gt=Z,ue=Z=0,dn=null,oe=nt.next();Gt!==null&&!oe.done;ue++,oe=nt.next()){Gt.index>ue?(dn=Gt,Gt=null):dn=Gt.sibling;var bl=bt($,Gt,oe.value,yt);if(bl===null){Gt===null&&(Gt=dn);break}s&&Gt&&bl.alternate===null&&r($,Gt),Z=T(bl,Z,ue),Ae===null?Mt=bl:Ae.sibling=bl,Ae=bl,Gt=dn}if(oe.done)return h($,Gt),se&&mt($,ue),Mt;if(Gt===null){for(;!oe.done;ue++,oe=nt.next())oe=St($,oe.value,yt),oe!==null&&(Z=T(oe,Z,ue),Ae===null?Mt=oe:Ae.sibling=oe,Ae=oe);return se&&mt($,ue),Mt}for(Gt=g(Gt);!oe.done;ue++,oe=nt.next())oe=qt(Gt,$,ue,oe.value,yt),oe!==null&&(s&&oe.alternate!==null&&Gt.delete(oe.key===null?ue:oe.key),Z=T(oe,Z,ue),Ae===null?Mt=oe:Ae.sibling=oe,Ae=oe);return s&&Gt.forEach(function(Rc){return r($,Rc)}),se&&mt($,ue),Mt}function Js($,Z,nt,yt){if(typeof nt=="object"&&nt!==null&&nt.type===Mr&&nt.key===null&&(nt=nt.props.children),typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case cl:t:{for(var Mt=nt.key;Z!==null;){if(Z.key===Mt){if(Mt=nt.type,Mt===Mr){if(Z.tag===7){h($,Z.sibling),yt=S(Z,nt.props.children),yt.return=$,$=yt;break t}}else if(Z.elementType===Mt||typeof Mt=="object"&&Mt!==null&&Mt.$$typeof===ui&&or(Mt)===Z.type){h($,Z.sibling),yt=S(Z,nt.props),rr(yt,nt),yt.return=$,$=yt;break t}h($,Z);break}else r($,Z);Z=Z.sibling}nt.type===Mr?(yt=ol(nt.props.children,$.mode,yt,nt.key),yt.return=$,$=yt):(yt=Xa(nt.type,nt.key,nt.props,null,$.mode,yt),rr(yt,nt),yt.return=$,$=yt)}return N($);case ri:t:{for(Mt=nt.key;Z!==null;){if(Z.key===Mt)if(Z.tag===4&&Z.stateNode.containerInfo===nt.containerInfo&&Z.stateNode.implementation===nt.implementation){h($,Z.sibling),yt=S(Z,nt.children||[]),yt.return=$,$=yt;break t}else{h($,Z);break}else r($,Z);Z=Z.sibling}yt=Ar(nt,$.mode,yt),yt.return=$,$=yt}return N($);case ui:return Mt=nt._init,nt=Mt(nt._payload),Js($,Z,nt,yt)}if($l(nt))return fa($,Z,nt,yt);if(c(nt)){if(Mt=c(nt),typeof Mt!="function")throw Error(o(150));return nt=Mt.call(nt),eo($,Z,nt,yt)}if(typeof nt.then=="function")return Js($,Z,xo(nt),yt);if(nt.$$typeof===Oi)return Js($,Z,bu($,nt),yt);ur($,nt)}return typeof nt=="string"&&nt!==""||typeof nt=="number"||typeof nt=="bigint"?(nt=""+nt,Z!==null&&Z.tag===6?(h($,Z.sibling),yt=S(Z,nt),yt.return=$,$=yt):(h($,Z),yt=Wl(nt,$.mode,yt),yt.return=$,$=yt),N($)):h($,Z)}return function($,Z,nt,yt){try{Ka=0;var Mt=Js($,Z,nt,yt);return Gi=null,Mt}catch(Gt){if(Gt===xe)throw Gt;var Ae=a(29,Gt,null,$.mode);return Ae.lanes=yt,Ae.return=$,Ae}finally{}}}function nf(s,r){s=hi,w(za,s),w(ji,r),hi=s|r.baseLanes}function _o(){w(za,hi),w(ji,ji.current)}function So(){hi=za.current,D(ji),D(za)}function Si(s){var r=s.alternate;w(nn,nn.current&1),w(Da,s),Za===null&&(r===null||ji.current!==null||r.memoizedState!==null)&&(Za=s)}function bo(s){if(s.tag===22){if(w(nn,nn.current),w(Da,s),Za===null){var r=s.alternate;r!==null&&r.memoizedState!==null&&(Za=s)}}else Fi()}function Fi(){w(nn,nn.current),w(Da,Da.current)}function bi(s){D(Da),Za===s&&(Za=null),D(nn)}function ni(s){for(var r=s;r!==null;){if(r.tag===13){var h=r.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||cc(h)||qu(h)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break;for(;r.sibling===null;){if(r.return===null||r.return===s)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function Ft(){throw Error(o(321))}function zn(s,r){if(r===null)return!1;for(var h=0;h<r.length&&h<s.length;h++)if(!Ea(s[h],r[h]))return!1;return!0}function Ol(s,r,h,g,S,T){return Yi=T,Qt=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,Nt.H=s===null||s.memoizedState===null?an:Hn,yl=!1,T=h(g,S),yl=!1,Be&&(T=xd(r,h,g,S)),To(s),T}function To(s){Nt.H=re;var r=he!==null&&he.next!==null;if(Yi=0,Ke=he=Qt=null,Ja=!1,Le=0,Yr=null,r)throw Error(o(300));s===null||Ze||(s=s.dependencies,s!==null&&jl(s)&&(Ze=!0))}function xd(s,r,h,g){Qt=s;var S=0;do{if(Be&&(Yr=null),Le=0,Be=!1,25<=S)throw Error(o(301));if(S+=1,Ke=he=null,s.updateQueue!=null){var T=s.updateQueue;T.lastEffect=null,T.events=null,T.stores=null,T.memoCache!=null&&(T.memoCache.index=0)}Nt.H=rs,T=r(h,g)}while(Be);return T}function Yp(){var s=Nt.H,r=s.useState()[0];return r=typeof r.then=="function"?Ii(r):r,s=s.useState()[0],(he!==null?he.memoizedState:null)!==s&&(Qt.flags|=1024),r}function Eo(){var s=$u!==0;return $u=0,s}function xs(s,r,h){r.updateQueue=s.updateQueue,r.flags&=-2053,s.lanes&=~h}function ru(s){if(Ja){for(s=s.memoizedState;s!==null;){var r=s.queue;r!==null&&(r.pending=null),s=s.next}Ja=!1}Yi=0,Ke=he=Qt=null,Be=!1,Le=$u=0,Yr=null}function cn(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?Qt.memoizedState=Ke=s:Ke=Ke.next=s,Ke}function De(){if(he===null){var s=Qt.alternate;s=s!==null?s.memoizedState:null}else s=he.next;var r=Ke===null?Qt.memoizedState:Ke.next;if(r!==null)Ke=r,he=s;else{if(s===null)throw Qt.alternate===null?Error(o(467)):Error(o(310));he=s,s={memoizedState:he.memoizedState,baseState:he.baseState,baseQueue:he.baseQueue,queue:he.queue,next:null},Ke===null?Qt.memoizedState=Ke=s:Ke=Ke.next=s}return Ke}function Ii(s){var r=Le;return Le+=1,Yr===null&&(Yr=[]),s=su(Yr,s,r),r=Qt,(Ke===null?r.memoizedState:Ke.next)===null&&(r=r.alternate,Nt.H=r===null||r.memoizedState===null?an:Hn),s}function $i(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Ii(s);if(s.$$typeof===Oi)return bn(s)}throw Error(o(438,String(s)))}function tn(s){var r=null,h=Qt.updateQueue;if(h!==null&&(r=h.memoCache),r==null){var g=Qt.alternate;g!==null&&(g=g.updateQueue,g!==null&&(g=g.memoCache,g!=null&&(r={data:g.data.map(function(S){return S.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),h===null&&(h=Sc(),Qt.updateQueue=h),h.memoCache=r,h=r.data[r.index],h===void 0)for(h=r.data[r.index]=Array(s),g=0;g<s;g++)h[g]=Pd;return r.index++,h}function Ti(s,r){return typeof r=="function"?r(s):r}function uu(s){var r=De();return tl(r,he,s)}function tl(s,r,h){var g=s.queue;if(g===null)throw Error(o(311));g.lastRenderedReducer=h;var S=s.baseQueue,T=g.pending;if(T!==null){if(S!==null){var N=S.next;S.next=T.next,T.next=N}r.baseQueue=S=T,g.pending=null}if(T=s.baseState,S===null)s.memoizedState=T;else{r=S.next;var q=N=null,W=null,ct=r,_t=!1;do{var St=ct.lane&-536870913;if(St!==ct.lane?(Kt&St)===St:(Yi&St)===St){var bt=ct.revertLane;if(bt===0)W!==null&&(W=W.next={lane:0,revertLane:0,action:ct.action,hasEagerState:ct.hasEagerState,eagerState:ct.eagerState,next:null}),St===ra&&(_t=!0);else if((Yi&bt)===bt){ct=ct.next,bt===ra&&(_t=!0);continue}else St={lane:0,revertLane:ct.revertLane,action:ct.action,hasEagerState:ct.hasEagerState,eagerState:ct.eagerState,next:null},W===null?(q=W=St,N=T):W=W.next=St,Qt.lanes|=bt,Na|=bt;St=ct.action,yl&&h(T,St),T=ct.hasEagerState?ct.eagerState:h(T,St)}else bt={lane:St,revertLane:ct.revertLane,action:ct.action,hasEagerState:ct.hasEagerState,eagerState:ct.eagerState,next:null},W===null?(q=W=bt,N=T):W=W.next=bt,Qt.lanes|=St,Na|=St;ct=ct.next}while(ct!==null&&ct!==r);if(W===null?N=T:W.next=q,!Ea(T,s.memoizedState)&&(Ze=!0,_t&&(h=ls,h!==null)))throw h;s.memoizedState=T,s.baseState=N,s.baseQueue=W,g.lastRenderedState=T}return S===null&&(g.lanes=0),[s.memoizedState,g.dispatch]}function Nl(s){var r=De(),h=r.queue;if(h===null)throw Error(o(311));h.lastRenderedReducer=s;var g=h.dispatch,S=h.pending,T=r.memoizedState;if(S!==null){h.pending=null;var N=S=S.next;do T=s(T,N.action),N=N.next;while(N!==S);Ea(T,r.memoizedState)||(Ze=!0),r.memoizedState=T,r.baseQueue===null&&(r.baseState=T),h.lastRenderedState=T}return[T,g]}function _d(s,r,h){var g=Qt,S=De(),T=se;if(T){if(h===void 0)throw Error(o(407));h=h()}else h=r();var N=!Ea((he||S).memoizedState,h);if(N&&(S.memoizedState=h,Ze=!0),S=S.queue,hu(Sd.bind(null,g,S,s),[s]),S.getSnapshot!==r||N||Ke!==null&&Ke.memoizedState.tag&1){if(g.flags|=2048,_s(9,lf.bind(null,g,S,h,r),{destroy:void 0},null),Wt===null)throw Error(o(349));T||(Yi&60)!==0||af(g,r,h)}return h}function af(s,r,h){s.flags|=16384,s={getSnapshot:r,value:h},r=Qt.updateQueue,r===null?(r=Sc(),Qt.updateQueue=r,r.stores=[s]):(h=r.stores,h===null?r.stores=[s]:h.push(s))}function lf(s,r,h,g){r.value=h,r.getSnapshot=g,ou(r)&&cu(s)}function Sd(s,r,h){return h(function(){ou(r)&&cu(s)})}function ou(s){var r=s.getSnapshot;s=s.value;try{var h=r();return!Ea(s,h)}catch{return!0}}function cu(s){var r=ei(s,2);r!==null&&Nn(r,s,2)}function ai(s){var r=cn();if(typeof s=="function"){var h=s;if(s=h(),yl){G(!0);try{h()}finally{G(!1)}}}return r.memoizedState=r.baseState=s,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ti,lastRenderedState:s},r}function ya(s,r,h,g){return s.baseState=h,tl(s,he,typeof g=="function"?g:Ti)}function bd(s,r,h,g,S){if(Es(s))throw Error(o(485));if(s=r.action,s!==null){var T={payload:S,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){T.listeners.push(N)}};Nt.T!==null?h(!0):T.isTransition=!1,g(T),h=r.pending,h===null?(T.next=r.pending=T,Td(r,T)):(T.next=h.next,r.pending=h.next=T)}}function Td(s,r){var h=r.action,g=r.payload,S=s.state;if(r.isTransition){var T=Nt.T,N={};Nt.T=N;try{var q=h(S,g),W=Nt.S;W!==null&&W(N,q),Co(s,r,q)}catch(ct){cr(s,r,ct)}finally{Nt.T=T}}else try{T=h(S,g),Co(s,r,T)}catch(ct){cr(s,r,ct)}}function Co(s,r,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(g){sf(s,r,g)},function(g){return cr(s,r,g)}):sf(s,r,h)}function sf(s,r,h){r.status="fulfilled",r.value=h,Ed(r),s.state=h,r=s.pending,r!==null&&(h=r.next,h===r?s.pending=null:(h=h.next,r.next=h,Td(s,h)))}function cr(s,r,h){var g=s.pending;if(s.pending=null,g!==null){g=g.next;do r.status="rejected",r.reason=h,Ed(r),r=r.next;while(r!==g)}s.action=null}function Ed(s){s=s.listeners;for(var r=0;r<s.length;r++)(0,s[r])()}function ga(s,r){return r}function Ao(s,r){if(se){var h=Wt.formState;if(h!==null){t:{var g=Qt;if(se){if(Mn){var S=am(Mn,ka);if(S){Mn=sh(S),g=im(S);break t}}fe(g)}g=!1}g&&(r=h[0])}}h=cn(),h.memoizedState=h.baseState=r,g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:r},h.queue=g,h=No.bind(null,Qt,g),g.dispatch=h,g=ai(!1);var T=wo.bind(null,Qt,!1,g.queue);return g=cn(),S={state:r,dispatch:null,action:s,pending:null},g.queue=S,h=bd.bind(null,Qt,S,T,h),S.dispatch=h,g.memoizedState=s,[r,h,!1]}function rf(s){var r=De();return Mo(r,he,s)}function Mo(s,r,h){r=tl(s,r,ga)[0],s=uu(Ti)[0],r=typeof r=="object"&&r!==null&&typeof r.then=="function"?Ii(r):r;var g=De(),S=g.queue,T=S.dispatch;return h!==g.memoizedState&&(Qt.flags|=2048,_s(9,fr.bind(null,S,h),{destroy:void 0},null)),[r,T,s]}function fr(s,r){s.action=r}function uf(s){var r=De(),h=he;if(h!==null)return Mo(r,h,s);De(),r=r.memoizedState,h=De();var g=h.queue.dispatch;return h.memoizedState=s,[r,g,!1]}function _s(s,r,h,g){return s={tag:s,create:r,inst:h,deps:g,next:null},r=Qt.updateQueue,r===null&&(r=Sc(),Qt.updateQueue=r),h=r.lastEffect,h===null?r.lastEffect=s.next=s:(g=h.next,h.next=s,s.next=g,r.lastEffect=s),s}function Ss(){return De().memoizedState}function Ro(s,r,h,g){var S=cn();Qt.flags|=s,S.memoizedState=_s(1|r,h,{destroy:void 0},g===void 0?null:g)}function fu(s,r,h,g){var S=De();g=g===void 0?null:g;var T=S.memoizedState.inst;he!==null&&g!==null&&zn(g,he.memoizedState.deps)?S.memoizedState=_s(r,h,T,g):(Qt.flags|=s,S.memoizedState=_s(1|r,h,T,g))}function of(s,r){Ro(8390656,8,s,r)}function hu(s,r){fu(2048,8,s,r)}function Cd(s,r){return fu(4,2,s,r)}function Ad(s,r){return fu(4,4,s,r)}function du(s,r){if(typeof r=="function"){s=s();var h=r(s);return function(){typeof h=="function"?h():r(null)}}if(r!=null)return s=s(),r.current=s,function(){r.current=null}}function Ei(s,r,h){h=h!=null?h.concat([s]):null,fu(4,4,du.bind(null,r,s),h)}function mu(){}function zo(s,r){var h=De();r=r===void 0?null:r;var g=h.memoizedState;return r!==null&&zn(r,g[1])?g[0]:(h.memoizedState=[s,r],s)}function bs(s,r){var h=De();r=r===void 0?null:r;var g=h.memoizedState;if(r!==null&&zn(r,g[1]))return g[0];if(g=s(),yl){G(!0);try{s()}finally{G(!1)}}return h.memoizedState=[g,r],g}function wl(s,r,h){return h===void 0||(Yi&1073741824)!==0?s.memoizedState=r:(s.memoizedState=h,s=Mi(),Qt.lanes|=s,Na|=s,h)}function cf(s,r,h,g){return Ea(h,r)?h:ji.current!==null?(s=wl(s,h,g),Ea(s,r)||(Ze=!0),s):(Yi&42)===0?(Ze=!0,s.memoizedState=h):(s=Mi(),Qt.lanes|=s,Na|=s,r)}function Do(s,r,h,g,S){var T=fn();Bn(T!==0&&8>T?T:8);var N=Nt.T,q={};Nt.T=q,wo(s,!1,r,h);try{var W=S(),ct=Nt.S;if(ct!==null&&ct(q,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var _t=yd(W,g);Ul(s,r,_t,Qn(s))}else Ul(s,r,g,Qn(s))}catch(St){Ul(s,r,{then:function(){},status:"rejected",reason:St},Qn())}finally{Bn(T),Nt.T=N}}function ff(s){var r=s.memoizedState;if(r!==null)return r;r={memoizedState:ia,baseState:ia,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ti,lastRenderedState:ia},next:null};var h={};return r.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ti,lastRenderedState:h},next:null},s.memoizedState=r,s=s.alternate,s!==null&&(s.memoizedState=r),r}function Ts(){return bn(Ht)}function Ci(){return De().memoizedState}function Oo(){return De().memoizedState}function pu(s){for(var r=s.return;r!==null;){switch(r.tag){case 24:case 3:var h=Qn();s=qa(h);var g=$e(r,s,h);g!==null&&(Nn(g,r,h),La(g,r,h)),r={cache:jo()},s.payload=r;return}r=r.return}}function Bl(s,r,h){var g=Qn();h={lane:g,revertLane:0,action:h,hasEagerState:!1,eagerState:null,next:null},Es(s)?yu(r,h):(h=ys(s,r,h,g),h!==null&&(Nn(h,s,g),hf(h,r,g)))}function No(s,r,h){var g=Qn();Ul(s,r,h,g)}function Ul(s,r,h,g){var S={lane:g,revertLane:0,action:h,hasEagerState:!1,eagerState:null,next:null};if(Es(s))yu(r,S);else{var T=s.alternate;if(s.lanes===0&&(T===null||T.lanes===0)&&(T=r.lastRenderedReducer,T!==null))try{var N=r.lastRenderedState,q=T(N,h);if(S.hasEagerState=!0,S.eagerState=q,Ea(q,N))return $n(s,r,S,0),Wt===null&&pn(),!1}catch{}finally{}if(h=ys(s,r,S,g),h!==null)return Nn(h,s,g),hf(h,r,g),!0}return!1}function wo(s,r,h,g){if(g={lane:2,revertLane:go(),action:g,hasEagerState:!1,eagerState:null,next:null},Es(s)){if(r)throw Error(o(479))}else r=ys(s,h,g,2),r!==null&&Nn(r,s,2)}function Es(s){var r=s.alternate;return s===Qt||r!==null&&r===Qt}function yu(s,r){Be=Ja=!0;var h=s.pending;h===null?r.next=r:(r.next=h.next,h.next=r),s.pending=r}function hf(s,r,h){if((h&4194176)!==0){var g=r.lanes;g&=s.pendingLanes,h|=g,r.lanes=h,xt(s,h)}}function Dn(s,r,h,g){r=s.memoizedState,h=h(g,r),h=h==null?r:Bs({},r,h),s.memoizedState=h,s.lanes===0&&(s.updateQueue.baseState=h)}function Hl(s,r,h,g,S,T,N){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(g,T,N):r.prototype&&r.prototype.isPureReactComponent?!vs(h,g)||!vs(S,T):!0}function gu(s,r,h,g){s=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(h,g),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(h,g),r.state!==s&&bc.enqueueReplaceState(r,r.state,null)}function ii(s,r){var h=r;if("ref"in r){h={};for(var g in r)g!=="ref"&&(h[g]=r[g])}if(s=s.defaultProps){h===r&&(h=Bs({},h));for(var S in s)h[S]===void 0&&(h[S]=s[S])}return h}function Bo(s,r){try{var h=s.onUncaughtError;h(r.value,{componentStack:r.stack})}catch(g){setTimeout(function(){throw g})}}function Uo(s,r,h){try{var g=s.onCaughtError;g(h.value,{componentStack:h.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(S){setTimeout(function(){throw S})}}function vu(s,r,h){return h=qa(h),h.tag=3,h.payload={element:null},h.callback=function(){Bo(s,r)},h}function hr(s){return s=qa(s),s.tag=3,s}function xu(s,r,h,g){var S=h.type.getDerivedStateFromError;if(typeof S=="function"){var T=g.value;s.payload=function(){return S(T)},s.callback=function(){Uo(r,h,g)}}var N=h.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(s.callback=function(){Uo(r,h,g),typeof S!="function"&&(Ba===null?Ba=new Set([this]):Ba.add(this));var q=g.stack;this.componentDidCatch(g.value,{componentStack:q!==null?q:""})})}function Md(s,r,h,g,S){if(h.flags|=32768,g!==null&&typeof g=="object"&&typeof g.then=="function"){if(r=h.alternate,r!==null&&Cs(r,h,S,!0),h=Da.current,h!==null){switch(h.tag){case 13:return Za===null?aa():h.alternate===null&&ae===0&&(ae=3),h.flags&=-257,h.flags|=65536,h.lanes=S,g===_c?h.flags|=16384:(r=h.updateQueue,r===null?h.updateQueue=new Set([g]):r.add(g),Io(s,g,S)),!1;case 22:return h.flags|=65536,g===_c?h.flags|=16384:(r=h.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([g])},h.updateQueue=r):(h=r.retryQueue,h===null?r.retryQueue=new Set([g]):h.add(g)),Io(s,g,S)),!1}throw Error(o(435,h.tag))}return Io(s,g,S),aa(),!1}if(se)return r=Da.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=S,g!==Ju&&(s=Error(o(422),{cause:g}),In(et(s,h)))):(g!==Ju&&(r=Error(o(423),{cause:g}),In(et(r,h))),s=s.current.alternate,s.flags|=65536,S&=-S,s.lanes|=S,g=et(g,h),S=vu(s.stateNode,g,S),Ln(s,S),ae!==4&&(ae=2)),!1;var T=Error(o(520),{cause:g});if(T=et(T,h),Lr===null?Lr=[T]:Lr.push(T),ae!==4&&(ae=2),r===null)return!0;g=et(g,h),h=r;do{switch(h.tag){case 3:return h.flags|=65536,s=S&-S,h.lanes|=s,s=vu(h.stateNode,g,s),Ln(h,s),!1;case 1:if(r=h.type,T=h.stateNode,(h.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Ba===null||!Ba.has(T))))return h.flags|=65536,S&=-S,h.lanes|=S,S=hr(S),xu(S,s,h,g),Ln(h,S),!1}h=h.return}while(h!==null);return!1}function Sn(s,r,h,g){r.child=s===null?Sh(r,null,h,g):ss(r,s.child,h,g)}function Rd(s,r,h,g,S){h=h.render;var T=r.ref;if("ref"in g){var N={};for(var q in g)q!=="ref"&&(N[q]=g[q])}else N=g;return As(r),g=Ol(s,r,h,N,T,S),q=Eo(),s!==null&&!Ze?(xs(s,r,S),el(s,r,S)):(se&&q&&I(r),r.flags|=1,Sn(s,r,g,S),r.child)}function zd(s,r,h,g,S){if(s===null){var T=h.type;return typeof T=="function"&&!rl(T)&&T.defaultProps===void 0&&h.compare===null?(r.tag=15,r.type=T,Ho(s,r,T,g,S)):(s=Xa(h.type,null,g,r,r.mode,S),s.ref=r.ref,s.return=r,r.child=s)}if(T=s.child,!xf(s,S)){var N=T.memoizedProps;if(h=h.compare,h=h!==null?h:vs,h(N,g)&&s.ref===r.ref)return el(s,r,S)}return r.flags|=1,s=wn(T,g),s.ref=r.ref,s.return=r,r.child=s}function Ho(s,r,h,g,S){if(s!==null){var T=s.memoizedProps;if(vs(T,g)&&s.ref===r.ref)if(Ze=!1,r.pendingProps=g=T,xf(s,S))(s.flags&131072)!==0&&(Ze=!0);else return r.lanes=s.lanes,el(s,r,S)}return df(s,r,h,g,S)}function Dd(s,r,h){var g=r.pendingProps,S=g.children,T=(r.stateNode._pendingVisibility&2)!==0,N=s!==null?s.memoizedState:null;if(_u(s,r),g.mode==="hidden"||T){if((r.flags&128)!==0){if(g=N!==null?N.baseLanes|h:h,s!==null){for(S=r.child=s.child,T=0;S!==null;)T=T|S.lanes|S.childLanes,S=S.sibling;r.childLanes=T&~g}else r.childLanes=0,r.child=null;return Od(s,r,g,h)}if((h&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},s!==null&&Yo(r,N!==null?N.cachePool:null),N!==null?nf(r,N):_o(),bo(r);else return r.lanes=r.childLanes=536870912,Od(s,r,N!==null?N.baseLanes|h:h,h)}else N!==null?(Yo(r,N.cachePool),nf(r,N),Fi(),r.memoizedState=null):(s!==null&&Yo(r,null),_o(),Fi());return Sn(s,r,S,h),r.child}function Od(s,r,h,g){var S=Yl();return S=S===null?null:{parent:wi?me._currentValue:me._currentValue2,pool:S},r.memoizedState={baseLanes:h,cachePool:S},s!==null&&Yo(r,null),_o(),bo(r),s!==null&&Cs(s,r,g,!0),null}function _u(s,r){var h=r.ref;if(h===null)s!==null&&s.ref!==null&&(r.flags|=2097664);else{if(typeof h!="function"&&typeof h!="object")throw Error(o(284));(s===null||s.ref!==h)&&(r.flags|=2097664)}}function df(s,r,h,g,S){return As(r),h=Ol(s,r,h,g,void 0,S),g=Eo(),s!==null&&!Ze?(xs(s,r,S),el(s,r,S)):(se&&g&&I(r),r.flags|=1,Sn(s,r,h,S),r.child)}function Nd(s,r,h,g,S,T){return As(r),r.updateQueue=null,h=xd(r,g,h,S),To(s),g=Eo(),s!==null&&!Ze?(xs(s,r,T),el(s,r,T)):(se&&g&&I(r),r.flags|=1,Sn(s,r,h,T),r.child)}function mf(s,r,h,g,S){if(As(r),r.stateNode===null){var T=Ys,N=h.contextType;typeof N=="object"&&N!==null&&(T=bn(N)),T=new h(g,T),r.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,T.updater=bc,r.stateNode=T,T._reactInternals=r,T=r.stateNode,T.props=g,T.state=r.memoizedState,T.refs={},tf(r),N=h.contextType,T.context=typeof N=="object"&&N!==null?bn(N):Ys,T.state=r.memoizedState,N=h.getDerivedStateFromProps,typeof N=="function"&&(Dn(r,h,N,g),T.state=r.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(N=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),N!==T.state&&bc.enqueueReplaceState(T,T.state,null),au(r,g,T,S),nu(),T.state=r.memoizedState),typeof T.componentDidMount=="function"&&(r.flags|=4194308),g=!0}else if(s===null){T=r.stateNode;var q=r.memoizedProps,W=ii(h,q);T.props=W;var ct=T.context,_t=h.contextType;N=Ys,typeof _t=="object"&&_t!==null&&(N=bn(_t));var St=h.getDerivedStateFromProps;_t=typeof St=="function"||typeof T.getSnapshotBeforeUpdate=="function",q=r.pendingProps!==q,_t||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(q||ct!==N)&&gu(r,T,g,N),pl=!1;var bt=r.memoizedState;T.state=bt,au(r,g,T,S),nu(),ct=r.memoizedState,q||bt!==ct||pl?(typeof St=="function"&&(Dn(r,h,St,g),ct=r.memoizedState),(W=pl||Hl(r,h,W,g,bt,ct,N))?(_t||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(r.flags|=4194308)):(typeof T.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=g,r.memoizedState=ct),T.props=g,T.state=ct,T.context=N,g=W):(typeof T.componentDidMount=="function"&&(r.flags|=4194308),g=!1)}else{T=r.stateNode,ef(s,r),N=r.memoizedProps,_t=ii(h,N),T.props=_t,St=r.pendingProps,bt=T.context,ct=h.contextType,W=Ys,typeof ct=="object"&&ct!==null&&(W=bn(ct)),q=h.getDerivedStateFromProps,(ct=typeof q=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(N!==St||bt!==W)&&gu(r,T,g,W),pl=!1,bt=r.memoizedState,T.state=bt,au(r,g,T,S),nu();var qt=r.memoizedState;N!==St||bt!==qt||pl||s!==null&&s.dependencies!==null&&jl(s.dependencies)?(typeof q=="function"&&(Dn(r,h,q,g),qt=r.memoizedState),(_t=pl||Hl(r,h,_t,g,bt,qt,W)||s!==null&&s.dependencies!==null&&jl(s.dependencies))?(ct||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(g,qt,W),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(g,qt,W)),typeof T.componentDidUpdate=="function"&&(r.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof T.componentDidUpdate!="function"||N===s.memoizedProps&&bt===s.memoizedState||(r.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||N===s.memoizedProps&&bt===s.memoizedState||(r.flags|=1024),r.memoizedProps=g,r.memoizedState=qt),T.props=g,T.state=qt,T.context=W,g=_t):(typeof T.componentDidUpdate!="function"||N===s.memoizedProps&&bt===s.memoizedState||(r.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||N===s.memoizedProps&&bt===s.memoizedState||(r.flags|=1024),g=!1)}return T=g,_u(s,r),g=(r.flags&128)!==0,T||g?(T=r.stateNode,h=g&&typeof h.getDerivedStateFromError!="function"?null:T.render(),r.flags|=1,s!==null&&g?(r.child=ss(r,s.child,null,S),r.child=ss(r,null,h,S)):Sn(s,r,h,S),r.memoizedState=T.state,s=r.child):s=el(s,r,S),s}function wd(s,r,h,g){return qn(),r.flags|=256,Sn(s,r,h,g),r.child}function pf(s){return{baseLanes:s,cachePool:jd()}}function yf(s,r,h){return s=s!==null?s.childLanes&~h:0,r&&(s|=ca),s}function Bd(s,r,h){var g=r.pendingProps,S=!1,T=(r.flags&128)!==0,N;if((N=T)||(N=s!==null&&s.memoizedState===null?!1:(nn.current&2)!==0),N&&(S=!0,r.flags&=-129),N=(r.flags&32)!==0,r.flags&=-33,s===null){if(se){if(S?Si(r):Fi(),se){var q=Mn,W;(W=q)&&(q=om(q,ka),q!==null?(r.memoizedState={dehydrated:q,treeContext:oi!==null?{id:Hi,overflow:Qa}:null,retryLane:536870912},W=a(18,null,null,0),W.stateNode=q,W.return=r,r.child=W,Un=r,Mn=null,W=!0):W=!1),W||fe(r)}if(q=r.memoizedState,q!==null&&(q=q.dehydrated,q!==null))return qu(q)?r.lanes=16:r.lanes=536870912,null;bi(r)}return q=g.children,g=g.fallback,S?(Fi(),S=r.mode,q=gf({mode:"hidden",children:q},S),g=ol(g,S,h,null),q.return=r,g.return=r,q.sibling=g,r.child=q,S=r.child,S.memoizedState=pf(h),S.childLanes=yf(s,N,h),r.memoizedState=Gn,g):(Si(r),Su(r,q))}if(W=s.memoizedState,W!==null&&(q=W.dehydrated,q!==null)){if(T)r.flags&256?(Si(r),r.flags&=-257,r=vf(s,r,h)):r.memoizedState!==null?(Fi(),r.child=s.child,r.flags|=128,r=null):(Fi(),S=g.fallback,q=r.mode,g=gf({mode:"visible",children:g.children},q),S=ol(S,q,h,null),S.flags|=2,g.return=r,S.return=r,g.sibling=S,r.child=g,ss(r,s.child,null,h),g=r.child,g.memoizedState=pf(h),g.childLanes=yf(s,N,h),r.memoizedState=Gn,r=S);else if(Si(r),qu(q))N=nm(q).digest,g=Error(o(419)),g.stack="",g.digest=N,In({value:g,source:null,stack:null}),r=vf(s,r,h);else if(Ze||Cs(s,r,h,!1),N=(h&s.childLanes)!==0,Ze||N){if(N=Wt,N!==null){if(g=h&-h,(g&42)!==0)g=1;else switch(g){case 2:g=1;break;case 8:g=4;break;case 32:g=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:g=64;break;case 268435456:g=134217728;break;default:g=0}if(g=(g&(N.suspendedLanes|h))!==0?0:g,g!==0&&g!==W.retryLane)throw W.retryLane=g,ei(s,g),Nn(N,s,g),Em}cc(q)||aa(),r=vf(s,r,h)}else cc(q)?(r.flags|=128,r.child=s.child,r=Ns.bind(null,s),Vp(q,r),r=null):(s=W.treeContext,kn&&(Mn=sm(q),Un=r,se=!0,Ma=null,ka=!1,s!==null&&(Ca[Aa++]=Hi,Ca[Aa++]=Qa,Ca[Aa++]=oi,Hi=s.id,Qa=s.overflow,oi=r)),r=Su(r,g.children),r.flags|=4096);return r}return S?(Fi(),S=g.fallback,q=r.mode,W=s.child,T=W.sibling,g=wn(W,{mode:"hidden",children:g.children}),g.subtreeFlags=W.subtreeFlags&31457280,T!==null?S=wn(T,S):(S=ol(S,q,h,null),S.flags|=2),S.return=r,g.return=r,g.sibling=S,r.child=g,g=S,S=r.child,q=s.child.memoizedState,q===null?q=pf(h):(W=q.cachePool,W!==null?(T=wi?me._currentValue:me._currentValue2,W=W.parent!==T?{parent:T,pool:T}:W):W=jd(),q={baseLanes:q.baseLanes|h,cachePool:W}),S.memoizedState=q,S.childLanes=yf(s,N,h),r.memoizedState=Gn,g):(Si(r),h=s.child,s=h.sibling,h=wn(h,{mode:"visible",children:g.children}),h.return=r,h.sibling=null,s!==null&&(N=r.deletions,N===null?(r.deletions=[s],r.flags|=16):N.push(s)),r.child=h,r.memoizedState=null,h)}function Su(s,r){return r=gf({mode:"visible",children:r},s.mode),r.return=s,s.child=r}function gf(s,r){return $o(s,r,0,null)}function vf(s,r,h){return ss(r,s.child,null,h),s=Su(r,r.pendingProps.children),s.flags|=2,r.memoizedState=null,s}function Ud(s,r,h){s.lanes|=r;var g=s.alternate;g!==null&&(g.lanes|=r),_f(s.return,r,h)}function Go(s,r,h,g,S){var T=s.memoizedState;T===null?s.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:g,tail:h,tailMode:S}:(T.isBackwards=r,T.rendering=null,T.renderingStartTime=0,T.last=g,T.tail=h,T.tailMode=S)}function Hd(s,r,h){var g=r.pendingProps,S=g.revealOrder,T=g.tail;if(Sn(s,r,g.children,h),g=nn.current,(g&2)!==0)g=g&1|2,r.flags|=128;else{if(s!==null&&(s.flags&128)!==0)t:for(s=r.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&Ud(s,h,r);else if(s.tag===19)Ud(s,h,r);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break t;for(;s.sibling===null;){if(s.return===null||s.return===r)break t;s=s.return}s.sibling.return=s.return,s=s.sibling}g&=1}switch(w(nn,g),S){case"forwards":for(h=r.child,S=null;h!==null;)s=h.alternate,s!==null&&ni(s)===null&&(S=h),h=h.sibling;h=S,h===null?(S=r.child,r.child=null):(S=h.sibling,h.sibling=null),Go(r,!1,S,h,T);break;case"backwards":for(h=null,S=r.child,r.child=null;S!==null;){if(s=S.alternate,s!==null&&ni(s)===null){r.child=S;break}s=S.sibling,S.sibling=h,h=S,S=s}Go(r,!0,h,null,T);break;case"together":Go(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function el(s,r,h){if(s!==null&&(r.dependencies=s.dependencies),Na|=r.lanes,(h&r.childLanes)===0)if(s!==null){if(Cs(s,r,h,!1),(h&r.childLanes)===0)return null}else return null;if(s!==null&&r.child!==s.child)throw Error(o(153));if(r.child!==null){for(s=r.child,h=wn(s,s.pendingProps),r.child=h,h.return=r;s.sibling!==null;)s=s.sibling,h=h.sibling=wn(s,s.pendingProps),h.return=r;h.sibling=null}return r.child}function xf(s,r){return(s.lanes&r)!==0?!0:(s=s.dependencies,!!(s!==null&&jl(s)))}function qp(s,r,h){switch(r.tag){case 3:vt(r,r.stateNode.containerInfo),Gl(r,me,s.memoizedState.cache),qn();break;case 27:case 5:Ot(r);break;case 4:vt(r,r.stateNode.containerInfo);break;case 10:Gl(r,r.type,r.memoizedProps.value);break;case 13:var g=r.memoizedState;if(g!==null)return g.dehydrated!==null?(Si(r),r.flags|=128,null):(h&r.child.childLanes)!==0?Bd(s,r,h):(Si(r),s=el(s,r,h),s!==null?s.sibling:null);Si(r);break;case 19:var S=(s.flags&128)!==0;if(g=(h&r.childLanes)!==0,g||(Cs(s,r,h,!1),g=(h&r.childLanes)!==0),S){if(g)return Hd(s,r,h);r.flags|=128}if(S=r.memoizedState,S!==null&&(S.rendering=null,S.tail=null,S.lastEffect=null),w(nn,nn.current),g)break;return null;case 22:case 23:return r.lanes=0,Dd(s,r,h);case 24:Gl(r,me,s.memoizedState.cache)}return el(s,r,h)}function Gd(s,r,h){if(s!==null)if(s.memoizedProps!==r.pendingProps)Ze=!0;else{if(!xf(s,h)&&(r.flags&128)===0)return Ze=!1,qp(s,r,h);Ze=(s.flags&131072)!==0}else Ze=!1,se&&(r.flags&1048576)!==0&&j(r,Ku,r.index);switch(r.lanes=0,r.tag){case 16:t:{s=r.pendingProps;var g=r.elementType,S=g._init;if(g=S(g._payload),r.type=g,typeof g=="function")rl(g)?(s=ii(g,s),r.tag=1,r=mf(null,r,g,s,h)):(r.tag=0,r=df(null,r,g,s,h));else{if(g!=null){if(S=g.$$typeof,S===Rr){r.tag=11,r=Rd(null,r,g,s,h);break t}else if(S===Nu){r.tag=14,r=zd(null,r,g,s,h);break t}}throw r=d(g)||g,Error(o(306,r,""))}}return r;case 0:return df(s,r,r.type,r.pendingProps,h);case 1:return g=r.type,S=ii(g,r.pendingProps),mf(s,r,g,S,h);case 3:t:{if(vt(r,r.stateNode.containerInfo),s===null)throw Error(o(387));var T=r.pendingProps;S=r.memoizedState,g=S.element,ef(s,r),au(r,T,null,h);var N=r.memoizedState;if(T=N.cache,Gl(r,me,T),T!==S.cache&&Sf(r,[me],h,!0),nu(),T=N.element,kn&&S.isDehydrated)if(S={element:T,isDehydrated:!1,cache:N.cache},r.updateQueue.baseState=S,r.memoizedState=S,r.flags&256){r=wd(s,r,T,h);break t}else if(T!==g){g=et(Error(o(424)),r),In(g),r=wd(s,r,T,h);break t}else for(kn&&(Mn=lm(r.stateNode.containerInfo),Un=r,se=!0,Ma=null,ka=!0),h=Sh(r,null,T,h),r.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(qn(),T===g){r=el(s,r,h);break t}Sn(s,r,T,h)}r=r.child}return r;case 26:if(Ta)return _u(s,r),s===null?(h=pc(r.type,null,r.pendingProps,null))?r.memoizedState=h:se||(r.stateNode=kp(r.type,r.pendingProps,ci.current,r)):r.memoizedState=pc(r.type,s.memoizedProps,r.pendingProps,s.memoizedState),null;case 27:if(Cn)return Ot(r),s===null&&Cn&&se&&(g=r.stateNode=gh(r.type,r.pendingProps,ci.current,_n.current,!1),Un=r,ka=!0,Mn=fc(g)),g=r.pendingProps.children,s!==null||se?Sn(s,r,g,h):r.child=ss(r,null,g,h),_u(s,r),r.child;case 5:return s===null&&se&&(mm(r.type,r.pendingProps,_n.current),(S=g=Mn)&&(g=rm(g,r.type,r.pendingProps,ka),g!==null?(r.stateNode=g,Un=r,Mn=fc(g),ka=!1,S=!0):S=!1),S||fe(r)),Ot(r),S=r.type,T=r.pendingProps,N=s!==null?s.memoizedProps:null,g=T.children,es(S,T)?g=null:N!==null&&es(S,N)&&(r.flags|=32),r.memoizedState!==null&&(S=Ol(s,r,Yp,null,null,h),wi?Ht._currentValue=S:Ht._currentValue2=S),_u(s,r),Sn(s,r,g,h),r.child;case 6:return s===null&&se&&(pm(r.pendingProps,_n.current),(s=h=Mn)&&(h=um(h,r.pendingProps,ka),h!==null?(r.stateNode=h,Un=r,Mn=null,s=!0):s=!1),s||fe(r)),null;case 13:return Bd(s,r,h);case 4:return vt(r,r.stateNode.containerInfo),g=r.pendingProps,s===null?r.child=ss(r,null,g,h):Sn(s,r,g,h),r.child;case 11:return Rd(s,r,r.type,r.pendingProps,h);case 7:return Sn(s,r,r.pendingProps,h),r.child;case 8:return Sn(s,r,r.pendingProps.children,h),r.child;case 12:return Sn(s,r,r.pendingProps.children,h),r.child;case 10:return g=r.pendingProps,Gl(r,r.type,g.value),Sn(s,r,g.children,h),r.child;case 9:return S=r.type._context,g=r.pendingProps.children,As(r),S=bn(S),g=g(S),r.flags|=1,Sn(s,r,g,h),r.child;case 14:return zd(s,r,r.type,r.pendingProps,h);case 15:return Ho(s,r,r.type,r.pendingProps,h);case 19:return Hd(s,r,h);case 22:return Dd(s,r,h);case 24:return As(r),g=bn(me),s===null?(S=Yl(),S===null&&(S=Wt,T=jo(),S.pooledCache=T,T.refCount++,T!==null&&(S.pooledCacheLanes|=h),S=T),r.memoizedState={parent:g,cache:S},tf(r),Gl(r,me,S)):((s.lanes&h)!==0&&(ef(s,r),au(r,null,null,h),nu()),S=s.memoizedState,T=r.memoizedState,S.parent!==g?(S={parent:g,cache:g},r.memoizedState=S,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=S),Gl(r,me,g)):(g=T.cache,Gl(r,me,g),g!==S.cache&&Sf(r,[me],h,!0))),Sn(s,r,r.pendingProps.children,h),r.child;case 29:throw r.pendingProps}throw Error(o(156,r.tag))}function Gl(s,r,h){wi?(w(ua,r._currentValue),r._currentValue=h):(w(ua,r._currentValue2),r._currentValue2=h)}function nl(s){var r=ua.current;wi?s._currentValue=r:s._currentValue2=r,D(ua)}function _f(s,r,h){for(;s!==null;){var g=s.alternate;if((s.childLanes&r)!==r?(s.childLanes|=r,g!==null&&(g.childLanes|=r)):g!==null&&(g.childLanes&r)!==r&&(g.childLanes|=r),s===h)break;s=s.return}}function Sf(s,r,h,g){var S=s.child;for(S!==null&&(S.return=s);S!==null;){var T=S.dependencies;if(T!==null){var N=S.child;T=T.firstContext;t:for(;T!==null;){var q=T;T=S;for(var W=0;W<r.length;W++)if(q.context===r[W]){T.lanes|=h,q=T.alternate,q!==null&&(q.lanes|=h),_f(T.return,h,s),g||(N=null);break t}T=q.next}}else if(S.tag===18){if(N=S.return,N===null)throw Error(o(341));N.lanes|=h,T=N.alternate,T!==null&&(T.lanes|=h),_f(N,h,s),N=null}else N=S.child;if(N!==null)N.return=S;else for(N=S;N!==null;){if(N===s){N=null;break}if(S=N.sibling,S!==null){S.return=N.return,N=S;break}N=N.return}S=N}}function Cs(s,r,h,g){s=null;for(var S=r,T=!1;S!==null;){if(!T){if((S.flags&524288)!==0)T=!0;else if((S.flags&262144)!==0)break}if(S.tag===10){var N=S.alternate;if(N===null)throw Error(o(387));if(N=N.memoizedProps,N!==null){var q=S.type;Ea(S.pendingProps.value,N.value)||(s!==null?s.push(q):s=[q])}}else if(S===Ur.current){if(N=S.alternate,N===null)throw Error(o(387));N.memoizedState.memoizedState!==S.memoizedState.memoizedState&&(s!==null?s.push(Ht):s=[Ht])}S=S.return}s!==null&&Sf(r,s,h,g),r.flags|=262144}function jl(s){for(s=s.firstContext;s!==null;){var r=s.context;if(!Ea(wi?r._currentValue:r._currentValue2,s.memoizedValue))return!0;s=s.next}return!1}function As(s){us=s,Xe=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function bn(s){return bf(us,s)}function bu(s,r){return us===null&&As(s),bf(s,r)}function bf(s,r){var h=wi?r._currentValue:r._currentValue2;if(r={context:r,memoizedValue:h,next:null},Xe===null){if(s===null)throw Error(o(308));Xe=r,s.dependencies={lanes:0,firstContext:r},s.flags|=524288}else Xe=Xe.next=r;return h}function jo(){return{controller:new Cm,data:new Map,refCount:0}}function dr(s){s.refCount--,s.refCount===0&&gl(Xs,function(){s.controller.abort()})}function Yl(){var s=vl.current;return s!==null?s:Wt.pooledCache}function Yo(s,r){r===null?w(vl,vl.current):w(vl,r.pool)}function jd(){var s=Yl();return s===null?null:{parent:wi?me._currentValue:me._currentValue2,pool:s}}function va(s){s.flags|=4}function Tf(s,r){if(s!==null&&s.child===r.child)return!1;if((r.flags&16)!==0)return!0;for(s=r.child;s!==null;){if((s.flags&13878)!==0||(s.subtreeFlags&13878)!==0)return!0;s=s.sibling}return!1}function qo(s,r,h,g){if(En)for(h=r.child;h!==null;){if(h.tag===5||h.tag===6)Ni(s,h.stateNode);else if(!(h.tag===4||Cn&&h.tag===27)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===r)break;for(;h.sibling===null;){if(h.return===null||h.return===r)return;h=h.return}h.sibling.return=h.return,h=h.sibling}else if(Sa)for(var S=r.child;S!==null;){if(S.tag===5){var T=S.stateNode;h&&g&&(T=ih(T,S.type,S.memoizedProps)),Ni(s,T)}else if(S.tag===6)T=S.stateNode,h&&g&&(T=lh(T,S.memoizedProps)),Ni(s,T);else if(S.tag!==4){if(S.tag===22&&S.memoizedState!==null)T=S.child,T!==null&&(T.return=S),qo(s,S,!0,!0);else if(S.child!==null){S.child.return=S,S=S.child;continue}}if(S===r)break;for(;S.sibling===null;){if(S.return===null||S.return===r)return;S=S.return}S.sibling.return=S.return,S=S.sibling}}function mr(s,r,h,g){if(Sa)for(var S=r.child;S!==null;){if(S.tag===5){var T=S.stateNode;h&&g&&(T=ih(T,S.type,S.memoizedProps)),nh(s,T)}else if(S.tag===6)T=S.stateNode,h&&g&&(T=lh(T,S.memoizedProps)),nh(s,T);else if(S.tag!==4){if(S.tag===22&&S.memoizedState!==null)T=S.child,T!==null&&(T.return=S),mr(s,S,!(S.memoizedProps!==null&&S.memoizedProps.mode==="manual"),!0);else if(S.child!==null){S.child.return=S,S=S.child;continue}}if(S===r)break;for(;S.sibling===null;){if(S.return===null||S.return===r)return;S=S.return}S.sibling.return=S.return,S=S.sibling}}function pr(s,r){if(Sa&&Tf(s,r)){s=r.stateNode;var h=s.containerInfo,g=oc();mr(g,r,!1,!1),s.pendingChildren=g,va(r),em(h,g)}}function Ef(s,r,h,g){if(En)s.memoizedProps!==g&&va(r);else if(Sa){var S=s.stateNode,T=s.memoizedProps;if((s=Tf(s,r))||T!==g){var N=_n.current;T=eh(S,h,T,g,!s,null),T===S?r.stateNode=S:(fl(T,h,g,N)&&va(r),r.stateNode=T,s?qo(T,r,!1,!1):va(r))}else r.stateNode=S}}function yr(s,r,h){if(Id(r,h)){if(s.flags|=16777216,!hl(r,h))if(Ru())s.flags|=8192;else throw Ls=_c,_h}else s.flags&=-16777217}function Cf(s,r){if(ym(r)){if(s.flags|=16777216,!ph(r))if(Ru())s.flags|=8192;else throw Ls=_c,_h}else s.flags&=-16777217}function Tu(s,r){r!==null&&(s.flags|=4),s.flags&16384&&(r=s.tag!==22?lt():536870912,s.lanes|=r,_l|=r)}function Ms(s,r){if(!se)switch(s.tailMode){case"hidden":r=s.tail;for(var h=null;r!==null;)r.alternate!==null&&(h=r),r=r.sibling;h===null?s.tail=null:h.sibling=null;break;case"collapsed":h=s.tail;for(var g=null;h!==null;)h.alternate!==null&&(g=h),h=h.sibling;g===null?r||s.tail===null?s.tail=null:s.tail.sibling=null:g.sibling=null}}function Oe(s){var r=s.alternate!==null&&s.alternate.child===s.child,h=0,g=0;if(r)for(var S=s.child;S!==null;)h|=S.lanes|S.childLanes,g|=S.subtreeFlags&31457280,g|=S.flags&31457280,S.return=s,S=S.sibling;else for(S=s.child;S!==null;)h|=S.lanes|S.childLanes,g|=S.subtreeFlags,g|=S.flags,S.return=s,S=S.sibling;return s.subtreeFlags|=g,s.childLanes=h,r}function Yd(s,r,h){var g=r.pendingProps;switch(ot(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Oe(r),null;case 1:return Oe(r),null;case 3:return h=r.stateNode,g=null,s!==null&&(g=s.memoizedState.cache),r.memoizedState.cache!==g&&(r.flags|=2048),nl(me),Tt(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(s===null||s.child===null)&&(ja(r)?va(r):s===null||s.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Ma!==null&&(il(Ma),Ma=null))),pr(s,r),Oe(r),null;case 26:if(Ta){h=r.type;var S=r.memoizedState;return s===null?(va(r),S!==null?(Oe(r),Cf(r,S)):(Oe(r),yr(r,h,g))):S?S!==s.memoizedState?(va(r),Oe(r),Cf(r,S)):(Oe(r),r.flags&=-16777217):(En?s.memoizedProps!==g&&va(r):Ef(s,r,h,g),Oe(r),yr(r,h,g)),null}case 27:if(Cn){if(Bt(r),h=ci.current,S=r.type,s!==null&&r.stateNode!=null)En?s.memoizedProps!==g&&va(r):Ef(s,r,S,g);else{if(!g){if(r.stateNode===null)throw Error(o(166));return Oe(r),null}s=_n.current,ja(r)?ce(r,s):(s=gh(S,g,h,s,!0),r.stateNode=s,va(r))}return Oe(r),null}case 5:if(Bt(r),h=r.type,s!==null&&r.stateNode!=null)Ef(s,r,h,g);else{if(!g){if(r.stateNode===null)throw Error(o(166));return Oe(r),null}s=_n.current,ja(r)?ce(r,s):(S=Qf(h,g,ci.current,s,r),qo(S,r,!1,!1),r.stateNode=S,fl(S,h,g,s)&&va(r))}return Oe(r),yr(r,r.type,r.pendingProps),null;case 6:if(s&&r.stateNode!=null)h=s.memoizedProps,En?h!==g&&va(r):Sa&&(h!==g?(r.stateNode=ac(g,ci.current,_n.current,r),va(r)):r.stateNode=s.stateNode);else{if(typeof g!="string"&&r.stateNode===null)throw Error(o(166));if(s=ci.current,h=_n.current,ja(r)){if(!kn)throw Error(o(176));if(s=r.stateNode,h=r.memoizedProps,g=null,S=Un,S!==null)switch(S.tag){case 27:case 5:g=S.memoizedProps}cm(s,h,r,g)||fe(r)}else r.stateNode=ac(g,s,h,r)}return Oe(r),null;case 13:if(g=r.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(S=ja(r),g!==null&&g.dehydrated!==null){if(s===null){if(!S)throw Error(o(318));if(!kn)throw Error(o(344));if(S=r.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(o(317));Dr(S,r)}else qn(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Oe(r),S=!1}else Ma!==null&&(il(Ma),Ma=null),S=!0;if(!S)return r.flags&256?(bi(r),r):(bi(r),null)}if(bi(r),(r.flags&128)!==0)return r.lanes=h,r;if(h=g!==null,s=s!==null&&s.memoizedState!==null,h){g=r.child,S=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(S=g.alternate.memoizedState.cachePool.pool);var T=null;g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(T=g.memoizedState.cachePool.pool),T!==S&&(g.flags|=2048)}return h!==s&&h&&(r.child.flags|=8192),Tu(r,r.updateQueue),Oe(r),null;case 4:return Tt(),pr(s,r),s===null&&Zf(r.stateNode.containerInfo),Oe(r),null;case 10:return nl(r.type),Oe(r),null;case 19:if(D(nn),S=r.memoizedState,S===null)return Oe(r),null;if(g=(r.flags&128)!==0,T=S.rendering,T===null)if(g)Ms(S,!1);else{if(ae!==0||s!==null&&(s.flags&128)!==0)for(s=r.child;s!==null;){if(T=ni(s),T!==null){for(r.flags|=128,Ms(S,!1),s=T.updateQueue,r.updateQueue=s,Tu(r,s),r.subtreeFlags=0,s=h,h=r.child;h!==null;)ul(h,s),h=h.sibling;return w(nn,nn.current&1|2),r.child}s=s.sibling}S.tail!==null&&An()>Ge&&(r.flags|=128,g=!0,Ms(S,!1),r.lanes=4194304)}else{if(!g)if(s=ni(T),s!==null){if(r.flags|=128,g=!0,s=s.updateQueue,r.updateQueue=s,Tu(r,s),Ms(S,!0),S.tail===null&&S.tailMode==="hidden"&&!T.alternate&&!se)return Oe(r),null}else 2*An()-S.renderingStartTime>Ge&&h!==536870912&&(r.flags|=128,g=!0,Ms(S,!1),r.lanes=4194304);S.isBackwards?(T.sibling=r.child,r.child=T):(s=S.last,s!==null?s.sibling=T:r.child=T,S.last=T)}return S.tail!==null?(r=S.tail,S.rendering=r,S.tail=r.sibling,S.renderingStartTime=An(),r.sibling=null,s=nn.current,w(nn,g?s&1|2:s&1),r):(Oe(r),null);case 22:case 23:return bi(r),So(),g=r.memoizedState!==null,s!==null?s.memoizedState!==null!==g&&(r.flags|=8192):g&&(r.flags|=8192),g?(h&536870912)!==0&&(r.flags&128)===0&&(Oe(r),r.subtreeFlags&6&&(r.flags|=8192)):Oe(r),h=r.updateQueue,h!==null&&Tu(r,h.retryQueue),h=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),g=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(g=r.memoizedState.cachePool.pool),g!==h&&(r.flags|=2048),s!==null&&D(vl),null;case 24:return h=null,s!==null&&(h=s.memoizedState.cache),r.memoizedState.cache!==h&&(r.flags|=2048),nl(me),Oe(r),null;case 25:return null}throw Error(o(156,r.tag))}function qd(s,r){switch(ot(r),r.tag){case 1:return s=r.flags,s&65536?(r.flags=s&-65537|128,r):null;case 3:return nl(me),Tt(),s=r.flags,(s&65536)!==0&&(s&128)===0?(r.flags=s&-65537|128,r):null;case 26:case 27:case 5:return Bt(r),null;case 13:if(bi(r),s=r.memoizedState,s!==null&&s.dehydrated!==null){if(r.alternate===null)throw Error(o(340));qn()}return s=r.flags,s&65536?(r.flags=s&-65537|128,r):null;case 19:return D(nn),null;case 4:return Tt(),null;case 10:return nl(r.type),null;case 22:case 23:return bi(r),So(),s!==null&&D(vl),s=r.flags,s&65536?(r.flags=s&-65537|128,r):null;case 24:return nl(me),null;case 25:return null;default:return null}}function Af(s,r){switch(ot(r),r.tag){case 3:nl(me),Tt();break;case 26:case 27:case 5:Bt(r);break;case 4:Tt();break;case 13:bi(r);break;case 19:D(nn);break;case 10:nl(r.type);break;case 22:case 23:bi(r),So(),s!==null&&D(vl);break;case 24:nl(me)}}function Eu(s,r){try{var h=r.updateQueue,g=h!==null?h.lastEffect:null;if(g!==null){var S=g.next;h=S;do{if((h.tag&s)===s){g=void 0;var T=h.create,N=h.inst;g=T(),N.destroy=g}h=h.next}while(h!==S)}}catch(q){It(r,r.return,q)}}function ql(s,r,h){try{var g=r.updateQueue,S=g!==null?g.lastEffect:null;if(S!==null){var T=S.next;g=T;do{if((g.tag&s)===s){var N=g.inst,q=N.destroy;if(q!==void 0){N.destroy=void 0,S=r;var W=h;try{q()}catch(ct){It(S,W,ct)}}}g=g.next}while(g!==T)}}catch(ct){It(r,r.return,ct)}}function Ld(s){var r=s.updateQueue;if(r!==null){var h=s.stateNode;try{iu(r,h)}catch(g){It(s,s.return,g)}}}function Xd(s,r,h){h.props=ii(s.type,s.memoizedProps),h.state=s.memoizedState;try{h.componentWillUnmount()}catch(g){It(s,r,g)}}function Rs(s,r){try{var h=s.ref;if(h!==null){var g=s.stateNode;switch(s.tag){case 26:case 27:case 5:var S=zr(g);break;default:S=g}typeof h=="function"?s.refCleanup=h(S):h.current=S}}catch(T){It(s,r,T)}}function Ne(s,r){var h=s.ref,g=s.refCleanup;if(h!==null)if(typeof g=="function")try{g()}catch(S){It(s,r,S)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(S){It(s,r,S)}else h.current=null}function gr(s){var r=s.type,h=s.memoizedProps,g=s.stateNode;try{Xp(g,r,h,s)}catch(S){It(s,s.return,S)}}function Mf(s,r,h){try{Ff(s.stateNode,s.type,h,r,s)}catch(g){It(s,s.return,g)}}function Rf(s){return s.tag===5||s.tag===3||(Ta?s.tag===26:!1)||(Cn?s.tag===27:!1)||s.tag===4}function Lo(s){t:for(;;){for(;s.sibling===null;){if(s.return===null||Rf(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&(!Cn||s.tag!==27)&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue t;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Xo(s,r,h){var g=s.tag;if(g===5||g===6)s=s.stateNode,r?$f(h,s,r):$d(h,s);else if(!(g===4||Cn&&g===27)&&(s=s.child,s!==null))for(Xo(s,r,h),s=s.sibling;s!==null;)Xo(s,r,h),s=s.sibling}function vr(s,r,h){var g=s.tag;if(g===5||g===6)s=s.stateNode,r?If(h,s,r):Pf(h,s);else if(!(g===4||Cn&&g===27)&&(s=s.child,s!==null))for(vr(s,r,h),s=s.sibling;s!==null;)vr(s,r,h),s=s.sibling}function Vd(s,r,h){s=s.containerInfo;try{ah(s,h)}catch(g){It(r,r.return,g)}}function xr(s,r){for(ts(s.containerInfo),Ve=r;Ve!==null;)if(s=Ve,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,Ve=r;else for(;Ve!==null;){s=Ve;var h=s.alternate;switch(r=s.flags,s.tag){case 0:break;case 11:case 15:break;case 1:if((r&1024)!==0&&h!==null){r=void 0;var g=s,S=h.memoizedProps;h=h.memoizedState;var T=g.stateNode;try{var N=ii(g.type,S,g.elementType===g.type);r=T.getSnapshotBeforeUpdate(N,h),T.__reactInternalSnapshotBeforeUpdate=r}catch(q){It(g,g.return,q)}}break;case 3:(r&1024)!==0&&En&&uc(s.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(o(163))}if(r=s.sibling,r!==null){r.return=s.return,Ve=r;break}Ve=s.return}return N=Vs,Vs=!1,N}function Vo(s,r,h){var g=h.flags;switch(h.tag){case 0:case 11:case 15:Ai(s,h),g&4&&Eu(5,h);break;case 1:if(Ai(s,h),g&4)if(s=h.stateNode,r===null)try{s.componentDidMount()}catch(q){It(h,h.return,q)}else{var S=ii(h.type,r.memoizedProps);r=r.memoizedState;try{s.componentDidUpdate(S,r,s.__reactInternalSnapshotBeforeUpdate)}catch(q){It(h,h.return,q)}}g&64&&Ld(h),g&512&&Rs(h,h.return);break;case 3:if(Ai(s,h),g&64&&(g=h.updateQueue,g!==null)){if(s=null,h.child!==null)switch(h.child.tag){case 27:case 5:s=zr(h.child.stateNode);break;case 1:s=h.child.stateNode}try{iu(g,s)}catch(q){It(h,h.return,q)}}break;case 26:if(Ta){Ai(s,h),g&512&&Rs(h,h.return);break}case 27:case 5:Ai(s,h),r===null&&g&4&&gr(h),g&512&&Rs(h,h.return);break;case 12:Ai(s,h);break;case 13:Ai(s,h),g&4&&Ll(s,h);break;case 22:if(S=h.memoizedState!==null||hn,!S){r=r!==null&&r.memoizedState!==null||He;var T=hn,N=He;hn=S,(He=r)&&!N?Vl(s,h,(h.subtreeFlags&8772)!==0):Ai(s,h),hn=T,He=N}g&512&&(h.memoizedProps.mode==="manual"?Rs(h,h.return):Ne(h,h.return));break;default:Ai(s,h)}}function _r(s){var r=s.alternate;r!==null&&(s.alternate=null,_r(r)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(r=s.stateNode,r!==null&&Jf(r)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function xa(s,r,h){for(h=h.child;h!==null;)Qo(s,r,h),h=h.sibling}function Qo(s,r,h){if(sa&&typeof sa.onCommitFiberUnmount=="function")try{sa.onCommitFiberUnmount(Br,h)}catch{}switch(h.tag){case 26:if(Ta){He||Ne(h,r),xa(s,r,h),h.memoizedState?ch(h.memoizedState):h.stateNode&&dh(h.stateNode);break}case 27:if(Cn){He||Ne(h,r);var g=Je,S=oa;Je=h.stateNode,xa(s,r,h),gm(h.stateNode),Je=g,oa=S;break}case 5:He||Ne(h,r);case 6:if(En){if(g=Je,S=oa,Je=null,xa(s,r,h),Je=g,oa=S,Je!==null)if(oa)try{ke(Je,h.stateNode)}catch(T){It(h,r,T)}else try{Kn(Je,h.stateNode)}catch(T){It(h,r,T)}}else xa(s,r,h);break;case 18:En&&Je!==null&&(oa?rh(Je,h.stateNode):hm(Je,h.stateNode));break;case 4:En?(g=Je,S=oa,Je=h.stateNode.containerInfo,oa=!0,xa(s,r,h),Je=g,oa=S):(Sa&&Vd(h.stateNode,h,oc()),xa(s,r,h));break;case 0:case 11:case 14:case 15:He||ql(2,h,r),He||ql(4,h,r),xa(s,r,h);break;case 1:He||(Ne(h,r),g=h.stateNode,typeof g.componentWillUnmount=="function"&&Xd(h,r,g)),xa(s,r,h);break;case 21:xa(s,r,h);break;case 22:He||Ne(h,r),He=(g=He)||h.memoizedState!==null,xa(s,r,h),He=g;break;default:xa(s,r,h)}}function Ll(s,r){if(kn&&r.memoizedState===null&&(s=r.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{dc(s)}catch(h){It(r,r.return,h)}}function Sr(s){switch(s.tag){case 13:case 19:var r=s.stateNode;return r===null&&(r=s.stateNode=new qr),r;case 22:return s=s.stateNode,r=s._retryCache,r===null&&(r=s._retryCache=new qr),r;default:throw Error(o(435,s.tag))}}function Cu(s,r){var h=Sr(s);r.forEach(function(g){var S=wf.bind(null,s,g);h.has(g)||(h.add(g),g.then(S,S))})}function Xn(s,r){var h=r.deletions;if(h!==null)for(var g=0;g<h.length;g++){var S=h[g],T=s,N=r;if(En){var q=N;t:for(;q!==null;){switch(q.tag){case 27:case 5:Je=q.stateNode,oa=!1;break t;case 3:Je=q.stateNode.containerInfo,oa=!0;break t;case 4:Je=q.stateNode.containerInfo,oa=!0;break t}q=q.return}if(Je===null)throw Error(o(160));Qo(T,N,S),Je=null,oa=!1}else Qo(T,N,S);T=S.alternate,T!==null&&(T.return=null),S.return=null}if(r.subtreeFlags&13878)for(r=r.child;r!==null;)Xl(r,s),r=r.sibling}function Xl(s,r){var h=s.alternate,g=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:Xn(r,s),ea(s),g&4&&(ql(3,s,s.return),Eu(3,s),ql(5,s,s.return));break;case 1:Xn(r,s),ea(s),g&512&&(He||h===null||Ne(h,h.return)),g&64&&hn&&(s=s.updateQueue,s!==null&&(g=s.callbacks,g!==null&&(h=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=h===null?g:h.concat(g))));break;case 26:if(Ta){var S=Zn;Xn(r,s),ea(s),g&512&&(He||h===null||Ne(h,h.return)),g&4&&(g=h!==null?h.memoizedState:null,r=s.memoizedState,h===null?r===null?s.stateNode===null?s.stateNode=fh(S,s.type,s.memoizedProps,s):hh(S,s.type,s.stateNode):s.stateNode=oh(S,r,s.memoizedProps):g!==r?(g===null?h.stateNode!==null&&dh(h.stateNode):ch(g),r===null?hh(S,s.type,s.stateNode):oh(S,r,s.memoizedProps)):r===null&&s.stateNode!==null&&Mf(s,s.memoizedProps,h.memoizedProps));break}case 27:if(Cn&&g&4&&s.alternate===null){S=s.stateNode;var T=s.memoizedProps;try{Kp(S),Zp(s.type,T,S,s)}catch(_t){It(s,s.return,_t)}}case 5:if(Xn(r,s),ea(s),g&512&&(He||h===null||Ne(h,h.return)),En){if(s.flags&32){r=s.stateNode;try{ju(r)}catch(_t){It(s,s.return,_t)}}g&4&&s.stateNode!=null&&(r=s.memoizedProps,Mf(s,r,h!==null?h.memoizedProps:r)),g&1024&&(os=!0)}break;case 6:if(Xn(r,s),ea(s),g&4&&En){if(s.stateNode===null)throw Error(o(162));g=s.memoizedProps,h=h!==null?h.memoizedProps:g,r=s.stateNode;try{tm(r,h,g)}catch(_t){It(s,s.return,_t)}}break;case 3:if(Ta?(mh(),S=Zn,Zn=mc(r.containerInfo),Xn(r,s),Zn=S):Xn(r,s),ea(s),g&4){if(En&&kn&&h!==null&&h.memoizedState.isDehydrated)try{hc(r.containerInfo)}catch(_t){It(s,s.return,_t)}if(Sa){g=r.containerInfo,h=r.pendingChildren;try{ah(g,h)}catch(_t){It(s,s.return,_t)}}}os&&(os=!1,zf(s));break;case 4:Ta?(h=Zn,Zn=mc(s.stateNode.containerInfo),Xn(r,s),ea(s),Zn=h):(Xn(r,s),ea(s)),g&4&&Sa&&Vd(s.stateNode,s,s.stateNode.pendingChildren);break;case 12:Xn(r,s),ea(s);break;case 13:Xn(r,s),ea(s),s.child.flags&8192&&s.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(qi=An()),g&4&&(g=s.updateQueue,g!==null&&(s.updateQueue=null,Cu(s,g)));break;case 22:g&512&&(He||h===null||Ne(h,h.return)),S=s.memoizedState!==null;var N=h!==null&&h.memoizedState!==null,q=hn,W=He;if(hn=q||S,He=W||N,Xn(r,s),He=W,hn=q,ea(s),r=s.stateNode,r._current=s,r._visibility&=-3,r._visibility|=r._pendingVisibility&2,g&8192&&(r._visibility=S?r._visibility&-2:r._visibility|1,S&&(r=hn||He,h===null||N||r||br(s)),En&&(s.memoizedProps===null||s.memoizedProps.mode!=="manual"))){t:if(h=null,En)for(r=s;;){if(r.tag===5||Ta&&r.tag===26||Cn&&r.tag===27){if(h===null){N=h=r;try{T=N.stateNode,S?Yu(T):th(N.stateNode,N.memoizedProps)}catch(_t){It(N,N.return,_t)}}}else if(r.tag===6){if(h===null){N=r;try{var ct=N.stateNode;S?rc(ct):dl(ct,N.memoizedProps)}catch(_t){It(N,N.return,_t)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===s)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break t;for(;r.sibling===null;){if(r.return===null||r.return===s)break t;h===r&&(h=null),r=r.return}h===r&&(h=null),r.sibling.return=r.return,r=r.sibling}}g&4&&(g=s.updateQueue,g!==null&&(h=g.retryQueue,h!==null&&(g.retryQueue=null,Cu(s,h))));break;case 19:Xn(r,s),ea(s),g&4&&(g=s.updateQueue,g!==null&&(s.updateQueue=null,Cu(s,g)));break;case 21:break;default:Xn(r,s),ea(s)}}function ea(s){var r=s.flags;if(r&2){try{if(En&&(!Cn||s.tag!==27)){t:{for(var h=s.return;h!==null;){if(Rf(h)){var g=h;break t}h=h.return}throw Error(o(160))}switch(g.tag){case 27:if(Cn){var S=g.stateNode,T=Lo(s);vr(s,T,S);break}case 5:var N=g.stateNode;g.flags&32&&(ju(N),g.flags&=-33);var q=Lo(s);vr(s,q,N);break;case 3:case 4:var W=g.stateNode.containerInfo,ct=Lo(s);Xo(s,ct,W);break;default:throw Error(o(161))}}}catch(_t){It(s,s.return,_t)}s.flags&=-3}r&4096&&(s.flags&=-4097)}function zf(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var r=s;zf(r),r.tag===5&&r.flags&1024&&Se(r.stateNode),s=s.sibling}}function Ai(s,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Vo(s,r.alternate,r),r=r.sibling}function br(s){for(s=s.child;s!==null;){var r=s;switch(r.tag){case 0:case 11:case 14:case 15:ql(4,r,r.return),br(r);break;case 1:Ne(r,r.return);var h=r.stateNode;typeof h.componentWillUnmount=="function"&&Xd(r,r.return,h),br(r);break;case 26:case 27:case 5:Ne(r,r.return),br(r);break;case 22:Ne(r,r.return),r.memoizedState===null&&br(r);break;default:br(r)}s=s.sibling}}function Vl(s,r,h){for(h=h&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var g=r.alternate,S=s,T=r,N=T.flags;switch(T.tag){case 0:case 11:case 15:Vl(S,T,h),Eu(4,T);break;case 1:if(Vl(S,T,h),g=T,S=g.stateNode,typeof S.componentDidMount=="function")try{S.componentDidMount()}catch(ct){It(g,g.return,ct)}if(g=T,S=g.updateQueue,S!==null){var q=g.stateNode;try{var W=S.shared.hiddenCallbacks;if(W!==null)for(S.shared.hiddenCallbacks=null,S=0;S<W.length;S++)gd(W[S],q)}catch(ct){It(g,g.return,ct)}}h&&N&64&&Ld(T),Rs(T,T.return);break;case 26:case 27:case 5:Vl(S,T,h),h&&g===null&&N&4&&gr(T),Rs(T,T.return);break;case 12:Vl(S,T,h);break;case 13:Vl(S,T,h),h&&N&4&&Ll(S,T);break;case 22:T.memoizedState===null&&Vl(S,T,h),Rs(T,T.return);break;default:Vl(S,T,h)}r=r.sibling}}function Df(s,r){var h=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),s=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),s!==h&&(s!=null&&s.refCount++,h!=null&&dr(h))}function ko(s,r){s=null,r.alternate!==null&&(s=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==s&&(r.refCount++,s!=null&&dr(s))}function al(s,r,h,g){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Ko(s,r,h,g),r=r.sibling}function Ko(s,r,h,g){var S=r.flags;switch(r.tag){case 0:case 11:case 15:al(s,r,h,g),S&2048&&Eu(9,r);break;case 3:al(s,r,h,g),S&2048&&(s=null,r.alternate!==null&&(s=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==s&&(r.refCount++,s!=null&&dr(s)));break;case 12:if(S&2048){al(s,r,h,g),s=r.stateNode;try{var T=r.memoizedProps,N=T.id,q=T.onPostCommit;typeof q=="function"&&q(N,r.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(W){It(r,r.return,W)}}else al(s,r,h,g);break;case 23:break;case 22:T=r.stateNode,r.memoizedState!==null?T._visibility&4?al(s,r,h,g):Ql(s,r):T._visibility&4?al(s,r,h,g):(T._visibility|=4,On(s,r,h,g,(r.subtreeFlags&10256)!==0)),S&2048&&Df(r.alternate,r);break;case 24:al(s,r,h,g),S&2048&&ko(r.alternate,r);break;default:al(s,r,h,g)}}function On(s,r,h,g,S){for(S=S&&(r.subtreeFlags&10256)!==0,r=r.child;r!==null;){var T=s,N=r,q=h,W=g,ct=N.flags;switch(N.tag){case 0:case 11:case 15:On(T,N,q,W,S),Eu(8,N);break;case 23:break;case 22:var _t=N.stateNode;N.memoizedState!==null?_t._visibility&4?On(T,N,q,W,S):Ql(T,N):(_t._visibility|=4,On(T,N,q,W,S)),S&&ct&2048&&Df(N.alternate,N);break;case 24:On(T,N,q,W,S),S&&ct&2048&&ko(N.alternate,N);break;default:On(T,N,q,W,S)}r=r.sibling}}function Ql(s,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var h=s,g=r,S=g.flags;switch(g.tag){case 22:Ql(h,g),S&2048&&Df(g.alternate,g);break;case 24:Ql(h,g),S&2048&&ko(g.alternate,g);break;default:Ql(h,g)}r=r.sibling}}function yn(s){if(s.subtreeFlags&Qs)for(s=s.child;s!==null;)zs(s),s=s.sibling}function zs(s){switch(s.tag){case 26:yn(s),s.flags&Qs&&(s.memoizedState!==null?yh(Zn,s.memoizedState,s.memoizedProps):je(s.type,s.memoizedProps));break;case 5:yn(s),s.flags&Qs&&je(s.type,s.memoizedProps);break;case 3:case 4:if(Ta){var r=Zn;Zn=mc(s.stateNode.containerInfo),yn(s),Zn=r}else yn(s);break;case 22:s.memoizedState===null&&(r=s.alternate,r!==null&&r.memoizedState!==null?(r=Qs,Qs=16777216,yn(s),Qs=r):yn(s));break;default:yn(s)}}function Zo(s){var r=s.alternate;if(r!==null&&(s=r.child,s!==null)){r.child=null;do r=s.sibling,s.sibling=null,s=r;while(s!==null)}}function kl(s){var r=s.deletions;if((s.flags&16)!==0){if(r!==null)for(var h=0;h<r.length;h++){var g=r[h];Ve=g,Kl(g,s)}Zo(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Au(s),s=s.sibling}function Au(s){switch(s.tag){case 0:case 11:case 15:kl(s),s.flags&2048&&ql(9,s,s.return);break;case 3:kl(s);break;case 12:kl(s);break;case 22:var r=s.stateNode;s.memoizedState!==null&&r._visibility&4&&(s.return===null||s.return.tag!==13)?(r._visibility&=-5,Tr(s)):kl(s);break;default:kl(s)}}function Tr(s){var r=s.deletions;if((s.flags&16)!==0){if(r!==null)for(var h=0;h<r.length;h++){var g=r[h];Ve=g,Kl(g,s)}Zo(s)}for(s=s.child;s!==null;){switch(r=s,r.tag){case 0:case 11:case 15:ql(8,r,r.return),Tr(r);break;case 22:h=r.stateNode,h._visibility&4&&(h._visibility&=-5,Tr(r));break;default:Tr(r)}s=s.sibling}}function Kl(s,r){for(;Ve!==null;){var h=Ve;switch(h.tag){case 0:case 11:case 15:ql(8,h,r);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var g=h.memoizedState.cachePool.pool;g!=null&&g.refCount++}break;case 24:dr(h.memoizedState.cache)}if(g=h.child,g!==null)g.return=h,Ve=g;else t:for(h=s;Ve!==null;){g=Ve;var S=g.sibling,T=g.return;if(_r(g),g===h){Ve=null;break t}if(S!==null){S.return=T,Ve=S;break t}Ve=T}}}function Jo(s){var r=Kf(s);if(r!=null){if(typeof r.memoizedProps["data-testname"]!="string")throw Error(o(364));return r}if(s=js(s),s===null)throw Error(o(362));return s.stateNode.current}function Er(s,r){var h=s.tag;switch(r.$$typeof){case to:if(s.type===r.value)return!0;break;case Cc:t:{for(r=r.value,s=[s,0],h=0;h<s.length;){var g=s[h++],S=g.tag,T=s[h++],N=r[T];if(S!==5&&S!==26&&S!==27||!Ui(g)){for(;N!=null&&Er(g,N);)T++,N=r[T];if(T===r.length){r=!0;break t}else for(g=g.child;g!==null;)s.push(g,T),g=g.sibling}}r=!1}return r;case Ac:if((h===5||h===26||h===27)&&Lp(s.stateNode,r.value))return!0;break;case pe:if((h===5||h===6||h===26||h===27)&&(s=Gu(s),s!==null&&0<=s.indexOf(r.value)))return!0;break;case ne:if((h===5||h===26||h===27)&&(s=s.memoizedProps["data-testname"],typeof s=="string"&&s.toLowerCase()===r.value.toLowerCase()))return!0;break;default:throw Error(o(365))}return!1}function Zl(s){switch(s.$$typeof){case to:return"<"+(d(s.value)||"Unknown")+">";case Cc:return":has("+(Zl(s)||"")+")";case Ac:return'[role="'+s.value+'"]';case pe:return'"'+s.value+'"';case ne:return'[data-testname="'+s.value+'"]';default:throw Error(o(365))}}function Qd(s,r){var h=[];s=[s,0];for(var g=0;g<s.length;){var S=s[g++],T=S.tag,N=s[g++],q=r[N];if(T!==5&&T!==26&&T!==27||!Ui(S)){for(;q!=null&&Er(S,q);)N++,q=r[N];if(N===r.length)h.push(S);else for(S=S.child;S!==null;)s.push(S,N),S=S.sibling}}return h}function Vn(s,r){if(!Bi)throw Error(o(363));s=Jo(s),s=Qd(s,r),r=[],s=Array.from(s);for(var h=0;h<s.length;){var g=s[h++],S=g.tag;if(S===5||S===26||S===27)Ui(g)||r.push(g.stateNode);else for(g=g.child;g!==null;)s.push(g),g=g.sibling}return r}function Qn(){if((zt&2)!==0&&Kt!==0)return Kt&-Kt;if(Nt.T!==null){var s=ra;return s!==0?s:go()}return Va()}function Mi(){ca===0&&(ca=(Kt&536870912)===0||se?ft():536870912);var s=Da.current;return s!==null&&(s.flags|=32),ca}function Nn(s,r,h){(s===Wt&&be===2||s.cancelPendingCommit!==null)&&(si(s,0),li(s,Kt,ca,!1)),ut(s,h),((zt&2)===0||s!==Wt)&&(s===Wt&&((zt&2)===0&&(di|=h),ae===4&&li(s,Kt,ca,!1)),Ya(s))}function Mu(s,r,h){if((zt&6)!==0)throw Error(o(327));var g=!h&&(r&60)===0&&(r&s.expiredLanes)===0||Q(s,r),S=g?Di(s,r):Ri(s,r,!0),T=g;do{if(S===0){Oa&&!g&&li(s,r,0,!1);break}else if(S===6)li(s,r,0,!ye);else{if(h=s.current.alternate,T&&!kd(h)){S=Ri(s,r,!1),T=!1;continue}if(S===2){if(T=r,s.errorRecoveryDisabledLanes&T)var N=0;else N=s.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){r=N;t:{var q=s;S=Lr;var W=kn&&q.current.memoizedState.isDehydrated;if(W&&(si(q,N).flags|=256),N=Ri(q,N,!1),N!==2){if(xl&&!W){q.errorRecoveryDisabledLanes|=T,di|=T,S=4;break t}T=wa,wa=S,T!==null&&il(T)}S=N}if(T=!1,S!==2)continue}}if(S===1){si(s,0),li(s,r,0,!0);break}t:{switch(g=s,S){case 0:case 1:throw Error(o(345));case 4:if((r&4194176)===r){li(g,r,ca,!ye);break t}break;case 2:wa=null;break;case 3:case 5:break;default:throw Error(o(329))}if(g.finishedWork=h,g.finishedLanes=r,(r&62914560)===r&&(T=qi+300-An(),10<T)){if(li(g,r,ca,!ye),k(g,0)!==0)break t;g.timeoutHandle=kf(Wo.bind(null,g,h,wa,mi,Xr,r,ca,di,_l,ye,2,-0,0),T);break t}Wo(g,h,wa,mi,Xr,r,ca,di,_l,ye,0,-0,0)}}break}while(!0);Ya(s)}function il(s){wa===null?wa=s:wa.push.apply(wa,s)}function Wo(s,r,h,g,S,T,N,q,W,ct,_t,St,bt){var qt=r.subtreeFlags;if((qt&8192||(qt&16785408)===16785408)&&(ba(),zs(r),r=ic(),r!==null)){s.cancelPendingCommit=r(Ce.bind(null,s,h,g,S,N,q,W,1,St,bt)),li(s,T,N,!ct);return}Ce(s,h,g,S,N,q,W,_t,St,bt)}function kd(s){for(var r=s;;){var h=r.tag;if((h===0||h===11||h===15)&&r.flags&16384&&(h=r.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var g=0;g<h.length;g++){var S=h[g],T=S.getSnapshot;S=S.value;try{if(!Ea(T(),S))return!1}catch{return!1}}if(h=r.child,r.subtreeFlags&16384&&h!==null)h.return=r,r=h;else{if(r===s)break;for(;r.sibling===null;){if(r.return===null||r.return===s)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function li(s,r,h,g){r&=~jn,r&=~di,s.suspendedLanes|=r,s.pingedLanes&=~r,g&&(s.warmLanes|=r),g=s.expirationTimes;for(var S=r;0<S;){var T=31-la(S),N=1<<T;g[T]=-1,S&=~N}h!==0&&gt(s,h,r)}function Of(){return(zt&6)===0?(Dl(0),!1):!0}function na(){if(Xt!==null){if(be===0)var s=Xt.return;else s=Xt,Xe=us=null,ru(s),Gi=null,Ka=0,s=Xt;for(;s!==null;)Af(s.alternate,s),s=s.return;Xt=null}}function si(s,r){s.finishedWork=null,s.finishedLanes=0;var h=s.timeoutHandle;h!==Gs&&(s.timeoutHandle=Gs,Hu(h)),h=s.cancelPendingCommit,h!==null&&(s.cancelPendingCommit=null,h()),na(),Wt=s,Xt=h=wn(s.current,null),Kt=r,be=0,We=null,ye=!1,Oa=Q(s,r),xl=!1,_l=ca=jn=di=Na=ae=0,wa=Lr=null,Xr=!1,(r&8)!==0&&(r|=r&32);var g=s.entangledLanes;if(g!==0)for(s=s.entanglements,g&=r;0<g;){var S=31-la(g),T=1<<S;r|=s[S],g&=~T}return hi=r,pn(),h}function Ds(s,r){Qt=null,Nt.H=re,r===xe?(r=sr(),be=3):r===_h?(r=sr(),be=4):be=r===Em?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,We=r,Xt===null&&(ae=1,Bo(s,et(r,s.current)))}function Ru(){var s=Da.current;return s===null?!0:(Kt&4194176)===Kt?Za===null:(Kt&62914560)===Kt||(Kt&536870912)!==0?s===Za:!1}function Cr(){var s=Nt.H;return Nt.H=re,s===null?re:s}function _a(){var s=Nt.A;return Nt.A=Ec,s}function aa(){ae=4,ye||(Kt&4194176)!==Kt&&Da.current!==null||(Oa=!0),(Na&134217727)===0&&(di&134217727)===0||Wt===null||li(Wt,Kt,ca,!1)}function Ri(s,r,h){var g=zt;zt|=2;var S=Cr(),T=_a();(Wt!==s||Kt!==r)&&(mi=null,si(s,r)),r=!1;var N=ae;t:do try{if(be!==0&&Xt!==null){var q=Xt,W=We;switch(be){case 8:na(),N=6;break t;case 3:case 2:case 6:Da.current===null&&(r=!0);var ct=be;if(be=0,We=null,Jl(s,q,W,ct),h&&Oa){N=0;break t}break;default:ct=be,be=0,We=null,Jl(s,q,W,ct)}}zi(),N=ae;break}catch(_t){Ds(s,_t)}while(!0);return r&&s.shellSuspendCounter++,Xe=us=null,zt=g,Nt.H=S,Nt.A=T,Xt===null&&(Wt=null,Kt=0,pn()),N}function zi(){for(;Xt!==null;)Nf(Xt)}function Di(s,r){var h=zt;zt|=2;var g=Cr(),S=_a();Wt!==s||Kt!==r?(mi=null,Ge=An()+500,si(s,r)):Oa=Q(s,r);t:do try{if(be!==0&&Xt!==null){r=Xt;var T=We;e:switch(be){case 1:be=0,We=null,Jl(s,r,T,1);break;case 2:if(lu(T)){be=0,We=null,Po(r);break}r=function(){be===2&&Wt===s&&(be=7),Ya(s)},T.then(r,r);break t;case 3:be=7;break t;case 4:be=5;break t;case 7:lu(T)?(be=0,We=null,Po(r)):(be=0,We=null,Jl(s,r,T,7));break;case 5:var N=null;switch(Xt.tag){case 26:N=Xt.memoizedState;case 5:case 27:var q=Xt,W=q.type,ct=q.pendingProps;if(N?ph(N):hl(W,ct)){be=0,We=null;var _t=q.sibling;if(_t!==null)Xt=_t;else{var St=q.return;St!==null?(Xt=St,zu(St)):Xt=null}break e}}be=0,We=null,Jl(s,r,T,5);break;case 6:be=0,We=null,Jl(s,r,T,6);break;case 8:na(),ae=6;break t;default:throw Error(o(462))}}ll();break}catch(bt){Ds(s,bt)}while(!0);return Xe=us=null,Nt.H=g,Nt.A=S,zt=h,Xt!==null?0:(Wt=null,Kt=0,pn(),ae)}function ll(){for(;Xt!==null&&!xm();)Nf(Xt)}function Nf(s){var r=Gd(s.alternate,s,hi);s.memoizedProps=s.pendingProps,r===null?zu(s):Xt=r}function Po(s){var r=s,h=r.alternate;switch(r.tag){case 15:case 0:r=Nd(h,r,r.pendingProps,r.type,void 0,Kt);break;case 11:r=Nd(h,r,r.pendingProps,r.type.render,r.ref,Kt);break;case 5:ru(r);default:Af(h,r),r=Xt=ul(r,hi),r=Gd(h,r,hi)}s.memoizedProps=s.pendingProps,r===null?zu(s):Xt=r}function Jl(s,r,h,g){Xe=us=null,ru(r),Gi=null,Ka=0;var S=r.return;try{if(Md(s,S,r,h,Kt)){ae=1,Bo(s,et(h,s.current)),Xt=null;return}}catch(T){if(S!==null)throw Xt=S,T;ae=1,Bo(s,et(h,s.current)),Xt=null;return}r.flags&32768?(se||g===1?s=!0:Oa||(Kt&536870912)!==0?s=!1:(ye=s=!0,(g===2||g===3||g===6)&&(g=Da.current,g!==null&&g.tag===13&&(g.flags|=16384))),gn(r,s)):zu(r)}function zu(s){var r=s;do{if((r.flags&32768)!==0){gn(r,ye);return}s=r.return;var h=Yd(r.alternate,r,hi);if(h!==null){Xt=h;return}if(r=r.sibling,r!==null){Xt=r;return}Xt=r=s}while(r!==null);ae===0&&(ae=5)}function gn(s,r){do{var h=qd(s.alternate,s);if(h!==null){h.flags&=32767,Xt=h;return}if(h=s.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!r&&(s=s.sibling,s!==null)){Xt=s;return}Xt=s=h}while(s!==null);ae=6,Xt=null}function Ce(s,r,h,g,S,T,N,q,W,ct){var _t=Nt.T,St=fn();try{Bn(2),Nt.T=null,te(s,r,h,g,St,S,T,N,q,W,ct)}finally{Nt.T=_t,Bn(St)}}function te(s,r,h,g,S,T,N,q){do vn();while(Sl!==null);if((zt&6)!==0)throw Error(o(327));var W=s.finishedWork;if(g=s.finishedLanes,W===null)return null;if(s.finishedWork=null,s.finishedLanes=0,W===s.current)throw Error(o(177));s.callbackNode=null,s.callbackPriority=0,s.cancelPendingCommit=null;var ct=W.lanes|W.childLanes;if(ct|=Hr,pt(s,g,ct,T,N,q),s===Wt&&(Xt=Wt=null,Kt=0),(W.subtreeFlags&10256)===0&&(W.flags&10256)===0||Wa||(Wa=!0,Mc=ct,Ks=h,Du(yc,function(){return vn(),null})),h=(W.flags&15990)!==0,(W.subtreeFlags&15990)!==0||h?(h=Nt.T,Nt.T=null,T=fn(),Bn(2),N=zt,zt|=4,xr(s,W),Xl(W,s),Vf(s.containerInfo),s.current=W,Vo(s,W.alternate,W),_m(),zt=N,Bn(T),Nt.T=h):s.current=W,Wa?(Wa=!1,Sl=s,ks=g):sl(s,ct),ct=s.pendingLanes,ct===0&&(Ba=null),H(W.stateNode),Ya(s),r!==null)for(S=s.onRecoverableError,W=0;W<r.length;W++)ct=r[W],S(ct.value,{componentStack:ct.stack});return(ks&3)!==0&&vn(),ct=s.pendingLanes,(g&4194218)!==0&&(ct&42)!==0?s===Jn?Zs++:(Zs=0,Jn=s):Zs=0,Dl(0),null}function sl(s,r){(s.pooledCacheLanes&=r)===0&&(r=s.pooledCache,r!=null&&(s.pooledCache=null,dr(r)))}function vn(){if(Sl!==null){var s=Sl,r=Mc;Mc=0;var h=Ct(ks),g=32>h?32:h;h=Nt.T;var S=fn();try{if(Bn(g),Nt.T=null,Sl===null)var T=!1;else{g=Ks,Ks=null;var N=Sl,q=ks;if(Sl=null,ks=0,(zt&6)!==0)throw Error(o(331));var W=zt;if(zt|=4,Au(N.current),Ko(N,N.current,q,g),zt=W,Dl(0,!1),sa&&typeof sa.onPostCommitFiberRoot=="function")try{sa.onPostCommitFiberRoot(Br,N)}catch{}T=!0}return T}finally{Bn(S),Nt.T=h,sl(s,r)}}return!1}function Fo(s,r,h){r=et(h,r),r=vu(s.stateNode,r,2),s=$e(s,r,2),s!==null&&(ut(s,2),Ya(s))}function It(s,r,h){if(s.tag===3)Fo(s,s,h);else for(;r!==null;){if(r.tag===3){Fo(r,s,h);break}else if(r.tag===1){var g=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(Ba===null||!Ba.has(g))){s=et(h,s),h=hr(2),g=$e(r,h,2),g!==null&&(xu(h,g,r,s),ut(g,2),Ya(g));break}}r=r.return}}function Io(s,r,h){var g=s.pingCache;if(g===null){g=s.pingCache=new $t;var S=new Set;g.set(r,S)}else S=g.get(r),S===void 0&&(S=new Set,g.set(r,S));S.has(h)||(xl=!0,S.add(h),s=Kd.bind(null,s,r,h),r.then(s,s))}function Kd(s,r,h){var g=s.pingCache;g!==null&&g.delete(r),s.pingedLanes|=s.suspendedLanes&h,s.warmLanes&=~h,Wt===s&&(Kt&h)===h&&(ae===4||ae===3&&(Kt&62914560)===Kt&&300>An()-qi?(zt&2)===0&&si(s,0):jn|=h,_l===Kt&&(_l=0)),Ya(s)}function Os(s,r){r===0&&(r=lt()),s=ei(s,r),s!==null&&(ut(s,r),Ya(s))}function Ns(s){var r=s.memoizedState,h=0;r!==null&&(h=r.retryLane),Os(s,h)}function wf(s,r){var h=0;switch(s.tag){case 13:var g=s.stateNode,S=s.memoizedState;S!==null&&(h=S.retryLane);break;case 19:g=s.stateNode;break;case 22:g=s.stateNode._retryCache;break;default:throw Error(o(314))}g!==null&&g.delete(r),Os(s,h)}function Du(s,r){return wr(s,r)}function Bf(s,r,h,g){this.tag=s,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rl(s){return s=s.prototype,!(!s||!s.isReactComponent)}function wn(s,r){var h=s.alternate;return h===null?(h=a(s.tag,r,s.key,s.mode),h.elementType=s.elementType,h.type=s.type,h.stateNode=s.stateNode,h.alternate=s,s.alternate=h):(h.pendingProps=r,h.type=s.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=s.flags&31457280,h.childLanes=s.childLanes,h.lanes=s.lanes,h.child=s.child,h.memoizedProps=s.memoizedProps,h.memoizedState=s.memoizedState,h.updateQueue=s.updateQueue,r=s.dependencies,h.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},h.sibling=s.sibling,h.index=s.index,h.ref=s.ref,h.refCleanup=s.refCleanup,h}function ul(s,r){s.flags&=31457282;var h=s.alternate;return h===null?(s.childLanes=0,s.lanes=r,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=h.childLanes,s.lanes=h.lanes,s.child=h.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=h.memoizedProps,s.memoizedState=h.memoizedState,s.updateQueue=h.updateQueue,s.type=h.type,r=h.dependencies,s.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),s}function Xa(s,r,h,g,S,T){var N=0;if(g=s,typeof s=="function")rl(s)&&(N=1);else if(typeof s=="string")N=Ta&&Cn?uh(s,h,_n.current)?26:Or(s)?27:5:Ta?uh(s,h,_n.current)?26:5:Cn&&Or(s)?27:5;else t:switch(s){case Mr:return ol(h.children,S,T,r);case Yf:N=8,S|=24;break;case qf:return s=a(12,h,r,S|2),s.elementType=qf,s.lanes=T,s;case tc:return s=a(13,h,r,S),s.elementType=tc,s.lanes=T,s;case Fl:return s=a(19,h,r,S),s.elementType=Fl,s.lanes=T,s;case wu:return $o(h,S,T,r);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case Wd:case Oi:N=10;break t;case Pl:N=9;break t;case Rr:N=11;break t;case Nu:N=14;break t;case ui:N=16,g=null;break t}N=29,h=Error(o(130,s===null?"null":typeof s,"")),g=null}return r=a(N,h,r,S),r.elementType=s,r.type=g,r.lanes=T,r}function ol(s,r,h,g){return s=a(7,s,g,r),s.lanes=h,s}function $o(s,r,h,g){s=a(22,s,g,r),s.elementType=wu,s.lanes=h;var S={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var T=S._current;if(T===null)throw Error(o(456));if((S._pendingVisibility&2)===0){var N=ei(T,2);N!==null&&(S._pendingVisibility|=2,Nn(N,T,2))}},attach:function(){var T=S._current;if(T===null)throw Error(o(456));if((S._pendingVisibility&2)!==0){var N=ei(T,2);N!==null&&(S._pendingVisibility&=-3,Nn(N,T,2))}}};return s.stateNode=S,s}function Wl(s,r,h){return s=a(6,s,null,r),s.lanes=h,s}function Ar(s,r,h){return r=a(4,s.children!==null?s.children:[],s.key,r),r.lanes=h,r.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},r}function ws(s,r,h,g,S,T,N,q){this.tag=1,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Gs,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=st(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=st(0),this.hiddenUpdates=st(null),this.identifierPrefix=g,this.onUncaughtError=S,this.onCaughtError=T,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=q,this.incompleteTransitions=new Map}function xn(s,r,h,g,S,T,N,q,W,ct,_t,St){return s=new ws(s,r,h,N,q,W,ct,St),r=1,T===!0&&(r|=24),T=a(3,null,null,r),s.current=T,T.stateNode=s,r=jo(),r.refCount++,s.pooledCache=r,r.refCount++,T.memoizedState={element:g,isDehydrated:h,cache:r},tf(T),s}function Ou(s){return s?(s=Ys,s):Ys}function Uf(s){var r=s._reactInternals;if(r===void 0)throw typeof s.render=="function"?Error(o(188)):(s=Object.keys(s).join(","),Error(o(268,s)));return s=C(r),s=s!==null?R(s):null,s===null?null:zr(s.stateNode)}function Zd(s,r,h,g,S,T){S=Ou(S),g.context===null?g.context=S:g.pendingContext=S,g=qa(r),g.payload={element:h},T=T===void 0?null:T,T!==null&&(g.callback=T),h=$e(s,g,r),h!==null&&(Nn(h,s,r),La(h,s,r))}function Jd(s,r){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var h=s.retryLane;s.retryLane=h!==0&&h<r?h:r}}function Hf(s,r){Jd(s,r),(s=s.alternate)&&Jd(s,r)}var Rt={},Gf=Cp(),Tn=qA(),Bs=Object.assign,jf=Symbol.for("react.element"),cl=Symbol.for("react.transitional.element"),ri=Symbol.for("react.portal"),Mr=Symbol.for("react.fragment"),Yf=Symbol.for("react.strict_mode"),qf=Symbol.for("react.profiler"),Wd=Symbol.for("react.provider"),Pl=Symbol.for("react.consumer"),Oi=Symbol.for("react.context"),Rr=Symbol.for("react.forward_ref"),tc=Symbol.for("react.suspense"),Fl=Symbol.for("react.suspense_list"),Nu=Symbol.for("react.memo"),ui=Symbol.for("react.lazy"),wu=Symbol.for("react.offscreen"),Pd=Symbol.for("react.memo_cache_sentinel"),Lf=Symbol.iterator,Us=Symbol.for("react.client.reference"),Nt=Gf.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ec,Xf,Il=!1,$l=Array.isArray,nc=t.rendererVersion,Bu=t.rendererPackageName,Uu=t.extraDevToolsConfig,zr=t.getPublicInstance,Hs=t.getRootHostContext,Fd=t.getChildHostContext,ts=t.prepareForCommit,Vf=t.resetAfterCommit,Qf=t.createInstance,Ni=t.appendInitialChild,fl=t.finalizeInitialChildren,es=t.shouldSetTextContent,ac=t.createTextInstance,kf=t.scheduleTimeout,Hu=t.cancelTimeout,Gs=t.noTimeout,wi=t.isPrimaryRenderer;t.warnsIfNotActing;var En=t.supportsMutation,Sa=t.supportsPersistence,kn=t.supportsHydration,Kf=t.getInstanceFromNode;t.beforeActiveInstanceBlur,t.afterActiveInstanceBlur;var Zf=t.preparePortalMount;t.prepareScopeUpdate,t.getInstanceFromScope;var Bn=t.setCurrentUpdatePriority,fn=t.getCurrentUpdatePriority,Va=t.resolveUpdatePriority;t.resolveEventType,t.resolveEventTimeStamp;var ns=t.shouldAttemptEagerTransition,Jf=t.detachDeletedInstance;t.requestPostPaintCallback;var Id=t.maySuspendCommit,hl=t.preloadInstance,ba=t.startSuspendingCommit,je=t.suspendInstance,ic=t.waitForCommitToBeReady,ia=t.NotPendingTransition,Ht=t.HostTransitionContext,Se=t.resetFormInstance;t.bindToConsole;var en=t.supportsMicrotasks,lc=t.scheduleMicrotask,Bi=t.supportsTestSelectors,js=t.findFiberRoot,sc=t.getBoundingRect,Gu=t.getTextContent,Ui=t.isHiddenSubtree,Lp=t.matchAccessibilityRole,Ye=t.setFocusIfFocusable,Wf=t.setupIntersectionObserver,Pf=t.appendChild,$d=t.appendChildToContainer,tm=t.commitTextUpdate,Xp=t.commitMount,Ff=t.commitUpdate,If=t.insertBefore,$f=t.insertInContainerBefore,Kn=t.removeChild,ke=t.removeChildFromContainer,ju=t.resetTextContent,Yu=t.hideInstance,rc=t.hideTextInstance,th=t.unhideInstance,dl=t.unhideTextInstance,uc=t.clearContainer,eh=t.cloneInstance,oc=t.createContainerChildSet,nh=t.appendChildToContainerChildSet,em=t.finalizeContainerChildren,ah=t.replaceContainerChildren,ih=t.cloneHiddenInstance,lh=t.cloneHiddenTextInstance,cc=t.isSuspenseInstancePending,qu=t.isSuspenseInstanceFallback,nm=t.getSuspenseInstanceFallbackErrorDetails,Vp=t.registerSuspenseInstanceRetry,am=t.canHydrateFormStateMarker,im=t.isFormStateMarkerMatching,sh=t.getNextHydratableSibling,fc=t.getFirstHydratableChild,lm=t.getFirstHydratableChildWithinContainer,sm=t.getFirstHydratableChildWithinSuspenseInstance,rm=t.canHydrateInstance,um=t.canHydrateTextInstance,om=t.canHydrateSuspenseInstance,Qp=t.hydrateInstance,cm=t.hydrateTextInstance,Dr=t.hydrateSuspenseInstance,fm=t.getNextHydratableInstanceAfterSuspenseInstance,hc=t.commitHydratedContainer,dc=t.commitHydratedSuspenseInstance,hm=t.clearSuspenseBoundary,rh=t.clearSuspenseBoundaryFromContainer,dm=t.shouldDeleteUnhydratedTailInstances;t.diffHydratedPropsForDevWarnings,t.diffHydratedTextForDevWarnings,t.describeHydratableInstanceForDevWarnings;var mm=t.validateHydratableInstance,pm=t.validateHydratableTextInstance,Ta=t.supportsResources,uh=t.isHostHoistableType,mc=t.getHoistableRoot,pc=t.getResource,oh=t.acquireResource,ch=t.releaseResource,fh=t.hydrateHoistable,hh=t.mountHoistable,dh=t.unmountHoistable,kp=t.createHoistableInstance,mh=t.prepareToCommitHoistables,ym=t.mayResourceSuspendCommit,ph=t.preloadResource,yh=t.suspendResource,Cn=t.supportsSingletons,gh=t.resolveSingletonInstance,Kp=t.clearSingleton,Zp=t.acquireSingletonInstance,gm=t.releaseSingletonInstance,Or=t.isHostSingletonType,Lu=[],ml=-1,Ys={},la=Math.clz32?Math.clz32:B,Xu=Math.log,vm=Math.LN2,Nr=128,Vu=4194304,wr=Tn.unstable_scheduleCallback,Qu=Tn.unstable_cancelCallback,xm=Tn.unstable_shouldYield,_m=Tn.unstable_requestPaint,An=Tn.unstable_now,vh=Tn.unstable_ImmediatePriority,Sm=Tn.unstable_UserBlockingPriority,yc=Tn.unstable_NormalPriority,gc=Tn.unstable_IdlePriority,bm=Tn.log,xh=Tn.unstable_setDisableYieldValue,Br=null,sa=null,Ea=typeof Object.is=="function"?Object.is:at,vc=new WeakMap,we=[],qe=0,ku=null,Ku=0,Ca=[],Aa=0,oi=null,Hi=1,Qa="",_n=M(null),Zu=M(null),ci=M(null),Ur=M(null),Un=null,Mn=null,se=!1,Ma=null,ka=!1,Ju=Error(o(519)),Ra=[],as=0,Hr=0,Gr=null,qs=null,Wu=!1,Pu=!1,fi=!1,is=0,Fu=null,xc=0,ra=0,ls=null,pl=!1,jr=!1,Iu=Object.prototype.hasOwnProperty,xe=Error(o(460)),_h=Error(o(474)),_c={then:function(){}},Ls=null,Gi=null,Ka=0,ss=vd(!0),Sh=vd(!1),ji=M(null),za=M(0),Da=M(null),Za=null,nn=M(0),Yi=0,Qt=null,he=null,Ke=null,Ja=!1,Be=!1,yl=!1,$u=0,Le=0,Yr=null,Tm=0,Sc=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}},re={readContext:bn,use:$i,useCallback:Ft,useContext:Ft,useEffect:Ft,useImperativeHandle:Ft,useLayoutEffect:Ft,useInsertionEffect:Ft,useMemo:Ft,useReducer:Ft,useRef:Ft,useState:Ft,useDebugValue:Ft,useDeferredValue:Ft,useTransition:Ft,useSyncExternalStore:Ft,useId:Ft};re.useCacheRefresh=Ft,re.useMemoCache=Ft,re.useHostTransitionStatus=Ft,re.useFormState=Ft,re.useActionState=Ft,re.useOptimistic=Ft;var an={readContext:bn,use:$i,useCallback:function(s,r){return cn().memoizedState=[s,r===void 0?null:r],s},useContext:bn,useEffect:of,useImperativeHandle:function(s,r,h){h=h!=null?h.concat([s]):null,Ro(4194308,4,du.bind(null,r,s),h)},useLayoutEffect:function(s,r){return Ro(4194308,4,s,r)},useInsertionEffect:function(s,r){Ro(4,2,s,r)},useMemo:function(s,r){var h=cn();r=r===void 0?null:r;var g=s();if(yl){G(!0);try{s()}finally{G(!1)}}return h.memoizedState=[g,r],g},useReducer:function(s,r,h){var g=cn();if(h!==void 0){var S=h(r);if(yl){G(!0);try{h(r)}finally{G(!1)}}}else S=r;return g.memoizedState=g.baseState=S,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:S},g.queue=s,s=s.dispatch=Bl.bind(null,Qt,s),[g.memoizedState,s]},useRef:function(s){var r=cn();return s={current:s},r.memoizedState=s},useState:function(s){s=ai(s);var r=s.queue,h=No.bind(null,Qt,r);return r.dispatch=h,[s.memoizedState,h]},useDebugValue:mu,useDeferredValue:function(s,r){var h=cn();return wl(h,s,r)},useTransition:function(){var s=ai(!1);return s=Do.bind(null,Qt,s.queue,!0,!1),cn().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,r,h){var g=Qt,S=cn();if(se){if(h===void 0)throw Error(o(407));h=h()}else{if(h=r(),Wt===null)throw Error(o(349));(Kt&60)!==0||af(g,r,h)}S.memoizedState=h;var T={value:h,getSnapshot:r};return S.queue=T,of(Sd.bind(null,g,T,s),[s]),g.flags|=2048,_s(9,lf.bind(null,g,T,h,r),{destroy:void 0},null),h},useId:function(){var s=cn(),r=Wt.identifierPrefix;if(se){var h=Qa,g=Hi;h=(g&~(1<<32-la(g)-1)).toString(32)+h,r=":"+r+"R"+h,h=$u++,0<h&&(r+="H"+h.toString(32)),r+=":"}else h=Tm++,r=":"+r+"r"+h.toString(32)+":";return s.memoizedState=r},useCacheRefresh:function(){return cn().memoizedState=pu.bind(null,Qt)}};an.useMemoCache=tn,an.useHostTransitionStatus=Ts,an.useFormState=Ao,an.useActionState=Ao,an.useOptimistic=function(s){var r=cn();r.memoizedState=r.baseState=s;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=h,r=wo.bind(null,Qt,!0,h),h.dispatch=r,[s,r]};var Hn={readContext:bn,use:$i,useCallback:zo,useContext:bn,useEffect:hu,useImperativeHandle:Ei,useInsertionEffect:Cd,useLayoutEffect:Ad,useMemo:bs,useReducer:uu,useRef:Ss,useState:function(){return uu(Ti)},useDebugValue:mu,useDeferredValue:function(s,r){var h=De();return cf(h,he.memoizedState,s,r)},useTransition:function(){var s=uu(Ti)[0],r=De().memoizedState;return[typeof s=="boolean"?s:Ii(s),r]},useSyncExternalStore:_d,useId:Ci};Hn.useCacheRefresh=Oo,Hn.useMemoCache=tn,Hn.useHostTransitionStatus=Ts,Hn.useFormState=rf,Hn.useActionState=rf,Hn.useOptimistic=function(s,r){var h=De();return ya(h,he,s,r)};var rs={readContext:bn,use:$i,useCallback:zo,useContext:bn,useEffect:hu,useImperativeHandle:Ei,useInsertionEffect:Cd,useLayoutEffect:Ad,useMemo:bs,useReducer:Nl,useRef:Ss,useState:function(){return Nl(Ti)},useDebugValue:mu,useDeferredValue:function(s,r){var h=De();return he===null?wl(h,s,r):cf(h,he.memoizedState,s,r)},useTransition:function(){var s=Nl(Ti)[0],r=De().memoizedState;return[typeof s=="boolean"?s:Ii(s),r]},useSyncExternalStore:_d,useId:Ci};rs.useCacheRefresh=Oo,rs.useMemoCache=tn,rs.useHostTransitionStatus=Ts,rs.useFormState=uf,rs.useActionState=uf,rs.useOptimistic=function(s,r){var h=De();return he!==null?ya(h,he,s,r):(h.baseState=s,[s,h.queue.dispatch])};var bc={isMounted:function(s){return(s=s._reactInternals)?b(s)===s:!1},enqueueSetState:function(s,r,h){s=s._reactInternals;var g=Qn(),S=qa(g);S.payload=r,h!=null&&(S.callback=h),r=$e(s,S,g),r!==null&&(Nn(r,s,g),La(r,s,g))},enqueueReplaceState:function(s,r,h){s=s._reactInternals;var g=Qn(),S=qa(g);S.tag=1,S.payload=r,h!=null&&(S.callback=h),r=$e(s,S,g),r!==null&&(Nn(r,s,g),La(r,s,g))},enqueueForceUpdate:function(s,r){s=s._reactInternals;var h=Qn(),g=qa(h);g.tag=2,r!=null&&(g.callback=r),r=$e(s,g,h),r!==null&&(Nn(r,s,h),La(r,s,h))}},bh=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},Em=Error(o(461)),Ze=!1,Gn={dehydrated:null,treeContext:null,retryLane:0},ua=M(null),us=null,Xe=null,Cm=typeof AbortController<"u"?AbortController:function(){var s=[],r=this.signal={aborted:!1,addEventListener:function(h,g){s.push(g)}};this.abort=function(){r.aborted=!0,s.forEach(function(h){return h()})}},gl=Tn.unstable_scheduleCallback,Xs=Tn.unstable_NormalPriority,me={$$typeof:Oi,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},Tc=Nt.S;Nt.S=function(s,r){typeof r=="object"&&r!==null&&typeof r.then=="function"&&vo(s,r),Tc!==null&&Tc(s,r)};var vl=M(null),hn=!1,He=!1,os=!1,qr=typeof WeakSet=="function"?WeakSet:Set,Ve=null,Vs=!1,Je=null,oa=!1,Zn=null,Qs=8192,Ec={getCacheForType:function(s){var r=bn(me),h=r.data.get(s);return h===void 0&&(h=s(),r.data.set(s,h)),h}},to=0,Cc=1,Ac=2,ne=3,pe=4;if(typeof Symbol=="function"&&Symbol.for){var kt=Symbol.for;to=kt("selector.component"),Cc=kt("selector.has_pseudo_class"),Ac=kt("selector.role"),ne=kt("selector.test_id"),pe=kt("selector.text")}var $t=typeof WeakMap=="function"?WeakMap:Map,zt=0,Wt=null,Xt=null,Kt=0,be=0,We=null,ye=!1,Oa=!1,xl=!1,hi=0,ae=0,Na=0,di=0,jn=0,ca=0,_l=0,Lr=null,wa=null,Xr=!1,qi=0,Ge=1/0,mi=null,Ba=null,Wa=!1,Sl=null,ks=0,Mc=0,Ks=null,Zs=0,Jn=null;return Rt.attemptContinuousHydration=function(s){if(s.tag===13){var r=ei(s,67108864);r!==null&&Nn(r,s,67108864),Hf(s,67108864)}},Rt.attemptHydrationAtCurrentPriority=function(s){if(s.tag===13){var r=Qn(),h=ei(s,r);h!==null&&Nn(h,s,r),Hf(s,r)}},Rt.attemptSynchronousHydration=function(s){switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var r=U(s.pendingLanes);if(r!==0){for(s.pendingLanes|=2,s.entangledLanes|=2;r;){var h=1<<31-la(r);s.entanglements[1]|=h,r&=~h}Ya(s),(zt&6)===0&&(Ge=An()+500,Dl(0))}}break;case 13:r=ei(s,2),r!==null&&Nn(r,s,2),Of(),Hf(s,2)}},Rt.batchedUpdates=function(s,r){return s(r)},Rt.createComponentSelector=function(s){return{$$typeof:to,value:s}},Rt.createContainer=function(s,r,h,g,S,T,N,q,W,ct){return xn(s,r,!1,null,h,g,T,N,q,W,ct,null)},Rt.createHasPseudoClassSelector=function(s){return{$$typeof:Cc,value:s}},Rt.createHydrationContainer=function(s,r,h,g,S,T,N,q,W,ct,_t,St,bt){return s=xn(h,g,!0,s,S,T,q,W,ct,_t,St,bt),s.context=Ou(null),h=s.current,g=Qn(),S=qa(g),S.callback=r??null,$e(h,S,g),s.current.lanes=g,ut(s,g),Ya(s),s},Rt.createPortal=function(s,r,h){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ri,key:g==null?null:""+g,children:s,containerInfo:r,implementation:h}},Rt.createRoleSelector=function(s){return{$$typeof:Ac,value:s}},Rt.createTestNameSelector=function(s){return{$$typeof:ne,value:s}},Rt.createTextSelector=function(s){return{$$typeof:pe,value:s}},Rt.defaultOnCaughtError=function(s){console.error(s)},Rt.defaultOnRecoverableError=function(s){bh(s)},Rt.defaultOnUncaughtError=function(s){bh(s)},Rt.deferredUpdates=function(s){var r=Nt.T,h=fn();try{return Bn(32),Nt.T=null,s()}finally{Bn(h),Nt.T=r}},Rt.discreteUpdates=function(s,r,h,g,S){var T=Nt.T,N=fn();try{return Bn(2),Nt.T=null,s(r,h,g,S)}finally{Bn(N),Nt.T=T,zt===0&&(Ge=An()+500)}},Rt.findAllNodes=Vn,Rt.findBoundingRects=function(s,r){if(!Bi)throw Error(o(363));r=Vn(s,r),s=[];for(var h=0;h<r.length;h++)s.push(sc(r[h]));for(r=s.length-1;0<r;r--){h=s[r];for(var g=h.x,S=g+h.width,T=h.y,N=T+h.height,q=r-1;0<=q;q--)if(r!==q){var W=s[q],ct=W.x,_t=ct+W.width,St=W.y,bt=St+W.height;if(g>=ct&&T>=St&&S<=_t&&N<=bt){s.splice(r,1);break}else if(g!==ct||h.width!==W.width||bt<T||St>N){if(!(T!==St||h.height!==W.height||_t<g||ct>S)){ct>g&&(W.width+=ct-g,W.x=g),_t<S&&(W.width=S-ct),s.splice(r,1);break}}else{St>T&&(W.height+=St-T,W.y=T),bt<N&&(W.height=N-St),s.splice(r,1);break}}}return s},Rt.findHostInstance=Uf,Rt.findHostInstanceWithNoPortals=function(s){return s=C(s),s=s!==null?z(s):null,s===null?null:zr(s.stateNode)},Rt.findHostInstanceWithWarning=function(s){return Uf(s)},Rt.flushPassiveEffects=vn,Rt.flushSyncFromReconciler=function(s){var r=zt;zt|=1;var h=Nt.T,g=fn();try{if(Bn(2),Nt.T=null,s)return s()}finally{Bn(g),Nt.T=h,zt=r,(zt&6)===0&&Dl(0)}},Rt.flushSyncWork=Of,Rt.focusWithin=function(s,r){if(!Bi)throw Error(o(363));for(s=Jo(s),r=Qd(s,r),r=Array.from(r),s=0;s<r.length;){var h=r[s++],g=h.tag;if(!Ui(h)){if((g===5||g===26||g===27)&&Ye(h.stateNode))return!0;for(h=h.child;h!==null;)r.push(h),h=h.sibling}}return!1},Rt.getFindAllNodesFailureDescription=function(s,r){if(!Bi)throw Error(o(363));var h=0,g=[];s=[Jo(s),0];for(var S=0;S<s.length;){var T=s[S++],N=T.tag,q=s[S++],W=r[q];if((N!==5&&N!==26&&N!==27||!Ui(T))&&(Er(T,W)&&(g.push(Zl(W)),q++,q>h&&(h=q)),q<r.length))for(T=T.child;T!==null;)s.push(T,q),T=T.sibling}if(h<r.length){for(s=[];h<r.length;h++)s.push(Zl(r[h]));return`findAllNodes was able to match part of the selector:
341
+ `+(g.join(" > ")+`
342
+
343
+ No matching component was found for:
344
+ `)+s.join(" > ")}return null},Rt.getPublicRootInstance=function(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 27:case 5:return zr(s.child.stateNode);default:return s.child.stateNode}},Rt.injectIntoDevTools=function(){var s={bundleType:0,version:nc,rendererPackageName:Bu,currentDispatcherRef:Nt,findFiberByHostInstance:Kf,reconcilerVersion:"19.0.0"};if(Uu!==null&&(s.rendererConfig=Uu),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")s=!1;else{var r=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(r.isDisabled||!r.supportsFiber)s=!0;else{try{Br=r.inject(s),sa=r}catch{}s=!!r.checkDCE}}return s},Rt.isAlreadyRendering=function(){return!1},Rt.observeVisibleRects=function(s,r,h,g){if(!Bi)throw Error(o(363));s=Vn(s,r);var S=Wf(s,h,g).disconnect;return{disconnect:function(){S()}}},Rt.shouldError=function(){return null},Rt.shouldSuspend=function(){return!1},Rt.startHostTransition=function(s,r,h,g){if(s.tag!==5)throw Error(o(476));var S=ff(s).queue;Do(s,S,r,ia,h===null?l:function(){var T=ff(s).next.queue;return Ul(s,T,{},Qn()),h(g)})},Rt.updateContainer=function(s,r,h,g){var S=r.current,T=Qn();return Zd(S,T,s,r,h,g),T},Rt.updateContainerSync=function(s,r,h,g){return r.tag===0&&vn(),Zd(r.current,2,s,r,h,g),2},Rt},n.exports.default=n.exports,Object.defineProperty(n.exports,"__esModule",{value:!0})})(sy)),sy.exports}var tx;function XA(){return tx||(tx=1,ly.exports=LA()),ly.exports}var VA=XA();const QA=Ep(VA),kA=QA;function KA(n,t,a,l){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function ZA(){}function JA(){return!1}const S2={};function WA(n){return n??S2}function PA(){return tu.currentUpdatePriority}function FA(){return null}function IA(n){throw new Error("Not yet implemented.")}function $A(n){return n}function tM(){return S2}function eM(n){n instanceof Fn?n.visible=!1:n instanceof yo&&(n.enabled=!1)}function nM(n){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function b2(n){if(n instanceof yo){const t=n.__pixireact.parent;if(t){const a=t.__pixireact.filters.indexOf(n);t.__pixireact.filters.splice(a,1),t.filters=t.__pixireact.filters}n.__pixireact.parent=null}}function T2(n,t,...a){}function ex(n,t,a){if(T2(),t instanceof Fn){const l=t,o=t,c=a;l.parent===n&&n.removeChild(o);const d=n.getChildIndex(c);n.addChildAt(o,d)}else if(t instanceof yo){const c=t.__pixireact.filters.indexOf(a);b2(t),p2(n,t,c)}}function aM(){return!1}function iM(){return!0}function lM(){return null}function sM(){}function rM(){}function nx(n,t){t instanceof yo&&b2(t),t.destroy()}function uM(n){}function oM(){}function cM(){}function fM(){return-1.1}function hM(){return null}function dM(){var a;if(tu.currentUpdatePriority)return tu.currentUpdatePriority;const n=typeof self<"u"&&self||typeof window<"u"&&window;if(!n)return Qc.DefaultEventPriority;switch((a=n.event)==null?void 0:a.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Qc.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Qc.ContinuousEventPriority;default:return Qc.DefaultEventPriority}}function mM(n){tu.currentUpdatePriority=n}function pM(){return!1}function yM(){return!1}function gM(){}function vM(){}function xM(){}function _M(n){n instanceof Fn?n.visible=!0:n instanceof yo&&(n.enabled=!0)}function SM(n){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function bM(){return null}const TM={isPrimaryRenderer:!1,noTimeout:-1,NotPendingTransition:null,supportsHydration:!1,supportsMutation:!0,supportsPersistence:!1,warnsIfNotActing:!1,afterActiveInstanceBlur:_A,appendChild:iy,appendChildToContainer:iy,appendInitialChild:iy,beforeActiveInstanceBlur:SA,cancelTimeout:clearTimeout,clearContainer:bA,commitUpdate:wA,createInstance:jA,createTextInstance:KA,hideTextInstance:nM,unhideTextInstance:SM,detachDeletedInstance:ZA,finalizeInitialChildren:JA,getChildHostContext:WA,getCurrentUpdatePriority:PA,getInstanceFromNode:FA,getInstanceFromScope:IA,getPublicInstance:$A,getRootHostContext:tM,hideInstance:eM,insertBefore:ex,insertInContainerBefore:ex,maySuspendCommit:aM,preloadInstance:iM,prepareForCommit:lM,preparePortalMount:sM,prepareScopeUpdate:rM,removeChild:nx,removeChildFromContainer:nx,requestPostPaintCallback:uM,resetAfterCommit:oM,resetFormInstance:cM,resolveEventTimeStamp:fM,resolveEventType:hM,resolveUpdatePriority:dM,scheduleTimeout:setTimeout,shouldAttemptEagerTransition:pM,setCurrentUpdatePriority:mM,shouldSetTextContent:yM,startSuspendingCommit:gM,suspendInstance:vM,trackSchedulerEvent:xM,unhideInstance:_M,waitForCommitToBeReady:bM,rendererPackageName:"@pixi/react",rendererVersion:xA.version},Tp=kA(TM);Tp.injectIntoDevTools();const Pc=new Map;function EM(n,t={}){let a=Pc.get(n),l=(a==null?void 0:a.applicationState)??{isInitialised:!1,isInitialising:!1};const o=(a==null?void 0:a.internalState)??{};a||(l.app=new $y,o.rootContainer=m2(l.app.stage));const c=(a==null?void 0:a.fiber)??Tp.createContainer(o.rootContainer,Qc.ConcurrentRoot,null,!1,null,"",console.error,console.error,console.error,null);if(!a){let d;n instanceof HTMLCanvasElement&&(d=n),d||(d=document.createElement("canvas"),n.innerHTML="",n.appendChild(d)),o.canvas=d,a={applicationState:l,fiber:c,internalState:o,render:async(p,v)=>{var _;return!l.app.renderer&&!l.isInitialised&&!l.isInitialising&&(l.isInitialising=!0,await l.app.init({...v,canvas:d}),l.isInitialising=!1,l.isInitialised=!0,l={...l},(_=t.onInit)==null||_.call(t,l.app)),Object.entries(v).forEach(([b,E])=>{const C=b;d2(v,C)||(l.app[C]=E)}),Tp.updateContainer(X.jsx(gA,{value:l,children:p}),c,null,()=>{}),l.app}},Pc.set(d,a)}return a}function E2(n){tu.unmountQueue.delete(n);const t=n.fiber;t&&Tp.updateContainer(null,t,null,()=>{n.applicationState.app&&n.applicationState.app.destroy(),Pc.delete(n.internalState.canvas)})}function CM(){for(const n of tu.unmountQueue)E2(n)}function AM(n){const t=Pc.get(n);t&&(t.applicationState.isInitialised?E2(t):tu.unmountQueue.add(t))}function MM(n){const t=Pc.get(n);t&&tu.unmountQueue.delete(t)}var px,yx;const rp=typeof window<"u"&&((px=window.document)!=null&&px.createElement||((yx=window.navigator)==null?void 0:yx.product)==="ReactNative")?Y.useLayoutEffect:Y.useEffect,RM={...po.defaultTextStyle},zM=Y.forwardRef(function(t,a){const{children:l,className:o,defaultTextStyle:c,extensions:d,onInit:m,resizeTo:p,...v}=t,_=GT(),b=Y.useRef(null),E=Y.useRef(null),C=Y.useRef(new Set);Y.useImperativeHandle(a,()=>({getApplication(){return b.current},getCanvas(){return E.current}}));const R=Y.useCallback(()=>{const M=b.current;M&&(p?"current"in p?p.current instanceof HTMLElement&&(M.resizeTo=p.current):M.resizeTo=p:M.resizeTo=void 0)},[p]),z=Y.useCallback(M=>{CM(),b.current=M,R(),m==null||m(M)},[m]);return rp(()=>{if(d){const M=[...d],D=C.current;for(const w of D.values()){const B=M.indexOf(w);B===-1&&(Ie.remove(w),D.delete(w)),M.splice(B,1)}for(const w of M)Ie.add(w),D.add(w)}},[d]),rp(()=>{const M=E.current;if(M){let D=Pc.get(M);D||(D=EM(M,{onInit:z})),D.render(X.jsx(_,{children:l}),v)}},[v,l,z,p]),rp(()=>{R()},[p]),rp(()=>{c?Object.assign(po.defaultTextStyle,c):Object.assign(po.defaultTextStyle,RM)},[c]),Y.useEffect(()=>{const M=E.current;if(M)return MM(M),()=>{AM(M)}},[]),X.jsx("canvas",{ref:E,className:o})}),DM=Y.forwardRef(function(t,a){return X.jsx(qx,{children:X.jsx(zM,{ref:a,...t})})});function Gp(n){Object.assign(jy,n)}function OM(){const n=Y.useContext(cg);return T2(n.app instanceof $y,"No Context found with `%s`. Make sure to wrap component with `%s`","Application","AppProvider"),n}function NM({agentName:n,question:t,onRespond:a}){const[l,o]=Y.useState(""),c=()=>{const m=l.trim();m&&(a(m),o(""))},d=m=>{m.key==="Enter"&&c()};return X.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:X.jsxs("div",{className:"bg-white rounded-lg shadow-lg p-6 max-w-md w-full mx-4",children:[X.jsxs("h2",{className:"text-lg font-bold text-orange-500 mb-4",children:["CHECKPOINT — ",n]}),X.jsx("p",{className:"text-gray-700 mb-6",children:t}),X.jsxs("div",{className:"flex gap-2",children:[X.jsx("input",{type:"text",placeholder:"Type your response...",value:l,onChange:m=>o(m.target.value),onKeyPress:d,className:"flex-1 px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500",autoFocus:!0}),X.jsx("button",{onClick:c,className:"px-4 py-2 bg-orange-500 text-white rounded-md font-semibold hover:bg-orange-600 transition-colors",children:"Send"})]})]})})}const ax=[16109737,15251594,13935988,13012574,10515018,9133628],ix=[2890510,4861722,9136404,12886874,1710618,9118976],wM=hp,wt=wM/2,jt=7,_e=14,ln=12,sn=5,Qi=10,Te=4,ki=9,Jt=8;function Gc(n,t,a,l,o){n.circle(t,a-1,jt+1),n.fill(o),n.circle(t,a,jt),n.fill(l),n.circle(t-3,a-1,1.5),n.fill(1710618),n.circle(t+3,a-1,1.5),n.fill(1710618),n.circle(t-2.5,a-1.5,.6),n.fill(16777215),n.circle(t+3.5,a-1.5,.6),n.fill(16777215)}function jc(n,t,a,l,o,c){n.roundRect(t-l/2,a,l,o,3),n.fill(c),n.moveTo(t-3,a),n.lineTo(t,a+4),n.lineTo(t+3,a),n.stroke({width:1,color:BM(c,.15)})}function lx(n,t,a,l,o){n.roundRect(t-l-1,a,l,o,2),n.fill(2899536),n.roundRect(t+1,a,l,o,2),n.fill(2899536)}function sx(n,t,a,l){n.roundRect(t-l-2,a,l+2,3,1),n.fill(1710618),n.roundRect(t,a,l+2,3,1),n.fill(1710618)}function BM(n,t){const a=Math.max(0,(n>>16&255)*(1-t)),l=Math.max(0,(n>>8&255)*(1-t)),o=Math.max(0,(n&255)*(1-t));return Math.floor(a)<<16|Math.floor(l)<<8|Math.floor(o)}function UM(n){const t=new Map;for(let a=0;a<my.length;a++){const l=my[a],o=ax[a%ax.length],c=ix[a%ix.length],d=new $a;Gc(d,wt,Jt,o,c),jc(d,wt,Jt+jt,_e,ln,l),d.roundRect(wt-_e/2-Te,Jt+jt+1,Te,ki,2),d.fill(l),d.roundRect(wt+_e/2,Jt+jt+1,Te,ki,2),d.fill(l),d.circle(wt-_e/2-Te/2,Jt+jt+ki+1,2),d.fill(o),d.circle(wt+_e/2+Te/2,Jt+jt+ki+1,2),d.fill(o),lx(d,wt,Jt+jt+ln,sn,Qi),sx(d,wt,Jt+jt+ln+Qi,sn),t.set(`agent-${a}-standing`,n.renderer.generateTexture(d));const m=new $a,p=Jt+4;Gc(m,wt,p,o,c),jc(m,wt,p+jt,_e,ln-2,l),m.roundRect(wt-_e/2-Te+1,p+jt+2,Te,ki-3,2),m.fill(l),m.roundRect(wt+_e/2-1,p+jt+2,Te,ki-3,2),m.fill(l);const v=6;m.roundRect(wt-sn-1,p+jt+ln-2,sn+1,v,2),m.fill(2899536),m.roundRect(wt,p+jt+ln-2,sn+1,v,2),m.fill(2899536),t.set(`agent-${a}-seated`,n.renderer.generateTexture(m));const _=new $a,b=Jt+4;Gc(_,wt+2,b,o,c),jc(_,wt+1,b+jt,_e,ln-2,l),_.roundRect(wt+_e/2,b+jt+2,Te+4,4,2),_.fill(l),_.roundRect(wt+_e/2-2,b+jt+2,Te+4,4,2),_.fill(l),_.circle(wt+_e/2+Te+3,b+jt+4,2),_.fill(o),_.circle(wt+_e/2+Te+1,b+jt+4,2),_.fill(o),m.roundRect(wt-sn-1,b+jt+ln-2,sn+1,v,2),m.fill(2899536),_.roundRect(wt,b+jt+ln-2,sn+1,v,2),_.fill(2899536),t.set(`agent-${a}-typing`,n.renderer.generateTexture(_));const E=new $a;Gc(E,wt,Jt,o,c),jc(E,wt,Jt+jt,_e,ln,l),E.roundRect(wt-_e/2-Te,Jt+jt-1,Te,ki+2,2),E.fill(l),E.roundRect(wt+_e/2,Jt+jt+3,Te,ki-2,2),E.fill(l),E.roundRect(wt+1,Jt+jt+ln,sn,Qi+2,2),E.fill(2899536),E.roundRect(wt-sn-1,Jt+jt+ln-2,sn,Qi,2),E.fill(2899536),E.roundRect(wt,Jt+jt+ln+Qi+1,sn+2,3,1),E.fill(1710618),E.roundRect(wt-sn-2,Jt+jt+ln+Qi-3,sn+1,3,1),E.fill(1710618),t.set(`agent-${a}-walk-right`,n.renderer.generateTexture(E));const C=new $a;Gc(C,wt,Jt,o,c),jc(C,wt,Jt+jt,_e,ln,l),C.roundRect(wt+_e/2,Jt+jt-1,Te,ki+2,2),C.fill(l),C.roundRect(wt-_e/2-Te,Jt+jt+3,Te,ki-2,2),C.fill(l),C.roundRect(wt-sn-1,Jt+jt+ln,sn,Qi+2,2),C.fill(2899536),C.roundRect(wt+1,Jt+jt+ln-2,sn,Qi,2),C.fill(2899536),C.roundRect(wt-sn-2,Jt+jt+ln+Qi+1,sn+2,3,1),C.fill(1710618),C.roundRect(wt,Jt+jt+ln+Qi-3,sn+1,3,1),C.fill(1710618),t.set(`agent-${a}-walk-left`,n.renderer.generateTexture(C));const R=new $a;Gc(R,wt,Jt,o,c),jc(R,wt,Jt+jt,_e,ln,l),R.roundRect(wt-_e/2-Te,Jt+jt+1,Te,ki,2),R.fill(l),R.circle(wt-_e/2-Te/2,Jt+jt+ki+1,2),R.fill(o),R.roundRect(wt+_e/2,Jt+jt,Te,6,2),R.fill(l),R.circle(wt+_e/2+Te/2+1,Jt+jt,2),R.fill(o),R.roundRect(wt+_e/2+Te/2-1,Jt+jt-6,6,7,1),R.fill(14142664),R.moveTo(wt+_e/2+Te/2,Jt+jt-7),R.quadraticCurveTo(wt+_e/2+Te/2+2,Jt+jt-11,wt+_e/2+Te/2,Jt+jt-14),R.stroke({width:1,color:16777215,alpha:.4}),R.moveTo(wt+_e/2+Te/2+3,Jt+jt-7),R.quadraticCurveTo(wt+_e/2+Te/2+5,Jt+jt-10,wt+_e/2+Te/2+3,Jt+jt-13),R.stroke({width:1,color:16777215,alpha:.3}),lx(R,wt,Jt+jt+ln,sn,Qi),sx(R,wt,Jt+jt+ln+Qi,sn),t.set(`agent-${a}-coffee`,n.renderer.generateTexture(R))}return t}function HM(n,t){const a=n%my.length;let l;switch(t){case"working":l="typing";break;case"typing":l="typing";break;case"standing":l="standing";break;case"coffee":l="coffee";break;case"walk-right":l="walk-right";break;case"walk-left":l="walk-left";break;case"delivering":l="walk-right";break;case"idle":l="standing";break;case"seated":l="seated";break;case"checkpoint":case"done":default:l="seated";break}return`agent-${a}-${l}`}function GM(n,t){const a=Ux;n.roundRect(0,0,t.totalWidth,t.totalHeight,4),n.fill(gi.wall),n.rect(0,0,t.totalWidth,3),n.fill({color:gi.wallHighlight,alpha:.5}),jM(n,t.corridor.x,t.corridor.y,t.corridor.width,t.corridor.height),YM(n,t.lobby.x,t.lobby.y,t.lobby.width,t.lobby.height);const l=t.corridor.y;for(const _ of t.squadOrigins){const b=_.x+Ml/2-Vi/2,E=_.y+ho;n.rect(b,E,Vi,l-E),n.fill(tr.floor),n.rect(b-2,E,2,l-E),n.fill(gi.doorFrame),n.rect(b+Vi,E,2,l-E),n.fill(gi.doorFrame)}const o=t.corridor.y+t.corridor.height,c=o+a,d=t.ceoOffice.x+t.ceoOffice.width/2-Vi/2;n.rect(d,o,Vi,c-o),n.fill(tr.floor),n.rect(d-2,o,2,a),n.fill(gi.doorFrame),n.rect(d+Vi,o,2,a),n.fill(gi.doorFrame);const m=t.bathroomMale.x+t.bathroomMale.width/2-Vi/2;n.rect(m,o,Vi,c-o),n.fill(tr.floor),n.rect(m-2,o,2,a),n.fill(gi.doorFrame),n.rect(m+Vi,o,2,a),n.fill(gi.doorFrame);const p=t.bathroomFemale.x+t.bathroomFemale.width/2-Vi/2;n.rect(p,o,Vi,c-o),n.fill(tr.floor),n.rect(p-2,o,2,a),n.fill(gi.doorFrame),n.rect(p+Vi,o,2,a),n.fill(gi.doorFrame);const v=t.corridor.y+t.corridor.height/2;for(let _=t.corridor.x+50;_<t.corridor.x+t.corridor.width-50;_+=200)n.roundRect(_-8,v-12,16,12,2),n.fill(9133628),n.circle(_,v-16,8),n.fill(5025616),n.circle(_-4,v-20,5),n.fill(3706428),n.circle(_+4,v-18,6),n.fill(6732650);n.roundRect(0,0,t.totalWidth,t.totalHeight,4),n.stroke({width:2,color:5533306,alpha:.6})}function jM(n,t,a,l,o){n.rect(t,a,l,o),n.fill(tr.floor);const c=40;for(let d=0;d<Math.ceil(o/c);d++){for(let m=0;m<Math.ceil(l/c);m++){const p=t+m*c,v=a+d*c;(d+m)%2===0&&(n.rect(p,v,c,c),n.fill({color:tr.tile,alpha:.5})),n.moveTo(p,a),n.lineTo(p,a+o),n.stroke({width:.5,color:tr.grout,alpha:.3})}n.moveTo(t,a+d*c),n.lineTo(t+l,a+d*c),n.stroke({width:.5,color:tr.grout,alpha:.3})}n.rect(t+10,a+o/2-2,l-20,4),n.fill({color:tr.stripe,alpha:.3})}function YM(n,t,a,l,o){if(l<=0)return;n.rect(t,a,l,o),n.fill(gi.lobby);const c=30;for(let v=0;v<Math.ceil(o/c);v++)for(let _=0;_<Math.ceil(l/c);_++)(v+_)%2===0&&(n.rect(t+_*c,a+v*c,c,c),n.fill({color:gi.lobbyTile,alpha:.4}));const d=Math.min(120,l-40),m=t+(l-d)/2,p=a+o/2-20;n.roundRect(m+2,p+2,d,40,4),n.fill({color:0,alpha:.1}),n.roundRect(m,p,d,40,4),n.fill(gi.lobbyAccent),n.roundRect(m+2,p+2,d-4,36,3),n.fill({color:10586239,alpha:.8}),n.roundRect(m+d/2-12,p+8,24,16,2),n.fill(3622735),n.roundRect(m+d/2-10,p+10,20,10,1),n.fill(1981020),n.roundRect(t+10,a+20,14,10,2),n.fill(9133628),n.circle(t+17,a+16,8),n.fill(5025616),n.circle(t+14,a+12,6),n.fill(6732650)}function rx(n,t,a,l,o,c){n.rect(t,a,l,o),n.fill(Ua.floor);const d=20;for(let M=0;M<Math.ceil(o/d);M++)for(let D=0;D<Math.ceil(l/d);D++)if((M+D)%2===0){const w=t+D*d,B=a+M*d;n.rect(w,B,d,d),n.fill({color:Ua.tile,alpha:.4})}for(let M=0;M<=Math.ceil(o/d);M++)n.moveTo(t,a+M*d),n.lineTo(t+l,a+M*d),n.stroke({width:.5,color:Ua.tileGrout,alpha:.3});for(let M=0;M<=Math.ceil(l/d);M++)n.moveTo(t+M*d,a),n.lineTo(t+M*d,a+o),n.stroke({width:.5,color:Ua.tileGrout,alpha:.3});const m=2,p=(l-20)/m,v=80,_=a+o-v-10;for(let M=0;M<m;M++){const D=t+10+M*p;n.rect(D,_,3,v),n.fill(Ua.stall),n.rect(D+p-3,_,3,v),n.fill(Ua.stall),n.roundRect(D+6,_,p-12,v-4,2),n.fill({color:Ua.stallDoor,alpha:.6}),n.circle(D+p-16,_+v/2,2),n.fill({color:7901340,alpha:.8});const w=D+p/2,B=_+v-24;n.roundRect(w-8,B,16,20,4),n.fill(Ua.toilet),n.roundRect(w-6,B+2,12,14,3),n.fill(Ua.toiletSeat),n.roundRect(w-6,B+2,12,14,3),n.stroke({width:.5,color:12434877,alpha:.5})}const b=2,E=l/(b+1),C=a+30;n.rect(t+4,a+4,l-8,60),n.fill({color:Ua.wall,alpha:.3});for(let M=0;M<b;M++){const D=t+E*(M+1);n.roundRect(D-12,a+8,24,20,3),n.fill(Ua.mirrorFrame),n.roundRect(D-10,a+10,20,16,2),n.fill(Ua.mirror),n.roundRect(D-6,a+12,6,10,1),n.fill({color:16777215,alpha:.15}),n.roundRect(D-14,C,28,16,3),n.fill(Ua.sink),n.ellipse(D,C+8,8,5),n.fill(Ua.sinkBowl),n.ellipse(D,C+8,8,5),n.stroke({width:.5,color:12434877,alpha:.4}),n.roundRect(D-2,C+1,4,6,1),n.fill(Ua.pipe)}const R=t+l/2,z=a+o-20;n.roundRect(R-12,z-6,24,14,3),n.fill({color:3622735,alpha:.7}),c==="male"?(n.circle(R,z-2,3),n.fill({color:16777215,alpha:.8}),n.rect(R-3,z+1,6,4),n.fill({color:4367861,alpha:.8})):(n.circle(R,z-2,3),n.fill({color:16777215,alpha:.8}),n.moveTo(R-5,z+5),n.lineTo(R+5,z+5),n.lineTo(R,z+1),n.closePath(),n.fill({color:15684432,alpha:.8})),n.rect(t,a,l,o),n.stroke({width:1,color:0,alpha:.08})}function qM(n,t,a){n.rect(0,0,t,a),n.fill(Yt.floor);const l=20,o=80;for(let b=0;b<Math.ceil(a/l);b++){const E=b%2*(o/2),C=b*l;n.moveTo(0,C),n.lineTo(t,C),n.stroke({width:1,color:Yt.floorGrout,alpha:.4});for(let R=0;R<Math.ceil(t/o)+1;R++){const z=R*o-E;z>0&&z<t&&(n.moveTo(z,C),n.lineTo(z,C+l),n.stroke({width:1,color:Yt.floorGrout,alpha:.25}))}b%3===0&&(n.rect(0,C+2,t,l-4),n.fill({color:Yt.floorHighlight,alpha:.08}))}const c=42;n.rect(0,c,t,4),n.fill({color:0,alpha:.1}),n.rect(0,0,t,c),n.fill({color:Yt.wall,alpha:.2}),n.rect(0,0,t,3),n.fill({color:Yt.wallTrim,alpha:.15}),n.rect(0,c-4,t,4),n.fill({color:Yt.baseboard,alpha:.2});const d=120,m=t-d*2,p=a-200,v=d,_=100;n.roundRect(v+3,_+3,m,p,6),n.fill({color:0,alpha:.08}),n.roundRect(v,_,m,p,6),n.fill({color:Yt.rug,alpha:.15}),n.roundRect(v+4,_+4,m-8,p-8,4),n.stroke({width:1.5,color:Yt.rugBorder,alpha:.12}),n.roundRect(v+12,_+12,m-24,p-24,3),n.stroke({width:1,color:Yt.rugPattern,alpha:.1})}function LM(n,t,a){const l=t+El/2,o=a+Fr+8;for(let z=0;z<5;z++){const M=z/5*Math.PI*2-Math.PI/2,D=l+Math.cos(M)*10,w=o+14+Math.sin(M)*5;n.circle(D,w,2),n.fill(Yt.chairWheel)}n.rect(l-1.5,o+4,3,12),n.fill(Yt.chairBase),n.roundRect(l-14,o,28,10,4),n.fill(Yt.chairSeat),n.roundRect(l-12,o+1,24,4,3),n.fill({color:Yt.chairBack,alpha:.5}),n.roundRect(l-12,o-16,24,18,5),n.fill(Yt.chairBack),n.roundRect(l-10,o-14,20,8,3),n.fill({color:16777215,alpha:.05}),n.roundRect(t+3,a+3,El,Fr,4),n.fill({color:0,alpha:.12}),n.roundRect(t,a,El,Fr,4),n.fill(Yt.desk),n.roundRect(t+2,a+2,El-4,Fr-4,3),n.fill(Yt.deskTop);for(let z=0;z<3;z++){const M=a+10+z*16;n.moveTo(t+6,M),n.lineTo(t+El-6,M),n.stroke({width:.5,color:Yt.deskShadow,alpha:.2})}n.rect(t+2,a+Fr-6,El-4,4),n.fill(Yt.deskEdge);const c=4,d=8;n.rect(t+4,a+Fr,c,d),n.fill(Yt.deskLeg),n.rect(t+El-4-c,a+Fr,c,d),n.fill(Yt.deskLeg);const m=32,p=22,v=t+(El-m)/2,_=a+8;n.roundRect(v+m/2-10,_+p+4,20,4,2),n.fill(Yt.monitorStand),n.rect(v+m/2-2,_+p,4,6),n.fill(Yt.monitorStand),n.roundRect(v,_,m,p,2),n.fill(Yt.monitor),n.roundRect(v+2,_+2,m-4,p-5,1),n.fill(Yt.monitorScreen),n.roundRect(v+3,_+3,m-6,6,1),n.fill({color:Yt.monitorScreenGlow,alpha:.3});const b=24,E=8,C=v+(m-b)/2,R=_+p+10;n.roundRect(C,R,b,E,2),n.fill(Yt.keyboard);for(let z=0;z<3;z++)for(let M=0;M<6;M++)n.rect(C+2+M*3.5,R+1.5+z*2.5,2.5,1.5),n.fill(Yt.keyboardKey);n.roundRect(t+El-18,a+14,7,8,2),n.fill(14142664),n.roundRect(t+El-11,a+16,3,4,1),n.fill(14142664),n.rect(t+8,a+20,14,18),n.fill(16775620),n.rect(t+8,a+20,14,2),n.fill(16635957),n.rect(t+10,a+24,10,1.5),n.fill(1402304)}function XM(n,t,a){n.roundRect(t+2,a+2,44,64,3),n.fill({color:0,alpha:.1}),n.roundRect(t,a,44,64,3),n.fill(Yt.bookshelf),n.roundRect(t+1,a+1,42,62,2),n.stroke({width:1,color:Yt.bookshelfEdge,alpha:.3}),n.rect(t+3,a+3,38,58),n.fill({color:6048310,alpha:.5});for(let l=0;l<3;l++){const o=a+8+l*20;n.rect(t+3,o+14,38,3),n.fill(Yt.bookshelfEdge),n.rect(t+3,o+17,38,1),n.fill({color:0,alpha:.1});const c=4+l%2;for(let d=0;d<c;d++){const m=t+5+d*(34/c),p=Math.max(4,34/c-2),v=10+(d*3+l*2)%5,_=(d+l*3)%Yt.bookColors.length;n.rect(m,o+14-v,p,v),n.fill(Yt.bookColors[_]),n.rect(m+1,o+14-v+2,.8,v-4),n.fill({color:16777215,alpha:.15})}l===1&&(n.circle(t+38,o+8,4),n.fill({color:4367861,alpha:.6}),n.circle(t+38,o+8,4),n.stroke({width:.5,color:2001125,alpha:.4}))}n.roundRect(t+14,a-4,8,6,1),n.fill(Yt.pot),n.circle(t+18,a-6,5),n.fill(Yt.plantLight),n.circle(t+15,a-8,3),n.fill(Yt.plant)}function ux(n,t,a){n.ellipse(t+12,a+34,12,3),n.fill({color:0,alpha:.1}),n.moveTo(t+2,a+16),n.lineTo(t+4,a+32),n.lineTo(t+20,a+32),n.lineTo(t+22,a+16),n.closePath(),n.fill(Yt.pot),n.roundRect(t,a+14,24,5,2),n.fill(Yt.potRim),n.roundRect(t+2,a+14,20,2,1),n.fill({color:16777215,alpha:.08}),n.ellipse(t+12,a+16,10,3),n.fill(Yt.soil),n.rect(t+11,a+2,2,14),n.fill(Yt.plantDark),n.ellipse(t+6,a+4,7,5),n.fill(Yt.plantDark),n.ellipse(t+18,a+2,6,5),n.fill(Yt.plantDark),n.ellipse(t+12,a+1,8,6),n.fill(Yt.plant),n.ellipse(t+4,a+8,6,4),n.fill(Yt.plant),n.ellipse(t+20,a+8,6,4),n.fill(Yt.plant),n.ellipse(t+9,a+5,5,4),n.fill(Yt.plantLight),n.ellipse(t+15,a+3,5,4),n.fill(Yt.plantLight),n.moveTo(t+12,a-2),n.lineTo(t+12,a+6),n.stroke({width:.5,color:Yt.plantDark,alpha:.3})}function VM(n,t,a){n.roundRect(t+2,a+2,80,40,4),n.fill({color:0,alpha:.1}),n.roundRect(t,a,80,40,4),n.fill(da.counter),n.roundRect(t+1,a+1,78,8,3),n.fill(da.counterTop),n.roundRect(t+2,a+2,76,3,2),n.fill({color:16777215,alpha:.06}),n.roundRect(t+4,a-14,28,38,3),n.fill(da.machine),n.roundRect(t+5,a-14,26,6,2),n.fill(da.machineTop),n.roundRect(t+8,a+16,20,4,1),n.fill({color:2503224,alpha:.8}),n.rect(t+13,a+8,3,8),n.fill(da.machineTop),n.rect(t+20,a+8,3,8),n.fill(da.machineTop),n.circle(t+18,a-8,2.5),n.fill({color:da.machineLight,alpha:.9}),n.circle(t+18,a-8,5),n.fill({color:da.machineLight,alpha:.15}),n.roundRect(t+38,a+8,8,10,2),n.fill(da.cup),n.roundRect(t+46,a+10,3,5,1),n.fill(da.cup),n.roundRect(t+48,a+6,8,10,2),n.fill(da.cupShadow),n.ellipse(t+42,a+20,10,3),n.fill(da.saucer),n.roundRect(t+60,a+6,16,14,3),n.fill(da.sink),n.roundRect(t+62,a+8,12,10,2),n.fill({color:5533306,alpha:.8}),n.rect(t+66,a-2,3,10),n.fill(da.faucet),n.roundRect(t+65,a-4,8,3,1),n.fill(da.faucet),n.roundRect(t+10,a-30,30,14,2),n.fill(da.menu),n.rect(t+14,a-27,22,2),n.fill({color:16777215,alpha:.5}),n.rect(t+14,a-23,16,1.5),n.fill({color:16777215,alpha:.3}),n.rect(t+14,a-20,18,1.5),n.fill({color:16777215,alpha:.3})}function QM(n,t,a){n.roundRect(t-16,a-24,128,96,6),n.fill({color:pi.carpet,alpha:.25}),n.roundRect(t-12,a-20,120,88,4),n.stroke({width:1,color:pi.carpetPattern,alpha:.2});const l=t+10,o=a-20;n.roundRect(l+2,o+2,76,16,2),n.fill({color:0,alpha:.1}),n.roundRect(l,o,76,16,2),n.fill(pi.whiteboardFrame),n.roundRect(l+2,o+2,72,12,1),n.fill(pi.whiteboard),n.rect(l+6,o+4,18,8),n.fill({color:16775620,alpha:.6}),n.rect(l+28,o+4,18,8),n.fill({color:12312315,alpha:.6}),n.rect(l+50,o+4,18,8),n.fill({color:13166281,alpha:.6}),n.roundRect(l+20,o+14,36,3,1),n.fill(pi.whiteboardFrame),n.roundRect(t+3,a+3,96,48,6),n.fill({color:0,alpha:.1}),n.roundRect(t,a,96,48,6),n.fill(pi.table),n.roundRect(t+2,a+2,92,44,5),n.fill(pi.tableTop),n.roundRect(t+6,a+4,40,10,3),n.fill({color:16777215,alpha:.04}),n.roundRect(t+1,a+1,94,46,5),n.stroke({width:1,color:pi.tableEdge,alpha:.4});const c=4,d=6;n.rect(t+8,a+48,c,d),n.fill(pi.tableLeg),n.rect(t+84,a+48,c,d),n.fill(pi.tableLeg);const m=[{cx:t+16,cy:a-10},{cx:t+48,cy:a-10},{cx:t+80,cy:a-10},{cx:t+16,cy:a+56},{cx:t+48,cy:a+56},{cx:t+80,cy:a+56}];for(const p of m){const _=p.cy<a?p.cy-6:p.cy+6;n.roundRect(p.cx-8,_-4,16,10,3),n.fill(pi.chairBack),n.roundRect(p.cx-7,p.cy-4,14,8,3),n.fill(pi.chairSeat),n.roundRect(p.cx-5,p.cy-3,10,3,2),n.fill({color:16777215,alpha:.06}),n.circle(p.cx,p.cy+5,2),n.fill(pi.chair)}n.roundRect(t+10,a+8,18,12,2),n.fill(3622735),n.roundRect(t+11,a+9,16,8,1),n.fill(4545124),n.rect(t+60,a+12,12,16),n.fill({color:16777215,alpha:.7}),n.rect(t+62,a+14,8,1),n.fill({color:3355443,alpha:.3}),n.rect(t+62,a+17,6,1),n.fill({color:3355443,alpha:.3}),n.roundRect(t+40,a+10,6,14,2),n.fill({color:4367861,alpha:.6}),n.roundRect(t+41,a+7,4,4,1),n.fill({color:9489145,alpha:.5})}const kM={running:co.statusRunning,idle:co.statusIdle,completed:co.statusCompleted,checkpoint:co.statusCheckpoint};function KM(n,t,a,l){const o=a*.85,c=t+(a-o)/2,d=6,m=30;n.roundRect(c+2,d+2,o,m,8),n.fill({color:0,alpha:.15}),n.roundRect(c,d,o,m,8),n.fill({color:co.background,alpha:.85}),n.roundRect(c+2,d+1,o-4,8,6),n.fill({color:co.backgroundGlow,alpha:.4}),n.roundRect(c,d,o,m,8),n.stroke({width:1,color:16777215,alpha:.08});const p=kM[l]??co.statusIdle,v=c+o-18,_=d+m/2;n.circle(v,_,7),n.fill({color:p,alpha:.2}),n.circle(v,_,4),n.fill(p),n.circle(v-1,_-1,1.5),n.fill({color:16777215,alpha:.3}),n.circle(c+14,_,2),n.fill({color:16777215,alpha:.1})}Gp({Container:Fn,Graphics:$a,Sprite:Jc,Text:Hp});function C2({agent:n,textures:t,bubbleText:a,animX:l,animY:o,animPose:c}){const d=HM(n.colorIndex,c),m=t.get(d),p=bT[n.status==="walking"?"idle":n.status]??8947848,v=n.status==="checkpoint",_=Y.useCallback(E=>{E.clear(),E.circle(0,0,hp/2+6),E.fill({color:p,alpha:v?.4:.15})},[p,v]),b=Y.useCallback(E=>{if(E.clear(),!a)return;const C=Math.min(a.length*5+16,160);E.roundRect(-C/2,-42,C,22,6),E.fill({color:1710638,alpha:.9}),E.moveTo(-4,-20),E.lineTo(4,-20),E.lineTo(0,-15),E.closePath(),E.fill({color:1710638,alpha:.9})},[a]);return X.jsxs("container",{x:l,y:o,children:[X.jsx("graphics",{draw:_}),m&&X.jsx("sprite",{texture:m,anchor:.5}),X.jsx("text",{text:n.name,y:hp/2+4,anchor:{x:.5,y:0},style:{fontSize:9,fill:"#cccccc",fontFamily:"sans-serif"}}),v&&X.jsx("text",{text:"⚠",y:-hp/2-12,anchor:.5,style:{fontSize:14,fill:"#ff9800",fontFamily:"sans-serif"}}),a&&X.jsxs(X.Fragment,{children:[X.jsx("graphics",{draw:b}),X.jsx("text",{text:a.length>80?a.slice(-80)+"…":a,y:-31,anchor:{x:.5,y:.5},style:{fontSize:8,fill:"#ffffff",fontFamily:"sans-serif",wordWrap:!0,wordWrapWidth:140}})]})]})}Gp({Container:Fn,Graphics:$a,Text:Hp});function ZM({squadName:n,status:t,agents:a,textures:l,bubbles:o,animStates:c,originX:d,originY:m}){const p={x:0,y:0},v=Jh(p),_=Gx(p),b=Y.useCallback(E=>{E.clear(),qM(E,Ml,ho),KM(E,0,Ml,t);for(let C=0;C<a.length;C++){const R=dp(C,p);LM(E,R.x-48,R.y-32)}VM(E,v.x,v.y),QM(E,_.x,_.y),XM(E,Ml-60,44),ux(E,10,ho-50),ux(E,Ml-40,50)},[a.length,t]);return X.jsxs("container",{x:d,y:m,children:[X.jsx("graphics",{draw:b}),X.jsx("text",{text:n,x:Ml/2,y:22,anchor:.5,style:{fontSize:14,fill:"#ffffff",fontFamily:"sans-serif",fontWeight:"bold"}}),a.map(E=>{const C=`${n}:${E.id}`,R=o[C],z=c[E.id];return X.jsx(C2,{agent:E,textures:l,bubbleText:(R==null?void 0:R.text)??null,animX:(z==null?void 0:z.x)??E.position.x,animY:(z==null?void 0:z.y)??E.position.y,animPose:(z==null?void 0:z.pose)??(E.status==="working"?"typing":"seated")},E.id)})]})}function JM(n,t,a,l,o){n.rect(t,a,l,o),n.fill(Pa.floor);const c=16,d=60;for(let ut=0;ut<Math.ceil(o/c);ut++){const pt=ut%2*(d/2),gt=a+ut*c;n.moveTo(t,gt),n.lineTo(t+l,gt),n.stroke({width:.5,color:4861984,alpha:.3});for(let xt=0;xt<Math.ceil(l/d)+1;xt++){const Ct=t+xt*d-pt;Ct>t&&Ct<t+l&&(n.moveTo(Ct,gt),n.lineTo(Ct,gt+c),n.stroke({width:.5,color:4861984,alpha:.2}))}}const m=30,p=l-m*2,v=o-m*2,_=t+m,b=a+m;n.roundRect(_+2,b+2,p,v,6),n.fill({color:0,alpha:.1}),n.roundRect(_,b,p,v,6),n.fill({color:Pa.carpet,alpha:.6}),n.roundRect(_+6,b+6,p-12,v-12,4),n.stroke({width:1.5,color:Pa.carpetBorder,alpha:.4}),n.roundRect(_+14,b+14,p-28,v-28,3),n.stroke({width:1,color:16766287,alpha:.15});const E=t+8,C=a+40,R=6,z=80;n.roundRect(E-2,C-2,R+4,z+4,2),n.fill(Pa.windowFrame),n.roundRect(E,C,R,z,1),n.fill(Pa.window),n.rect(E+1,C+4,2,z/3),n.fill({color:16777215,alpha:.2}),n.roundRect(E-4,C+z+2,R+8,3,1),n.fill(Pa.windowSill);const M=120,D=60,w=t+l/2-M/2,B=a+o/2-D/2-10;n.roundRect(w+3,B+3,M,D,4),n.fill({color:0,alpha:.12}),n.roundRect(w,B,M,D,4),n.fill(Pa.desk),n.roundRect(w+3,B+3,M-6,D-6,3),n.fill(Pa.deskTop),n.roundRect(w+1,B+1,M-2,D-2,4),n.stroke({width:1,color:Pa.deskEdge,alpha:.3}),n.roundRect(w+20,B+8,32,22,2),n.fill(2236976),n.roundRect(w+22,B+10,28,16,1),n.fill(1981020),n.roundRect(w+18,B+34,36,10,2),n.fill(3355456),n.rect(w+70,B+10,16,22),n.fill({color:16777215,alpha:.7}),n.rect(w+72,B+14,10,1),n.fill({color:3355443,alpha:.3}),n.rect(w+72,B+17,8,1),n.fill({color:3355443,alpha:.3}),n.roundRect(w+90,B+12,10,14,2),n.fill(3622735),n.circle(w+100,B+42,5),n.fill(14142664),n.circle(w+100,B+42,3),n.fill(7951688);const U=w+M/2,k=B+D+16;n.roundRect(U-14,k-4,28,16,6),n.fill(Pa.chair),n.roundRect(U-12,k-8,24,12,4),n.fill(Pa.chairSeat),n.roundRect(U-8,k-6,16,4,2),n.fill({color:16777215,alpha:.06}),n.circle(U,k+14,3),n.fill(4473924);for(const ut of[-8,0,8])n.circle(U+ut,k+18,1.5),n.fill(3355443);const Q=t+l-54,V=a+20;n.roundRect(Q,V,44,80,3),n.fill(Pa.bookshelf);const ft=[15022389,2001125,4431943,16750592,9315498,35195];for(let ut=0;ut<3;ut++){const pt=V+8+ut*26;n.rect(Q+3,pt+18,38,3),n.fill(9139029);for(let gt=0;gt<5;gt++){const xt=Q+5+gt*7,Ct=12+(gt*3+ut*2)%6;n.rect(xt,pt+18-Ct,5,Ct),n.fill(ft[(gt+ut*2)%ft.length])}}const lt=t+l-54,st=a+o-60;n.roundRect(lt,st+10,24,16,2),n.fill(6111287),n.rect(lt+10,st+4,4,8),n.fill(7901340),n.circle(lt+12,st,10),n.fill(Pa.globe),n.circle(lt+12,st,10),n.stroke({width:.5,color:2001125,alpha:.4}),n.circle(lt+9,st-3,3),n.fill({color:16777215,alpha:.15}),n.roundRect(w+44,B+38,36,10,2),n.fill(Pa.nameplate),n.roundRect(w+44,B+38,36,10,2),n.stroke({width:.5,color:13215744,alpha:.5}),n.rect(t,a,l,o),n.stroke({width:1,color:0,alpha:.08})}Gp({Container:Fn,Graphics:$a,Text:Hp});const ox=["Precisamos escalar o time de vendas...","O Q4 vai ser decisivo.","Investir mais em marketing digital.","Meta trimestral no caminho certo.","Revisar budget de R&D...","Nova parceria pode mudar tudo.","Churn rate precisa cair 20%.","Hora de expandir para LATAM.","Reunião com investidores amanhã.","NPS subiu 15 pontos!","Cultura da empresa vem primeiro.","Mais dados antes de decidir.","Vamos automatizar esse processo.","Roadmap do próximo quarter...","Reter talentos é prioridade.","Revenue cresceu 30% no trimestre.","Precisamos de mais diversidade no time.","O mercado está mudando rápido.","Foco no cliente sempre.","Inovação é nosso diferencial."],up=900,cx=2400,WM=6e3,PM={id:"ceo",name:"CEO",colorIndex:3,status:"working",deskIndex:0,position:{x:0,y:0},targetPosition:null};function FM({x:n,y:t,width:a,height:l,textures:o,ticker:c}){const[d,m]=Y.useState(null),[p,v]=Y.useState("seated"),_=Y.useRef(0),b=Y.useRef(up+Math.floor(Math.random()*(cx-up))),E=Y.useRef(null),C=a/2,R=l/2+10,z=Y.useCallback(M=>{M.clear(),JM(M,0,0,a,l)},[a,l]);return Y.useEffect(()=>{if(!c)return;const M=()=>{_.current++;const D=_.current,w=Math.floor(D/48)%2===0?"typing":"seated";if(v(w),b.current--,b.current<=0){const B=ox[Math.floor(Math.random()*ox.length)];m(B),v("standing"),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{m(null)},WM),b.current=up+Math.floor(Math.random()*(cx-up))}};return c.add(M),()=>{c.remove(M),E.current&&clearTimeout(E.current)}},[c]),X.jsxs("container",{x:n,y:t,children:[X.jsx("graphics",{draw:z}),X.jsx("text",{text:"CEO",x:a/2,y:12,anchor:.5,style:{fontSize:13,fill:"#ffd700",fontFamily:"sans-serif",fontWeight:"bold"}}),X.jsx(C2,{agent:PM,textures:o,bubbleText:d,animX:C,animY:R,animPose:p})]})}const fx=150,IM=48,$M=30,t6=4e3,op=600,oy=1800,e6=60,hx=900,dx=5e3,mx=[["Café novo?","Sim, colombiano!"],["Viu o deploy?","Passou nos testes!"],["Reunião às 3?","Vou confirmar."],["Bug no login?","Já corrigi."],["Almoço onde?","Sushi hoje?"],["PR aprovado?","Mergeei agora."],["Tá ocupado?","Pode falar."],["Deadline?","Sexta-feira."],["Novo feature?","Ficou muito bom!"],["Ajuda aqui?","Claro, mostra."],["Sprint review?","Amanhã cedo."],["Stand-up?","Já começou!"],["Refatorei aquele módulo.","Ficou mais limpo."],["Testes passando?","Todos verdes!"],["Viu o Figma?","Design top!"],["Pipeline rodou?","Em 2 min."],["Code review?","Já olhei, aprovo."],["Qual branch?","feature/office."],["Bom dia!","Bom dia! Tudo bem?"],["Feriado próximo?","Semana que vem!"]];function n6(n,t){const a={x:0,y:0},l=Math.random();if(l<.25){const o=Jh(a);return{x:o.x+(Math.random()-.5)*30,y:o.y+(Math.random()-.5)*20,destination:"coffee"}}else if(l<.4){const o=Gx(a);return{x:o.x+(Math.random()-.5)*40,y:o.y+(Math.random()-.5)*30,destination:"meeting"}}else if(l<.55){const o=Math.random()<.5?"male":"female",c=zT(t,o),d=M1(c,n);return{x:d.x+(Math.random()-.5)*20,y:d.y+(Math.random()-.5)*20,destination:"bathroom"}}else if(l<.7){const o=DT(t),c=M1(o,n);return{x:c.x,y:c.y,destination:"corridor"}}else return{x:60+Math.random()*(Ml-120),y:60+Math.random()*(ho-120),destination:"wander"}}function a6(n){const[t,a]=Y.useState({}),l=Y.useRef({}),o=Y.useRef({}),c=Y.useRef({}),d=Y.useRef({}),m=Y.useRef(0),p=Y.useRef({}),v=Y.useRef({});Y.useEffect(()=>{const b=Pe.subscribe((E,C)=>{var M,D;const R=E.bubbles,z=C.bubbles;for(const w of Object.keys(R))if(((M=R[w])==null?void 0:M.updatedAt)!==((D=z[w])==null?void 0:D.updatedAt)){p.current[w]&&clearTimeout(p.current[w]);const[B,U]=w.split(":");p.current[w]=setTimeout(()=>{Pe.getState().clearBubble(B,U),delete p.current[w]},t6)}});return()=>{b();for(const E of Object.values(p.current))clearTimeout(E);p.current={}}},[]);const _=Y.useCallback(()=>{m.current++;const b=m.current,E=Pe.getState(),C={},R=Hx(E.rooms.length);for(const[z,M]of Object.entries(E.agentVisuals)){l.current[z]||(l.current[z]={}),o.current[z]||(o.current[z]={}),C[z]={};const D=E.rooms.indexOf(z),w=R.squadOrigins[D]??{x:0,y:0},B=[];for(const U of M){const k=l.current[z],Q=o.current[z],V=`${z}:${U.id}`;Q[U.id]||(Q[U.id]={x:U.position.x,y:U.position.y,baseY:U.position.y},c.current[V]=Math.floor(Math.random()*oy));const ft=Q[U.id];if(U.targetPosition&&(!k[U.id]||k[U.id].progress>=1)&&(k[U.id]={startX:ft.x,startY:ft.baseY,targetX:U.targetPosition.x,targetY:U.targetPosition.y,progress:0,duration:fx,baseY:U.targetPosition.y}),U.status==="idle"&&(!k[U.id]||k[U.id].progress>=1)&&(c.current[V]===void 0&&(c.current[V]=op+Math.floor(Math.random()*(oy-op))),c.current[V]--,c.current[V]<=0)){const st=n6(w,R);d.current[V]=st.destination,k[U.id]={startX:ft.x,startY:ft.baseY,targetX:st.x,targetY:st.y,progress:0,duration:fx+Math.floor(Math.random()*30),baseY:st.y},c.current[V]=op+Math.floor(Math.random()*(oy-op))}const lt=k[U.id];if(lt&&lt.progress<1){lt.progress=Math.min(1,lt.progress+1/lt.duration);const st=RT(lt.progress);ft.x=A1(lt.startX,lt.targetX,st),ft.y=A1(lt.startY,lt.targetY,st),ft.baseY=lt.baseY;const ut=Math.floor(b/$M)%2===0?"walk-right":"walk-left";C[z][U.id]={x:ft.x,y:ft.y,pose:ut}}else if(U.status==="working"){const st=Math.floor(b/IM)%2===0?"typing":"seated";C[z][U.id]={x:ft.x,y:ft.baseY,pose:st}}else if(U.status==="idle"){const st=d.current[V]??"coffee",ut=Math.sin(b*.07+U.deskIndex*1.5)*2;let pt;st==="coffee"?pt="coffee":st==="meeting"?pt=Math.floor(b/90)%2===0?"standing":"coffee":pt="standing",C[z][U.id]={x:ft.x,y:ft.baseY+ut,pose:pt},B.push({agentKey:V,agentId:U.id,agentName:U.name,x:ft.x,y:ft.baseY})}else U.status==="checkpoint"?C[z][U.id]={x:ft.x,y:ft.baseY,pose:"seated"}:C[z][U.id]={x:ft.x,y:ft.baseY,pose:"seated"}}if(b%60===0&&B.length>=2)for(let U=0;U<B.length;U++){const k=B[U];if(!(v.current[k.agentKey]&&b-v.current[k.agentKey]<hx)&&!E.bubbles[k.agentKey])for(let Q=U+1;Q<B.length;Q++){const V=B[Q];if(v.current[V.agentKey]&&b-v.current[V.agentKey]<hx||E.bubbles[V.agentKey])continue;const ft=k.x-V.x,lt=k.y-V.y;if(Math.sqrt(ft*ft+lt*lt)<e6){const[ut,pt]=mx[Math.floor(Math.random()*mx.length)];E.appendBubble(z,k.agentId,ut),setTimeout(()=>{Pe.getState().appendBubble(z,V.agentId,pt)},1500),v.current[k.agentKey]=b,v.current[V.agentKey]=b;const gt=`${z}:${k.agentId}`,xt=`${z}:${V.agentId}`;p.current[gt]&&clearTimeout(p.current[gt]),p.current[xt]&&clearTimeout(p.current[xt]),p.current[gt]=setTimeout(()=>{Pe.getState().clearBubble(z,k.agentId),delete p.current[gt]},dx),p.current[xt]=setTimeout(()=>{Pe.getState().clearBubble(z,V.agentId),delete p.current[xt]},dx+1500);break}}}}a(C)},[]);return Y.useEffect(()=>{if(n)return n.add(_),()=>{n.remove(_)}},[n,_]),t}Gp({Container:Fn,Graphics:$a,Text:Hp});const i6=.3,l6=2;function s6(){const{app:n}=OM(),t=Y.useRef(null),[a,l]=Y.useState(new Map),o=Y.useRef(null),c=Pe(E=>E.rooms),d=Pe(E=>E.agentVisuals),m=Pe(E=>E.bubbles),p=Fa(E=>E.activeStates),v=a6((n==null?void 0:n.ticker)??null),_=Y.useMemo(()=>Hx(c.length),[c.length]);Y.useEffect(()=>{n!=null&&n.renderer&&l(UM(n))},[n]);const b=Y.useCallback(E=>{E.clear(),GM(E,_),rx(E,_.bathroomMale.x,_.bathroomMale.y,_.bathroomMale.width,_.bathroomMale.height,"male"),rx(E,_.bathroomFemale.x,_.bathroomFemale.y,_.bathroomFemale.width,_.bathroomFemale.height,"female")},[_]);return Y.useEffect(()=>{const E=n==null?void 0:n.canvas;if(!E)return;const C=D=>{const w=t.current;w&&(o.current={startX:D.clientX,startY:D.clientY,pivotX:w.position.x,pivotY:w.position.y},E.setPointerCapture(D.pointerId))},R=D=>{const w=t.current,B=o.current;!w||!B||(w.position.x=B.pivotX+(D.clientX-B.startX),w.position.y=B.pivotY+(D.clientY-B.startY))},z=D=>{o.current=null,E.releasePointerCapture(D.pointerId)},M=D=>{D.preventDefault();const w=t.current;if(!w)return;const B=w.scale.x,U=D.deltaY>0?.9:1.1,k=Math.max(i6,Math.min(l6,B*U)),Q=E.getBoundingClientRect(),V=D.clientX-Q.left,ft=D.clientY-Q.top,lt=k/B;w.position.x=V-(V-w.position.x)*lt,w.position.y=ft-(ft-w.position.y)*lt,w.scale.set(k)};return E.addEventListener("pointerdown",C),E.addEventListener("pointermove",R),E.addEventListener("pointerup",z),E.addEventListener("pointerleave",z),E.addEventListener("wheel",M,{passive:!1}),()=>{E.removeEventListener("pointerdown",C),E.removeEventListener("pointermove",R),E.removeEventListener("pointerup",z),E.removeEventListener("pointerleave",z),E.removeEventListener("wheel",M)}},[n]),X.jsxs("container",{ref:t,children:[X.jsx("graphics",{draw:b}),X.jsx("text",{text:"Corredor",x:_.corridor.x+_.corridor.width/2,y:_.corridor.y+8,anchor:{x:.5,y:0},style:{fontSize:11,fill:"#666666",fontFamily:"sans-serif",fontWeight:"bold"}}),X.jsx("text",{text:"WC ♂",x:_.bathroomMale.x+_.bathroomMale.width/2,y:_.bathroomMale.y+_.bathroomMale.height-8,anchor:{x:.5,y:1},style:{fontSize:10,fill:"#546e7a",fontFamily:"sans-serif",fontWeight:"bold"}}),X.jsx("text",{text:"WC ♀",x:_.bathroomFemale.x+_.bathroomFemale.width/2,y:_.bathroomFemale.y+_.bathroomFemale.height-8,anchor:{x:.5,y:1},style:{fontSize:10,fill:"#546e7a",fontFamily:"sans-serif",fontWeight:"bold"}}),c.map((E,C)=>{var w;const R=_.squadOrigins[C];if(!R)return null;const z=d[E]??[],M=((w=p[E])==null?void 0:w.status)??"idle",D=v[E]??{};return X.jsx(ZM,{squadName:E,status:M,agents:z,textures:a,bubbles:m,animStates:D,originX:R.x,originY:R.y},E)}),X.jsx(FM,{x:_.ceoOffice.x,y:_.ceoOffice.y,width:_.ceoOffice.width,height:_.ceoOffice.height,textures:a,ticker:(n==null?void 0:n.ticker)??null})]})}function r6(){const n=Pe(l=>l.activeRoom),t=Pe(l=>l.checkpoints),a=n?t[n]:void 0;return X.jsx("div",{style:{display:"flex",height:"100%"},children:X.jsxs("div",{style:{flex:1,position:"relative",overflow:"hidden"},children:[X.jsx(DM,{background:13158600,antialias:!0,resizeTo:window,style:{width:"100%",height:"100%"},children:X.jsx(s6,{})}),a&&X.jsx(NM,{agentName:a.agentName,question:a.question,onRespond:l=>ST(n,l)})]})})}function u6({message:n}){if(n.role==="agent_dm")return X.jsxs("div",{"data-role":"agent_dm",style:{alignSelf:"flex-start",background:"#2a2a3e",border:"1px solid #4a4a6a",borderRadius:12,padding:"8px 14px",maxWidth:"75%",marginBottom:8},children:[X.jsx("div",{style:{fontSize:11,color:"#a0a0d0",fontWeight:600,marginBottom:4},children:n.agentName}),X.jsx("div",{style:{color:"#e0e0e0",fontSize:14,lineHeight:1.5},children:n.content})]});const t=n.role==="user";return X.jsx("div",{"data-role":n.role,style:{alignSelf:t?"flex-end":"flex-start",background:t?"#3b5bdb":"#1e1e2e",borderRadius:12,padding:"8px 14px",maxWidth:"75%",marginBottom:8},children:X.jsx("div",{style:{color:"#e0e0e0",fontSize:14,lineHeight:1.5,whiteSpace:"pre-wrap"},children:n.content})})}function o6(){const[n,t]=Y.useState(""),a=Y.useRef(null),l=Fa(C=>C.selectedSquad),o=Ki(C=>C.messages),c=Ki(C=>C.streaming),d=Ki(C=>C.streamingText),m=Ki(C=>C.error),p=Ki(C=>C.addUserMessage),v=Ki(C=>C.startStreaming),_=Ki(C=>C.loadHistory);if(Y.useEffect(()=>{l&&_(l)},[l,_]),Y.useEffect(()=>{var C,R;(R=(C=a.current)==null?void 0:C.scrollIntoView)==null||R.call(C,{behavior:"smooth"})},[o,d]),!l)return X.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#888",fontSize:16},children:"Select a squad to start chatting"});const b=()=>{const C=n.trim();!C||c||(p(C),v(),xT(l,C),t(""))},E=C=>{C.key==="Enter"&&!C.shiftKey&&(C.preventDefault(),b())};return X.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",background:"#0f0f1a"},children:[X.jsxs("div",{style:{flex:1,overflowY:"auto",padding:16,display:"flex",flexDirection:"column"},children:[o.map(C=>X.jsx(u6,{message:C},C.id)),c&&d&&X.jsx("div",{"data-role":"assistant",style:{alignSelf:"flex-start",background:"#1e1e2e",borderRadius:12,padding:"8px 14px",maxWidth:"75%",marginBottom:8},children:X.jsx("div",{style:{color:"#e0e0e0",fontSize:14,lineHeight:1.5,whiteSpace:"pre-wrap"},children:d})}),m&&X.jsx("div",{style:{alignSelf:"center",background:"#3a1a1a",border:"1px solid #c53030",borderRadius:8,padding:"8px 14px",color:"#fc8181",fontSize:13,marginBottom:8},children:m}),X.jsx("div",{ref:a})]}),X.jsxs("div",{style:{display:"flex",padding:12,borderTop:"1px solid #2a2a3e",gap:8},children:[X.jsx("input",{type:"text",value:n,onChange:C=>t(C.target.value),onKeyDown:E,placeholder:"Type a message...",disabled:c,style:{flex:1,background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:8,padding:"10px 14px",color:"#e0e0e0",fontSize:14,outline:"none"}}),X.jsx("button",{onClick:b,disabled:!n.trim()||c,"aria-label":"Send",style:{background:!n.trim()||c?"#2a2a3e":"#3b5bdb",color:"#fff",border:"none",borderRadius:8,padding:"10px 20px",fontSize:14,cursor:!n.trim()||c?"not-allowed":"pointer",fontWeight:600},children:"Send"})]})]})}const c6={idle:"rgb(107, 114, 128)",working:"rgb(59, 130, 246)",delivering:"rgb(168, 85, 247)",done:"rgb(34, 197, 94)",checkpoint:"rgb(234, 179, 8)"};function f6({agent:n}){return X.jsxs("div",{style:{background:"#1e1e2e",borderRadius:8,padding:"12px 16px",marginBottom:8,border:"1px solid #2a2a3e"},children:[X.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:6},children:[X.jsx("span",{style:{fontWeight:600,fontSize:14,color:"#e0e0e0"},children:n.name}),X.jsx("span",{style:{backgroundColor:c6[n.status],color:"#fff",fontSize:11,fontWeight:600,padding:"2px 8px",borderRadius:10,textTransform:"lowercase"},children:n.status})]}),X.jsx("div",{style:{fontSize:12,color:"#9ca3af"},children:n.stepLabel})]})}const h6=[{key:"pending",label:"Pending",color:"rgb(107, 114, 128)",filter:n=>n.status==="idle"},{key:"running",label:"Running",color:"rgb(59, 130, 246)",filter:n=>n.status==="working"||n.status==="checkpoint"||n.status==="delivering"},{key:"done",label:"Done",color:"rgb(34, 197, 94)",filter:n=>n.status==="done"}];function d6(){const n=Fa(o=>o.selectedSquad),t=Fa(o=>o.activeStates),a=n?t[n]:null,l=Y.useMemo(()=>a?h6.map(o=>({...o,agents:a.agents.filter(o.filter)})):null,[a]);return n?a?X.jsx("div",{style:{display:"flex",gap:16,padding:20,height:"100%",overflow:"auto"},children:l.map(o=>X.jsxs("div",{"data-testid":`column-${o.key}`,style:{flex:1,background:"#16161e",borderRadius:10,padding:16,display:"flex",flexDirection:"column",minWidth:220},children:[X.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16,paddingBottom:12,borderBottom:`2px solid ${o.color}`},children:[X.jsx("span",{style:{fontWeight:700,fontSize:14,color:"#e0e0e0"},children:o.label}),X.jsx("span",{"data-testid":`count-${o.key}`,style:{background:o.color,color:"#fff",fontSize:11,fontWeight:700,width:22,height:22,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},children:o.agents.length})]}),X.jsx("div",{style:{flex:1,overflowY:"auto"},children:o.agents.map(c=>X.jsx(f6,{agent:c},c.id))})]},o.key))}):X.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#9ca3af"},children:"No active state for this squad"}):X.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#9ca3af"},children:"Select a squad to view the kanban board"})}function m6(){const n=Al(k=>k.user),[t,a]=Y.useState([]),[l,o]=Y.useState(!0),[c,d]=Y.useState(""),[m,p]=Y.useState(""),[v,_]=Y.useState("viewer"),[b,E]=Y.useState(null),[C,R]=Y.useState(null),z=Y.useCallback(async()=>{try{const k=await fetch("/api/users",{credentials:"include"});if(k.ok){const Q=await k.json();a(Q.users)}}catch{E("Failed to load users")}finally{o(!1)}},[]);Y.useEffect(()=>{z()},[z]);const M=async()=>{if(!(!c.trim()||!m.trim())){E(null);try{const k=await fetch("/api/auth/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:c,password:m,role:v}),credentials:"include"});if(!k.ok){const Q=await k.json();E(Q.error||"Failed to create user");return}d(""),p(""),_("viewer"),await z()}catch{E("Network error")}}},D=async(k,Q)=>{try{(await fetch(`/api/users/${k}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({role:Q}),credentials:"include"})).ok&&await z()}catch{E("Failed to update role")}},w=async k=>{try{(await fetch(`/api/users/${k}`,{method:"DELETE",credentials:"include"})).ok&&(R(null),await z())}catch{E("Failed to delete user")}},B={background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:6,padding:"8px 12px",color:"#e0e0e0",fontSize:13,outline:"none"},U={padding:"8px 16px",borderRadius:6,border:"none",fontWeight:600,fontSize:13,cursor:"pointer"};return l?X.jsx("div",{style:{color:"#9ca3af",padding:20},children:"Loading users..."}):X.jsxs("div",{children:[X.jsx("h3",{style:{color:"#e0e0e0",marginBottom:16,fontSize:16,fontWeight:700},children:"User Management"}),b&&X.jsx("div",{style:{background:"#3b1818",color:"#f87171",padding:"8px 12px",borderRadius:6,marginBottom:12,fontSize:13},children:b}),X.jsxs("div",{style:{display:"flex",gap:8,marginBottom:20,flexWrap:"wrap",alignItems:"center"},children:[X.jsx("input",{placeholder:"Username",value:c,onChange:k=>d(k.target.value),style:{...B,flex:1,minWidth:120}}),X.jsx("input",{placeholder:"Password",type:"password",value:m,onChange:k=>p(k.target.value),style:{...B,flex:1,minWidth:120}}),X.jsxs("select",{value:v,onChange:k=>_(k.target.value),style:{...B,minWidth:100},children:[X.jsx("option",{value:"viewer",children:"viewer"}),X.jsx("option",{value:"operator",children:"operator"}),X.jsx("option",{value:"admin",children:"admin"})]}),X.jsx("button",{onClick:M,style:{...U,background:"#3b82f6",color:"#fff"},children:"Create User"})]}),X.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13},children:[X.jsx("thead",{children:X.jsxs("tr",{style:{borderBottom:"1px solid #2a2a3e"},children:[X.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Username"}),X.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Email"}),X.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Role"}),X.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Last Login"}),X.jsx("th",{style:{textAlign:"right",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Actions"})]})}),X.jsx("tbody",{children:t.map(k=>X.jsxs("tr",{style:{borderBottom:"1px solid #1e1e2e"},children:[X.jsx("td",{style:{padding:"10px 12px",color:"#e0e0e0"},children:k.username}),X.jsx("td",{style:{padding:"10px 12px",color:"#9ca3af"},children:k.email||"—"}),X.jsx("td",{style:{padding:"10px 12px"},children:k.id===(n==null?void 0:n.id)?X.jsx("span",{style:{color:"#9ca3af"},children:k.role}):X.jsxs("select",{value:k.role,onChange:Q=>D(k.id,Q.target.value),style:{...B,padding:"4px 8px",fontSize:12},children:[X.jsx("option",{value:"viewer",children:"viewer"}),X.jsx("option",{value:"operator",children:"operator"}),X.jsx("option",{value:"admin",children:"admin"})]})}),X.jsx("td",{style:{padding:"10px 12px",color:"#9ca3af",fontSize:12},children:k.last_login?new Date(k.last_login).toLocaleDateString():"—"}),X.jsx("td",{style:{padding:"10px 12px",textAlign:"right"},children:k.id!==(n==null?void 0:n.id)&&(C===k.id?X.jsxs("span",{style:{display:"inline-flex",gap:6,alignItems:"center"},children:[X.jsx("span",{style:{color:"#f87171",fontSize:12},children:"Confirm Delete"}),X.jsx("button",{onClick:()=>w(k.id),style:{...U,background:"#dc2626",color:"#fff",padding:"4px 10px",fontSize:12},children:"Yes"}),X.jsx("button",{onClick:()=>R(null),style:{...U,background:"#2a2a3e",color:"#9ca3af",padding:"4px 10px",fontSize:12},children:"No"})]}):X.jsx("button",{onClick:()=>R(k.id),style:{...U,background:"#2a2a3e",color:"#f87171",padding:"4px 10px",fontSize:12},children:"Delete"}))})]},k.id))})]})]})}function p6(){const n=Fa(v=>v.selectedSquad),t=Fa(v=>v.activeStates),[a,l]=Y.useState(null),[o,c]=Y.useState(!1),d=n?t[n]:null;if(Y.useEffect(()=>{if(!n){l(null);return}c(!0),fetch(`/api/squads/${n}`,{credentials:"include"}).then(v=>v.ok?v.json():null).then(v=>{v&&l(v.data)}).finally(()=>c(!1))},[n]),!n)return X.jsx("div",{style:{color:"#9ca3af",padding:20},children:"Select a squad to view details"});if(o)return X.jsx("div",{style:{color:"#9ca3af",padding:20},children:"Loading squad details..."});const m={marginBottom:24},p={fontSize:12,color:"#9ca3af",fontWeight:600,marginBottom:6,textTransform:"uppercase",letterSpacing:"0.05em"};return X.jsxs("div",{children:[X.jsx("h3",{style:{color:"#e0e0e0",marginBottom:16,fontSize:16,fontWeight:700},children:"Squad Info"}),a&&X.jsxs(X.Fragment,{children:[X.jsxs("div",{style:m,children:[X.jsx("div",{style:p,children:"Name"}),X.jsx("div",{style:{color:"#e0e0e0",fontSize:14,fontWeight:600},children:a.name})]}),X.jsxs("div",{style:m,children:[X.jsx("div",{style:p,children:"Description"}),X.jsx("div",{style:{color:"#e0e0e0",fontSize:14},children:a.description})]}),X.jsxs("div",{style:m,children:[X.jsx("div",{style:p,children:"Agents"}),X.jsx("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:a.agents.map(v=>X.jsx("span",{style:{background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:6,padding:"4px 10px",fontSize:12,color:"#e0e0e0"},children:v.name},v.id))})]}),X.jsxs("div",{style:m,children:[X.jsx("div",{style:p,children:"Pipeline Steps"}),X.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:a.pipeline.steps.map((v,_)=>X.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:6,padding:"8px 12px",fontSize:13},children:[X.jsx("span",{style:{background:"#3b82f6",color:"#fff",width:22,height:22,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:700,flexShrink:0},children:_+1}),X.jsx("span",{style:{color:"#e0e0e0"},children:v.label}),X.jsx("span",{style:{color:"#6b7280",fontSize:11,marginLeft:"auto"},children:v.agent})]},v.id))})]})]}),d&&X.jsxs("div",{style:m,children:[X.jsx("div",{style:p,children:"Current State"}),X.jsx("pre",{"data-testid":"state-json",style:{background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:8,padding:16,fontSize:12,color:"#a5b4fc",overflow:"auto",maxHeight:400,lineHeight:1.5},children:JSON.stringify(d,null,2)})]})]})}function y6(){const[n,t]=Y.useState(null),[a,l]=Y.useState(null),[o,c]=Y.useState(!0),[d,m]=Y.useState(null),p=Y.useCallback(async()=>{c(!0);try{const b=await fetch("/api/health",{credentials:"include"});if(b.ok){const E=await b.json();t(E),l(E.status==="ok")}else l(!1)}catch{l(!1)}finally{c(!1),m(new Date().toLocaleTimeString())}},[]);Y.useEffect(()=>{p()},[p]);const v={fontSize:12,color:"#9ca3af",fontWeight:600,marginBottom:6,textTransform:"uppercase",letterSpacing:"0.05em"},_={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"10px 12px",background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:6,marginBottom:8,fontSize:13};return X.jsxs("div",{children:[X.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[X.jsx("h3",{style:{color:"#e0e0e0",fontSize:16,fontWeight:700},children:"Server Info"}),X.jsx("button",{onClick:p,style:{padding:"6px 14px",borderRadius:6,border:"none",background:"#2a2a3e",color:"#e0e0e0",fontWeight:600,fontSize:12,cursor:"pointer"},children:"Refresh"})]}),X.jsxs("div",{style:{marginBottom:24},children:[X.jsx("div",{style:v,children:"Health Status"}),X.jsxs("div",{style:_,children:[X.jsx("span",{style:{color:"#e0e0e0"},children:"API Server"}),o?X.jsx("span",{style:{color:"#9ca3af"},children:"Checking..."}):X.jsx("span",{style:{color:a?"#22c55e":"#ef4444",fontWeight:600},children:a?"Healthy":"Unhealthy"})]})]}),X.jsxs("div",{style:{marginBottom:24},children:[X.jsx("div",{style:v,children:"Environment"}),X.jsxs("div",{style:_,children:[X.jsx("span",{style:{color:"#e0e0e0"},children:"API Port"}),X.jsx("span",{style:{color:"#9ca3af"},children:"3001"})]}),X.jsxs("div",{style:_,children:[X.jsx("span",{style:{color:"#e0e0e0"},children:"Dashboard Port (dev)"}),X.jsx("span",{style:{color:"#9ca3af"},children:"5173"})]})]}),d&&X.jsxs("div",{style:{fontSize:11,color:"#6b7280",textAlign:"right"},children:["Last checked: ",d]})]})}function g6(){const n=Al(d=>d.user),t=(n==null?void 0:n.role)==="admin",[a,l]=Y.useState(t?"users":"squad"),c=[{key:"users",label:"Users",adminOnly:!0},{key:"squad",label:"Squad"},{key:"server",label:"Server"}].filter(d=>!d.adminOnly||t);return X.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",padding:20},children:[X.jsx("div",{style:{display:"flex",gap:4,marginBottom:20,borderBottom:"1px solid #2a2a3e",paddingBottom:0},children:c.map(d=>X.jsx("button",{onClick:()=>l(d.key),style:{padding:"10px 20px",border:"none",borderBottom:a===d.key?"2px solid #3b82f6":"2px solid transparent",background:"transparent",color:a===d.key?"#e0e0e0":"#6b7280",fontWeight:a===d.key?700:500,fontSize:14,cursor:"pointer",transition:"color 0.15s, border-color 0.15s"},children:d.label},d.key))}),X.jsxs("div",{style:{flex:1,overflow:"auto"},children:[a==="users"&&t&&X.jsx(m6,{}),a==="squad"&&X.jsx(p6,{}),a==="server"&&X.jsx(y6,{})]})]})}CS.createRoot(document.getElementById("root")).render(X.jsx(Y.StrictMode,{children:X.jsx(Pb,{children:X.jsxs(Ab,{children:[X.jsx(Pr,{path:"/login",element:X.jsx(NT,{})}),X.jsxs(Pr,{path:"/",element:X.jsx(OT,{}),children:[X.jsx(Pr,{index:!0,element:X.jsx(Tb,{to:"/office",replace:!0})}),X.jsx(Pr,{path:"office",element:X.jsx(r6,{})}),X.jsx(Pr,{path:"chat",element:X.jsx(o6,{})}),X.jsx(Pr,{path:"kanban",element:X.jsx(d6,{})}),X.jsx(Pr,{path:"settings",element:X.jsx(g6,{})})]})]})})}));export{Wi as $,B_ as A,ld as B,Rn as C,vi as D,ps as E,ir as F,$a as G,E_ as H,By as I,x4 as J,S4 as K,R4 as L,le as M,C4 as N,wp as O,ma as P,yo as Q,by as R,kE as S,ze as T,vp as U,IT as V,cd as W,Fy as X,O4 as Y,ti as Z,Ix as _,Ia as a,Op as a0,Z1 as a1,Jc as a2,fA as a3,z3 as a4,W1 as a5,Y0 as a6,P1 as a7,O3 as a8,Kc as a9,mn as aa,e_ as ab,BC as ac,U_ as ad,de as ae,od as af,un as ag,BE as ah,zE as ai,e4 as aj,JE as ak,_4 as al,b4 as am,z4 as an,M4 as ao,D4 as ap,on as b,Ue as c,mp as d,Pt as e,Z4 as f,tE as g,j4 as h,Up as i,c_ as j,Ie as k,Xc as l,t_ as m,Fn as n,XE as o,Iy as p,fd as q,h3 as r,Bp as s,cv as t,fE as u,pp as v,Ga as w,Py as x,O_ as y,Pi as z};