expxagents 0.7.4 → 0.7.6
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.
- package/dist/dashboard/assets/BufferResource-Dj9SLiH3.js +185 -0
- package/dist/dashboard/assets/BufferResource-gLBr4ZPz.js +185 -0
- package/dist/dashboard/assets/CanvasRenderer-BwnTm9_4.js +1 -0
- package/dist/dashboard/assets/CanvasRenderer-CXWPwY8u.js +1 -0
- package/dist/dashboard/assets/RenderTargetSystem-8UzvJaaM.js +172 -0
- package/dist/dashboard/assets/RenderTargetSystem-J1eg3avP.js +172 -0
- package/dist/dashboard/assets/WebGLRenderer-CivCN7xy.js +156 -0
- package/dist/dashboard/assets/WebGLRenderer-D5DPC49-.js +156 -0
- package/dist/dashboard/assets/WebGPURenderer-BxaF3qLS.js +41 -0
- package/dist/dashboard/assets/WebGPURenderer-VhPALZiv.js +41 -0
- package/dist/dashboard/assets/browserAll-BbiQUc2F.js +14 -0
- package/dist/dashboard/assets/browserAll-UaM9FmiB.js +14 -0
- package/dist/dashboard/assets/index-BpBtthlo.js +344 -0
- package/dist/dashboard/assets/index-JuIYZnY7.js +344 -0
- package/dist/dashboard/assets/webworkerAll-Bbzbnqr0.js +83 -0
- package/dist/dashboard/assets/webworkerAll-CuTXgacx.js +83 -0
- package/dist/dashboard/index.html +1 -1
- package/dist/data/opensquad.db +0 -0
- package/dist/data/opensquad.db-shm +0 -0
- package/dist/data/opensquad.db-wal +0 -0
- package/package.json +1 -1
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browserAll-UaM9FmiB.js","assets/webworkerAll-CuTXgacx.js","assets/WebGPURenderer-VhPALZiv.js","assets/BufferResource-Dj9SLiH3.js","assets/RenderTargetSystem-8UzvJaaM.js","assets/WebGLRenderer-CivCN7xy.js","assets/CanvasRenderer-BwnTm9_4.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"]'))s(o);new MutationObserver(o=>{for(const f of o)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&s(d)}).observe(document,{childList:!0,subtree:!0});function n(o){const f={};return o.integrity&&(f.integrity=o.integrity),o.referrerPolicy&&(f.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?f.credentials="include":o.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function s(o){if(o.ep)return;o.ep=!0;const f=n(o);fetch(o.href,f)}})();function ap(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Ip={exports:{}},mh={};/**
|
|
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 H0;function GS(){if(H0)return mh;H0=1;var i=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(s,o,f){var d=null;if(f!==void 0&&(d=""+f),o.key!==void 0&&(d=""+o.key),"key"in o){f={};for(var m in o)m!=="key"&&(f[m]=o[m])}else f=o;return o=f.ref,{$$typeof:i,type:s,key:d,ref:o!==void 0?o:null,props:f}}return mh.Fragment=t,mh.jsx=n,mh.jsxs=n,mh}var G0;function jS(){return G0||(G0=1,Ip.exports=GS()),Ip.exports}var L=jS(),$p={exports:{}},Lt={};/**
|
|
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 j0;function qS(){if(j0)return Lt;j0=1;var i=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),A=Symbol.iterator;function E(j){return j===null||typeof j!="object"?null:(j=A&&j[A]||j["@@iterator"],typeof j=="function"?j:null)}var z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,R={};function O(j,I,st){this.props=j,this.context=I,this.refs=R,this.updater=st||z}O.prototype.isReactComponent={},O.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")},O.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function B(){}B.prototype=O.prototype;function U(j,I,st){this.props=j,this.context=I,this.refs=R,this.updater=st||z}var G=U.prototype=new B;G.constructor=U,M(G,O.prototype),G.isPureReactComponent=!0;var Z=Array.isArray;function Q(){}var K={H:null,A:null,T:null,S:null},gt=Object.prototype.hasOwnProperty;function ct(j,I,st){var pt=st.ref;return{$$typeof:i,type:j,key:I,ref:pt!==void 0?pt:null,props:st}}function ht(j,I){return ct(j.type,I,j.props)}function dt(j){return typeof j=="object"&&j!==null&&j.$$typeof===i}function vt(j){var I={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(st){return I[st]})}var _t=/\/+/g;function xt(j,I){return typeof j=="object"&&j!==null&&j.key!=null?vt(""+j.key):I.toString(36)}function Dt(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 w(j,I,st,pt,Tt){var Ot=typeof j;(Ot==="undefined"||Ot==="boolean")&&(j=null);var Ut=!1;if(j===null)Ut=!0;else switch(Ot){case"bigint":case"string":case"number":Ut=!0;break;case"object":switch(j.$$typeof){case i:case t:Ut=!0;break;case S:return Ut=j._init,w(Ut(j._payload),I,st,pt,Tt)}}if(Ut)return Tt=Tt(j),Ut=pt===""?"."+xt(j,0):pt,Z(Tt)?(st="",Ut!=null&&(st=Ut.replace(_t,"$&/")+"/"),w(Tt,I,st,"",function(ra){return ra})):Tt!=null&&(dt(Tt)&&(Tt=ht(Tt,st+(Tt.key==null||j&&j.key===Tt.key?"":(""+Tt.key).replace(_t,"$&/")+"/")+Ut)),I.push(Tt)),1;Ut=0;var re=pt===""?".":pt+":";if(Z(j))for(var ue=0;ue<j.length;ue++)pt=j[ue],Ot=re+xt(pt,ue),Ut+=w(pt,I,st,Ot,Tt);else if(ue=E(j),typeof ue=="function")for(j=ue.call(j),ue=0;!(pt=j.next()).done;)pt=pt.value,Ot=re+xt(pt,ue++),Ut+=w(pt,I,st,Ot,Tt);else if(Ot==="object"){if(typeof j.then=="function")return w(Dt(j),I,st,pt,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 Ut}function H(j,I,st){if(j==null)return j;var pt=[],Tt=0;return w(j,pt,"","",function(Ot){return I.call(st,Ot,Tt++)}),pt}function at(j){if(j._status===-1){var I=j._result;I=I(),I.then(function(st){(j._status===0||j._status===-1)&&(j._status=1,j._result=st)},function(st){(j._status===0||j._status===-1)&&(j._status=2,j._result=st)}),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)},ft={map:H,forEach:function(j,I,st){H(j,function(){I.apply(this,arguments)},st)},count:function(j){var I=0;return H(j,function(){I++}),I},toArray:function(j){return H(j,function(I){return I})||[]},only:function(j){if(!dt(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return Lt.Activity=b,Lt.Children=ft,Lt.Component=O,Lt.Fragment=n,Lt.Profiler=o,Lt.PureComponent=U,Lt.StrictMode=s,Lt.Suspense=g,Lt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,Lt.__COMPILER_RUNTIME={__proto__:null,c:function(j){return K.H.useMemoCache(j)}},Lt.cache=function(j){return function(){return j.apply(null,arguments)}},Lt.cacheSignal=function(){return null},Lt.cloneElement=function(j,I,st){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var pt=M({},j.props),Tt=j.key;if(I!=null)for(Ot in I.key!==void 0&&(Tt=""+I.key),I)!gt.call(I,Ot)||Ot==="key"||Ot==="__self"||Ot==="__source"||Ot==="ref"&&I.ref===void 0||(pt[Ot]=I[Ot]);var Ot=arguments.length-2;if(Ot===1)pt.children=st;else if(1<Ot){for(var Ut=Array(Ot),re=0;re<Ot;re++)Ut[re]=arguments[re+2];pt.children=Ut}return ct(j.type,Tt,pt)},Lt.createContext=function(j){return j={$$typeof:d,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:f,_context:j},j},Lt.createElement=function(j,I,st){var pt,Tt={},Ot=null;if(I!=null)for(pt in I.key!==void 0&&(Ot=""+I.key),I)gt.call(I,pt)&&pt!=="key"&&pt!=="__self"&&pt!=="__source"&&(Tt[pt]=I[pt]);var Ut=arguments.length-2;if(Ut===1)Tt.children=st;else if(1<Ut){for(var re=Array(Ut),ue=0;ue<Ut;ue++)re[ue]=arguments[ue+2];Tt.children=re}if(j&&j.defaultProps)for(pt in Ut=j.defaultProps,Ut)Tt[pt]===void 0&&(Tt[pt]=Ut[pt]);return ct(j,Ot,Tt)},Lt.createRef=function(){return{current:null}},Lt.forwardRef=function(j){return{$$typeof:m,render:j}},Lt.isValidElement=dt,Lt.lazy=function(j){return{$$typeof:S,_payload:{_status:-1,_result:j},_init:at}},Lt.memo=function(j,I){return{$$typeof:v,type:j,compare:I===void 0?null:I}},Lt.startTransition=function(j){var I=K.T,st={};K.T=st;try{var pt=j(),Tt=K.S;Tt!==null&&Tt(st,pt),typeof pt=="object"&&pt!==null&&typeof pt.then=="function"&&pt.then(Q,et)}catch(Ot){et(Ot)}finally{I!==null&&st.types!==null&&(I.types=st.types),K.T=I}},Lt.unstable_useCacheRefresh=function(){return K.H.useCacheRefresh()},Lt.use=function(j){return K.H.use(j)},Lt.useActionState=function(j,I,st){return K.H.useActionState(j,I,st)},Lt.useCallback=function(j,I){return K.H.useCallback(j,I)},Lt.useContext=function(j){return K.H.useContext(j)},Lt.useDebugValue=function(){},Lt.useDeferredValue=function(j,I){return K.H.useDeferredValue(j,I)},Lt.useEffect=function(j,I){return K.H.useEffect(j,I)},Lt.useEffectEvent=function(j){return K.H.useEffectEvent(j)},Lt.useId=function(){return K.H.useId()},Lt.useImperativeHandle=function(j,I,st){return K.H.useImperativeHandle(j,I,st)},Lt.useInsertionEffect=function(j,I){return K.H.useInsertionEffect(j,I)},Lt.useLayoutEffect=function(j,I){return K.H.useLayoutEffect(j,I)},Lt.useMemo=function(j,I){return K.H.useMemo(j,I)},Lt.useOptimistic=function(j,I){return K.H.useOptimistic(j,I)},Lt.useReducer=function(j,I,st){return K.H.useReducer(j,I,st)},Lt.useRef=function(j){return K.H.useRef(j)},Lt.useState=function(j){return K.H.useState(j)},Lt.useSyncExternalStore=function(j,I,st){return K.H.useSyncExternalStore(j,I,st)},Lt.useTransition=function(){return K.H.useTransition()},Lt.version="19.2.4",Lt}var q0;function ip(){return q0||(q0=1,$p.exports=qS()),$p.exports}var X=ip();const Cm=ap(X);var ty={exports:{}},ph={},ey={exports:{}},ny={};/**
|
|
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 Y0;function YS(){return Y0||(Y0=1,(function(i){function t(w,H){var at=w.length;w.push(H);t:for(;0<at;){var et=at-1>>>1,ft=w[et];if(0<o(ft,H))w[et]=H,w[at]=ft,at=et;else break t}}function n(w){return w.length===0?null:w[0]}function s(w){if(w.length===0)return null;var H=w[0],at=w.pop();if(at!==H){w[0]=at;t:for(var et=0,ft=w.length,j=ft>>>1;et<j;){var I=2*(et+1)-1,st=w[I],pt=I+1,Tt=w[pt];if(0>o(st,at))pt<ft&&0>o(Tt,st)?(w[et]=Tt,w[pt]=at,et=pt):(w[et]=st,w[I]=at,et=I);else if(pt<ft&&0>o(Tt,at))w[et]=Tt,w[pt]=at,et=pt;else break t}}return H}function o(w,H){var at=w.sortIndex-H.sortIndex;return at!==0?at:w.id-H.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;i.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();i.unstable_now=function(){return d.now()-m}}var g=[],v=[],S=1,b=null,A=3,E=!1,z=!1,M=!1,R=!1,O=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;function G(w){for(var H=n(v);H!==null;){if(H.callback===null)s(v);else if(H.startTime<=w)s(v),H.sortIndex=H.expirationTime,t(g,H);else break;H=n(v)}}function Z(w){if(M=!1,G(w),!z)if(n(g)!==null)z=!0,Q||(Q=!0,vt());else{var H=n(v);H!==null&&Dt(Z,H.startTime-w)}}var Q=!1,K=-1,gt=5,ct=-1;function ht(){return R?!0:!(i.unstable_now()-ct<gt)}function dt(){if(R=!1,Q){var w=i.unstable_now();ct=w;var H=!0;try{t:{z=!1,M&&(M=!1,B(K),K=-1),E=!0;var at=A;try{e:{for(G(w),b=n(g);b!==null&&!(b.expirationTime>w&&ht());){var et=b.callback;if(typeof et=="function"){b.callback=null,A=b.priorityLevel;var ft=et(b.expirationTime<=w);if(w=i.unstable_now(),typeof ft=="function"){b.callback=ft,G(w),H=!0;break e}b===n(g)&&s(g),G(w)}else s(g);b=n(g)}if(b!==null)H=!0;else{var j=n(v);j!==null&&Dt(Z,j.startTime-w),H=!1}}break t}finally{b=null,A=at,E=!1}H=void 0}}finally{H?vt():Q=!1}}}var vt;if(typeof U=="function")vt=function(){U(dt)};else if(typeof MessageChannel<"u"){var _t=new MessageChannel,xt=_t.port2;_t.port1.onmessage=dt,vt=function(){xt.postMessage(null)}}else vt=function(){O(dt,0)};function Dt(w,H){K=O(function(){w(i.unstable_now())},H)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(w){w.callback=null},i.unstable_forceFrameRate=function(w){0>w||125<w?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):gt=0<w?Math.floor(1e3/w):5},i.unstable_getCurrentPriorityLevel=function(){return A},i.unstable_next=function(w){switch(A){case 1:case 2:case 3:var H=3;break;default:H=A}var at=A;A=H;try{return w()}finally{A=at}},i.unstable_requestPaint=function(){R=!0},i.unstable_runWithPriority=function(w,H){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var at=A;A=w;try{return H()}finally{A=at}},i.unstable_scheduleCallback=function(w,H,at){var et=i.unstable_now();switch(typeof at=="object"&&at!==null?(at=at.delay,at=typeof at=="number"&&0<at?et+at:et):at=et,w){case 1:var ft=-1;break;case 2:ft=250;break;case 5:ft=1073741823;break;case 4:ft=1e4;break;default:ft=5e3}return ft=at+ft,w={id:S++,callback:H,priorityLevel:w,startTime:at,expirationTime:ft,sortIndex:-1},at>et?(w.sortIndex=at,t(v,w),n(g)===null&&w===n(v)&&(M?(B(K),K=-1):M=!0,Dt(Z,at-et))):(w.sortIndex=ft,t(g,w),z||E||(z=!0,Q||(Q=!0,vt()))),w},i.unstable_shouldYield=ht,i.unstable_wrapCallback=function(w){var H=A;return function(){var at=A;A=H;try{return w.apply(this,arguments)}finally{A=at}}}})(ny)),ny}var L0;function LS(){return L0||(L0=1,ey.exports=YS()),ey.exports}var ay={exports:{}},ia={};/**
|
|
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 X0;function XS(){if(X0)return ia;X0=1;var i=ip();function t(g){var v="https://react.dev/errors/"+g;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)v+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+g+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var s={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function f(g,v,S){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:b==null?null:""+b,children:g,containerInfo:v,implementation:S}}var d=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,v){if(g==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return ia.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,ia.createPortal=function(g,v){var S=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 f(g,v,null,S)},ia.flushSync=function(g){var v=d.T,S=s.p;try{if(d.T=null,s.p=2,g)return g()}finally{d.T=v,s.p=S,s.d.f()}},ia.preconnect=function(g,v){typeof g=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,s.d.C(g,v))},ia.prefetchDNS=function(g){typeof g=="string"&&s.d.D(g)},ia.preinit=function(g,v){if(typeof g=="string"&&v&&typeof v.as=="string"){var S=v.as,b=m(S,v.crossOrigin),A=typeof v.integrity=="string"?v.integrity:void 0,E=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;S==="style"?s.d.S(g,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:b,integrity:A,fetchPriority:E}):S==="script"&&s.d.X(g,{crossOrigin:b,integrity:A,fetchPriority:E,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},ia.preinitModule=function(g,v){if(typeof g=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var S=m(v.as,v.crossOrigin);s.d.M(g,{crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&s.d.M(g)},ia.preload=function(g,v){if(typeof g=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var S=v.as,b=m(S,v.crossOrigin);s.d.L(g,S,{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})}},ia.preloadModule=function(g,v){if(typeof g=="string")if(v){var S=m(v.as,v.crossOrigin);s.d.m(g,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else s.d.m(g)},ia.requestFormReset=function(g){s.d.r(g)},ia.unstable_batchedUpdates=function(g,v){return g(v)},ia.useFormState=function(g,v,S){return d.H.useFormState(g,v,S)},ia.useFormStatus=function(){return d.H.useHostTransitionStatus()},ia.version="19.2.4",ia}var V0;function VS(){if(V0)return ay.exports;V0=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(t){console.error(t)}}return i(),ay.exports=XS(),ay.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 Q0;function QS(){if(Q0)return ph;Q0=1;var i=LS(),t=ip(),n=VS();function s(e){var a="https://react.dev/errors/"+e;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)a+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+a+" 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 f(e){var a=e,r=e;if(e.alternate)for(;a.return;)a=a.return;else{e=a;do a=e,(a.flags&4098)!==0&&(r=a.return),e=a.return;while(e)}return a.tag===3?r:null}function d(e){if(e.tag===13){var a=e.memoizedState;if(a===null&&(e=e.alternate,e!==null&&(a=e.memoizedState)),a!==null)return a.dehydrated}return null}function m(e){if(e.tag===31){var a=e.memoizedState;if(a===null&&(e=e.alternate,e!==null&&(a=e.memoizedState)),a!==null)return a.dehydrated}return null}function g(e){if(f(e)!==e)throw Error(s(188))}function v(e){var a=e.alternate;if(!a){if(a=f(e),a===null)throw Error(s(188));return a!==e?null:e}for(var r=e,c=a;;){var p=r.return;if(p===null)break;var x=p.alternate;if(x===null){if(c=p.return,c!==null){r=c;continue}break}if(p.child===x.child){for(x=p.child;x;){if(x===r)return g(p),e;if(x===c)return g(p),a;x=x.sibling}throw Error(s(188))}if(r.return!==c.return)r=p,c=x;else{for(var C=!1,D=p.child;D;){if(D===r){C=!0,r=p,c=x;break}if(D===c){C=!0,c=p,r=x;break}D=D.sibling}if(!C){for(D=x.child;D;){if(D===r){C=!0,r=x,c=p;break}if(D===c){C=!0,c=x,r=p;break}D=D.sibling}if(!C)throw Error(s(189))}}if(r.alternate!==c)throw Error(s(190))}if(r.tag!==3)throw Error(s(188));return r.stateNode.current===r?e:a}function S(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e;for(e=e.child;e!==null;){if(a=S(e),a!==null)return a;e=e.sibling}return null}var b=Object.assign,A=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),U=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),gt=Symbol.for("react.lazy"),ct=Symbol.for("react.activity"),ht=Symbol.for("react.memo_cache_sentinel"),dt=Symbol.iterator;function vt(e){return e===null||typeof e!="object"?null:(e=dt&&e[dt]||e["@@iterator"],typeof e=="function"?e:null)}var _t=Symbol.for("react.client.reference");function xt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===_t?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case M:return"Fragment";case O:return"Profiler";case R:return"StrictMode";case Z:return"Suspense";case Q:return"SuspenseList";case ct:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case z:return"Portal";case U:return e.displayName||"Context";case B:return(e._context.displayName||"Context")+".Consumer";case G:var a=e.render;return e=e.displayName,e||(e=a.displayName||a.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K:return a=e.displayName||null,a!==null?a:xt(e.type)||"Memo";case gt:a=e._payload,e=e._init;try{return xt(e(a))}catch{}}return null}var Dt=Array.isArray,w=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,at={pending:!1,data:null,method:null,action:null},et=[],ft=-1;function j(e){return{current:e}}function I(e){0>ft||(e.current=et[ft],et[ft]=null,ft--)}function st(e,a){ft++,et[ft]=e.current,e.current=a}var pt=j(null),Tt=j(null),Ot=j(null),Ut=j(null);function re(e,a){switch(st(Ot,a),st(Tt,e),st(pt,null),a.nodeType){case 9:case 11:e=(e=a.documentElement)&&(e=e.namespaceURI)?l0(e):0;break;default:if(e=a.tagName,a=a.namespaceURI)a=l0(a),e=s0(a,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}I(pt),st(pt,e)}function ue(){I(pt),I(Tt),I(Ot)}function ra(e){e.memoizedState!==null&&st(Ut,e);var a=pt.current,r=s0(a,e.type);a!==r&&(st(Tt,e),st(pt,r))}function Oa(e){Tt.current===e&&(I(pt),I(Tt)),Ut.current===e&&(I(Ut),ch._currentValue=at)}var Un,Qn;function rn(e){if(Un===void 0)try{throw Error()}catch(r){var a=r.stack.trim().match(/\n( *(at )?)/);Un=a&&a[1]||"",Qn=-1<r.stack.indexOf(`
|
|
43
|
+
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
+
`+Un+e+Qn}var Zn=!1;function ts(e,a){if(!e||Zn)return"";Zn=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(a){var ot=function(){throw Error()};if(Object.defineProperty(ot.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ot,[])}catch(it){var tt=it}Reflect.construct(e,[],ot)}else{try{ot.call()}catch(it){tt=it}e.call(ot.prototype)}}else{try{throw Error()}catch(it){tt=it}(ot=e())&&typeof ot.catch=="function"&&ot.catch(function(){})}}catch(it){if(it&&tt&&typeof it.stack=="string")return[it.stack,tt.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=c.DetermineComponentFrameRoot(),C=x[0],D=x[1];if(C&&D){var Y=C.split(`
|
|
45
|
+
`),F=D.split(`
|
|
46
|
+
`);for(p=c=0;c<Y.length&&!Y[c].includes("DetermineComponentFrameRoot");)c++;for(;p<F.length&&!F[p].includes("DetermineComponentFrameRoot");)p++;if(c===Y.length||p===F.length)for(c=Y.length-1,p=F.length-1;1<=c&&0<=p&&Y[c]!==F[p];)p--;for(;1<=c&&0<=p;c--,p--)if(Y[c]!==F[p]){if(c!==1||p!==1)do if(c--,p--,0>p||Y[c]!==F[p]){var lt=`
|
|
47
|
+
`+Y[c].replace(" at new "," at ");return e.displayName&<.includes("<anonymous>")&&(lt=lt.replace("<anonymous>",e.displayName)),lt}while(1<=c&&0<=p);break}}}finally{Zn=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?rn(r):""}function Za(e,a){switch(e.tag){case 26:case 27:case 5:return rn(e.type);case 16:return rn("Lazy");case 13:return e.child!==a&&a!==null?rn("Suspense Fallback"):rn("Suspense");case 19:return rn("SuspenseList");case 0:case 15:return ts(e.type,!1);case 11:return ts(e.type.render,!1);case 1:return ts(e.type,!0);case 31:return rn("Activity");default:return""}}function ju(e){try{var a="",r=null;do a+=Za(e,r),r=e,e=e.return;while(e);return a}catch(c){return`
|
|
48
|
+
Error generating stack: `+c.message+`
|
|
49
|
+
`+c.stack}}var es=Object.prototype.hasOwnProperty,Na=i.unstable_scheduleCallback,ml=i.unstable_cancelCallback,pp=i.unstable_shouldYield,kh=i.unstable_requestPaint,Kn=i.unstable_now,Jh=i.unstable_getCurrentPriorityLevel,Ph=i.unstable_ImmediatePriority,Fr=i.unstable_UserBlockingPriority,Ir=i.unstable_NormalPriority,Wh=i.unstable_LowPriority,Fh=i.unstable_IdlePriority,wc=i.log,Hc=i.unstable_setDisableYieldValue,Ua=null,Je=null;function Ba(e){if(typeof wc=="function"&&Hc(e),Je&&typeof Je.setStrictMode=="function")try{Je.setStrictMode(Ua,e)}catch{}}var Bn=Math.clz32?Math.clz32:Ih,qu=Math.log,Yu=Math.LN2;function Ih(e){return e>>>=0,e===0?32:31-(qu(e)/Yu|0)|0}var Lu=256,ns=262144,Xu=4194304;function ri(e){var a=e&42;if(a!==0)return a;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 Vu(e,a,r){var c=e.pendingLanes;if(c===0)return 0;var p=0,x=e.suspendedLanes,C=e.pingedLanes;e=e.warmLanes;var D=c&134217727;return D!==0?(c=D&~x,c!==0?p=ri(c):(C&=D,C!==0?p=ri(C):r||(r=D&~e,r!==0&&(p=ri(r))))):(D=c&~x,D!==0?p=ri(D):C!==0?p=ri(C):r||(r=c&~e,r!==0&&(p=ri(r)))),p===0?0:a!==0&&a!==p&&(a&x)===0&&(x=p&-p,r=a&-a,x>=r||x===32&&(r&4194048)!==0)?a:p}function Qs(e,a){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&a)===0}function $r(e,a){switch(e){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 Zs(){var e=Xu;return Xu<<=1,(Xu&62914560)===0&&(Xu=4194304),e}function Ks(e){for(var a=[],r=0;31>r;r++)a.push(e);return a}function ks(e,a){e.pendingLanes|=a,a!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function $h(e,a,r,c,p,x){var C=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var D=e.entanglements,Y=e.expirationTimes,F=e.hiddenUpdates;for(r=C&~r;0<r;){var lt=31-Bn(r),ot=1<<lt;D[lt]=0,Y[lt]=-1;var tt=F[lt];if(tt!==null)for(F[lt]=null,lt=0;lt<tt.length;lt++){var it=tt[lt];it!==null&&(it.lane&=-536870913)}r&=~ot}c!==0&&Gc(e,c,0),x!==0&&p===0&&e.tag!==0&&(e.suspendedLanes|=x&~(C&~a))}function Gc(e,a,r){e.pendingLanes|=a,e.suspendedLanes&=~a;var c=31-Bn(a);e.entangledLanes|=a,e.entanglements[c]=e.entanglements[c]|1073741824|r&261930}function to(e,a){var r=e.entangledLanes|=a;for(e=e.entanglements;r;){var c=31-Bn(r),p=1<<c;p&a|e[c]&a&&(e[c]|=a),r&=~p}}function eo(e,a){var r=a&-a;return r=(r&42)!==0?1:oi(r),(r&(e.suspendedLanes|a))!==0?0:r}function oi(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 no(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Hi(){var e=H.p;return e!==0?e:(e=window.event,e===void 0?32:z0(e.type))}function ci(e,a){var r=H.p;try{return H.p=e,a()}finally{H.p=r}}var Ka=Math.random().toString(36).slice(2),Jt="__reactFiber$"+Ka,bn="__reactProps$"+Ka,pl="__reactContainer$"+Ka,ao="__reactEvents$"+Ka,td="__reactListeners$"+Ka,yp="__reactHandles$"+Ka,io="__reactResources$"+Ka,as="__reactMarker$"+Ka;function Qu(e){delete e[Jt],delete e[bn],delete e[ao],delete e[td],delete e[yp]}function nn(e){var a=e[Jt];if(a)return a;for(var r=e.parentNode;r;){if(a=r[pl]||r[Jt]){if(r=a.alternate,a.child!==null||r!==null&&r.child!==null)for(e=d0(e);e!==null;){if(r=e[Jt])return r;e=d0(e)}return a}e=r,r=e.parentNode}return null}function Ce(e){if(e=e[Jt]||e[pl]){var a=e.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return e}return null}function Gi(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e.stateNode;throw Error(s(33))}function ji(e){var a=e[io];return a||(a=e[io]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Pe(e){e[as]=!0}var fi=new Set,Zu={};function qi(e,a){yl(e,a),yl(e+"Capture",a)}function yl(e,a){for(Zu[e]=a,e=0;e<a.length;e++)fi.add(a[e])}var ed=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]*$"),jc={},qc={};function nd(e){return es.call(qc,e)?!0:es.call(jc,e)?!1:ed.test(e)?qc[e]=!0:(jc[e]=!0,!1)}function Ku(e,a,r){if(nd(a))if(r===null)e.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(a);return;case"boolean":var c=a.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){e.removeAttribute(a);return}}e.setAttribute(a,""+r)}}function ku(e,a,r){if(r===null)e.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttribute(a,""+r)}}function ka(e,a,r,c){if(c===null)e.removeAttribute(r);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(a,r,""+c)}}function oa(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ad(e){var a=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function id(e,a,r){var c=Object.getOwnPropertyDescriptor(e.constructor.prototype,a);if(!e.hasOwnProperty(a)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,x=c.set;return Object.defineProperty(e,a,{configurable:!0,get:function(){return p.call(this)},set:function(C){r=""+C,x.call(this,C)}}),Object.defineProperty(e,a,{enumerable:c.enumerable}),{getValue:function(){return r},setValue:function(C){r=""+C},stopTracking:function(){e._valueTracker=null,delete e[a]}}}}function lo(e){if(!e._valueTracker){var a=ad(e)?"checked":"value";e._valueTracker=id(e,a,""+e[a])}}function Yc(e){if(!e)return!1;var a=e._valueTracker;if(!a)return!0;var r=a.getValue(),c="";return e&&(c=ad(e)?e.checked?"true":"false":e.value),e=c,e!==r?(a.setValue(e),!0):!1}function Js(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 ld=/[\n"\\]/g;function ca(e){return e.replace(ld,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function so(e,a,r,c,p,x,C,D){e.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?e.type=C:e.removeAttribute("type"),a!=null?C==="number"?(a===0&&e.value===""||e.value!=a)&&(e.value=""+oa(a)):e.value!==""+oa(a)&&(e.value=""+oa(a)):C!=="submit"&&C!=="reset"||e.removeAttribute("value"),a!=null?uo(e,C,oa(a)):r!=null?uo(e,C,oa(r)):c!=null&&e.removeAttribute("value"),p==null&&x!=null&&(e.defaultChecked=!!x),p!=null&&(e.checked=p&&typeof p!="function"&&typeof p!="symbol"),D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?e.name=""+oa(D):e.removeAttribute("name")}function Lc(e,a,r,c,p,x,C,D){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.type=x),a!=null||r!=null){if(!(x!=="submit"&&x!=="reset"||a!=null)){lo(e);return}r=r!=null?""+oa(r):"",a=a!=null?""+oa(a):r,D||a===e.value||(e.value=a),e.defaultValue=a}c=c??p,c=typeof c!="function"&&typeof c!="symbol"&&!!c,e.checked=D?e.checked:!!c,e.defaultChecked=!!c,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(e.name=C),lo(e)}function uo(e,a,r){a==="number"&&Js(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function Ps(e,a,r,c){if(e=e.options,a){a={};for(var p=0;p<r.length;p++)a["$"+r[p]]=!0;for(r=0;r<e.length;r++)p=a.hasOwnProperty("$"+e[r].value),e[r].selected!==p&&(e[r].selected=p),p&&c&&(e[r].defaultSelected=!0)}else{for(r=""+oa(r),a=null,p=0;p<e.length;p++){if(e[p].value===r){e[p].selected=!0,c&&(e[p].defaultSelected=!0);return}a!==null||e[p].disabled||(a=e[p])}a!==null&&(a.selected=!0)}}function Xc(e,a,r){if(a!=null&&(a=""+oa(a),a!==e.value&&(e.value=a),r==null)){e.defaultValue!==a&&(e.defaultValue=a);return}e.defaultValue=r!=null?""+oa(r):""}function is(e,a,r,c){if(a==null){if(c!=null){if(r!=null)throw Error(s(92));if(Dt(c)){if(1<c.length)throw Error(s(93));c=c[0]}r=c}r==null&&(r=""),a=r}r=oa(a),e.defaultValue=r,c=e.textContent,c===r&&c!==""&&c!==null&&(e.value=c),lo(e)}function ls(e,a){if(a){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=a;return}}e.textContent=a}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 Ju(e,a,r){var c=a.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?c?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="":c?e.setProperty(a,r):typeof r!="number"||r===0||ro.has(a)?a==="float"?e.cssFloat=r:e[a]=(""+r).trim():e[a]=r+"px"}function Vc(e,a,r){if(a!=null&&typeof a!="object")throw Error(s(62));if(e=e.style,r!=null){for(var c in r)!r.hasOwnProperty(c)||a!=null&&a.hasOwnProperty(c)||(c.indexOf("--")===0?e.setProperty(c,""):c==="float"?e.cssFloat="":e[c]="");for(var p in a)c=a[p],a.hasOwnProperty(p)&&r[p]!==c&&Ju(e,p,c)}else for(var x in a)a.hasOwnProperty(x)&&Ju(e,x,a[x])}function Pu(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 sd=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"]]),ud=/^[\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 Wu(e){return ud.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function hi(){}var Fu=null;function oo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ss=null,gl=null;function Qc(e){var a=Ce(e);if(a&&(e=a.stateNode)){var r=e[bn]||null;t:switch(e=a.stateNode,a.type){case"input":if(so(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),a=r.name,r.type==="radio"&&a!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+ca(""+a)+'"][type="radio"]'),a=0;a<r.length;a++){var c=r[a];if(c!==e&&c.form===e.form){var p=c[bn]||null;if(!p)throw Error(s(90));so(c,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<r.length;a++)c=r[a],c.form===e.form&&Yc(c)}break t;case"textarea":Xc(e,r.value,r.defaultValue);break t;case"select":a=r.value,a!=null&&Ps(e,!!r.multiple,a,!1)}}}var co=!1;function Zc(e,a,r){if(co)return e(a,r);co=!0;try{var c=e(a);return c}finally{if(co=!1,(ss!==null||gl!==null)&&(N(),ss&&(a=ss,e=gl,gl=ss=null,Qc(a),e)))for(a=0;a<e.length;a++)Qc(e[a])}}function us(e,a){var r=e.stateNode;if(r===null)return null;var c=r[bn]||null;if(c===null)return null;r=c[a];t:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(e=e.type,c=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!c;break t;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(s(231,a,typeof r));return r}var di=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fo=!1;if(di)try{var Iu={};Object.defineProperty(Iu,"passive",{get:function(){fo=!0}}),window.addEventListener("test",Iu,Iu),window.removeEventListener("test",Iu,Iu)}catch{fo=!1}var vl=null,ho=null,xl=null;function mo(){if(xl)return xl;var e,a=ho,r=a.length,c,p="value"in vl?vl.value:vl.textContent,x=p.length;for(e=0;e<r&&a[e]===p[e];e++);var C=r-e;for(c=1;c<=C&&a[r-c]===p[x-c];c++);return xl=p.slice(e,1<c?1-c:void 0)}function rs(e){var a=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&a===13&&(e=13)):e=a,e===10&&(e=13),32<=e||e===13?e:0}function $u(){return!0}function Kc(){return!1}function Tn(e){function a(r,c,p,x,C){this._reactName=r,this._targetInst=p,this.type=c,this.nativeEvent=x,this.target=C,this.currentTarget=null;for(var D in e)e.hasOwnProperty(D)&&(r=e[D],this[D]=r?r(x):x[D]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?$u:Kc,this.isPropagationStopped=Kc,this}return b(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=$u)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=$u)},persist:function(){},isPersistent:$u}),a}var _l={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tr=Tn(_l),Ja=b({},_l,{view:0,detail:0}),po=Tn(Ja),yo,er,Ws,nr=b({},Ja,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ir,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!==Ws&&(Ws&&e.type==="mousemove"?(yo=e.screenX-Ws.screenX,er=e.screenY-Ws.screenY):er=yo=0,Ws=e),yo)},movementY:function(e){return"movementY"in e?e.movementY:er}}),rd=Tn(nr),mn=b({},nr,{dataTransfer:0}),od=Tn(mn),cd=b({},Ja,{relatedTarget:0}),go=Tn(cd),fd=b({},_l,{animationName:0,elapsedTime:0,pseudoElement:0}),hd=Tn(fd),ar=b({},_l,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kc=Tn(ar),dd=b({},_l,{data:0}),Jc=Tn(dd),md={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Pc={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"},Wc={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pd(e){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(e):(e=Wc[e])?!!a[e]:!1}function ir(){return pd}var Fc=b({},Ja,{key:function(e){if(e.key){var a=md[e.key]||e.key;if(a!=="Unidentified")return a}return e.type==="keypress"?(e=rs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Pc[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ir,charCode:function(e){return e.type==="keypress"?rs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?rs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ic=Tn(Fc),yd=b({},nr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vo=Tn(yd),gd=b({},Ja,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ir}),Yi=Tn(gd),$c=b({},_l,{propertyName:0,elapsedTime:0,pseudoElement:0}),gp=Tn($c),vd=b({},nr,{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}),Sl=Tn(vd),Li=b({},_l,{newState:0,oldState:0}),tf=Tn(Li),ef=[9,13,27,32],os=di&&"CompositionEvent"in window,bl=null;di&&"documentMode"in document&&(bl=document.documentMode);var cs=di&&"TextEvent"in window&&!bl,pn=di&&(!os||bl&&8<bl&&11>=bl),lr=" ",nf=!1;function xo(e,a){switch(e){case"keyup":return ef.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fs(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Tl=!1;function _o(e,a){switch(e){case"compositionend":return Fs(a);case"keypress":return a.which!==32?null:(nf=!0,lr);case"textInput":return e=a.data,e===lr&&nf?null:e;default:return null}}function xd(e,a){if(Tl)return e==="compositionend"||!os&&xo(e,a)?(e=mo(),xl=ho=vl=null,Tl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return pn&&a.locale!=="ko"?null:a.data;default:return null}}var fa={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 af(e){var a=e&&e.nodeName&&e.nodeName.toLowerCase();return a==="input"?!!fa[e.type]:a==="textarea"}function So(e,a,r,c){ss?gl?gl.push(c):gl=[c]:ss=c,a=cm(a,"onChange"),0<a.length&&(r=new tr("onChange","change",null,r,c),e.push({event:r,listeners:a}))}var Is=null,$s=null;function lf(e){$g(e,0)}function tu(e){var a=Gi(e);if(Yc(a))return e}function sf(e,a){if(e==="change")return a}var sr=!1;if(di){var fs;if(di){var Ae="oninput"in document;if(!Ae){var _d=document.createElement("div");_d.setAttribute("oninput","return;"),Ae=typeof _d.oninput=="function"}fs=Ae}else fs=!1;sr=fs&&(!document.documentMode||9<document.documentMode)}function Sd(){Is&&(Is.detachEvent("onpropertychange",uf),$s=Is=null)}function uf(e){if(e.propertyName==="value"&&tu($s)){var a=[];So(a,$s,e,oo(e)),Zc(lf,a)}}function ur(e,a,r){e==="focusin"?(Sd(),Is=a,$s=r,Is.attachEvent("onpropertychange",uf)):e==="focusout"&&Sd()}function El(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return tu($s)}function bd(e,a){if(e==="click")return tu(a)}function Td(e,a){if(e==="input"||e==="change")return tu(a)}function hs(e,a){return e===a&&(e!==0||1/e===1/a)||e!==e&&a!==a}var Me=typeof Object.is=="function"?Object.is:hs;function eu(e,a){if(Me(e,a))return!0;if(typeof e!="object"||e===null||typeof a!="object"||a===null)return!1;var r=Object.keys(e),c=Object.keys(a);if(r.length!==c.length)return!1;for(c=0;c<r.length;c++){var p=r[c];if(!es.call(a,p)||!Me(e[p],a[p]))return!1}return!0}function rf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function of(e,a){var r=rf(e);e=0;for(var c;r;){if(r.nodeType===3){if(c=e+r.textContent.length,e<=a&&c>=a)return{node:r,offset:a-e};e=c}t:{for(;r;){if(r.nextSibling){r=r.nextSibling;break t}r=r.parentNode}r=void 0}r=rf(r)}}function bo(e,a){return e&&a?e===a?!0:e&&e.nodeType===3?!1:a&&a.nodeType===3?bo(e,a.parentNode):"contains"in e?e.contains(a):e.compareDocumentPosition?!!(e.compareDocumentPosition(a)&16):!1:!1}function To(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var a=Js(e.document);a instanceof e.HTMLIFrameElement;){try{var r=typeof a.contentWindow.location.href=="string"}catch{r=!1}if(r)e=a.contentWindow;else break;a=Js(e.document)}return a}function nu(e){var a=e&&e.nodeName&&e.nodeName.toLowerCase();return a&&(a==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||a==="textarea"||e.contentEditable==="true")}var Ed=di&&"documentMode"in document&&11>=document.documentMode,au=null,Eo=null,iu=null,ha=!1;function Co(e,a,r){var c=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ha||au==null||au!==Js(c)||(c=au,"selectionStart"in c&&nu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),iu&&eu(iu,c)||(iu=c,c=cm(Eo,"onSelect"),0<c.length&&(a=new tr("onSelect","select",null,a,r),e.push({event:a,listeners:c}),a.target=au)))}function Cl(e,a){var r={};return r[e.toLowerCase()]=a.toLowerCase(),r["Webkit"+e]="webkit"+a,r["Moz"+e]="moz"+a,r}var lu={animationend:Cl("Animation","AnimationEnd"),animationiteration:Cl("Animation","AnimationIteration"),animationstart:Cl("Animation","AnimationStart"),transitionrun:Cl("Transition","TransitionRun"),transitionstart:Cl("Transition","TransitionStart"),transitioncancel:Cl("Transition","TransitionCancel"),transitionend:Cl("Transition","TransitionEnd")},rr={},wn={};di&&(wn=document.createElement("div").style,"AnimationEvent"in window||(delete lu.animationend.animation,delete lu.animationiteration.animation,delete lu.animationstart.animation),"TransitionEvent"in window||delete lu.transitionend.transition);function Al(e){if(rr[e])return rr[e];if(!lu[e])return e;var a=lu[e],r;for(r in a)if(a.hasOwnProperty(r)&&r in wn)return rr[e]=a[r];return e}var kn=Al("animationend"),cf=Al("animationiteration"),mi=Al("animationstart"),su=Al("transitionrun"),Ml=Al("transitionstart"),ff=Al("transitioncancel"),Ao=Al("transitionend"),Xi=new Map,Mo="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(" ");Mo.push("scrollEnd");function En(e,a){Xi.set(e,a),qi(a,[e])}var Rl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=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(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},on=[],ds=0,Ro=0;function zl(){for(var e=ds,a=Ro=ds=0;a<e;){var r=on[a];on[a++]=null;var c=on[a];on[a++]=null;var p=on[a];on[a++]=null;var x=on[a];if(on[a++]=null,c!==null&&p!==null){var C=c.pending;C===null?p.next=p:(p.next=C.next,C.next=p),c.pending=p}x!==0&&zo(r,p,x)}}function or(e,a,r,c){on[ds++]=e,on[ds++]=a,on[ds++]=r,on[ds++]=c,Ro|=c,e.lanes|=c,e=e.alternate,e!==null&&(e.lanes|=c)}function uu(e,a,r,c){return or(e,a,r,c),ru(e)}function Dl(e,a){return or(e,null,null,a),ru(e)}function zo(e,a,r){e.lanes|=r;var c=e.alternate;c!==null&&(c.lanes|=r);for(var p=!1,x=e.return;x!==null;)x.childLanes|=r,c=x.alternate,c!==null&&(c.childLanes|=r),x.tag===22&&(e=x.stateNode,e===null||e._visibility&1||(p=!0)),e=x,x=x.return;return e.tag===3?(x=e.stateNode,p&&a!==null&&(p=31-Bn(r),e=x.hiddenUpdates,c=e[p],c===null?e[p]=[a]:c.push(a),a.lane=r|536870912),x):null}function ru(e){if(50<Ds)throw Ds=0,Os=null,Error(s(185));for(var a=e.return;a!==null;)e=a,a=e.return;return e.tag===3?e.stateNode:null}var Ol={};function Cd(e,a,r,c){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Hn(e,a,r,c){return new Cd(e,a,r,c)}function Gn(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pi(e,a){var r=e.alternate;return r===null?(r=Hn(e.tag,a,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=a,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,a=e.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function Cn(e,a){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=a,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,a=r.dependencies,e.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),e}function cr(e,a,r,c,p,x){var C=0;if(c=e,typeof e=="function")Gn(e)&&(C=1);else if(typeof e=="string")C=CS(e,r,pt.current)?26:e==="html"||e==="head"||e==="body"?27:5;else t:switch(e){case ct:return e=Hn(31,r,a,p),e.elementType=ct,e.lanes=x,e;case M:return Vi(r.children,p,x,a);case R:C=8,p|=24;break;case O:return e=Hn(12,r,a,p|2),e.elementType=O,e.lanes=x,e;case Z:return e=Hn(13,r,a,p),e.elementType=Z,e.lanes=x,e;case Q:return e=Hn(19,r,a,p),e.elementType=Q,e.lanes=x,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case U:C=10;break t;case B:C=9;break t;case G:C=11;break t;case K:C=14;break t;case gt:C=16,c=null;break t}C=29,r=Error(s(130,e===null?"null":typeof e,"")),c=null}return a=Hn(C,r,a,p),a.elementType=e,a.type=c,a.lanes=x,a}function Vi(e,a,r,c){return e=Hn(7,e,c,a),e.lanes=r,e}function Do(e,a,r){return e=Hn(6,e,null,a),e.lanes=r,e}function Ad(e){var a=Hn(18,null,null,0);return a.stateNode=e,a}function Pa(e,a,r){return a=Hn(4,e.children!==null?e.children:[],e.key,a),a.lanes=r,a.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},a}var hf=new WeakMap;function Jn(e,a){if(typeof e=="object"&&e!==null){var r=hf.get(e);return r!==void 0?r:(a={value:e,source:a,stack:ju(a)},hf.set(e,a),a)}return{value:e,source:a,stack:ju(a)}}var Wa=[],ms=0,fr=null,ou=0,da=[],Pn=0,yi=null,gi=1,vi="";function Qi(e,a){Wa[ms++]=ou,Wa[ms++]=fr,fr=e,ou=a}function df(e,a,r){da[Pn++]=gi,da[Pn++]=vi,da[Pn++]=yi,yi=e;var c=gi;e=vi;var p=32-Bn(c)-1;c&=~(1<<p),r+=1;var x=32-Bn(a)+p;if(30<x){var C=p-p%5;x=(c&(1<<C)-1).toString(32),c>>=C,p-=C,gi=1<<32-Bn(a)+p|r<<p|c,vi=x+e}else gi=1<<x|r<<p|c,vi=e}function Oo(e){e.return!==null&&(Qi(e,1),df(e,1,0))}function Nl(e){for(;e===fr;)fr=Wa[--ms],Wa[ms]=null,ou=Wa[--ms],Wa[ms]=null;for(;e===yi;)yi=da[--Pn],da[Pn]=null,vi=da[--Pn],da[Pn]=null,gi=da[--Pn],da[Pn]=null}function hr(e,a){da[Pn++]=gi,da[Pn++]=vi,da[Pn++]=yi,gi=a.id,vi=a.overflow,yi=e}var cn=null,_e=null,Ft=!1,Zi=null,fn=!1,No=Error(s(519));function Pt(e){var a=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw dr(Jn(a,e)),No}function Uo(e){var a=e.stateNode,r=e.type,c=e.memoizedProps;switch(a[Jt]=e,a[bn]=c,r){case"dialog":It("cancel",a),It("close",a);break;case"iframe":case"object":case"embed":It("load",a);break;case"video":case"audio":for(r=0;r<lh.length;r++)It(lh[r],a);break;case"source":It("error",a);break;case"img":case"image":case"link":It("error",a),It("load",a);break;case"details":It("toggle",a);break;case"input":It("invalid",a),Lc(a,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":It("invalid",a);break;case"textarea":It("invalid",a),is(a,c.value,c.defaultValue,c.children)}r=c.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||a.textContent===""+r||c.suppressHydrationWarning===!0||a0(a.textContent,r)?(c.popover!=null&&(It("beforetoggle",a),It("toggle",a)),c.onScroll!=null&&It("scroll",a),c.onScrollEnd!=null&&It("scrollend",a),c.onClick!=null&&(a.onclick=hi),a=!0):a=!1,a||Pt(e,!0)}function Md(e){for(cn=e.return;cn;)switch(cn.tag){case 5:case 31:case 13:fn=!1;return;case 27:case 3:fn=!0;return;default:cn=cn.return}}function ps(e){if(e!==cn)return!1;if(!Ft)return Md(e),Ft=!0,!1;var a=e.tag,r;if((r=a!==3&&a!==27)&&((r=a===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Gp(e.type,e.memoizedProps)),r=!r),r&&_e&&Pt(e),Md(e),a===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));_e=h0(e)}else if(a===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));_e=h0(e)}else a===27?(a=_e,Ru(e.type)?(e=Xp,Xp=null,_e=e):_e=a):_e=cn?zi(e.stateNode.nextSibling):null;return!0}function ys(){_e=cn=null,Ft=!1}function mf(){var e=Zi;return e!==null&&(On===null?On=e:On.push.apply(On,e),Zi=null),e}function dr(e){Zi===null?Zi=[e]:Zi.push(e)}var pf=j(null),Ki=null,An=null;function ki(e,a,r){st(pf,a._currentValue),a._currentValue=r}function wa(e){e._currentValue=pf.current,I(pf)}function Ji(e,a,r){for(;e!==null;){var c=e.alternate;if((e.childLanes&a)!==a?(e.childLanes|=a,c!==null&&(c.childLanes|=a)):c!==null&&(c.childLanes&a)!==a&&(c.childLanes|=a),e===r)break;e=e.return}}function Bo(e,a,r,c){var p=e.child;for(p!==null&&(p.return=e);p!==null;){var x=p.dependencies;if(x!==null){var C=p.child;x=x.firstContext;t:for(;x!==null;){var D=x;x=p;for(var Y=0;Y<a.length;Y++)if(D.context===a[Y]){x.lanes|=r,D=x.alternate,D!==null&&(D.lanes|=r),Ji(x.return,r,e),c||(C=null);break t}x=D.next}}else if(p.tag===18){if(C=p.return,C===null)throw Error(s(341));C.lanes|=r,x=C.alternate,x!==null&&(x.lanes|=r),Ji(C,r,e),C=null}else C=p.child;if(C!==null)C.return=p;else for(C=p;C!==null;){if(C===e){C=null;break}if(p=C.sibling,p!==null){p.return=C.return,C=p;break}C=C.return}p=C}}function Ul(e,a,r,c){e=null;for(var p=a,x=!1;p!==null;){if(!x){if((p.flags&524288)!==0)x=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var C=p.alternate;if(C===null)throw Error(s(387));if(C=C.memoizedProps,C!==null){var D=p.type;Me(p.pendingProps.value,C.value)||(e!==null?e.push(D):e=[D])}}else if(p===Ut.current){if(C=p.alternate,C===null)throw Error(s(387));C.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(e!==null?e.push(ch):e=[ch])}p=p.return}e!==null&&Bo(a,e,r,c),a.flags|=262144}function cu(e){for(e=e.firstContext;e!==null;){if(!Me(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function gs(e){Ki=e,An=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function hn(e){return yf(Ki,e)}function mr(e,a){return Ki===null&&gs(e),yf(e,a)}function yf(e,a){var r=a._currentValue;if(a={context:a,memoizedValue:r,next:null},An===null){if(e===null)throw Error(s(308));An=a,e.dependencies={lanes:0,firstContext:a},e.flags|=524288}else An=An.next=a;return r}var Rd=typeof AbortController<"u"?AbortController:function(){var e=[],a=this.signal={aborted:!1,addEventListener:function(r,c){e.push(c)}};this.abort=function(){a.aborted=!0,e.forEach(function(r){return r()})}},zd=i.unstable_scheduleCallback,gf=i.unstable_NormalPriority,Mt={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vf(){return{controller:new Rd,data:new Map,refCount:0}}function yn(e){e.refCount--,e.refCount===0&&zd(gf,function(){e.controller.abort()})}var vs=null,xf=0,Pi=0,Fa=null;function fu(e,a){if(vs===null){var r=vs=[];xf=0,Pi=Rp(),Fa={status:"pending",value:void 0,then:function(c){r.push(c)}}}return xf++,a.then(_f,_f),a}function _f(){if(--xf===0&&vs!==null){Fa!==null&&(Fa.status="fulfilled");var e=vs;vs=null,Pi=0,Fa=null;for(var a=0;a<e.length;a++)(0,e[a])()}}function Sf(e,a){var r=[],c={status:"pending",value:null,reason:null,then:function(p){r.push(p)}};return e.then(function(){c.status="fulfilled",c.value=a;for(var p=0;p<r.length;p++)(0,r[p])(a)},function(p){for(c.status="rejected",c.reason=p,p=0;p<r.length;p++)(0,r[p])(void 0)}),c}var Dd=w.S;w.S=function(e,a){Cu=Kn(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&fu(e,a),Dd!==null&&Dd(e,a)};var Bl=j(null);function xi(){var e=Bl.current;return e!==null?e:he.pooledCache}function hu(e,a){a===null?st(Bl,Bl.current):st(Bl,a.pool)}function wo(){var e=xi();return e===null?null:{parent:Mt._currentValue,pool:e}}var wl=Error(s(460)),pr=Error(s(474)),Ia=Error(s(542)),yr={then:function(){}};function Od(e){return e=e.status,e==="fulfilled"||e==="rejected"}function bf(e,a,r){switch(r=e[r],r===void 0?e.push(a):r!==a&&(a.then(hi,hi),a=r),a.status){case"fulfilled":return a.value;case"rejected":throw e=a.reason,Tf(e),e;default:if(typeof a.status=="string")a.then(hi,hi);else{if(e=he,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=a,e.status="pending",e.then(function(c){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=c}},function(c){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=c}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw e=a.reason,Tf(e),e}throw Nt=a,wl}}function xs(e){try{var a=e._init;return a(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(Nt=r,wl):r}}var Nt=null;function Ho(){if(Nt===null)throw Error(s(459));var e=Nt;return Nt=null,e}function Tf(e){if(e===wl||e===Ia)throw Error(s(483))}var Hl=null,Gl=0;function Go(e){var a=Gl;return Gl+=1,Hl===null&&(Hl=[]),bf(Hl,e,a)}function gr(e,a){a=a.props.ref,e.ref=a!==void 0?a:null}function vr(e,a){throw a.$$typeof===A?Error(s(525)):(e=Object.prototype.toString.call(a),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":e)))}function du(e){function a(J,V){if(e){var W=J.deletions;W===null?(J.deletions=[V],J.flags|=16):W.push(V)}}function r(J,V){if(!e)return null;for(;V!==null;)a(J,V),V=V.sibling;return null}function c(J){for(var V=new Map;J!==null;)J.key!==null?V.set(J.key,J):V.set(J.index,J),J=J.sibling;return V}function p(J,V){return J=pi(J,V),J.index=0,J.sibling=null,J}function x(J,V,W){return J.index=W,e?(W=J.alternate,W!==null?(W=W.index,W<V?(J.flags|=67108866,V):W):(J.flags|=67108866,V)):(J.flags|=1048576,V)}function C(J){return e&&J.alternate===null&&(J.flags|=67108866),J}function D(J,V,W,rt){return V===null||V.tag!==6?(V=Do(W,J.mode,rt),V.return=J,V):(V=p(V,W),V.return=J,V)}function Y(J,V,W,rt){var zt=W.type;return zt===M?lt(J,V,W.props.children,rt,W.key):V!==null&&(V.elementType===zt||typeof zt=="object"&&zt!==null&&zt.$$typeof===gt&&xs(zt)===V.type)?(V=p(V,W.props),gr(V,W),V.return=J,V):(V=cr(W.type,W.key,W.props,null,J.mode,rt),gr(V,W),V.return=J,V)}function F(J,V,W,rt){return V===null||V.tag!==4||V.stateNode.containerInfo!==W.containerInfo||V.stateNode.implementation!==W.implementation?(V=Pa(W,J.mode,rt),V.return=J,V):(V=p(V,W.children||[]),V.return=J,V)}function lt(J,V,W,rt,zt){return V===null||V.tag!==7?(V=Vi(W,J.mode,rt,zt),V.return=J,V):(V=p(V,W),V.return=J,V)}function ot(J,V,W){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return V=Do(""+V,J.mode,W),V.return=J,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case E:return W=cr(V.type,V.key,V.props,null,J.mode,W),gr(W,V),W.return=J,W;case z:return V=Pa(V,J.mode,W),V.return=J,V;case gt:return V=xs(V),ot(J,V,W)}if(Dt(V)||vt(V))return V=Vi(V,J.mode,W,null),V.return=J,V;if(typeof V.then=="function")return ot(J,Go(V),W);if(V.$$typeof===U)return ot(J,mr(J,V),W);vr(J,V)}return null}function tt(J,V,W,rt){var zt=V!==null?V.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return zt!==null?null:D(J,V,""+W,rt);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case E:return W.key===zt?Y(J,V,W,rt):null;case z:return W.key===zt?F(J,V,W,rt):null;case gt:return W=xs(W),tt(J,V,W,rt)}if(Dt(W)||vt(W))return zt!==null?null:lt(J,V,W,rt,null);if(typeof W.then=="function")return tt(J,V,Go(W),rt);if(W.$$typeof===U)return tt(J,V,mr(J,W),rt);vr(J,W)}return null}function it(J,V,W,rt,zt){if(typeof rt=="string"&&rt!==""||typeof rt=="number"||typeof rt=="bigint")return J=J.get(W)||null,D(V,J,""+rt,zt);if(typeof rt=="object"&&rt!==null){switch(rt.$$typeof){case E:return J=J.get(rt.key===null?W:rt.key)||null,Y(V,J,rt,zt);case z:return J=J.get(rt.key===null?W:rt.key)||null,F(V,J,rt,zt);case gt:return rt=xs(rt),it(J,V,W,rt,zt)}if(Dt(rt)||vt(rt))return J=J.get(W)||null,lt(V,J,rt,zt,null);if(typeof rt.then=="function")return it(J,V,W,Go(rt),zt);if(rt.$$typeof===U)return it(J,V,W,mr(V,rt),zt);vr(V,rt)}return null}function Et(J,V,W,rt){for(var zt=null,me=null,Ct=V,Zt=V=0,ee=null;Ct!==null&&Zt<W.length;Zt++){Ct.index>Zt?(ee=Ct,Ct=null):ee=Ct.sibling;var pe=tt(J,Ct,W[Zt],rt);if(pe===null){Ct===null&&(Ct=ee);break}e&&Ct&&pe.alternate===null&&a(J,Ct),V=x(pe,V,Zt),me===null?zt=pe:me.sibling=pe,me=pe,Ct=ee}if(Zt===W.length)return r(J,Ct),Ft&&Qi(J,Zt),zt;if(Ct===null){for(;Zt<W.length;Zt++)Ct=ot(J,W[Zt],rt),Ct!==null&&(V=x(Ct,V,Zt),me===null?zt=Ct:me.sibling=Ct,me=Ct);return Ft&&Qi(J,Zt),zt}for(Ct=c(Ct);Zt<W.length;Zt++)ee=it(Ct,J,Zt,W[Zt],rt),ee!==null&&(e&&ee.alternate!==null&&Ct.delete(ee.key===null?Zt:ee.key),V=x(ee,V,Zt),me===null?zt=ee:me.sibling=ee,me=ee);return e&&Ct.forEach(function(Uu){return a(J,Uu)}),Ft&&Qi(J,Zt),zt}function Bt(J,V,W,rt){if(W==null)throw Error(s(151));for(var zt=null,me=null,Ct=V,Zt=V=0,ee=null,pe=W.next();Ct!==null&&!pe.done;Zt++,pe=W.next()){Ct.index>Zt?(ee=Ct,Ct=null):ee=Ct.sibling;var Uu=tt(J,Ct,pe.value,rt);if(Uu===null){Ct===null&&(Ct=ee);break}e&&Ct&&Uu.alternate===null&&a(J,Ct),V=x(Uu,V,Zt),me===null?zt=Uu:me.sibling=Uu,me=Uu,Ct=ee}if(pe.done)return r(J,Ct),Ft&&Qi(J,Zt),zt;if(Ct===null){for(;!pe.done;Zt++,pe=W.next())pe=ot(J,pe.value,rt),pe!==null&&(V=x(pe,V,Zt),me===null?zt=pe:me.sibling=pe,me=pe);return Ft&&Qi(J,Zt),zt}for(Ct=c(Ct);!pe.done;Zt++,pe=W.next())pe=it(Ct,J,Zt,pe.value,rt),pe!==null&&(e&&pe.alternate!==null&&Ct.delete(pe.key===null?Zt:pe.key),V=x(pe,V,Zt),me===null?zt=pe:me.sibling=pe,me=pe);return e&&Ct.forEach(function(HS){return a(J,HS)}),Ft&&Qi(J,Zt),zt}function Te(J,V,W,rt){if(typeof W=="object"&&W!==null&&W.type===M&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case E:t:{for(var zt=W.key;V!==null;){if(V.key===zt){if(zt=W.type,zt===M){if(V.tag===7){r(J,V.sibling),rt=p(V,W.props.children),rt.return=J,J=rt;break t}}else if(V.elementType===zt||typeof zt=="object"&&zt!==null&&zt.$$typeof===gt&&xs(zt)===V.type){r(J,V.sibling),rt=p(V,W.props),gr(rt,W),rt.return=J,J=rt;break t}r(J,V);break}else a(J,V);V=V.sibling}W.type===M?(rt=Vi(W.props.children,J.mode,rt,W.key),rt.return=J,J=rt):(rt=cr(W.type,W.key,W.props,null,J.mode,rt),gr(rt,W),rt.return=J,J=rt)}return C(J);case z:t:{for(zt=W.key;V!==null;){if(V.key===zt)if(V.tag===4&&V.stateNode.containerInfo===W.containerInfo&&V.stateNode.implementation===W.implementation){r(J,V.sibling),rt=p(V,W.children||[]),rt.return=J,J=rt;break t}else{r(J,V);break}else a(J,V);V=V.sibling}rt=Pa(W,J.mode,rt),rt.return=J,J=rt}return C(J);case gt:return W=xs(W),Te(J,V,W,rt)}if(Dt(W))return Et(J,V,W,rt);if(vt(W)){if(zt=vt(W),typeof zt!="function")throw Error(s(150));return W=zt.call(W),Bt(J,V,W,rt)}if(typeof W.then=="function")return Te(J,V,Go(W),rt);if(W.$$typeof===U)return Te(J,V,mr(J,W),rt);vr(J,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,V!==null&&V.tag===6?(r(J,V.sibling),rt=p(V,W),rt.return=J,J=rt):(r(J,V),rt=Do(W,J.mode,rt),rt.return=J,J=rt),C(J)):r(J,V)}return function(J,V,W,rt){try{Gl=0;var zt=Te(J,V,W,rt);return Hl=null,zt}catch(Ct){if(Ct===wl||Ct===Ia)throw Ct;var me=Hn(29,Ct,null,J.mode);return me.lanes=rt,me.return=J,me}finally{}}}var _s=du(!0),Nd=du(!1),jl=!1;function Ef(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Cf(e,a){e=e.updateQueue,a.updateQueue===e&&(a.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function _i(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Wi(e,a,r){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,($t&2)!==0){var p=c.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),c.pending=a,a=ru(e),zo(e,null,r),a}return or(e,c,a,r),ru(e)}function ql(e,a,r){if(a=a.updateQueue,a!==null&&(a=a.shared,(r&4194048)!==0)){var c=a.lanes;c&=e.pendingLanes,r|=c,a.lanes=r,to(e,r)}}function jo(e,a){var r=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,r===c)){var p=null,x=null;if(r=r.firstBaseUpdate,r!==null){do{var C={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};x===null?p=x=C:x=x.next=C,r=r.next}while(r!==null);x===null?p=x=a:x=x.next=a}else p=x=a;r={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:x,shared:c.shared,callbacks:c.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=a:e.next=a,r.lastBaseUpdate=a}var Af=!1;function xr(){if(Af){var e=Fa;if(e!==null)throw e}}function Ss(e,a,r,c){Af=!1;var p=e.updateQueue;jl=!1;var x=p.firstBaseUpdate,C=p.lastBaseUpdate,D=p.shared.pending;if(D!==null){p.shared.pending=null;var Y=D,F=Y.next;Y.next=null,C===null?x=F:C.next=F,C=Y;var lt=e.alternate;lt!==null&&(lt=lt.updateQueue,D=lt.lastBaseUpdate,D!==C&&(D===null?lt.firstBaseUpdate=F:D.next=F,lt.lastBaseUpdate=Y))}if(x!==null){var ot=p.baseState;C=0,lt=F=Y=null,D=x;do{var tt=D.lane&-536870913,it=tt!==D.lane;if(it?(Wt&tt)===tt:(c&tt)===tt){tt!==0&&tt===Pi&&(Af=!0),lt!==null&&(lt=lt.next={lane:0,tag:D.tag,payload:D.payload,callback:null,next:null});t:{var Et=e,Bt=D;tt=a;var Te=r;switch(Bt.tag){case 1:if(Et=Bt.payload,typeof Et=="function"){ot=Et.call(Te,ot,tt);break t}ot=Et;break t;case 3:Et.flags=Et.flags&-65537|128;case 0:if(Et=Bt.payload,tt=typeof Et=="function"?Et.call(Te,ot,tt):Et,tt==null)break t;ot=b({},ot,tt);break t;case 2:jl=!0}}tt=D.callback,tt!==null&&(e.flags|=64,it&&(e.flags|=8192),it=p.callbacks,it===null?p.callbacks=[tt]:it.push(tt))}else it={lane:tt,tag:D.tag,payload:D.payload,callback:D.callback,next:null},lt===null?(F=lt=it,Y=ot):lt=lt.next=it,C|=tt;if(D=D.next,D===null){if(D=p.shared.pending,D===null)break;it=D,D=it.next,it.next=null,p.lastBaseUpdate=it,p.shared.pending=null}}while(!0);lt===null&&(Y=ot),p.baseState=Y,p.firstBaseUpdate=F,p.lastBaseUpdate=lt,x===null&&(p.shared.lanes=0),Ea|=C,e.lanes=C,e.memoizedState=ot}}function Si(e,a){if(typeof e!="function")throw Error(s(191,e));e.call(a)}function gn(e,a){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)Si(r[e],a)}var ma=j(null),jn=j(0);function Mf(e,a){e=Qe,st(jn,e),st(ma,a),Qe=e|a.baseLanes}function Rf(){st(jn,Qe),st(ma,ma.current)}function Mn(){Qe=jn.current,I(ma),I(jn)}var an=j(null),Ha=null;function Yl(e){var a=e.alternate;st(Ue,Ue.current&1),st(an,e),Ha===null&&(a===null||ma.current!==null||a.memoizedState!==null)&&(Ha=e)}function zf(e){st(Ue,Ue.current),st(an,e),Ha===null&&(Ha=e)}function Ud(e){e.tag===22?(st(Ue,Ue.current),st(an,e),Ha===null&&(Ha=e)):Fi()}function Fi(){st(Ue,Ue.current),st(an,an.current)}function pa(e){I(an),Ha===e&&(Ha=null),I(Ue)}var Ue=j(0);function qo(e){for(var a=e;a!==null;){if(a.tag===13){var r=a.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||Yp(r)||Lp(r)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break;for(;a.sibling===null;){if(a.return===null||a.return===e)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Wn=0,wt=null,ge=null,We=null,Yo=!1,bi=!1,bs=!1,Lo=0,_r=0,Ti=null,vp=0;function Be(){throw Error(s(321))}function Df(e,a){if(a===null)return!1;for(var r=0;r<a.length&&r<e.length;r++)if(!Me(e[r],a[r]))return!1;return!0}function Of(e,a,r,c,p,x){return Wn=x,wt=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,w.H=e===null||e.memoizedState===null?$d:yu,bs=!1,x=r(c,p),bs=!1,bi&&(x=wd(a,r,c,p)),Bd(e),x}function Bd(e){w.H=Cr;var a=ge!==null&&ge.next!==null;if(Wn=0,We=ge=wt=null,Yo=!1,_r=0,Ti=null,a)throw Error(s(300));e===null||Re||(e=e.dependencies,e!==null&&cu(e)&&(Re=!0))}function wd(e,a,r,c){wt=e;var p=0;do{if(bi&&(Ti=null),_r=0,bi=!1,25<=p)throw Error(s(301));if(p+=1,We=ge=null,e.updateQueue!=null){var x=e.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}w.H=Ar,x=a(r,c)}while(bi);return x}function xp(){var e=w.H,a=e.useState()[0];return a=typeof a.then=="function"?br(a):a,e=e.useState()[0],(ge!==null?ge.memoizedState:null)!==e&&(wt.flags|=1024),a}function Nf(){var e=Lo!==0;return Lo=0,e}function Uf(e,a,r){a.updateQueue=e.updateQueue,a.flags&=-2053,e.lanes&=~r}function Bf(e){if(Yo){for(e=e.memoizedState;e!==null;){var a=e.queue;a!==null&&(a.pending=null),e=e.next}Yo=!1}Wn=0,We=ge=wt=null,bi=!1,_r=Lo=0,Ti=null}function qn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?wt.memoizedState=We=e:We=We.next=e,We}function Ye(){if(ge===null){var e=wt.alternate;e=e!==null?e.memoizedState:null}else e=ge.next;var a=We===null?wt.memoizedState:We.next;if(a!==null)We=a,ge=e;else{if(e===null)throw wt.alternate===null?Error(s(467)):Error(s(310));ge=e,e={memoizedState:ge.memoizedState,baseState:ge.baseState,baseQueue:ge.baseQueue,queue:ge.queue,next:null},We===null?wt.memoizedState=We=e:We=We.next=e}return We}function Sr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function br(e){var a=_r;return _r+=1,Ti===null&&(Ti=[]),e=bf(Ti,e,a),a=wt,(We===null?a.memoizedState:We.next)===null&&(a=a.alternate,w.H=a===null||a.memoizedState===null?$d:yu),e}function Xo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return br(e);if(e.$$typeof===U)return hn(e)}throw Error(s(438,String(e)))}function wf(e){var a=null,r=wt.updateQueue;if(r!==null&&(a=r.memoCache),a==null){var c=wt.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(a={data:c.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),r===null&&(r=Sr(),wt.updateQueue=r),r.memoCache=a,r=a.data[a.index],r===void 0)for(r=a.data[a.index]=Array(e),c=0;c<e;c++)r[c]=ht;return a.index++,r}function Ii(e,a){return typeof a=="function"?a(e):a}function Vo(e){var a=Ye();return Hf(a,ge,e)}function Hf(e,a,r){var c=e.queue;if(c===null)throw Error(s(311));c.lastRenderedReducer=r;var p=e.baseQueue,x=c.pending;if(x!==null){if(p!==null){var C=p.next;p.next=x.next,x.next=C}a.baseQueue=p=x,c.pending=null}if(x=e.baseState,p===null)e.memoizedState=x;else{a=p.next;var D=C=null,Y=null,F=a,lt=!1;do{var ot=F.lane&-536870913;if(ot!==F.lane?(Wt&ot)===ot:(Wn&ot)===ot){var tt=F.revertLane;if(tt===0)Y!==null&&(Y=Y.next={lane:0,revertLane:0,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),ot===Pi&&(lt=!0);else if((Wn&tt)===tt){F=F.next,tt===Pi&&(lt=!0);continue}else ot={lane:0,revertLane:F.revertLane,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},Y===null?(D=Y=ot,C=x):Y=Y.next=ot,wt.lanes|=tt,Ea|=tt;ot=F.action,bs&&r(x,ot),x=F.hasEagerState?F.eagerState:r(x,ot)}else tt={lane:ot,revertLane:F.revertLane,gesture:F.gesture,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},Y===null?(D=Y=tt,C=x):Y=Y.next=tt,wt.lanes|=ot,Ea|=ot;F=F.next}while(F!==null&&F!==a);if(Y===null?C=x:Y.next=D,!Me(x,e.memoizedState)&&(Re=!0,lt&&(r=Fa,r!==null)))throw r;e.memoizedState=x,e.baseState=C,e.baseQueue=Y,c.lastRenderedState=x}return p===null&&(c.lanes=0),[e.memoizedState,c.dispatch]}function Qo(e){var a=Ye(),r=a.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=e;var c=r.dispatch,p=r.pending,x=a.memoizedState;if(p!==null){r.pending=null;var C=p=p.next;do x=e(x,C.action),C=C.next;while(C!==p);Me(x,a.memoizedState)||(Re=!0),a.memoizedState=x,a.baseQueue===null&&(a.baseState=x),r.lastRenderedState=x}return[x,c]}function Gf(e,a,r){var c=wt,p=Ye(),x=Ft;if(x){if(r===void 0)throw Error(s(407));r=r()}else r=a();var C=!Me((ge||p).memoizedState,r);if(C&&(p.memoizedState=r,Re=!0),p=p.queue,Xf(qf.bind(null,c,p,e),[e]),p.getSnapshot!==a||C||We!==null&&We.memoizedState.tag&1){if(c.flags|=2048,mu(9,{destroy:void 0},jf.bind(null,c,p,r,a),null),he===null)throw Error(s(349));x||(Wn&127)!==0||Hd(c,a,r)}return r}function Hd(e,a,r){e.flags|=16384,e={getSnapshot:a,value:r},a=wt.updateQueue,a===null?(a=Sr(),wt.updateQueue=a,a.stores=[e]):(r=a.stores,r===null?a.stores=[e]:r.push(e))}function jf(e,a,r,c){a.value=r,a.getSnapshot=c,Yf(a)&&Zo(e)}function qf(e,a,r){return r(function(){Yf(a)&&Zo(e)})}function Yf(e){var a=e.getSnapshot;e=e.value;try{var r=a();return!Me(e,r)}catch{return!0}}function Zo(e){var a=Dl(e,2);a!==null&&u(a,e,2)}function Tr(e){var a=qn();if(typeof e=="function"){var r=e;if(e=r(),bs){Ba(!0);try{r()}finally{Ba(!1)}}}return a.memoizedState=a.baseState=e,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:e},a}function Gd(e,a,r,c){return e.baseState=r,Hf(e,ge,typeof c=="function"?c:Ii)}function _p(e,a,r,c,p){if($i(e))throw Error(s(485));if(e=a.action,e!==null){var x={payload:p,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){x.listeners.push(C)}};w.T!==null?r(!0):x.isTransition=!1,c(x),r=a.pending,r===null?(x.next=a.pending=x,jd(a,x)):(x.next=r.next,a.pending=r.next=x)}}function jd(e,a){var r=a.action,c=a.payload,p=e.state;if(a.isTransition){var x=w.T,C={};w.T=C;try{var D=r(p,c),Y=w.S;Y!==null&&Y(C,D),qd(e,a,D)}catch(F){Ko(e,a,F)}finally{x!==null&&C.types!==null&&(x.types=C.types),w.T=x}}else try{x=r(p,c),qd(e,a,x)}catch(F){Ko(e,a,F)}}function qd(e,a,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(c){Lf(e,a,c)},function(c){return Ko(e,a,c)}):Lf(e,a,r)}function Lf(e,a,r){a.status="fulfilled",a.value=r,Yd(a),e.state=r,a=e.pending,a!==null&&(r=a.next,r===a?e.pending=null:(r=r.next,a.next=r,jd(e,r)))}function Ko(e,a,r){var c=e.pending;if(e.pending=null,c!==null){c=c.next;do a.status="rejected",a.reason=r,Yd(a),a=a.next;while(a!==c)}e.action=null}function Yd(e){e=e.listeners;for(var a=0;a<e.length;a++)(0,e[a])()}function Ld(e,a){return a}function Xd(e,a){if(Ft){var r=he.formState;if(r!==null){t:{var c=wt;if(Ft){if(_e){e:{for(var p=_e,x=fn;p.nodeType!==8;){if(!x){p=null;break e}if(p=zi(p.nextSibling),p===null){p=null;break e}}x=p.data,p=x==="F!"||x==="F"?p:null}if(p){_e=zi(p.nextSibling),c=p.data==="F!";break t}}Pt(c)}c=!1}c&&(a=r[0])}}return r=qn(),r.memoizedState=r.baseState=a,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ld,lastRenderedState:a},r.queue=c,r=Id.bind(null,wt,c),c.dispatch=r,c=Tr(!1),x=Er.bind(null,wt,!1,c.queue),c=qn(),p={state:a,dispatch:null,action:e,pending:null},c.queue=p,r=_p.bind(null,wt,p,x,r),p.dispatch=r,c.memoizedState=e,[a,r,!1]}function Vd(e){var a=Ye();return Qd(a,ge,e)}function Qd(e,a,r){if(a=Hf(e,a,Ld)[0],e=Vo(Ii)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var c=br(a)}catch(C){throw C===wl?Ia:C}else c=a;a=Ye();var p=a.queue,x=p.dispatch;return r!==a.memoizedState&&(wt.flags|=2048,mu(9,{destroy:void 0},Sp.bind(null,p,r),null)),[c,x,e]}function Sp(e,a){e.action=a}function Zd(e){var a=Ye(),r=ge;if(r!==null)return Qd(a,r,e);Ye(),a=a.memoizedState,r=Ye();var c=r.queue.dispatch;return r.memoizedState=e,[a,c,!1]}function mu(e,a,r,c){return e={tag:e,create:r,deps:c,inst:a,next:null},a=wt.updateQueue,a===null&&(a=Sr(),wt.updateQueue=a),r=a.lastEffect,r===null?a.lastEffect=e.next=e:(c=r.next,r.next=e,e.next=c,a.lastEffect=e),e}function Kd(){return Ye().memoizedState}function ko(e,a,r,c){var p=qn();wt.flags|=e,p.memoizedState=mu(1|a,{destroy:void 0},r,c===void 0?null:c)}function Jo(e,a,r,c){var p=Ye();c=c===void 0?null:c;var x=p.memoizedState.inst;ge!==null&&c!==null&&Df(c,ge.memoizedState.deps)?p.memoizedState=mu(a,x,r,c):(wt.flags|=e,p.memoizedState=mu(1|a,x,r,c))}function kd(e,a){ko(8390656,8,e,a)}function Xf(e,a){Jo(2048,8,e,a)}function Jd(e){wt.flags|=4;var a=wt.updateQueue;if(a===null)a=Sr(),wt.updateQueue=a,a.events=[e];else{var r=a.events;r===null?a.events=[e]:r.push(e)}}function Pd(e){var a=Ye().memoizedState;return Jd({ref:a,nextImpl:e}),function(){if(($t&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}function Wd(e,a){return Jo(4,2,e,a)}function ya(e,a){return Jo(4,4,e,a)}function Vf(e,a){if(typeof a=="function"){e=e();var r=a(e);return function(){typeof r=="function"?r():a(null)}}if(a!=null)return e=e(),a.current=e,function(){a.current=null}}function Po(e,a,r){r=r!=null?r.concat([e]):null,Jo(4,4,Vf.bind(null,a,e),r)}function Wo(){}function Qf(e,a){var r=Ye();a=a===void 0?null:a;var c=r.memoizedState;return a!==null&&Df(a,c[1])?c[0]:(r.memoizedState=[e,a],e)}function Zf(e,a){var r=Ye();a=a===void 0?null:a;var c=r.memoizedState;if(a!==null&&Df(a,c[1]))return c[0];if(c=e(),bs){Ba(!0);try{e()}finally{Ba(!1)}}return r.memoizedState=[c,a],c}function Kf(e,a,r){return r===void 0||(Wn&1073741824)!==0&&(Wt&261930)===0?e.memoizedState=a:(e.memoizedState=r,e=l(),wt.lanes|=e,Ea|=e,r)}function kf(e,a,r,c){return Me(r,a)?r:ma.current!==null?(e=Kf(e,r,c),Me(e,a)||(Re=!0),e):(Wn&42)===0||(Wn&1073741824)!==0&&(Wt&261930)===0?(Re=!0,e.memoizedState=r):(e=l(),wt.lanes|=e,Ea|=e,a)}function Jf(e,a,r,c,p){var x=H.p;H.p=x!==0&&8>x?x:8;var C=w.T,D={};w.T=D,Er(e,!1,a,r);try{var Y=p(),F=w.S;if(F!==null&&F(D,Y),Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var lt=Sf(Y,c);pu(e,a,lt,Ln(e))}else pu(e,a,c,Ln(e))}catch(ot){pu(e,a,{then:function(){},status:"rejected",reason:ot},Ln())}finally{H.p=x,C!==null&&D.types!==null&&(C.types=D.types),w.T=C}}function bp(){}function Pf(e,a,r,c){if(e.tag!==5)throw Error(s(476));var p=Fd(e).queue;Jf(e,p,a,at,r===null?bp:function(){return Wf(e),r(c)})}function Fd(e){var a=e.memoizedState;if(a!==null)return a;a={memoizedState:at,baseState:at,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:at},next:null};var r={};return a.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:r},next:null},e.memoizedState=a,e=e.alternate,e!==null&&(e.memoizedState=a),a}function Wf(e){var a=Fd(e);a.next===null&&(a=e.alternate.memoizedState),pu(e,a.next.queue,{},Ln())}function Ff(){return hn(ch)}function vn(){return Ye().memoizedState}function If(){return Ye().memoizedState}function Tp(e){for(var a=e.return;a!==null;){switch(a.tag){case 24:case 3:var r=Ln();e=_i(r);var c=Wi(a,e,r);c!==null&&(u(c,a,r),ql(c,a,r)),a={cache:vf()},e.payload=a;return}a=a.return}}function Ep(e,a,r){var c=Ln();r={lane:c,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},$i(e)?Ts(a,r):(r=uu(e,a,r,c),r!==null&&(u(r,e,c),Fn(r,a,c)))}function Id(e,a,r){var c=Ln();pu(e,a,r,c)}function pu(e,a,r,c){var p={lane:c,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if($i(e))Ts(a,p);else{var x=e.alternate;if(e.lanes===0&&(x===null||x.lanes===0)&&(x=a.lastRenderedReducer,x!==null))try{var C=a.lastRenderedState,D=x(C,r);if(p.hasEagerState=!0,p.eagerState=D,Me(D,C))return or(e,a,p,0),he===null&&zl(),!1}catch{}finally{}if(r=uu(e,a,p,c),r!==null)return u(r,e,c),Fn(r,a,c),!0}return!1}function Er(e,a,r,c){if(c={lane:2,revertLane:Rp(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},$i(e)){if(a)throw Error(s(479))}else a=uu(e,r,c,2),a!==null&&u(a,e,2)}function $i(e){var a=e.alternate;return e===wt||a!==null&&a===wt}function Ts(e,a){bi=Yo=!0;var r=e.pending;r===null?a.next=a:(a.next=r.next,r.next=a),e.pending=a}function Fn(e,a,r){if((r&4194048)!==0){var c=a.lanes;c&=e.pendingLanes,r|=c,a.lanes=r,to(e,r)}}var Cr={readContext:hn,use:Xo,useCallback:Be,useContext:Be,useEffect:Be,useImperativeHandle:Be,useLayoutEffect:Be,useInsertionEffect:Be,useMemo:Be,useReducer:Be,useRef:Be,useState:Be,useDebugValue:Be,useDeferredValue:Be,useTransition:Be,useSyncExternalStore:Be,useId:Be,useHostTransitionStatus:Be,useFormState:Be,useActionState:Be,useOptimistic:Be,useMemoCache:Be,useCacheRefresh:Be};Cr.useEffectEvent=Be;var $d={readContext:hn,use:Xo,useCallback:function(e,a){return qn().memoizedState=[e,a===void 0?null:a],e},useContext:hn,useEffect:kd,useImperativeHandle:function(e,a,r){r=r!=null?r.concat([e]):null,ko(4194308,4,Vf.bind(null,a,e),r)},useLayoutEffect:function(e,a){return ko(4194308,4,e,a)},useInsertionEffect:function(e,a){ko(4,2,e,a)},useMemo:function(e,a){var r=qn();a=a===void 0?null:a;var c=e();if(bs){Ba(!0);try{e()}finally{Ba(!1)}}return r.memoizedState=[c,a],c},useReducer:function(e,a,r){var c=qn();if(r!==void 0){var p=r(a);if(bs){Ba(!0);try{r(a)}finally{Ba(!1)}}}else p=a;return c.memoizedState=c.baseState=p,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:p},c.queue=e,e=e.dispatch=Ep.bind(null,wt,e),[c.memoizedState,e]},useRef:function(e){var a=qn();return e={current:e},a.memoizedState=e},useState:function(e){e=Tr(e);var a=e.queue,r=Id.bind(null,wt,a);return a.dispatch=r,[e.memoizedState,r]},useDebugValue:Wo,useDeferredValue:function(e,a){var r=qn();return Kf(r,e,a)},useTransition:function(){var e=Tr(!1);return e=Jf.bind(null,wt,e.queue,!0,!1),qn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,a,r){var c=wt,p=qn();if(Ft){if(r===void 0)throw Error(s(407));r=r()}else{if(r=a(),he===null)throw Error(s(349));(Wt&127)!==0||Hd(c,a,r)}p.memoizedState=r;var x={value:r,getSnapshot:a};return p.queue=x,kd(qf.bind(null,c,x,e),[e]),c.flags|=2048,mu(9,{destroy:void 0},jf.bind(null,c,x,r,a),null),r},useId:function(){var e=qn(),a=he.identifierPrefix;if(Ft){var r=vi,c=gi;r=(c&~(1<<32-Bn(c)-1)).toString(32)+r,a="_"+a+"R_"+r,r=Lo++,0<r&&(a+="H"+r.toString(32)),a+="_"}else r=vp++,a="_"+a+"r_"+r.toString(32)+"_";return e.memoizedState=a},useHostTransitionStatus:Ff,useFormState:Xd,useActionState:Xd,useOptimistic:function(e){var a=qn();a.memoizedState=a.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=r,a=Er.bind(null,wt,!0,r),r.dispatch=a,[e,a]},useMemoCache:wf,useCacheRefresh:function(){return qn().memoizedState=Tp.bind(null,wt)},useEffectEvent:function(e){var a=qn(),r={impl:e};return a.memoizedState=r,function(){if(($t&2)!==0)throw Error(s(440));return r.impl.apply(void 0,arguments)}}},yu={readContext:hn,use:Xo,useCallback:Qf,useContext:hn,useEffect:Xf,useImperativeHandle:Po,useInsertionEffect:Wd,useLayoutEffect:ya,useMemo:Zf,useReducer:Vo,useRef:Kd,useState:function(){return Vo(Ii)},useDebugValue:Wo,useDeferredValue:function(e,a){var r=Ye();return kf(r,ge.memoizedState,e,a)},useTransition:function(){var e=Vo(Ii)[0],a=Ye().memoizedState;return[typeof e=="boolean"?e:br(e),a]},useSyncExternalStore:Gf,useId:vn,useHostTransitionStatus:Ff,useFormState:Vd,useActionState:Vd,useOptimistic:function(e,a){var r=Ye();return Gd(r,ge,e,a)},useMemoCache:wf,useCacheRefresh:If};yu.useEffectEvent=Pd;var Ar={readContext:hn,use:Xo,useCallback:Qf,useContext:hn,useEffect:Xf,useImperativeHandle:Po,useInsertionEffect:Wd,useLayoutEffect:ya,useMemo:Zf,useReducer:Qo,useRef:Kd,useState:function(){return Qo(Ii)},useDebugValue:Wo,useDeferredValue:function(e,a){var r=Ye();return ge===null?Kf(r,e,a):kf(r,ge.memoizedState,e,a)},useTransition:function(){var e=Qo(Ii)[0],a=Ye().memoizedState;return[typeof e=="boolean"?e:br(e),a]},useSyncExternalStore:Gf,useId:vn,useHostTransitionStatus:Ff,useFormState:Zd,useActionState:Zd,useOptimistic:function(e,a){var r=Ye();return ge!==null?Gd(r,ge,e,a):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:wf,useCacheRefresh:If};Ar.useEffectEvent=Pd;function gu(e,a,r,c){a=e.memoizedState,r=r(c,a),r=r==null?a:b({},a,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Mr={enqueueSetState:function(e,a,r){e=e._reactInternals;var c=Ln(),p=_i(c);p.payload=a,r!=null&&(p.callback=r),a=Wi(e,p,c),a!==null&&(u(a,e,c),ql(a,e,c))},enqueueReplaceState:function(e,a,r){e=e._reactInternals;var c=Ln(),p=_i(c);p.tag=1,p.payload=a,r!=null&&(p.callback=r),a=Wi(e,p,c),a!==null&&(u(a,e,c),ql(a,e,c))},enqueueForceUpdate:function(e,a){e=e._reactInternals;var r=Ln(),c=_i(r);c.tag=2,a!=null&&(c.callback=a),a=Wi(e,c,r),a!==null&&(u(a,e,r),ql(a,e,r))}};function tm(e,a,r,c,p,x,C){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(c,x,C):a.prototype&&a.prototype.isPureReactComponent?!eu(r,c)||!eu(p,x):!0}function em(e,a,r,c){e=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(r,c),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(r,c),a.state!==e&&Mr.enqueueReplaceState(a,a.state,null)}function xn(e,a){var r=a;if("ref"in a){r={};for(var c in a)c!=="ref"&&(r[c]=a[c])}if(e=e.defaultProps){r===a&&(r=b({},r));for(var p in e)r[p]===void 0&&(r[p]=e[p])}return r}function $f(e){Rl(e)}function nm(e){console.error(e)}function Fo(e){Rl(e)}function Io(e,a){try{var r=e.onUncaughtError;r(a.value,{componentStack:a.stack})}catch(c){setTimeout(function(){throw c})}}function am(e,a,r){try{var c=e.onCaughtError;c(r.value,{componentStack:r.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function th(e,a,r){return r=_i(r),r.tag=3,r.payload={element:null},r.callback=function(){Io(e,a)},r}function vu(e){return e=_i(e),e.tag=3,e}function In(e,a,r,c){var p=r.type.getDerivedStateFromError;if(typeof p=="function"){var x=c.value;e.payload=function(){return p(x)},e.callback=function(){am(a,r,c)}}var C=r.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(e.callback=function(){am(a,r,c),typeof p!="function"&&(Ri===null?Ri=new Set([this]):Ri.add(this));var D=c.stack;this.componentDidCatch(c.value,{componentStack:D!==null?D:""})})}function ga(e,a,r,c,p){if(r.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(a=r.alternate,a!==null&&Ul(a,r,p,!0),r=an.current,r!==null){switch(r.tag){case 31:case 13:return Ha===null?Gt():r.alternate===null&&de===0&&(de=3),r.flags&=-257,r.flags|=65536,r.lanes=p,c===yr?r.flags|=16384:(a=r.updateQueue,a===null?r.updateQueue=new Set([c]):a.add(c),Cp(e,c,p)),!1;case 22:return r.flags|=65536,c===yr?r.flags|=16384:(a=r.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([c])},r.updateQueue=a):(r=a.retryQueue,r===null?a.retryQueue=new Set([c]):r.add(c)),Cp(e,c,p)),!1}throw Error(s(435,r.tag))}return Cp(e,c,p),Gt(),!1}if(Ft)return a=an.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,c!==No&&(e=Error(s(422),{cause:c}),dr(Jn(e,r)))):(c!==No&&(a=Error(s(423),{cause:c}),dr(Jn(a,r))),e=e.current.alternate,e.flags|=65536,p&=-p,e.lanes|=p,c=Jn(c,r),p=th(e.stateNode,c,p),jo(e,p),de!==4&&(de=2)),!1;var x=Error(s(520),{cause:c});if(x=Jn(x,r),ai===null?ai=[x]:ai.push(x),de!==4&&(de=2),a===null)return!0;c=Jn(c,r),r=a;do{switch(r.tag){case 3:return r.flags|=65536,e=p&-p,r.lanes|=e,e=th(r.stateNode,c,e),jo(r,e),!1;case 1:if(a=r.type,x=r.stateNode,(r.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Ri===null||!Ri.has(x))))return r.flags|=65536,p&=-p,r.lanes|=p,p=vu(p),In(p,e,r,c),jo(r,p),!1}r=r.return}while(r!==null);return!1}var $o=Error(s(461)),Re=!1;function we(e,a,r,c){a.child=e===null?Nd(a,null,r,c):_s(a,e.child,r,c)}function Rr(e,a,r,c,p){r=r.render;var x=a.ref;if("ref"in c){var C={};for(var D in c)D!=="ref"&&(C[D]=c[D])}else C=c;return gs(a),c=Of(e,a,r,C,x,p),D=Nf(),e!==null&&!Re?(Uf(e,a,p),ei(e,a,p)):(Ft&&D&&Oo(a),a.flags|=1,we(e,a,c,p),a.child)}function zr(e,a,r,c,p){if(e===null){var x=r.type;return typeof x=="function"&&!Gn(x)&&x.defaultProps===void 0&&r.compare===null?(a.tag=15,a.type=x,va(e,a,x,c,p)):(e=cr(r.type,null,c,a,a.mode,p),e.ref=a.ref,e.return=a,a.child=e)}if(x=e.child,!Xl(e,p)){var C=x.memoizedProps;if(r=r.compare,r=r!==null?r:eu,r(C,c)&&e.ref===a.ref)return ei(e,a,p)}return a.flags|=1,e=pi(x,c),e.ref=a.ref,e.return=a,a.child=e}function va(e,a,r,c,p){if(e!==null){var x=e.memoizedProps;if(eu(x,c)&&e.ref===a.ref)if(Re=!1,a.pendingProps=c=x,Xl(e,p))(e.flags&131072)!==0&&(Re=!0);else return a.lanes=e.lanes,ei(e,a,p)}return xu(e,a,r,c,p)}function xa(e,a,r,c){var p=c.children,x=e!==null?e.memoizedState:null;if(e===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((a.flags&128)!==0){if(x=x!==null?x.baseLanes|r:r,e!==null){for(c=a.child=e.child,p=0;c!==null;)p=p|c.lanes|c.childLanes,c=c.sibling;c=p&~x}else c=0,a.child=null;return Ei(e,a,x,r,c)}if((r&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},e!==null&&hu(a,x!==null?x.cachePool:null),x!==null?Mf(a,x):Rf(),Ud(a);else return c=a.lanes=536870912,Ei(e,a,x!==null?x.baseLanes|r:r,r,c)}else x!==null?(hu(a,x.cachePool),Mf(a,x),Fi(),a.memoizedState=null):(e!==null&&hu(a,null),Rf(),Fi());return we(e,a,p,r),a.child}function $a(e,a){return e!==null&&e.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Ei(e,a,r,c,p){var x=xi();return x=x===null?null:{parent:Mt._currentValue,pool:x},a.memoizedState={baseLanes:r,cachePool:x},e!==null&&hu(a,null),Rf(),Ud(a),e!==null&&Ul(e,a,c,!0),a.childLanes=p,null}function Ga(e,a){return a=_u({mode:a.mode,children:a.children},e.mode),a.ref=e.ref,e.child=a,a.return=e,a}function dn(e,a,r){return _s(a,e.child,null,r),e=Ga(a,a.pendingProps),e.flags|=2,pa(a),a.memoizedState=null,e}function Dr(e,a,r){var c=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,e===null){if(Ft){if(c.mode==="hidden")return e=Ga(a,c),a.lanes=536870912,$a(null,e);if(zf(a),(e=_e)?(e=f0(e,fn),e=e!==null&&e.data==="&"?e:null,e!==null&&(a.memoizedState={dehydrated:e,treeContext:yi!==null?{id:gi,overflow:vi}:null,retryLane:536870912,hydrationErrors:null},r=Ad(e),r.return=a,a.child=r,cn=a,_e=null)):e=null,e===null)throw Pt(a);return a.lanes=536870912,null}return Ga(a,c)}var x=e.memoizedState;if(x!==null){var C=x.dehydrated;if(zf(a),p)if(a.flags&256)a.flags&=-257,a=dn(e,a,r);else if(a.memoizedState!==null)a.child=e.child,a.flags|=128,a=null;else throw Error(s(558));else if(Re||Ul(e,a,r,!1),p=(r&e.childLanes)!==0,Re||p){if(c=he,c!==null&&(C=eo(c,r),C!==0&&C!==x.retryLane))throw x.retryLane=C,Dl(e,C),u(c,e,C),$o;Gt(),a=dn(e,a,r)}else e=x.treeContext,_e=zi(C.nextSibling),cn=a,Ft=!0,Zi=null,fn=!1,e!==null&&hr(a,e),a=Ga(a,c),a.flags|=4096;return a}return e=pi(e.child,{mode:c.mode,children:c.children}),e.ref=a.ref,a.child=e,e.return=a,e}function ti(e,a){var r=a.ref;if(r===null)e!==null&&e.ref!==null&&(a.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(s(284));(e===null||e.ref!==r)&&(a.flags|=4194816)}}function xu(e,a,r,c,p){return gs(a),r=Of(e,a,r,c,void 0,p),c=Nf(),e!==null&&!Re?(Uf(e,a,p),ei(e,a,p)):(Ft&&c&&Oo(a),a.flags|=1,we(e,a,r,p),a.child)}function Rn(e,a,r,c,p,x){return gs(a),a.updateQueue=null,r=wd(a,c,r,p),Bd(e),c=Nf(),e!==null&&!Re?(Uf(e,a,x),ei(e,a,x)):(Ft&&c&&Oo(a),a.flags|=1,we(e,a,r,x),a.child)}function _n(e,a,r,c,p){if(gs(a),a.stateNode===null){var x=Ol,C=r.contextType;typeof C=="object"&&C!==null&&(x=hn(C)),x=new r(c,x),a.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=Mr,a.stateNode=x,x._reactInternals=a,x=a.stateNode,x.props=c,x.state=a.memoizedState,x.refs={},Ef(a),C=r.contextType,x.context=typeof C=="object"&&C!==null?hn(C):Ol,x.state=a.memoizedState,C=r.getDerivedStateFromProps,typeof C=="function"&&(gu(a,r,C,c),x.state=a.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(C=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),C!==x.state&&Mr.enqueueReplaceState(x,x.state,null),Ss(a,c,x,p),xr(),x.state=a.memoizedState),typeof x.componentDidMount=="function"&&(a.flags|=4194308),c=!0}else if(e===null){x=a.stateNode;var D=a.memoizedProps,Y=xn(r,D);x.props=Y;var F=x.context,lt=r.contextType;C=Ol,typeof lt=="object"&<!==null&&(C=hn(lt));var ot=r.getDerivedStateFromProps;lt=typeof ot=="function"||typeof x.getSnapshotBeforeUpdate=="function",D=a.pendingProps!==D,lt||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(D||F!==C)&&em(a,x,c,C),jl=!1;var tt=a.memoizedState;x.state=tt,Ss(a,c,x,p),xr(),F=a.memoizedState,D||tt!==F||jl?(typeof ot=="function"&&(gu(a,r,ot,c),F=a.memoizedState),(Y=jl||tm(a,r,Y,c,tt,F,C))?(lt||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"&&(a.flags|=4194308)):(typeof x.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=c,a.memoizedState=F),x.props=c,x.state=F,x.context=C,c=Y):(typeof x.componentDidMount=="function"&&(a.flags|=4194308),c=!1)}else{x=a.stateNode,Cf(e,a),C=a.memoizedProps,lt=xn(r,C),x.props=lt,ot=a.pendingProps,tt=x.context,F=r.contextType,Y=Ol,typeof F=="object"&&F!==null&&(Y=hn(F)),D=r.getDerivedStateFromProps,(F=typeof D=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(C!==ot||tt!==Y)&&em(a,x,c,Y),jl=!1,tt=a.memoizedState,x.state=tt,Ss(a,c,x,p),xr();var it=a.memoizedState;C!==ot||tt!==it||jl||e!==null&&e.dependencies!==null&&cu(e.dependencies)?(typeof D=="function"&&(gu(a,r,D,c),it=a.memoizedState),(lt=jl||tm(a,r,lt,c,tt,it,Y)||e!==null&&e.dependencies!==null&&cu(e.dependencies))?(F||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(c,it,Y),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(c,it,Y)),typeof x.componentDidUpdate=="function"&&(a.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof x.componentDidUpdate!="function"||C===e.memoizedProps&&tt===e.memoizedState||(a.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&tt===e.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=it),x.props=c,x.state=it,x.context=Y,c=lt):(typeof x.componentDidUpdate!="function"||C===e.memoizedProps&&tt===e.memoizedState||(a.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&tt===e.memoizedState||(a.flags|=1024),c=!1)}return x=c,ti(e,a),c=(a.flags&128)!==0,x||c?(x=a.stateNode,r=c&&typeof r.getDerivedStateFromError!="function"?null:x.render(),a.flags|=1,e!==null&&c?(a.child=_s(a,e.child,null,p),a.child=_s(a,null,r,p)):we(e,a,r,p),a.memoizedState=x.state,e=a.child):e=ei(e,a,p),e}function ae(e,a,r,c){return ys(),a.flags|=256,we(e,a,r,c),a.child}var _a={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ja(e){return{baseLanes:e,cachePool:wo()}}function Or(e,a,r){return e=e!==null?e.childLanes&~r:0,a&&(e|=te),e}function Sa(e,a,r){var c=a.pendingProps,p=!1,x=(a.flags&128)!==0,C;if((C=x)||(C=e!==null&&e.memoizedState===null?!1:(Ue.current&2)!==0),C&&(p=!0,a.flags&=-129),C=(a.flags&32)!==0,a.flags&=-33,e===null){if(Ft){if(p?Yl(a):Fi(),(e=_e)?(e=f0(e,fn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(a.memoizedState={dehydrated:e,treeContext:yi!==null?{id:gi,overflow:vi}:null,retryLane:536870912,hydrationErrors:null},r=Ad(e),r.return=a,a.child=r,cn=a,_e=null)):e=null,e===null)throw Pt(a);return Lp(e)?a.lanes=32:a.lanes=536870912,null}var D=c.children;return c=c.fallback,p?(Fi(),p=a.mode,D=_u({mode:"hidden",children:D},p),c=Vi(c,p,r,null),D.return=a,c.return=a,D.sibling=c,a.child=D,c=a.child,c.memoizedState=ja(r),c.childLanes=Or(e,C,r),a.memoizedState=_a,$a(null,c)):(Yl(a),Ll(a,D))}var Y=e.memoizedState;if(Y!==null&&(D=Y.dehydrated,D!==null)){if(x)a.flags&256?(Yl(a),a.flags&=-257,a=Su(e,a,r)):a.memoizedState!==null?(Fi(),a.child=e.child,a.flags|=128,a=null):(Fi(),D=c.fallback,p=a.mode,c=_u({mode:"visible",children:c.children},p),D=Vi(D,p,r,null),D.flags|=2,c.return=a,D.return=a,c.sibling=D,a.child=c,_s(a,e.child,null,r),c=a.child,c.memoizedState=ja(r),c.childLanes=Or(e,C,r),a.memoizedState=_a,a=$a(null,c));else if(Yl(a),Lp(D)){if(C=D.nextSibling&&D.nextSibling.dataset,C)var F=C.dgst;C=F,c=Error(s(419)),c.stack="",c.digest=C,dr({value:c,source:null,stack:null}),a=Su(e,a,r)}else if(Re||Ul(e,a,r,!1),C=(r&e.childLanes)!==0,Re||C){if(C=he,C!==null&&(c=eo(C,r),c!==0&&c!==Y.retryLane))throw Y.retryLane=c,Dl(e,c),u(C,e,c),$o;Yp(D)||Gt(),a=Su(e,a,r)}else Yp(D)?(a.flags|=192,a.child=e.child,a=null):(e=Y.treeContext,_e=zi(D.nextSibling),cn=a,Ft=!0,Zi=null,fn=!1,e!==null&&hr(a,e),a=Ll(a,c.children),a.flags|=4096);return a}return p?(Fi(),D=c.fallback,p=a.mode,Y=e.child,F=Y.sibling,c=pi(Y,{mode:"hidden",children:c.children}),c.subtreeFlags=Y.subtreeFlags&65011712,F!==null?D=pi(F,D):(D=Vi(D,p,r,null),D.flags|=2),D.return=a,c.return=a,c.sibling=D,a.child=c,$a(null,c),c=a.child,D=e.child.memoizedState,D===null?D=ja(r):(p=D.cachePool,p!==null?(Y=Mt._currentValue,p=p.parent!==Y?{parent:Y,pool:Y}:p):p=wo(),D={baseLanes:D.baseLanes|r,cachePool:p}),c.memoizedState=D,c.childLanes=Or(e,C,r),a.memoizedState=_a,$a(e.child,c)):(Yl(a),r=e.child,e=r.sibling,r=pi(r,{mode:"visible",children:c.children}),r.return=a,r.sibling=null,e!==null&&(C=a.deletions,C===null?(a.deletions=[e],a.flags|=16):C.push(e)),a.child=r,a.memoizedState=null,r)}function Ll(e,a){return a=_u({mode:"visible",children:a},e.mode),a.return=e,e.child=a}function _u(e,a){return e=Hn(22,e,null,a),e.lanes=0,e}function Su(e,a,r){return _s(a,e.child,null,r),e=Ll(a,a.pendingProps.children),e.flags|=2,a.memoizedState=null,e}function Es(e,a,r){e.lanes|=a;var c=e.alternate;c!==null&&(c.lanes|=a),Ji(e.return,a,r)}function Nr(e,a,r,c,p,x){var C=e.memoizedState;C===null?e.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:c,tail:r,tailMode:p,treeForkCount:x}:(C.isBackwards=a,C.rendering=null,C.renderingStartTime=0,C.last=c,C.tail=r,C.tailMode=p,C.treeForkCount=x)}function Ur(e,a,r){var c=a.pendingProps,p=c.revealOrder,x=c.tail;c=c.children;var C=Ue.current,D=(C&2)!==0;if(D?(C=C&1|2,a.flags|=128):C&=1,st(Ue,C),we(e,a,c,r),c=Ft?ou:0,!D&&e!==null&&(e.flags&128)!==0)t:for(e=a.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Es(e,r,a);else if(e.tag===19)Es(e,r,a);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===a)break t;for(;e.sibling===null;){if(e.return===null||e.return===a)break t;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(p){case"forwards":for(r=a.child,p=null;r!==null;)e=r.alternate,e!==null&&qo(e)===null&&(p=r),r=r.sibling;r=p,r===null?(p=a.child,a.child=null):(p=r.sibling,r.sibling=null),Nr(a,!1,p,r,x,c);break;case"backwards":case"unstable_legacy-backwards":for(r=null,p=a.child,a.child=null;p!==null;){if(e=p.alternate,e!==null&&qo(e)===null){a.child=p;break}e=p.sibling,p.sibling=r,r=p,p=e}Nr(a,!0,r,null,x,c);break;case"together":Nr(a,!1,null,null,void 0,c);break;default:a.memoizedState=null}return a.child}function ei(e,a,r){if(e!==null&&(a.dependencies=e.dependencies),Ea|=a.lanes,(r&a.childLanes)===0)if(e!==null){if(Ul(e,a,r,!1),(r&a.childLanes)===0)return null}else return null;if(e!==null&&a.child!==e.child)throw Error(s(153));if(a.child!==null){for(e=a.child,r=pi(e,e.pendingProps),a.child=r,r.return=a;e.sibling!==null;)e=e.sibling,r=r.sibling=pi(e,e.pendingProps),r.return=a;r.sibling=null}return a.child}function Xl(e,a){return(e.lanes&a)!==0?!0:(e=e.dependencies,!!(e!==null&&cu(e)))}function Br(e,a,r){switch(a.tag){case 3:re(a,a.stateNode.containerInfo),ki(a,Mt,e.memoizedState.cache),ys();break;case 27:case 5:ra(a);break;case 4:re(a,a.stateNode.containerInfo);break;case 10:ki(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,zf(a),null;break;case 13:var c=a.memoizedState;if(c!==null)return c.dehydrated!==null?(Yl(a),a.flags|=128,null):(r&a.child.childLanes)!==0?Sa(e,a,r):(Yl(a),e=ei(e,a,r),e!==null?e.sibling:null);Yl(a);break;case 19:var p=(e.flags&128)!==0;if(c=(r&a.childLanes)!==0,c||(Ul(e,a,r,!1),c=(r&a.childLanes)!==0),p){if(c)return Ur(e,a,r);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),st(Ue,Ue.current),c)break;return null;case 22:return a.lanes=0,xa(e,a,r,a.pendingProps);case 24:ki(a,Mt,e.memoizedState.cache)}return ei(e,a,r)}function tc(e,a,r){if(e!==null)if(e.memoizedProps!==a.pendingProps)Re=!0;else{if(!Xl(e,r)&&(a.flags&128)===0)return Re=!1,Br(e,a,r);Re=(e.flags&131072)!==0}else Re=!1,Ft&&(a.flags&1048576)!==0&&df(a,ou,a.index);switch(a.lanes=0,a.tag){case 16:t:{var c=a.pendingProps;if(e=xs(a.elementType),a.type=e,typeof e=="function")Gn(e)?(c=xn(e,c),a.tag=1,a=_n(null,a,e,c,r)):(a.tag=0,a=xu(null,a,e,c,r));else{if(e!=null){var p=e.$$typeof;if(p===G){a.tag=11,a=Rr(null,a,e,c,r);break t}else if(p===K){a.tag=14,a=zr(null,a,e,c,r);break t}}throw a=xt(e)||e,Error(s(306,a,""))}}return a;case 0:return xu(e,a,a.type,a.pendingProps,r);case 1:return c=a.type,p=xn(c,a.pendingProps),_n(e,a,c,p,r);case 3:t:{if(re(a,a.stateNode.containerInfo),e===null)throw Error(s(387));c=a.pendingProps;var x=a.memoizedState;p=x.element,Cf(e,a),Ss(a,c,null,r);var C=a.memoizedState;if(c=C.cache,ki(a,Mt,c),c!==x.cache&&Bo(a,[Mt],r,!0),xr(),c=C.element,x.isDehydrated)if(x={element:c,isDehydrated:!1,cache:C.cache},a.updateQueue.baseState=x,a.memoizedState=x,a.flags&256){a=ae(e,a,c,r);break t}else if(c!==p){p=Jn(Error(s(424)),a),dr(p),a=ae(e,a,c,r);break t}else{switch(e=a.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(_e=zi(e.firstChild),cn=a,Ft=!0,Zi=null,fn=!0,r=Nd(a,null,c,r),a.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(ys(),c===p){a=ei(e,a,r);break t}we(e,a,c,r)}a=a.child}return a;case 26:return ti(e,a),e===null?(r=g0(a.type,null,a.pendingProps,null))?a.memoizedState=r:Ft||(r=a.type,e=a.pendingProps,c=fm(Ot.current).createElement(r),c[Jt]=a,c[bn]=e,Xn(c,r,e),Pe(c),a.stateNode=c):a.memoizedState=g0(a.type,e.memoizedProps,a.pendingProps,e.memoizedState),null;case 27:return ra(a),e===null&&Ft&&(c=a.stateNode=m0(a.type,a.pendingProps,Ot.current),cn=a,fn=!0,p=_e,Ru(a.type)?(Xp=p,_e=zi(c.firstChild)):_e=p),we(e,a,a.pendingProps.children,r),ti(e,a),e===null&&(a.flags|=4194304),a.child;case 5:return e===null&&Ft&&((p=c=_e)&&(c=hS(c,a.type,a.pendingProps,fn),c!==null?(a.stateNode=c,cn=a,_e=zi(c.firstChild),fn=!1,p=!0):p=!1),p||Pt(a)),ra(a),p=a.type,x=a.pendingProps,C=e!==null?e.memoizedProps:null,c=x.children,Gp(p,x)?c=null:C!==null&&Gp(p,C)&&(a.flags|=32),a.memoizedState!==null&&(p=Of(e,a,xp,null,null,r),ch._currentValue=p),ti(e,a),we(e,a,c,r),a.child;case 6:return e===null&&Ft&&((e=r=_e)&&(r=dS(r,a.pendingProps,fn),r!==null?(a.stateNode=r,cn=a,_e=null,e=!0):e=!1),e||Pt(a)),null;case 13:return Sa(e,a,r);case 4:return re(a,a.stateNode.containerInfo),c=a.pendingProps,e===null?a.child=_s(a,null,c,r):we(e,a,c,r),a.child;case 11:return Rr(e,a,a.type,a.pendingProps,r);case 7:return we(e,a,a.pendingProps,r),a.child;case 8:return we(e,a,a.pendingProps.children,r),a.child;case 12:return we(e,a,a.pendingProps.children,r),a.child;case 10:return c=a.pendingProps,ki(a,a.type,c.value),we(e,a,c.children,r),a.child;case 9:return p=a.type._context,c=a.pendingProps.children,gs(a),p=hn(p),c=c(p),a.flags|=1,we(e,a,c,r),a.child;case 14:return zr(e,a,a.type,a.pendingProps,r);case 15:return va(e,a,a.type,a.pendingProps,r);case 19:return Ur(e,a,r);case 31:return Dr(e,a,r);case 22:return xa(e,a,r,a.pendingProps);case 24:return gs(a),c=hn(Mt),e===null?(p=xi(),p===null&&(p=he,x=vf(),p.pooledCache=x,x.refCount++,x!==null&&(p.pooledCacheLanes|=r),p=x),a.memoizedState={parent:c,cache:p},Ef(a),ki(a,Mt,p)):((e.lanes&r)!==0&&(Cf(e,a),Ss(a,null,null,r),xr()),p=e.memoizedState,x=a.memoizedState,p.parent!==c?(p={parent:c,cache:c},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),ki(a,Mt,c)):(c=x.cache,ki(a,Mt,c),c!==p.cache&&Bo(a,[Mt],r,!0))),we(e,a,a.pendingProps.children,r),a.child;case 29:throw a.pendingProps}throw Error(s(156,a.tag))}function $n(e){e.flags|=4}function Vl(e,a,r,c,p){if((a=(e.mode&32)!==0)&&(a=!1),a){if(e.flags|=16777216,(p&335544128)===p)if(e.stateNode.complete)e.flags|=8192;else if(yt())e.flags|=8192;else throw Nt=yr,pr}else e.flags&=-16777217}function tl(e,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!b0(a))if(yt())e.flags|=8192;else throw Nt=yr,pr}function bu(e,a){a!==null&&(e.flags|=4),e.flags&16384&&(a=e.tag!==22?Zs():536870912,e.lanes|=a,Ca|=a)}function wr(e,a){if(!Ft)switch(e.tailMode){case"hidden":a=e.tail;for(var r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var c=null;r!==null;)r.alternate!==null&&(c=r),r=r.sibling;c===null?a||e.tail===null?e.tail=null:e.tail.sibling=null:c.sibling=null}}function ye(e){var a=e.alternate!==null&&e.alternate.child===e.child,r=0,c=0;if(a)for(var p=e.child;p!==null;)r|=p.lanes|p.childLanes,c|=p.subtreeFlags&65011712,c|=p.flags&65011712,p.return=e,p=p.sibling;else for(p=e.child;p!==null;)r|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=e,p=p.sibling;return e.subtreeFlags|=c,e.childLanes=r,a}function eh(e,a,r){var c=a.pendingProps;switch(Nl(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ye(a),null;case 1:return ye(a),null;case 3:return r=a.stateNode,c=null,e!==null&&(c=e.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),wa(Mt),ue(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ps(a)?$n(a):e===null||e.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,mf())),ye(a),null;case 26:var p=a.type,x=a.memoizedState;return e===null?($n(a),x!==null?(ye(a),tl(a,x)):(ye(a),Vl(a,p,null,c,r))):x?x!==e.memoizedState?($n(a),ye(a),tl(a,x)):(ye(a),a.flags&=-16777217):(e=e.memoizedProps,e!==c&&$n(a),ye(a),Vl(a,p,e,c,r)),null;case 27:if(Oa(a),r=Ot.current,p=a.type,e!==null&&a.stateNode!=null)e.memoizedProps!==c&&$n(a);else{if(!c){if(a.stateNode===null)throw Error(s(166));return ye(a),null}e=pt.current,ps(a)?Uo(a):(e=m0(p,c,r),a.stateNode=e,$n(a))}return ye(a),null;case 5:if(Oa(a),p=a.type,e!==null&&a.stateNode!=null)e.memoizedProps!==c&&$n(a);else{if(!c){if(a.stateNode===null)throw Error(s(166));return ye(a),null}if(x=pt.current,ps(a))Uo(a);else{var C=fm(Ot.current);switch(x){case 1:x=C.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:x=C.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":x=C.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":x=C.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":x=C.createElement("div"),x.innerHTML="<script><\/script>",x=x.removeChild(x.firstChild);break;case"select":x=typeof c.is=="string"?C.createElement("select",{is:c.is}):C.createElement("select"),c.multiple?x.multiple=!0:c.size&&(x.size=c.size);break;default:x=typeof c.is=="string"?C.createElement(p,{is:c.is}):C.createElement(p)}}x[Jt]=a,x[bn]=c;t:for(C=a.child;C!==null;){if(C.tag===5||C.tag===6)x.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===a)break t;for(;C.sibling===null;){if(C.return===null||C.return===a)break t;C=C.return}C.sibling.return=C.return,C=C.sibling}a.stateNode=x;t:switch(Xn(x,p,c),p){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break t;case"img":c=!0;break t;default:c=!1}c&&$n(a)}}return ye(a),Vl(a,a.type,e===null?null:e.memoizedProps,a.pendingProps,r),null;case 6:if(e&&a.stateNode!=null)e.memoizedProps!==c&&$n(a);else{if(typeof c!="string"&&a.stateNode===null)throw Error(s(166));if(e=Ot.current,ps(a)){if(e=a.stateNode,r=a.memoizedProps,c=null,p=cn,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}e[Jt]=a,e=!!(e.nodeValue===r||c!==null&&c.suppressHydrationWarning===!0||a0(e.nodeValue,r)),e||Pt(a,!0)}else e=fm(e).createTextNode(c),e[Jt]=a,a.stateNode=e}return ye(a),null;case 31:if(r=a.memoizedState,e===null||e.memoizedState!==null){if(c=ps(a),r!==null){if(e===null){if(!c)throw Error(s(318));if(e=a.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[Jt]=a}else ys(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ye(a),e=!1}else r=mf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return a.flags&256?(pa(a),a):(pa(a),null);if((a.flags&128)!==0)throw Error(s(558))}return ye(a),null;case 13:if(c=a.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(p=ps(a),c!==null&&c.dehydrated!==null){if(e===null){if(!p)throw Error(s(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(s(317));p[Jt]=a}else ys(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ye(a),p=!1}else p=mf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(pa(a),a):(pa(a),null)}return pa(a),(a.flags&128)!==0?(a.lanes=r,a):(r=c!==null,e=e!==null&&e.memoizedState!==null,r&&(c=a.child,p=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(p=c.alternate.memoizedState.cachePool.pool),x=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(x=c.memoizedState.cachePool.pool),x!==p&&(c.flags|=2048)),r!==e&&r&&(a.child.flags|=8192),bu(a,a.updateQueue),ye(a),null);case 4:return ue(),e===null&&Np(a.stateNode.containerInfo),ye(a),null;case 10:return wa(a.type),ye(a),null;case 19:if(I(Ue),c=a.memoizedState,c===null)return ye(a),null;if(p=(a.flags&128)!==0,x=c.rendering,x===null)if(p)wr(c,!1);else{if(de!==0||e!==null&&(e.flags&128)!==0)for(e=a.child;e!==null;){if(x=qo(e),x!==null){for(a.flags|=128,wr(c,!1),e=x.updateQueue,a.updateQueue=e,bu(a,e),a.subtreeFlags=0,e=r,r=a.child;r!==null;)Cn(r,e),r=r.sibling;return st(Ue,Ue.current&1|2),Ft&&Qi(a,c.treeForkCount),a.child}e=e.sibling}c.tail!==null&&Kn()>Aa&&(a.flags|=128,p=!0,wr(c,!1),a.lanes=4194304)}else{if(!p)if(e=qo(x),e!==null){if(a.flags|=128,p=!0,e=e.updateQueue,a.updateQueue=e,bu(a,e),wr(c,!0),c.tail===null&&c.tailMode==="hidden"&&!x.alternate&&!Ft)return ye(a),null}else 2*Kn()-c.renderingStartTime>Aa&&r!==536870912&&(a.flags|=128,p=!0,wr(c,!1),a.lanes=4194304);c.isBackwards?(x.sibling=a.child,a.child=x):(e=c.last,e!==null?e.sibling=x:a.child=x,c.last=x)}return c.tail!==null?(e=c.tail,c.rendering=e,c.tail=e.sibling,c.renderingStartTime=Kn(),e.sibling=null,r=Ue.current,st(Ue,p?r&1|2:r&1),Ft&&Qi(a,c.treeForkCount),e):(ye(a),null);case 22:case 23:return pa(a),Mn(),c=a.memoizedState!==null,e!==null?e.memoizedState!==null!==c&&(a.flags|=8192):c&&(a.flags|=8192),c?(r&536870912)!==0&&(a.flags&128)===0&&(ye(a),a.subtreeFlags&6&&(a.flags|=8192)):ye(a),r=a.updateQueue,r!==null&&bu(a,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==r&&(a.flags|=2048),e!==null&&I(Bl),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),a.memoizedState.cache!==r&&(a.flags|=2048),wa(Mt),ye(a),null;case 25:return null;case 30:return null}throw Error(s(156,a.tag))}function ec(e,a){switch(Nl(a),a.tag){case 1:return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 3:return wa(Mt),ue(),e=a.flags,(e&65536)!==0&&(e&128)===0?(a.flags=e&-65537|128,a):null;case 26:case 27:case 5:return Oa(a),null;case 31:if(a.memoizedState!==null){if(pa(a),a.alternate===null)throw Error(s(340));ys()}return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 13:if(pa(a),e=a.memoizedState,e!==null&&e.dehydrated!==null){if(a.alternate===null)throw Error(s(340));ys()}return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 19:return I(Ue),null;case 4:return ue(),null;case 10:return wa(a.type),null;case 22:case 23:return pa(a),Mn(),e!==null&&I(Bl),e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 24:return wa(Mt),null;case 25:return null;default:return null}}function Cs(e,a){switch(Nl(a),a.tag){case 3:wa(Mt),ue();break;case 26:case 27:case 5:Oa(a);break;case 4:ue();break;case 31:a.memoizedState!==null&&pa(a);break;case 13:pa(a);break;case 19:I(Ue);break;case 10:wa(a.type);break;case 22:case 23:pa(a),Mn(),e!==null&&I(Bl);break;case 24:wa(Mt)}}function Ci(e,a){try{var r=a.updateQueue,c=r!==null?r.lastEffect:null;if(c!==null){var p=c.next;r=p;do{if((r.tag&e)===e){c=void 0;var x=r.create,C=r.inst;c=x(),C.destroy=c}r=r.next}while(r!==p)}}catch(D){xe(a,a.return,D)}}function qa(e,a,r){try{var c=a.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var x=p.next;c=x;do{if((c.tag&e)===e){var C=c.inst,D=C.destroy;if(D!==void 0){C.destroy=void 0,p=a;var Y=r,F=D;try{F()}catch(lt){xe(p,Y,lt)}}}c=c.next}while(c!==x)}}catch(lt){xe(a,a.return,lt)}}function Ql(e){var a=e.updateQueue;if(a!==null){var r=e.stateNode;try{gn(a,r)}catch(c){xe(e,e.return,c)}}}function nh(e,a,r){r.props=xn(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(c){xe(e,a,c)}}function Ai(e,a){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var c=e.stateNode;break;case 30:c=e.stateNode;break;default:c=e.stateNode}typeof r=="function"?e.refCleanup=r(c):r.current=c}}catch(p){xe(e,a,p)}}function ba(e,a){var r=e.ref,c=e.refCleanup;if(r!==null)if(typeof c=="function")try{c()}catch(p){xe(e,a,p)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(p){xe(e,a,p)}else r.current=null}function Ta(e){var a=e.type,r=e.memoizedProps,c=e.stateNode;try{t:switch(a){case"button":case"input":case"select":case"textarea":r.autoFocus&&c.focus();break t;case"img":r.src?c.src=r.src:r.srcSet&&(c.srcset=r.srcSet)}}catch(p){xe(e,e.return,p)}}function Ya(e,a,r){try{var c=e.stateNode;sS(c,e.type,r,a),c[bn]=a}catch(p){xe(e,e.return,p)}}function Fe(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ru(e.type)||e.tag===4}function Mi(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||Fe(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&&Ru(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 Xt(e,a,r){var c=e.tag;if(c===5||c===6)e=e.stateNode,a?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,a):(a=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,a.appendChild(e),r=r._reactRootContainer,r!=null||a.onclick!==null||(a.onclick=hi));else if(c!==4&&(c===27&&Ru(e.type)&&(r=e.stateNode,a=null),e=e.child,e!==null))for(Xt(e,a,r),e=e.sibling;e!==null;)Xt(e,a,r),e=e.sibling}function oe(e,a,r){var c=e.tag;if(c===5||c===6)e=e.stateNode,a?r.insertBefore(e,a):r.appendChild(e);else if(c!==4&&(c===27&&Ru(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(oe(e,a,r),e=e.sibling;e!==null;)oe(e,a,r),e=e.sibling}function Le(e){var a=e.stateNode,r=e.memoizedProps;try{for(var c=e.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);Xn(a,c,r),a[Jt]=e,a[bn]=r}catch(x){xe(e,e.return,x)}}var La=!1,ze=!1,el=!1,Hr=typeof WeakSet=="function"?WeakSet:Set,He=null;function Tu(e,a){if(e=e.containerInfo,wp=vm,e=To(e),nu(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else t:{r=(r=e.ownerDocument)&&r.defaultView||window;var c=r.getSelection&&r.getSelection();if(c&&c.rangeCount!==0){r=c.anchorNode;var p=c.anchorOffset,x=c.focusNode;c=c.focusOffset;try{r.nodeType,x.nodeType}catch{r=null;break t}var C=0,D=-1,Y=-1,F=0,lt=0,ot=e,tt=null;e:for(;;){for(var it;ot!==r||p!==0&&ot.nodeType!==3||(D=C+p),ot!==x||c!==0&&ot.nodeType!==3||(Y=C+c),ot.nodeType===3&&(C+=ot.nodeValue.length),(it=ot.firstChild)!==null;)tt=ot,ot=it;for(;;){if(ot===e)break e;if(tt===r&&++F===p&&(D=C),tt===x&&++lt===c&&(Y=C),(it=ot.nextSibling)!==null)break;ot=tt,tt=ot.parentNode}ot=it}r=D===-1||Y===-1?null:{start:D,end:Y}}else r=null}r=r||{start:0,end:0}}else r=null;for(Hp={focusedElem:e,selectionRange:r},vm=!1,He=a;He!==null;)if(a=He,e=a.child,(a.subtreeFlags&1028)!==0&&e!==null)e.return=a,He=e;else for(;He!==null;){switch(a=He,x=a.alternate,e=a.flags,a.tag){case 0:if((e&4)!==0&&(e=a.updateQueue,e=e!==null?e.events:null,e!==null))for(r=0;r<e.length;r++)p=e[r],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&x!==null){e=void 0,r=a,p=x.memoizedProps,x=x.memoizedState,c=r.stateNode;try{var Et=xn(r.type,p);e=c.getSnapshotBeforeUpdate(Et,x),c.__reactInternalSnapshotBeforeUpdate=e}catch(Bt){xe(r,r.return,Bt)}}break;case 3:if((e&1024)!==0){if(e=a.stateNode.containerInfo,r=e.nodeType,r===9)qp(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":qp(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(s(163))}if(e=a.sibling,e!==null){e.return=a.return,He=e;break}He=a.return}}function im(e,a,r){var c=r.flags;switch(r.tag){case 0:case 11:case 15:nl(e,r),c&4&&Ci(5,r);break;case 1:if(nl(e,r),c&4)if(e=r.stateNode,a===null)try{e.componentDidMount()}catch(C){xe(r,r.return,C)}else{var p=xn(r.type,a.memoizedProps);a=a.memoizedState;try{e.componentDidUpdate(p,a,e.__reactInternalSnapshotBeforeUpdate)}catch(C){xe(r,r.return,C)}}c&64&&Ql(r),c&512&&Ai(r,r.return);break;case 3:if(nl(e,r),c&64&&(e=r.updateQueue,e!==null)){if(a=null,r.child!==null)switch(r.child.tag){case 27:case 5:a=r.child.stateNode;break;case 1:a=r.child.stateNode}try{gn(e,a)}catch(C){xe(r,r.return,C)}}break;case 27:a===null&&c&4&&Le(r);case 26:case 5:nl(e,r),a===null&&c&4&&Ta(r),c&512&&Ai(r,r.return);break;case 12:nl(e,r);break;case 31:nl(e,r),c&4&&ac(e,r);break;case 13:nl(e,r),c&4&&ah(e,r),c&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=J_.bind(null,r),mS(e,r))));break;case 22:if(c=r.memoizedState!==null||La,!c){a=a!==null&&a.memoizedState!==null||ze,p=La;var x=ze;La=c,(ze=a)&&!x?fe(e,r,(r.subtreeFlags&8772)!==0):nl(e,r),La=p,ze=x}break;case 30:break;default:nl(e,r)}}function nc(e){var a=e.alternate;a!==null&&(e.alternate=null,nc(a)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(a=e.stateNode,a!==null&&Qu(a)),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 ie=null,Ie=!1;function zn(e,a,r){for(r=r.child;r!==null;)Zl(e,a,r),r=r.sibling}function Zl(e,a,r){if(Je&&typeof Je.onCommitFiberUnmount=="function")try{Je.onCommitFiberUnmount(Ua,r)}catch{}switch(r.tag){case 26:ze||ba(r,a),zn(e,a,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:ze||ba(r,a);var c=ie,p=Ie;Ru(r.type)&&(ie=r.stateNode,Ie=!1),zn(e,a,r),uh(r.stateNode),ie=c,Ie=p;break;case 5:ze||ba(r,a);case 6:if(c=ie,p=Ie,ie=null,zn(e,a,r),ie=c,Ie=p,ie!==null)if(Ie)try{(ie.nodeType===9?ie.body:ie.nodeName==="HTML"?ie.ownerDocument.body:ie).removeChild(r.stateNode)}catch(x){xe(r,a,x)}else try{ie.removeChild(r.stateNode)}catch(x){xe(r,a,x)}break;case 18:ie!==null&&(Ie?(e=ie,o0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),mc(e)):o0(ie,r.stateNode));break;case 4:c=ie,p=Ie,ie=r.stateNode.containerInfo,Ie=!0,zn(e,a,r),ie=c,Ie=p;break;case 0:case 11:case 14:case 15:qa(2,r,a),ze||qa(4,r,a),zn(e,a,r);break;case 1:ze||(ba(r,a),c=r.stateNode,typeof c.componentWillUnmount=="function"&&nh(r,a,c)),zn(e,a,r);break;case 21:zn(e,a,r);break;case 22:ze=(c=ze)||r.memoizedState!==null,zn(e,a,r),ze=c;break;default:zn(e,a,r)}}function ac(e,a){if(a.memoizedState===null&&(e=a.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{mc(e)}catch(r){xe(a,a.return,r)}}}function ah(e,a){if(a.memoizedState===null&&(e=a.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{mc(e)}catch(r){xe(a,a.return,r)}}function lm(e){switch(e.tag){case 31:case 13:case 19:var a=e.stateNode;return a===null&&(a=e.stateNode=new Hr),a;case 22:return e=e.stateNode,a=e._retryCache,a===null&&(a=e._retryCache=new Hr),a;default:throw Error(s(435,e.tag))}}function Xe(e,a){var r=lm(e);a.forEach(function(c){if(!r.has(c)){r.add(c);var p=P_.bind(null,e,c);c.then(p,p)}})}function Dn(e,a){var r=a.deletions;if(r!==null)for(var c=0;c<r.length;c++){var p=r[c],x=e,C=a,D=C;t:for(;D!==null;){switch(D.tag){case 27:if(Ru(D.type)){ie=D.stateNode,Ie=!1;break t}break;case 5:ie=D.stateNode,Ie=!1;break t;case 3:case 4:ie=D.stateNode.containerInfo,Ie=!0;break t}D=D.return}if(ie===null)throw Error(s(160));Zl(x,C,p),ie=null,Ie=!1,x=p.alternate,x!==null&&(x.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)Kl(a,e),a=a.sibling}var ta=null;function Kl(e,a){var r=e.alternate,c=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Dn(a,e),Ge(e),c&4&&(qa(3,e,e.return),Ci(3,e),qa(5,e,e.return));break;case 1:Dn(a,e),Ge(e),c&512&&(ze||r===null||ba(r,r.return)),c&64&&La&&(e=e.updateQueue,e!==null&&(c=e.callbacks,c!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?c:r.concat(c))));break;case 26:var p=ta;if(Dn(a,e),Ge(e),c&512&&(ze||r===null||ba(r,r.return)),c&4){var x=r!==null?r.memoizedState:null;if(c=e.memoizedState,r===null)if(c===null)if(e.stateNode===null){t:{c=e.type,r=e.memoizedProps,p=p.ownerDocument||p;e:switch(c){case"title":x=p.getElementsByTagName("title")[0],(!x||x[as]||x[Jt]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=p.createElement(c),p.head.insertBefore(x,p.querySelector("head > title"))),Xn(x,c,r),x[Jt]=e,Pe(x),c=x;break t;case"link":var C=_0("link","href",p).get(c+(r.href||""));if(C){for(var D=0;D<C.length;D++)if(x=C[D],x.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&x.getAttribute("rel")===(r.rel==null?null:r.rel)&&x.getAttribute("title")===(r.title==null?null:r.title)&&x.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){C.splice(D,1);break e}}x=p.createElement(c),Xn(x,c,r),p.head.appendChild(x);break;case"meta":if(C=_0("meta","content",p).get(c+(r.content||""))){for(D=0;D<C.length;D++)if(x=C[D],x.getAttribute("content")===(r.content==null?null:""+r.content)&&x.getAttribute("name")===(r.name==null?null:r.name)&&x.getAttribute("property")===(r.property==null?null:r.property)&&x.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&x.getAttribute("charset")===(r.charSet==null?null:r.charSet)){C.splice(D,1);break e}}x=p.createElement(c),Xn(x,c,r),p.head.appendChild(x);break;default:throw Error(s(468,c))}x[Jt]=e,Pe(x),c=x}e.stateNode=c}else S0(p,e.type,e.stateNode);else e.stateNode=x0(p,c,e.memoizedProps);else x!==c?(x===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):x.count--,c===null?S0(p,e.type,e.stateNode):x0(p,c,e.memoizedProps)):c===null&&e.stateNode!==null&&Ya(e,e.memoizedProps,r.memoizedProps)}break;case 27:Dn(a,e),Ge(e),c&512&&(ze||r===null||ba(r,r.return)),r!==null&&c&4&&Ya(e,e.memoizedProps,r.memoizedProps);break;case 5:if(Dn(a,e),Ge(e),c&512&&(ze||r===null||ba(r,r.return)),e.flags&32){p=e.stateNode;try{ls(p,"")}catch(Et){xe(e,e.return,Et)}}c&4&&e.stateNode!=null&&(p=e.memoizedProps,Ya(e,p,r!==null?r.memoizedProps:p)),c&1024&&(el=!0);break;case 6:if(Dn(a,e),Ge(e),c&4){if(e.stateNode===null)throw Error(s(162));c=e.memoizedProps,r=e.stateNode;try{r.nodeValue=c}catch(Et){xe(e,e.return,Et)}}break;case 3:if(mm=null,p=ta,ta=hm(a.containerInfo),Dn(a,e),ta=p,Ge(e),c&4&&r!==null&&r.memoizedState.isDehydrated)try{mc(a.containerInfo)}catch(Et){xe(e,e.return,Et)}el&&(el=!1,sm(e));break;case 4:c=ta,ta=hm(e.stateNode.containerInfo),Dn(a,e),Ge(e),ta=c;break;case 12:Dn(a,e),Ge(e);break;case 31:Dn(a,e),Ge(e),c&4&&(c=e.updateQueue,c!==null&&(e.updateQueue=null,Xe(e,c)));break;case 13:Dn(a,e),Ge(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(ll=Kn()),c&4&&(c=e.updateQueue,c!==null&&(e.updateQueue=null,Xe(e,c)));break;case 22:p=e.memoizedState!==null;var Y=r!==null&&r.memoizedState!==null,F=La,lt=ze;if(La=F||p,ze=lt||Y,Dn(a,e),ze=lt,La=F,Ge(e),c&8192)t:for(a=e.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(r===null||Y||La||ze||As(e)),r=null,a=e;;){if(a.tag===5||a.tag===26){if(r===null){Y=r=a;try{if(x=Y.stateNode,p)C=x.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{D=Y.stateNode;var ot=Y.memoizedProps.style,tt=ot!=null&&ot.hasOwnProperty("display")?ot.display:null;D.style.display=tt==null||typeof tt=="boolean"?"":(""+tt).trim()}}catch(Et){xe(Y,Y.return,Et)}}}else if(a.tag===6){if(r===null){Y=a;try{Y.stateNode.nodeValue=p?"":Y.memoizedProps}catch(Et){xe(Y,Y.return,Et)}}}else if(a.tag===18){if(r===null){Y=a;try{var it=Y.stateNode;p?c0(it,!0):c0(Y.stateNode,!1)}catch(Et){xe(Y,Y.return,Et)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===e)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break t;for(;a.sibling===null;){if(a.return===null||a.return===e)break t;r===a&&(r=null),a=a.return}r===a&&(r=null),a.sibling.return=a.return,a=a.sibling}c&4&&(c=e.updateQueue,c!==null&&(r=c.retryQueue,r!==null&&(c.retryQueue=null,Xe(e,r))));break;case 19:Dn(a,e),Ge(e),c&4&&(c=e.updateQueue,c!==null&&(e.updateQueue=null,Xe(e,c)));break;case 30:break;case 21:break;default:Dn(a,e),Ge(e)}}function Ge(e){var a=e.flags;if(a&2){try{for(var r,c=e.return;c!==null;){if(Fe(c)){r=c;break}c=c.return}if(r==null)throw Error(s(160));switch(r.tag){case 27:var p=r.stateNode,x=Mi(e);oe(e,x,p);break;case 5:var C=r.stateNode;r.flags&32&&(ls(C,""),r.flags&=-33);var D=Mi(e);oe(e,D,C);break;case 3:case 4:var Y=r.stateNode.containerInfo,F=Mi(e);Xt(e,F,Y);break;default:throw Error(s(161))}}catch(lt){xe(e,e.return,lt)}e.flags&=-3}a&4096&&(e.flags&=-4097)}function sm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var a=e;sm(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),e=e.sibling}}function nl(e,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)im(e,a.alternate,a),a=a.sibling}function As(e){for(e=e.child;e!==null;){var a=e;switch(a.tag){case 0:case 11:case 14:case 15:qa(4,a,a.return),As(a);break;case 1:ba(a,a.return);var r=a.stateNode;typeof r.componentWillUnmount=="function"&&nh(a,a.return,r),As(a);break;case 27:uh(a.stateNode);case 26:case 5:ba(a,a.return),As(a);break;case 22:a.memoizedState===null&&As(a);break;case 30:As(a);break;default:As(a)}e=e.sibling}}function fe(e,a,r){for(r=r&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var c=a.alternate,p=e,x=a,C=x.flags;switch(x.tag){case 0:case 11:case 15:fe(p,x,r),Ci(4,x);break;case 1:if(fe(p,x,r),c=x,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(F){xe(c,c.return,F)}if(c=x,p=c.updateQueue,p!==null){var D=c.stateNode;try{var Y=p.shared.hiddenCallbacks;if(Y!==null)for(p.shared.hiddenCallbacks=null,p=0;p<Y.length;p++)Si(Y[p],D)}catch(F){xe(c,c.return,F)}}r&&C&64&&Ql(x),Ai(x,x.return);break;case 27:Le(x);case 26:case 5:fe(p,x,r),r&&c===null&&C&4&&Ta(x),Ai(x,x.return);break;case 12:fe(p,x,r);break;case 31:fe(p,x,r),r&&C&4&&ac(p,x);break;case 13:fe(p,x,r),r&&C&4&&ah(p,x);break;case 22:x.memoizedState===null&&fe(p,x,r),Ai(x,x.return);break;case 30:break;default:fe(p,x,r)}a=a.sibling}}function ic(e,a){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(e=a.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&yn(r))}function al(e,a){e=null,a.alternate!==null&&(e=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==e&&(a.refCount++,e!=null&&yn(e))}function ln(e,a,r,c){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Oe(e,a,r,c),a=a.sibling}function Oe(e,a,r,c){var p=a.flags;switch(a.tag){case 0:case 11:case 15:ln(e,a,r,c),p&2048&&Ci(9,a);break;case 1:ln(e,a,r,c);break;case 3:ln(e,a,r,c),p&2048&&(e=null,a.alternate!==null&&(e=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==e&&(a.refCount++,e!=null&&yn(e)));break;case 12:if(p&2048){ln(e,a,r,c),e=a.stateNode;try{var x=a.memoizedProps,C=x.id,D=x.onPostCommit;typeof D=="function"&&D(C,a.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(Y){xe(a,a.return,Y)}}else ln(e,a,r,c);break;case 31:ln(e,a,r,c);break;case 13:ln(e,a,r,c);break;case 23:break;case 22:x=a.stateNode,C=a.alternate,a.memoizedState!==null?x._visibility&2?ln(e,a,r,c):Eu(e,a):x._visibility&2?ln(e,a,r,c):(x._visibility|=2,kl(e,a,r,c,(a.subtreeFlags&10256)!==0||!1)),p&2048&&ic(C,a);break;case 24:ln(e,a,r,c),p&2048&&al(a.alternate,a);break;default:ln(e,a,r,c)}}function kl(e,a,r,c,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var x=e,C=a,D=r,Y=c,F=C.flags;switch(C.tag){case 0:case 11:case 15:kl(x,C,D,Y,p),Ci(8,C);break;case 23:break;case 22:var lt=C.stateNode;C.memoizedState!==null?lt._visibility&2?kl(x,C,D,Y,p):Eu(x,C):(lt._visibility|=2,kl(x,C,D,Y,p)),p&&F&2048&&ic(C.alternate,C);break;case 24:kl(x,C,D,Y,p),p&&F&2048&&al(C.alternate,C);break;default:kl(x,C,D,Y,p)}a=a.sibling}}function Eu(e,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var r=e,c=a,p=c.flags;switch(c.tag){case 22:Eu(r,c),p&2048&&ic(c.alternate,c);break;case 24:Eu(r,c),p&2048&&al(c.alternate,c);break;default:Eu(r,c)}a=a.sibling}}var je=8192;function Ms(e,a,r){if(e.subtreeFlags&je)for(e=e.child;e!==null;)Ve(e,a,r),e=e.sibling}function Ve(e,a,r){switch(e.tag){case 26:Ms(e,a,r),e.flags&je&&e.memoizedState!==null&&AS(r,ta,e.memoizedState,e.memoizedProps);break;case 5:Ms(e,a,r);break;case 3:case 4:var c=ta;ta=hm(e.stateNode.containerInfo),Ms(e,a,r),ta=c;break;case 22:e.memoizedState===null&&(c=e.alternate,c!==null&&c.memoizedState!==null?(c=je,je=16777216,Ms(e,a,r),je=c):Ms(e,a,r));break;default:Ms(e,a,r)}}function ea(e){var a=e.alternate;if(a!==null&&(e=a.child,e!==null)){a.child=null;do a=e.sibling,e.sibling=null,e=a;while(e!==null)}}function Yn(e){var a=e.deletions;if((e.flags&16)!==0){if(a!==null)for(var r=0;r<a.length;r++){var c=a[r];He=c,Gr(c,e)}ea(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rs(e),e=e.sibling}function Rs(e){switch(e.tag){case 0:case 11:case 15:Yn(e),e.flags&2048&&qa(9,e,e.return);break;case 3:Yn(e);break;case 12:Yn(e);break;case 22:var a=e.stateNode;e.memoizedState!==null&&a._visibility&2&&(e.return===null||e.return.tag!==13)?(a._visibility&=-3,lc(e)):Yn(e);break;default:Yn(e)}}function lc(e){var a=e.deletions;if((e.flags&16)!==0){if(a!==null)for(var r=0;r<a.length;r++){var c=a[r];He=c,Gr(c,e)}ea(e)}for(e=e.child;e!==null;){switch(a=e,a.tag){case 0:case 11:case 15:qa(8,a,a.return),lc(a);break;case 22:r=a.stateNode,r._visibility&2&&(r._visibility&=-3,lc(a));break;default:lc(a)}e=e.sibling}}function Gr(e,a){for(;He!==null;){var r=He;switch(r.tag){case 0:case 11:case 15:qa(8,r,a);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var c=r.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:yn(r.memoizedState.cache)}if(c=r.child,c!==null)c.return=r,He=c;else t:for(r=e;He!==null;){c=He;var p=c.sibling,x=c.return;if(nc(c),c===r){He=null;break t}if(p!==null){p.return=x,He=p;break t}He=x}}}var sc={getCacheForType:function(e){var a=hn(Mt),r=a.data.get(e);return r===void 0&&(r=e(),a.data.set(e,r)),r},cacheSignal:function(){return hn(Mt).controller.signal}},uc=typeof WeakMap=="function"?WeakMap:Map,$t=0,he=null,Vt=null,Wt=0,Rt=0,Kt=null,Yt=!1,Qt=!1,ve=!1,Qe=0,de=0,Ea=0,il=0,ni=0,te=0,Ca=0,ai=null,On=null,na=!1,ll=0,Cu=0,Aa=1/0,Au=null,Ri=null,Ne=0,ii=null,Ma=null,Xa=0,sl=0,zs=null,rc=null,Ds=0,Os=null;function Ln(){return($t&2)!==0&&Wt!==0?Wt&-Wt:w.T!==null?Rp():Hi()}function l(){if(te===0)if((Wt&536870912)===0||Ft){var e=ns;ns<<=1,(ns&3932160)===0&&(ns=262144),te=e}else te=536870912;return e=an.current,e!==null&&(e.flags|=32),te}function u(e,a,r){(e===he&&(Rt===2||Rt===9)||e.cancelPendingCommit!==null)&&(P(e,0),T(e,Wt,te,!1)),ks(e,r),(($t&2)===0||e!==he)&&(e===he&&(($t&2)===0&&(il|=r),de===4&&T(e,Wt,te,!1)),Jl(e))}function h(e,a,r){if(($t&6)!==0)throw Error(s(327));var c=!r&&(a&127)===0&&(a&e.expiredLanes)===0||Qs(e,a),p=c?Ns(e,a):aa(e,a,!0),x=c;do{if(p===0){Qt&&!c&&T(e,a,0,!1);break}else{if(r=e.current.alternate,x&&!_(r)){p=aa(e,a,!1),x=!1;continue}if(p===2){if(x=a,e.errorRecoveryDisabledLanes&x)var C=0;else C=e.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){a=C;t:{var D=e;p=ai;var Y=D.current.memoizedState.isDehydrated;if(Y&&(P(D,C).flags|=256),C=aa(D,C,!1),C!==2){if(ve&&!Y){D.errorRecoveryDisabledLanes|=x,il|=x,p=4;break t}x=On,On=p,x!==null&&(On===null?On=x:On.push.apply(On,x))}p=C}if(x=!1,p!==2)continue}}if(p===1){P(e,0),T(e,a,0,!0);break}t:{switch(c=e,x=p,x){case 0:case 1:throw Error(s(345));case 4:if((a&4194048)!==a)break;case 6:T(c,a,te,!Yt);break t;case 2:On=null;break;case 3:case 5:break;default:throw Error(s(329))}if((a&62914560)===a&&(p=ll+300-Kn(),10<p)){if(T(c,a,te,!Yt),Vu(c,0,!0)!==0)break t;Xa=a,c.timeoutHandle=u0(y.bind(null,c,r,On,Au,na,a,te,il,Ca,Yt,x,"Throttled",-0,0),p);break t}y(c,r,On,Au,na,a,te,il,Ca,Yt,x,null,-0,0)}}break}while(!0);Jl(e)}function y(e,a,r,c,p,x,C,D,Y,F,lt,ot,tt,it){if(e.timeoutHandle=-1,ot=a.subtreeFlags,ot&8192||(ot&16785408)===16785408){ot={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:hi},Ve(a,x,ot);var Et=(x&62914560)===x?ll-Kn():(x&4194048)===x?Cu-Kn():0;if(Et=MS(ot,Et),Et!==null){Xa=x,e.cancelPendingCommit=Et(Ht.bind(null,e,a,x,r,c,p,C,D,Y,lt,ot,null,tt,it)),T(e,x,C,!F);return}}Ht(e,a,x,r,c,p,C,D,Y)}function _(e){for(var a=e;;){var r=a.tag;if((r===0||r===11||r===15)&&a.flags&16384&&(r=a.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var c=0;c<r.length;c++){var p=r[c],x=p.getSnapshot;p=p.value;try{if(!Me(x(),p))return!1}catch{return!1}}if(r=a.child,a.subtreeFlags&16384&&r!==null)r.return=a,a=r;else{if(a===e)break;for(;a.sibling===null;){if(a.return===null||a.return===e)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function T(e,a,r,c){a&=~ni,a&=~il,e.suspendedLanes|=a,e.pingedLanes&=~a,c&&(e.warmLanes|=a),c=e.expirationTimes;for(var p=a;0<p;){var x=31-Bn(p),C=1<<x;c[x]=-1,p&=~C}r!==0&&Gc(e,r,a)}function N(){return($t&6)===0?(ih(0),!1):!0}function q(){if(Vt!==null){if(Rt===0)var e=Vt.return;else e=Vt,An=Ki=null,Bf(e),Hl=null,Gl=0,e=Vt;for(;e!==null;)Cs(e.alternate,e),e=e.return;Vt=null}}function P(e,a){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,oS(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Xa=0,q(),he=e,Vt=r=pi(e.current,null),Wt=a,Rt=0,Kt=null,Yt=!1,Qt=Qs(e,a),ve=!1,Ca=te=ni=il=Ea=de=0,On=ai=null,na=!1,(a&8)!==0&&(a|=a&32);var c=e.entangledLanes;if(c!==0)for(e=e.entanglements,c&=a;0<c;){var p=31-Bn(c),x=1<<p;a|=e[p],c&=~x}return Qe=a,zl(),r}function ut(e,a){wt=null,w.H=Cr,a===wl||a===Ia?(a=Ho(),Rt=3):a===pr?(a=Ho(),Rt=4):Rt=a===$o?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Kt=a,Vt===null&&(de=1,Io(e,Jn(a,e.current)))}function yt(){var e=an.current;return e===null?!0:(Wt&4194048)===Wt?Ha===null:(Wt&62914560)===Wt||(Wt&536870912)!==0?e===Ha:!1}function St(){var e=w.H;return w.H=Cr,e===null?Cr:e}function bt(){var e=w.A;return w.A=sc,e}function Gt(){de=4,Yt||(Wt&4194048)!==Wt&&an.current!==null||(Qt=!0),(Ea&134217727)===0&&(il&134217727)===0||he===null||T(he,Wt,te,!1)}function aa(e,a,r){var c=$t;$t|=2;var p=St(),x=bt();(he!==e||Wt!==a)&&(Au=null,P(e,a)),a=!1;var C=de;t:do try{if(Rt!==0&&Vt!==null){var D=Vt,Y=Kt;switch(Rt){case 8:q(),C=6;break t;case 3:case 2:case 9:case 6:an.current===null&&(a=!0);var F=Rt;if(Rt=0,Kt=null,mt(e,D,Y,F),r&&Qt){C=0;break t}break;default:F=Rt,Rt=0,Kt=null,mt(e,D,Y,F)}}jr(),C=de;break}catch(lt){ut(e,lt)}while(!0);return a&&e.shellSuspendCounter++,An=Ki=null,$t=c,w.H=p,w.A=x,Vt===null&&(he=null,Wt=0,zl()),C}function jr(){for(;Vt!==null;)k(Vt)}function Ns(e,a){var r=$t;$t|=2;var c=St(),p=bt();he!==e||Wt!==a?(Au=null,Aa=Kn()+500,P(e,a)):Qt=Qs(e,a);t:do try{if(Rt!==0&&Vt!==null){a=Vt;var x=Kt;e:switch(Rt){case 1:Rt=0,Kt=null,mt(e,a,x,1);break;case 2:case 9:if(Od(x)){Rt=0,Kt=null,nt(a);break}a=function(){Rt!==2&&Rt!==9||he!==e||(Rt=7),Jl(e)},x.then(a,a);break t;case 3:Rt=7;break t;case 4:Rt=5;break t;case 7:Od(x)?(Rt=0,Kt=null,nt(a)):(Rt=0,Kt=null,mt(e,a,x,7));break;case 5:var C=null;switch(Vt.tag){case 26:C=Vt.memoizedState;case 5:case 27:var D=Vt;if(C?b0(C):D.stateNode.complete){Rt=0,Kt=null;var Y=D.sibling;if(Y!==null)Vt=Y;else{var F=D.return;F!==null?(Vt=F,At(F)):Vt=null}break e}}Rt=0,Kt=null,mt(e,a,x,5);break;case 6:Rt=0,Kt=null,mt(e,a,x,6);break;case 8:q(),de=6;break t;default:throw Error(s(462))}}$();break}catch(lt){ut(e,lt)}while(!0);return An=Ki=null,w.H=c,w.A=p,$t=r,Vt!==null?0:(he=null,Wt=0,zl(),de)}function $(){for(;Vt!==null&&!pp();)k(Vt)}function k(e){var a=tc(e.alternate,e,Qe);e.memoizedProps=e.pendingProps,a===null?At(e):Vt=a}function nt(e){var a=e,r=a.alternate;switch(a.tag){case 15:case 0:a=Rn(r,a,a.pendingProps,a.type,void 0,Wt);break;case 11:a=Rn(r,a,a.pendingProps,a.type.render,a.ref,Wt);break;case 5:Bf(a);default:Cs(r,a),a=Vt=Cn(a,Qe),a=tc(r,a,Qe)}e.memoizedProps=e.pendingProps,a===null?At(e):Vt=a}function mt(e,a,r,c){An=Ki=null,Bf(a),Hl=null,Gl=0;var p=a.return;try{if(ga(e,p,a,r,Wt)){de=1,Io(e,Jn(r,e.current)),Vt=null;return}}catch(x){if(p!==null)throw Vt=p,x;de=1,Io(e,Jn(r,e.current)),Vt=null;return}a.flags&32768?(Ft||c===1?e=!0:Qt||(Wt&536870912)!==0?e=!1:(Yt=e=!0,(c===2||c===9||c===3||c===6)&&(c=an.current,c!==null&&c.tag===13&&(c.flags|=16384))),Se(a,e)):At(a)}function At(e){var a=e;do{if((a.flags&32768)!==0){Se(a,Yt);return}e=a.return;var r=eh(a.alternate,a,Qe);if(r!==null){Vt=r;return}if(a=a.sibling,a!==null){Vt=a;return}Vt=a=e}while(a!==null);de===0&&(de=5)}function Se(e,a){do{var r=ec(e.alternate,e);if(r!==null){r.flags&=32767,Vt=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!a&&(e=e.sibling,e!==null)){Vt=e;return}Vt=e=r}while(e!==null);de=6,Vt=null}function Ht(e,a,r,c,p,x,C,D,Y){e.cancelPendingCommit=null;do oc();while(Ne!==0);if(($t&6)!==0)throw Error(s(327));if(a!==null){if(a===e.current)throw Error(s(177));if(x=a.lanes|a.childLanes,x|=Ro,$h(e,r,x,C,D,Y),e===he&&(Vt=he=null,Wt=0),Ma=a,ii=e,Xa=r,sl=x,zs=p,rc=c,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,W_(Ir,function(){return Qg(),null})):(e.callbackNode=null,e.callbackPriority=0),c=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||c){c=w.T,w.T=null,p=H.p,H.p=2,C=$t,$t|=4;try{Tu(e,a,r)}finally{$t=C,H.p=p,w.T=c}}Ne=1,le(),sn(),se()}}function le(){if(Ne===1){Ne=0;var e=ii,a=Ma,r=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||r){r=w.T,w.T=null;var c=H.p;H.p=2;var p=$t;$t|=4;try{Kl(a,e);var x=Hp,C=To(e.containerInfo),D=x.focusedElem,Y=x.selectionRange;if(C!==D&&D&&D.ownerDocument&&bo(D.ownerDocument.documentElement,D)){if(Y!==null&&nu(D)){var F=Y.start,lt=Y.end;if(lt===void 0&&(lt=F),"selectionStart"in D)D.selectionStart=F,D.selectionEnd=Math.min(lt,D.value.length);else{var ot=D.ownerDocument||document,tt=ot&&ot.defaultView||window;if(tt.getSelection){var it=tt.getSelection(),Et=D.textContent.length,Bt=Math.min(Y.start,Et),Te=Y.end===void 0?Bt:Math.min(Y.end,Et);!it.extend&&Bt>Te&&(C=Te,Te=Bt,Bt=C);var J=of(D,Bt),V=of(D,Te);if(J&&V&&(it.rangeCount!==1||it.anchorNode!==J.node||it.anchorOffset!==J.offset||it.focusNode!==V.node||it.focusOffset!==V.offset)){var W=ot.createRange();W.setStart(J.node,J.offset),it.removeAllRanges(),Bt>Te?(it.addRange(W),it.extend(V.node,V.offset)):(W.setEnd(V.node,V.offset),it.addRange(W))}}}}for(ot=[],it=D;it=it.parentNode;)it.nodeType===1&&ot.push({element:it,left:it.scrollLeft,top:it.scrollTop});for(typeof D.focus=="function"&&D.focus(),D=0;D<ot.length;D++){var rt=ot[D];rt.element.scrollLeft=rt.left,rt.element.scrollTop=rt.top}}vm=!!wp,Hp=wp=null}finally{$t=p,H.p=c,w.T=r}}e.current=a,Ne=2}}function sn(){if(Ne===2){Ne=0;var e=ii,a=Ma,r=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||r){r=w.T,w.T=null;var c=H.p;H.p=2;var p=$t;$t|=4;try{im(e,a.alternate,a)}finally{$t=p,H.p=c,w.T=r}}Ne=3}}function se(){if(Ne===4||Ne===3){Ne=0,kh();var e=ii,a=Ma,r=Xa,c=rc;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Ne=5:(Ne=0,Ma=ii=null,ul(e,e.pendingLanes));var p=e.pendingLanes;if(p===0&&(Ri=null),no(r),a=a.stateNode,Je&&typeof Je.onCommitFiberRoot=="function")try{Je.onCommitFiberRoot(Ua,a,void 0,(a.current.flags&128)===128)}catch{}if(c!==null){a=w.T,p=H.p,H.p=2,w.T=null;try{for(var x=e.onRecoverableError,C=0;C<c.length;C++){var D=c[C];x(D.value,{componentStack:D.stack})}}finally{w.T=a,H.p=p}}(Xa&3)!==0&&oc(),Jl(e),p=e.pendingLanes,(r&261930)!==0&&(p&42)!==0?e===Os?Ds++:(Ds=0,Os=e):Ds=0,ih(0)}}function ul(e,a){(e.pooledCacheLanes&=a)===0&&(a=e.pooledCache,a!=null&&(e.pooledCache=null,yn(a)))}function oc(){return le(),sn(),se(),Qg()}function Qg(){if(Ne!==5)return!1;var e=ii,a=sl;sl=0;var r=no(Xa),c=w.T,p=H.p;try{H.p=32>r?32:r,w.T=null,r=zs,zs=null;var x=ii,C=Xa;if(Ne=0,Ma=ii=null,Xa=0,($t&6)!==0)throw Error(s(331));var D=$t;if($t|=4,Rs(x.current),Oe(x,x.current,C,r),$t=D,ih(0,!1),Je&&typeof Je.onPostCommitFiberRoot=="function")try{Je.onPostCommitFiberRoot(Ua,x)}catch{}return!0}finally{H.p=p,w.T=c,ul(e,a)}}function Zg(e,a,r){a=Jn(r,a),a=th(e.stateNode,a,2),e=Wi(e,a,2),e!==null&&(ks(e,2),Jl(e))}function xe(e,a,r){if(e.tag===3)Zg(e,e,r);else for(;a!==null;){if(a.tag===3){Zg(a,e,r);break}else if(a.tag===1){var c=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Ri===null||!Ri.has(c))){e=Jn(r,e),r=vu(2),c=Wi(a,r,2),c!==null&&(In(r,c,a,e),ks(c,2),Jl(c));break}}a=a.return}}function Cp(e,a,r){var c=e.pingCache;if(c===null){c=e.pingCache=new uc;var p=new Set;c.set(a,p)}else p=c.get(a),p===void 0&&(p=new Set,c.set(a,p));p.has(r)||(ve=!0,p.add(r),e=k_.bind(null,e,a,r),a.then(e,e))}function k_(e,a,r){var c=e.pingCache;c!==null&&c.delete(a),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,he===e&&(Wt&r)===r&&(de===4||de===3&&(Wt&62914560)===Wt&&300>Kn()-ll?($t&2)===0&&P(e,0):ni|=r,Ca===Wt&&(Ca=0)),Jl(e)}function Kg(e,a){a===0&&(a=Zs()),e=Dl(e,a),e!==null&&(ks(e,a),Jl(e))}function J_(e){var a=e.memoizedState,r=0;a!==null&&(r=a.retryLane),Kg(e,r)}function P_(e,a){var r=0;switch(e.tag){case 31:case 13:var c=e.stateNode,p=e.memoizedState;p!==null&&(r=p.retryLane);break;case 19:c=e.stateNode;break;case 22:c=e.stateNode._retryCache;break;default:throw Error(s(314))}c!==null&&c.delete(a),Kg(e,r)}function W_(e,a){return Na(e,a)}var um=null,cc=null,Ap=!1,rm=!1,Mp=!1,Mu=0;function Jl(e){e!==cc&&e.next===null&&(cc===null?um=cc=e:cc=cc.next=e),rm=!0,Ap||(Ap=!0,I_())}function ih(e,a){if(!Mp&&rm){Mp=!0;do for(var r=!1,c=um;c!==null;){if(e!==0){var p=c.pendingLanes;if(p===0)var x=0;else{var C=c.suspendedLanes,D=c.pingedLanes;x=(1<<31-Bn(42|e)+1)-1,x&=p&~(C&~D),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(r=!0,Wg(c,x))}else x=Wt,x=Vu(c,c===he?x:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(x&3)===0||Qs(c,x)||(r=!0,Wg(c,x));c=c.next}while(r);Mp=!1}}function F_(){kg()}function kg(){rm=Ap=!1;var e=0;Mu!==0&&rS()&&(e=Mu);for(var a=Kn(),r=null,c=um;c!==null;){var p=c.next,x=Jg(c,a);x===0?(c.next=null,r===null?um=p:r.next=p,p===null&&(cc=r)):(r=c,(e!==0||(x&3)!==0)&&(rm=!0)),c=p}Ne!==0&&Ne!==5||ih(e),Mu!==0&&(Mu=0)}function Jg(e,a){for(var r=e.suspendedLanes,c=e.pingedLanes,p=e.expirationTimes,x=e.pendingLanes&-62914561;0<x;){var C=31-Bn(x),D=1<<C,Y=p[C];Y===-1?((D&r)===0||(D&c)!==0)&&(p[C]=$r(D,a)):Y<=a&&(e.expiredLanes|=D),x&=~D}if(a=he,r=Wt,r=Vu(e,e===a?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),c=e.callbackNode,r===0||e===a&&(Rt===2||Rt===9)||e.cancelPendingCommit!==null)return c!==null&&c!==null&&ml(c),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||Qs(e,r)){if(a=r&-r,a===e.callbackPriority)return a;switch(c!==null&&ml(c),no(r)){case 2:case 8:r=Fr;break;case 32:r=Ir;break;case 268435456:r=Fh;break;default:r=Ir}return c=Pg.bind(null,e),r=Na(r,c),e.callbackPriority=a,e.callbackNode=r,a}return c!==null&&c!==null&&ml(c),e.callbackPriority=2,e.callbackNode=null,2}function Pg(e,a){if(Ne!==0&&Ne!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(oc()&&e.callbackNode!==r)return null;var c=Wt;return c=Vu(e,e===he?c:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),c===0?null:(h(e,c,a),Jg(e,Kn()),e.callbackNode!=null&&e.callbackNode===r?Pg.bind(null,e):null)}function Wg(e,a){if(oc())return null;h(e,a,!0)}function I_(){cS(function(){($t&6)!==0?Na(Ph,F_):kg()})}function Rp(){if(Mu===0){var e=Pi;e===0&&(e=Lu,Lu<<=1,(Lu&261888)===0&&(Lu=256)),Mu=e}return Mu}function Fg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Wu(""+e)}function Ig(e,a){var r=a.ownerDocument.createElement("input");return r.name=a.name,r.value=a.value,e.id&&r.setAttribute("form",e.id),a.parentNode.insertBefore(r,a),e=new FormData(e),r.parentNode.removeChild(r),e}function $_(e,a,r,c,p){if(a==="submit"&&r&&r.stateNode===p){var x=Fg((p[bn]||null).action),C=c.submitter;C&&(a=(a=C[bn]||null)?Fg(a.formAction):C.getAttribute("formAction"),a!==null&&(x=a,C=null));var D=new tr("action","action",null,c,p);e.push({event:D,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Mu!==0){var Y=C?Ig(p,C):new FormData(p);Pf(r,{pending:!0,data:Y,method:p.method,action:x},null,Y)}}else typeof x=="function"&&(D.preventDefault(),Y=C?Ig(p,C):new FormData(p),Pf(r,{pending:!0,data:Y,method:p.method,action:x},x,Y))},currentTarget:p}]})}}for(var zp=0;zp<Mo.length;zp++){var Dp=Mo[zp],tS=Dp.toLowerCase(),eS=Dp[0].toUpperCase()+Dp.slice(1);En(tS,"on"+eS)}En(kn,"onAnimationEnd"),En(cf,"onAnimationIteration"),En(mi,"onAnimationStart"),En("dblclick","onDoubleClick"),En("focusin","onFocus"),En("focusout","onBlur"),En(su,"onTransitionRun"),En(Ml,"onTransitionStart"),En(ff,"onTransitionCancel"),En(Ao,"onTransitionEnd"),yl("onMouseEnter",["mouseout","mouseover"]),yl("onMouseLeave",["mouseout","mouseover"]),yl("onPointerEnter",["pointerout","pointerover"]),yl("onPointerLeave",["pointerout","pointerover"]),qi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qi("onBeforeInput",["compositionend","keypress","textInput","paste"]),qi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lh="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(" "),nS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(lh));function $g(e,a){a=(a&4)!==0;for(var r=0;r<e.length;r++){var c=e[r],p=c.event;c=c.listeners;t:{var x=void 0;if(a)for(var C=c.length-1;0<=C;C--){var D=c[C],Y=D.instance,F=D.currentTarget;if(D=D.listener,Y!==x&&p.isPropagationStopped())break t;x=D,p.currentTarget=F;try{x(p)}catch(lt){Rl(lt)}p.currentTarget=null,x=Y}else for(C=0;C<c.length;C++){if(D=c[C],Y=D.instance,F=D.currentTarget,D=D.listener,Y!==x&&p.isPropagationStopped())break t;x=D,p.currentTarget=F;try{x(p)}catch(lt){Rl(lt)}p.currentTarget=null,x=Y}}}}function It(e,a){var r=a[ao];r===void 0&&(r=a[ao]=new Set);var c=e+"__bubble";r.has(c)||(t0(a,e,2,!1),r.add(c))}function Op(e,a,r){var c=0;a&&(c|=4),t0(r,e,c,a)}var om="_reactListening"+Math.random().toString(36).slice(2);function Np(e){if(!e[om]){e[om]=!0,fi.forEach(function(r){r!=="selectionchange"&&(nS.has(r)||Op(r,!1,e),Op(r,!0,e))});var a=e.nodeType===9?e:e.ownerDocument;a===null||a[om]||(a[om]=!0,Op("selectionchange",!1,a))}}function t0(e,a,r,c){switch(z0(a)){case 2:var p=DS;break;case 8:p=OS;break;default:p=kp}r=p.bind(null,a,r,e),p=void 0,!fo||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),c?p!==void 0?e.addEventListener(a,r,{capture:!0,passive:p}):e.addEventListener(a,r,!0):p!==void 0?e.addEventListener(a,r,{passive:p}):e.addEventListener(a,r,!1)}function Up(e,a,r,c,p){var x=c;if((a&1)===0&&(a&2)===0&&c!==null)t:for(;;){if(c===null)return;var C=c.tag;if(C===3||C===4){var D=c.stateNode.containerInfo;if(D===p)break;if(C===4)for(C=c.return;C!==null;){var Y=C.tag;if((Y===3||Y===4)&&C.stateNode.containerInfo===p)return;C=C.return}for(;D!==null;){if(C=nn(D),C===null)return;if(Y=C.tag,Y===5||Y===6||Y===26||Y===27){c=x=C;continue t}D=D.parentNode}}c=c.return}Zc(function(){var F=x,lt=oo(r),ot=[];t:{var tt=Xi.get(e);if(tt!==void 0){var it=tr,Et=e;switch(e){case"keypress":if(rs(r)===0)break t;case"keydown":case"keyup":it=Ic;break;case"focusin":Et="focus",it=go;break;case"focusout":Et="blur",it=go;break;case"beforeblur":case"afterblur":it=go;break;case"click":if(r.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":it=rd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":it=od;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":it=Yi;break;case kn:case cf:case mi:it=hd;break;case Ao:it=gp;break;case"scroll":case"scrollend":it=po;break;case"wheel":it=Sl;break;case"copy":case"cut":case"paste":it=kc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":it=vo;break;case"toggle":case"beforetoggle":it=tf}var Bt=(a&4)!==0,Te=!Bt&&(e==="scroll"||e==="scrollend"),J=Bt?tt!==null?tt+"Capture":null:tt;Bt=[];for(var V=F,W;V!==null;){var rt=V;if(W=rt.stateNode,rt=rt.tag,rt!==5&&rt!==26&&rt!==27||W===null||J===null||(rt=us(V,J),rt!=null&&Bt.push(sh(V,rt,W))),Te)break;V=V.return}0<Bt.length&&(tt=new it(tt,Et,null,r,lt),ot.push({event:tt,listeners:Bt}))}}if((a&7)===0){t:{if(tt=e==="mouseover"||e==="pointerover",it=e==="mouseout"||e==="pointerout",tt&&r!==Fu&&(Et=r.relatedTarget||r.fromElement)&&(nn(Et)||Et[pl]))break t;if((it||tt)&&(tt=lt.window===lt?lt:(tt=lt.ownerDocument)?tt.defaultView||tt.parentWindow:window,it?(Et=r.relatedTarget||r.toElement,it=F,Et=Et?nn(Et):null,Et!==null&&(Te=f(Et),Bt=Et.tag,Et!==Te||Bt!==5&&Bt!==27&&Bt!==6)&&(Et=null)):(it=null,Et=F),it!==Et)){if(Bt=rd,rt="onMouseLeave",J="onMouseEnter",V="mouse",(e==="pointerout"||e==="pointerover")&&(Bt=vo,rt="onPointerLeave",J="onPointerEnter",V="pointer"),Te=it==null?tt:Gi(it),W=Et==null?tt:Gi(Et),tt=new Bt(rt,V+"leave",it,r,lt),tt.target=Te,tt.relatedTarget=W,rt=null,nn(lt)===F&&(Bt=new Bt(J,V+"enter",Et,r,lt),Bt.target=W,Bt.relatedTarget=Te,rt=Bt),Te=rt,it&&Et)e:{for(Bt=aS,J=it,V=Et,W=0,rt=J;rt;rt=Bt(rt))W++;rt=0;for(var zt=V;zt;zt=Bt(zt))rt++;for(;0<W-rt;)J=Bt(J),W--;for(;0<rt-W;)V=Bt(V),rt--;for(;W--;){if(J===V||V!==null&&J===V.alternate){Bt=J;break e}J=Bt(J),V=Bt(V)}Bt=null}else Bt=null;it!==null&&e0(ot,tt,it,Bt,!1),Et!==null&&Te!==null&&e0(ot,Te,Et,Bt,!0)}}t:{if(tt=F?Gi(F):window,it=tt.nodeName&&tt.nodeName.toLowerCase(),it==="select"||it==="input"&&tt.type==="file")var me=sf;else if(af(tt))if(sr)me=Td;else{me=El;var Ct=ur}else it=tt.nodeName,!it||it.toLowerCase()!=="input"||tt.type!=="checkbox"&&tt.type!=="radio"?F&&Pu(F.elementType)&&(me=sf):me=bd;if(me&&(me=me(e,F))){So(ot,me,r,lt);break t}Ct&&Ct(e,tt,F),e==="focusout"&&F&&tt.type==="number"&&F.memoizedProps.value!=null&&uo(tt,"number",tt.value)}switch(Ct=F?Gi(F):window,e){case"focusin":(af(Ct)||Ct.contentEditable==="true")&&(au=Ct,Eo=F,iu=null);break;case"focusout":iu=Eo=au=null;break;case"mousedown":ha=!0;break;case"contextmenu":case"mouseup":case"dragend":ha=!1,Co(ot,r,lt);break;case"selectionchange":if(Ed)break;case"keydown":case"keyup":Co(ot,r,lt)}var Zt;if(os)t:{switch(e){case"compositionstart":var ee="onCompositionStart";break t;case"compositionend":ee="onCompositionEnd";break t;case"compositionupdate":ee="onCompositionUpdate";break t}ee=void 0}else Tl?xo(e,r)&&(ee="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(ee="onCompositionStart");ee&&(pn&&r.locale!=="ko"&&(Tl||ee!=="onCompositionStart"?ee==="onCompositionEnd"&&Tl&&(Zt=mo()):(vl=lt,ho="value"in vl?vl.value:vl.textContent,Tl=!0)),Ct=cm(F,ee),0<Ct.length&&(ee=new Jc(ee,e,null,r,lt),ot.push({event:ee,listeners:Ct}),Zt?ee.data=Zt:(Zt=Fs(r),Zt!==null&&(ee.data=Zt)))),(Zt=cs?_o(e,r):xd(e,r))&&(ee=cm(F,"onBeforeInput"),0<ee.length&&(Ct=new Jc("onBeforeInput","beforeinput",null,r,lt),ot.push({event:Ct,listeners:ee}),Ct.data=Zt)),$_(ot,e,F,r,lt)}$g(ot,a)})}function sh(e,a,r){return{instance:e,listener:a,currentTarget:r}}function cm(e,a){for(var r=a+"Capture",c=[];e!==null;){var p=e,x=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||x===null||(p=us(e,r),p!=null&&c.unshift(sh(e,p,x)),p=us(e,a),p!=null&&c.push(sh(e,p,x))),e.tag===3)return c;e=e.return}return[]}function aS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function e0(e,a,r,c,p){for(var x=a._reactName,C=[];r!==null&&r!==c;){var D=r,Y=D.alternate,F=D.stateNode;if(D=D.tag,Y!==null&&Y===c)break;D!==5&&D!==26&&D!==27||F===null||(Y=F,p?(F=us(r,x),F!=null&&C.unshift(sh(r,F,Y))):p||(F=us(r,x),F!=null&&C.push(sh(r,F,Y)))),r=r.return}C.length!==0&&e.push({event:a,listeners:C})}var iS=/\r\n?/g,lS=/\u0000|\uFFFD/g;function n0(e){return(typeof e=="string"?e:""+e).replace(iS,`
|
|
50
|
+
`).replace(lS,"")}function a0(e,a){return a=n0(a),n0(e)===a}function be(e,a,r,c,p,x){switch(r){case"children":typeof c=="string"?a==="body"||a==="textarea"&&c===""||ls(e,c):(typeof c=="number"||typeof c=="bigint")&&a!=="body"&&ls(e,""+c);break;case"className":ku(e,"class",c);break;case"tabIndex":ku(e,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":ku(e,r,c);break;case"style":Vc(e,c,x);break;case"data":if(a!=="object"){ku(e,"data",c);break}case"src":case"href":if(c===""&&(a!=="a"||r!=="href")){e.removeAttribute(r);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){e.removeAttribute(r);break}c=Wu(""+c),e.setAttribute(r,c);break;case"action":case"formAction":if(typeof c=="function"){e.setAttribute(r,"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"&&(r==="formAction"?(a!=="input"&&be(e,a,"name",p.name,p,null),be(e,a,"formEncType",p.formEncType,p,null),be(e,a,"formMethod",p.formMethod,p,null),be(e,a,"formTarget",p.formTarget,p,null)):(be(e,a,"encType",p.encType,p,null),be(e,a,"method",p.method,p,null),be(e,a,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){e.removeAttribute(r);break}c=Wu(""+c),e.setAttribute(r,c);break;case"onClick":c!=null&&(e.onclick=hi);break;case"onScroll":c!=null&&It("scroll",e);break;case"onScrollEnd":c!=null&&It("scrollend",e);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(r=c.__html,r!=null){if(p.children!=null)throw Error(s(60));e.innerHTML=r}}break;case"multiple":e.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":e.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){e.removeAttribute("xlink:href");break}r=Wu(""+c),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?e.setAttribute(r,""+c):e.removeAttribute(r);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":c&&typeof c!="function"&&typeof c!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":c===!0?e.setAttribute(r,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?e.setAttribute(r,c):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?e.setAttribute(r,c):e.removeAttribute(r);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?e.removeAttribute(r):e.setAttribute(r,c);break;case"popover":It("beforetoggle",e),It("toggle",e),Ku(e,"popover",c);break;case"xlinkActuate":ka(e,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":ka(e,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":ka(e,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":ka(e,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":ka(e,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":ka(e,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":ka(e,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":ka(e,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":ka(e,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Ku(e,"is",c);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=sd.get(r)||r,Ku(e,r,c))}}function Bp(e,a,r,c,p,x){switch(r){case"style":Vc(e,c,x);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(r=c.__html,r!=null){if(p.children!=null)throw Error(s(60));e.innerHTML=r}}break;case"children":typeof c=="string"?ls(e,c):(typeof c=="number"||typeof c=="bigint")&&ls(e,""+c);break;case"onScroll":c!=null&&It("scroll",e);break;case"onScrollEnd":c!=null&&It("scrollend",e);break;case"onClick":c!=null&&(e.onclick=hi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Zu.hasOwnProperty(r))t:{if(r[0]==="o"&&r[1]==="n"&&(p=r.endsWith("Capture"),a=r.slice(2,p?r.length-7:void 0),x=e[bn]||null,x=x!=null?x[r]:null,typeof x=="function"&&e.removeEventListener(a,x,p),typeof c=="function")){typeof x!="function"&&x!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(a,c,p);break t}r in e?e[r]=c:c===!0?e.setAttribute(r,""):Ku(e,r,c)}}}function Xn(e,a,r){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":It("error",e),It("load",e);var c=!1,p=!1,x;for(x in r)if(r.hasOwnProperty(x)){var C=r[x];if(C!=null)switch(x){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,a));default:be(e,a,x,C,r,null)}}p&&be(e,a,"srcSet",r.srcSet,r,null),c&&be(e,a,"src",r.src,r,null);return;case"input":It("invalid",e);var D=x=C=p=null,Y=null,F=null;for(c in r)if(r.hasOwnProperty(c)){var lt=r[c];if(lt!=null)switch(c){case"name":p=lt;break;case"type":C=lt;break;case"checked":Y=lt;break;case"defaultChecked":F=lt;break;case"value":x=lt;break;case"defaultValue":D=lt;break;case"children":case"dangerouslySetInnerHTML":if(lt!=null)throw Error(s(137,a));break;default:be(e,a,c,lt,r,null)}}Lc(e,x,D,Y,F,C,p,!1);return;case"select":It("invalid",e),c=C=x=null;for(p in r)if(r.hasOwnProperty(p)&&(D=r[p],D!=null))switch(p){case"value":x=D;break;case"defaultValue":C=D;break;case"multiple":c=D;default:be(e,a,p,D,r,null)}a=x,r=C,e.multiple=!!c,a!=null?Ps(e,!!c,a,!1):r!=null&&Ps(e,!!c,r,!0);return;case"textarea":It("invalid",e),x=p=c=null;for(C in r)if(r.hasOwnProperty(C)&&(D=r[C],D!=null))switch(C){case"value":c=D;break;case"defaultValue":p=D;break;case"children":x=D;break;case"dangerouslySetInnerHTML":if(D!=null)throw Error(s(91));break;default:be(e,a,C,D,r,null)}is(e,c,p,x);return;case"option":for(Y in r)if(r.hasOwnProperty(Y)&&(c=r[Y],c!=null))switch(Y){case"selected":e.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:be(e,a,Y,c,r,null)}return;case"dialog":It("beforetoggle",e),It("toggle",e),It("cancel",e),It("close",e);break;case"iframe":case"object":It("load",e);break;case"video":case"audio":for(c=0;c<lh.length;c++)It(lh[c],e);break;case"image":It("error",e),It("load",e);break;case"details":It("toggle",e);break;case"embed":case"source":case"link":It("error",e),It("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 r)if(r.hasOwnProperty(F)&&(c=r[F],c!=null))switch(F){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,a));default:be(e,a,F,c,r,null)}return;default:if(Pu(a)){for(lt in r)r.hasOwnProperty(lt)&&(c=r[lt],c!==void 0&&Bp(e,a,lt,c,r,void 0));return}}for(D in r)r.hasOwnProperty(D)&&(c=r[D],c!=null&&be(e,a,D,c,r,null))}function sS(e,a,r,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,x=null,C=null,D=null,Y=null,F=null,lt=null;for(it in r){var ot=r[it];if(r.hasOwnProperty(it)&&ot!=null)switch(it){case"checked":break;case"value":break;case"defaultValue":Y=ot;default:c.hasOwnProperty(it)||be(e,a,it,null,c,ot)}}for(var tt in c){var it=c[tt];if(ot=r[tt],c.hasOwnProperty(tt)&&(it!=null||ot!=null))switch(tt){case"type":x=it;break;case"name":p=it;break;case"checked":F=it;break;case"defaultChecked":lt=it;break;case"value":C=it;break;case"defaultValue":D=it;break;case"children":case"dangerouslySetInnerHTML":if(it!=null)throw Error(s(137,a));break;default:it!==ot&&be(e,a,tt,it,c,ot)}}so(e,C,D,Y,F,lt,x,p);return;case"select":it=C=D=tt=null;for(x in r)if(Y=r[x],r.hasOwnProperty(x)&&Y!=null)switch(x){case"value":break;case"multiple":it=Y;default:c.hasOwnProperty(x)||be(e,a,x,null,c,Y)}for(p in c)if(x=c[p],Y=r[p],c.hasOwnProperty(p)&&(x!=null||Y!=null))switch(p){case"value":tt=x;break;case"defaultValue":D=x;break;case"multiple":C=x;default:x!==Y&&be(e,a,p,x,c,Y)}a=D,r=C,c=it,tt!=null?Ps(e,!!r,tt,!1):!!c!=!!r&&(a!=null?Ps(e,!!r,a,!0):Ps(e,!!r,r?[]:"",!1));return;case"textarea":it=tt=null;for(D in r)if(p=r[D],r.hasOwnProperty(D)&&p!=null&&!c.hasOwnProperty(D))switch(D){case"value":break;case"children":break;default:be(e,a,D,null,c,p)}for(C in c)if(p=c[C],x=r[C],c.hasOwnProperty(C)&&(p!=null||x!=null))switch(C){case"value":tt=p;break;case"defaultValue":it=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(s(91));break;default:p!==x&&be(e,a,C,p,c,x)}Xc(e,tt,it);return;case"option":for(var Et in r)if(tt=r[Et],r.hasOwnProperty(Et)&&tt!=null&&!c.hasOwnProperty(Et))switch(Et){case"selected":e.selected=!1;break;default:be(e,a,Et,null,c,tt)}for(Y in c)if(tt=c[Y],it=r[Y],c.hasOwnProperty(Y)&&tt!==it&&(tt!=null||it!=null))switch(Y){case"selected":e.selected=tt&&typeof tt!="function"&&typeof tt!="symbol";break;default:be(e,a,Y,tt,c,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 Bt in r)tt=r[Bt],r.hasOwnProperty(Bt)&&tt!=null&&!c.hasOwnProperty(Bt)&&be(e,a,Bt,null,c,tt);for(F in c)if(tt=c[F],it=r[F],c.hasOwnProperty(F)&&tt!==it&&(tt!=null||it!=null))switch(F){case"children":case"dangerouslySetInnerHTML":if(tt!=null)throw Error(s(137,a));break;default:be(e,a,F,tt,c,it)}return;default:if(Pu(a)){for(var Te in r)tt=r[Te],r.hasOwnProperty(Te)&&tt!==void 0&&!c.hasOwnProperty(Te)&&Bp(e,a,Te,void 0,c,tt);for(lt in c)tt=c[lt],it=r[lt],!c.hasOwnProperty(lt)||tt===it||tt===void 0&&it===void 0||Bp(e,a,lt,tt,c,it);return}}for(var J in r)tt=r[J],r.hasOwnProperty(J)&&tt!=null&&!c.hasOwnProperty(J)&&be(e,a,J,null,c,tt);for(ot in c)tt=c[ot],it=r[ot],!c.hasOwnProperty(ot)||tt===it||tt==null&&it==null||be(e,a,ot,tt,c,it)}function i0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function uS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,a=0,r=performance.getEntriesByType("resource"),c=0;c<r.length;c++){var p=r[c],x=p.transferSize,C=p.initiatorType,D=p.duration;if(x&&D&&i0(C)){for(C=0,D=p.responseEnd,c+=1;c<r.length;c++){var Y=r[c],F=Y.startTime;if(F>D)break;var lt=Y.transferSize,ot=Y.initiatorType;lt&&i0(ot)&&(Y=Y.responseEnd,C+=lt*(Y<D?1:(D-F)/(Y-F)))}if(--c,a+=8*(x+C)/(p.duration/1e3),e++,10<e)break}}if(0<e)return a/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var wp=null,Hp=null;function fm(e){return e.nodeType===9?e:e.ownerDocument}function l0(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 s0(e,a){if(e===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&a==="foreignObject"?0:e}function Gp(e,a){return e==="textarea"||e==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var jp=null;function rS(){var e=window.event;return e&&e.type==="popstate"?e===jp?!1:(jp=e,!0):(jp=null,!1)}var u0=typeof setTimeout=="function"?setTimeout:void 0,oS=typeof clearTimeout=="function"?clearTimeout:void 0,r0=typeof Promise=="function"?Promise:void 0,cS=typeof queueMicrotask=="function"?queueMicrotask:typeof r0<"u"?function(e){return r0.resolve(null).then(e).catch(fS)}:u0;function fS(e){setTimeout(function(){throw e})}function Ru(e){return e==="head"}function o0(e,a){var r=a,c=0;do{var p=r.nextSibling;if(e.removeChild(r),p&&p.nodeType===8)if(r=p.data,r==="/$"||r==="/&"){if(c===0){e.removeChild(p),mc(a);return}c--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")c++;else if(r==="html")uh(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,uh(r);for(var x=r.firstChild;x;){var C=x.nextSibling,D=x.nodeName;x[as]||D==="SCRIPT"||D==="STYLE"||D==="LINK"&&x.rel.toLowerCase()==="stylesheet"||r.removeChild(x),x=C}}else r==="body"&&uh(e.ownerDocument.body);r=p}while(r);mc(a)}function c0(e,a){var r=e;e=0;do{var c=r.nextSibling;if(r.nodeType===1?a?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(a?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),c&&c.nodeType===8)if(r=c.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=c}while(r)}function qp(e){var a=e.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var r=a;switch(a=a.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":qp(r),Qu(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function hS(e,a,r,c){for(;e.nodeType===1;){var p=r;if(e.nodeName.toLowerCase()!==a.toLowerCase()){if(!c&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(c){if(!e[as])switch(a){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!==p.rel||e.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||e.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||e.getAttribute("title")!==(p.title==null?null:p.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(x=e.getAttribute("src"),(x!==(p.src==null?null:p.src)||e.getAttribute("type")!==(p.type==null?null:p.type)||e.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&x&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(a==="input"&&e.type==="hidden"){var x=p.name==null?null:""+p.name;if(p.type==="hidden"&&e.getAttribute("name")===x)return e}else return e;if(e=zi(e.nextSibling),e===null)break}return null}function dS(e,a,r){if(a==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=zi(e.nextSibling),e===null))return null;return e}function f0(e,a){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=zi(e.nextSibling),e===null))return null;return e}function Yp(e){return e.data==="$?"||e.data==="$~"}function Lp(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function mS(e,a){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=a;else if(e.data!=="$?"||r.readyState!=="loading")a();else{var c=function(){a(),r.removeEventListener("DOMContentLoaded",c)};r.addEventListener("DOMContentLoaded",c),e._reactRetry=c}}function zi(e){for(;e!=null;e=e.nextSibling){var a=e.nodeType;if(a===1||a===3)break;if(a===8){if(a=e.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return e}var Xp=null;function h0(e){e=e.nextSibling;for(var a=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(a===0)return zi(e.nextSibling);a--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||a++}e=e.nextSibling}return null}function d0(e){e=e.previousSibling;for(var a=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(a===0)return e;a--}else r!=="/$"&&r!=="/&"||a++}e=e.previousSibling}return null}function m0(e,a,r){switch(a=fm(r),e){case"html":if(e=a.documentElement,!e)throw Error(s(452));return e;case"head":if(e=a.head,!e)throw Error(s(453));return e;case"body":if(e=a.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function uh(e){for(var a=e.attributes;a.length;)e.removeAttributeNode(a[0]);Qu(e)}var Di=new Map,p0=new Set;function hm(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Us=H.d;H.d={f:pS,r:yS,D:gS,C:vS,L:xS,m:_S,X:bS,S:SS,M:TS};function pS(){var e=Us.f(),a=N();return e||a}function yS(e){var a=Ce(e);a!==null&&a.tag===5&&a.type==="form"?Wf(a):Us.r(e)}var fc=typeof document>"u"?null:document;function y0(e,a,r){var c=fc;if(c&&typeof a=="string"&&a){var p=ca(a);p='link[rel="'+e+'"][href="'+p+'"]',typeof r=="string"&&(p+='[crossorigin="'+r+'"]'),p0.has(p)||(p0.add(p),e={rel:e,crossOrigin:r,href:a},c.querySelector(p)===null&&(a=c.createElement("link"),Xn(a,"link",e),Pe(a),c.head.appendChild(a)))}}function gS(e){Us.D(e),y0("dns-prefetch",e,null)}function vS(e,a){Us.C(e,a),y0("preconnect",e,a)}function xS(e,a,r){Us.L(e,a,r);var c=fc;if(c&&e&&a){var p='link[rel="preload"][as="'+ca(a)+'"]';a==="image"&&r&&r.imageSrcSet?(p+='[imagesrcset="'+ca(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(p+='[imagesizes="'+ca(r.imageSizes)+'"]')):p+='[href="'+ca(e)+'"]';var x=p;switch(a){case"style":x=hc(e);break;case"script":x=dc(e)}Di.has(x)||(e=b({rel:"preload",href:a==="image"&&r&&r.imageSrcSet?void 0:e,as:a},r),Di.set(x,e),c.querySelector(p)!==null||a==="style"&&c.querySelector(rh(x))||a==="script"&&c.querySelector(oh(x))||(a=c.createElement("link"),Xn(a,"link",e),Pe(a),c.head.appendChild(a)))}}function _S(e,a){Us.m(e,a);var r=fc;if(r&&e){var c=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+ca(c)+'"][href="'+ca(e)+'"]',x=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=dc(e)}if(!Di.has(x)&&(e=b({rel:"modulepreload",href:e},a),Di.set(x,e),r.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(oh(x)))return}c=r.createElement("link"),Xn(c,"link",e),Pe(c),r.head.appendChild(c)}}}function SS(e,a,r){Us.S(e,a,r);var c=fc;if(c&&e){var p=ji(c).hoistableStyles,x=hc(e);a=a||"default";var C=p.get(x);if(!C){var D={loading:0,preload:null};if(C=c.querySelector(rh(x)))D.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":a},r),(r=Di.get(x))&&Vp(e,r);var Y=C=c.createElement("link");Pe(Y),Xn(Y,"link",e),Y._p=new Promise(function(F,lt){Y.onload=F,Y.onerror=lt}),Y.addEventListener("load",function(){D.loading|=1}),Y.addEventListener("error",function(){D.loading|=2}),D.loading|=4,dm(C,a,c)}C={type:"stylesheet",instance:C,count:1,state:D},p.set(x,C)}}}function bS(e,a){Us.X(e,a);var r=fc;if(r&&e){var c=ji(r).hoistableScripts,p=dc(e),x=c.get(p);x||(x=r.querySelector(oh(p)),x||(e=b({src:e,async:!0},a),(a=Di.get(p))&&Qp(e,a),x=r.createElement("script"),Pe(x),Xn(x,"link",e),r.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},c.set(p,x))}}function TS(e,a){Us.M(e,a);var r=fc;if(r&&e){var c=ji(r).hoistableScripts,p=dc(e),x=c.get(p);x||(x=r.querySelector(oh(p)),x||(e=b({src:e,async:!0,type:"module"},a),(a=Di.get(p))&&Qp(e,a),x=r.createElement("script"),Pe(x),Xn(x,"link",e),r.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},c.set(p,x))}}function g0(e,a,r,c){var p=(p=Ot.current)?hm(p):null;if(!p)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(a=hc(r.href),r=ji(p).hoistableStyles,c=r.get(a),c||(c={type:"style",instance:null,count:0,state:null},r.set(a,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=hc(r.href);var x=ji(p).hoistableStyles,C=x.get(e);if(C||(p=p.ownerDocument||p,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(e,C),(x=p.querySelector(rh(e)))&&!x._p&&(C.instance=x,C.state.loading=5),Di.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Di.set(e,r),x||ES(p,e,r,C.state))),a&&c===null)throw Error(s(528,""));return C}if(a&&c!==null)throw Error(s(529,""));return null;case"script":return a=r.async,r=r.src,typeof r=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=dc(r),r=ji(p).hoistableScripts,c=r.get(a),c||(c={type:"script",instance:null,count:0,state:null},r.set(a,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function hc(e){return'href="'+ca(e)+'"'}function rh(e){return'link[rel="stylesheet"]['+e+"]"}function v0(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function ES(e,a,r,c){e.querySelector('link[rel="preload"][as="style"]['+a+"]")?c.loading=1:(a=e.createElement("link"),c.preload=a,a.addEventListener("load",function(){return c.loading|=1}),a.addEventListener("error",function(){return c.loading|=2}),Xn(a,"link",r),Pe(a),e.head.appendChild(a))}function dc(e){return'[src="'+ca(e)+'"]'}function oh(e){return"script[async]"+e}function x0(e,a,r){if(a.count++,a.instance===null)switch(a.type){case"style":var c=e.querySelector('style[data-href~="'+ca(r.href)+'"]');if(c)return a.instance=c,Pe(c),c;var p=b({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return c=(e.ownerDocument||e).createElement("style"),Pe(c),Xn(c,"style",p),dm(c,r.precedence,e),a.instance=c;case"stylesheet":p=hc(r.href);var x=e.querySelector(rh(p));if(x)return a.state.loading|=4,a.instance=x,Pe(x),x;c=v0(r),(p=Di.get(p))&&Vp(c,p),x=(e.ownerDocument||e).createElement("link"),Pe(x);var C=x;return C._p=new Promise(function(D,Y){C.onload=D,C.onerror=Y}),Xn(x,"link",c),a.state.loading|=4,dm(x,r.precedence,e),a.instance=x;case"script":return x=dc(r.src),(p=e.querySelector(oh(x)))?(a.instance=p,Pe(p),p):(c=r,(p=Di.get(x))&&(c=b({},r),Qp(c,p)),e=e.ownerDocument||e,p=e.createElement("script"),Pe(p),Xn(p,"link",c),e.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(s(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(c=a.instance,a.state.loading|=4,dm(c,r.precedence,e));return a.instance}function dm(e,a,r){for(var c=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=c.length?c[c.length-1]:null,x=p,C=0;C<c.length;C++){var D=c[C];if(D.dataset.precedence===a)x=D;else if(x!==p)break}x?x.parentNode.insertBefore(e,x.nextSibling):(a=r.nodeType===9?r.head:r,a.insertBefore(e,a.firstChild))}function Vp(e,a){e.crossOrigin==null&&(e.crossOrigin=a.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=a.referrerPolicy),e.title==null&&(e.title=a.title)}function Qp(e,a){e.crossOrigin==null&&(e.crossOrigin=a.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=a.referrerPolicy),e.integrity==null&&(e.integrity=a.integrity)}var mm=null;function _0(e,a,r){if(mm===null){var c=new Map,p=mm=new Map;p.set(r,c)}else p=mm,c=p.get(r),c||(c=new Map,p.set(r,c));if(c.has(e))return c;for(c.set(e,null),r=r.getElementsByTagName(e),p=0;p<r.length;p++){var x=r[p];if(!(x[as]||x[Jt]||e==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var C=x.getAttribute(a)||"";C=e+C;var D=c.get(C);D?D.push(x):c.set(C,[x])}}return c}function S0(e,a,r){e=e.ownerDocument||e,e.head.insertBefore(r,a==="title"?e.querySelector("head > title"):null)}function CS(e,a,r){if(r===1||a.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return e=a.disabled,typeof a.precedence=="string"&&e==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function b0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function AS(e,a,r,c){if(r.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var p=hc(c.href),x=a.querySelector(rh(p));if(x){a=x._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(e.count++,e=pm.bind(e),a.then(e,e)),r.state.loading|=4,r.instance=x,Pe(x);return}x=a.ownerDocument||a,c=v0(c),(p=Di.get(p))&&Vp(c,p),x=x.createElement("link"),Pe(x);var C=x;C._p=new Promise(function(D,Y){C.onload=D,C.onerror=Y}),Xn(x,"link",c),r.instance=x}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,a),(a=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=pm.bind(e),a.addEventListener("load",r),a.addEventListener("error",r))}}var Zp=0;function MS(e,a){return e.stylesheets&&e.count===0&&gm(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var c=setTimeout(function(){if(e.stylesheets&&gm(e,e.stylesheets),e.unsuspend){var x=e.unsuspend;e.unsuspend=null,x()}},6e4+a);0<e.imgBytes&&Zp===0&&(Zp=62500*uS());var p=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&gm(e,e.stylesheets),e.unsuspend)){var x=e.unsuspend;e.unsuspend=null,x()}},(e.imgBytes>Zp?50:800)+a);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function pm(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)gm(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ym=null;function gm(e,a){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ym=new Map,a.forEach(RS,e),ym=null,pm.call(e))}function RS(e,a){if(!(a.state.loading&4)){var r=ym.get(e);if(r)var c=r.get(null);else{r=new Map,ym.set(e,r);for(var p=e.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<p.length;x++){var C=p[x];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(r.set(C.dataset.precedence,C),c=C)}c&&r.set(null,c)}p=a.instance,C=p.getAttribute("data-precedence"),x=r.get(C)||c,x===c&&r.set(null,p),r.set(C,p),this.count++,c=pm.bind(this),p.addEventListener("load",c),p.addEventListener("error",c),x?x.parentNode.insertBefore(p,x.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(p,e.firstChild)),a.state.loading|=4}}var ch={$$typeof:U,Provider:null,Consumer:null,_currentValue:at,_currentValue2:at,_threadCount:0};function zS(e,a,r,c,p,x,C,D,Y){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=Ks(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ks(0),this.hiddenUpdates=Ks(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=x,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Y,this.incompleteTransitions=new Map}function T0(e,a,r,c,p,x,C,D,Y,F,lt,ot){return e=new zS(e,a,r,C,Y,F,lt,ot,D),a=1,x===!0&&(a|=24),x=Hn(3,null,null,a),e.current=x,x.stateNode=e,a=vf(),a.refCount++,e.pooledCache=a,a.refCount++,x.memoizedState={element:c,isDehydrated:r,cache:a},Ef(x),e}function E0(e){return e?(e=Ol,e):Ol}function C0(e,a,r,c,p,x){p=E0(p),c.context===null?c.context=p:c.pendingContext=p,c=_i(a),c.payload={element:r},x=x===void 0?null:x,x!==null&&(c.callback=x),r=Wi(e,c,a),r!==null&&(u(r,e,a),ql(r,e,a))}function A0(e,a){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<a?r:a}}function Kp(e,a){A0(e,a),(e=e.alternate)&&A0(e,a)}function M0(e){if(e.tag===13||e.tag===31){var a=Dl(e,67108864);a!==null&&u(a,e,67108864),Kp(e,67108864)}}function R0(e){if(e.tag===13||e.tag===31){var a=Ln();a=oi(a);var r=Dl(e,a);r!==null&&u(r,e,a),Kp(e,a)}}var vm=!0;function DS(e,a,r,c){var p=w.T;w.T=null;var x=H.p;try{H.p=2,kp(e,a,r,c)}finally{H.p=x,w.T=p}}function OS(e,a,r,c){var p=w.T;w.T=null;var x=H.p;try{H.p=8,kp(e,a,r,c)}finally{H.p=x,w.T=p}}function kp(e,a,r,c){if(vm){var p=Jp(c);if(p===null)Up(e,a,c,xm,r),D0(e,c);else if(US(p,e,a,r,c))c.stopPropagation();else if(D0(e,c),a&4&&-1<NS.indexOf(e)){for(;p!==null;){var x=Ce(p);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var C=ri(x.pendingLanes);if(C!==0){var D=x;for(D.pendingLanes|=2,D.entangledLanes|=2;C;){var Y=1<<31-Bn(C);D.entanglements[1]|=Y,C&=~Y}Jl(x),($t&6)===0&&(Aa=Kn()+500,ih(0))}}break;case 31:case 13:D=Dl(x,2),D!==null&&u(D,x,2),N(),Kp(x,2)}if(x=Jp(c),x===null&&Up(e,a,c,xm,r),x===p)break;p=x}p!==null&&c.stopPropagation()}else Up(e,a,c,null,r)}}function Jp(e){return e=oo(e),Pp(e)}var xm=null;function Pp(e){if(xm=null,e=nn(e),e!==null){var a=f(e);if(a===null)e=null;else{var r=a.tag;if(r===13){if(e=d(a),e!==null)return e;e=null}else if(r===31){if(e=m(a),e!==null)return e;e=null}else if(r===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;e=null}else a!==e&&(e=null)}}return xm=e,null}function z0(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(Jh()){case Ph:return 2;case Fr:return 8;case Ir:case Wh:return 32;case Fh:return 268435456;default:return 32}default:return 32}}var Wp=!1,zu=null,Du=null,Ou=null,fh=new Map,hh=new Map,Nu=[],NS="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 D0(e,a){switch(e){case"focusin":case"focusout":zu=null;break;case"dragenter":case"dragleave":Du=null;break;case"mouseover":case"mouseout":Ou=null;break;case"pointerover":case"pointerout":fh.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":hh.delete(a.pointerId)}}function dh(e,a,r,c,p,x){return e===null||e.nativeEvent!==x?(e={blockedOn:a,domEventName:r,eventSystemFlags:c,nativeEvent:x,targetContainers:[p]},a!==null&&(a=Ce(a),a!==null&&M0(a)),e):(e.eventSystemFlags|=c,a=e.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),e)}function US(e,a,r,c,p){switch(a){case"focusin":return zu=dh(zu,e,a,r,c,p),!0;case"dragenter":return Du=dh(Du,e,a,r,c,p),!0;case"mouseover":return Ou=dh(Ou,e,a,r,c,p),!0;case"pointerover":var x=p.pointerId;return fh.set(x,dh(fh.get(x)||null,e,a,r,c,p)),!0;case"gotpointercapture":return x=p.pointerId,hh.set(x,dh(hh.get(x)||null,e,a,r,c,p)),!0}return!1}function O0(e){var a=nn(e.target);if(a!==null){var r=f(a);if(r!==null){if(a=r.tag,a===13){if(a=d(r),a!==null){e.blockedOn=a,ci(e.priority,function(){R0(r)});return}}else if(a===31){if(a=m(r),a!==null){e.blockedOn=a,ci(e.priority,function(){R0(r)});return}}else if(a===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function _m(e){if(e.blockedOn!==null)return!1;for(var a=e.targetContainers;0<a.length;){var r=Jp(e.nativeEvent);if(r===null){r=e.nativeEvent;var c=new r.constructor(r.type,r);Fu=c,r.target.dispatchEvent(c),Fu=null}else return a=Ce(r),a!==null&&M0(a),e.blockedOn=r,!1;a.shift()}return!0}function N0(e,a,r){_m(e)&&r.delete(a)}function BS(){Wp=!1,zu!==null&&_m(zu)&&(zu=null),Du!==null&&_m(Du)&&(Du=null),Ou!==null&&_m(Ou)&&(Ou=null),fh.forEach(N0),hh.forEach(N0)}function Sm(e,a){e.blockedOn===a&&(e.blockedOn=null,Wp||(Wp=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,BS)))}var bm=null;function U0(e){bm!==e&&(bm=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){bm===e&&(bm=null);for(var a=0;a<e.length;a+=3){var r=e[a],c=e[a+1],p=e[a+2];if(typeof c!="function"){if(Pp(c||r)===null)continue;break}var x=Ce(r);x!==null&&(e.splice(a,3),a-=3,Pf(x,{pending:!0,data:p,method:r.method,action:c},c,p))}}))}function mc(e){function a(Y){return Sm(Y,e)}zu!==null&&Sm(zu,e),Du!==null&&Sm(Du,e),Ou!==null&&Sm(Ou,e),fh.forEach(a),hh.forEach(a);for(var r=0;r<Nu.length;r++){var c=Nu[r];c.blockedOn===e&&(c.blockedOn=null)}for(;0<Nu.length&&(r=Nu[0],r.blockedOn===null);)O0(r),r.blockedOn===null&&Nu.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(c=0;c<r.length;c+=3){var p=r[c],x=r[c+1],C=p[bn]||null;if(typeof x=="function")C||U0(r);else if(C){var D=null;if(x&&x.hasAttribute("formAction")){if(p=x,C=x[bn]||null)D=C.formAction;else if(Pp(p)!==null)continue}else D=C.action;typeof D=="function"?r[c+1]=D:(r.splice(c,3),c-=3),U0(r)}}}function B0(){function e(x){x.canIntercept&&x.info==="react-transition"&&x.intercept({handler:function(){return new Promise(function(C){return p=C})},focusReset:"manual",scroll:"manual"})}function a(){p!==null&&(p(),p=null),c||setTimeout(r,20)}function r(){if(!c&&!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 c=!1,p=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(r,100),function(){c=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function Fp(e){this._internalRoot=e}Tm.prototype.render=Fp.prototype.render=function(e){var a=this._internalRoot;if(a===null)throw Error(s(409));var r=a.current,c=Ln();C0(r,c,e,a,null,null)},Tm.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var a=e.containerInfo;C0(e.current,2,null,e,null,null),N(),a[pl]=null}};function Tm(e){this._internalRoot=e}Tm.prototype.unstable_scheduleHydration=function(e){if(e){var a=Hi();e={blockedOn:null,target:e,priority:a};for(var r=0;r<Nu.length&&a!==0&&a<Nu[r].priority;r++);Nu.splice(r,0,e),r===0&&O0(e)}};var w0=t.version;if(w0!=="19.2.4")throw Error(s(527,w0,"19.2.4"));H.findDOMNode=function(e){var a=e._reactInternals;if(a===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=v(a),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var wS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:w,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Em=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Em.isDisabled&&Em.supportsFiber)try{Ua=Em.inject(wS),Je=Em}catch{}}return ph.createRoot=function(e,a){if(!o(e))throw Error(s(299));var r=!1,c="",p=$f,x=nm,C=Fo;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(C=a.onRecoverableError)),a=T0(e,1,!1,null,null,r,c,null,p,x,C,B0),e[pl]=a.current,Np(e),new Fp(a)},ph.hydrateRoot=function(e,a,r){if(!o(e))throw Error(s(299));var c=!1,p="",x=$f,C=nm,D=Fo,Y=null;return r!=null&&(r.unstable_strictMode===!0&&(c=!0),r.identifierPrefix!==void 0&&(p=r.identifierPrefix),r.onUncaughtError!==void 0&&(x=r.onUncaughtError),r.onCaughtError!==void 0&&(C=r.onCaughtError),r.onRecoverableError!==void 0&&(D=r.onRecoverableError),r.formState!==void 0&&(Y=r.formState)),a=T0(e,1,!0,a,r??null,c,p,Y,x,C,D,B0),a.context=E0(null),r=a.current,c=Ln(),c=oi(c),p=_i(c),p.callback=null,Wi(r,p,c),r=c,a.current.lanes=r,ks(a,r),Jl(a),e[pl]=a.current,Np(e),new Tm(a)},ph.version="19.2.4",ph}var Z0;function ZS(){if(Z0)return ty.exports;Z0=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(t){console.error(t)}}return i(),ty.exports=QS(),ty.exports}var KS=ZS();/**
|
|
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 K0="popstate";function k0(i){return typeof i=="object"&&i!=null&&"pathname"in i&&"search"in i&&"hash"in i&&"state"in i&&"key"in i}function kS(i={}){function t(s,o){var v;let f=(v=o.state)==null?void 0:v.masked,{pathname:d,search:m,hash:g}=f||s.location;return Xy("",{pathname:d,search:m,hash:g},o.state&&o.state.usr||null,o.state&&o.state.key||"default",f?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function n(s,o){return typeof o=="string"?o:wh(o)}return PS(t,n,null,i)}function qe(i,t){if(i===!1||i===null||typeof i>"u")throw new Error(t)}function hl(i,t){if(!i){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function JS(){return Math.random().toString(36).substring(2,10)}function J0(i,t){return{usr:i.state,key:i.key,idx:t,masked:i.unstable_mask?{pathname:i.pathname,search:i.search,hash:i.hash}:void 0}}function Xy(i,t,n=null,s,o){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof t=="string"?Nc(t):t,state:n,key:t&&t.key||s||JS(),unstable_mask:o}}function wh({pathname:i="/",search:t="",hash:n=""}){return t&&t!=="?"&&(i+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(i+=n.charAt(0)==="#"?n:"#"+n),i}function Nc(i){let t={};if(i){let n=i.indexOf("#");n>=0&&(t.hash=i.substring(n),i=i.substring(0,n));let s=i.indexOf("?");s>=0&&(t.search=i.substring(s),i=i.substring(0,s)),i&&(t.pathname=i)}return t}function PS(i,t,n,s={}){let{window:o=document.defaultView,v5Compat:f=!1}=s,d=o.history,m="POP",g=null,v=S();v==null&&(v=0,d.replaceState({...d.state,idx:v},""));function S(){return(d.state||{idx:null}).idx}function b(){m="POP";let R=S(),O=R==null?null:R-v;v=R,g&&g({action:m,location:M.location,delta:O})}function A(R,O){m="PUSH";let B=k0(R)?R:Xy(M.location,R,O);v=S()+1;let U=J0(B,v),G=M.createHref(B.unstable_mask||B);try{d.pushState(U,"",G)}catch(Z){if(Z instanceof DOMException&&Z.name==="DataCloneError")throw Z;o.location.assign(G)}f&&g&&g({action:m,location:M.location,delta:1})}function E(R,O){m="REPLACE";let B=k0(R)?R:Xy(M.location,R,O);v=S();let U=J0(B,v),G=M.createHref(B.unstable_mask||B);d.replaceState(U,"",G),f&&g&&g({action:m,location:M.location,delta:0})}function z(R){return WS(R)}let M={get action(){return m},get location(){return i(o,d)},listen(R){if(g)throw new Error("A history only accepts one active listener");return o.addEventListener(K0,b),g=R,()=>{o.removeEventListener(K0,b),g=null}},createHref(R){return t(o,R)},createURL:z,encodeLocation(R){let O=z(R);return{pathname:O.pathname,search:O.search,hash:O.hash}},push:A,replace:E,go(R){return d.go(R)}};return M}function WS(i,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),qe(n,"No window.location.(origin|href) available to create URL");let s=typeof i=="string"?i:wh(i);return s=s.replace(/ $/,"%20"),!t&&s.startsWith("//")&&(s=n+s),new URL(s,n)}function q1(i,t,n="/"){return FS(i,t,n,!1)}function FS(i,t,n,s){let o=typeof t=="string"?Nc(t):t,f=Ls(o.pathname||"/",n);if(f==null)return null;let d=Y1(i);IS(d);let m=null;for(let g=0;m==null&&g<d.length;++g){let v=ob(f);m=ub(d[g],v,s)}return m}function Y1(i,t=[],n=[],s="",o=!1){let f=(d,m,g=o,v)=>{let S={relativePath:v===void 0?d.path||"":v,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(s)&&g)return;qe(S.relativePath.startsWith(s),`Absolute route path "${S.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(s.length)}let b=Fl([s,S.relativePath]),A=n.concat(S);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}".`),Y1(d.children,t,A,b,g)),!(d.path==null&&!d.index)&&t.push({path:b,score:lb(b,d.index),routesMeta:A})};return i.forEach((d,m)=>{var g;if(d.path===""||!((g=d.path)!=null&&g.includes("?")))f(d,m);else for(let v of L1(d.path))f(d,m,!0,v)}),t}function L1(i){let t=i.split("/");if(t.length===0)return[];let[n,...s]=t,o=n.endsWith("?"),f=n.replace(/\?$/,"");if(s.length===0)return o?[f,""]:[f];let d=L1(s.join("/")),m=[];return m.push(...d.map(g=>g===""?f:[f,g].join("/"))),o&&m.push(...d),m.map(g=>i.startsWith("/")&&g===""?"/":g)}function IS(i){i.sort((t,n)=>t.score!==n.score?n.score-t.score:sb(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}var $S=/^:[\w-]+$/,tb=3,eb=2,nb=1,ab=10,ib=-2,P0=i=>i==="*";function lb(i,t){let n=i.split("/"),s=n.length;return n.some(P0)&&(s+=ib),t&&(s+=eb),n.filter(o=>!P0(o)).reduce((o,f)=>o+($S.test(f)?tb:f===""?nb:ab),s)}function sb(i,t){return i.length===t.length&&i.slice(0,-1).every((s,o)=>s===t[o])?i[i.length-1]-t[t.length-1]:0}function ub(i,t,n=!1){let{routesMeta:s}=i,o={},f="/",d=[];for(let m=0;m<s.length;++m){let g=s[m],v=m===s.length-1,S=f==="/"?t:t.slice(f.length)||"/",b=Pm({path:g.relativePath,caseSensitive:g.caseSensitive,end:v},S),A=g.route;if(!b&&v&&n&&!s[s.length-1].route.index&&(b=Pm({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},S)),!b)return null;Object.assign(o,b.params),d.push({params:o,pathname:Fl([f,b.pathname]),pathnameBase:db(Fl([f,b.pathnameBase])),route:A}),b.pathnameBase!=="/"&&(f=Fl([f,b.pathnameBase]))}return d}function Pm(i,t){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[n,s]=rb(i.path,i.caseSensitive,i.end),o=t.match(n);if(!o)return null;let f=o[0],d=f.replace(/(.)\/+$/,"$1"),m=o.slice(1);return{params:s.reduce((v,{paramName:S,isOptional:b},A)=>{if(S==="*"){let z=m[A]||"";d=f.slice(0,f.length-z.length).replace(/(.)\/+$/,"$1")}const E=m[A];return b&&!E?v[S]=void 0:v[S]=(E||"").replace(/%2F/g,"/"),v},{}),pathname:f,pathnameBase:d,pattern:i}}function rb(i,t=!1,n=!0){hl(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let s=[],o="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,g,v,S)=>{if(s.push({paramName:m,isOptional:g!=null}),g){let b=S.charAt(v+d.length);return b&&b!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return i.endsWith("*")?(s.push({paramName:"*"}),o+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":i!==""&&i!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),s]}function ob(i){try{return i.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return hl(!1,`The URL path "${i}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),i}}function Ls(i,t){if(t==="/")return i;if(!i.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,s=i.charAt(n);return s&&s!=="/"?null:i.slice(n)||"/"}var cb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function fb(i,t="/"){let{pathname:n,search:s="",hash:o=""}=typeof i=="string"?Nc(i):i,f;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?f=W0(n.substring(1),"/"):f=W0(n,t)):f=t,{pathname:f,search:mb(s),hash:pb(o)}}function W0(i,t){let n=t.replace(/\/+$/,"").split("/");return i.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function iy(i,t,n,s){return`Cannot include a '${i}' character in a manually specified \`to.${t}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function hb(i){return i.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function gg(i){let t=hb(i);return t.map((n,s)=>s===t.length-1?n.pathname:n.pathnameBase)}function lp(i,t,n,s=!1){let o;typeof i=="string"?o=Nc(i):(o={...i},qe(!o.pathname||!o.pathname.includes("?"),iy("?","pathname","search",o)),qe(!o.pathname||!o.pathname.includes("#"),iy("#","pathname","hash",o)),qe(!o.search||!o.search.includes("#"),iy("#","search","hash",o)));let f=i===""||o.pathname==="",d=f?"/":o.pathname,m;if(d==null)m=n;else{let b=t.length-1;if(!s&&d.startsWith("..")){let A=d.split("/");for(;A[0]==="..";)A.shift(),b-=1;o.pathname=A.join("/")}m=b>=0?t[b]:"/"}let g=fb(o,m),v=d&&d!=="/"&&d.endsWith("/"),S=(f||d===".")&&n.endsWith("/");return!g.pathname.endsWith("/")&&(v||S)&&(g.pathname+="/"),g}var Fl=i=>i.join("/").replace(/\/\/+/g,"/"),db=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),mb=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,pb=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i,yb=class{constructor(i,t,n,s=!1){this.status=i,this.statusText=t||"",this.internal=s,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function gb(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}function vb(i){return i.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var X1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function V1(i,t){let n=i;if(typeof n!="string"||!cb.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let s=n,o=!1;if(X1)try{let f=new URL(window.location.href),d=n.startsWith("//")?new URL(f.protocol+n):new URL(n),m=Ls(d.pathname,t);d.origin===f.origin&&m!=null?n=m+d.search+d.hash:o=!0}catch{hl(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:o,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Q1=["POST","PUT","PATCH","DELETE"];new Set(Q1);var xb=["GET",...Q1];new Set(xb);var Uc=X.createContext(null);Uc.displayName="DataRouter";var sp=X.createContext(null);sp.displayName="DataRouterState";var _b=X.createContext(!1),Z1=X.createContext({isTransitioning:!1});Z1.displayName="ViewTransition";var Sb=X.createContext(new Map);Sb.displayName="Fetchers";var bb=X.createContext(null);bb.displayName="Await";var ui=X.createContext(null);ui.displayName="Navigation";var Xh=X.createContext(null);Xh.displayName="Location";var dl=X.createContext({outlet:null,matches:[],isDataRoute:!1});dl.displayName="Route";var vg=X.createContext(null);vg.displayName="RouteError";var K1="REACT_ROUTER_ERROR",Tb="REDIRECT",Eb="ROUTE_ERROR_RESPONSE";function Cb(i){if(i.startsWith(`${K1}:${Tb}:{`))try{let t=JSON.parse(i.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 Ab(i){if(i.startsWith(`${K1}:${Eb}:{`))try{let t=JSON.parse(i.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new yb(t.status,t.statusText,t.data)}catch{}}function Mb(i,{relative:t}={}){qe(Bc(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:s}=X.useContext(ui),{hash:o,pathname:f,search:d}=Vh(i,{relative:t}),m=f;return n!=="/"&&(m=f==="/"?n:Fl([n,f])),s.createHref({pathname:m,search:d,hash:o})}function Bc(){return X.useContext(Xh)!=null}function Il(){return qe(Bc(),"useLocation() may be used only in the context of a <Router> component."),X.useContext(Xh).location}var k1="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function J1(i){X.useContext(ui).static||X.useLayoutEffect(i)}function up(){let{isDataRoute:i}=X.useContext(dl);return i?Xb():Rb()}function Rb(){qe(Bc(),"useNavigate() may be used only in the context of a <Router> component.");let i=X.useContext(Uc),{basename:t,navigator:n}=X.useContext(ui),{matches:s}=X.useContext(dl),{pathname:o}=Il(),f=JSON.stringify(gg(s)),d=X.useRef(!1);return J1(()=>{d.current=!0}),X.useCallback((g,v={})=>{if(hl(d.current,k1),!d.current)return;if(typeof g=="number"){n.go(g);return}let S=lp(g,JSON.parse(f),o,v.relative==="path");i==null&&t!=="/"&&(S.pathname=S.pathname==="/"?t:Fl([t,S.pathname])),(v.replace?n.replace:n.push)(S,v.state,v)},[t,n,f,o,i])}var zb=X.createContext(null);function Db(i){let t=X.useContext(dl).outlet;return X.useMemo(()=>t&&X.createElement(zb.Provider,{value:i},t),[t,i])}function Vh(i,{relative:t}={}){let{matches:n}=X.useContext(dl),{pathname:s}=Il(),o=JSON.stringify(gg(n));return X.useMemo(()=>lp(i,JSON.parse(o),s,t==="path"),[i,o,s,t])}function Ob(i,t){return P1(i,t)}function P1(i,t,n){var R;qe(Bc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=X.useContext(ui),{matches:o}=X.useContext(dl),f=o[o.length-1],d=f?f.params:{},m=f?f.pathname:"/",g=f?f.pathnameBase:"/",v=f&&f.route;{let O=v&&v.path||"";F1(m,!v||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${O}">) 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="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let S=Il(),b;if(t){let O=typeof t=="string"?Nc(t):t;qe(g==="/"||((R=O.pathname)==null?void 0:R.startsWith(g)),`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 "${g}" but pathname "${O.pathname}" was given in the \`location\` prop.`),b=O}else b=S;let A=b.pathname||"/",E=A;if(g!=="/"){let O=g.replace(/^\//,"").split("/");E="/"+A.replace(/^\//,"").split("/").slice(O.length).join("/")}let z=q1(i,{pathname:E});hl(v||z!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),hl(z==null||z[z.length-1].route.element!==void 0||z[z.length-1].route.Component!==void 0||z[z.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 M=Hb(z&&z.map(O=>Object.assign({},O,{params:Object.assign({},d,O.params),pathname:Fl([g,s.encodeLocation?s.encodeLocation(O.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?g:Fl([g,s.encodeLocation?s.encodeLocation(O.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathnameBase])})),o,n);return t&&M?X.createElement(Xh.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...b},navigationType:"POP"}},M):M}function Nb(){let i=Lb(),t=gb(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),n=i instanceof Error?i.stack:null,s="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:s},f={padding:"2px 4px",backgroundColor:s},d=null;return console.error("Error handled by React Router default ErrorBoundary:",i),d=X.createElement(X.Fragment,null,X.createElement("p",null,"💿 Hey developer 👋"),X.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",X.createElement("code",{style:f},"ErrorBoundary")," or"," ",X.createElement("code",{style:f},"errorElement")," prop on your route.")),X.createElement(X.Fragment,null,X.createElement("h2",null,"Unexpected Application Error!"),X.createElement("h3",{style:{fontStyle:"italic"}},t),n?X.createElement("pre",{style:o},n):null,d)}var Ub=X.createElement(Nb,null),W1=class extends X.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,t){return t.location!==i.location||t.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:t.error,location:t.location,revalidation:i.revalidation||t.revalidation}}componentDidCatch(i,t){this.props.onError?this.props.onError(i,t):console.error("React Router caught the following error during render",i)}render(){let i=this.state.error;if(this.context&&typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){const n=Ab(i.digest);n&&(i=n)}let t=i!==void 0?X.createElement(dl.Provider,{value:this.props.routeContext},X.createElement(vg.Provider,{value:i,children:this.props.component})):this.props.children;return this.context?X.createElement(Bb,{error:i},t):t}};W1.contextType=_b;var ly=new WeakMap;function Bb({children:i,error:t}){let{basename:n}=X.useContext(ui);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let s=Cb(t.digest);if(s){let o=ly.get(t);if(o)throw o;let f=V1(s.location,n);if(X1&&!ly.get(t))if(f.isExternal||s.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:s.replace}));throw ly.set(t,d),d}return X.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return i}function wb({routeContext:i,match:t,children:n}){let s=X.useContext(Uc);return s&&s.static&&s.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=t.route.id),X.createElement(dl.Provider,{value:i},n)}function Hb(i,t=[],n){let s=n==null?void 0:n.state;if(i==null){if(!s)return null;if(s.errors)i=s.matches;else if(t.length===0&&!s.initialized&&s.matches.length>0)i=s.matches;else return null}let o=i,f=s==null?void 0:s.errors;if(f!=null){let S=o.findIndex(b=>b.route.id&&(f==null?void 0:f[b.route.id])!==void 0);qe(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),o=o.slice(0,Math.min(o.length,S+1))}let d=!1,m=-1;if(n&&s){d=s.renderFallback;for(let S=0;S<o.length;S++){let b=o[S];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(m=S),b.route.id){let{loaderData:A,errors:E}=s,z=b.route.loader&&!A.hasOwnProperty(b.route.id)&&(!E||E[b.route.id]===void 0);if(b.route.lazy||z){n.isStatic&&(d=!0),m>=0?o=o.slice(0,m+1):o=[o[0]];break}}}}let g=n==null?void 0:n.onError,v=s&&g?(S,b)=>{var A,E;g(S,{location:s.location,params:((E=(A=s.matches)==null?void 0:A[0])==null?void 0:E.params)??{},unstable_pattern:vb(s.matches),errorInfo:b})}:void 0;return o.reduceRight((S,b,A)=>{let E,z=!1,M=null,R=null;s&&(E=f&&b.route.id?f[b.route.id]:void 0,M=b.route.errorElement||Ub,d&&(m<0&&A===0?(F1("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),z=!0,R=null):m===A&&(z=!0,R=b.route.hydrateFallbackElement||null)));let O=t.concat(o.slice(0,A+1)),B=()=>{let U;return E?U=M:z?U=R:b.route.Component?U=X.createElement(b.route.Component,null):b.route.element?U=b.route.element:U=S,X.createElement(wb,{match:b,routeContext:{outlet:S,matches:O,isDataRoute:s!=null},children:U})};return s&&(b.route.ErrorBoundary||b.route.errorElement||A===0)?X.createElement(W1,{location:s.location,revalidation:s.revalidation,component:M,error:E,children:B(),routeContext:{outlet:null,matches:O,isDataRoute:!0},onError:v}):B()},null)}function xg(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Gb(i){let t=X.useContext(Uc);return qe(t,xg(i)),t}function jb(i){let t=X.useContext(sp);return qe(t,xg(i)),t}function qb(i){let t=X.useContext(dl);return qe(t,xg(i)),t}function _g(i){let t=qb(i),n=t.matches[t.matches.length-1];return qe(n.route.id,`${i} can only be used on routes that contain a unique "id"`),n.route.id}function Yb(){return _g("useRouteId")}function Lb(){var s;let i=X.useContext(vg),t=jb("useRouteError"),n=_g("useRouteError");return i!==void 0?i:(s=t.errors)==null?void 0:s[n]}function Xb(){let{router:i}=Gb("useNavigate"),t=_g("useNavigate"),n=X.useRef(!1);return J1(()=>{n.current=!0}),X.useCallback(async(o,f={})=>{hl(n.current,k1),n.current&&(typeof o=="number"?await i.navigate(o):await i.navigate(o,{fromRouteId:t,...f}))},[i,t])}var F0={};function F1(i,t,n){!t&&!F0[i]&&(F0[i]=!0,hl(!1,n))}X.memo(Vb);function Vb({routes:i,future:t,state:n,isStatic:s,onError:o}){return P1(i,void 0,{state:n,isStatic:s,onError:o})}function Qb({to:i,replace:t,state:n,relative:s}){qe(Bc(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=X.useContext(ui);hl(!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:f}=X.useContext(dl),{pathname:d}=Il(),m=up(),g=lp(i,gg(f),d,s==="path"),v=JSON.stringify(g);return X.useEffect(()=>{m(JSON.parse(v),{replace:t,state:n,relative:s})},[m,v,s,t,n]),null}function Zb(i){return Db(i.context)}function Bu(i){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 Kb({basename:i="/",children:t=null,location:n,navigationType:s="POP",navigator:o,static:f=!1,unstable_useTransitions:d}){qe(!Bc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=i.replace(/^\/*/,"/"),g=X.useMemo(()=>({basename:m,navigator:o,static:f,unstable_useTransitions:d,future:{}}),[m,o,f,d]);typeof n=="string"&&(n=Nc(n));let{pathname:v="/",search:S="",hash:b="",state:A=null,key:E="default",unstable_mask:z}=n,M=X.useMemo(()=>{let R=Ls(v,m);return R==null?null:{location:{pathname:R,search:S,hash:b,state:A,key:E,unstable_mask:z},navigationType:s}},[m,v,S,b,A,E,s,z]);return hl(M!=null,`<Router basename="${m}"> is not able to match the URL "${v}${S}${b}" because it does not start with the basename, so the <Router> won't render anything.`),M==null?null:X.createElement(ui.Provider,{value:g},X.createElement(Xh.Provider,{children:t,value:M}))}function kb({children:i,location:t}){return Ob(Vy(i),t)}function Vy(i,t=[]){let n=[];return X.Children.forEach(i,(s,o)=>{if(!X.isValidElement(s))return;let f=[...t,o];if(s.type===X.Fragment){n.push.apply(n,Vy(s.props.children,f));return}qe(s.type===Bu,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),qe(!s.props.index||!s.props.children,"An index route cannot have child routes.");let d={id:s.props.id||f.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,middleware:s.props.middleware,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(d.children=Vy(s.props.children,f)),n.push(d)}),n}var Qm="get",Zm="application/x-www-form-urlencoded";function rp(i){return typeof HTMLElement<"u"&&i instanceof HTMLElement}function Jb(i){return rp(i)&&i.tagName.toLowerCase()==="button"}function Pb(i){return rp(i)&&i.tagName.toLowerCase()==="form"}function Wb(i){return rp(i)&&i.tagName.toLowerCase()==="input"}function Fb(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function Ib(i,t){return i.button===0&&(!t||t==="_self")&&!Fb(i)}var Am=null;function $b(){if(Am===null)try{new FormData(document.createElement("form"),0),Am=!1}catch{Am=!0}return Am}var t2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function sy(i){return i!=null&&!t2.has(i)?(hl(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Zm}"`),null):i}function e2(i,t){let n,s,o,f,d;if(Pb(i)){let m=i.getAttribute("action");s=m?Ls(m,t):null,n=i.getAttribute("method")||Qm,o=sy(i.getAttribute("enctype"))||Zm,f=new FormData(i)}else if(Jb(i)||Wb(i)&&(i.type==="submit"||i.type==="image")){let m=i.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=i.getAttribute("formaction")||m.getAttribute("action");if(s=g?Ls(g,t):null,n=i.getAttribute("formmethod")||m.getAttribute("method")||Qm,o=sy(i.getAttribute("formenctype"))||sy(m.getAttribute("enctype"))||Zm,f=new FormData(m,i),!$b()){let{name:v,type:S,value:b}=i;if(S==="image"){let A=v?`${v}.`:"";f.append(`${A}x`,"0"),f.append(`${A}y`,"0")}else v&&f.append(v,b)}}else{if(rp(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Qm,s=null,o=Zm,d=i}return f&&o==="text/plain"&&(d=f,f=void 0),{action:s,method:n.toLowerCase(),encType:o,formData:f,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Sg(i,t){if(i===!1||i===null||typeof i>"u")throw new Error(t)}function n2(i,t,n,s){let o=typeof i=="string"?new URL(i,typeof window>"u"?"server://singlefetch/":window.location.origin):i;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${s}`:o.pathname=`${o.pathname}.${s}`:o.pathname==="/"?o.pathname=`_root.${s}`:t&&Ls(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${s}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${s}`,o}async function a2(i,t){if(i.id in t)return t[i.id];try{let n=await import(i.module);return t[i.id]=n,n}catch(n){return console.error(`Error loading route module \`${i.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function i2(i){return i==null?!1:i.href==null?i.rel==="preload"&&typeof i.imageSrcSet=="string"&&typeof i.imageSizes=="string":typeof i.rel=="string"&&typeof i.href=="string"}async function l2(i,t,n){let s=await Promise.all(i.map(async o=>{let f=t.routes[o.route.id];if(f){let d=await a2(f,n);return d.links?d.links():[]}return[]}));return o2(s.flat(1).filter(i2).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function I0(i,t,n,s,o,f){let d=(g,v)=>n[v]?g.route.id!==n[v].route.id:!0,m=(g,v)=>{var S;return n[v].pathname!==g.pathname||((S=n[v].route.path)==null?void 0:S.endsWith("*"))&&n[v].params["*"]!==g.params["*"]};return f==="assets"?t.filter((g,v)=>d(g,v)||m(g,v)):f==="data"?t.filter((g,v)=>{var b;let S=s.routes[g.route.id];if(!S||!S.hasLoader)return!1;if(d(g,v)||m(g,v))return!0;if(g.route.shouldRevalidate){let A=g.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((b=n[0])==null?void 0:b.params)||{},nextUrl:new URL(i,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof A=="boolean")return A}return!0}):[]}function s2(i,t,{includeHydrateFallback:n}={}){return u2(i.map(s=>{let o=t.routes[s.route.id];if(!o)return[];let f=[o.module];return o.clientActionModule&&(f=f.concat(o.clientActionModule)),o.clientLoaderModule&&(f=f.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(f=f.concat(o.hydrateFallbackModule)),o.imports&&(f=f.concat(o.imports)),f}).flat(1))}function u2(i){return[...new Set(i)]}function r2(i){let t={},n=Object.keys(i).sort();for(let s of n)t[s]=i[s];return t}function o2(i,t){let n=new Set;return new Set(t),i.reduce((s,o)=>{let f=JSON.stringify(r2(o));return n.has(f)||(n.add(f),s.push({key:f,link:o})),s},[])}function I1(){let i=X.useContext(Uc);return Sg(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function c2(){let i=X.useContext(sp);return Sg(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var bg=X.createContext(void 0);bg.displayName="FrameworkContext";function $1(){let i=X.useContext(bg);return Sg(i,"You must render this element inside a <HydratedRouter> element"),i}function f2(i,t){let n=X.useContext(bg),[s,o]=X.useState(!1),[f,d]=X.useState(!1),{onFocus:m,onBlur:g,onMouseEnter:v,onMouseLeave:S,onTouchStart:b}=t,A=X.useRef(null);X.useEffect(()=>{if(i==="render"&&d(!0),i==="viewport"){let M=O=>{O.forEach(B=>{d(B.isIntersecting)})},R=new IntersectionObserver(M,{threshold:.5});return A.current&&R.observe(A.current),()=>{R.disconnect()}}},[i]),X.useEffect(()=>{if(s){let M=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(M)}}},[s]);let E=()=>{o(!0)},z=()=>{o(!1),d(!1)};return n?i!=="intent"?[f,A,{}]:[f,A,{onFocus:yh(m,E),onBlur:yh(g,z),onMouseEnter:yh(v,E),onMouseLeave:yh(S,z),onTouchStart:yh(b,E)}]:[!1,A,{}]}function yh(i,t){return n=>{i&&i(n),n.defaultPrevented||t(n)}}function h2({page:i,...t}){let{router:n}=I1(),s=X.useMemo(()=>q1(n.routes,i,n.basename),[n.routes,i,n.basename]);return s?X.createElement(m2,{page:i,matches:s,...t}):null}function d2(i){let{manifest:t,routeModules:n}=$1(),[s,o]=X.useState([]);return X.useEffect(()=>{let f=!1;return l2(i,t,n).then(d=>{f||o(d)}),()=>{f=!0}},[i,t,n]),s}function m2({page:i,matches:t,...n}){let s=Il(),{future:o,manifest:f,routeModules:d}=$1(),{basename:m}=I1(),{loaderData:g,matches:v}=c2(),S=X.useMemo(()=>I0(i,t,v,f,s,"data"),[i,t,v,f,s]),b=X.useMemo(()=>I0(i,t,v,f,s,"assets"),[i,t,v,f,s]),A=X.useMemo(()=>{if(i===s.pathname+s.search+s.hash)return[];let M=new Set,R=!1;if(t.forEach(B=>{var G;let U=f.routes[B.route.id];!U||!U.hasLoader||(!S.some(Z=>Z.route.id===B.route.id)&&B.route.id in g&&((G=d[B.route.id])!=null&&G.shouldRevalidate)||U.hasClientLoader?R=!0:M.add(B.route.id))}),M.size===0)return[];let O=n2(i,m,o.unstable_trailingSlashAwareDataRequests,"data");return R&&M.size>0&&O.searchParams.set("_routes",t.filter(B=>M.has(B.route.id)).map(B=>B.route.id).join(",")),[O.pathname+O.search]},[m,o.unstable_trailingSlashAwareDataRequests,g,s,f,S,t,i,d]),E=X.useMemo(()=>s2(b,f),[b,f]),z=d2(b);return X.createElement(X.Fragment,null,A.map(M=>X.createElement("link",{key:M,rel:"prefetch",as:"fetch",href:M,...n})),E.map(M=>X.createElement("link",{key:M,rel:"modulepreload",href:M,...n})),z.map(({key:M,link:R})=>X.createElement("link",{key:M,nonce:n.nonce,...R,crossOrigin:R.crossOrigin??n.crossOrigin})))}function p2(...i){return t=>{i.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var y2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{y2&&(window.__reactRouterVersion="7.13.1")}catch{}function g2({basename:i,children:t,unstable_useTransitions:n,window:s}){let o=X.useRef();o.current==null&&(o.current=kS({window:s,v5Compat:!0}));let f=o.current,[d,m]=X.useState({action:f.action,location:f.location}),g=X.useCallback(v=>{n===!1?m(v):X.startTransition(()=>m(v))},[n]);return X.useLayoutEffect(()=>f.listen(g),[f,g]),X.createElement(Kb,{basename:i,children:t,location:d.location,navigationType:d.action,navigator:f,unstable_useTransitions:n})}var tx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ex=X.forwardRef(function({onClick:t,discover:n="render",prefetch:s="none",relative:o,reloadDocument:f,replace:d,unstable_mask:m,state:g,target:v,to:S,preventScrollReset:b,viewTransition:A,unstable_defaultShouldRevalidate:E,...z},M){let{basename:R,navigator:O,unstable_useTransitions:B}=X.useContext(ui),U=typeof S=="string"&&tx.test(S),G=V1(S,R);S=G.to;let Z=Mb(S,{relative:o}),Q=Il(),K=null;if(m){let Dt=lp(m,[],Q.unstable_mask?Q.unstable_mask.pathname:"/",!0);R!=="/"&&(Dt.pathname=Dt.pathname==="/"?R:Fl([R,Dt.pathname])),K=O.createHref(Dt)}let[gt,ct,ht]=f2(s,z),dt=_2(S,{replace:d,unstable_mask:m,state:g,target:v,preventScrollReset:b,relative:o,viewTransition:A,unstable_defaultShouldRevalidate:E,unstable_useTransitions:B});function vt(Dt){t&&t(Dt),Dt.defaultPrevented||dt(Dt)}let _t=!(G.isExternal||f),xt=X.createElement("a",{...z,...ht,href:(_t?K:void 0)||G.absoluteURL||Z,onClick:_t?vt:t,ref:p2(M,ct),target:v,"data-discover":!U&&n==="render"?"true":void 0});return gt&&!U?X.createElement(X.Fragment,null,xt,X.createElement(h2,{page:Z})):xt});ex.displayName="Link";var Eh=X.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:s="",end:o=!1,style:f,to:d,viewTransition:m,children:g,...v},S){let b=Vh(d,{relative:v.relative}),A=Il(),E=X.useContext(sp),{navigator:z,basename:M}=X.useContext(ui),R=E!=null&&C2(b)&&m===!0,O=z.encodeLocation?z.encodeLocation(b).pathname:b.pathname,B=A.pathname,U=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;n||(B=B.toLowerCase(),U=U?U.toLowerCase():null,O=O.toLowerCase()),U&&M&&(U=Ls(U,M)||U);const G=O!=="/"&&O.endsWith("/")?O.length-1:O.length;let Z=B===O||!o&&B.startsWith(O)&&B.charAt(G)==="/",Q=U!=null&&(U===O||!o&&U.startsWith(O)&&U.charAt(O.length)==="/"),K={isActive:Z,isPending:Q,isTransitioning:R},gt=Z?t:void 0,ct;typeof s=="function"?ct=s(K):ct=[s,Z?"active":null,Q?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let ht=typeof f=="function"?f(K):f;return X.createElement(ex,{...v,"aria-current":gt,className:ct,ref:S,style:ht,to:d,viewTransition:m},typeof g=="function"?g(K):g)});Eh.displayName="NavLink";var v2=X.forwardRef(({discover:i="render",fetcherKey:t,navigate:n,reloadDocument:s,replace:o,state:f,method:d=Qm,action:m,onSubmit:g,relative:v,preventScrollReset:S,viewTransition:b,unstable_defaultShouldRevalidate:A,...E},z)=>{let{unstable_useTransitions:M}=X.useContext(ui),R=T2(),O=E2(m,{relative:v}),B=d.toLowerCase()==="get"?"get":"post",U=typeof m=="string"&&tx.test(m),G=Z=>{if(g&&g(Z),Z.defaultPrevented)return;Z.preventDefault();let Q=Z.nativeEvent.submitter,K=(Q==null?void 0:Q.getAttribute("formmethod"))||d,gt=()=>R(Q||Z.currentTarget,{fetcherKey:t,method:K,navigate:n,replace:o,state:f,relative:v,preventScrollReset:S,viewTransition:b,unstable_defaultShouldRevalidate:A});M&&n!==!1?X.startTransition(()=>gt()):gt()};return X.createElement("form",{ref:z,method:B,action:O,onSubmit:s?g:G,...E,"data-discover":!U&&i==="render"?"true":void 0})});v2.displayName="Form";function x2(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function nx(i){let t=X.useContext(Uc);return qe(t,x2(i)),t}function _2(i,{target:t,replace:n,unstable_mask:s,state:o,preventScrollReset:f,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:g,unstable_useTransitions:v}={}){let S=up(),b=Il(),A=Vh(i,{relative:d});return X.useCallback(E=>{if(Ib(E,t)){E.preventDefault();let z=n!==void 0?n:wh(b)===wh(A),M=()=>S(i,{replace:z,unstable_mask:s,state:o,preventScrollReset:f,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:g});v?X.startTransition(()=>M()):M()}},[b,S,A,n,s,o,t,i,f,d,m,g,v])}var S2=0,b2=()=>`__${String(++S2)}__`;function T2(){let{router:i}=nx("useSubmit"),{basename:t}=X.useContext(ui),n=Yb(),s=i.fetch,o=i.navigate;return X.useCallback(async(f,d={})=>{let{action:m,method:g,encType:v,formData:S,body:b}=e2(f,t);if(d.navigate===!1){let A=d.fetcherKey||b2();await s(A,n,d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:S,body:b,formMethod:d.method||g,formEncType:d.encType||v,flushSync:d.flushSync})}else await o(d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:S,body:b,formMethod:d.method||g,formEncType:d.encType||v,replace:d.replace,state:d.state,fromRouteId:n,flushSync:d.flushSync,viewTransition:d.viewTransition})},[s,o,t,n])}function E2(i,{relative:t}={}){let{basename:n}=X.useContext(ui),s=X.useContext(dl);qe(s,"useFormAction must be used inside a RouteContext");let[o]=s.matches.slice(-1),f={...Vh(i||".",{relative:t})},d=Il();if(i==null){f.search=d.search;let m=new URLSearchParams(f.search),g=m.getAll("index");if(g.some(S=>S==="")){m.delete("index"),g.filter(b=>b).forEach(b=>m.append("index",b));let S=m.toString();f.search=S?`?${S}`:""}}return(!i||i===".")&&o.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(f.pathname=f.pathname==="/"?n:Fl([n,f.pathname])),wh(f)}function C2(i,{relative:t}={}){let n=X.useContext(Z1);qe(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=nx("useViewTransitionState"),o=Vh(i,{relative:t});if(!n.isTransitioning)return!1;let f=Ls(n.currentLocation.pathname,s)||n.currentLocation.pathname,d=Ls(n.nextLocation.pathname,s)||n.nextLocation.pathname;return Pm(o.pathname,d)!=null||Pm(o.pathname,f)!=null}const $0=i=>{let t;const n=new Set,s=(v,S)=>{const b=typeof v=="function"?v(t):v;if(!Object.is(b,t)){const A=t;t=S??(typeof b!="object"||b===null)?b:Object.assign({},t,b),n.forEach(E=>E(t,A))}},o=()=>t,m={setState:s,getState:o,getInitialState:()=>g,subscribe:v=>(n.add(v),()=>n.delete(v))},g=t=i(s,o,m);return m},A2=(i=>i?$0(i):$0),M2=i=>i;function R2(i,t=M2){const n=Cm.useSyncExternalStore(i.subscribe,Cm.useCallback(()=>t(i.getState()),[i,t]),Cm.useCallback(()=>t(i.getInitialState()),[i,t]));return Cm.useDebugValue(n),n}const tv=i=>{const t=A2(i),n=s=>R2(t,s);return Object.assign(n,t),n},op=(i=>i?tv(i):tv),cl=op(i=>({user:null,isAuthenticated:!1,loading:!1,error:null,login:async(t,n)=>{i({loading:!0,error:null});try{const s=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t,password:n}),credentials:"include"}),o=await s.json();if(!s.ok){i({loading:!1,error:o.error||"Login failed"});return}i({user:o.user,isAuthenticated:!0,loading:!1,error:null})}catch{i({loading:!1,error:"Network error"})}},logout:async()=>{try{await fetch("/api/auth/logout",{method:"POST",credentials:"include"})}catch{}i({user:null,isAuthenticated:!1,error:null})},checkAuth:async()=>{i({loading:!0});try{const t=await fetch("/api/auth/me",{credentials:"include"});if(t.ok){const n=await t.json();i({user:n.user,isAuthenticated:!0,loading:!1})}else i({user:null,isAuthenticated:!1,loading:!1})}catch{i({user:null,isAuthenticated:!1,loading:!1})}},reset:()=>i({user:null,isAuthenticated:!1,loading:!1,error:null})})),Ra=op((i,t)=>({squads:[],selectedSquad:null,activeStates:{},fetchSquads:async()=>{try{const n=await fetch("/api/squads",{credentials:"include"});if(n.ok){const s=await n.json();i({squads:s.squads})}}catch{}},selectSquad:n=>i({selectedSquad:n}),setSquadState:(n,s)=>i(o=>({activeStates:{...o.activeStates,[n]:s}})),clearSquadState:n=>i(s=>{const{[n]:o,...f}=s.activeStates;return{activeStates:f}}),reset:()=>i({squads:[],selectedSquad:null,activeStates:{}})}));let z2=0;function ev(){return`local-${Date.now()}-${++z2}`}const Oi=op((i,t)=>({messages:[],conversationId:null,streaming:!1,streamingText:"",error:null,addUserMessage:n=>{const s={id:ev(),role:"user",content:n,createdAt:new Date().toISOString()};i(o=>({messages:[...o.messages,s],error:null}))},setConversationId:n=>{i({conversationId:n})},startStreaming:()=>{i({streaming:!0,streamingText:"",error:null})},appendChunk:n=>{i(s=>({streamingText:s.streamingText+n}))},finishStreaming:n=>{const{streamingText:s}=t(),o={id:n,role:"assistant",content:s,createdAt:new Date().toISOString()};i(f=>({messages:[...f.messages,o],streaming:!1,streamingText:""}))},addAgentDm:n=>{const s={id:ev(),role:"agent_dm",content:n.content,agentId:n.agentId,agentName:n.agentName,createdAt:new Date().toISOString()};i(o=>({messages:[...o.messages,s]}))},setError:n=>{i({error:n,streaming:!1,streamingText:""})},loadHistory:async n=>{try{const s=await fetch(`/api/squads/${n}/conversations`,{credentials:"include"});if(!s.ok)return;const o=await s.json();if(!o.data||o.data.length===0){i({conversationId:null,messages:[]});return}const f=o.data[0];i({conversationId:f.id});const d=await fetch(`/api/conversations/${f.id}/messages`,{credentials:"include"});if(!d.ok)return;const g=((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}));i({messages:g})}catch{}},reset:()=>i({messages:[],conversationId:null,streaming:!1,streamingText:"",error:null})}));function D2(i){const n=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`,s=new WebSocket(n),o=[];let f=!0;function d(m){s.readyState===WebSocket.OPEN?s.send(JSON.stringify(m)):s.readyState===WebSocket.CONNECTING&&o.push(m)}return s.onopen=()=>{var m,g;f||(g=(m=i.current).onReconnect)==null||g.call(m),f=!1;for(const v of o)s.send(JSON.stringify(v));o.length=0},s.onmessage=m=>{var g,v,S,b,A,E,z,M,R,O,B;try{const U=JSON.parse(m.data),G=i.current;switch(U.type){case"squad:state":(g=G.onSquadState)==null||g.call(G,U.squadName,U.state);break;case"squad:inactive":(v=G.onSquadInactive)==null||v.call(G,U.squadName,U.reason);break;case"chat:chunk":(S=G.onChatChunk)==null||S.call(G,U.squadName,U.conversationId,U.delta);break;case"chat:done":(b=G.onChatDone)==null||b.call(G,U.squadName,U.conversationId,U.messageId);break;case"chat:error":(A=G.onChatError)==null||A.call(G,U.squadName,U.error);break;case"chat:agent_dm":(E=G.onChatAgentDm)==null||E.call(G,U.squadName,U.conversationId,U.agentId,U.agentName,U.message);break;case"chat:conversation_created":(z=G.onChatConversationCreated)==null||z.call(G,U.squadName,U.conversationId);break;case"agent:output_chunk":(M=G.onAgentOutputChunk)==null||M.call(G,U.squadName,U.agentId,U.agentName,U.delta);break;case"agent:step_start":(R=G.onAgentStepStart)==null||R.call(G,U.squadName,U.agentId,U.agentName,U.stepIndex,U.stepLabel);break;case"agent:step_complete":(O=G.onAgentStepComplete)==null||O.call(G,U.squadName,U.agentId,U.agentName,U.stepIndex,U.stepLabel);break;case"squad:checkpoint":(B=G.onSquadCheckpoint)==null||B.call(G,U.squadName,U.agentId,U.agentName,U.question);break}}catch{}},{subscribe:m=>{d({type:"squad:subscribe",squadName:m})},unsubscribe:m=>{d({type:"squad:unsubscribe",squadName:m})},sendChat:(m,g)=>{d({type:"chat:send",squadName:m,message:g})},newConversation:m=>{d({type:"chat:new_conversation",squadName:m})},sendCheckpointResponse:(m,g)=>{d({type:"squad:checkpoint_response",squadName:m,answer:g})},disconnect:()=>{s.close()}}}function O2(i={}){const t=X.useRef(null),n=X.useRef(i),s=X.useRef(new Set);n.current=i,X.useEffect(()=>{const g=D2(n);t.current=g;for(const v of s.current)g.subscribe(v);return()=>{g.disconnect()}},[]);const o=X.useCallback(g=>{var v;s.current.add(g),(v=t.current)==null||v.subscribe(g)},[]),f=X.useCallback(g=>{var v;s.current.delete(g),(v=t.current)==null||v.unsubscribe(g)},[]),d=X.useCallback((g,v)=>{var S;(S=t.current)==null||S.sendChat(g,v)},[]),m=X.useCallback((g,v)=>{var S;(S=t.current)==null||S.sendCheckpointResponse(g,v)},[]);return{subscribe:o,unsubscribe:f,sendChat:d,sendCheckpointResponse:m}}const N2={idle:"#888",working:"#4caf50",delivering:"#4fc3f7",done:"#4caf50",checkpoint:"#ff9800",running:"#4caf50",completed:"#4caf50"},U2={idle:"○",working:"●",delivering:"→",done:"✓",checkpoint:"◆",running:"●",completed:"✓"};function B2({status:i}){if(!i)return null;const t=N2[i]||"#888",n=U2[i]||"○";return L.jsxs("span",{style:{color:t,fontSize:"0.75rem"},children:[n," ",i]})}function w2({squad:i,selected:t,onClick:n}){return L.jsxs("div",{onClick:n,style:{padding:"8px 12px",cursor:"pointer",borderRadius:"4px",background:t?"#1a3a5c":"transparent",borderLeft:t?"2px solid #4caf50":"2px solid transparent",marginBottom:"4px"},children:[L.jsx("div",{style:{fontSize:"0.875rem",color:t?"#e0e0e0":"#aaa"},children:i.name}),L.jsx(B2,{status:i.status})]})}function H2({squads:i,selectedSquad:t,onSelect:n}){return L.jsxs("div",{style:{padding:"8px"},children:[L.jsx("div",{style:{color:"#888",fontSize:"0.7rem",textTransform:"uppercase",marginBottom:"8px",padding:"0 12px"},children:"Squads"}),i.length===0&&L.jsx("div",{style:{padding:"8px 12px",color:"#666",fontSize:"0.8rem"},children:"No squads found"}),i.map(s=>L.jsx(w2,{squad:s,selected:s.code===t,onClick:()=>n(s.code)},s.code))]})}function G2(i){const t=Math.floor(i/3600),n=Math.floor(i%3600/60),s=i%60,o=f=>f.toString().padStart(2,"0");return t>0?`${t}h ${o(n)}m ${o(s)}s`:`${n}m ${o(s)}s`}function j2({state:i}){const[t,n]=X.useState(0);return X.useEffect(()=>{if(!(i!=null&&i.startedAt)||i.status!=="running"){n(0);return}const s=new Date(i.startedAt).getTime(),o=()=>n(Math.floor((Date.now()-s)/1e3));o();const f=setInterval(o,1e3);return()=>clearInterval(f)},[i==null?void 0:i.startedAt,i==null?void 0:i.status]),i?L.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:[L.jsxs("span",{children:["Step ",i.step.current,"/",i.step.total,": ",i.step.label]}),i.status==="running"&&L.jsxs("span",{children:["Elapsed: ",G2(t)]}),i.handoff&&L.jsxs("span",{style:{color:"#4caf50"},children:[i.handoff.from," → ",i.handoff.to]})]}):L.jsx("div",{})}let Qy=null;function q2(i){Qy=i}function Y2(i,t){Qy&&Qy(i,t)}let Zy=null;function L2(i){Zy=i}function X2(i,t){Zy&&Zy(i,t)}const qt=32,Km=96,ax=64,la={floor:3813150,floorPlank:4865838,wall:16117992,desk:9139029,deskTop:10518624,deskShadow:7033653,monitor:1710638,monitorScreen:1450302,plant:5025616,pot:9127187,bookshelf:9139029,bookColors:[15022389,2001125,4431943,16750592,9315498]},Ky=[5227511,5025616,16750592,15022389,9315498,16771899],V2={idle:8947848,working:5025616,delivering:5227511,done:5025616,checkpoint:16750592},Mm={counter:4073251,machine:4342338,machineLight:16711680,cup:14142664},uy={table:5125166,chair:6111287,border:4073251},_c={background:1713022,statusRunning:5025616,statusIdle:8947848,statusCheckpoint:16750592},js=640,Cc=480,nv=64,Q2=64,Z2=80,K2=Km+32,k2=ax+48,av=2,iv=3;function lv(i,t,n){const s=Math.max(0,Math.min(1,n));return i+(t-i)*s}function J2(i){return i<.5?2*i*i:1-Math.pow(-2*i+2,2)/2}function P2(i,t){const n=i%iv,s=Math.floor(i/iv);return{x:n*(js+nv),y:s*(Cc+nv)}}function Rh(i,t){const n=i%av,s=Math.floor(i/av);return{x:t.x+Q2+n*K2,y:t.y+Z2+s*k2}}function zh(i){return{x:i.x+js-80,y:i.y+Cc-80}}function ix(i){return{x:i.x+js-160,y:i.y+Math.floor(Cc/2)}}const sv=500,uv=50;let rv=0;function ov(i){return{idle:"idle",working:"working",delivering:"walking",done:"idle",checkpoint:"checkpoint"}[i]??"idle"}const Ze=op(i=>({rooms:[],activeRoom:null,bubbles:{},activityLog:{},checkpoints:{},agentVisuals:{},appendBubble:(t,n,s)=>{const o=`${t}:${n}`;i(f=>{var g;let m=(((g=f.bubbles[o])==null?void 0:g.text)??"")+s;return m.length>sv&&(m=m.slice(m.length-sv)),{bubbles:{...f.bubbles,[o]:{text:m,updatedAt:Date.now()}}}})},clearBubble:(t,n)=>{const s=`${t}:${n}`;i(o=>{const{[s]:f,...d}=o.bubbles;return{bubbles:d}})},clearAllBubbles:()=>i({bubbles:{}}),addActivity:(t,n,s)=>{const f={id:++rv,agentName:n,action:s,timestamp:Date.now()};i(d=>{var S;const g=[...((S=d.activityLog[t])==null?void 0:S.entries)??[],f],v=g.length>uv?g.slice(g.length-uv):g;return{activityLog:{...d.activityLog,[t]:{entries:v}}}})},setCheckpoint:(t,n,s,o)=>i(f=>({checkpoints:{...f.checkpoints,[t]:{agentId:n,agentName:s,question:o}}})),clearCheckpoint:t=>i(n=>{const{[t]:s,...o}=n.checkpoints;return{checkpoints:o}}),setActiveRoom:t=>i({activeRoom:t}),syncRooms:t=>i(n=>{const s=t;let o;return s.length===0?o=null:n.activeRoom===null||!s.includes(n.activeRoom)?o=s[0]:o=n.activeRoom,{rooms:s,activeRoom:o}}),setAgents:(t,n)=>i(s=>{const o=s.agentVisuals[t]??[],f=new Map(o.map(g=>[g.id,g])),d={x:0,y:0},m=n.map((g,v)=>{const S=f.get(g.id);if(S){const E=g.status?ov(g.status):S.status,z=E!==S.status;let M=S.targetPosition;return z&&(E==="working"||E==="checkpoint"?M=Rh(v,d):M=zh(d)),{...S,name:g.name,deskIndex:v,status:E,targetPosition:M}}const b=g.status?ov(g.status):"idle",A=b==="working"||b==="checkpoint"?Rh(v,d):zh(d);return{id:g.id,name:g.name,colorIndex:v%6,status:b,deskIndex:v,position:A,targetPosition:null}});return{agentVisuals:{...s.agentVisuals,[t]:m}}}),setAgentStatus:(t,n,s)=>i(o=>{const f=o.agentVisuals[t];if(!f)return o;const d={x:0,y:0},m=f.map(g=>{if(g.id!==n)return g;let v;return s==="working"||s==="checkpoint"?v=Rh(g.deskIndex,d):v=zh(d),{...g,status:s,targetPosition:v}});return{agentVisuals:{...o.agentVisuals,[t]:m}}}),reset:()=>{rv=0,i({rooms:[],activeRoom:null,bubbles:{},activityLog:{},checkpoints:{},agentVisuals:{}})}}));function W2(){const i=cl(H=>H.user),t=cl(H=>H.isAuthenticated),n=cl(H=>H.loading),s=cl(H=>H.logout),o=cl(H=>H.checkAuth),f=up(),d=Il(),m=d.pathname==="/office"||d.pathname==="/",g=Ra(H=>H.squads),v=Ra(H=>H.selectedSquad),S=Ra(H=>v?H.activeStates[v]:null),b=Ra(H=>H.fetchSquads),A=Ra(H=>H.selectSquad),E=Ra(H=>H.setSquadState),z=Ra(H=>H.clearSquadState),M=X.useCallback((H,at)=>{E(H,at);const et=Ze.getState();et.rooms.includes(H)||et.syncRooms([...et.rooms,H]),at.status!=="checkpoint"&&et.clearCheckpoint(H),at.agents&&et.setAgents(H,at.agents.map(ft=>({id:ft.id,name:ft.name,status:ft.status})))},[E]),R=X.useCallback(H=>{z(H);const at=Ze.getState(),et=at.agentVisuals[H];if(et)for(const ft of et)at.setAgentStatus(H,ft.id,"idle")},[z]),O=X.useCallback((H,at)=>{Oi.getState().setConversationId(at)},[]),B=X.useCallback((H,at,et)=>{const ft=Oi.getState();ft.streaming||ft.startStreaming(),ft.appendChunk(et)},[]),U=X.useCallback((H,at,et)=>{Oi.getState().finishStreaming(et)},[]),G=X.useCallback((H,at)=>{Oi.getState().setError(at)},[]),Z=X.useCallback((H,at,et,ft,j)=>{Oi.getState().addAgentDm({agentId:et,agentName:ft,content:j})},[]),Q=X.useCallback((H,at,et,ft)=>{Ze.getState().appendBubble(H,at,ft)},[]),K=X.useCallback((H,at,et,ft,j)=>{Ze.getState().addActivity(H,et,`started "${j}"`),Ze.getState().setAgentStatus(H,at,"working")},[]),gt=X.useCallback((H,at,et,ft,j)=>{Ze.getState().addActivity(H,et,`completed "${j}"`),Ze.getState().setAgentStatus(H,at,"idle")},[]),ct=X.useCallback((H,at,et,ft)=>{Ze.getState().setCheckpoint(H,at,et,ft),Ze.getState().setAgentStatus(H,at,"checkpoint")},[]),ht=X.useCallback(()=>{Ze.getState().clearAllBubbles()},[]),{subscribe:dt,unsubscribe:vt,sendChat:_t,sendCheckpointResponse:xt}=O2({onSquadState:M,onSquadInactive:R,onChatConversationCreated:O,onChatChunk:B,onChatDone:U,onChatError:G,onChatAgentDm:Z,onAgentOutputChunk:Q,onAgentStepStart:K,onAgentStepComplete:gt,onSquadCheckpoint:ct,onReconnect:ht});X.useEffect(()=>{q2(_t)},[_t]),X.useEffect(()=>{L2(xt)},[xt]),X.useEffect(()=>{b().then(()=>{const{squads:H}=Ra.getState();if(H.length>0){const at=Ze.getState(),et=H.map(I=>I.code),ft=at.rooms,j=[...new Set([...ft,...et])];at.syncRooms(j);for(const I of H)!at.agentVisuals[I.code]&&I.agents&&I.agents.length>0&&at.setAgents(I.code,I.agents.map(st=>({id:st.id,name:st.name,status:"idle"})))}})},[b]);const Dt=Ze(H=>H.rooms);X.useEffect(()=>{for(const H of Dt)dt(H);return()=>{for(const H of Dt)vt(H)}},[Dt,dt,vt]),X.useEffect(()=>{t||o()},[]),X.useEffect(()=>{!n&&!t&&f("/login")},[n,t,f]);const w=H=>({padding:"6px 12px",color:H?"#4fc3f7":"#888",textDecoration:"none",fontSize:"0.85rem"});return L.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100vh",background:"#0f0f1a",color:"#e0e0e0"},children:[L.jsxs("header",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 16px",background:"#16213e",borderBottom:"1px solid #1a1a2e"},children:[L.jsx("span",{style:{color:"#4fc3f7",fontWeight:"bold",fontSize:"1.1rem"},children:"ExpxAgents"}),L.jsxs("span",{style:{color:"#888",fontSize:"0.85rem"},children:[i==null?void 0:i.username," | ",L.jsx("span",{style:{color:"#4caf50"},children:"● Connected"}),L.jsx("button",{onClick:s,style:{marginLeft:"12px",background:"none",border:"none",color:"#888",cursor:"pointer",fontSize:"0.8rem"},children:"Logout"})]})]}),L.jsxs("div",{style:{display:"flex",flex:1,overflow:"hidden"},children:[L.jsxs("aside",{style:{width:"200px",background:"#16213e",borderRight:"1px solid #1a1a2e",display:"flex",flexDirection:"column",overflowY:"auto"},children:[!m&&L.jsx(H2,{squads:g,selectedSquad:v,onSelect:A}),!m&&L.jsx("hr",{style:{border:"none",borderTop:"1px solid #333",margin:"8px 12px"}}),L.jsxs("nav",{style:{padding:"8px"},children:[L.jsx("div",{style:{color:"#888",fontSize:"0.7rem",textTransform:"uppercase",marginBottom:"8px",padding:"0 12px"},children:"Views"}),L.jsx(Eh,{to:"/office",style:({isActive:H})=>w(H),children:"Office"}),L.jsx("br",{}),L.jsx(Eh,{to:"/chat",style:({isActive:H})=>w(H),children:"Chat"}),L.jsx("br",{}),L.jsx(Eh,{to:"/kanban",style:({isActive:H})=>w(H),children:"Kanban"}),L.jsx("br",{}),L.jsx(Eh,{to:"/settings",style:({isActive:H})=>w(H),children:"Settings"})]})]}),L.jsx("main",{style:{flex:1,overflow:"auto"},children:L.jsx(Zb,{})})]}),L.jsx(j2,{state:S})]})}function F2(){const[i,t]=X.useState(""),[n,s]=X.useState(""),o=cl(S=>S.login),f=cl(S=>S.loading),d=cl(S=>S.error),m=cl(S=>S.isAuthenticated),g=up();X.useEffect(()=>{m&&g("/",{replace:!0})},[m,g]);const v=S=>{S.preventDefault(),o(i,n)};return L.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",background:"#0f0f1a"},children:L.jsxs("form",{onSubmit:v,style:{background:"#1a1a2e",padding:"2rem",borderRadius:"8px",width:"320px"},children:[L.jsx("h1",{style:{color:"#4fc3f7",marginBottom:"1.5rem",textAlign:"center",fontSize:"1.5rem"},children:"ExpxAgents"}),d&&L.jsx("div",{style:{color:"#ef5350",marginBottom:"1rem",fontSize:"0.875rem"},children:d}),L.jsx("input",{type:"text",placeholder:"Username",value:i,onChange:S=>t(S.target.value),style:{width:"100%",padding:"0.75rem",marginBottom:"0.75rem",background:"#16213e",border:"1px solid #333",borderRadius:"4px",color:"#e0e0e0",fontSize:"1rem"}}),L.jsx("input",{type:"password",placeholder:"Password",value:n,onChange:S=>s(S.target.value),style:{width:"100%",padding:"0.75rem",marginBottom:"1rem",background:"#16213e",border:"1px solid #333",borderRadius:"4px",color:"#e0e0e0",fontSize:"1rem"}}),L.jsx("button",{type:"submit",disabled:f,style:{width:"100%",padding:"0.75rem",background:"#4fc3f7",color:"#0f0f1a",border:"none",borderRadius:"4px",fontSize:"1rem",fontWeight:"bold",cursor:f?"wait":"pointer"},children:f?"Logging in...":"Login"})]})})}function lx(i,t,n){if(!i)return;if(n(i)===!0)return i;let s=i.child;for(;s;){const o=lx(s,t,n);if(o)return o;s=s.sibling}}function sx(i){try{return Object.defineProperties(i,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return i}}const Tg=sx(X.createContext(null));let ux=class extends X.Component{render(){return X.createElement(Tg.Provider,{value:this._reactInternals},this.props.children)}};function I2(){const i=X.useContext(Tg);if(i===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=X.useId();return X.useMemo(()=>{for(const n of[i,i==null?void 0:i.alternate]){if(!n)continue;const s=lx(n,!1,o=>{let f=o.memoizedState;for(;f;){if(f.memoizedState===t)return!0;f=f.next}});if(s)return s}},[i,t])}const $2=Symbol.for("react.context"),tT=i=>i!==null&&typeof i=="object"&&"$$typeof"in i&&i.$$typeof===$2;function eT(){const i=I2(),[t]=X.useState(()=>new Map);t.clear();let n=i;for(;n;){const s=n.type;tT(s)&&s!==Tg&&!t.has(s)&&t.set(s,X.use(sx(s))),n=n.return}return t}function nT(){const i=eT();return X.useMemo(()=>Array.from(i.keys()).reduce((t,n)=>s=>X.createElement(t,null,X.createElement(n.Provider,{...s,value:i.get(n)})),t=>X.createElement(ux,{...t})),[i])}const aT="modulepreload",iT=function(i){return"/"+i},cv={},Dh=function(t,n,s){let o=Promise.resolve();if(n&&n.length>0){let d=function(v){return Promise.all(v.map(S=>Promise.resolve(S).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const m=document.querySelector("meta[property=csp-nonce]"),g=(m==null?void 0:m.nonce)||(m==null?void 0:m.getAttribute("nonce"));o=d(n.map(v=>{if(v=iT(v),v in cv)return;cv[v]=!0;const S=v.endsWith(".css"),b=S?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${b}`))return;const A=document.createElement("link");if(A.rel=S?"stylesheet":aT,S||(A.as="script"),A.crossOrigin="",A.href=v,g&&A.setAttribute("nonce",g),document.head.appendChild(A),S)return new Promise((E,z)=>{A.addEventListener("load",E),A.addEventListener("error",()=>z(new Error(`Unable to preload CSS for ${v}`)))})}))}function f(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"&&f(m.reason);return t().catch(f)})};var kt=(i=>(i.Application="application",i.WebGLPipes="webgl-pipes",i.WebGLPipesAdaptor="webgl-pipes-adaptor",i.WebGLSystem="webgl-system",i.WebGPUPipes="webgpu-pipes",i.WebGPUPipesAdaptor="webgpu-pipes-adaptor",i.WebGPUSystem="webgpu-system",i.CanvasSystem="canvas-system",i.CanvasPipesAdaptor="canvas-pipes-adaptor",i.CanvasPipes="canvas-pipes",i.Asset="asset",i.LoadParser="load-parser",i.ResolveParser="resolve-parser",i.CacheParser="cache-parser",i.DetectionParser="detection-parser",i.MaskEffect="mask-effect",i.BlendMode="blend-mode",i.TextureSource="texture-source",i.Environment="environment",i.ShapeBuilder="shape-builder",i.Batcher="batcher",i))(kt||{});const ky=i=>{if(typeof i=="function"||typeof i=="object"&&i.extension){if(!i.extension)throw new Error("Extension class must have an extension object");i={...typeof i.extension!="object"?{type:i.extension}:i.extension,ref:i}}if(typeof i=="object")i={...i};else throw new Error("Invalid extension type");return typeof i.type=="string"&&(i.type=[i.type]),i},Rm=(i,t)=>ky(i).priority??t,ke={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...i){return i.map(ky).forEach(t=>{t.type.forEach(n=>{var s,o;return(o=(s=this._removeHandlers)[n])==null?void 0:o.call(s,t)})}),this},add(...i){return i.map(ky).forEach(t=>{t.type.forEach(n=>{var f,d;const s=this._addHandlers,o=this._queue;s[n]?(d=s[n])==null||d.call(s,t):(o[n]=o[n]||[],(f=o[n])==null||f.push(t))})}),this},handle(i,t,n){var d;const s=this._addHandlers,o=this._removeHandlers;if(s[i]||o[i])throw new Error(`Extension type ${i} already has a handler`);s[i]=t,o[i]=n;const f=this._queue;return f[i]&&((d=f[i])==null||d.forEach(m=>t(m)),delete f[i]),this},handleByMap(i,t){return this.handle(i,n=>{n.name&&(t[n.name]=n.ref)},n=>{n.name&&delete t[n.name]})},handleByNamedList(i,t,n=-1){return this.handle(i,s=>{t.findIndex(f=>f.name===s.name)>=0||(t.push({name:s.name,value:s.ref}),t.sort((f,d)=>Rm(d.value,n)-Rm(f.value,n)))},s=>{const o=t.findIndex(f=>f.name===s.name);o!==-1&&t.splice(o,1)})},handleByList(i,t,n=-1){return this.handle(i,s=>{t.includes(s.ref)||(t.push(s.ref),t.sort((o,f)=>Rm(f,n)-Rm(o,n)))},s=>{const o=t.indexOf(s.ref);o!==-1&&t.splice(o,1)})},mixin(i,...t){for(const n of t)Object.defineProperties(i.prototype,Object.getOwnPropertyDescriptors(n))}},lT={extension:{type:kt.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await Dh(()=>import("./browserAll-UaM9FmiB.js"),__vite__mapDeps([0,1]))}},sT={extension:{type:kt.Environment,name:"webworker",priority:0},test:()=>typeof self<"u"&&self.WorkerGlobalScope!==void 0,load:async()=>{await Dh(()=>import("./webworkerAll-CuTXgacx.js"),[])}};class Vn{constructor(t,n,s){this._x=n||0,this._y=s||0,this._observer=t}clone(t){return new Vn(t??this._observer,this._x,this._y)}set(t=0,n=t){return(this._x!==t||this._y!==n)&&(this._x=t,this._y=n,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 ry={exports:{}},fv;function uT(){return fv||(fv=1,(function(i){var t=Object.prototype.hasOwnProperty,n="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(n=!1));function o(g,v,S){this.fn=g,this.context=v,this.once=S||!1}function f(g,v,S,b,A){if(typeof S!="function")throw new TypeError("The listener must be a function");var E=new o(S,b||g,A),z=n?n+v:v;return g._events[z]?g._events[z].fn?g._events[z]=[g._events[z],E]:g._events[z].push(E):(g._events[z]=E,g._eventsCount++),g}function d(g,v){--g._eventsCount===0?g._events=new s:delete g._events[v]}function m(){this._events=new s,this._eventsCount=0}m.prototype.eventNames=function(){var v=[],S,b;if(this._eventsCount===0)return v;for(b in S=this._events)t.call(S,b)&&v.push(n?b.slice(1):b);return Object.getOwnPropertySymbols?v.concat(Object.getOwnPropertySymbols(S)):v},m.prototype.listeners=function(v){var S=n?n+v:v,b=this._events[S];if(!b)return[];if(b.fn)return[b.fn];for(var A=0,E=b.length,z=new Array(E);A<E;A++)z[A]=b[A].fn;return z},m.prototype.listenerCount=function(v){var S=n?n+v:v,b=this._events[S];return b?b.fn?1:b.length:0},m.prototype.emit=function(v,S,b,A,E,z){var M=n?n+v:v;if(!this._events[M])return!1;var R=this._events[M],O=arguments.length,B,U;if(R.fn){switch(R.once&&this.removeListener(v,R.fn,void 0,!0),O){case 1:return R.fn.call(R.context),!0;case 2:return R.fn.call(R.context,S),!0;case 3:return R.fn.call(R.context,S,b),!0;case 4:return R.fn.call(R.context,S,b,A),!0;case 5:return R.fn.call(R.context,S,b,A,E),!0;case 6:return R.fn.call(R.context,S,b,A,E,z),!0}for(U=1,B=new Array(O-1);U<O;U++)B[U-1]=arguments[U];R.fn.apply(R.context,B)}else{var G=R.length,Z;for(U=0;U<G;U++)switch(R[U].once&&this.removeListener(v,R[U].fn,void 0,!0),O){case 1:R[U].fn.call(R[U].context);break;case 2:R[U].fn.call(R[U].context,S);break;case 3:R[U].fn.call(R[U].context,S,b);break;case 4:R[U].fn.call(R[U].context,S,b,A);break;default:if(!B)for(Z=1,B=new Array(O-1);Z<O;Z++)B[Z-1]=arguments[Z];R[U].fn.apply(R[U].context,B)}}return!0},m.prototype.on=function(v,S,b){return f(this,v,S,b,!1)},m.prototype.once=function(v,S,b){return f(this,v,S,b,!0)},m.prototype.removeListener=function(v,S,b,A){var E=n?n+v:v;if(!this._events[E])return this;if(!S)return d(this,E),this;var z=this._events[E];if(z.fn)z.fn===S&&(!A||z.once)&&(!b||z.context===b)&&d(this,E);else{for(var M=0,R=[],O=z.length;M<O;M++)(z[M].fn!==S||A&&!z[M].once||b&&z[M].context!==b)&&R.push(z[M]);R.length?this._events[E]=R.length===1?R[0]:R:d(this,E)}return this},m.prototype.removeAllListeners=function(v){var S;return v?(S=n?n+v:v,this._events[S]&&d(this,S)):(this._events=new s,this._eventsCount=0),this},m.prototype.off=m.prototype.removeListener,m.prototype.addListener=m.prototype.on,m.prefixed=n,m.EventEmitter=m,i.exports=m})(ry)),ry.exports}var rT=uT();const $l=ap(rT),oT=Math.PI*2,cT=180/Math.PI,fT=Math.PI/180;class sa{constructor(t=0,n=0){this.x=0,this.y=0,this.x=t,this.y=n}clone(){return new sa(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,n=t){return this.x=t,this.y=n,this}toString(){return`[pixi.js/math:Point x=${this.x} y=${this.y}]`}static get shared(){return oy.x=0,oy.y=0,oy}}const oy=new sa;class ne{constructor(t=1,n=0,s=0,o=1,f=0,d=0){this.array=null,this.a=t,this.b=n,this.c=s,this.d=o,this.tx=f,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,n,s,o,f,d){return this.a=t,this.b=n,this.c=s,this.d=o,this.tx=f,this.ty=d,this}toArray(t,n){this.array||(this.array=new Float32Array(9));const s=n||this.array;return t?(s[0]=this.a,s[1]=this.b,s[2]=0,s[3]=this.c,s[4]=this.d,s[5]=0,s[6]=this.tx,s[7]=this.ty,s[8]=1):(s[0]=this.a,s[1]=this.c,s[2]=this.tx,s[3]=this.b,s[4]=this.d,s[5]=this.ty,s[6]=0,s[7]=0,s[8]=1),s}apply(t,n){n=n||new sa;const s=t.x,o=t.y;return n.x=this.a*s+this.c*o+this.tx,n.y=this.b*s+this.d*o+this.ty,n}applyInverse(t,n){n=n||new sa;const s=this.a,o=this.b,f=this.c,d=this.d,m=this.tx,g=this.ty,v=1/(s*d+f*-o),S=t.x,b=t.y;return n.x=d*v*S+-f*v*b+(g*f-m*d)*v,n.y=s*v*b+-o*v*S+(-g*s+m*o)*v,n}translate(t,n){return this.tx+=t,this.ty+=n,this}scale(t,n){return this.a*=t,this.d*=n,this.c*=t,this.b*=n,this.tx*=t,this.ty*=n,this}rotate(t){const n=Math.cos(t),s=Math.sin(t),o=this.a,f=this.c,d=this.tx;return this.a=o*n-this.b*s,this.b=o*s+this.b*n,this.c=f*n-this.d*s,this.d=f*s+this.d*n,this.tx=d*n-this.ty*s,this.ty=d*s+this.ty*n,this}append(t){const n=this.a,s=this.b,o=this.c,f=this.d;return this.a=t.a*n+t.b*o,this.b=t.a*s+t.b*f,this.c=t.c*n+t.d*o,this.d=t.c*s+t.d*f,this.tx=t.tx*n+t.ty*o+this.tx,this.ty=t.tx*s+t.ty*f+this.ty,this}appendFrom(t,n){const s=t.a,o=t.b,f=t.c,d=t.d,m=t.tx,g=t.ty,v=n.a,S=n.b,b=n.c,A=n.d;return this.a=s*v+o*b,this.b=s*S+o*A,this.c=f*v+d*b,this.d=f*S+d*A,this.tx=m*v+g*b+n.tx,this.ty=m*S+g*A+n.ty,this}setTransform(t,n,s,o,f,d,m,g,v){return this.a=Math.cos(m+v)*f,this.b=Math.sin(m+v)*f,this.c=-Math.sin(m-g)*d,this.d=Math.cos(m-g)*d,this.tx=t-(s*this.a+o*this.c),this.ty=n-(s*this.b+o*this.d),this}prepend(t){const n=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const s=this.a,o=this.c;this.a=s*t.a+this.b*t.c,this.b=s*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=n*t.a+this.ty*t.c+t.tx,this.ty=n*t.b+this.ty*t.d+t.ty,this}decompose(t){const n=this.a,s=this.b,o=this.c,f=this.d,d=t.pivot,m=-Math.atan2(-o,f),g=Math.atan2(s,n),v=Math.abs(m+g);return v<1e-5||Math.abs(oT-v)<1e-5?(t.rotation=g,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=m,t.skew.y=g),t.scale.x=Math.sqrt(n*n+s*s),t.scale.y=Math.sqrt(o*o+f*f),t.position.x=this.tx+(d.x*n+d.y*o),t.position.y=this.ty+(d.x*s+d.y*f),t}invert(){const t=this.a,n=this.b,s=this.c,o=this.d,f=this.tx,d=t*o-n*s;return this.a=o/d,this.b=-n/d,this.c=-s/d,this.d=t/d,this.tx=(s*this.ty-o*f)/d,this.ty=-(t*this.ty-n*f)/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 ne;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 dT.identity()}static get shared(){return hT.identity()}}const hT=new ne,dT=new ne,Lr=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Xr=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Vr=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Qr=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Jy=[],rx=[],zm=Math.sign;function mT(){for(let i=0;i<16;i++){const t=[];Jy.push(t);for(let n=0;n<16;n++){const s=zm(Lr[i]*Lr[n]+Vr[i]*Xr[n]),o=zm(Xr[i]*Lr[n]+Qr[i]*Xr[n]),f=zm(Lr[i]*Vr[n]+Vr[i]*Qr[n]),d=zm(Xr[i]*Vr[n]+Qr[i]*Qr[n]);for(let m=0;m<16;m++)if(Lr[m]===s&&Xr[m]===o&&Vr[m]===f&&Qr[m]===d){t.push(m);break}}}for(let i=0;i<16;i++){const t=new ne;t.set(Lr[i],Xr[i],Vr[i],Qr[i],0,0),rx.push(t)}}mT();const De={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:i=>Lr[i],uY:i=>Xr[i],vX:i=>Vr[i],vY:i=>Qr[i],inv:i=>i&8?i&15:-i&7,add:(i,t)=>Jy[i][t],sub:(i,t)=>Jy[i][De.inv(t)],rotate180:i=>i^4,isVertical:i=>(i&3)===2,byDirection:(i,t)=>Math.abs(i)*2<=Math.abs(t)?t>=0?De.S:De.N:Math.abs(t)*2<=Math.abs(i)?i>0?De.E:De.W:t>0?i>0?De.SE:De.SW:i>0?De.NE:De.NW,matrixAppendRotationInv:(i,t,n=0,s=0,o=0,f=0)=>{const d=rx[De.inv(t)],m=d.a,g=d.b,v=d.c,S=d.d,b=n-Math.min(0,m*o,v*f,m*o+v*f),A=s-Math.min(0,g*o,S*f,g*o+S*f),E=i.a,z=i.b,M=i.c,R=i.d;i.a=m*E+g*M,i.b=m*z+g*R,i.c=v*E+S*M,i.d=v*z+S*R,i.tx=b*E+A*M+i.tx,i.ty=b*z+A*R+i.ty},transformRectCoords:(i,t,n,s)=>{const{x:o,y:f,width:d,height:m}=i,{x:g,y:v,width:S,height:b}=t;return n===De.E?(s.set(o+g,f+v,d,m),s):n===De.S?s.set(S-f-m+g,o+v,m,d):n===De.W?s.set(S-o-d+g,b-f-m+v,d,m):n===De.N?s.set(f+g,b-o-d+v,m,d):s.set(o+g,f+v,d,m)}},Dm=[new sa,new sa,new sa,new sa];class un{constructor(t=0,n=0,s=0,o=0){this.type="rectangle",this.x=Number(t),this.y=Number(n),this.width=Number(s),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 un(0,0,0,0)}clone(){return new un(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,n){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&n>=this.y&&n<this.y+this.height}strokeContains(t,n,s,o=.5){const{width:f,height:d}=this;if(f<=0||d<=0)return!1;const m=this.x,g=this.y,v=s*(1-o),S=s-v,b=m-v,A=m+f+v,E=g-v,z=g+d+v,M=m+S,R=m+f-S,O=g+S,B=g+d-S;return t>=b&&t<=A&&n>=E&&n<=z&&!(t>M&&t<R&&n>O&&n<B)}intersects(t,n){if(!n){const gt=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=gt)return!1;const ht=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>ht}const s=this.left,o=this.right,f=this.top,d=this.bottom;if(o<=s||d<=f)return!1;const m=Dm[0].set(t.left,t.top),g=Dm[1].set(t.left,t.bottom),v=Dm[2].set(t.right,t.top),S=Dm[3].set(t.right,t.bottom);if(v.x<=m.x||g.y<=m.y)return!1;const b=Math.sign(n.a*n.d-n.b*n.c);if(b===0||(n.apply(m,m),n.apply(g,g),n.apply(v,v),n.apply(S,S),Math.max(m.x,g.x,v.x,S.x)<=s||Math.min(m.x,g.x,v.x,S.x)>=o||Math.max(m.y,g.y,v.y,S.y)<=f||Math.min(m.y,g.y,v.y,S.y)>=d))return!1;const A=b*(g.y-m.y),E=b*(m.x-g.x),z=A*s+E*f,M=A*o+E*f,R=A*s+E*d,O=A*o+E*d;if(Math.max(z,M,R,O)<=A*m.x+E*m.y||Math.min(z,M,R,O)>=A*S.x+E*S.y)return!1;const B=b*(m.y-v.y),U=b*(v.x-m.x),G=B*s+U*f,Z=B*o+U*f,Q=B*s+U*d,K=B*o+U*d;return!(Math.max(G,Z,Q,K)<=B*m.x+U*m.y||Math.min(G,Z,Q,K)>=B*S.x+U*S.y)}pad(t=0,n=t){return this.x-=t,this.y-=n,this.width+=t*2,this.height+=n*2,this}fit(t){const n=Math.max(this.x,t.x),s=Math.min(this.x+this.width,t.x+t.width),o=Math.max(this.y,t.y),f=Math.min(this.y+this.height,t.y+t.height);return this.x=n,this.width=Math.max(s-n,0),this.y=o,this.height=Math.max(f-o,0),this}ceil(t=1,n=.001){const s=Math.ceil((this.x+this.width-n)*t)/t,o=Math.ceil((this.y+this.height-n)*t)/t;return this.x=Math.floor((this.x+n)*t)/t,this.y=Math.floor((this.y+n)*t)/t,this.width=s-this.x,this.height=o-this.y,this}scale(t,n=t){return this.x*=t,this.y*=n,this.width*=t,this.height*=n,this}enlarge(t){const n=Math.min(this.x,t.x),s=Math.max(this.x+this.width,t.x+t.width),o=Math.min(this.y,t.y),f=Math.max(this.y+this.height,t.y+t.height);return this.x=n,this.width=s-n,this.y=o,this.height=f-o,this}getBounds(t){return t||(t=new un),t.copyFrom(this),t}containsRect(t){if(this.width<=0||this.height<=0)return!1;const n=t.x,s=t.y,o=t.x+t.width,f=t.y+t.height;return n>=this.x&&n<this.x+this.width&&s>=this.y&&s<this.y+this.height&&o>=this.x&&o<this.x+this.width&&f>=this.y&&f<this.y+this.height}set(t,n,s,o){return this.x=t,this.y=n,this.width=s,this.height=o,this}toString(){return`[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}const cy={default:-1};function en(i="default"){return cy[i]===void 0&&(cy[i]=-1),++cy[i]}const hv=new Set,tn="8.0.0",pT="8.3.4",Sc={quiet:!1,noColor:!1},ce=((i,t,n=3)=>{if(Sc.quiet||hv.has(t))return;let s=new Error().stack;const o=`${t}
|
|
62
|
+
Deprecated since v${i}`,f=typeof console.groupCollapsed=="function"&&!Sc.noColor;typeof s>"u"?console.warn("PixiJS Deprecation Warning: ",o):(s=s.split(`
|
|
63
|
+
`).splice(n).join(`
|
|
64
|
+
`),f?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",o),console.warn(s),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",o),console.warn(s))),hv.add(t)});Object.defineProperties(ce,{quiet:{get:()=>Sc.quiet,set:i=>{Sc.quiet=i},enumerable:!0,configurable:!1},noColor:{get:()=>Sc.noColor,set:i=>{Sc.noColor=i},enumerable:!0,configurable:!1}});const ox=()=>{};function Ac(i){return i+=i===0?1:0,--i,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i+1}function dv(i){return!(i&i-1)&&!!i}function cx(i){const t={};for(const n in i)i[n]!==void 0&&(t[n]=i[n]);return t}const mv=Object.create(null);function yT(i){const t=mv[i];return t===void 0&&(mv[i]=en("resource")),t}const fx=class hx extends $l{constructor(t={}){super(),this._resourceType="textureSampler",this._touched=0,this._maxAnisotropy=1,this.destroyed=!1,t={...hx.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){ce(tn,"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=yT(t),this._resourceId}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this.removeAllListeners()}};fx.defaultOptions={addressMode:"clamp-to-edge",scaleMode:"linear"};let Mc=fx;const dx=class mx extends $l{constructor(t={}){super(),this.options=t,this._gpuData=Object.create(null),this._gcLastUsed=-1,this.uid=en("textureSource"),this._resourceType="textureSource",this._resourceId=en("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={...mx.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 Mc(cx(t)),this.destroyed=!1,this._refreshPOT()}get source(){return this}get style(){return this._style}set style(t){var n,s;this.style!==t&&((n=this._style)==null||n.off("change",this._onStyleChange,this),this._style=t,(s=this._style)==null||s.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,n;this._resourceId=en("resource"),this.emit("change",this),this.emit("unload",this);for(const s in this._gpuData)(n=(t=this._gpuData[s])==null?void 0:t.destroy)==null||n.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,n,s){s||(s=this._resolution),t||(t=this.width),n||(n=this.height);const o=Math.round(t*s),f=Math.round(n*s);return this.width=o/s,this.height=f/s,this._resolution=s,this.pixelWidth===o&&this.pixelHeight===f?!1:(this._refreshPOT(),this.pixelWidth=o,this.pixelHeight=f,this.emit("resize",this),this._resourceId=en("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=dv(this.pixelWidth)&&dv(this.pixelHeight)}static test(t){throw new Error("Unimplemented")}};dx.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 wi=dx;class Eg extends wi{constructor(t){const n=t.resource||new Float32Array(t.width*t.height*4);let s=t.format;s||(n instanceof Float32Array?s="rgba32float":n instanceof Int32Array||n instanceof Uint32Array?s="rgba32uint":n instanceof Int16Array||n instanceof Uint16Array?s="rgba16uint":(n instanceof Int8Array,s="bgra8unorm")),super({...t,resource:n,format:s}),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}}Eg.extension=kt.TextureSource;const pv=new ne;class gT{constructor(t,n){this.mapCoord=new ne,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,typeof n>"u"?this.clampMargin=t.width<10?0:.5:this.clampMargin=n,this.isSimple=!1,this.texture=t}get texture(){return this._texture}set texture(t){var n;this.texture!==t&&((n=this._texture)==null||n.removeListener("update",this.update,this),this._texture=t,this._texture.addListener("update",this.update,this),this.update())}multiplyUvs(t,n){n===void 0&&(n=t);const s=this.mapCoord;for(let o=0;o<t.length;o+=2){const f=t[o],d=t[o+1];n[o]=f*s.a+d*s.c+s.tx,n[o+1]=f*s.b+d*s.d+s.ty}return n}update(){const t=this._texture;this._updateID++;const n=t.uvs;this.mapCoord.set(n.x1-n.x0,n.y1-n.y0,n.x3-n.x0,n.y3-n.y0,n.x0,n.y0);const s=t.orig,o=t.trim;o&&(pv.set(s.width/o.width,0,0,s.height/o.height,-o.x/o.width,-o.y/o.height),this.mapCoord.append(pv));const f=t.source,d=this.uClampFrame,m=this.clampMargin/f._resolution,g=this.clampOffset/f._resolution;return d[0]=(t.frame.x+m+g)/f.width,d[1]=(t.frame.y+m+g)/f.height,d[2]=(t.frame.x+t.frame.width-m+g)/f.width,d[3]=(t.frame.y+t.frame.height-m+g)/f.height,this.uClampOffset[0]=this.clampOffset/f.pixelWidth,this.uClampOffset[1]=this.clampOffset/f.pixelHeight,this.isSimple=t.frame.width===f.width&&t.frame.height===f.height&&t.rotate===0,!0}}class Ee extends $l{constructor({source:t,label:n,frame:s,orig:o,trim:f,defaultAnchor:d,defaultBorders:m,rotate:g,dynamic:v}={}){if(super(),this.uid=en("texture"),this.uvs={x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},this.frame=new un,this.noFrame=!1,this.dynamic=!1,this.isTexture=!0,this.label=n,this.source=(t==null?void 0:t.source)??new wi,this.noFrame=!s,s)this.frame.copyFrom(s);else{const{width:S,height:b}=this._source;this.frame.width=S,this.frame.height=b}this.orig=o||this.frame,this.trim=f,this.rotate=g??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 gT(this)),this._textureMatrix}get width(){return this.orig.width}get height(){return this.orig.height}updateUvs(){const{uvs:t,frame:n}=this,{width:s,height:o}=this._source,f=n.x/s,d=n.y/o,m=n.width/s,g=n.height/o;let v=this.rotate;if(v){const S=m/2,b=g/2,A=f+S,E=d+b;v=De.add(v,De.NW),t.x0=A+S*De.uX(v),t.y0=E+b*De.uY(v),v=De.add(v,2),t.x1=A+S*De.uX(v),t.y1=E+b*De.uY(v),v=De.add(v,2),t.x2=A+S*De.uX(v),t.y2=E+b*De.uY(v),v=De.add(v,2),t.x3=A+S*De.uX(v),t.y3=E+b*De.uY(v)}else t.x0=f,t.y0=d,t.x1=f+m,t.y1=d,t.x2=f+m,t.y2=d+g,t.x3=f,t.y3=d+g}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 ce(tn,"Texture.baseTexture is now Texture.source"),this._source}}Ee.EMPTY=new Ee({label:"EMPTY",source:new wi({label:"EMPTY"})});Ee.EMPTY.destroy=ox;Ee.WHITE=new Ee({source:new Eg({resource:new Uint8Array([255,255,255,255]),width:1,height:1,alphaMode:"premultiply-alpha-on-upload",label:"WHITE"}),label:"WHITE"});Ee.WHITE.destroy=ox;function px(i,t,n){const{width:s,height:o}=n.orig,f=n.trim;if(f){const d=f.width,m=f.height;i.minX=f.x-t._x*s,i.maxX=i.minX+d,i.minY=f.y-t._y*o,i.maxY=i.minY+m}else i.minX=-t._x*s,i.maxX=i.minX+s,i.minY=-t._y*o,i.maxY=i.minY+o}const yv=new ne;class Bi{constructor(t=1/0,n=1/0,s=-1/0,o=-1/0){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=yv,this.minX=t,this.minY=n,this.maxX=s,this.maxY=o}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}get rectangle(){this._rectangle||(this._rectangle=new un);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=yv,this}set(t,n,s,o){this.minX=t,this.minY=n,this.maxX=s,this.maxY=o}addFrame(t,n,s,o,f){f||(f=this.matrix);const d=f.a,m=f.b,g=f.c,v=f.d,S=f.tx,b=f.ty;let A=this.minX,E=this.minY,z=this.maxX,M=this.maxY,R=d*t+g*n+S,O=m*t+v*n+b;R<A&&(A=R),O<E&&(E=O),R>z&&(z=R),O>M&&(M=O),R=d*s+g*n+S,O=m*s+v*n+b,R<A&&(A=R),O<E&&(E=O),R>z&&(z=R),O>M&&(M=O),R=d*t+g*o+S,O=m*t+v*o+b,R<A&&(A=R),O<E&&(E=O),R>z&&(z=R),O>M&&(M=O),R=d*s+g*o+S,O=m*s+v*o+b,R<A&&(A=R),O<E&&(E=O),R>z&&(z=R),O>M&&(M=O),this.minX=A,this.minY=E,this.maxX=z,this.maxY=M}addRect(t,n){this.addFrame(t.x,t.y,t.x+t.width,t.y+t.height,n)}addBounds(t,n){this.addFrame(t.minX,t.minY,t.maxX,t.maxY,n)}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 n=this.minX,s=this.minY,o=this.maxX,f=this.maxY,{a:d,b:m,c:g,d:v,tx:S,ty:b}=t;let A=d*n+g*s+S,E=m*n+v*s+b;this.minX=A,this.minY=E,this.maxX=A,this.maxY=E,A=d*o+g*s+S,E=m*o+v*s+b,this.minX=A<this.minX?A:this.minX,this.minY=E<this.minY?E:this.minY,this.maxX=A>this.maxX?A:this.maxX,this.maxY=E>this.maxY?E:this.maxY,A=d*n+g*f+S,E=m*n+v*f+b,this.minX=A<this.minX?A:this.minX,this.minY=E<this.minY?E:this.minY,this.maxX=A>this.maxX?A:this.maxX,this.maxY=E>this.maxY?E:this.maxY,A=d*o+g*f+S,E=m*o+v*f+b,this.minX=A<this.minX?A:this.minX,this.minY=E<this.minY?E:this.minY,this.maxX=A>this.maxX?A:this.maxX,this.maxY=E>this.maxY?E: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,n,s,o){return this.minX<t&&(this.minX=t),this.maxX>n&&(this.maxX=n),this.minY<s&&(this.minY=s),this.maxY>o&&(this.maxY=o),this}pad(t,n=t){return this.minX-=t,this.maxX+=t,this.minY-=n,this.maxY+=n,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 Bi(this.minX,this.minY,this.maxX,this.maxY)}scale(t,n=t){return this.minX*=t,this.minY*=n,this.maxX*=t,this.maxY*=n,this}get x(){return this.minX}set x(t){const n=this.maxX-this.minX;this.minX=t,this.maxX=t+n}get y(){return this.minY}set y(t){const n=this.maxY-this.minY;this.minY=t,this.maxY=t+n}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,n,s,o){let f=this.minX,d=this.minY,m=this.maxX,g=this.maxY;o||(o=this.matrix);const v=o.a,S=o.b,b=o.c,A=o.d,E=o.tx,z=o.ty;for(let M=n;M<s;M+=2){const R=t[M],O=t[M+1],B=v*R+b*O+E,U=S*R+A*O+z;f=B<f?B:f,d=U<d?U:d,m=B>m?B:m,g=U>g?U:g}this.minX=f,this.minY=d,this.maxX=m,this.maxY=g}containsPoint(t,n){return this.minX<=t&&this.minY<=n&&this.maxX>=t&&this.maxY>=n}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 vT={grad:.9,turn:360,rad:360/(2*Math.PI)},Bs=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},Nn=function(i,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*i)/n+0},Ni=function(i,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),i>n?n:i>t?i:t},yx=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},gv=function(i){return{r:Ni(i.r,0,255),g:Ni(i.g,0,255),b:Ni(i.b,0,255),a:Ni(i.a)}},fy=function(i){return{r:Nn(i.r),g:Nn(i.g),b:Nn(i.b),a:Nn(i.a,3)}},xT=/^#([0-9a-f]{3,8})$/i,Om=function(i){var t=i.toString(16);return t.length<2?"0"+t:t},gx=function(i){var t=i.r,n=i.g,s=i.b,o=i.a,f=Math.max(t,n,s),d=f-Math.min(t,n,s),m=d?f===t?(n-s)/d:f===n?2+(s-t)/d:4+(t-n)/d:0;return{h:60*(m<0?m+6:m),s:f?d/f*100:0,v:f/255*100,a:o}},vx=function(i){var t=i.h,n=i.s,s=i.v,o=i.a;t=t/360*6,n/=100,s/=100;var f=Math.floor(t),d=s*(1-n),m=s*(1-(t-f)*n),g=s*(1-(1-t+f)*n),v=f%6;return{r:255*[s,m,d,d,g,s][v],g:255*[g,s,s,m,d,d][v],b:255*[d,d,g,s,s,m][v],a:o}},vv=function(i){return{h:yx(i.h),s:Ni(i.s,0,100),l:Ni(i.l,0,100),a:Ni(i.a)}},xv=function(i){return{h:Nn(i.h),s:Nn(i.s),l:Nn(i.l),a:Nn(i.a,3)}},_v=function(i){return vx((n=(t=i).s,{h:t.h,s:(n*=((s=t.l)<50?s:100-s)/100)>0?2*n/(s+n)*100:0,v:s+n,a:t.a}));var t,n,s},Oh=function(i){return{h:(t=gx(i)).h,s:(o=(200-(n=t.s))*(s=t.v)/100)>0&&o<200?n*s/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,s,o},_T=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ST=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,bT=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,TT=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Py={string:[[function(i){var t=xT.exec(i);return t?(i=t[1]).length<=4?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?Nn(parseInt(i[3]+i[3],16)/255,2):1}:i.length===6||i.length===8?{r:parseInt(i.substr(0,2),16),g:parseInt(i.substr(2,2),16),b:parseInt(i.substr(4,2),16),a:i.length===8?Nn(parseInt(i.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(i){var t=bT.exec(i)||TT.exec(i);return t?t[2]!==t[4]||t[4]!==t[6]?null:gv({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(i){var t=_T.exec(i)||ST.exec(i);if(!t)return null;var n,s,o=vv({h:(n=t[1],s=t[2],s===void 0&&(s="deg"),Number(n)*(vT[s]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return _v(o)},"hsl"]],object:[[function(i){var t=i.r,n=i.g,s=i.b,o=i.a,f=o===void 0?1:o;return Bs(t)&&Bs(n)&&Bs(s)?gv({r:Number(t),g:Number(n),b:Number(s),a:Number(f)}):null},"rgb"],[function(i){var t=i.h,n=i.s,s=i.l,o=i.a,f=o===void 0?1:o;if(!Bs(t)||!Bs(n)||!Bs(s))return null;var d=vv({h:Number(t),s:Number(n),l:Number(s),a:Number(f)});return _v(d)},"hsl"],[function(i){var t=i.h,n=i.s,s=i.v,o=i.a,f=o===void 0?1:o;if(!Bs(t)||!Bs(n)||!Bs(s))return null;var d=(function(m){return{h:yx(m.h),s:Ni(m.s,0,100),v:Ni(m.v,0,100),a:Ni(m.a)}})({h:Number(t),s:Number(n),v:Number(s),a:Number(f)});return vx(d)},"hsv"]]},Sv=function(i,t){for(var n=0;n<t.length;n++){var s=t[n][0](i);if(s)return[s,t[n][1]]}return[null,void 0]},ET=function(i){return typeof i=="string"?Sv(i.trim(),Py.string):typeof i=="object"&&i!==null?Sv(i,Py.object):[null,void 0]},hy=function(i,t){var n=Oh(i);return{h:n.h,s:Ni(n.s+100*t,0,100),l:n.l,a:n.a}},dy=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},bv=function(i,t){var n=Oh(i);return{h:n.h,s:n.s,l:Ni(n.l+100*t,0,100),a:n.a}},Wy=(function(){function i(t){this.parsed=ET(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return i.prototype.isValid=function(){return this.parsed!==null},i.prototype.brightness=function(){return Nn(dy(this.rgba),2)},i.prototype.isDark=function(){return dy(this.rgba)<.5},i.prototype.isLight=function(){return dy(this.rgba)>=.5},i.prototype.toHex=function(){return t=fy(this.rgba),n=t.r,s=t.g,o=t.b,d=(f=t.a)<1?Om(Nn(255*f)):"","#"+Om(n)+Om(s)+Om(o)+d;var t,n,s,o,f,d},i.prototype.toRgb=function(){return fy(this.rgba)},i.prototype.toRgbString=function(){return t=fy(this.rgba),n=t.r,s=t.g,o=t.b,(f=t.a)<1?"rgba("+n+", "+s+", "+o+", "+f+")":"rgb("+n+", "+s+", "+o+")";var t,n,s,o,f},i.prototype.toHsl=function(){return xv(Oh(this.rgba))},i.prototype.toHslString=function(){return t=xv(Oh(this.rgba)),n=t.h,s=t.s,o=t.l,(f=t.a)<1?"hsla("+n+", "+s+"%, "+o+"%, "+f+")":"hsl("+n+", "+s+"%, "+o+"%)";var t,n,s,o,f},i.prototype.toHsv=function(){return t=gx(this.rgba),{h:Nn(t.h),s:Nn(t.s),v:Nn(t.v),a:Nn(t.a,3)};var t},i.prototype.invert=function(){return Pl({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},i.prototype.saturate=function(t){return t===void 0&&(t=.1),Pl(hy(this.rgba,t))},i.prototype.desaturate=function(t){return t===void 0&&(t=.1),Pl(hy(this.rgba,-t))},i.prototype.grayscale=function(){return Pl(hy(this.rgba,-1))},i.prototype.lighten=function(t){return t===void 0&&(t=.1),Pl(bv(this.rgba,t))},i.prototype.darken=function(t){return t===void 0&&(t=.1),Pl(bv(this.rgba,-t))},i.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},i.prototype.alpha=function(t){return typeof t=="number"?Pl({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):Nn(this.rgba.a,3);var n},i.prototype.hue=function(t){var n=Oh(this.rgba);return typeof t=="number"?Pl({h:t,s:n.s,l:n.l,a:n.a}):Nn(n.h)},i.prototype.isEqual=function(t){return this.toHex()===Pl(t).toHex()},i})(),Pl=function(i){return i instanceof Wy?i:new Wy(i)},Tv=[],CT=function(i){i.forEach(function(t){Tv.indexOf(t)<0&&(t(Wy,Py),Tv.push(t))})};function AT(i,t){var n={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"},s={};for(var o in n)s[n[o]]=o;var f={};i.prototype.toName=function(d){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var m,g,v=s[this.toHex()];if(v)return v;if(d!=null&&d.closest){var S=this.toRgb(),b=1/0,A="black";if(!f.length)for(var E in n)f[E]=new i(n[E]).toRgb();for(var z in n){var M=(m=S,g=f[z],Math.pow(m.r-g.r,2)+Math.pow(m.g-g.g,2)+Math.pow(m.b-g.b,2));M<b&&(b=M,A=z)}return A}},t.string.push([function(d){var m=d.toLowerCase(),g=m==="transparent"?"#0000":n[m];return g?new i(g).toRgb():null},"name"])}CT([AT]);const Rc=class Ch{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 Ch)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,n){const s=typeof t;if(s!==typeof n)return!1;if(s==="number"||s==="string"||t instanceof Number)return t===n;if(Array.isArray(t)&&Array.isArray(n)||ArrayBuffer.isView(t)&&ArrayBuffer.isView(n))return t.length!==n.length?!1:t.every((f,d)=>f===n[d]);if(t!==null&&n!==null){const f=Object.keys(t),d=Object.keys(n);return f.length!==d.length?!1:f.every(m=>t[m]===n[m])}return t===n}toRgba(){const[t,n,s,o]=this._components;return{r:t,g:n,b:s,a:o}}toRgb(){const[t,n,s]=this._components;return{r:t,g:n,b:s}}toRgbaString(){const[t,n,s]=this.toUint8RgbArray();return`rgba(${t},${n},${s},${this.alpha})`}toUint8RgbArray(t){const[n,s,o]=this._components;return this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb),t[0]=Math.round(n*255),t[1]=Math.round(s*255),t[2]=Math.round(o*255),t}toArray(t){this._arrayRgba||(this._arrayRgba=[]),t||(t=this._arrayRgba);const[n,s,o,f]=this._components;return t[0]=n,t[1]=s,t[2]=o,t[3]=f,t}toRgbArray(t){this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb);const[n,s,o]=this._components;return t[0]=n,t[1]=s,t[2]=o,t}toNumber(){return this._int}toBgrNumber(){const[t,n,s]=this.toUint8RgbArray();return(s<<16)+(n<<8)+t}toLittleEndianNumber(){const t=this._int;return(t>>16)+(t&65280)+((t&255)<<16)}multiply(t){const[n,s,o,f]=Ch._temp.setValue(t)._components;return this._components[0]*=n,this._components[1]*=s,this._components[2]*=o,this._components[3]*=f,this._refreshInt(),this._value=null,this}premultiply(t,n=!0){return n&&(this._components[0]*=t,this._components[1]*=t,this._components[2]*=t),this._components[3]=t,this._refreshInt(),this._value=null,this}toPremultiplied(t,n=!0){if(t===1)return(255<<24)+this._int;if(t===0)return n?0:this._int;let s=this._int>>16&255,o=this._int>>8&255,f=this._int&255;return n&&(s=s*t+.5|0,o=o*t+.5|0,f=f*t+.5|0),(t*255<<24)+(s<<16)+(o<<8)+f}toHex(){const t=this._int.toString(16);return`#${"000000".substring(0,6-t.length)+t}`}toHexa(){const n=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-n.length)+n}setAlpha(t){return this._components[3]=this._clamp(t),this._value=null,this}_normalize(t){let n,s,o,f;if((typeof t=="number"||t instanceof Number)&&t>=0&&t<=16777215){const d=t;n=(d>>16&255)/255,s=(d>>8&255)/255,o=(d&255)/255,f=1}else if((Array.isArray(t)||t instanceof Float32Array)&&t.length>=3&&t.length<=4)t=this._clamp(t),[n,s,o,f=1]=t;else if((t instanceof Uint8Array||t instanceof Uint8ClampedArray)&&t.length>=3&&t.length<=4)t=this._clamp(t,0,255),[n,s,o,f=255]=t,n/=255,s/=255,o/=255,f/=255;else if(typeof t=="string"||typeof t=="object"){if(typeof t=="string"){const m=Ch.HEX_PATTERN.exec(t);m&&(t=`#${m[2]}`)}const d=Pl(t);d.isValid()&&({r:n,g:s,b:o,a:f}=d.rgba,n/=255,s/=255,o/=255)}if(n!==void 0)this._components[0]=n,this._components[1]=s,this._components[2]=o,this._components[3]=f,this._refreshInt();else throw new Error(`Unable to convert color ${t}`)}_refreshInt(){this._clamp(this._components);const[t,n,s]=this._components;this._int=(t*255<<16)+(n*255<<8)+(s*255|0)}_clamp(t,n=0,s=1){return typeof t=="number"?Math.min(Math.max(t,n),s):(t.forEach((o,f)=>{t[f]=Math.min(Math.max(o,n),s)}),t)}static isColorLike(t){return typeof t=="number"||typeof t=="string"||t instanceof Number||t instanceof Ch||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}};Rc.shared=new Rc;Rc._temp=new Rc;Rc.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let Sn=Rc;const MT={cullArea:null,cullable:!1,cullableChildren:!0};let my=0;const Ev=500;function Da(...i){my!==Ev&&(my++,my===Ev?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...i))}const Qh={_registeredResources:new Set,register(i){this._registeredResources.add(i)},unregister(i){this._registeredResources.delete(i)},release(){this._registeredResources.forEach(i=>i.clear())},get registeredCount(){return this._registeredResources.size},isRegistered(i){return this._registeredResources.has(i)},reset(){this._registeredResources.clear()}};class RT{constructor(t,n){this._pool=[],this._count=0,this._index=0,this._classType=t,n&&this.prepopulate(n)}prepopulate(t){for(let n=0;n<t;n++)this._pool[this._index++]=new this._classType;this._count+=t}get(t){var s;let n;return this._index>0?n=this._pool[--this._index]:(n=new this._classType,this._count++),(s=n.init)==null||s.call(n,t),n}return(t){var n;(n=t.reset)==null||n.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 zT{constructor(){this._poolsByClass=new Map}prepopulate(t,n){this.getPool(t).prepopulate(n)}get(t,n){return this.getPool(t).get(n)}return(t){this.getPool(t.constructor).return(t)}getPool(t){return this._poolsByClass.has(t)||this._poolsByClass.set(t,new RT(t)),this._poolsByClass.get(t)}stats(){const t={};return this._poolsByClass.forEach(n=>{const s=t[n._classType.name]?n._classType.name+n._classType.ID:n._classType.name;t[s]={free:n.totalFree,used:n.totalUsed,size:n.totalSize}}),t}clear(){this._poolsByClass.forEach(t=>t.clear()),this._poolsByClass.clear()}}const Qa=new zT;Qh.register(Qa);const DT={get isCachedAsTexture(){var i;return!!((i=this.renderGroup)!=null&&i.isCachedAsTexture)},cacheAsTexture(i){typeof i=="boolean"&&i===!1?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(i===!0?{}:i))},updateCacheTexture(){var i;(i=this.renderGroup)==null||i.updateCacheTexture()},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(i){ce("v8.6.0","cacheAsBitmap is deprecated, use cacheAsTexture instead."),this.cacheAsTexture(i)}};function OT(i,t,n){const s=i.length;let o;if(t>=s||n===0)return;n=t+n>s?s-t:n;const f=s-n;for(o=t;o<f;++o)i[o]=i[o+n];i.length=f}const NT={allowChildren:!0,removeChildren(i=0,t){var f;const n=t??this.children.length,s=n-i,o=[];if(s>0&&s<=n){for(let m=n-1;m>=i;m--){const g=this.children[m];g&&(o.push(g),g.parent=null)}OT(this.children,i,n);const d=this.renderGroup||this.parentRenderGroup;d&&d.removeChildren(o);for(let m=0;m<o.length;++m){const g=o[m];(f=g.parentRenderLayer)==null||f.detach(g),this.emit("childRemoved",g,this,m),o[m].emit("removed",this)}return o.length>0&&this._didViewChangeTick++,o}else if(s===0&&this.children.length===0)return o;throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},removeChildAt(i){const t=this.getChildAt(i);return this.removeChild(t)},getChildAt(i){if(i<0||i>=this.children.length)throw new Error(`getChildAt: Index (${i}) does not exist.`);return this.children[i]},setChildIndex(i,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);this.getChildIndex(i),this.addChildAt(i,t)},getChildIndex(i){const t=this.children.indexOf(i);if(t===-1)throw new Error("The supplied Container must be a child of the caller");return t},addChildAt(i,t){this.allowChildren||ce(tn,"addChildAt: Only Containers will be allowed to add children in v8.0.0");const{children:n}=this;if(t<0||t>n.length)throw new Error(`${i}addChildAt: The index ${t} supplied is out of bounds ${n.length}`);const s=i.parent===this;if(i.parent){const f=i.parent.children.indexOf(i);if(s){if(f===t)return i;i.parent.children.splice(f,1)}else i.removeFromParent()}t===n.length?n.push(i):n.splice(t,0,i),i.parent=this,i.didChange=!0,i._updateFlags=15;const o=this.renderGroup||this.parentRenderGroup;return o&&o.addChild(i),this.sortableChildren&&(this.sortDirty=!0),s||(this.emit("childAdded",i,this,t),i.emit("added",this)),i},swapChildren(i,t){if(i===t)return;const n=this.getChildIndex(i),s=this.getChildIndex(t);this.children[n]=t,this.children[s]=i;const o=this.renderGroup||this.parentRenderGroup;o&&(o.structureDidChange=!0),this._didContainerChangeTick++},removeFromParent(){var i;(i=this.parent)==null||i.removeChild(this)},reparentChild(...i){return i.length===1?this.reparentChildAt(i[0],this.children.length):(i.forEach(t=>this.reparentChildAt(t,this.children.length)),i[0])},reparentChildAt(i,t){if(i.parent===this)return this.setChildIndex(i,t),i;const n=i.worldTransform.clone();i.removeFromParent(),this.addChildAt(i,t);const s=this.worldTransform.clone();return s.invert(),n.prepend(s),i.setFromMatrix(n),i},replaceChild(i,t){i.updateLocalTransform(),this.addChildAt(t,this.getChildIndex(i)),t.setFromMatrix(i.localTransform),t.updateLocalTransform(),this.removeChild(i)}},UT={collectRenderables(i,t,n){this.parentRenderLayer&&this.parentRenderLayer!==n||this.globalDisplayStatus<7||!this.includeInBuild||(this.sortableChildren&&this.sortChildren(),this.isSimple?this.collectRenderablesSimple(i,t,n):this.renderGroup?t.renderPipes.renderGroup.addRenderGroup(this.renderGroup,i):this.collectRenderablesWithEffects(i,t,n))},collectRenderablesSimple(i,t,n){const s=this.children,o=s.length;for(let f=0;f<o;f++)s[f].collectRenderables(i,t,n)},collectRenderablesWithEffects(i,t,n){const{renderPipes:s}=t;for(let o=0;o<this.effects.length;o++){const f=this.effects[o];s[f.pipe].push(f,this,i)}this.collectRenderablesSimple(i,t,n);for(let o=this.effects.length-1;o>=0;o--){const f=this.effects[o];s[f.pipe].pop(f,this,i)}}};class Cv{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 BT{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 n=0;n<this._tests.length;n++){const s=this._tests[n];if(s.test(t))return Qa.get(s.maskClass,t)}return t}returnMaskEffect(t){Qa.return(t)}}const Fy=new BT;ke.handleByList(kt.MaskEffect,Fy._effectClasses);const wT={_maskEffect:null,_maskOptions:{inverse:!1},_filterEffect:null,effects:[],_markStructureAsChanged(){const i=this.renderGroup||this.parentRenderGroup;i&&(i.structureDidChange=!0)},addEffect(i){this.effects.indexOf(i)===-1&&(this.effects.push(i),this.effects.sort((n,s)=>n.priority-s.priority),this._markStructureAsChanged(),this._updateIsSimple())},removeEffect(i){const t=this.effects.indexOf(i);t!==-1&&(this.effects.splice(t,1),this._markStructureAsChanged(),this._updateIsSimple())},set mask(i){const t=this._maskEffect;(t==null?void 0:t.mask)!==i&&(t&&(this.removeEffect(t),Fy.returnMaskEffect(t),this._maskEffect=null),i!=null&&(this._maskEffect=Fy.getMaskEffect(i),this.addEffect(this._maskEffect)))},get mask(){var i;return(i=this._maskEffect)==null?void 0:i.mask},setMask(i){this._maskOptions={...this._maskOptions,...i},i.mask&&(this.mask=i.mask),this._markStructureAsChanged()},set filters(i){var f;!Array.isArray(i)&&i&&(i=[i]);const t=this._filterEffect||(this._filterEffect=new Cv);i=i;const n=(i==null?void 0:i.length)>0,s=((f=t.filters)==null?void 0:f.length)>0,o=n!==s;i=Array.isArray(i)?i.slice(0):i,t.filters=Object.freeze(i),o&&(n?this.addEffect(t):(this.removeEffect(t),t.filters=i??null))},get filters(){var i;return(i=this._filterEffect)==null?void 0:i.filters},set filterArea(i){this._filterEffect||(this._filterEffect=new Cv),this._filterEffect.filterArea=i},get filterArea(){var i;return(i=this._filterEffect)==null?void 0:i.filterArea}},HT={label:null,get name(){return ce(tn,"Container.name property has been removed, use Container.label instead"),this.label},set name(i){ce(tn,"Container.name property has been removed, use Container.label instead"),this.label=i},getChildByName(i,t=!1){return this.getChildByLabel(i,t)},getChildByLabel(i,t=!1){const n=this.children;for(let s=0;s<n.length;s++){const o=n[s];if(o.label===i||i instanceof RegExp&&i.test(o.label))return o}if(t)for(let s=0;s<n.length;s++){const f=n[s].getChildByLabel(i,!0);if(f)return f}return null},getChildrenByLabel(i,t=!1,n=[]){const s=this.children;for(let o=0;o<s.length;o++){const f=s[o];(f.label===i||i instanceof RegExp&&i.test(f.label))&&n.push(f)}if(t)for(let o=0;o<s.length;o++)s[o].getChildrenByLabel(i,!0,n);return n}},za=Qa.getPool(ne),qs=Qa.getPool(Bi),GT=new ne,jT={getFastGlobalBounds(i,t){t||(t=new Bi),t.clear(),this._getGlobalBoundsRecursive(!!i,t,this.parentRenderLayer),t.isValid||t.set(0,0,0,0);const n=this.renderGroup||this.parentRenderGroup;return t.applyMatrix(n.worldTransform),t},_getGlobalBoundsRecursive(i,t,n){let s=t;if(i&&this.parentRenderLayer&&this.parentRenderLayer!==n||this.localDisplayStatus!==7||!this.measurable)return;const o=!!this.effects.length;if((this.renderGroup||o)&&(s=qs.get().clear()),this.boundsArea)t.addRect(this.boundsArea,this.worldTransform);else{if(this.renderPipeId){const d=this.bounds;s.addFrame(d.minX,d.minY,d.maxX,d.maxY,this.groupTransform)}const f=this.children;for(let d=0;d<f.length;d++)f[d]._getGlobalBoundsRecursive(i,s,n)}if(o){let f=!1;const d=this.renderGroup||this.parentRenderGroup;for(let m=0;m<this.effects.length;m++)this.effects[m].addBounds&&(f||(f=!0,s.applyMatrix(d.worldTransform)),this.effects[m].addBounds(s,!0));f&&s.applyMatrix(d.worldTransform.copyTo(GT).invert()),t.addBounds(s),qs.return(s)}else this.renderGroup&&(t.addBounds(s,this.relativeGroupTransform),qs.return(s))}};function xx(i,t,n){n.clear();let s,o;return i.parent?t?s=i.parent.worldTransform:(o=za.get().identity(),s=Cg(i,o)):s=ne.IDENTITY,_x(i,n,s,t),o&&za.return(o),n.isValid||n.set(0,0,0,0),n}function _x(i,t,n,s){var m,g;if(!i.visible||!i.measurable)return;let o;s?o=i.worldTransform:(i.updateLocalTransform(),o=za.get(),o.appendFrom(i.localTransform,n));const f=t,d=!!i.effects.length;if(d&&(t=qs.get().clear()),i.boundsArea)t.addRect(i.boundsArea,o);else{const v=i.bounds;v&&!v.isEmpty()&&(t.matrix=o,t.addBounds(v));for(let S=0;S<i.children.length;S++)_x(i.children[S],t,o,s)}if(d){for(let v=0;v<i.effects.length;v++)(g=(m=i.effects[v]).addBounds)==null||g.call(m,t);f.addBounds(t,ne.IDENTITY),qs.return(t)}s||za.return(o)}function Cg(i,t){const n=i.parent;return n&&(Cg(n,t),n.updateLocalTransform(),t.append(n.localTransform)),t}function Sx(i,t){if(i===16777215||!t)return t;if(t===16777215||!i)return i;const n=i>>16&255,s=i>>8&255,o=i&255,f=t>>16&255,d=t>>8&255,m=t&255,g=n*f/255|0,v=s*d/255|0,S=o*m/255|0;return(g<<16)+(v<<8)+S}const Av=16777215;function Mv(i,t){return i===Av?t:t===Av?i:Sx(i,t)}function km(i){return((i&255)<<16)+(i&65280)+(i>>16&255)}const qT={getGlobalAlpha(i){if(i)return this.renderGroup?this.renderGroup.worldAlpha:this.parentRenderGroup?this.parentRenderGroup.worldAlpha*this.alpha:this.alpha;let t=this.alpha,n=this.parent;for(;n;)t*=n.alpha,n=n.parent;return t},getGlobalTransform(i=new ne,t){if(t)return i.copyFrom(this.worldTransform);this.updateLocalTransform();const n=Cg(this,za.get().identity());return i.appendFrom(this.localTransform,n),za.return(n),i},getGlobalTint(i){if(i)return this.renderGroup?km(this.renderGroup.worldColor):this.parentRenderGroup?km(Mv(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let t=this.localColor,n=this.parent;for(;n;)t=Mv(t,n.localColor),n=n.parent;return km(t)}};function bx(i,t,n){return t.clear(),n||(n=ne.IDENTITY),Tx(i,t,n,i,!0),t.isValid||t.set(0,0,0,0),t}function Tx(i,t,n,s,o){var g,v;let f;if(o)f=za.get(),f=n.copyTo(f);else{if(!i.visible||!i.measurable)return;i.updateLocalTransform();const S=i.localTransform;f=za.get(),f.appendFrom(S,n)}const d=t,m=!!i.effects.length;if(m&&(t=qs.get().clear()),i.boundsArea)t.addRect(i.boundsArea,f);else{i.renderPipeId&&(t.matrix=f,t.addBounds(i.bounds));const S=i.children;for(let b=0;b<S.length;b++)Tx(S[b],t,f,s,!1)}if(m){for(let S=0;S<i.effects.length;S++)(v=(g=i.effects[S]).addLocalBounds)==null||v.call(g,t,s);d.addBounds(t,ne.IDENTITY),qs.return(t)}za.return(f)}function Ex(i,t){const n=i.children;for(let s=0;s<n.length;s++){const o=n[s],f=o.uid,d=(o._didViewChangeTick&65535)<<16|o._didContainerChangeTick&65535,m=t.index;(t.data[m]!==f||t.data[m+1]!==d)&&(t.data[t.index]=f,t.data[t.index+1]=d,t.didChange=!0),t.index=m+2,o.children.length&&Ex(o,t)}return t.didChange}const YT=new ne,LT={_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(i,t){const n=Math.sign(this.scale.x)||1;t!==0?this.scale.x=i/t*n:this.scale.x=n},_setHeight(i,t){const n=Math.sign(this.scale.y)||1;t!==0?this.scale.y=i/t*n:this.scale.y=n},getLocalBounds(){this._localBoundsCacheData||(this._localBoundsCacheData={data:[],index:1,didChange:!1,localBounds:new Bi});const i=this._localBoundsCacheData;return i.index=1,i.didChange=!1,i.data[0]!==this._didViewChangeTick&&(i.didChange=!0,i.data[0]=this._didViewChangeTick),Ex(this,i),i.didChange&&bx(this,i.localBounds,YT),i.localBounds},getBounds(i,t){return xx(this,i,t||new Bi)}},XT={_onRender:null,set onRender(i){const t=this.renderGroup||this.parentRenderGroup;if(!i){this._onRender&&(t==null||t.removeOnRender(this)),this._onRender=null;return}this._onRender||t==null||t.addOnRender(this),this._onRender=i},get onRender(){return this._onRender}},VT={_zIndex:0,sortDirty:!1,sortableChildren:!1,get zIndex(){return this._zIndex},set zIndex(i){this._zIndex!==i&&(this._zIndex=i,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(QT))}};function QT(i,t){return i._zIndex-t._zIndex}const ZT={getGlobalPosition(i=new sa,t=!1){return this.parent?this.parent.toGlobal(this._position,i,t):(i.x=this._position.x,i.y=this._position.y),i},toGlobal(i,t,n=!1){const s=this.getGlobalTransform(za.get(),n);return t=s.apply(i,t),za.return(s),t},toLocal(i,t,n,s){t&&(i=t.toGlobal(i,n,s));const o=this.getGlobalTransform(za.get(),s);return n=o.applyInverse(i,n),za.return(o),n}};class Ag{constructor(){this.uid=en("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 KT=0;class kT{constructor(t){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this.textureStyle=new Mc(this.textureOptions)}createTexture(t,n,s,o){const f=new wi({...this.textureOptions,width:t,height:n,resolution:1,antialias:s,autoGarbageCollect:!1,autoGenerateMipmaps:o});return new Ee({source:f,label:`texturePool_${KT++}`})}getOptimalTexture(t,n,s=1,o,f=!1){let d=Math.ceil(t*s-1e-6),m=Math.ceil(n*s-1e-6);d=Ac(d),m=Ac(m);const g=o?1:0,v=f?1:0,S=(d<<17)+(m<<2)+(v<<1)+g;this._texturePool[S]||(this._texturePool[S]=[]);let b=this._texturePool[S].pop();return b||(b=this.createTexture(d,m,o,f)),b.source._resolution=s,b.source.width=d/s,b.source.height=m/s,b.source.pixelWidth=d,b.source.pixelHeight=m,b.frame.x=0,b.frame.y=0,b.frame.width=t,b.frame.height=n,b.updateUvs(),this._poolKeyHash[b.uid]=S,b}getSameSizeTexture(t,n=!1){const s=t.source;return this.getOptimalTexture(t.width,t.height,s._resolution,n)}returnTexture(t,n=!1){const s=this._poolKeyHash[t.uid];n&&(t.source.style=this.textureStyle),this._texturePool[s].push(t)}clear(t){if(t=t!==!1,t)for(const n in this._texturePool){const s=this._texturePool[n];if(s)for(let o=0;o<s.length;o++)s[o].destroy(!0)}this._texturePool={}}}const cp=new kT;Qh.register(cp);class JT{constructor(){this.renderPipeId="renderGroup",this.root=null,this.canBundle=!1,this.renderGroupParent=null,this.renderGroupChildren=[],this.worldTransform=new ne,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 Ag,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 n=t.children;for(let s=0;s<n.length;s++){const o=n[s];o._updateFlags=15,this.addChild(o)}}enableCacheAsTexture(t={}){this.textureOptions=t,this.isCachedAsTexture=!0,this.textureNeedsUpdate=!0}disableCacheAsTexture(){this.isCachedAsTexture=!1,this.texture&&(cp.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 n=this.childrenToUpdate[t];n.list.fill(null),n.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 n=this.renderGroupChildren.indexOf(t);n>-1&&this.renderGroupChildren.splice(n,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 n=t.children;for(let s=0;s<n.length;s++)this.addChild(n[s])}removeChild(t){if(this.structureDidChange=!0,t._onRender&&(t.renderGroup||this.removeOnRender(t)),t.parentRenderGroup=null,t.renderGroup){this._removeRenderGroupChild(t.renderGroup);return}const n=t.children;for(let s=0;s<n.length;s++)this.removeChild(n[s])}removeChildren(t){for(let n=0;n<t.length;n++)this.removeChild(t[n])}onChildUpdate(t){let n=this.childrenToUpdate[t.relativeRenderGroupDepth];n||(n=this.childrenToUpdate[t.relativeRenderGroupDepth]={index:0,list:[]}),n.list[n.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 n=0;n<this._onRenderContainers.length;n++)this._onRenderContainers[n]._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 n=this.root.children;for(let s=0;s<n.length;s++)this._getChildren(n[s],t);return t}_getChildren(t,n=[]){if(n.push(t),t.renderGroup)return n;const s=t.children;for(let o=0;o<s.length;o++)this._getChildren(s[o],n);return n}invalidateMatrices(){this._matrixDirty=7}get inverseWorldTransform(){return(this._matrixDirty&1)===0?this._inverseWorldTransform:(this._matrixDirty&=-2,this._inverseWorldTransform||(this._inverseWorldTransform=new ne),this._inverseWorldTransform.copyFrom(this.worldTransform).invert())}get textureOffsetInverseTransform(){return(this._matrixDirty&2)===0?this._textureOffsetInverseTransform:(this._matrixDirty&=-3,this._textureOffsetInverseTransform||(this._textureOffsetInverseTransform=new ne),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 ne),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 PT(i,t,n={}){for(const s in t)!n[s]&&t[s]!==void 0&&(i[s]=t[s])}const py=new Vn(null),Nm=new Vn(null),yy=new Vn(null,1,1),Um=new Vn(null),Rv=1,WT=2,gy=4;class ua extends $l{constructor(t={}){var n,s;super(),this.uid=en("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 ne,this.relativeGroupTransform=new ne,this.groupTransform=this.relativeGroupTransform,this.destroyed=!1,this._position=new Vn(this,0,0),this._scale=yy,this._pivot=Nm,this._origin=Um,this._skew=py,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=[],PT(this,t,{children:!0,parent:!0,effects:!0}),(n=t.children)==null||n.forEach(o=>this.addChild(o)),(s=t.parent)==null||s.addChild(this)}static mixin(t){ce("8.8.0","Container.mixin is deprecated, please use extensions.mixin instead."),ke.mixin(ua,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||ce(tn,"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 n=t[0],s=this.renderGroup||this.parentRenderGroup;return n.parent===this?(this.children.splice(this.children.indexOf(n),1),this.children.push(n),s&&(s.structureDidChange=!0),n):(n.parent&&n.parent.removeChild(n),this.children.push(n),this.sortableChildren&&(this.sortDirty=!0),n.parent=this,n.didChange=!0,n._updateFlags=15,s&&s.addChild(n),this.emit("childAdded",n,this,this.children.length-1),n.emit("added",this),this._didViewChangeTick++,n._zIndex!==0&&n.depthOfChildModified(),n)}removeChild(...t){if(t.length>1){for(let o=0;o<t.length;o++)this.removeChild(t[o]);return t[0]}const n=t[0],s=this.children.indexOf(n);return s>-1&&(this._didViewChangeTick++,this.children.splice(s,1),this.renderGroup?this.renderGroup.removeChild(n):this.parentRenderGroup&&this.parentRenderGroup.removeChild(n),n.parentRenderLayer&&n.parentRenderLayer.detach(n),n.parent=null,this.emit("childRemoved",n,this,s),n.emit("removed",this)),n}_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=Qa.get(JT,this),this.groupTransform=ne.IDENTITY,t==null||t.addChild(this),this._updateIsSimple()}disableRenderGroup(){if(!this.renderGroup)return;const t=this.parentRenderGroup;t==null||t.removeChild(this),Qa.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 ne),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*cT}set angle(t){this.rotation=t*fT}get pivot(){return this._pivot===Nm&&(this._pivot=new Vn(this,0,0)),this._pivot}set pivot(t){this._pivot===Nm&&(this._pivot=new Vn(this,0,0),this._origin!==Um&&Da("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===py&&(this._skew=new Vn(this,0,0)),this._skew}set skew(t){this._skew===py&&(this._skew=new Vn(this,0,0)),this._skew.copyFrom(t)}get scale(){return this._scale===yy&&(this._scale=new Vn(this,1,1)),this._scale}set scale(t){this._scale===yy&&(this._scale=new Vn(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===Um&&(this._origin=new Vn(this,0,0)),this._origin}set origin(t){this._origin===Um&&(this._origin=new Vn(this,0,0),this._pivot!==Nm&&Da("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 n=this.getLocalBounds().width;this._setWidth(t,n)}get height(){return Math.abs(this.scale.y*this.getLocalBounds().height)}set height(t){const n=this.getLocalBounds().height;this._setHeight(t,n)}getSize(t){t||(t={});const n=this.getLocalBounds();return t.width=Math.abs(this.scale.x*n.width),t.height=Math.abs(this.scale.y*n.height),t}setSize(t,n){const s=this.getLocalBounds();typeof t=="object"?(n=t.height??t.width,t=t.width):n??(n=t),t!==void 0&&this._setWidth(t,s.width),n!==void 0&&this._setHeight(n,s.height)}_updateSkew(){const t=this._rotation,n=this._skew;this._cx=Math.cos(t+n._y),this._sx=Math.sin(t+n._y),this._cy=-Math.sin(t-n._x),this._sy=Math.cos(t-n._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 n=this.localTransform,s=this._scale,o=this._pivot,f=this._origin,d=this._position,m=s._x,g=s._y,v=o._x,S=o._y,b=-f._x,A=-f._y;n.a=this._cx*m,n.b=this._sx*m,n.c=this._cy*g,n.d=this._sy*g,n.tx=d._x-(v*n.a+S*n.c)+(b*n.a+A*n.c)-b,n.ty=d._y-(v*n.b+S*n.d)+(b*n.b+A*n.d)-A}set alpha(t){t!==this.localAlpha&&(this.localAlpha=t,this._updateFlags|=Rv,this._onUpdate())}get alpha(){return this.localAlpha}set tint(t){const s=Sn.shared.setValue(t??16777215).toBgrNumber();s!==this.localColor&&(this.localColor=s,this._updateFlags|=Rv,this._onUpdate())}get tint(){return km(this.localColor)}set blendMode(t){this.localBlendMode!==t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=WT,this.localBlendMode=t,this._onUpdate())}get blendMode(){return this.localBlendMode}get visible(){return!!(this.localDisplayStatus&2)}set visible(t){const n=t?2:0;(this.localDisplayStatus&2)!==n&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=gy,this.localDisplayStatus^=2,this._onUpdate(),this.emit("visibleChanged",t))}get culled(){return!(this.localDisplayStatus&4)}set culled(t){const n=t?0:4;(this.localDisplayStatus&4)!==n&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=gy,this.localDisplayStatus^=4,this._onUpdate())}get renderable(){return!!(this.localDisplayStatus&1)}set renderable(t){const n=t?1:0;(this.localDisplayStatus&1)!==n&&(this._updateFlags|=gy,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 n;if(this.children.length&&(n=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)&&n)for(let f=0;f<n.length;++f)n[f].destroy(t);(o=this.renderGroup)==null||o.destroy(),this.renderGroup=null}}ke.mixin(ua,NT,jT,ZT,XT,LT,wT,HT,VT,MT,DT,qT,UT);class Mg extends ua{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 Bi(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 n=this.bounds,{x:s,y:o}=t;return s>=n.minX&&s<=n.maxX&&o>=n.minY&&o<=n.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 n in this._gpuData)(t=this._gpuData[n])==null||t.destroy();this._gpuData=Object.create(null),this.onViewUpdate()}destroy(t){this.unload(),super.destroy(t),this._bounds=null}collectRenderablesSimple(t,n,s){const{renderPipes:o}=n;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,g=m.length;for(let v=0;v<g;v++)m[v].collectRenderables(t,n,s);o.blendMode.popBlendMode(t)}}class zc extends Mg{constructor(t=Ee.EMPTY){t instanceof Ee&&(t={texture:t});const{texture:n=Ee.EMPTY,anchor:s,roundPixels:o,width:f,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 Vn({_onUpdate:()=>{this.onViewUpdate()}}),s?this.anchor=s:n.defaultAnchor&&(this.anchor=n.defaultAnchor),this.texture=n,this.allowChildren=!1,this.roundPixels=o??!1,f!==void 0&&(this.width=f),d!==void 0&&(this.height=d)}static from(t,n=!1){return t instanceof Ee?new zc(t):new zc(Ee.from(t,n))}set texture(t){t||(t=Ee.EMPTY);const n=this._texture;n!==t&&(n&&n.dynamic&&n.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 px(this._visualBounds,this._anchor,this._texture),this._visualBounds}get sourceBounds(){return ce("8.6.1","Sprite.sourceBounds is deprecated, use visualBounds instead."),this.visualBounds}updateBounds(){const t=this._anchor,n=this._texture,s=this._bounds,{width:o,height:f}=n.orig;s.minX=-t._x*o,s.maxX=s.minX+o,s.minY=-t._y*f,s.maxY=s.minY+f}destroy(t=!1){if(super.destroy(t),typeof t=="boolean"?t:t==null?void 0:t.texture){const s=typeof t=="boolean"?t:t==null?void 0:t.textureSource;this._texture.destroy(s)}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,n){typeof t=="object"?(n=t.height??t.width,t=t.width):n??(n=t),t!==void 0&&this._setWidth(t,this._texture.orig.width),n!==void 0&&this._setHeight(n,this._texture.orig.height)}}const FT=new Bi;function Cx(i,t,n){const s=FT;i.measurable=!0,xx(i,n,s),t.addBoundsMask(s),i.measurable=!1}function Ax(i,t,n){const s=qs.get();i.measurable=!0;const o=za.get().identity(),f=Mx(i,n,o);bx(i,s,f),i.measurable=!1,t.addBoundsMask(s),za.return(o),qs.return(s)}function Mx(i,t,n){return i?(i!==t&&(Mx(i.parent,t,n),i.updateLocalTransform(),n.append(i.localTransform)),n):(Da("Mask bounds, renderable is not inside the root container"),n)}class Rx{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 zc),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,n){this.inverse||Cx(this.mask,t,n)}addLocalBounds(t,n){Ax(this.mask,t,n)}containsPoint(t,n){const s=this.mask;return n(s,t)}destroy(){this.reset()}static test(t){return t instanceof zc}}Rx.extension=kt.MaskEffect;class zx{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"}}zx.extension=kt.MaskEffect;class Dx{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,n){Cx(this.mask,t,n)}addLocalBounds(t,n){Ax(this.mask,t,n)}containsPoint(t,n){const s=this.mask;return n(s,t)}destroy(){this.reset()}static test(t){return t instanceof ua}}Dx.extension=kt.MaskEffect;const IT={createCanvas:(i,t)=>{const n=document.createElement("canvas");return n.width=i,n.height=t,n},createImage:()=>new Image,getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(i,t)=>fetch(i,t),parseXML:i=>new DOMParser().parseFromString(i,"text/xml")};let zv=IT;const si={get(){return zv},set(i){zv=i}};class Ox extends wi{constructor(t){t.resource||(t.resource=si.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,n=this.height,s=this._resolution){const o=super.resize(t,n,s);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"))}}Ox.extension=kt.TextureSource;class Wm extends wi{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}}Wm.extension=kt.TextureSource;var Fm=(i=>(i[i.INTERACTION=50]="INTERACTION",i[i.HIGH=25]="HIGH",i[i.NORMAL=0]="NORMAL",i[i.LOW=-25]="LOW",i[i.UTILITY=-50]="UTILITY",i))(Fm||{});class vy{constructor(t,n=null,s=0,o=!1){this.next=null,this.previous=null,this._destroyed=!1,this._fn=t,this._context=n,this.priority=s,this._once=o}match(t,n=null){return this._fn===t&&this._context===n}emit(t){this._fn&&(this._context?this._fn.call(this._context,t):this._fn(t));const n=this.next;return this._once&&this.destroy(!0),this._destroyed&&(this.next=null),n}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 n=this.next;return this.next=t?null:n,this.previous=null,n}}const Nx=class li{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 vy(null,null,1/0),this.deltaMS=1/li.targetFPMS,this.elapsedMS=1/li.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,n,s=Fm.NORMAL){return this._addListener(new vy(t,n,s))}addOnce(t,n,s=Fm.NORMAL){return this._addListener(new vy(t,n,s,!0))}_addListener(t){let n=this._head.next,s=this._head;if(!n)t.connect(s);else{for(;n;){if(t.priority>n.priority){t.connect(s);break}s=n,n=n.next}t.previous||t.connect(s)}return this._startIfPossible(),this}remove(t,n){let s=this._head.next;for(;s;)s.match(t,n)?s=s.destroy():s=s.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let t=0,n=this._head;for(;n=n.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 n;if(t>this.lastTime){if(n=this.elapsedMS=t-this.lastTime,n>this._maxElapsedMS&&(n=this._maxElapsedMS),n*=this.speed,this._minElapsedMS){const f=t-this._lastFrame|0;if(f<this._minElapsedMS)return;this._lastFrame=t-f%this._minElapsedMS}this.deltaMS=n,this.deltaTime=this.deltaMS*li.targetFPMS;const s=this._head;let o=s.next;for(;o;)o=o.emit(this);s.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 n=Math.min(Math.max(0,t)/1e3,li.targetFPMS);this._maxElapsedMS=1/n,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(!li._shared){const t=li._shared=new li;t.autoStart=!0,t._protected=!0}return li._shared}static get system(){if(!li._system){const t=li._system=new li;t.autoStart=!0,t._protected=!0}return li._system}};Nx.targetFPMS=.06;let bc=Nx,xy;async function $T(){return xy??(xy=(async()=>{var d;const t=si.get().createCanvas(1,1).getContext("webgl");if(!t)return"premultiply-alpha-on-upload";const n=await new Promise(m=>{const g=document.createElement("video");g.onloadeddata=()=>m(g),g.onerror=()=>m(null),g.autoplay=!1,g.crossOrigin="anonymous",g.preload="auto",g.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",g.load()});if(!n)return"premultiply-alpha-on-upload";const s=t.createTexture();t.bindTexture(t.TEXTURE_2D,s);const o=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,o),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,s,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,n);const f=new Uint8Array(4);return t.readPixels(0,0,1,1,t.RGBA,t.UNSIGNED_BYTE,f),t.deleteFramebuffer(o),t.deleteTexture(s),(d=t.getExtension("WEBGL_lose_context"))==null||d.loseContext(),f[0]<=f[3]?"premultiplied-alpha":"premultiply-alpha-on-upload"})()),xy}const fp=class Ux extends wi{constructor(t){super(t),this.isReady=!1,this.uploadMethodId="video",t={...Ux.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=bc.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,n=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():(n.preload||t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlayThrough),t.addEventListener("error",this._onError,!0)),this.alphaMode=await $T(),this._load=new Promise((s,o)=>{this.isValid?s(this):(this._resolve=s,this._reject=o,n.preloadTimeoutMs!==void 0&&(this._preloadTimeout=setTimeout(()=>{this._onError(new ErrorEvent(`Preload exceeded timeout of ${n.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&&(bc.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||(bc.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(bc.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(t){return globalThis.HTMLVideoElement&&t instanceof HTMLVideoElement}};fp.extension=kt.TextureSource;fp.defaultOptions={...wi.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1};fp.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let tE=fp;const vc=(i,t,n=!1)=>(Array.isArray(i)||(i=[i]),t?i.map(s=>typeof s=="string"||n?t(s):s):i);class eE{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 n=this._cache.get(t);return n||Da(`[Assets] Asset id ${t} was not found in the Cache`),n}set(t,n){const s=vc(t);let o;for(let g=0;g<this.parsers.length;g++){const v=this.parsers[g];if(v.test(n)){o=v.getCacheableAssets(s,n);break}}const f=new Map(Object.entries(o||{}));o||s.forEach(g=>{f.set(g,n)});const d=[...f.keys()],m={cacheKeys:d,keys:s};s.forEach(g=>{this._cacheMap.set(g,m)}),d.forEach(g=>{const v=o?o[g]:n;this._cache.has(g)&&this._cache.get(g)!==v&&Da("[Cache] already has key:",g),this._cache.set(g,f.get(g))})}remove(t){if(!this._cacheMap.has(t)){Da(`[Assets] Asset id ${t} was not found in the Cache`);return}const n=this._cacheMap.get(t);n.cacheKeys.forEach(o=>{this._cache.delete(o)}),n.keys.forEach(o=>{this._cacheMap.delete(o)})}get parsers(){return this._parsers}}const xc=new eE,Iy=[];ke.handleByList(kt.TextureSource,Iy);function Bx(i={}){const t=i&&i.resource,n=t?i.resource:i,s=t?i:{resource:i};for(let o=0;o<Iy.length;o++){const f=Iy[o];if(f.test(n))return new f(s)}throw new Error(`Could not find a source type for resource: ${s.resource}`)}function nE(i={},t=!1){const n=i&&i.resource,s=n?i.resource:i,o=n?i:{resource:i};if(!t&&xc.has(s))return xc.get(s);const f=new Ee({source:Bx(o)});return f.on("destroy",()=>{xc.has(s)&&xc.remove(s)}),t||xc.set(s,f),f}function aE(i,t=!1){return typeof i=="string"?xc.get(i):i instanceof wi?new Ee({source:i}):nE(i,t)}Ee.from=aE;wi.from=Bx;ke.add(Rx,zx,Dx,tE,Wm,Ox,Eg);var wx=(i=>(i[i.Low=0]="Low",i[i.Normal=1]="Normal",i[i.High=2]="High",i))(wx||{});function rl(i){if(typeof i!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(i)}`)}function gh(i){return i.split("?")[0].split("#")[0]}function iE(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function lE(i,t,n){return i.replace(new RegExp(iE(t),"g"),n)}function sE(i,t){let n="",s=0,o=-1,f=0,d=-1;for(let m=0;m<=i.length;++m){if(m<i.length)d=i.charCodeAt(m);else{if(d===47)break;d=47}if(d===47){if(!(o===m-1||f===1))if(o!==m-1&&f===2){if(n.length<2||s!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){const g=n.lastIndexOf("/");if(g!==n.length-1){g===-1?(n="",s=0):(n=n.slice(0,g),s=n.length-1-n.lastIndexOf("/")),o=m,f=0;continue}}else if(n.length===2||n.length===1){n="",s=0,o=m,f=0;continue}}}else n.length>0?n+=`/${i.slice(o+1,m)}`:n=i.slice(o+1,m),s=m-o-1;o=m,f=0}else d===46&&f!==-1?++f:f=-1}return n}const Hh={toPosix(i){return lE(i,"\\","/")},isUrl(i){return/^https?:/.test(this.toPosix(i))},isDataUrl(i){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(i)},isBlobUrl(i){return i.startsWith("blob:")},hasProtocol(i){return/^[^/:]+:/.test(this.toPosix(i))},getProtocol(i){rl(i),i=this.toPosix(i);const t=/^file:\/\/\//.exec(i);if(t)return t[0];const n=/^[^/:]+:\/{0,2}/.exec(i);return n?n[0]:""},toAbsolute(i,t,n){if(rl(i),this.isDataUrl(i)||this.isBlobUrl(i))return i;const s=gh(this.toPosix(t??si.get().getBaseUrl())),o=gh(this.toPosix(n??this.rootname(s)));return i=this.toPosix(i),i.startsWith("/")?Hh.join(o,i.slice(1)):this.isAbsolute(i)?i:this.join(s,i)},normalize(i){if(rl(i),i.length===0)return".";if(this.isDataUrl(i)||this.isBlobUrl(i))return i;i=this.toPosix(i);let t="";const n=i.startsWith("/");this.hasProtocol(i)&&(t=this.rootname(i),i=i.slice(t.length));const s=i.endsWith("/");return i=sE(i),i.length>0&&s&&(i+="/"),n?`/${i}`:t+i},isAbsolute(i){return rl(i),i=this.toPosix(i),this.hasProtocol(i)?!0:i.startsWith("/")},join(...i){if(i.length===0)return".";let t;for(let n=0;n<i.length;++n){const s=i[n];if(rl(s),s.length>0)if(t===void 0)t=s;else{const o=i[n-1]??"";this.joinExtensions.includes(this.extname(o).toLowerCase())?t+=`/../${s}`:t+=`/${s}`}}return t===void 0?".":this.normalize(t)},dirname(i){if(rl(i),i.length===0)return".";i=this.toPosix(i);let t=i.charCodeAt(0);const n=t===47;let s=-1,o=!0;const f=this.getProtocol(i),d=i;i=i.slice(f.length);for(let m=i.length-1;m>=1;--m)if(t=i.charCodeAt(m),t===47){if(!o){s=m;break}}else o=!1;return s===-1?n?"/":this.isUrl(d)?f+i:f:n&&s===1?"//":f+i.slice(0,s)},rootname(i){rl(i),i=this.toPosix(i);let t="";if(i.startsWith("/")?t="/":t=this.getProtocol(i),this.isUrl(i)){const n=i.indexOf("/",t.length);n!==-1?t=i.slice(0,n):t=i,t.endsWith("/")||(t+="/")}return t},basename(i,t){rl(i),t&&rl(t),i=gh(this.toPosix(i));let n=0,s=-1,o=!0,f;if(t!==void 0&&t.length>0&&t.length<=i.length){if(t.length===i.length&&t===i)return"";let d=t.length-1,m=-1;for(f=i.length-1;f>=0;--f){const g=i.charCodeAt(f);if(g===47){if(!o){n=f+1;break}}else m===-1&&(o=!1,m=f+1),d>=0&&(g===t.charCodeAt(d)?--d===-1&&(s=f):(d=-1,s=m))}return n===s?s=m:s===-1&&(s=i.length),i.slice(n,s)}for(f=i.length-1;f>=0;--f)if(i.charCodeAt(f)===47){if(!o){n=f+1;break}}else s===-1&&(o=!1,s=f+1);return s===-1?"":i.slice(n,s)},extname(i){rl(i),i=gh(this.toPosix(i));let t=-1,n=0,s=-1,o=!0,f=0;for(let d=i.length-1;d>=0;--d){const m=i.charCodeAt(d);if(m===47){if(!o){n=d+1;break}continue}s===-1&&(o=!1,s=d+1),m===46?t===-1?t=d:f!==1&&(f=1):t!==-1&&(f=-1)}return t===-1||s===-1||f===0||f===1&&t===s-1&&t===n+1?"":i.slice(t,s)},parse(i){rl(i);const t={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return t;i=gh(this.toPosix(i));let n=i.charCodeAt(0);const s=this.isAbsolute(i);let o;t.root=this.rootname(i),s||this.hasProtocol(i)?o=1:o=0;let f=-1,d=0,m=-1,g=!0,v=i.length-1,S=0;for(;v>=o;--v){if(n=i.charCodeAt(v),n===47){if(!g){d=v+1;break}continue}m===-1&&(g=!1,m=v+1),n===46?f===-1?f=v:S!==1&&(S=1):f!==-1&&(S=-1)}return f===-1||m===-1||S===0||S===1&&f===m-1&&f===d+1?m!==-1&&(d===0&&s?t.base=t.name=i.slice(1,m):t.base=t.name=i.slice(d,m)):(d===0&&s?(t.name=i.slice(1,f),t.base=i.slice(1,m)):(t.name=i.slice(d,f),t.base=i.slice(d,m)),t.ext=i.slice(f,m)),t.dir=this.dirname(i),t},sep:"/",delimiter:":",joinExtensions:[".html"]};function Hx(i,t,n,s,o){const f=t[n];for(let d=0;d<f.length;d++){const m=f[d];n<t.length-1?Hx(i.replace(s[n],m),t,n+1,s,o):o.push(i.replace(s[n],m))}}function uE(i){const t=/\{(.*?)\}/g,n=i.match(t),s=[];if(n){const o=[];n.forEach(f=>{const d=f.substring(1,f.length-1).split(",");o.push(d)}),Hx(i,o,0,n,s)}else s.push(i);return s}const Dv=i=>!Array.isArray(i);class Gx{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(t,n)=>`${t}${this._bundleIdConnector}${n}`,extractAssetIdFromBundle:(t,n)=>n.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(n=>{this._preferredOrder.push(n),n.priority||(n.priority=Object.keys(n.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 n=t;this._defaultSearchParams=Object.keys(n).map(s=>`${encodeURIComponent(s)}=${encodeURIComponent(n[s])}`).join("&")}}getAlias(t){const{alias:n,src:s}=t;return vc(n||s,f=>typeof f=="string"?f:Array.isArray(f)?f.map(d=>(d==null?void 0:d.src)??d):f!=null&&f.src?f.src:f,!0)}removeAlias(t,n){this._assetMap[t]&&(n&&n!==this._resolverHash[t]||(delete this._resolverHash[t],delete this._assetMap[t]))}addManifest(t){this._manifest&&Da("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=t,t.bundles.forEach(n=>{this.addBundle(n.name,n.assets)})}addBundle(t,n){const s=[];let o=n;Array.isArray(n)||(o=Object.entries(n).map(([f,d])=>typeof d=="string"||Array.isArray(d)?{alias:f,src:d}:{alias:f,...d})),o.forEach(f=>{const d=f.src,m=f.alias;let g;if(typeof m=="string"){const v=this._createBundleAssetId(t,m);s.push(v),g=[m,v]}else{const v=m.map(S=>this._createBundleAssetId(t,S));s.push(...v),g=[...m,...v]}this.add({...f,alias:g,src:d})}),this._bundles[t]=s}add(t){const n=[];Array.isArray(t)?n.push(...t):n.push(t);let s;s=f=>{this.hasKey(f)&&Da(`[Resolver] already has key: ${f} overwriting`)},vc(n).forEach(f=>{const{src:d}=f;let{data:m,format:g,loadParser:v,parser:S}=f;const b=vc(d).map(M=>typeof M=="string"?uE(M):Array.isArray(M)?M:[M]),A=this.getAlias(f);Array.isArray(A)?A.forEach(s):s(A);const E=[],z=M=>{const R=this._parsers.find(O=>O.test(M));return{src:M,...R==null?void 0:R.parse(M)}};b.forEach(M=>{M.forEach(R=>{let O={};if(typeof R!="object"?O=z(R):(m=R.data??m,g=R.format??g,(R.loadParser||R.parser)&&(v=R.loadParser??v,S=R.parser??S),O={...z(R.src),...R}),!A)throw new Error(`[Resolver] alias is undefined for this asset: ${O.src}`);O=this._buildResolvedAsset(O,{aliases:A,data:m,format:g,loadParser:v,parser:S,progressSize:f.progressSize}),E.push(O)})}),A.forEach(M=>{this._assetMap[M]=E})})}resolveBundle(t){const n=Dv(t);t=vc(t);const s={};return t.forEach(o=>{const f=this._bundles[o];if(f){const d=this.resolve(f),m={};for(const g in d){const v=d[g];m[this._extractAssetIdFromBundle(o,g)]=v}s[o]=m}}),n?s[t[0]]:s}resolveUrl(t){const n=this.resolve(t);if(typeof t!="string"){const s={};for(const o in n)s[o]=n[o].src;return s}return n.src}resolve(t){const n=Dv(t);t=vc(t);const s={};return t.forEach(o=>{if(!this._resolverHash[o])if(this._assetMap[o]){let f=this._assetMap[o];const d=this._getPreferredOrder(f);d==null||d.priority.forEach(m=>{d.params[m].forEach(g=>{const v=f.filter(S=>S[m]?S[m]===g:!1);v.length&&(f=v)})}),this._resolverHash[o]=f[0]}else this._resolverHash[o]=this._buildResolvedAsset({alias:[o],src:o},{});s[o]=this._resolverHash[o]}),n?s[t[0]]:s}hasKey(t){return!!this._assetMap[t]}hasBundle(t){return!!this._bundles[t]}_getPreferredOrder(t){for(let n=0;n<t.length;n++){const s=t[n],o=this._preferredOrder.find(f=>f.params.format.includes(s.format));if(o)return o}return this._preferredOrder[0]}_appendDefaultSearchParams(t){if(!this._defaultSearchParams)return t;const n=/\?/.test(t)?"&":"?";return`${t}${n}${this._defaultSearchParams}`}_buildResolvedAsset(t,n){const{aliases:s,data:o,loadParser:f,parser:d,format:m,progressSize:g}=n;return(this._basePath||this._rootPath)&&(t.src=Hh.toAbsolute(t.src,this._basePath,this._rootPath)),t.alias=s??t.alias??[t.src],t.src=this._appendDefaultSearchParams(t.src),t.data={...o||{},...t.data},t.loadParser=f??t.loadParser,t.parser=d??t.parser,t.format=m??t.format??rE(t.src),g!==void 0&&(t.progressSize=g),t}}Gx.RETINA_PREFIX=/@([0-9\.]+)x/;function rE(i){return i.split(".").pop().split("?").shift().split("#").shift()}const Ov=(i,t)=>{const n=t.split("?")[1];return n&&(i+=`?${n}`),i},jx=class Ah{constructor(t,n){this.linkedSheets=[];let s=t;(t==null?void 0:t.source)instanceof wi&&(s={texture:t,data:n});const{texture:o,data:f,cachePrefix:d=""}=s;this.cachePrefix=d,this._texture=o instanceof Ee?o:null,this.textureSource=o.source,this.textures={},this.animations={},this.data=f;const m=parseFloat(f.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<=Ah.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}parseSync(){return this._processFrames(0,!0),this._processAnimations(),this.textures}_processFrames(t,n=!1){let s=t;const o=n?1/0:Ah.BATCH_SIZE;for(;s-t<o&&s<this._frameKeys.length;){const f=this._frameKeys[s],d=this._frames[f],m=d.frame;if(m){let g=null,v=null;const S=d.trimmed!==!1&&d.sourceSize?d.sourceSize:d.frame,b=new un(0,0,Math.floor(S.w)/this.resolution,Math.floor(S.h)/this.resolution);d.rotated?g=new un(Math.floor(m.x)/this.resolution,Math.floor(m.y)/this.resolution,Math.floor(m.h)/this.resolution,Math.floor(m.w)/this.resolution):g=new un(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 un(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[f]=new Ee({source:this.textureSource,frame:g,orig:b,trim:v,rotate:d.rotated?2:0,defaultAnchor:d.anchor,defaultBorders:d.borders,label:f.toString()})}s++}}_processAnimations(){const t=this.data.animations||{};for(const n in t){this.animations[n]=[];for(let s=0;s<t[n].length;s++){const o=t[n][s];this.animations[n].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*Ah.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*Ah.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(t=!1){var n;for(const s in this.textures)this.textures[s].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&((n=this._texture)==null||n.destroy(),this.textureSource.destroy()),this._texture=null,this.textureSource=null,this.linkedSheets=[]}};jx.BATCH_SIZE=1e3;let Nv=jx;const oE=["jpg","png","jpeg","avif","webp","basis","etc2","bc7","bc6h","bc5","bc4","bc3","bc2","bc1","eac","astc"];function qx(i,t,n){const s={};if(i.forEach(o=>{s[o]=t}),Object.keys(t.textures).forEach(o=>{s[`${t.cachePrefix}${o}`]=t.textures[o]}),!n){const o=Hh.dirname(i[0]);t.linkedSheets.forEach((f,d)=>{const m=qx([`${o}/${t.data.meta.related_multi_packs[d]}`],f,!0);Object.assign(s,m)})}return s}const cE={extension:kt.Asset,cache:{test:i=>i instanceof Nv,getCacheableAssets:(i,t)=>qx(i,t,!1)},resolver:{extension:{type:kt.ResolveParser,name:"resolveSpritesheet"},test:i=>{const n=i.split("?")[0].split("."),s=n.pop(),o=n.pop();return s==="json"&&oE.includes(o)},parse:i=>{var n;const t=i.split(".");return{resolution:parseFloat(((n=Gx.RETINA_PREFIX.exec(i))==null?void 0:n[1])??"1"),format:t[t.length-2],src:i}}},loader:{name:"spritesheetLoader",id:"spritesheet",extension:{type:kt.LoadParser,priority:wx.Normal,name:"spritesheetLoader"},async testParse(i,t){return Hh.extname(t.src).toLowerCase()===".json"&&!!i.frames},async parse(i,t,n){var b,A;const{texture:s,imageFilename:o,textureOptions:f,cachePrefix:d}=(t==null?void 0:t.data)??{};let m=Hh.dirname(t.src);m&&m.lastIndexOf("/")!==m.length-1&&(m+="/");let g;if(s instanceof Ee)g=s;else{const E=Ov(m+(o??i.meta.image),t.src);g=(await n.load([{src:E,data:f}]))[E]}const v=new Nv({texture:g.source,data:i,cachePrefix:d});await v.parse();const S=(b=i==null?void 0:i.meta)==null?void 0:b.related_multi_packs;if(Array.isArray(S)){const E=[];for(const M of S){if(typeof M!="string")continue;let R=m+M;(A=t.data)!=null&&A.ignoreMultiPack||(R=Ov(R,t.src),E.push(n.load({src:R,data:{textureOptions:f,ignoreMultiPack:!0}})))}const z=await Promise.all(E);v.linkedSheets=z,z.forEach(M=>{M.linkedSheets=[v].concat(v.linkedSheets.filter(R=>R!==M))})}return v},async unload(i,t,n){await n.unload(i.textureSource._sourceOrigin),i.destroy(!1)}}};ke.add(cE);const _y=Object.create(null),Uv=Object.create(null);function Rg(i,t){let n=Uv[i];return n===void 0&&(_y[t]===void 0&&(_y[t]=1),Uv[i]=n=_y[t]++),n}let pc;function Yx(){return(!pc||pc!=null&&pc.isContextLost())&&(pc=si.get().createCanvas().getContext("webgl",{})),pc}let Bm;function fE(){if(!Bm){Bm="mediump";const i=Yx();i&&i.getShaderPrecisionFormat&&(Bm=i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision?"highp":"mediump")}return Bm}function hE(i,t,n){return t?i:n?(i=i.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
|
+
${i}
|
|
72
|
+
`):`
|
|
73
|
+
|
|
74
|
+
#ifdef GL_ES // This checks if it is WebGL1
|
|
75
|
+
#define in attribute
|
|
76
|
+
#define out varying
|
|
77
|
+
#endif
|
|
78
|
+
${i}
|
|
79
|
+
`}function dE(i,t,n){const s=n?t.maxSupportedFragmentPrecision:t.maxSupportedVertexPrecision;if(i.substring(0,9)!=="precision"){let o=n?t.requestedFragmentPrecision:t.requestedVertexPrecision;return o==="highp"&&s!=="highp"&&(o="mediump"),`precision ${o} float;
|
|
80
|
+
${i}`}else if(s!=="highp"&&i.substring(0,15)==="precision highp")return i.replace("precision highp","precision mediump");return i}function mE(i,t){return t?`#version 300 es
|
|
81
|
+
${i}`:i}const pE={},yE={};function gE(i,{name:t="pixi-program"},n=!0){t=t.replace(/\s+/g,"-"),t+=n?"-fragment":"-vertex";const s=n?pE:yE;return s[t]?(s[t]++,t+=`-${s[t]}`):s[t]=1,i.indexOf("#define SHADER_NAME")!==-1?i:`${`#define SHADER_NAME ${t}`}
|
|
82
|
+
${i}`}function vE(i,t){return t?i.replace("#version 300 es",""):i}const Sy={stripVersion:vE,ensurePrecision:dE,addProgramDefines:hE,setProgramName:gE,insertVersion:mE},vh=Object.create(null),Lx=class $y{constructor(t){t={...$y.defaultOptions,...t};const n=t.fragment.indexOf("#version 300 es")!==-1,s={stripVersion:n,ensurePrecision:{requestedFragmentPrecision:t.preferredFragmentPrecision,requestedVertexPrecision:t.preferredVertexPrecision,maxSupportedVertexPrecision:"highp",maxSupportedFragmentPrecision:fE()},setProgramName:{name:t.name},addProgramDefines:n,insertVersion:n};let o=t.fragment,f=t.vertex;Object.keys(Sy).forEach(d=>{const m=s[d];o=Sy[d](o,m,!0),f=Sy[d](f,m,!1)}),this.fragment=o,this.vertex=f,this.transformFeedbackVaryings=t.transformFeedbackVaryings,this._key=Rg(`${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,vh[this._cacheKey]=null}static from(t){const n=`${t.vertex}:${t.fragment}`;return vh[n]||(vh[n]=new $y(t),vh[n]._cacheKey=n),vh[n]}};Lx.defaultOptions={preferredVertexPrecision:"highp",preferredFragmentPrecision:"mediump"};let zg=Lx;const Bv={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 xE(i){return Bv[i]??Bv.float32}const _E={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"},wv=/@location\((\d+)\)\s+([a-zA-Z0-9_]+)\s*:\s*([a-zA-Z0-9_<>]+)(?:,|\s|\)|$)/g;function Hv(i,t){let n;for(;(n=wv.exec(i))!==null;){const s=_E[n[3]]??"float32";t[n[2]]={location:parseInt(n[1],10),format:s,stride:xE(s).stride,offset:0,instance:!1,start:0}}wv.lastIndex=0}function SE(i){return i.replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"")}function bE({source:i,entryPoint:t}){const n={},s=SE(i),o=s.indexOf(`fn ${t}(`);if(o===-1)return n;const f=s.indexOf("->",o);if(f===-1)return n;const d=s.substring(o,f);if(Hv(d,n),Object.keys(n).length===0){const m=d.match(/\(\s*\w+\s*:\s*(\w+)/);if(m){const g=m[1],v=new RegExp(`struct\\s+${g}\\s*\\{([^}]+)\\}`,"s"),S=s.match(v);S&&Hv(S[1],n)}}return n}function by(i){var b,A;const t=/(^|[^/])@(group|binding)\(\d+\)[^;]+;/g,n=/@group\((\d+)\)/,s=/@binding\((\d+)\)/,o=/var(<[^>]+>)? (\w+)/,f=/:\s*([\w<>]+)/,d=/struct\s+(\w+)\s*{([^}]+)}/g,m=/(\w+)\s*:\s*([\w\<\>]+)/g,g=/struct\s+(\w+)/,v=(b=i.match(t))==null?void 0:b.map(E=>({group:parseInt(E.match(n)[1],10),binding:parseInt(E.match(s)[1],10),name:E.match(o)[2],isUniform:E.match(o)[1]==="<uniform>",type:E.match(f)[1]}));if(!v)return{groups:[],structs:[]};const S=((A=i.match(d))==null?void 0:A.map(E=>{const z=E.match(g)[1],M=E.match(m).reduce((R,O)=>{const[B,U]=O.split(":");return R[B.trim()]=U.trim(),R},{});return M?{name:z,members:M}:null}).filter(({name:E})=>v.some(z=>z.type===E||z.type.includes(`<${E}>`))))??[];return{groups:v,structs:S}}var Zr=(i=>(i[i.VERTEX=1]="VERTEX",i[i.FRAGMENT=2]="FRAGMENT",i[i.COMPUTE=4]="COMPUTE",i))(Zr||{});function TE({groups:i}){const t=[];for(let n=0;n<i.length;n++){const s=i[n];t[s.group]||(t[s.group]=[]),s.isUniform?t[s.group].push({binding:s.binding,visibility:Zr.VERTEX|Zr.FRAGMENT,buffer:{type:"uniform"}}):s.type==="sampler"?t[s.group].push({binding:s.binding,visibility:Zr.FRAGMENT,sampler:{type:"filtering"}}):s.type==="texture_2d"||s.type.startsWith("texture_2d<")?t[s.group].push({binding:s.binding,visibility:Zr.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d",multisampled:!1}}):s.type==="texture_2d_array"||s.type.startsWith("texture_2d_array<")?t[s.group].push({binding:s.binding,visibility:Zr.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d-array",multisampled:!1}}):(s.type==="texture_cube"||s.type.startsWith("texture_cube<"))&&t[s.group].push({binding:s.binding,visibility:Zr.FRAGMENT,texture:{sampleType:"float",viewDimension:"cube",multisampled:!1}})}for(let n=0;n<t.length;n++)t[n]||(t[n]=[]);return t}function EE({groups:i}){const t=[];for(let n=0;n<i.length;n++){const s=i[n];t[s.group]||(t[s.group]={}),t[s.group][s.name]=s.binding}return t}function CE(i,t){const n=new Set,s=new Set,o=[...i.structs,...t.structs].filter(d=>n.has(d.name)?!1:(n.add(d.name),!0)),f=[...i.groups,...t.groups].filter(d=>{const m=`${d.name}-${d.binding}`;return s.has(m)?!1:(s.add(m),!0)});return{structs:o,groups:f}}const xh=Object.create(null);class Zh{constructor(t){var m,g;this._layoutKey=0,this._attributeLocationsKey=0;const{fragment:n,vertex:s,layout:o,gpuLayout:f,name:d}=t;if(this.name=d,this.fragment=n,this.vertex=s,n.source===s.source){const v=by(n.source);this.structsAndGroups=v}else{const v=by(s.source),S=by(n.source);this.structsAndGroups=CE(v,S)}this.layout=o??EE(this.structsAndGroups),this.gpuLayout=f??TE(this.structsAndGroups),this.autoAssignGlobalUniforms=((m=this.layout[0])==null?void 0:m.globalUniforms)!==void 0,this.autoAssignLocalUniforms=((g=this.layout[1])==null?void 0:g.localUniforms)!==void 0,this._generateProgramKey()}_generateProgramKey(){const{vertex:t,fragment:n}=this,s=t.source+n.source+t.entryPoint+n.entryPoint;this._layoutKey=Rg(s,"program")}get attributeData(){return this._attributeData??(this._attributeData=bE(this.vertex)),this._attributeData}destroy(){this.gpuLayout=null,this.layout=null,this.structsAndGroups=null,this.fragment=null,this.vertex=null,xh[this._cacheKey]=null}static from(t){const n=`${t.vertex.source}:${t.fragment.source}:${t.fragment.entryPoint}:${t.vertex.entryPoint}`;return xh[n]||(xh[n]=new Zh(t),xh[n]._cacheKey=n),xh[n]}}const Xx=["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>"],AE=Xx.reduce((i,t)=>(i[t]=!0,i),{});function ME(i,t){switch(i){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 Vx=class Qx{constructor(t,n){this._touched=0,this.uid=en("uniform"),this._resourceType="uniformGroup",this._resourceId=en("resource"),this.isUniformGroup=!0,this._dirtyId=0,this.destroyed=!1,n={...Qx.defaultOptions,...n},this.uniformStructures=t;const s={};for(const o in t){const f=t[o];if(f.name=o,f.size=f.size??1,!AE[f.type]){const d=f.type.match(/^array<(\w+(?:<\w+>)?),\s*(\d+)>$/);if(d){const[,m,g]=d;throw new Error(`Uniform type ${f.type} is not supported. Use type: '${m}', size: ${g} instead.`)}throw new Error(`Uniform type ${f.type} is not supported. Supported uniform types are: ${Xx.join(", ")}`)}f.value??(f.value=ME(f.type,f.size)),s[o]=f.value}this.uniforms=s,this._dirtyId=1,this.ubo=n.ubo,this.isStatic=n.isStatic,this._signature=Rg(Object.keys(s).map(o=>`${o}-${t[o].type}`).join("-"),"uniform-group")}update(){this._dirtyId++}};Vx.defaultOptions={ubo:!1,isStatic:!1};let Zx=Vx;class Jm{constructor(t){this.resources=Object.create(null),this._dirty=!0;let n=0;for(const s in t){const o=t[s];this.setResource(o,n++)}this._updateKey()}_updateKey(){if(!this._dirty)return;this._dirty=!1;const t=[];let n=0;for(const s in this.resources)t[n++]=this.resources[s]._resourceId;this._key=t.join("|")}setResource(t,n){var o,f;const s=this.resources[n];t!==s&&((o=s==null?void 0:s.off)==null||o.call(s,"change",this.onResourceChange,this),(f=t.on)==null||f.call(t,"change",this.onResourceChange,this),this.resources[n]=t,this._dirty=!0)}getResource(t){return this.resources[t]}_touch(t,n){const s=this.resources;for(const o in s)s[o]._gcLastUsed=t,s[o]._touched=n}destroy(){var n;const t=this.resources;for(const s in t){const o=t[s];(n=o==null?void 0:o.off)==null||n.call(o,"change",this.onResourceChange,this)}this.resources=null}onResourceChange(t){this._dirty=!0,t.destroyed?this.destroy():this._updateKey()}}var tg=(i=>(i[i.WEBGL=1]="WEBGL",i[i.WEBGPU=2]="WEBGPU",i[i.CANVAS=4]="CANVAS",i[i.BOTH=3]="BOTH",i))(tg||{});class hp extends $l{constructor(t){super(),this.uid=en("shader"),this._uniformBindMap=Object.create(null),this._ownedBindGroups=[],this._destroyed=!1;let{gpuProgram:n,glProgram:s,groups:o,resources:f,compatibleRenderers:d,groupMap:m}=t;this.gpuProgram=n,this.glProgram=s,d===void 0&&(d=0,n&&(d|=tg.WEBGPU),s&&(d|=tg.WEBGL)),this.compatibleRenderers=d;const g={};if(!f&&!o&&(f={}),f&&o)throw new Error("[Shader] Cannot have both resources and groups");if(!n&&o&&!m)throw new Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");if(!n&&o&&m)for(const v in m)for(const S in m[v]){const b=m[v][S];g[b]={group:v,binding:S,name:b}}else if(n&&o&&!m){const v=n.structsAndGroups.groups;m={},v.forEach(S=>{m[S.group]=m[S.group]||{},m[S.group][S.binding]=S.name,g[S.name]=S})}else if(f){o={},m={},n&&n.structsAndGroups.groups.forEach(b=>{m[b.group]=m[b.group]||{},m[b.group][b.binding]=b.name,g[b.name]=b});let v=0;for(const S in f)g[S]||(o[99]||(o[99]=new Jm,this._ownedBindGroups.push(o[99])),g[S]={group:99,binding:v,name:S},m[99]=m[99]||{},m[99][v]=S,v++);for(const S in f){const b=S;let A=f[S];!A.source&&!A._resourceType&&(A=new Zx(A));const E=g[b];E&&(o[E.group]||(o[E.group]=new Jm,this._ownedBindGroups.push(o[E.group])),o[E.group].setResource(A,E.binding))}}this.groups=o,this._uniformBindMap=m,this.resources=this._buildResourceAccessor(o,g)}addResource(t,n,s){var o,f;(o=this._uniformBindMap)[n]||(o[n]={}),(f=this._uniformBindMap[n])[s]||(f[s]=t),this.groups[n]||(this.groups[n]=new Jm,this._ownedBindGroups.push(this.groups[n]))}_buildResourceAccessor(t,n){const s={};for(const o in n){const f=n[o];Object.defineProperty(s,f.name,{get(){return t[f.group].getResource(f.binding)},set(d){t[f.group].setResource(d,f.binding)}})}return s}destroy(t=!1){var n,s;this._destroyed||(this._destroyed=!0,this.emit("destroy",this),t&&((n=this.gpuProgram)==null||n.destroy(),(s=this.glProgram)==null||s.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:n,gl:s,...o}=t;let f,d;return n&&(f=Zh.from(n)),s&&(d=zg.from(s)),new hp({gpuProgram:f,glProgram:d,...o})}}const RE={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},Ty=0,Ey=1,Cy=2,Ay=3,My=4,Ry=5,eg=class Kx{constructor(){this.data=0,this.blendMode="normal",this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Ty)}set blend(t){!!(this.data&1<<Ty)!==t&&(this.data^=1<<Ty)}get offsets(){return!!(this.data&1<<Ey)}set offsets(t){!!(this.data&1<<Ey)!==t&&(this.data^=1<<Ey)}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<<Cy)}set culling(t){!!(this.data&1<<Cy)!==t&&(this.data^=1<<Cy)}get depthTest(){return!!(this.data&1<<Ay)}set depthTest(t){!!(this.data&1<<Ay)!==t&&(this.data^=1<<Ay)}get depthMask(){return!!(this.data&1<<Ry)}set depthMask(t){!!(this.data&1<<Ry)!==t&&(this.data^=1<<Ry)}get clockwiseFrontFace(){return!!(this.data&1<<My)}set clockwiseFrontFace(t){!!(this.data&1<<My)!==t&&(this.data^=1<<My)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!=="none",this._blendMode=t,this._blendModeId=RE[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 Kx;return t.depthTest=!1,t.blend=!0,t}};eg.default2d=eg.for2d();let Dg=eg;const kx=class ng extends hp{constructor(t){t={...ng.defaultOptions,...t},super(t),this.enabled=!0,this._state=Dg.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,n,s,o){t.applyFilter(this,n,s,o)}get blendMode(){return this._state.blendMode}set blendMode(t){this._state.blendMode=t}static from(t){const{gpu:n,gl:s,...o}=t;let f,d;return n&&(f=Zh.from(n)),s&&(d=zg.from(s)),new ng({gpuProgram:f,glProgram:d,...o})}};kx.defaultOptions={blendMode:"normal",resolution:1,padding:0,antialias:"off",blendRequired:!1,clipToViewport:!0};let Wr=kx;const ag=[];ke.handleByNamedList(kt.Environment,ag);async function zE(i){if(!i)for(let t=0;t<ag.length;t++){const n=ag[t];if(n.value.test()){await n.value.load();return}}}let _h;function DE(){if(typeof _h=="boolean")return _h;try{_h=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{_h=!1}return _h}function Gv(i,t,n=2){const s=t&&t.length,o=s?t[0]*n:i.length;let f=Jx(i,0,o,n,!0);const d=[];if(!f||f.next===f.prev)return d;let m,g,v;if(s&&(f=wE(i,t,f,n)),i.length>80*n){m=i[0],g=i[1];let S=m,b=g;for(let A=n;A<o;A+=n){const E=i[A],z=i[A+1];E<m&&(m=E),z<g&&(g=z),E>S&&(S=E),z>b&&(b=z)}v=Math.max(S-m,b-g),v=v!==0?32767/v:0}return Gh(f,d,n,m,g,v,0),d}function Jx(i,t,n,s,o){let f;if(o===KE(i,t,n,s)>0)for(let d=t;d<n;d+=s)f=jv(d/s|0,i[d],i[d+1],f);else for(let d=n-s;d>=t;d-=s)f=jv(d/s|0,i[d],i[d+1],f);return f&&Dc(f,f.next)&&(qh(f),f=f.next),f}function Jr(i,t){if(!i)return i;t||(t=i);let n=i,s;do if(s=!1,!n.steiner&&(Dc(n,n.next)||Ke(n.prev,n,n.next)===0)){if(qh(n),n=t=n.prev,n===n.next)break;s=!0}else n=n.next;while(s||n!==t);return t}function Gh(i,t,n,s,o,f,d){if(!i)return;!d&&f&&YE(i,s,o,f);let m=i;for(;i.prev!==i.next;){const g=i.prev,v=i.next;if(f?NE(i,s,o,f):OE(i)){t.push(g.i,i.i,v.i),qh(i),i=v.next,m=v.next;continue}if(i=v,i===m){d?d===1?(i=UE(Jr(i),t),Gh(i,t,n,s,o,f,2)):d===2&&BE(i,t,n,s,o,f):Gh(Jr(i),t,n,s,o,f,1);break}}}function OE(i){const t=i.prev,n=i,s=i.next;if(Ke(t,n,s)>=0)return!1;const o=t.x,f=n.x,d=s.x,m=t.y,g=n.y,v=s.y,S=Math.min(o,f,d),b=Math.min(m,g,v),A=Math.max(o,f,d),E=Math.max(m,g,v);let z=s.next;for(;z!==t;){if(z.x>=S&&z.x<=A&&z.y>=b&&z.y<=E&&Mh(o,m,f,g,d,v,z.x,z.y)&&Ke(z.prev,z,z.next)>=0)return!1;z=z.next}return!0}function NE(i,t,n,s){const o=i.prev,f=i,d=i.next;if(Ke(o,f,d)>=0)return!1;const m=o.x,g=f.x,v=d.x,S=o.y,b=f.y,A=d.y,E=Math.min(m,g,v),z=Math.min(S,b,A),M=Math.max(m,g,v),R=Math.max(S,b,A),O=ig(E,z,t,n,s),B=ig(M,R,t,n,s);let U=i.prevZ,G=i.nextZ;for(;U&&U.z>=O&&G&&G.z<=B;){if(U.x>=E&&U.x<=M&&U.y>=z&&U.y<=R&&U!==o&&U!==d&&Mh(m,S,g,b,v,A,U.x,U.y)&&Ke(U.prev,U,U.next)>=0||(U=U.prevZ,G.x>=E&&G.x<=M&&G.y>=z&&G.y<=R&&G!==o&&G!==d&&Mh(m,S,g,b,v,A,G.x,G.y)&&Ke(G.prev,G,G.next)>=0))return!1;G=G.nextZ}for(;U&&U.z>=O;){if(U.x>=E&&U.x<=M&&U.y>=z&&U.y<=R&&U!==o&&U!==d&&Mh(m,S,g,b,v,A,U.x,U.y)&&Ke(U.prev,U,U.next)>=0)return!1;U=U.prevZ}for(;G&&G.z<=B;){if(G.x>=E&&G.x<=M&&G.y>=z&&G.y<=R&&G!==o&&G!==d&&Mh(m,S,g,b,v,A,G.x,G.y)&&Ke(G.prev,G,G.next)>=0)return!1;G=G.nextZ}return!0}function UE(i,t){let n=i;do{const s=n.prev,o=n.next.next;!Dc(s,o)&&Wx(s,n,n.next,o)&&jh(s,o)&&jh(o,s)&&(t.push(s.i,n.i,o.i),qh(n),qh(n.next),n=i=o),n=n.next}while(n!==i);return Jr(n)}function BE(i,t,n,s,o,f){let d=i;do{let m=d.next.next;for(;m!==d.prev;){if(d.i!==m.i&&VE(d,m)){let g=Fx(d,m);d=Jr(d,d.next),g=Jr(g,g.next),Gh(d,t,n,s,o,f,0),Gh(g,t,n,s,o,f,0);return}m=m.next}d=d.next}while(d!==i)}function wE(i,t,n,s){const o=[];for(let f=0,d=t.length;f<d;f++){const m=t[f]*s,g=f<d-1?t[f+1]*s:i.length,v=Jx(i,m,g,s,!1);v===v.next&&(v.steiner=!0),o.push(XE(v))}o.sort(HE);for(let f=0;f<o.length;f++)n=GE(o[f],n);return n}function HE(i,t){let n=i.x-t.x;if(n===0&&(n=i.y-t.y,n===0)){const s=(i.next.y-i.y)/(i.next.x-i.x),o=(t.next.y-t.y)/(t.next.x-t.x);n=s-o}return n}function GE(i,t){const n=jE(i,t);if(!n)return t;const s=Fx(n,i);return Jr(s,s.next),Jr(n,n.next)}function jE(i,t){let n=t;const s=i.x,o=i.y;let f=-1/0,d;if(Dc(i,n))return n;do{if(Dc(i,n.next))return n.next;if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){const b=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(b<=s&&b>f&&(f=b,d=n.x<n.next.x?n:n.next,b===s))return d}n=n.next}while(n!==t);if(!d)return null;const m=d,g=d.x,v=d.y;let S=1/0;n=d;do{if(s>=n.x&&n.x>=g&&s!==n.x&&Px(o<v?s:f,o,g,v,o<v?f:s,o,n.x,n.y)){const b=Math.abs(o-n.y)/(s-n.x);jh(n,i)&&(b<S||b===S&&(n.x>d.x||n.x===d.x&&qE(d,n)))&&(d=n,S=b)}n=n.next}while(n!==m);return d}function qE(i,t){return Ke(i.prev,i,t.prev)<0&&Ke(t.next,i,i.next)<0}function YE(i,t,n,s){let o=i;do o.z===0&&(o.z=ig(o.x,o.y,t,n,s)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next;while(o!==i);o.prevZ.nextZ=null,o.prevZ=null,LE(o)}function LE(i){let t,n=1;do{let s=i,o;i=null;let f=null;for(t=0;s;){t++;let d=s,m=0;for(let v=0;v<n&&(m++,d=d.nextZ,!!d);v++);let g=n;for(;m>0||g>0&&d;)m!==0&&(g===0||!d||s.z<=d.z)?(o=s,s=s.nextZ,m--):(o=d,d=d.nextZ,g--),f?f.nextZ=o:i=o,o.prevZ=f,f=o;s=d}f.nextZ=null,n*=2}while(t>1);return i}function ig(i,t,n,s,o){return i=(i-n)*o|0,t=(t-s)*o|0,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,i|t<<1}function XE(i){let t=i,n=i;do(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next;while(t!==i);return n}function Px(i,t,n,s,o,f,d,m){return(o-d)*(t-m)>=(i-d)*(f-m)&&(i-d)*(s-m)>=(n-d)*(t-m)&&(n-d)*(f-m)>=(o-d)*(s-m)}function Mh(i,t,n,s,o,f,d,m){return!(i===d&&t===m)&&Px(i,t,n,s,o,f,d,m)}function VE(i,t){return i.next.i!==t.i&&i.prev.i!==t.i&&!QE(i,t)&&(jh(i,t)&&jh(t,i)&&ZE(i,t)&&(Ke(i.prev,i,t.prev)||Ke(i,t.prev,t))||Dc(i,t)&&Ke(i.prev,i,i.next)>0&&Ke(t.prev,t,t.next)>0)}function Ke(i,t,n){return(t.y-i.y)*(n.x-t.x)-(t.x-i.x)*(n.y-t.y)}function Dc(i,t){return i.x===t.x&&i.y===t.y}function Wx(i,t,n,s){const o=Hm(Ke(i,t,n)),f=Hm(Ke(i,t,s)),d=Hm(Ke(n,s,i)),m=Hm(Ke(n,s,t));return!!(o!==f&&d!==m||o===0&&wm(i,n,t)||f===0&&wm(i,s,t)||d===0&&wm(n,i,s)||m===0&&wm(n,t,s))}function wm(i,t,n){return t.x<=Math.max(i.x,n.x)&&t.x>=Math.min(i.x,n.x)&&t.y<=Math.max(i.y,n.y)&&t.y>=Math.min(i.y,n.y)}function Hm(i){return i>0?1:i<0?-1:0}function QE(i,t){let n=i;do{if(n.i!==i.i&&n.next.i!==i.i&&n.i!==t.i&&n.next.i!==t.i&&Wx(n,n.next,i,t))return!0;n=n.next}while(n!==i);return!1}function jh(i,t){return Ke(i.prev,i,i.next)<0?Ke(i,t,i.next)>=0&&Ke(i,i.prev,t)>=0:Ke(i,t,i.prev)<0||Ke(i,i.next,t)<0}function ZE(i,t){let n=i,s=!1;const o=(i.x+t.x)/2,f=(i.y+t.y)/2;do n.y>f!=n.next.y>f&&n.next.y!==n.y&&o<(n.next.x-n.x)*(f-n.y)/(n.next.y-n.y)+n.x&&(s=!s),n=n.next;while(n!==i);return s}function Fx(i,t){const n=lg(i.i,i.x,i.y),s=lg(t.i,t.x,t.y),o=i.next,f=t.prev;return i.next=t,t.prev=i,n.next=o,o.prev=n,s.next=n,n.prev=s,f.next=s,s.prev=f,s}function jv(i,t,n,s){const o=lg(i,t,n);return s?(o.next=s.next,o.prev=s,s.next.prev=o,s.next=o):(o.prev=o,o.next=o),o}function qh(i){i.next.prev=i.prev,i.prev.next=i.next,i.prevZ&&(i.prevZ.nextZ=i.nextZ),i.nextZ&&(i.nextZ.prevZ=i.prevZ)}function lg(i,t,n){return{i,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function KE(i,t,n,s){let o=0;for(let f=t,d=n-s;f<n;f+=s)o+=(i[d]-i[f])*(i[f+1]+i[d+1]),d=f;return o}const kE=Gv.default||Gv;var Ix=(i=>(i[i.NONE=0]="NONE",i[i.COLOR=16384]="COLOR",i[i.STENCIL=1024]="STENCIL",i[i.DEPTH=256]="DEPTH",i[i.COLOR_DEPTH=16640]="COLOR_DEPTH",i[i.COLOR_STENCIL=17408]="COLOR_STENCIL",i[i.DEPTH_STENCIL=1280]="DEPTH_STENCIL",i[i.ALL=17664]="ALL",i))(Ix||{});class JE{constructor(t){this.items=[],this._name=t}emit(t,n,s,o,f,d,m,g){const{name:v,items:S}=this;for(let b=0,A=S.length;b<A;b++)S[b][v](t,n,s,o,f,d,m,g);return this}add(t){return t[this._name]&&(this.remove(t),this.items.push(t)),this}remove(t){const n=this.items.indexOf(t);return n!==-1&&this.items.splice(n,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 PE=["init","destroy","contextChange","resolutionChange","resetState","renderEnd","renderStart","render","update","postrender","prerender"],$x=class t_ extends $l{constructor(t){super(),this.tick=0,this.uid=en("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 n=[...PE,...this.config.runners??[]];this._addRunners(...n),this._unsafeEvalCheck()}async init(t={}){const n=t.skipExtensionImports===!0?!0:t.manageImports===!1;await zE(n),this._addSystems(this.config.systems),this._addPipes(this.config.renderPipes,this.config.renderPipeAdaptors);for(const s in this._systemsHash)t={...this._systemsHash[s].constructor.defaultOptions,...t};t={...t_.defaultOptions,...t},this._roundPixels=t.roundPixels?1:0;for(let s=0;s<this.runners.init.items.length;s++)await this.runners.init.items[s].init(t);this._initOptions=t}render(t,n){this.tick++;let s=t;if(s instanceof ua&&(s={container:s},n&&(ce(tn,"passing a second argument is deprecated, please use render options instead"),s.target=n.renderTexture)),s.target||(s.target=this.view.renderTarget),s.target===this.view.renderTarget&&(this._lastObjectRendered=s.container,s.clearColor??(s.clearColor=this.background.colorRgba),s.clear??(s.clear=this.background.clearBeforeRender)),s.clearColor){const o=Array.isArray(s.clearColor)&&s.clearColor.length===4;s.clearColor=o?s.clearColor:Sn.shared.setValue(s.clearColor).toArray()}s.transform||(s.container.updateLocalTransform(),s.transform=s.container.localTransform),s.container.visible&&(s.container.enableRenderGroup(),this.runners.prerender.emit(s),this.runners.renderStart.emit(s),this.runners.render.emit(s),this.runners.renderEnd.emit(s),this.runners.postrender.emit(s))}resize(t,n,s){const o=this.view.resolution;this.view.resize(t,n,s),this.emit("resize",this.view.screen.width,this.view.screen.height,this.view.resolution),s!==void 0&&s!==o&&this.runners.resolutionChange.emit(s)}clear(t={}){const n=this;t.target||(t.target=n.renderTarget.renderTarget),t.clearColor||(t.clearColor=this.background.colorRgba),t.clear??(t.clear=Ix.ALL);const{clear:s,clearColor:o,target:f,mipLevel:d,layer:m}=t;Sn.shared.setValue(o??this.background.colorRgba),n.renderTarget.clear(f,s,Sn.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(n=>{this.runners[n]=new JE(n)})}_addSystems(t){let n;for(n in t){const s=t[n];this._addSystem(s.value,s.name)}}_addSystem(t,n){const s=new t(this);if(this[n])throw new Error(`Whoops! The name "${n}" is already in use`);this[n]=s,this._systemsHash[n]=s;for(const o in this.runners)this.runners[o].add(s);return this}_addPipes(t,n){const s=n.reduce((o,f)=>(o[f.name]=f.value,o),{});t.forEach(o=>{const f=o.value,d=o.name,m=s[d];this.renderPipes[d]=new f(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)&&Qh.release(),Object.values(this.runners).forEach(n=>{n.destroy()}),this._systemsHash=null,this.renderPipes=null,this.removeAllListeners()}generateTexture(t){return this.textureGenerator.generateTexture(t)}get roundPixels(){return!!this._roundPixels}_unsafeEvalCheck(){if(!DE())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()}};$x.defaultOptions={resolution:1,failIfMajorPerformanceCaveat:!1,roundPixels:!1};let e_=$x,Gm;function WE(i){return Gm!==void 0||(Gm=(()=>{var n;const t={stencil:!0,failIfMajorPerformanceCaveat:i??e_.defaultOptions.failIfMajorPerformanceCaveat};try{if(!si.get().getWebGLRenderingContext())return!1;let o=si.get().createCanvas().getContext("webgl",t);const f=!!((n=o==null?void 0:o.getContextAttributes())!=null&&n.stencil);if(o){const d=o.getExtension("WEBGL_lose_context");d&&d.loseContext()}return o=null,f}catch{return!1}})()),Gm}let jm;async function FE(i={}){return jm!==void 0||(jm=await(async()=>{const t=si.get().getNavigator().gpu;if(!t)return!1;try{return await(await t.requestAdapter(i)).requestDevice(),!0}catch{return!1}})()),jm}const qv=["webgl","webgpu","canvas"];async function IE(i){let t=[];i.preference?(t.push(i.preference),qv.forEach(f=>{f!==i.preference&&t.push(f)})):t=qv.slice();let n,s={};for(let f=0;f<t.length;f++){const d=t[f];if(d==="webgpu"&&await FE()){const{WebGPURenderer:m}=await Dh(async()=>{const{WebGPURenderer:g}=await import("./WebGPURenderer-VhPALZiv.js");return{WebGPURenderer:g}},__vite__mapDeps([2,3,4]));n=m,s={...i,...i.webgpu};break}else if(d==="webgl"&&WE(i.failIfMajorPerformanceCaveat??e_.defaultOptions.failIfMajorPerformanceCaveat)){const{WebGLRenderer:m}=await Dh(async()=>{const{WebGLRenderer:g}=await import("./WebGLRenderer-CivCN7xy.js");return{WebGLRenderer:g}},__vite__mapDeps([5,3,4]));n=m,s={...i,...i.webgl};break}else if(d==="canvas"){const{CanvasRenderer:m}=await Dh(async()=>{const{CanvasRenderer:g}=await import("./CanvasRenderer-BwnTm9_4.js");return{CanvasRenderer:g}},__vite__mapDeps([6,4]));n=m,s={...i,...i.canvasOptions};break}}if(delete s.webgpu,delete s.webgl,delete s.canvasOptions,!n)throw new Error("No available renderer for the current environment");const o=new n;return await o.init(s),o}const n_="8.17.0";class a_{static init(){var t;(t=globalThis.__PIXI_APP_INIT__)==null||t.call(globalThis,this,n_)}static destroy(){}}a_.extension=kt.Application;class $E{constructor(t){this._renderer=t}init(){var t;(t=globalThis.__PIXI_RENDERER_INIT__)==null||t.call(globalThis,this._renderer,n_)}destroy(){this._renderer=null}}$E.extension={type:[kt.WebGLSystem,kt.WebGPUSystem],name:"initHook",priority:-10};class i_{static init(t){Object.defineProperty(this,"resizeTo",{configurable:!0,set(n){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=n,n&&(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 n,s;if(this._resizeTo===globalThis.window)n=globalThis.innerWidth,s=globalThis.innerHeight;else{const{clientWidth:o,clientHeight:f}=this._resizeTo;n=o,s=f}this.renderer.resize(n,s),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}}i_.extension=kt.Application;class l_{static init(t){t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{configurable:!0,set(n){this._ticker&&this._ticker.remove(this.render,this),this._ticker=n,n&&n.add(this.render,this,Fm.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?bc.shared:new bc,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}l_.extension=kt.Application;ke.add(i_);ke.add(l_);const s_=class sg{constructor(...t){this.stage=new ua,t[0]!==void 0&&ce(tn,"Application constructor options are deprecated, please use Application.init() instead.")}async init(t){t={...t},this.stage||(this.stage=new ua),this.renderer=await IE(t),sg._plugins.forEach(n=>{n.init.call(this,t)})}render(){this.renderer.render({container:this.stage})}get canvas(){return this.renderer.canvas}get view(){return ce(tn,"Application.view is deprecated, please use Application.canvas instead."),this.renderer.canvas}get screen(){return this.renderer.screen}destroy(t=!1,n=!1){const s=sg._plugins.slice(0);s.reverse(),s.forEach(o=>{o.destroy.call(this)}),this.stage.destroy(n),this.stage=null,this.renderer.destroy(t),this.renderer=null}};s_._plugins=[];let Og=s_;ke.handleByList(kt.Application,Og._plugins);ke.add(a_);var zy,Yv;function tC(){if(Yv)return zy;Yv=1,zy=n;var i={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 n(f){var d=[];return f.replace(t,function(m,g,v){var S=g.toLowerCase();for(v=o(v),S=="m"&&v.length>2&&(d.push([g].concat(v.splice(0,2))),S="l",g=g=="m"?"l":"L");;){if(v.length==i[S])return v.unshift(g),d.push(v);if(v.length<i[S])throw new Error("malformed path data");d.push([g].concat(v.splice(0,i[S])))}}),d}var s=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function o(f){var d=f.match(s);return d?d.map(Number):[]}return zy}var eC=tC();const nC=ap(eC);function aC(i,t){const n=nC(i),s=[];let o=null,f=0,d=0;for(let m=0;m<n.length;m++){const g=n[m],v=g[0],S=g;switch(v){case"M":f=S[1],d=S[2],t.moveTo(f,d);break;case"m":f+=S[1],d+=S[2],t.moveTo(f,d);break;case"H":f=S[1],t.lineTo(f,d);break;case"h":f+=S[1],t.lineTo(f,d);break;case"V":d=S[1],t.lineTo(f,d);break;case"v":d+=S[1],t.lineTo(f,d);break;case"L":f=S[1],d=S[2],t.lineTo(f,d);break;case"l":f+=S[1],d+=S[2],t.lineTo(f,d);break;case"C":f=S[5],d=S[6],t.bezierCurveTo(S[1],S[2],S[3],S[4],f,d);break;case"c":t.bezierCurveTo(f+S[1],d+S[2],f+S[3],d+S[4],f+S[5],d+S[6]),f+=S[5],d+=S[6];break;case"S":f=S[3],d=S[4],t.bezierCurveToShort(S[1],S[2],f,d);break;case"s":t.bezierCurveToShort(f+S[1],d+S[2],f+S[3],d+S[4]),f+=S[3],d+=S[4];break;case"Q":f=S[3],d=S[4],t.quadraticCurveTo(S[1],S[2],f,d);break;case"q":t.quadraticCurveTo(f+S[1],d+S[2],f+S[3],d+S[4]),f+=S[3],d+=S[4];break;case"T":f=S[1],d=S[2],t.quadraticCurveToShort(f,d);break;case"t":f+=S[1],d+=S[2],t.quadraticCurveToShort(f,d);break;case"A":f=S[6],d=S[7],t.arcToSvg(S[1],S[2],S[3],S[4],S[5],f,d);break;case"a":f+=S[6],d+=S[7],t.arcToSvg(S[1],S[2],S[3],S[4],S[5],f,d);break;case"Z":case"z":t.closePath(),s.length>0&&(o=s.pop(),o?(f=o.startX,d=o.startY):(f=0,d=0)),o=null;break;default:Da(`Unknown SVG path command: ${v}`)}v!=="Z"&&v!=="z"&&o===null&&(o={startX:f,startY:d},s.push(o))}return t}class Ng{constructor(t=0,n=0,s=0){this.type="circle",this.x=t,this.y=n,this.radius=s}clone(){return new Ng(this.x,this.y,this.radius)}contains(t,n){if(this.radius<=0)return!1;const s=this.radius*this.radius;let o=this.x-t,f=this.y-n;return o*=o,f*=f,o+f<=s}strokeContains(t,n,s,o=.5){if(this.radius===0)return!1;const f=this.x-t,d=this.y-n,m=this.radius,g=(1-o)*s,v=Math.sqrt(f*f+d*d);return v<=m+g&&v>m-(s-g)}getBounds(t){return t||(t=new un),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 Ug{constructor(t=0,n=0,s=0,o=0){this.type="ellipse",this.x=t,this.y=n,this.halfWidth=s,this.halfHeight=o}clone(){return new Ug(this.x,this.y,this.halfWidth,this.halfHeight)}contains(t,n){if(this.halfWidth<=0||this.halfHeight<=0)return!1;let s=(t-this.x)/this.halfWidth,o=(n-this.y)/this.halfHeight;return s*=s,o*=o,s+o<=1}strokeContains(t,n,s,o=.5){const{halfWidth:f,halfHeight:d}=this;if(f<=0||d<=0)return!1;const m=s*(1-o),g=s-m,v=f-g,S=d-g,b=f+m,A=d+m,E=t-this.x,z=n-this.y,M=E*E/(v*v)+z*z/(S*S),R=E*E/(b*b)+z*z/(A*A);return M>1&&R<=1}getBounds(t){return t||(t=new un),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 iC(i,t,n,s,o,f){const d=i-n,m=t-s,g=o-n,v=f-s,S=d*g+m*v,b=g*g+v*v;let A=-1;b!==0&&(A=S/b);let E,z;A<0?(E=n,z=s):A>1?(E=o,z=f):(E=n+A*g,z=s+A*v);const M=i-E,R=t-z;return M*M+R*R}let lC,sC;class Nh{constructor(...t){this.type="polygon";let n=Array.isArray(t[0])?t[0]:t;if(typeof n[0]!="number"){const s=[];for(let o=0,f=n.length;o<f;o++)s.push(n[o].x,n[o].y);n=s}this.points=n,this.closePath=!0}isClockwise(){let t=0;const n=this.points,s=n.length;for(let o=0;o<s;o+=2){const f=n[o],d=n[o+1],m=n[(o+2)%s],g=n[(o+3)%s];t+=(m-f)*(g+d)}return t<0}containsPolygon(t){const n=this.getBounds(lC),s=t.getBounds(sC);if(!n.containsRect(s))return!1;const o=t.points;for(let f=0;f<o.length;f+=2){const d=o[f],m=o[f+1];if(!this.contains(d,m))return!1}return!0}clone(){const t=this.points.slice(),n=new Nh(t);return n.closePath=this.closePath,n}contains(t,n){let s=!1;const o=this.points.length/2;for(let f=0,d=o-1;f<o;d=f++){const m=this.points[f*2],g=this.points[f*2+1],v=this.points[d*2],S=this.points[d*2+1];g>n!=S>n&&t<(v-m)*((n-g)/(S-g))+m&&(s=!s)}return s}strokeContains(t,n,s,o=.5){const f=s*s,d=f*(1-o),m=f-d,{points:g}=this,v=g.length-(this.closePath?0:2);for(let S=0;S<v;S+=2){const b=g[S],A=g[S+1],E=g[(S+2)%g.length],z=g[(S+3)%g.length],M=iC(t,n,b,A,E,z),R=Math.sign((E-b)*(n-A)-(z-A)*(t-b));if(M<=(R<0?m:d))return!0}return!1}getBounds(t){t||(t=new un);const n=this.points;let s=1/0,o=-1/0,f=1/0,d=-1/0;for(let m=0,g=n.length;m<g;m+=2){const v=n[m],S=n[m+1];s=v<s?v:s,o=v>o?v:o,f=S<f?S:f,d=S>d?S:d}return t.x=s,t.width=o-s,t.y=f,t.height=d-f,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,n)=>`${t}, ${n}`,"")}]`}get lastX(){return this.points[this.points.length-2]}get lastY(){return this.points[this.points.length-1]}get x(){return ce("8.11.0","Polygon.lastX is deprecated, please use Polygon.lastX instead."),this.points[this.points.length-2]}get y(){return ce("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 qm=(i,t,n,s,o,f,d)=>{const m=i-n,g=t-s,v=Math.sqrt(m*m+g*g);return v>=o-f&&v<=o+d};class Bg{constructor(t=0,n=0,s=0,o=0,f=20){this.type="roundedRectangle",this.x=t,this.y=n,this.width=s,this.height=o,this.radius=f}getBounds(t){return t||(t=new un),t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}clone(){return new Bg(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,n){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&n>=this.y&&n<=this.y+this.height){const s=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(n>=this.y+s&&n<=this.y+this.height-s||t>=this.x+s&&t<=this.x+this.width-s)return!0;let o=t-(this.x+s),f=n-(this.y+s);const d=s*s;if(o*o+f*f<=d||(o=t-(this.x+this.width-s),o*o+f*f<=d)||(f=n-(this.y+this.height-s),o*o+f*f<=d)||(o=t-(this.x+s),o*o+f*f<=d))return!0}return!1}strokeContains(t,n,s,o=.5){const{x:f,y:d,width:m,height:g,radius:v}=this,S=s*(1-o),b=s-S,A=f+v,E=d+v,z=m-v*2,M=g-v*2,R=f+m,O=d+g;return(t>=f-S&&t<=f+b||t>=R-b&&t<=R+S)&&n>=E&&n<=E+M||(n>=d-S&&n<=d+b||n>=O-b&&n<=O+S)&&t>=A&&t<=A+z?!0:t<A&&n<E&&qm(t,n,A,E,v,b,S)||t>R-v&&n<E&&qm(t,n,R-v,E,v,b,S)||t>R-v&&n>O-v&&qm(t,n,R-v,O-v,v,b,S)||t<A&&n>O-v&&qm(t,n,A,O-v,v,b,S)}toString(){return`[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}const u_={};function uC(i,t,n){let s=2166136261;for(let o=0;o<t;o++)s^=i[o].uid,s=Math.imul(s,16777619),s>>>=0;return u_[s]||rC(i,t,s,n)}function rC(i,t,n,s){const o={};let f=0;for(let m=0;m<s;m++){const g=m<t?i[m]:Ee.EMPTY.source;o[f++]=g.source,o[f++]=g.style}const d=new Jm(o);return u_[n]=d,d}class Lv{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 Xv(i,t,n,s){if(n??(n=0),s??(s=Math.min(i.byteLength-n,t.byteLength)),!(n&7)&&!(s&7)){const o=s/8;new Float64Array(t,0,o).set(new Float64Array(i,n,o))}else if(!(n&3)&&!(s&3)){const o=s/4;new Float32Array(t,0,o).set(new Float32Array(i,n,o))}else new Uint8Array(t).set(new Uint8Array(i,n,s))}const oC={normal:"normal-npm",add:"add-npm",screen:"screen-npm"};var cC=(i=>(i[i.DISABLED=0]="DISABLED",i[i.RENDERING_MASK_ADD=1]="RENDERING_MASK_ADD",i[i.MASK_ACTIVE=2]="MASK_ACTIVE",i[i.INVERSE_MASK_ACTIVE=3]="INVERSE_MASK_ACTIVE",i[i.RENDERING_MASK_REMOVE=4]="RENDERING_MASK_REMOVE",i[i.NONE=5]="NONE",i))(cC||{});function Vv(i,t){return t.alphaMode==="no-premultiply-alpha"&&oC[i]||i}const fC=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
|
|
83
|
+
`);function hC(i){let t="";for(let n=0;n<i;++n)n>0&&(t+=`
|
|
84
|
+
else `),n<i-1&&(t+=`if(test == ${n}.0){}`);return t}function dC(i,t){if(i===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const n=t.createShader(t.FRAGMENT_SHADER);try{for(;;){const s=fC.replace(/%forloop%/gi,hC(i));if(t.shaderSource(n,s),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))i=i/2|0;else break}}finally{t.deleteShader(n)}return i}let yc=null;function mC(){var t;if(yc)return yc;const i=Yx();return yc=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),yc=dC(yc,i),(t=i.getExtension("WEBGL_lose_context"))==null||t.loseContext(),yc}class pC{constructor(){this.ids=Object.create(null),this.textures=[],this.count=0}clear(){for(let t=0;t<this.count;t++){const n=this.textures[t];this.textures[t]=null,this.ids[n.uid]=null}this.count=0}}class yC{constructor(){this.renderPipeId="batch",this.action="startBatch",this.start=0,this.size=0,this.textures=new pC,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 Uh=[];let Im=0;Qh.register({clear:()=>{if(Uh.length>0)for(const i of Uh)i&&i.destroy();Uh.length=0,Im=0}});function Qv(){return Im>0?Uh[--Im]:new yC}function Zv(i){i.elements=null,Uh[Im++]=i}let Sh=0;const r_=class o_{constructor(t){this.uid=en("batcher"),this.dirty=!0,this.batchIndex=0,this.batches=[],this._elements=[],t={...o_.defaultOptions,...t},t.maxTextures||(ce("v8.8.0","maxTextures is a required option for Batcher now, please pass it in the options"),t.maxTextures=mC());const{maxTextures:n,attributesInitialSize:s,indicesInitialSize:o}=t;this.attributeBuffer=new Lv(s*4),this.indexBuffer=new Uint16Array(o),this.maxTextures=n}begin(){this.elementSize=0,this.elementStart=0,this.indexSize=0,this.attributeSize=0;for(let t=0;t<this.batchIndex;t++)Zv(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,n){const s=t._batch.textures.ids[n._source.uid];return!s&&s!==0?!1:(t._textureId=s,t.texture=n,!0)}updateElement(t){this.dirty=!0;const n=this.attributeBuffer;t.packAsQuad?this.packQuadAttributes(t,n.float32View,n.uint32View,t._attributeStart,t._textureId):this.packAttributes(t,n.float32View,n.uint32View,t._attributeStart,t._textureId)}break(t){const n=this._elements;if(!n[this.elementStart])return;let s=Qv(),o=s.textures;o.clear();const f=n[this.elementStart];let d=Vv(f.blendMode,f.texture._source),m=f.topology;this.attributeSize*4>this.attributeBuffer.size&&this._resizeAttributeBuffer(this.attributeSize*4),this.indexSize>this.indexBuffer.length&&this._resizeIndexBuffer(this.indexSize);const g=this.attributeBuffer.float32View,v=this.attributeBuffer.uint32View,S=this.indexBuffer;let b=this._batchIndexSize,A=this._batchIndexStart,E="startBatch",z=[];const M=this.maxTextures;for(let R=this.elementStart;R<this.elementSize;++R){const O=n[R];n[R]=null;const U=O.texture._source,G=Vv(O.blendMode,U),Z=d!==G||m!==O.topology;if(U._batchTick===Sh&&!Z){O._textureId=U._textureBindLocation,b+=O.indexSize,O.packAsQuad?(this.packQuadAttributes(O,g,v,O._attributeStart,O._textureId),this.packQuadIndex(S,O._indexStart,O._attributeStart/this.vertexSize)):(this.packAttributes(O,g,v,O._attributeStart,O._textureId),this.packIndex(O,S,O._indexStart,O._attributeStart/this.vertexSize)),O._batch=s,z.push(O);continue}U._batchTick=Sh,(o.count>=M||Z)&&(this._finishBatch(s,A,b-A,o,d,m,t,E,z),E="renderBatch",A=b,d=G,m=O.topology,s=Qv(),o=s.textures,o.clear(),z=[],++Sh),O._textureId=U._textureBindLocation=o.count,o.ids[U.uid]=o.count,o.textures[o.count++]=U,O._batch=s,z.push(O),b+=O.indexSize,O.packAsQuad?(this.packQuadAttributes(O,g,v,O._attributeStart,O._textureId),this.packQuadIndex(S,O._indexStart,O._attributeStart/this.vertexSize)):(this.packAttributes(O,g,v,O._attributeStart,O._textureId),this.packIndex(O,S,O._indexStart,O._attributeStart/this.vertexSize))}o.count>0&&(this._finishBatch(s,A,b-A,o,d,m,t,E,z),A=b,++Sh),this.elementStart=this.elementSize,this._batchIndexStart=A,this._batchIndexSize=b}_finishBatch(t,n,s,o,f,d,m,g,v){t.gpuBindGroup=null,t.bindGroup=null,t.action=g,t.batcher=this,t.textures=o,t.blendMode=f,t.topology=d,t.start=n,t.size=s,t.elements=v,++Sh,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 n=Math.max(t,this.attributeBuffer.size*2),s=new Lv(n);Xv(this.attributeBuffer.rawBinaryData,s.rawBinaryData),this.attributeBuffer=s}_resizeIndexBuffer(t){const n=this.indexBuffer;let s=Math.max(t,n.length*1.5);s+=s%2;const o=s>65535?new Uint32Array(s):new Uint16Array(s);if(o.BYTES_PER_ELEMENT!==n.BYTES_PER_ELEMENT)for(let f=0;f<n.length;f++)o[f]=n[f];else Xv(n.buffer,o.buffer);this.indexBuffer=o}packQuadIndex(t,n,s){t[n]=s+0,t[n+1]=s+1,t[n+2]=s+2,t[n+3]=s+0,t[n+4]=s+2,t[n+5]=s+3}packIndex(t,n,s,o){const f=t.indices,d=t.indexSize,m=t.indexOffset,g=t.attributeOffset;for(let v=0;v<d;v++)n[s++]=o+f[v+m]-g}destroy(t={}){var n;if(this.batches!==null){for(let s=0;s<this.batchIndex;s++)Zv(this.batches[s]);this.batches=null,this.geometry.destroy(!0),this.geometry=null,t.shader&&((n=this.shader)==null||n.destroy(),this.shader=null);for(let s=0;s<this._elements.length;s++)this._elements[s]&&(this._elements[s]._batch=null);this._elements=null,this.indexBuffer=null,this.attributeBuffer.destroy(),this.attributeBuffer=null}}};r_.defaultOptions={maxTextures:null,attributesInitialSize:4,indicesInitialSize:6};let gC=r_;var Va=(i=>(i[i.MAP_READ=1]="MAP_READ",i[i.MAP_WRITE=2]="MAP_WRITE",i[i.COPY_SRC=4]="COPY_SRC",i[i.COPY_DST=8]="COPY_DST",i[i.INDEX=16]="INDEX",i[i.VERTEX=32]="VERTEX",i[i.UNIFORM=64]="UNIFORM",i[i.STORAGE=128]="STORAGE",i[i.INDIRECT=256]="INDIRECT",i[i.QUERY_RESOLVE=512]="QUERY_RESOLVE",i[i.STATIC=1024]="STATIC",i))(Va||{});class Yh extends $l{constructor(t){let{data:n,size:s}=t;const{usage:o,label:f,shrinkToFit:d}=t;super(),this._gpuData=Object.create(null),this._gcLastUsed=-1,this.autoGarbageCollect=!0,this.uid=en("buffer"),this._resourceType="buffer",this._resourceId=en("resource"),this._touched=0,this._updateID=1,this._dataInt32=null,this.shrinkToFit=!0,this.destroyed=!1,n instanceof Array&&(n=new Float32Array(n)),this._data=n,s??(s=n==null?void 0:n.byteLength);const m=!!n;this.descriptor={size:s,usage:o,mappedAtCreation:m,label:f},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&Va.STATIC)}set static(t){t?this.descriptor.usage|=Va.STATIC:this.descriptor.usage&=~Va.STATIC}setDataWithSize(t,n,s){if(this._updateID++,this._updateSize=n*t.BYTES_PER_ELEMENT,this._data===t){s&&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?s&&this.emit("update",this):(this.descriptor.size=t.byteLength,this._resourceId=en("resource"),this.emit("change",this));return}s&&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 n in this._gpuData)(t=this._gpuData[n])==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 c_(i,t){if(!(i instanceof Yh)){let n=t?Va.INDEX:Va.VERTEX;i instanceof Array&&(t?(i=new Uint32Array(i),n=Va.INDEX|Va.COPY_DST):(i=new Float32Array(i),n=Va.VERTEX|Va.COPY_DST)),i=new Yh({data:i,label:t?"index-mesh-buffer":"vertex-mesh-buffer",usage:n})}return i}function vC(i,t,n){const s=i.getAttribute(t);if(!s)return n.minX=0,n.minY=0,n.maxX=0,n.maxY=0,n;const o=s.buffer.data;let f=1/0,d=1/0,m=-1/0,g=-1/0;const v=o.BYTES_PER_ELEMENT,S=(s.offset||0)/v,b=(s.stride||8)/v;for(let A=S;A<o.length;A+=b){const E=o[A],z=o[A+1];E>m&&(m=E),z>g&&(g=z),E<f&&(f=E),z<d&&(d=z)}return n.minX=f,n.minY=d,n.maxX=m,n.maxY=g,n}function xC(i){return(i instanceof Yh||Array.isArray(i)||i.BYTES_PER_ELEMENT)&&(i={buffer:i}),i.buffer=c_(i.buffer,!1),i}class _C extends $l{constructor(t={}){super(),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=en("geometry"),this._layoutKey=0,this.instanceCount=1,this._bounds=new Bi,this._boundsDirty=!0;const{attributes:n,indexBuffer:s,topology:o}=t;if(this.buffers=[],this.attributes={},n)for(const f in n)this.addAttribute(f,n[f]);this.instanceCount=t.instanceCount??1,s&&this.addIndex(s),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 n=this.attributes[t];return n.buffer.data.length/(n.stride/4||n.size)}return 0}addAttribute(t,n){const s=xC(n);this.buffers.indexOf(s.buffer)===-1&&(this.buffers.push(s.buffer),s.buffer.on("update",this.onBufferUpdate,this),s.buffer.on("change",this.onBufferUpdate,this)),this.attributes[t]=s}addIndex(t){this.indexBuffer=c_(t,!0),this.buffers.push(this.indexBuffer)}get bounds(){return this._boundsDirty?(this._boundsDirty=!1,vC(this,"aPosition",this._bounds)):this._bounds}unload(){var t;this.emit("unload",this);for(const n in this._gpuData)(t=this._gpuData[n])==null||t.destroy();this._gpuData=Object.create(null)}destroy(t=!1){var n;this.emit("destroy",this),this.removeAllListeners(),t&&this.buffers.forEach(s=>s.destroy()),this.unload(),(n=this.indexBuffer)==null||n.destroy(),this.attributes=null,this.buffers=null,this.indexBuffer=null,this._bounds=null}}const SC=new Float32Array(1),bC=new Uint32Array(1);class TC extends _C{constructor(){const n=new Yh({data:SC,label:"attribute-batch-buffer",usage:Va.VERTEX|Va.COPY_DST,shrinkToFit:!1}),s=new Yh({data:bC,label:"index-batch-buffer",usage:Va.INDEX|Va.COPY_DST,shrinkToFit:!1}),o=24;super({attributes:{aPosition:{buffer:n,format:"float32x2",stride:o,offset:0},aUV:{buffer:n,format:"float32x2",stride:o,offset:8},aColor:{buffer:n,format:"unorm8x4",stride:o,offset:16},aTextureIdAndRound:{buffer:n,format:"uint16x2",stride:o,offset:20}},indexBuffer:s})}}function Kv(i,t,n){if(i)for(const s in i){const o=s.toLocaleLowerCase(),f=t[o];if(f){let d=i[s];s==="header"&&(d=d.replace(/@in\s+[^;]+;\s*/g,"").replace(/@out\s+[^;]+;\s*/g,"")),n&&f.push(`//----${n}----//`),f.push(d)}else Da(`${s} placement hook does not exist in shader`)}}const EC=/\{\{(.*?)\}\}/g;function kv(i){var s;const t={};return(((s=i.match(EC))==null?void 0:s.map(o=>o.replace(/[{()}]/g,"")))??[]).forEach(o=>{t[o]=[]}),t}function Jv(i,t){let n;const s=/@in\s+([^;]+);/g;for(;(n=s.exec(i))!==null;)t.push(n[1])}function Pv(i,t,n=!1){const s=[];Jv(t,s),i.forEach(m=>{m.header&&Jv(m.header,s)});const o=s;n&&o.sort();const f=o.map((m,g)=>` @location(${g}) ${m},`).join(`
|
|
85
|
+
`);let d=t.replace(/@in\s+[^;]+;\s*/g,"");return d=d.replace("{{in}}",`
|
|
86
|
+
${f}
|
|
87
|
+
`),d}function Wv(i,t){let n;const s=/@out\s+([^;]+);/g;for(;(n=s.exec(i))!==null;)t.push(n[1])}function CC(i){const n=/\b(\w+)\s*:/g.exec(i);return n?n[1]:""}function AC(i){const t=/@.*?\s+/g;return i.replace(t,"")}function MC(i,t){const n=[];Wv(t,n),i.forEach(g=>{g.header&&Wv(g.header,n)});let s=0;const o=n.sort().map(g=>g.indexOf("builtin")>-1?g:`@location(${s++}) ${g}`).join(`,
|
|
88
|
+
`),f=n.sort().map(g=>` var ${AC(g)};`).join(`
|
|
89
|
+
`),d=`return VSOutput(
|
|
90
|
+
${n.sort().map(g=>` ${CC(g)}`).join(`,
|
|
91
|
+
`)});`;let m=t.replace(/@out\s+[^;]+;\s*/g,"");return m=m.replace("{{struct}}",`
|
|
92
|
+
${o}
|
|
93
|
+
`),m=m.replace("{{start}}",`
|
|
94
|
+
${f}
|
|
95
|
+
`),m=m.replace("{{return}}",`
|
|
96
|
+
${d}
|
|
97
|
+
`),m}function Fv(i,t){let n=i;for(const s in t){const o=t[s];o.join(`
|
|
98
|
+
`).length?n=n.replace(`{{${s}}}`,`//-----${s} START-----//
|
|
99
|
+
${o.join(`
|
|
100
|
+
`)}
|
|
101
|
+
//----${s} FINISH----//`):n=n.replace(`{{${s}}}`,"")}return n}const Hu=Object.create(null),Dy=new Map;let RC=0;function zC({template:i,bits:t}){const n=f_(i,t);if(Hu[n])return Hu[n];const{vertex:s,fragment:o}=OC(i,t);return Hu[n]=h_(s,o,t),Hu[n]}function DC({template:i,bits:t}){const n=f_(i,t);return Hu[n]||(Hu[n]=h_(i.vertex,i.fragment,t)),Hu[n]}function OC(i,t){const n=t.map(d=>d.vertex).filter(d=>!!d),s=t.map(d=>d.fragment).filter(d=>!!d);let o=Pv(n,i.vertex,!0);o=MC(n,o);const f=Pv(s,i.fragment,!0);return{vertex:o,fragment:f}}function f_(i,t){return t.map(n=>(Dy.has(n)||Dy.set(n,RC++),Dy.get(n))).sort((n,s)=>n-s).join("-")+i.vertex+i.fragment}function h_(i,t,n){const s=kv(i),o=kv(t);return n.forEach(f=>{Kv(f.vertex,s,f.name),Kv(f.fragment,o,f.name)}),{vertex:Fv(i,s),fragment:Fv(t,o)}}const NC=`
|
|
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
|
+
`,UC=`
|
|
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
|
+
`,BC=`
|
|
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
|
+
`,wC=`
|
|
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
|
+
`,HC={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
|
+
`}},GC={name:"global-uniforms-bit",vertex:{header:`
|
|
235
|
+
uniform mat3 uProjectionMatrix;
|
|
236
|
+
uniform mat3 uWorldTransformMatrix;
|
|
237
|
+
uniform vec4 uWorldColorAlpha;
|
|
238
|
+
uniform vec2 uResolution;
|
|
239
|
+
`}};function jC({bits:i,name:t}){const n=zC({template:{fragment:UC,vertex:NC},bits:[HC,...i]});return Zh.from({name:t,vertex:{source:n.vertex,entryPoint:"main"},fragment:{source:n.fragment,entryPoint:"main"}})}function qC({bits:i,name:t}){return new zg({name:t,...DC({template:{vertex:BC,fragment:wC},bits:[GC,...i]})})}const YC={name:"color-bit",vertex:{header:`
|
|
240
|
+
@in aColor: vec4<f32>;
|
|
241
|
+
`,main:`
|
|
242
|
+
vColor *= vec4<f32>(aColor.rgb * aColor.a, aColor.a);
|
|
243
|
+
`}},LC={name:"color-bit",vertex:{header:`
|
|
244
|
+
in vec4 aColor;
|
|
245
|
+
`,main:`
|
|
246
|
+
vColor *= vec4(aColor.rgb * aColor.a, aColor.a);
|
|
247
|
+
`}},Oy={};function XC(i){const t=[];if(i===1)t.push("@group(1) @binding(0) var textureSource1: texture_2d<f32>;"),t.push("@group(1) @binding(1) var textureSampler1: sampler;");else{let n=0;for(let s=0;s<i;s++)t.push(`@group(1) @binding(${n++}) var textureSource${s+1}: texture_2d<f32>;`),t.push(`@group(1) @binding(${n++}) var textureSampler${s+1}: sampler;`)}return t.join(`
|
|
248
|
+
`)}function VC(i){const t=[];if(i===1)t.push("outColor = textureSampleGrad(textureSource1, textureSampler1, vUV, uvDx, uvDy);");else{t.push("switch vTextureId {");for(let n=0;n<i;n++)n===i-1?t.push(" default:{"):t.push(` case ${n}:{`),t.push(` outColor = textureSampleGrad(textureSource${n+1}, textureSampler${n+1}, vUV, uvDx, uvDy);`),t.push(" break;}");t.push("}")}return t.join(`
|
|
249
|
+
`)}function QC(i){return Oy[i]||(Oy[i]={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
|
+
${XC(i)}
|
|
263
|
+
`,main:`
|
|
264
|
+
var uvDx = dpdx(vUV);
|
|
265
|
+
var uvDy = dpdy(vUV);
|
|
266
|
+
|
|
267
|
+
${VC(i)}
|
|
268
|
+
`}}),Oy[i]}const Ny={};function ZC(i){const t=[];for(let n=0;n<i;n++)n>0&&t.push("else"),n<i-1&&t.push(`if(vTextureId < ${n}.5)`),t.push("{"),t.push(` outColor = texture(uTextures[${n}], vUV);`),t.push("}");return t.join(`
|
|
269
|
+
`)}function KC(i){return Ny[i]||(Ny[i]={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[${i}];
|
|
284
|
+
|
|
285
|
+
`,main:`
|
|
286
|
+
|
|
287
|
+
${ZC(i)}
|
|
288
|
+
`}}),Ny[i]}const kC={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
|
+
`}},JC={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
|
+
`}},Iv={};function PC(i){let t=Iv[i];if(t)return t;const n=new Int32Array(i);for(let s=0;s<i;s++)n[s]=s;return t=Iv[i]=new Zx({uTextures:{value:n,type:"i32",size:i}},{isStatic:!0}),t}class $v extends hp{constructor(t){const n=qC({name:"batch",bits:[LC,KC(t),JC]}),s=jC({name:"batch",bits:[YC,QC(t),kC]});super({glProgram:n,gpuProgram:s,resources:{batchSamplers:PC(t)}}),this.maxTextures=t}}let bh=null;const d_=class m_ extends gC{constructor(t){super(t),this.geometry=new TC,this.name=m_.extension.name,this.vertexSize=6,bh??(bh=new $v(t.maxTextures)),this.shader=bh}packAttributes(t,n,s,o,f){const d=f<<16|t.roundPixels&65535,m=t.transform,g=m.a,v=m.b,S=m.c,b=m.d,A=m.tx,E=m.ty,{positions:z,uvs:M}=t,R=t.color,O=t.attributeOffset,B=O+t.attributeSize;for(let U=O;U<B;U++){const G=U*2,Z=z[G],Q=z[G+1];n[o++]=g*Z+S*Q+A,n[o++]=b*Q+v*Z+E,n[o++]=M[G],n[o++]=M[G+1],s[o++]=R,s[o++]=d}}packQuadAttributes(t,n,s,o,f){const d=t.texture,m=t.transform,g=m.a,v=m.b,S=m.c,b=m.d,A=m.tx,E=m.ty,z=t.bounds,M=z.maxX,R=z.minX,O=z.maxY,B=z.minY,U=d.uvs,G=t.color,Z=f<<16|t.roundPixels&65535;n[o+0]=g*R+S*B+A,n[o+1]=b*B+v*R+E,n[o+2]=U.x0,n[o+3]=U.y0,s[o+4]=G,s[o+5]=Z,n[o+6]=g*M+S*B+A,n[o+7]=b*B+v*M+E,n[o+8]=U.x1,n[o+9]=U.y1,s[o+10]=G,s[o+11]=Z,n[o+12]=g*M+S*O+A,n[o+13]=b*O+v*M+E,n[o+14]=U.x2,n[o+15]=U.y2,s[o+16]=G,s[o+17]=Z,n[o+18]=g*R+S*O+A,n[o+19]=b*O+v*R+E,n[o+20]=U.x3,n[o+21]=U.y3,s[o+22]=G,s[o+23]=Z}_updateMaxTextures(t){this.shader.maxTextures!==t&&(bh=new $v(t),this.shader=bh)}destroy(){this.shader=null,super.destroy()}};d_.extension={type:[kt.Batcher],name:"default"};let WC=d_;class Kh{constructor(t){this.items=Object.create(null);const{renderer:n,type:s,onUnload:o,priority:f,name:d}=t;this._renderer=n,n.gc.addResourceHash(this,"items",s,f??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,...n){var o;if(!this.items[t.uid])return;const s=t._gpuData[this._renderer.uid];s&&((o=this._onUnload)==null||o.call(this,t,...n),s.destroy(),t._gpuData[this._renderer.uid]=null,this.items[t.uid]=null)}removeAll(...t){Object.values(this.items).forEach(n=>n&&this.remove(n,...t))}destroy(...t){this.removeAll(...t),this.items=Object.create(null),this._renderer=null,this._onUnload=null}}function FC(i,t,n,s,o,f,d,m=null){let g=0;n*=t,o*=f;const v=m.a,S=m.b,b=m.c,A=m.d,E=m.tx,z=m.ty;for(;g<d;){const M=i[n],R=i[n+1];s[o]=v*M+b*R+E,s[o+1]=S*M+A*R+z,o+=f,n+=t,g++}}function IC(i,t,n,s){let o=0;for(t*=n;o<s;)i[t]=0,i[t+1]=0,t+=n,o++}function p_(i,t,n,s,o){const f=t.a,d=t.b,m=t.c,g=t.d,v=t.tx,S=t.ty;n||(n=0),s||(s=2),o||(o=i.length/s-n);let b=n*s;for(let A=0;A<o;A++){const E=i[b],z=i[b+1];i[b]=f*E+m*z+v,i[b+1]=d*E+g*z+S,b+=s}}const $C=new ne;class wg{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,n=t>>16|t&65280|(t&255)<<16,s=this.renderable;return s?Sx(n,s.groupColor)+(this.alpha*s.groupAlpha*255<<24):n+(this.alpha*255<<24)}get transform(){var t;return((t=this.renderable)==null?void 0:t.groupTransform)||$C}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 Lh={extension:{type:kt.ShapeBuilder,name:"circle"},build(i,t){let n,s,o,f,d,m;if(i.type==="circle"){const G=i;if(d=m=G.radius,d<=0)return!1;n=G.x,s=G.y,o=f=0}else if(i.type==="ellipse"){const G=i;if(d=G.halfWidth,m=G.halfHeight,d<=0||m<=0)return!1;n=G.x,s=G.y,o=f=0}else{const G=i,Z=G.width/2,Q=G.height/2;n=G.x+Z,s=G.y+Q,d=m=Math.max(0,Math.min(G.radius,Math.min(Z,Q))),o=Z-d,f=Q-m}if(o<0||f<0)return!1;const g=Math.ceil(2.3*Math.sqrt(d+m)),v=g*8+(o?4:0)+(f?4:0);if(v===0)return!1;if(g===0)return t[0]=t[6]=n+o,t[1]=t[3]=s+f,t[2]=t[4]=n-o,t[5]=t[7]=s-f,!0;let S=0,b=g*4+(o?2:0)+2,A=b,E=v,z=o+d,M=f,R=n+z,O=n-z,B=s+M;if(t[S++]=R,t[S++]=B,t[--b]=B,t[--b]=O,f){const G=s-M;t[A++]=O,t[A++]=G,t[--E]=G,t[--E]=R}for(let G=1;G<g;G++){const Z=Math.PI/2*(G/g),Q=o+Math.cos(Z)*d,K=f+Math.sin(Z)*m,gt=n+Q,ct=n-Q,ht=s+K,dt=s-K;t[S++]=gt,t[S++]=ht,t[--b]=ht,t[--b]=ct,t[A++]=ct,t[A++]=dt,t[--E]=dt,t[--E]=gt}z=o,M=f+m,R=n+z,O=n-z,B=s+M;const U=s-M;return t[S++]=R,t[S++]=B,t[--E]=U,t[--E]=R,o&&(t[S++]=O,t[S++]=B,t[--E]=U,t[--E]=O),!0},triangulate(i,t,n,s,o,f){if(i.length===0)return;let d=0,m=0;for(let S=0;S<i.length;S+=2)d+=i[S],m+=i[S+1];d/=i.length/2,m/=i.length/2;let g=s;t[g*n]=d,t[g*n+1]=m;const v=g++;for(let S=0;S<i.length;S+=2)t[g*n]=i[S],t[g*n+1]=i[S+1],S>0&&(o[f++]=g,o[f++]=v,o[f++]=g-1),g++;o[f++]=v+1,o[f++]=v,o[f++]=g-1}},tA={...Lh,extension:{...Lh.extension,name:"ellipse"}},eA={...Lh,extension:{...Lh.extension,name:"roundedRectangle"}},y_=1e-4,t1=1e-4;function nA(i){const t=i.length;if(t<6)return 1;let n=0;for(let s=0,o=i[t-2],f=i[t-1];s<t;s+=2){const d=i[s],m=i[s+1];n+=(d-o)*(m+f),o=d,f=m}return n<0?-1:1}function e1(i,t,n,s,o,f,d,m){const g=i-n*o,v=t-s*o,S=i+n*f,b=t+s*f;let A,E;d?(A=s,E=-n):(A=-s,E=n);const z=g+A,M=v+E,R=S+A,O=b+E;return m.push(z,M),m.push(R,O),2}function qr(i,t,n,s,o,f,d,m){const g=n-i,v=s-t;let S=Math.atan2(g,v),b=Math.atan2(o-i,f-t);m&&S<b?S+=Math.PI*2:!m&&S>b&&(b+=Math.PI*2);let A=S;const E=b-S,z=Math.abs(E),M=Math.sqrt(g*g+v*v),R=(15*z*Math.sqrt(M)/Math.PI>>0)+1,O=E/R;if(A+=O,m){d.push(i,t),d.push(n,s);for(let B=1,U=A;B<R;B++,U+=O)d.push(i,t),d.push(i+Math.sin(U)*M,t+Math.cos(U)*M);d.push(i,t),d.push(o,f)}else{d.push(n,s),d.push(i,t);for(let B=1,U=A;B<R;B++,U+=O)d.push(i+Math.sin(U)*M,t+Math.cos(U)*M),d.push(i,t);d.push(o,f),d.push(i,t)}return R*2}function aA(i,t,n,s,o,f){const d=y_;if(i.length===0)return;const m=t;let g=m.alignment;if(t.alignment!==.5){let et=nA(i);g=(g-.5)*et+.5}const v=new sa(i[0],i[1]),S=new sa(i[i.length-2],i[i.length-1]),b=s,A=Math.abs(v.x-S.x)<d&&Math.abs(v.y-S.y)<d;if(b){i=i.slice(),A&&(i.pop(),i.pop(),S.set(i[i.length-2],i[i.length-1]));const et=(v.x+S.x)*.5,ft=(S.y+v.y)*.5;i.unshift(et,ft),i.push(et,ft)}const E=o,z=i.length/2;let M=i.length;const R=E.length/2,O=m.width/2,B=O*O,U=m.miterLimit*m.miterLimit;let G=i[0],Z=i[1],Q=i[2],K=i[3],gt=0,ct=0,ht=-(Z-K),dt=G-Q,vt=0,_t=0,xt=Math.sqrt(ht*ht+dt*dt);ht/=xt,dt/=xt,ht*=O,dt*=O;const Dt=g,w=(1-Dt)*2,H=Dt*2;b||(m.cap==="round"?M+=qr(G-ht*(w-H)*.5,Z-dt*(w-H)*.5,G-ht*w,Z-dt*w,G+ht*H,Z+dt*H,E,!0)+2:m.cap==="square"&&(M+=e1(G,Z,ht,dt,w,H,!0,E))),E.push(G-ht*w,Z-dt*w),E.push(G+ht*H,Z+dt*H);for(let et=1;et<z-1;++et){G=i[(et-1)*2],Z=i[(et-1)*2+1],Q=i[et*2],K=i[et*2+1],gt=i[(et+1)*2],ct=i[(et+1)*2+1],ht=-(Z-K),dt=G-Q,xt=Math.sqrt(ht*ht+dt*dt),ht/=xt,dt/=xt,ht*=O,dt*=O,vt=-(K-ct),_t=Q-gt,xt=Math.sqrt(vt*vt+_t*_t),vt/=xt,_t/=xt,vt*=O,_t*=O;const ft=Q-G,j=Z-K,I=Q-gt,st=ct-K,pt=ft*I+j*st,Tt=j*I-st*ft,Ot=Tt<0;if(Math.abs(Tt)<.001*Math.abs(pt)){E.push(Q-ht*w,K-dt*w),E.push(Q+ht*H,K+dt*H),pt>=0&&(m.join==="round"?M+=qr(Q,K,Q-ht*w,K-dt*w,Q-vt*w,K-_t*w,E,!1)+4:M+=2,E.push(Q-vt*H,K-_t*H),E.push(Q+vt*w,K+_t*w));continue}const Ut=(-ht+G)*(-dt+K)-(-ht+Q)*(-dt+Z),re=(-vt+gt)*(-_t+K)-(-vt+Q)*(-_t+ct),ue=(ft*re-I*Ut)/Tt,ra=(st*Ut-j*re)/Tt,Oa=(ue-Q)*(ue-Q)+(ra-K)*(ra-K),Un=Q+(ue-Q)*w,Qn=K+(ra-K)*w,rn=Q-(ue-Q)*H,Zn=K-(ra-K)*H,ts=Math.min(ft*ft+j*j,I*I+st*st),Za=Ot?w:H,ju=ts+Za*Za*B;Oa<=ju?m.join==="bevel"||Oa/B>U?(Ot?(E.push(Un,Qn),E.push(Q+ht*H,K+dt*H),E.push(Un,Qn),E.push(Q+vt*H,K+_t*H)):(E.push(Q-ht*w,K-dt*w),E.push(rn,Zn),E.push(Q-vt*w,K-_t*w),E.push(rn,Zn)),M+=2):m.join==="round"?Ot?(E.push(Un,Qn),E.push(Q+ht*H,K+dt*H),M+=qr(Q,K,Q+ht*H,K+dt*H,Q+vt*H,K+_t*H,E,!0)+4,E.push(Un,Qn),E.push(Q+vt*H,K+_t*H)):(E.push(Q-ht*w,K-dt*w),E.push(rn,Zn),M+=qr(Q,K,Q-ht*w,K-dt*w,Q-vt*w,K-_t*w,E,!1)+4,E.push(Q-vt*w,K-_t*w),E.push(rn,Zn)):(E.push(Un,Qn),E.push(rn,Zn)):(E.push(Q-ht*w,K-dt*w),E.push(Q+ht*H,K+dt*H),m.join==="round"?Ot?M+=qr(Q,K,Q+ht*H,K+dt*H,Q+vt*H,K+_t*H,E,!0)+2:M+=qr(Q,K,Q-ht*w,K-dt*w,Q-vt*w,K-_t*w,E,!1)+2:m.join==="miter"&&Oa/B<=U&&(Ot?(E.push(rn,Zn),E.push(rn,Zn)):(E.push(Un,Qn),E.push(Un,Qn)),M+=2),E.push(Q-vt*w,K-_t*w),E.push(Q+vt*H,K+_t*H),M+=2)}G=i[(z-2)*2],Z=i[(z-2)*2+1],Q=i[(z-1)*2],K=i[(z-1)*2+1],ht=-(Z-K),dt=G-Q,xt=Math.sqrt(ht*ht+dt*dt),ht/=xt,dt/=xt,ht*=O,dt*=O,E.push(Q-ht*w,K-dt*w),E.push(Q+ht*H,K+dt*H),b||(m.cap==="round"?M+=qr(Q-ht*(w-H)*.5,K-dt*(w-H)*.5,Q-ht*w,K-dt*w,Q+ht*H,K+dt*H,E,!1)+2:m.cap==="square"&&(M+=e1(Q,K,ht,dt,w,H,!1,E)));const at=t1*t1;for(let et=R;et<M+R-2;++et)G=E[et*2],Z=E[et*2+1],Q=E[(et+1)*2],K=E[(et+1)*2+1],gt=E[(et+2)*2],ct=E[(et+2)*2+1],!(Math.abs(G*(K-ct)+Q*(ct-Z)+gt*(Z-K))<at)&&f.push(et,et+1,et+2)}function iA(i,t,n,s){const o=y_;if(i.length===0)return;const f=i[0],d=i[1],m=i[i.length-2],g=i[i.length-1],v=t||Math.abs(f-m)<o&&Math.abs(d-g)<o,S=n,b=i.length/2,A=S.length/2;for(let E=0;E<b;E++)S.push(i[E*2]),S.push(i[E*2+1]);for(let E=0;E<b-1;E++)s.push(A+E,A+E+1);v&&s.push(A+b-1,A)}function g_(i,t,n,s,o,f,d){const m=kE(i,t,2);if(!m)return;for(let v=0;v<m.length;v+=3)f[d++]=m[v]+o,f[d++]=m[v+1]+o,f[d++]=m[v+2]+o;let g=o*s;for(let v=0;v<i.length;v+=2)n[g]=i[v],n[g+1]=i[v+1],g+=s}const lA=[],sA={extension:{type:kt.ShapeBuilder,name:"polygon"},build(i,t){for(let n=0;n<i.points.length;n++)t[n]=i.points[n];return!0},triangulate(i,t,n,s,o,f){g_(i,lA,t,n,s,o,f)}},uA={extension:{type:kt.ShapeBuilder,name:"rectangle"},build(i,t){const n=i,s=n.x,o=n.y,f=n.width,d=n.height;return f>0&&d>0?(t[0]=s,t[1]=o,t[2]=s+f,t[3]=o,t[4]=s+f,t[5]=o+d,t[6]=s,t[7]=o+d,!0):!1},triangulate(i,t,n,s,o,f){let d=0;s*=n,t[s+d]=i[0],t[s+d+1]=i[1],d+=n,t[s+d]=i[2],t[s+d+1]=i[3],d+=n,t[s+d]=i[6],t[s+d+1]=i[7],d+=n,t[s+d]=i[4],t[s+d+1]=i[5],d+=n;const m=s/n;o[f++]=m,o[f++]=m+1,o[f++]=m+2,o[f++]=m+1,o[f++]=m+3,o[f++]=m+2}},rA={extension:{type:kt.ShapeBuilder,name:"triangle"},build(i,t){return t[0]=i.x,t[1]=i.y,t[2]=i.x2,t[3]=i.y2,t[4]=i.x3,t[5]=i.y3,!0},triangulate(i,t,n,s,o,f){let d=0;s*=n,t[s+d]=i[0],t[s+d+1]=i[1],d+=n,t[s+d]=i[2],t[s+d+1]=i[3],d+=n,t[s+d]=i[4],t[s+d+1]=i[5];const m=s/n;o[f++]=m,o[f++]=m+1,o[f++]=m+2}},n1=[{offset:0,color:"white"},{offset:1,color:"black"}],Hg=class ug{constructor(...t){this.uid=en("fillGradient"),this._tick=0,this.type="linear",this.colorStops=[];let n=oA(t);n={...n.type==="radial"?ug.defaultRadialOptions:ug.defaultLinearOptions,...cx(n)},this._textureSize=n.textureSize,this._wrapMode=n.wrapMode,n.type==="radial"?(this.center=n.center,this.outerCenter=n.outerCenter??this.center,this.innerRadius=n.innerRadius,this.outerRadius=n.outerRadius,this.scale=n.scale,this.rotation=n.rotation):(this.start=n.start,this.end=n.end),this.textureSpace=n.textureSpace,this.type=n.type,n.colorStops.forEach(o=>{this.addColorStop(o.offset,o.color)})}addColorStop(t,n){return this.colorStops.push({offset:t,color:Sn.shared.setValue(n).toHexa()}),this}buildLinearGradient(){if(this.texture)return;let{x:t,y:n}=this.start,{x:s,y:o}=this.end,f=s-t,d=o-n;const m=f<0||d<0;if(this._wrapMode==="clamp-to-edge"){if(f<0){const R=t;t=s,s=R,f*=-1}if(d<0){const R=n;n=o,o=R,d*=-1}}const g=this.colorStops.length?this.colorStops:n1,v=this._textureSize,{canvas:S,context:b}=i1(v,1),A=m?b.createLinearGradient(this._textureSize,0,0,0):b.createLinearGradient(0,0,this._textureSize,0);a1(A,g),b.fillStyle=A,b.fillRect(0,0,v,1),this.texture=new Ee({source:new Wm({resource:S,addressMode:this._wrapMode})});const E=Math.sqrt(f*f+d*d),z=Math.atan2(d,f),M=new ne;M.scale(E/v,1),M.rotate(z),M.translate(t,n),this.textureSpace==="local"&&M.scale(v,v),this.transform=M}buildGradient(){this.texture||this._tick++,this.type==="linear"?this.buildLinearGradient():this.buildRadialGradient()}buildRadialGradient(){if(this.texture)return;const t=this.colorStops.length?this.colorStops:n1,n=this._textureSize,{canvas:s,context:o}=i1(n,n),{x:f,y:d}=this.center,{x:m,y:g}=this.outerCenter,v=this.innerRadius,S=this.outerRadius,b=m-S,A=g-S,E=n/(S*2),z=(f-b)*E,M=(d-A)*E,R=o.createRadialGradient(z,M,v*E,(m-b)*E,(g-A)*E,S*E);a1(R,t),o.fillStyle=t[t.length-1].color,o.fillRect(0,0,n,n),o.fillStyle=R,o.translate(z,M),o.rotate(this.rotation),o.scale(1,this.scale),o.translate(-z,-M),o.fillRect(0,0,n,n),this.texture=new Ee({source:new Wm({resource:s,addressMode:this._wrapMode})});const O=new ne;O.scale(1/E,1/E),O.translate(b,A),this.textureSpace==="local"&&O.scale(n,n),this.transform=O}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}`}};Hg.defaultLinearOptions={start:{x:0,y:0},end:{x:0,y:1},colorStops:[],textureSpace:"local",type:"linear",textureSize:256,wrapMode:"clamp-to-edge"};Hg.defaultRadialOptions={center:{x:.5,y:.5},innerRadius:0,outerRadius:.5,colorStops:[],scale:1,textureSpace:"local",type:"radial",textureSize:256,wrapMode:"clamp-to-edge"};let Xs=Hg;function a1(i,t){for(let n=0;n<t.length;n++){const s=t[n];i.addColorStop(s.offset,s.color)}}function i1(i,t){const n=si.get().createCanvas(i,t),s=n.getContext("2d");return{canvas:n,context:s}}function oA(i){let t=i[0]??{};return(typeof t=="number"||i[1])&&(ce("8.5.2","use options object instead"),t={type:"linear",start:{x:i[0],y:i[1]},end:{x:i[2],y:i[3]},textureSpace:i[4],textureSize:i[5]??Xs.defaultLinearOptions.textureSize}),t}const cA=new ne,fA=new un;function hA(i,t,n,s){const o=t.matrix?i.copyFrom(t.matrix).invert():i.identity();if(t.textureSpace==="local"){const d=n.getBounds(fA);t.width&&d.pad(t.width);const{x:m,y:g}=d,v=1/d.width,S=1/d.height,b=-m*v,A=-g*S,E=o.a,z=o.b,M=o.c,R=o.d;o.a*=v,o.b*=v,o.c*=S,o.d*=S,o.tx=b*E+A*M+o.tx,o.ty=b*z+A*R+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 f=t.texture.source.style;return!(t.fill instanceof Xs)&&f.addressMode==="clamp-to-edge"&&(f.addressMode="repeat",f.update()),s&&o.append(cA.copyFrom(s).invert()),o}const dp={};ke.handleByMap(kt.ShapeBuilder,dp);ke.add(uA,sA,rA,Lh,tA,eA);const dA=new un,mA=new ne;function pA(i,t){const{geometryData:n,batches:s}=t;s.length=0,n.indices.length=0,n.vertices.length=0,n.uvs.length=0;for(let o=0;o<i.instructions.length;o++){const f=i.instructions[o];if(f.action==="texture")yA(f.data,s,n);else if(f.action==="fill"||f.action==="stroke"){const d=f.action==="stroke",m=f.data.path.shapePath,g=f.data.style,v=f.data.hole;d&&v&&l1(v.shapePath,g,!0,s,n),v&&(m.shapePrimitives[m.shapePrimitives.length-1].holes=v.shapePath.shapePrimitives),l1(m,g,d,s,n)}}}function yA(i,t,n){const s=[],o=dp.rectangle,f=dA;f.x=i.dx,f.y=i.dy,f.width=i.dw,f.height=i.dh;const d=i.transform;if(!o.build(f,s))return;const{vertices:m,uvs:g,indices:v}=n,S=v.length,b=m.length/2;d&&p_(s,d),o.triangulate(s,m,2,b,v,S);const A=i.image,E=A.uvs;g.push(E.x0,E.y0,E.x1,E.y1,E.x3,E.y3,E.x2,E.y2);const z=Qa.get(wg);z.indexOffset=S,z.indexSize=v.length-S,z.attributeOffset=b,z.attributeSize=m.length/2-b,z.baseColor=i.style,z.alpha=i.alpha,z.texture=A,z.geometryData=n,t.push(z)}function l1(i,t,n,s,o){const{vertices:f,uvs:d,indices:m}=o;i.shapePrimitives.forEach(({shape:g,transform:v,holes:S})=>{const b=[],A=dp[g.type];if(!A.build(g,b))return;const E=m.length,z=f.length/2;let M="triangle-list";if(v&&p_(b,v),n){const U=g.closePath??!0,G=t;G.pixelLine?(iA(b,U,f,m),M="line-list"):aA(b,G,!1,U,f,m)}else if(S){const U=[],G=b.slice();gA(S).forEach(Q=>{U.push(G.length/2),G.push(...Q)}),g_(G,U,f,2,z,m,E)}else A.triangulate(b,f,2,z,m,E);const R=d.length/2,O=t.texture;if(O!==Ee.WHITE){const U=hA(mA,t,g,v);FC(f,2,z,d,R,2,f.length/2-z,U)}else IC(d,R,2,f.length/2-z);const B=Qa.get(wg);B.indexOffset=E,B.indexSize=m.length-E,B.attributeOffset=z,B.attributeSize=f.length/2-z,B.baseColor=t.color,B.alpha=t.alpha,B.texture=O,B.geometryData=o,B.topology=M,s.push(B)})}function gA(i){const t=[];for(let n=0;n<i.length;n++){const s=i[n].shape,o=[];dp[s.type].build(s,o)&&t.push(o)}return t}class vA{constructor(){this.batches=[],this.geometryData={vertices:[],uvs:[],indices:[]}}reset(){this.batches&&this.batches.forEach(t=>{Qa.return(t)}),this.graphicsData&&Qa.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 xA{constructor(){this.instructions=new Ag}init(t){const n=t.maxTextures;this.batcher?this.batcher._updateMaxTextures(n):this.batcher=new WC({maxTextures:n}),this.instructions.reset()}get geometry(){return ce(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 Gg=class rg{constructor(t){this._renderer=t,this._managedContexts=new Kh({renderer:t,type:"resource",name:"graphicsContext"})}init(t){rg.defaultOptions.bezierSmoothness=(t==null?void 0:t.bezierSmoothness)??rg.defaultOptions.bezierSmoothness}getContextRenderData(t){return t._gpuData[this._renderer.uid].graphicsData||this._initContextRenderData(t)}updateGpuContext(t){const n=!!t._gpuData[this._renderer.uid],s=t._gpuData[this._renderer.uid]||this._initContext(t);if(t.dirty||!n){n&&s.reset(),pA(t,s);const o=t.batchMode;t.customShader||o==="no-batch"?s.isBatchable=!1:o==="auto"?s.isBatchable=s.geometryData.vertices.length<400:s.isBatchable=!0,t.dirty=!1}return s}getGpuContext(t){return t._gpuData[this._renderer.uid]||this._initContext(t)}_initContextRenderData(t){const n=Qa.get(xA,{maxTextures:this._renderer.limits.maxBatchableTextures}),s=t._gpuData[this._renderer.uid],{batches:o,geometryData:f}=s;s.graphicsData=n;const d=f.vertices.length,m=f.indices.length;for(let b=0;b<o.length;b++)o[b].applyTransform=!1;const g=n.batcher;g.ensureAttributeBuffer(d),g.ensureIndexBuffer(m),g.begin();for(let b=0;b<o.length;b++){const A=o[b];g.add(A)}g.finish(n.instructions);const v=g.geometry;v.indexBuffer.setDataWithSize(g.indexBuffer,g.indexSize,!0),v.buffers[0].setDataWithSize(g.attributeBuffer.float32View,g.attributeSize,!0);const S=g.batches;for(let b=0;b<S.length;b++){const A=S[b];A.bindGroup=uC(A.textures.textures,A.textures.count,this._renderer.limits.maxBatchableTextures)}return n}_initContext(t){const n=new vA;return n.context=t,t._gpuData[this._renderer.uid]=n,this._managedContexts.add(t),n}destroy(){this._managedContexts.destroy(),this._renderer=null}};Gg.extension={type:[kt.WebGLSystem,kt.WebGPUSystem],name:"graphicsContext"};Gg.defaultOptions={bezierSmoothness:.5};let jg=Gg;const _A=8,Ym=11920929e-14,SA=1;function v_(i,t,n,s,o,f,d,m,g,v){const b=Math.min(.99,Math.max(0,v??jg.defaultOptions.bezierSmoothness));let A=(SA-b)/1;return A*=A,bA(t,n,s,o,f,d,m,g,i,A),i}function bA(i,t,n,s,o,f,d,m,g,v){og(i,t,n,s,o,f,d,m,g,v,0),g.push(d,m)}function og(i,t,n,s,o,f,d,m,g,v,S){if(S>_A)return;const b=(i+n)/2,A=(t+s)/2,E=(n+o)/2,z=(s+f)/2,M=(o+d)/2,R=(f+m)/2,O=(b+E)/2,B=(A+z)/2,U=(E+M)/2,G=(z+R)/2,Z=(O+U)/2,Q=(B+G)/2;if(S>0){let K=d-i,gt=m-t;const ct=Math.abs((n-d)*gt-(s-m)*K),ht=Math.abs((o-d)*gt-(f-m)*K);if(ct>Ym&&ht>Ym){if((ct+ht)*(ct+ht)<=v*(K*K+gt*gt)){g.push(Z,Q);return}}else if(ct>Ym){if(ct*ct<=v*(K*K+gt*gt)){g.push(Z,Q);return}}else if(ht>Ym){if(ht*ht<=v*(K*K+gt*gt)){g.push(Z,Q);return}}else if(K=Z-(i+d)/2,gt=Q-(t+m)/2,K*K+gt*gt<=v){g.push(Z,Q);return}}og(i,t,b,A,O,B,Z,Q,g,v,S+1),og(Z,Q,U,G,M,R,d,m,g,v,S+1)}const TA=8,EA=11920929e-14,CA=1;function AA(i,t,n,s,o,f,d,m){const v=Math.min(.99,Math.max(0,m??jg.defaultOptions.bezierSmoothness));let S=(CA-v)/1;return S*=S,MA(t,n,s,o,f,d,i,S),i}function MA(i,t,n,s,o,f,d,m){cg(d,i,t,n,s,o,f,m,0),d.push(o,f)}function cg(i,t,n,s,o,f,d,m,g){if(g>TA)return;const v=(t+s)/2,S=(n+o)/2,b=(s+f)/2,A=(o+d)/2,E=(v+b)/2,z=(S+A)/2;let M=f-t,R=d-n;const O=Math.abs((s-f)*R-(o-d)*M);if(O>EA){if(O*O<=m*(M*M+R*R)){i.push(E,z);return}}else if(M=E-(t+f)/2,R=z-(n+d)/2,M*M+R*R<=m){i.push(E,z);return}cg(i,t,n,v,S,E,z,m,g+1),cg(i,E,z,b,A,f,d,m,g+1)}function x_(i,t,n,s,o,f,d,m){let g=Math.abs(o-f);(!d&&o>f||d&&f>o)&&(g=2*Math.PI-g),m||(m=Math.max(6,Math.floor(6*Math.pow(s,1/3)*(g/Math.PI)))),m=Math.max(m,3);let v=g/m,S=o;v*=d?-1:1;for(let b=0;b<m+1;b++){const A=Math.cos(S),E=Math.sin(S),z=t+A*s,M=n+E*s;i.push(z,M),S+=v}}function RA(i,t,n,s,o,f){const d=i[i.length-2],g=i[i.length-1]-n,v=d-t,S=o-n,b=s-t,A=Math.abs(g*b-v*S);if(A<1e-8||f===0){(i[i.length-2]!==t||i[i.length-1]!==n)&&i.push(t,n);return}const E=g*g+v*v,z=S*S+b*b,M=g*S+v*b,R=f*Math.sqrt(E)/A,O=f*Math.sqrt(z)/A,B=R*M/E,U=O*M/z,G=R*b+O*v,Z=R*S+O*g,Q=v*(O+B),K=g*(O+B),gt=b*(R+U),ct=S*(R+U),ht=Math.atan2(K-Z,Q-G),dt=Math.atan2(ct-Z,gt-G);x_(i,G+t,Z+n,f,ht,dt,v*S>b*g)}const Bh=Math.PI*2,Uy={centerX:0,centerY:0,ang1:0,ang2:0},By=({x:i,y:t},n,s,o,f,d,m,g)=>{i*=n,t*=s;const v=o*i-f*t,S=f*i+o*t;return g.x=v+d,g.y=S+m,g};function zA(i,t){const n=t===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(t/4),s=t===1.5707963267948966?.551915024494:n,o=Math.cos(i),f=Math.sin(i),d=Math.cos(i+t),m=Math.sin(i+t);return[{x:o-f*s,y:f+o*s},{x:d+m*s,y:m-d*s},{x:d,y:m}]}const s1=(i,t,n,s)=>{const o=i*s-t*n<0?-1:1;let f=i*n+t*s;return f>1&&(f=1),f<-1&&(f=-1),o*Math.acos(f)},DA=(i,t,n,s,o,f,d,m,g,v,S,b,A)=>{const E=Math.pow(o,2),z=Math.pow(f,2),M=Math.pow(S,2),R=Math.pow(b,2);let O=E*z-E*R-z*M;O<0&&(O=0),O/=E*R+z*M,O=Math.sqrt(O)*(d===m?-1:1);const B=O*o/f*b,U=O*-f/o*S,G=v*B-g*U+(i+n)/2,Z=g*B+v*U+(t+s)/2,Q=(S-B)/o,K=(b-U)/f,gt=(-S-B)/o,ct=(-b-U)/f,ht=s1(1,0,Q,K);let dt=s1(Q,K,gt,ct);m===0&&dt>0&&(dt-=Bh),m===1&&dt<0&&(dt+=Bh),A.centerX=G,A.centerY=Z,A.ang1=ht,A.ang2=dt};function OA(i,t,n,s,o,f,d,m=0,g=0,v=0){if(f===0||d===0)return;const S=Math.sin(m*Bh/360),b=Math.cos(m*Bh/360),A=b*(t-s)/2+S*(n-o)/2,E=-S*(t-s)/2+b*(n-o)/2;if(A===0&&E===0)return;f=Math.abs(f),d=Math.abs(d);const z=Math.pow(A,2)/Math.pow(f,2)+Math.pow(E,2)/Math.pow(d,2);z>1&&(f*=Math.sqrt(z),d*=Math.sqrt(z)),DA(t,n,s,o,f,d,g,v,S,b,A,E,Uy);let{ang1:M,ang2:R}=Uy;const{centerX:O,centerY:B}=Uy;let U=Math.abs(R)/(Bh/4);Math.abs(1-U)<1e-7&&(U=1);const G=Math.max(Math.ceil(U),1);R/=G;let Z=i[i.length-2],Q=i[i.length-1];const K={x:0,y:0};for(let gt=0;gt<G;gt++){const ct=zA(M,R),{x:ht,y:dt}=By(ct[0],f,d,b,S,O,B,K),{x:vt,y:_t}=By(ct[1],f,d,b,S,O,B,K),{x:xt,y:Dt}=By(ct[2],f,d,b,S,O,B,K);v_(i,Z,Q,ht,dt,vt,_t,xt,Dt),Z=xt,Q=Dt,M+=R}}function NA(i,t,n){const s=(d,m)=>{const g=m.x-d.x,v=m.y-d.y,S=Math.sqrt(g*g+v*v),b=g/S,A=v/S;return{len:S,nx:b,ny:A}},o=(d,m)=>{d===0?i.moveTo(m.x,m.y):i.lineTo(m.x,m.y)};let f=t[t.length-1];for(let d=0;d<t.length;d++){const m=t[d%t.length],g=m.radius??n;if(g<=0){o(d,m),f=m;continue}const v=t[(d+1)%t.length],S=s(m,f),b=s(m,v);if(S.len<1e-4||b.len<1e-4){o(d,m),f=m;continue}let A=Math.asin(S.nx*b.ny-S.ny*b.nx),E=1,z=!1;S.nx*b.nx-S.ny*-b.ny<0?A<0?A=Math.PI+A:(A=Math.PI-A,E=-1,z=!0):A>0&&(E=-1,z=!0);const M=A/2;let R,O=Math.abs(Math.cos(M)*g/Math.sin(M));O>Math.min(S.len/2,b.len/2)?(O=Math.min(S.len/2,b.len/2),R=Math.abs(O*Math.sin(M)/Math.cos(M))):R=g;const B=m.x+b.nx*O+-b.ny*R*E,U=m.y+b.ny*O+b.nx*R*E,G=Math.atan2(S.ny,S.nx)+Math.PI/2*E,Z=Math.atan2(b.ny,b.nx)-Math.PI/2*E;d===0&&i.moveTo(B+Math.cos(G)*R,U+Math.sin(G)*R),i.arc(B,U,R,G,Z,z),f=m}}function UA(i,t,n,s){const o=(m,g)=>Math.sqrt((m.x-g.x)**2+(m.y-g.y)**2),f=(m,g,v)=>({x:m.x+(g.x-m.x)*v,y:m.y+(g.y-m.y)*v}),d=t.length;for(let m=0;m<d;m++){const g=t[(m+1)%d],v=g.radius??n;if(v<=0){m===0?i.moveTo(g.x,g.y):i.lineTo(g.x,g.y);continue}const S=t[m],b=t[(m+2)%d],A=o(S,g);let E;if(A<1e-4)E=g;else{const R=Math.min(A/2,v);E=f(g,S,R/A)}const z=o(b,g);let M;if(z<1e-4)M=g;else{const R=Math.min(z/2,v);M=f(g,b,R/z)}m===0?i.moveTo(E.x,E.y):i.lineTo(E.x,E.y),i.quadraticCurveTo(g.x,g.y,M.x,M.y,s)}}const BA=new un;class wA{constructor(t){this.shapePrimitives=[],this._currentPoly=null,this._bounds=new Bi,this._graphicsPath2D=t,this.signed=t.checkForHoles}moveTo(t,n){return this.startPoly(t,n),this}lineTo(t,n){this._ensurePoly();const s=this._currentPoly.points,o=s[s.length-2],f=s[s.length-1];return(o!==t||f!==n)&&s.push(t,n),this}arc(t,n,s,o,f,d){this._ensurePoly(!1);const m=this._currentPoly.points;return x_(m,t,n,s,o,f,d),this}arcTo(t,n,s,o,f){this._ensurePoly();const d=this._currentPoly.points;return RA(d,t,n,s,o,f),this}arcToSvg(t,n,s,o,f,d,m){const g=this._currentPoly.points;return OA(g,this._currentPoly.lastX,this._currentPoly.lastY,d,m,t,n,s,o,f),this}bezierCurveTo(t,n,s,o,f,d,m){this._ensurePoly();const g=this._currentPoly;return v_(this._currentPoly.points,g.lastX,g.lastY,t,n,s,o,f,d,m),this}quadraticCurveTo(t,n,s,o,f){this._ensurePoly();const d=this._currentPoly;return AA(this._currentPoly.points,d.lastX,d.lastY,t,n,s,o,f),this}closePath(){return this.endPoly(!0),this}addPath(t,n){this.endPoly(),n&&!n.isIdentity()&&(t=t.clone(!0),t.transform(n));const s=this.shapePrimitives,o=s.length;for(let f=0;f<t.instructions.length;f++){const d=t.instructions[f];this[d.action](...d.data)}if(t.checkForHoles&&s.length-o>1){let f=null;for(let d=o;d<s.length;d++){const m=s[d];if(m.shape.type==="polygon"){const g=m.shape,v=f==null?void 0:f.shape;v&&v.containsPolygon(g)?(f.holes||(f.holes=[]),f.holes.push(m),s.copyWithin(d,d+1),s.length--,d--):f=m}}}return this}finish(t=!1){this.endPoly(t)}rect(t,n,s,o,f){return this.drawShape(new un(t,n,s,o),f),this}circle(t,n,s,o){return this.drawShape(new Ng(t,n,s),o),this}poly(t,n,s){const o=new Nh(t);return o.closePath=n,this.drawShape(o,s),this}regularPoly(t,n,s,o,f=0,d){o=Math.max(o|0,3);const m=-1*Math.PI/2+f,g=Math.PI*2/o,v=[];for(let S=0;S<o;S++){const b=m-S*g;v.push(t+s*Math.cos(b),n+s*Math.sin(b))}return this.poly(v,!0,d),this}roundPoly(t,n,s,o,f,d=0,m){if(o=Math.max(o|0,3),f<=0)return this.regularPoly(t,n,s,o,d);const g=s*Math.sin(Math.PI/o)-.001;f=Math.min(f,g);const v=-1*Math.PI/2+d,S=Math.PI*2/o,b=(o-2)*Math.PI/o/2;for(let A=0;A<o;A++){const E=A*S+v,z=t+s*Math.cos(E),M=n+s*Math.sin(E),R=E+Math.PI+b,O=E-Math.PI-b,B=z+f*Math.cos(R),U=M+f*Math.sin(R),G=z+f*Math.cos(O),Z=M+f*Math.sin(O);A===0?this.moveTo(B,U):this.lineTo(B,U),this.quadraticCurveTo(z,M,G,Z,m)}return this.closePath()}roundShape(t,n,s=!1,o){return t.length<3?this:(s?UA(this,t,n,o):NA(this,t,n),this.closePath())}filletRect(t,n,s,o,f){if(f===0)return this.rect(t,n,s,o);const d=Math.min(s,o)/2,m=Math.min(d,Math.max(-d,f)),g=t+s,v=n+o,S=m<0?-m:0,b=Math.abs(m);return this.moveTo(t,n+b).arcTo(t+S,n+S,t+b,n,b).lineTo(g-b,n).arcTo(g-S,n+S,g,n+b,b).lineTo(g,v-b).arcTo(g-S,v-S,t+s-b,v,b).lineTo(t+b,v).arcTo(t+S,v-S,t,v-b,b).closePath()}chamferRect(t,n,s,o,f,d){if(f<=0)return this.rect(t,n,s,o);const m=Math.min(f,Math.min(s,o)/2),g=t+s,v=n+o,S=[t+m,n,g-m,n,g,n+m,g,v-m,g-m,v,t+m,v,t,v-m,t,n+m];for(let b=S.length-1;b>=2;b-=2)S[b]===S[b-2]&&S[b-1]===S[b-3]&&S.splice(b-1,2);return this.poly(S,!0,d)}ellipse(t,n,s,o,f){return this.drawShape(new Ug(t,n,s,o),f),this}roundRect(t,n,s,o,f,d){return this.drawShape(new Bg(t,n,s,o,f),d),this}drawShape(t,n){return this.endPoly(),this.shapePrimitives.push({shape:t,transform:n}),this}startPoly(t,n){let s=this._currentPoly;return s&&this.endPoly(),s=new Nh,s.points.push(t,n),this._currentPoly=s,this}endPoly(t=!1){const n=this._currentPoly;return n&&n.points.length>2&&(n.closePath=t,this.shapePrimitives.push({shape:n})),this._currentPoly=null,this}_ensurePoly(t=!0){if(!this._currentPoly&&(this._currentPoly=new Nh,t)){const n=this.shapePrimitives[this.shapePrimitives.length-1];if(n){let s=n.shape.x,o=n.shape.y;if(n.transform&&!n.transform.isIdentity()){const f=n.transform,d=s;s=f.a*s+f.c*o+f.tx,o=f.b*d+f.d*o+f.ty}this._currentPoly.points.push(s,o)}else this._currentPoly.points.push(0,0)}}buildPath(){const t=this._graphicsPath2D;this.shapePrimitives.length=0,this._currentPoly=null;for(let n=0;n<t.instructions.length;n++){const s=t.instructions[n];this[s.action](...s.data)}this.finish()}get bounds(){const t=this._bounds;t.clear();const n=this.shapePrimitives;for(let s=0;s<n.length;s++){const o=n[s],f=o.shape.getBounds(BA);o.transform?t.addRect(f,o.transform):t.addRect(f)}return t}}class Ys{constructor(t,n=!1){this.instructions=[],this.uid=en("graphicsPath"),this._dirty=!0,this.checkForHoles=n,typeof t=="string"?aC(t,this):this.instructions=(t==null?void 0:t.slice())??[]}get shapePath(){return this._shapePath||(this._shapePath=new wA(this)),this._dirty&&(this._dirty=!1,this._shapePath.buildPath()),this._shapePath}addPath(t,n){return t=t.clone(),this.instructions.push({action:"addPath",data:[t,n]}),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,n,s,o,f){const d=this.instructions[this.instructions.length-1],m=this.getLastPoint(sa.shared);let g=0,v=0;if(!d||d.action!=="bezierCurveTo")g=m.x,v=m.y;else{g=d.data[2],v=d.data[3];const S=m.x,b=m.y;g=S+(S-g),v=b+(b-v)}return this.instructions.push({action:"bezierCurveTo",data:[g,v,t,n,s,o,f]}),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,n,s){const o=this.instructions[this.instructions.length-1],f=this.getLastPoint(sa.shared);let d=0,m=0;if(!o||o.action!=="quadraticCurveTo")d=f.x,m=f.y;else{d=o.data[0],m=o.data[1];const g=f.x,v=f.y;d=g+(g-d),m=v+(v-m)}return this.instructions.push({action:"quadraticCurveTo",data:[d,m,t,n,s]}),this._dirty=!0,this}rect(t,n,s,o,f){return this.instructions.push({action:"rect",data:[t,n,s,o,f]}),this._dirty=!0,this}circle(t,n,s,o){return this.instructions.push({action:"circle",data:[t,n,s,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,n,s,o,f,d,m){f||(f=o/2);const g=-1*Math.PI/2+d,v=s*2,S=Math.PI*2/v,b=[];for(let A=0;A<v;A++){const E=A%2?f:o,z=A*S+g;b.push(t+E*Math.cos(z),n+E*Math.sin(z))}return this.poly(b,!0,m),this}clone(t=!1){const n=new Ys;if(n.checkForHoles=this.checkForHoles,!t)n.instructions=this.instructions.slice();else for(let s=0;s<this.instructions.length;s++){const o=this.instructions[s];n.instructions.push({action:o.action,data:o.data.slice()})}return n}clear(){return this.instructions.length=0,this._dirty=!0,this}transform(t){if(t.isIdentity())return this;const n=t.a,s=t.b,o=t.c,f=t.d,d=t.tx,m=t.ty;let g=0,v=0,S=0,b=0,A=0,E=0,z=0,M=0;for(let R=0;R<this.instructions.length;R++){const O=this.instructions[R],B=O.data;switch(O.action){case"moveTo":case"lineTo":g=B[0],v=B[1],B[0]=n*g+o*v+d,B[1]=s*g+f*v+m;break;case"bezierCurveTo":S=B[0],b=B[1],A=B[2],E=B[3],g=B[4],v=B[5],B[0]=n*S+o*b+d,B[1]=s*S+f*b+m,B[2]=n*A+o*E+d,B[3]=s*A+f*E+m,B[4]=n*g+o*v+d,B[5]=s*g+f*v+m;break;case"quadraticCurveTo":S=B[0],b=B[1],g=B[2],v=B[3],B[0]=n*S+o*b+d,B[1]=s*S+f*b+m,B[2]=n*g+o*v+d,B[3]=s*g+f*v+m;break;case"arcToSvg":g=B[5],v=B[6],z=B[0],M=B[1],B[0]=n*z+o*M,B[1]=s*z+f*M,B[5]=n*g+o*v+d,B[6]=s*g+f*v+m;break;case"circle":B[4]=Th(B[3],t);break;case"rect":B[4]=Th(B[4],t);break;case"ellipse":B[8]=Th(B[8],t);break;case"roundRect":B[5]=Th(B[5],t);break;case"addPath":B[0].transform(t);break;case"poly":B[2]=Th(B[2],t);break;default:Da("unknown transform action",O.action);break}}return this._dirty=!0,this}get bounds(){return this.shapePath.bounds}getLastPoint(t){let n=this.instructions.length-1,s=this.instructions[n];if(!s)return t.x=0,t.y=0,t;for(;s.action==="closePath";){if(n--,n<0)return t.x=0,t.y=0,t;s=this.instructions[n]}switch(s.action){case"moveTo":case"lineTo":t.x=s.data[0],t.y=s.data[1];break;case"quadraticCurveTo":t.x=s.data[2],t.y=s.data[3];break;case"bezierCurveTo":t.x=s.data[4],t.y=s.data[5];break;case"arc":case"arcToSvg":t.x=s.data[5],t.y=s.data[6];break;case"addPath":s.data[0].getLastPoint(t);break}return t}}function Th(i,t){return i?i.prepend(t):t.clone()}function $e(i,t,n){const s=i.getAttribute(t);return s?Number(s):n}function HA(i,t){const n=i.querySelectorAll("defs");for(let s=0;s<n.length;s++){const o=n[s];for(let f=0;f<o.children.length;f++){const d=o.children[f];switch(d.nodeName.toLowerCase()){case"lineargradient":t.defs[d.id]=GA(d);break;case"radialgradient":t.defs[d.id]=jA();break}}}}function GA(i){const t=$e(i,"x1",0),n=$e(i,"y1",0),s=$e(i,"x2",1),o=$e(i,"y2",0),f=i.getAttribute("gradientUnits")||"objectBoundingBox",d=new Xs(t,n,s,o,f==="objectBoundingBox"?"local":"global");for(let m=0;m<i.children.length;m++){const g=i.children[m],v=$e(g,"offset",0),S=Sn.shared.setValue(g.getAttribute("stop-color")).toNumber();d.addColorStop(v,S)}return d}function jA(i){return Da("[SVG Parser] Radial gradients are not yet supported"),new Xs(0,0,1,0)}function u1(i){const t=i.match(/url\s*\(\s*['"]?\s*#([^'"\s)]+)\s*['"]?\s*\)/i);return t?t[1]:""}const r1={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 __(i,t){const n=i.getAttribute("style"),s={},o={},f={strokeStyle:s,fillStyle:o,useFill:!1,useStroke:!1};for(const d in r1){const m=i.getAttribute(d);m&&o1(t,f,d,m.trim())}if(n){const d=n.split(";");for(let m=0;m<d.length;m++){const g=d[m].trim(),[v,S]=g.split(":");r1[v]&&o1(t,f,v,S.trim())}}return{strokeStyle:f.useStroke?s:null,fillStyle:f.useFill?o:null,useFill:f.useFill,useStroke:f.useStroke}}function o1(i,t,n,s){switch(n){case"stroke":if(s!=="none"){if(s.startsWith("url(")){const o=u1(s);t.strokeStyle.fill=i.defs[o]}else t.strokeStyle.color=Sn.shared.setValue(s).toNumber();t.useStroke=!0}break;case"stroke-width":t.strokeStyle.width=Number(s);break;case"fill":if(s!=="none"){if(s.startsWith("url(")){const o=u1(s);t.fillStyle.fill=i.defs[o]}else t.fillStyle.color=Sn.shared.setValue(s).toNumber();t.useFill=!0}break;case"fill-opacity":t.fillStyle.alpha=Number(s);break;case"stroke-opacity":t.strokeStyle.alpha=Number(s);break;case"opacity":t.fillStyle.alpha=Number(s),t.strokeStyle.alpha=Number(s);break}}function qA(i){if(i.length<=2)return!0;const t=i.map(m=>m.area).sort((m,g)=>g-m),[n,s]=t,o=t[t.length-1],f=n/s,d=s/o;return!(f>3&&d<2)}function YA(i){return i.split(/(?=[Mm])/).filter(s=>s.trim().length>0)}function LA(i){const t=i.match(/[-+]?[0-9]*\.?[0-9]+/g);if(!t||t.length<4)return 0;const n=t.map(Number),s=[],o=[];for(let S=0;S<n.length;S+=2)S+1<n.length&&(s.push(n[S]),o.push(n[S+1]));if(s.length===0||o.length===0)return 0;const f=Math.min(...s),d=Math.max(...s),m=Math.min(...o),g=Math.max(...o);return(d-f)*(g-m)}function c1(i,t){const n=new Ys(i,!1);for(const s of n.instructions)t.instructions.push(s)}function XA(i,t){if(typeof i=="string"){const d=document.createElement("div");d.innerHTML=i.trim(),i=d.querySelector("svg")}const n={context:t,defs:{},path:new Ys};HA(i,n);const s=i.children,{fillStyle:o,strokeStyle:f}=__(i,n);for(let d=0;d<s.length;d++){const m=s[d];m.nodeName.toLowerCase()!=="defs"&&S_(m,n,o,f)}return t}function S_(i,t,n,s){const o=i.children,{fillStyle:f,strokeStyle:d}=__(i,t);f&&n?n={...n,...f}:f&&(n=f),d&&s?s={...s,...d}:d&&(s=d);const m=!n&&!s;m&&(n={color:0});let g,v,S,b,A,E,z,M,R,O,B,U,G,Z,Q,K,gt;switch(i.nodeName.toLowerCase()){case"path":{Z=i.getAttribute("d");const ct=i.getAttribute("fill-rule"),ht=YA(Z),dt=ct==="evenodd",vt=ht.length>1;if(dt&&vt){const xt=ht.map(w=>({path:w,area:LA(w)}));if(xt.sort((w,H)=>H.area-w.area),ht.length>3||!qA(xt))for(let w=0;w<xt.length;w++){const H=xt[w],at=w===0;t.context.beginPath();const et=new Ys(void 0,!0);c1(H.path,et),t.context.path(et),at?(n&&t.context.fill(n),s&&t.context.stroke(s)):t.context.cut()}else for(let w=0;w<xt.length;w++){const H=xt[w],at=w%2===1;t.context.beginPath();const et=new Ys(void 0,!0);c1(H.path,et),t.context.path(et),at?t.context.cut():(n&&t.context.fill(n),s&&t.context.stroke(s))}}else{const xt=ct?ct==="evenodd":!0;Q=new Ys(Z,xt),t.context.path(Q),n&&t.context.fill(n),s&&t.context.stroke(s)}break}case"circle":z=$e(i,"cx",0),M=$e(i,"cy",0),R=$e(i,"r",0),t.context.ellipse(z,M,R,R),n&&t.context.fill(n),s&&t.context.stroke(s);break;case"rect":g=$e(i,"x",0),v=$e(i,"y",0),K=$e(i,"width",0),gt=$e(i,"height",0),O=$e(i,"rx",0),B=$e(i,"ry",0),O||B?t.context.roundRect(g,v,K,gt,O||B):t.context.rect(g,v,K,gt),n&&t.context.fill(n),s&&t.context.stroke(s);break;case"ellipse":z=$e(i,"cx",0),M=$e(i,"cy",0),O=$e(i,"rx",0),B=$e(i,"ry",0),t.context.beginPath(),t.context.ellipse(z,M,O,B),n&&t.context.fill(n),s&&t.context.stroke(s);break;case"line":S=$e(i,"x1",0),b=$e(i,"y1",0),A=$e(i,"x2",0),E=$e(i,"y2",0),t.context.beginPath(),t.context.moveTo(S,b),t.context.lineTo(A,E),s&&t.context.stroke(s);break;case"polygon":G=i.getAttribute("points"),U=G.match(/-?\d+/g).map(ct=>parseInt(ct,10)),t.context.poly(U,!0),n&&t.context.fill(n),s&&t.context.stroke(s);break;case"polyline":G=i.getAttribute("points"),U=G.match(/-?\d+/g).map(ct=>parseInt(ct,10)),t.context.poly(U,!1),s&&t.context.stroke(s);break;case"g":case"svg":break;default:{Da(`[SVG parser] <${i.nodeName}> elements unsupported`);break}}m&&(n=null);for(let ct=0;ct<o.length;ct++)S_(o[ct],t,n,s)}const f1={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 mp{constructor(t,n){this.uid=en("fillPattern"),this._tick=0,this.transform=new ne,this.texture=t,this.transform.scale(1/t.frame.width,1/t.frame.height),n&&(t.source.style.addressModeU=f1[n].addressModeU,t.source.style.addressModeV=f1[n].addressModeV)}setTransform(t){const n=this.texture;this.transform.copyFrom(t),this.transform.invert(),this.transform.scale(1/n.frame.width,1/n.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 VA(i){return Sn.isColorLike(i)}function h1(i){return i instanceof mp}function d1(i){return i instanceof Xs}function QA(i){return i instanceof Ee}function ZA(i,t,n){const s=Sn.shared.setValue(t??0);return i.color=s.toNumber(),i.alpha=s.alpha===1?n.alpha:s.alpha,i.texture=Ee.WHITE,{...n,...i}}function KA(i,t,n){return i.texture=t,{...n,...i}}function m1(i,t,n){return i.fill=t,i.color=16777215,i.texture=t.texture,i.matrix=t.transform,{...n,...i}}function p1(i,t,n){return t.buildGradient(),i.fill=t,i.color=16777215,i.texture=t.texture,i.matrix=t.transform,i.textureSpace=t.textureSpace,{...n,...i}}function kA(i,t){const n={...t,...i},s=Sn.shared.setValue(n.color);return n.alpha*=s.alpha,n.color=s.toNumber(),n}function kr(i,t){if(i==null)return null;const n={},s=i;return VA(i)?ZA(n,i,t):QA(i)?KA(n,i,t):h1(i)?m1(n,i,t):d1(i)?p1(n,i,t):s.fill&&h1(s.fill)?m1(s,s.fill,t):s.fill&&d1(s.fill)?p1(s,s.fill,t):kA(s,t)}function $m(i,t){const{width:n,alignment:s,miterLimit:o,cap:f,join:d,pixelLine:m,...g}=t,v=kr(i,g);return v?{width:n,alignment:s,miterLimit:o,cap:f,join:d,pixelLine:m,...v}:null}function JA(i,t){let n=1;const s=i.shapePath.shapePrimitives;for(let o=0;o<s.length;o++){const f=s[o].shape;if(f.type!=="polygon")continue;const d=f.points,m=d.length;if(m<6)continue;const g=f.closePath;for(let v=0;v<m;v+=2){if(!g&&(v===0||v===m-2))continue;const S=(v-2+m)%m,b=(v+2)%m,A=d[S],E=d[S+1],z=d[v],M=d[v+1],R=d[b],O=d[b+1],B=A-z,U=E-M,G=R-z,Z=O-M,Q=B*B+U*U,K=G*G+Z*Z;if(Q<1e-12||K<1e-12)continue;let ht=(B*G+U*Z)/Math.sqrt(Q*K);ht<-1?ht=-1:ht>1&&(ht=1);const dt=Math.sqrt((1-ht)*.5);if(dt<1e-6)continue;const vt=Math.min(1/dt,t);vt>n&&(n=vt)}}return n}const PA=new sa,y1=new ne,qg=class Wl extends $l{constructor(){super(...arguments),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=en("graphicsContext"),this.dirty=!0,this.batchMode="auto",this.instructions=[],this.destroyed=!1,this._activePath=new Ys,this._transform=new ne,this._fillStyle={...Wl.defaultFillStyle},this._strokeStyle={...Wl.defaultStrokeStyle},this._stateStack=[],this._tick=0,this._bounds=new Bi,this._boundsDirty=!0}clone(){const t=new Wl;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=kr(t,Wl.defaultFillStyle)}get strokeStyle(){return this._strokeStyle}set strokeStyle(t){this._strokeStyle=$m(t,Wl.defaultStrokeStyle)}setFillStyle(t){return this._fillStyle=kr(t,Wl.defaultFillStyle),this}setStrokeStyle(t){return this._strokeStyle=kr(t,Wl.defaultStrokeStyle),this}texture(t,n,s,o,f,d){return this.instructions.push({action:"texture",data:{image:t,dx:s||0,dy:o||0,dw:f||t.frame.width,dh:d||t.frame.height,transform:this._transform.clone(),alpha:this._fillStyle.alpha,style:n||n===0?Sn.shared.setValue(n).toNumber():16777215}}),this.onUpdate(),this}beginPath(){return this._activePath=new Ys,this}fill(t,n){let s;const o=this.instructions[this.instructions.length-1];return this._tick===0&&(o==null?void 0:o.action)==="stroke"?s=o.data.path:s=this._activePath.clone(),s?(t!=null&&(n!==void 0&&typeof t=="number"&&(ce(tn,"GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead"),t={color:t,alpha:n}),this._fillStyle=kr(t,Wl.defaultFillStyle)),this.instructions.push({action:"fill",data:{style:this.fillStyle,path:s}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}_initNextPathLocation(){const{x:t,y:n}=this._activePath.getLastPoint(sa.shared);this._activePath.clear(),this._activePath.moveTo(t,n)}stroke(t){let n;const s=this.instructions[this.instructions.length-1];return this._tick===0&&(s==null?void 0:s.action)==="fill"?n=s.data.path:n=this._activePath.clone(),n?(t!=null&&(this._strokeStyle=$m(t,Wl.defaultStrokeStyle)),this.instructions.push({action:"stroke",data:{style:this.strokeStyle,path:n}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}cut(){for(let t=0;t<2;t++){const n=this.instructions[this.instructions.length-1-t],s=this._activePath.clone();if(n&&(n.action==="stroke"||n.action==="fill"))if(n.data.hole)n.data.hole.addPath(s);else{n.data.hole=s;break}}return this._initNextPathLocation(),this}arc(t,n,s,o,f,d){this._tick++;const m=this._transform;return this._activePath.arc(m.a*t+m.c*n+m.tx,m.b*t+m.d*n+m.ty,s,o,f,d),this}arcTo(t,n,s,o,f){this._tick++;const d=this._transform;return this._activePath.arcTo(d.a*t+d.c*n+d.tx,d.b*t+d.d*n+d.ty,d.a*s+d.c*o+d.tx,d.b*s+d.d*o+d.ty,f),this}arcToSvg(t,n,s,o,f,d,m){this._tick++;const g=this._transform;return this._activePath.arcToSvg(t,n,s,o,f,g.a*d+g.c*m+g.tx,g.b*d+g.d*m+g.ty),this}bezierCurveTo(t,n,s,o,f,d,m){this._tick++;const g=this._transform;return this._activePath.bezierCurveTo(g.a*t+g.c*n+g.tx,g.b*t+g.d*n+g.ty,g.a*s+g.c*o+g.tx,g.b*s+g.d*o+g.ty,g.a*f+g.c*d+g.tx,g.b*f+g.d*d+g.ty,m),this}closePath(){var t;return this._tick++,(t=this._activePath)==null||t.closePath(),this}ellipse(t,n,s,o){return this._tick++,this._activePath.ellipse(t,n,s,o,this._transform.clone()),this}circle(t,n,s){return this._tick++,this._activePath.circle(t,n,s,this._transform.clone()),this}path(t){return this._tick++,this._activePath.addPath(t,this._transform.clone()),this}lineTo(t,n){this._tick++;const s=this._transform;return this._activePath.lineTo(s.a*t+s.c*n+s.tx,s.b*t+s.d*n+s.ty),this}moveTo(t,n){this._tick++;const s=this._transform,o=this._activePath.instructions,f=s.a*t+s.c*n+s.tx,d=s.b*t+s.d*n+s.ty;return o.length===1&&o[0].action==="moveTo"?(o[0].data[0]=f,o[0].data[1]=d,this):(this._activePath.moveTo(f,d),this)}quadraticCurveTo(t,n,s,o,f){this._tick++;const d=this._transform;return this._activePath.quadraticCurveTo(d.a*t+d.c*n+d.tx,d.b*t+d.d*n+d.ty,d.a*s+d.c*o+d.tx,d.b*s+d.d*o+d.ty,f),this}rect(t,n,s,o){return this._tick++,this._activePath.rect(t,n,s,o,this._transform.clone()),this}roundRect(t,n,s,o,f){return this._tick++,this._activePath.roundRect(t,n,s,o,f,this._transform.clone()),this}poly(t,n){return this._tick++,this._activePath.poly(t,n,this._transform.clone()),this}regularPoly(t,n,s,o,f=0,d){return this._tick++,this._activePath.regularPoly(t,n,s,o,f,d),this}roundPoly(t,n,s,o,f,d){return this._tick++,this._activePath.roundPoly(t,n,s,o,f,d),this}roundShape(t,n,s,o){return this._tick++,this._activePath.roundShape(t,n,s,o),this}filletRect(t,n,s,o,f){return this._tick++,this._activePath.filletRect(t,n,s,o,f),this}chamferRect(t,n,s,o,f,d){return this._tick++,this._activePath.chamferRect(t,n,s,o,f,d),this}star(t,n,s,o,f=0,d=0){return this._tick++,this._activePath.star(t,n,s,o,f,d,this._transform.clone()),this}svg(t){return this._tick++,XA(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,n=t){return this._transform.scale(t,n),this}setTransform(t,n,s,o,f,d){return t instanceof ne?(this._transform.set(t.a,t.b,t.c,t.d,t.tx,t.ty),this):(this._transform.set(t,n,s,o,f,d),this)}transform(t,n,s,o,f,d){return t instanceof ne?(this._transform.append(t),this):(y1.set(t,n,s,o,f,d),this._transform.append(y1),this)}translate(t,n=t){return this._transform.translate(t,n),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 n=0;n<this.instructions.length;n++){const s=this.instructions[n],o=s.action;if(o==="fill"){const f=s.data;t.addBounds(f.path.bounds)}else if(o==="texture"){const f=s.data;t.addFrame(f.dx,f.dy,f.dx+f.dw,f.dy+f.dh,f.transform)}if(o==="stroke"){const f=s.data,d=f.style.alignment;let m=f.style.width*(1-d);f.style.join==="miter"&&(m*=JA(f.path,f.style.miterLimit));const g=f.path.bounds;t.addFrame(g.minX-m,g.minY-m,g.maxX+m,g.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 n=this.instructions;let s=!1;for(let f=0;f<n.length;f++){const d=n[f],m=d.data,g=m.path;if(!d.action||!g)continue;const v=m.style,S=g.shapePath.shapePrimitives;for(let b=0;b<S.length;b++){const A=S[b].shape;if(!v||!A)continue;const E=S[b].transform,z=E?E.applyInverse(t,PA):t;if(d.action==="fill")s=A.contains(z.x,z.y);else{const R=v;s=A.strokeContains(z.x,z.y,R.width,R.alignment)}const M=m.hole;if(M){const R=(o=M.shapePath)==null?void 0:o.shapePrimitives;if(R)for(let O=0;O<R.length;O++)R[O].shape.contains(z.x,z.y)&&(s=!1)}if(s)return!0}}return s}unload(){var t;this.emit("unload",this);for(const n in this._gpuData)(t=this._gpuData[n])==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 s=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(s)),this._strokeStyle.texture&&(this._strokeStyle.fill&&"uid"in this._strokeStyle.fill?this._strokeStyle.fill.destroy():this._strokeStyle.texture.destroy(s))}this._fillStyle=null,this._strokeStyle=null,this.instructions=null,this._activePath=null,this._bounds=null,this._stateStack=null,this.customShader=null,this._transform=null}};qg.defaultFillStyle={color:16777215,alpha:1,texture:Ee.WHITE,matrix:null,fill:null,textureSpace:"local"};qg.defaultStrokeStyle={width:1,color:16777215,alpha:1,alignment:.5,miterLimit:10,cap:"butt",join:"miter",texture:Ee.WHITE,matrix:null,fill:null,textureSpace:"local",pixelLine:!1};let ol=qg;class WA{constructor(){this.isBatchable=!1}reset(){this.isBatchable=!1,this.context=null,this.graphicsData&&(this.graphicsData.destroy(),this.graphicsData=null)}destroy(){this.reset()}}class FA{constructor(){this.instructions=new Ag}init(){this.instructions.reset()}destroy(){this.instructions.destroy(),this.instructions=null}}const Yg=class fg{constructor(t){this._renderer=t,this._managedContexts=new Kh({renderer:t,type:"resource",name:"graphicsContext"})}init(t){fg.defaultOptions.bezierSmoothness=(t==null?void 0:t.bezierSmoothness)??fg.defaultOptions.bezierSmoothness}getContextRenderData(t){return this.getGpuContext(t).graphicsData||this._initContextRenderData(t)}updateGpuContext(t){const n=t._gpuData,s=!!n[this._renderer.uid],o=n[this._renderer.uid]||this._initContext(t);return(t.dirty||!s)&&(s&&o.reset(),o.isBatchable=!1,t.dirty=!1),o}getGpuContext(t){return t._gpuData[this._renderer.uid]||this._initContext(t)}_initContextRenderData(t){const n=new FA,s=this.getGpuContext(t);return s.graphicsData=n,n.init(),n}_initContext(t){const n=new WA;return n.context=t,t._gpuData[this._renderer.uid]=n,this._managedContexts.add(t),n}destroy(){this._managedContexts.destroy(),this._renderer=null}};Yg.extension={type:[kt.CanvasSystem],name:"graphicsContext"};Yg.defaultOptions={bezierSmoothness:.5};let IA=Yg;class b_{constructor(t,n){this.state=Dg.for2d(),this.renderer=t,this._adaptor=n,this.renderer.runners.contextChange.add(this),this._managedGraphics=new Kh({renderer:t,type:"renderable",priority:-1,name:"graphics"})}contextChange(){this._adaptor.contextChange(this.renderer)}validateRenderable(t){return!1}addRenderable(t,n){this._managedGraphics.add(t),this.renderer.renderPipes.batch.break(n),n.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}}b_.extension={type:[kt.CanvasPipes],name:"graphics"};function $A(i,t,n){const s=(i>>24&255)/255;t[n++]=(i&255)/255*s,t[n++]=(i>>8&255)/255*s,t[n++]=(i>>16&255)/255*s,t[n++]=s}class t3{constructor(){this.batches=[],this.batched=!1}destroy(){this.batches.forEach(t=>{Qa.return(t)}),this.batches.length=0}}class T_{constructor(t,n){this.state=Dg.for2d(),this.renderer=t,this._adaptor=n,this.renderer.runners.contextChange.add(this),this._managedGraphics=new Kh({renderer:t,type:"renderable",priority:-1,name:"graphics"})}contextChange(){this._adaptor.contextChange(this.renderer)}validateRenderable(t){const n=t.context,s=!!t._gpuData,f=this.renderer.graphicsContext.updateGpuContext(n);return!!(f.isBatchable||s!==f.isBatchable)}addRenderable(t,n){const o=this.renderer.graphicsContext.updateGpuContext(t.context);t.didViewUpdate&&this._rebuild(t),o.isBatchable?this._addToBatcher(t,n):(this.renderer.renderPipes.batch.break(n),n.add(t))}updateRenderable(t){const s=this._getGpuDataForRenderable(t).batches;for(let o=0;o<s.length;o++){const f=s[o];f._batcher.updateElement(f)}}execute(t){if(!t.isRenderable)return;const n=this.renderer,s=t.context;if(!n.graphicsContext.getGpuContext(s).batches.length)return;const f=s.customShader||this._adaptor.shader;this.state.blendMode=t.groupBlendMode;const d=f.resources.localUniforms.uniforms;d.uTransformMatrix=t.groupTransform,d.uRound=n._roundPixels|t._roundPixels,$A(t.groupColorAlpha,d.uColor,0),this._adaptor.execute(this,t)}_rebuild(t){const n=this._getGpuDataForRenderable(t),o=this.renderer.graphicsContext.updateGpuContext(t.context);n.destroy(),o.isBatchable&&this._updateBatchesForRenderable(t,n)}_addToBatcher(t,n){const s=this.renderer.renderPipes.batch,o=this._getGpuDataForRenderable(t).batches;for(let f=0;f<o.length;f++){const d=o[f];s.addToBatch(d,n)}}_getGpuDataForRenderable(t){return t._gpuData[this.renderer.uid]||this._initGpuDataForRenderable(t)}_initGpuDataForRenderable(t){const n=new t3;return t._gpuData[this.renderer.uid]=n,this._managedGraphics.add(t),n}_updateBatchesForRenderable(t,n){const s=t.context,f=this.renderer.graphicsContext.getGpuContext(s),d=this.renderer._roundPixels|t._roundPixels;n.batches=f.batches.map(m=>{const g=Qa.get(wg);return m.copyTo(g),g.renderable=t,g.roundPixels=d,g})}destroy(){this._managedGraphics.destroy(),this.renderer=null,this._adaptor.destroy(),this._adaptor=null,this.state=null}}T_.extension={type:[kt.WebGLPipes,kt.WebGPUPipes],name:"graphics"};ke.add(b_);ke.add(T_);ke.add(IA);ke.add(jg);class fl extends Mg{constructor(t){t instanceof ol&&(t={context:t});const{context:n,roundPixels:s,...o}=t||{};super({label:"Graphics",...o}),this.renderPipeId="graphics",n?this.context=n:(this.context=this._ownedContext=new ol,this.context.autoGarbageCollect=this.autoGarbageCollect),this.didViewUpdate=!0,this.allowChildren=!1,this.roundPixels=s??!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,n){return this.context[t](...n),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 fl(this._context.clone()):(this._ownedContext=null,new fl(this._context))}lineStyle(t,n,s){ce(tn,"Graphics#lineStyle is no longer needed. Use Graphics#setStrokeStyle to set the stroke style.");const o={};return t&&(o.width=t),n&&(o.color=n),s&&(o.alpha=s),this.context.strokeStyle=o,this}beginFill(t,n){ce(tn,"Graphics#beginFill is no longer needed. Use Graphics#fill to fill the shape with the desired style.");const s={};return t!==void 0&&(s.color=t),n!==void 0&&(s.alpha=n),this.context.fillStyle=s,this}endFill(){ce(tn,"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!==ol.defaultStrokeStyle.width||t.color!==ol.defaultStrokeStyle.color||t.alpha!==ol.defaultStrokeStyle.alpha)&&this.context.stroke(),this}drawCircle(...t){return ce(tn,"Graphics#drawCircle has been renamed to Graphics#circle"),this._callContextMethod("circle",t)}drawEllipse(...t){return ce(tn,"Graphics#drawEllipse has been renamed to Graphics#ellipse"),this._callContextMethod("ellipse",t)}drawPolygon(...t){return ce(tn,"Graphics#drawPolygon has been renamed to Graphics#poly"),this._callContextMethod("poly",t)}drawRect(...t){return ce(tn,"Graphics#drawRect has been renamed to Graphics#rect"),this._callContextMethod("rect",t)}drawRoundedRect(...t){return ce(tn,"Graphics#drawRoundedRect has been renamed to Graphics#roundRect"),this._callContextMethod("roundRect",t)}drawStar(...t){return ce(tn,"Graphics#drawStar has been renamed to Graphics#star"),this._callContextMethod("star",t)}}class e3 extends Mg{constructor(t,n){const{text:s,resolution:o,style:f,anchor:d,width:m,height:g,roundPixels:v,...S}=t;super({...S}),this.batched=!0,this._resolution=null,this._autoResolution=!0,this._didTextUpdate=!0,this._styleClass=n,this.text=s??"",this.style=f,this.resolution=o??null,this.allowChildren=!1,this._anchor=new Vn({_onUpdate:()=>{this.onViewUpdate()}}),d&&(this.anchor=d),this.roundPixels=v??!1,m!==void 0&&(this.width=m),g!==void 0&&(this.height=g)}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 n;t||(t={}),(n=this._style)==null||n.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,n){typeof t=="object"?(n=t.height??t.width,t=t.width):n??(n=t),t!==void 0&&this._setWidth(t,this.bounds.width),n!==void 0&&this._setHeight(n,this.bounds.height)}containsPoint(t){const n=this.bounds.width,s=this.bounds.height,o=-n*this.anchor.x;let f=0;return t.x>=o&&t.x<=o+n&&(f=-s*this.anchor.y,t.y>=f&&t.y<=f+s)}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 n3(i,t){let n=i[0]??{};return(typeof n=="string"||i[1])&&(ce(tn,`use new ${t}({ text: "hi!", style }) instead`),n={text:n,style:i[1]}),n}class a3{constructor(t){this._canvasPool=Object.create(null),this.canvasOptions=t||{},this.enableFullScreen=!1}_createCanvasAndContext(t,n){const s=si.get().createCanvas();s.width=t,s.height=n;const o=s.getContext("2d");return{canvas:s,context:o}}getOptimalCanvasAndContext(t,n,s=1){t=Math.ceil(t*s-1e-6),n=Math.ceil(n*s-1e-6),t=Ac(t),n=Ac(n);const o=(t<<17)+(n<<1);this._canvasPool[o]||(this._canvasPool[o]=[]);let f=this._canvasPool[o].pop();return f||(f=this._createCanvasAndContext(t,n)),f}returnCanvasAndContext(t){const n=t.canvas,{width:s,height:o}=n,f=(s<<17)+(o<<1);t.context.resetTransform(),t.context.clearRect(0,0,s,o),this._canvasPool[f].push(t)}clear(){this._canvasPool={}}}const hg=new a3;Qh.register(hg);let Yr=null,Gs=null;function i3(i,t){Yr||(Yr=si.get().createCanvas(256,128),Gs=Yr.getContext("2d",{willReadFrequently:!0}),Gs.globalCompositeOperation="copy",Gs.globalAlpha=1),(Yr.width<i||Yr.height<t)&&(Yr.width=Ac(i),Yr.height=Ac(t))}function g1(i,t,n){for(let s=0,o=4*n*t;s<t;++s,o+=4)if(i[o+3]!==0)return!1;return!0}function v1(i,t,n,s,o){const f=4*t;for(let d=s,m=s*f+4*n;d<=o;++d,m+=f)if(i[m+3]!==0)return!1;return!0}function l3(...i){let t=i[0];t.canvas||(t={canvas:i[0],resolution:i[1]});const{canvas:n}=t,s=Math.min(t.resolution??1,1),o=t.width??n.width,f=t.height??n.height;let d=t.output;if(i3(o,f),!Gs)throw new TypeError("Failed to get canvas 2D context");Gs.drawImage(n,0,0,o,f,0,0,o*s,f*s);const g=Gs.getImageData(0,0,o,f).data;let v=0,S=0,b=o-1,A=f-1;for(;S<f&&g1(g,o,S);)++S;if(S===f)return un.EMPTY;for(;g1(g,o,A);)--A;for(;v1(g,o,v,S,A);)++v;for(;v1(g,o,b,S,A);)--b;return++b,++A,Gs.globalCompositeOperation="source-over",Gs.strokeRect(v,S,b-v,A-S),Gs.globalCompositeOperation="copy",d??(d=new un),d.set(v/s,S/s,(b-v)/s,(A-S)/s),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 s3{constructor(t=0,n=0,s=!1){this.first=null,this.items=Object.create(null),this.last=null,this.max=t,this.resetTtl=s,this.size=0,this.ttl=n}clear(){return this.first=null,this.items=Object.create(null),this.last=null,this.size=0,this}delete(t){if(this.has(t)){const n=this.items[t];delete this.items[t],this.size--,n.prev!==null&&(n.prev.next=n.next),n.next!==null&&(n.next.prev=n.prev),this.first===n&&(this.first=n.next),this.last===n&&(this.last=n.prev)}return this}entries(t=this.keys()){const n=new Array(t.length);for(let s=0;s<t.length;s++){const o=t[s];n[s]=[o,this.get(o)]}return n}evict(t=!1){if(t||this.size>0){const n=this.first;delete this.items[n.key],--this.size===0?(this.first=null,this.last=null):(this.first=n.next,this.first.prev=null)}return this}expiresAt(t){let n;return this.has(t)&&(n=this.items[t].expiry),n}get(t){const n=this.items[t];if(n!==void 0){if(this.ttl>0&&n.expiry<=Date.now()){this.delete(t);return}return this.moveToEnd(n),n.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 n=this.first,s=0;for(;n!==null;)t[s++]=n.key,n=n.next;return t}setWithEvicted(t,n,s=this.resetTtl){let o=null;if(this.has(t))this.set(t,n,!0,s);else{this.max>0&&this.size===this.max&&(o={...this.first},this.evict(!0));let f=this.items[t]={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:n};++this.size===1?this.first=f:this.last.next=f,this.last=f}return o}set(t,n,s=!1,o=this.resetTtl){let f=this.items[t];return s||f!==void 0?(f.value=n,s===!1&&o&&(f.expiry=this.ttl>0?Date.now()+this.ttl:this.ttl),this.moveToEnd(f)):(this.max>0&&this.size===this.max&&this.evict(!0),f=this.items[t]={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:n},++this.size===1?this.first=f:this.last.next=f,this.last=f),this}values(t=this.keys()){const n=new Array(t.length);for(let s=0;s<t.length;s++)n[s]=this.get(t[s]);return n}}function u3(i=1e3,t=0,n=!1){if(isNaN(i)||i<0)throw new TypeError("Invalid max value");if(isNaN(t)||t<0)throw new TypeError("Invalid ttl value");if(typeof n!="boolean")throw new TypeError("Invalid resetTtl value");return new s3(i,t,n)}function E_(i){return!!i.tagStyles&&Object.keys(i.tagStyles).length>0}function C_(i){return i.includes("<")}function r3(i,t){return i.clone().assign(t)}function o3(i,t){const n=[],s=t.tagStyles;if(!E_(t)||!C_(i))return n.push({text:i,style:t}),n;const o=[t],f=[];let d="",m=0;for(;m<i.length;){const g=i[m];if(g==="<"){const v=i.indexOf(">",m);if(v===-1){d+=g,m++;continue}const S=i.slice(m+1,v);if(S.startsWith("/")){const b=S.slice(1).trim();if(f.length>0&&f[f.length-1]===b){d.length>0&&(n.push({text:d,style:o[o.length-1]}),d=""),o.pop(),f.pop(),m=v+1;continue}else{d+=i.slice(m,v+1),m=v+1;continue}}else{const b=S.trim();if(s[b]){d.length>0&&(n.push({text:d,style:o[o.length-1]}),d="");const A=o[o.length-1],E=r3(A,s[b]);o.push(E),f.push(b),m=v+1;continue}else{d+=i.slice(m,v+1),m=v+1;continue}}}else d+=g,m++}return d.length>0&&n.push({text:d,style:o[o.length-1]}),n}const c3=[10,13],f3=new Set(c3),h3=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288],d3=new Set(h3),m3=[9,32];new Set(m3);const p3=[45,8208,8211,8212,173],y3=new Set(p3),g3=/(\r\n|\r|\n)/,v3=/(?:\r\n|\r|\n)/;function tp(i){return typeof i!="string"?!1:f3.has(i.charCodeAt(0))}function Ui(i,t){return typeof i!="string"?!1:d3.has(i.charCodeAt(0))}function x3(i){return typeof i!="string"?!1:y3.has(i.charCodeAt(0))}function A_(i){return i==="normal"||i==="pre-line"}function M_(i){return i==="normal"}function Hs(i){if(typeof i!="string")return"";let t=i.length-1;for(;t>=0&&Ui(i[t]);)t--;return t<i.length-1?i.slice(0,t+1):i}function R_(i){const t=[],n=[];if(typeof i!="string")return t;for(let s=0;s<i.length;s++){const o=i[s],f=i[s+1];if(Ui(o)||tp(o)){n.length>0&&(t.push(n.join("")),n.length=0),o==="\r"&&f===`
|
|
305
|
+
`?(t.push(`\r
|
|
306
|
+
`),s++):t.push(o);continue}n.push(o),x3(o)&&f&&!Ui(f)&&!tp(f)&&(t.push(n.join("")),n.length=0)}return n.length>0&&t.push(n.join("")),t}function z_(i,t,n,s){const o=n(i),f=[];for(let d=0;d<o.length;d++){let m=o[d],g=m,v=1;for(;o[d+v];){const S=o[d+v];if(!s(g,S,i,d,t))m+=S,g=S,v++;else break}d+=v-1,f.push(m)}return f}const _3=/\r\n|\r|\n/g;function S3(i,t,n,s,o,f,d,m){var Dt,w;const g=o3(i,t);if(M_(t.whiteSpace))for(let H=0;H<g.length;H++){const at=g[H];g[H]={text:at.text.replace(_3," "),style:at.style}}const S=[];let b=[];for(const H of g){const at=H.text.split(g3);for(let et=0;et<at.length;et++){const ft=at[et];ft===`\r
|
|
307
|
+
`||ft==="\r"||ft===`
|
|
308
|
+
`?(S.push(b),b=[]):ft.length>0&&b.push({text:ft,style:H.style})}}(b.length>0||S.length===0)&&S.push(b);const A=n?b3(S,t,s,o,d,m):S,E=[],z=[],M=[],R=[],O=[];let B=0;const U=t._fontString,G=f(U);G.fontSize===0&&(G.fontSize=t.fontSize,G.ascent=t.fontSize);let Z="",Q=!!t.dropShadow,K=((Dt=t._stroke)==null?void 0:Dt.width)||0;for(const H of A){let at=0,et=G.ascent,ft=G.descent,j="";for(const st of H){const pt=st.style._fontString,Tt=f(pt);pt!==Z&&(s.font=pt,Z=pt);const Ot=o(st.text,st.style.letterSpacing,s);at+=Ot,et=Math.max(et,Tt.ascent),ft=Math.max(ft,Tt.descent),j+=st.text;const Ut=((w=st.style._stroke)==null?void 0:w.width)||0;Ut>K&&(K=Ut),!Q&&st.style.dropShadow&&(Q=!0)}H.length===0&&(et=G.ascent,ft=G.descent),E.push(at),z.push(et),M.push(ft),O.push(j);const I=t.lineHeight||et+ft;R.push(I+t.leading),B=Math.max(B,at)}const gt=K,dt=(n&&t.align!=="left"?Math.max(B,t.wordWrapWidth):B)+gt+(t.dropShadow?t.dropShadow.distance:0);let vt=0;for(let H=0;H<R.length;H++)vt+=R[H];vt=Math.max(vt,R[0]+gt);const _t=vt+(t.dropShadow?t.dropShadow.distance:0),xt=t.lineHeight||G.fontSize;return{width:dt,height:_t,lines:O,lineWidths:E,lineHeight:xt+t.leading,maxLineWidth:B,fontProperties:G,runsByLine:A,lineAscents:z,lineDescents:M,lineHeights:R,hasDropShadow:Q}}function b3(i,t,n,s,o,f){var R;const{letterSpacing:d,whiteSpace:m,wordWrapWidth:g,breakWords:v}=t,S=A_(m),b=g+d,A={};let E="";const z=(O,B)=>{const U=`${O}|${B.styleKey}`;let G=A[U];if(G===void 0){const Z=B._fontString;Z!==E&&(n.font=Z,E=Z),G=s(O,B.letterSpacing,n)+B.letterSpacing,A[U]=G}return G},M=[];for(const O of i){const B=T3(O),U=M.length,G=vt=>{let _t=0,xt=vt;do{const{token:Dt,style:w}=B[xt];_t+=z(Dt,w),xt++}while(xt<B.length&&B[xt].continuesFromPrevious);return _t},Z=vt=>{const _t=[];let xt=vt;do _t.push({token:B[xt].token,style:B[xt].style}),xt++;while(xt<B.length&&B[xt].continuesFromPrevious);return _t};let Q=[],K=0,gt=!S,ct=null;const ht=()=>{ct&&ct.text.length>0&&Q.push(ct),ct=null},dt=()=>{if(ht(),Q.length>0){const vt=Q[Q.length-1];vt.text=Hs(vt.text),vt.text.length===0&&Q.pop()}M.push(Q),Q=[],K=0,gt=!1};for(let vt=0;vt<B.length;vt++){const{token:_t,style:xt,continuesFromPrevious:Dt}=B[vt],w=z(_t,xt);if(S){const et=Ui(_t),ft=(ct==null?void 0:ct.text[ct.text.length-1])??((R=Q[Q.length-1])==null?void 0:R.text.slice(-1))??"",j=ft?Ui(ft):!1;if(et&&j)continue}const H=!Dt,at=H?G(vt):w;if(at>b&&H)if(K>0&&dt(),v){const et=Z(vt);for(let ft=0;ft<et.length;ft++){const j=et[ft].token,I=et[ft].style,st=z_(j,v,f,o);for(const pt of st){const Tt=z(pt,I);Tt+K>b&&dt(),!ct||ct.style!==I?(ht(),ct={text:pt,style:I}):ct.text+=pt,K+=Tt}}vt+=et.length-1}else{const et=Z(vt);ht(),M.push(et.map(ft=>({text:ft.token,style:ft.style}))),gt=!1,vt+=et.length-1}else if(at+K>b&&H){if(Ui(_t)){gt=!1;continue}dt(),ct={text:_t,style:xt},K=w}else if(Dt&&!v)!ct||ct.style!==xt?(ht(),ct={text:_t,style:xt}):ct.text+=_t,K+=w;else{const et=Ui(_t);if(K===0&&et&&!gt)continue;!ct||ct.style!==xt?(ht(),ct={text:_t,style:xt}):ct.text+=_t,K+=w}}if(ht(),Q.length>0){const vt=Q[Q.length-1];vt.text=Hs(vt.text),vt.text.length===0&&Q.pop()}(Q.length>0||M.length===U)&&M.push(Q)}return M}function T3(i){const t=[];let n=!1;for(const s of i){const o=R_(s.text);let f=!0;for(const d of o){const m=Ui(d)||tp(d),g=f&&n&&!m;t.push({token:d,style:s.style,continuesFromPrevious:g}),n=!m,f=!1}}return t}const E3={willReadFrequently:!0};function x1(i,t,n,s,o){let f=n[i];return typeof f!="number"&&(f=o(i,t,s)+t,n[i]=f),f}function C3(i,t,n,s,o,f,d){const m=n.getContext("2d",E3);m.font=t._fontString;let g=0,v="";const S=[],b=Object.create(null),{letterSpacing:A,whiteSpace:E}=t,z=A_(E),M=M_(E);let R=!z;const O=t.wordWrapWidth+A,B=R_(i);for(let G=0;G<B.length;G++){let Z=B[G];if(tp(Z)){if(!M){S.push(Hs(v)),R=!z,v="",g=0;continue}Z=" "}if(z){const K=Ui(Z),gt=Ui(v[v.length-1]);if(K&>)continue}const Q=x1(Z,A,b,m,s);if(Q>O)if(v!==""&&(S.push(Hs(v)),v="",g=0),o(Z,t.breakWords)){const K=z_(Z,t.breakWords,d,f);for(const gt of K){const ct=x1(gt,A,b,m,s);ct+g>O&&(S.push(Hs(v)),R=!1,v="",g=0),v+=gt,g+=ct}}else v.length>0&&(S.push(Hs(v)),v="",g=0),S.push(Hs(Z)),R=!1,v="",g=0;else Q+g>O&&(R=!1,S.push(Hs(v)),v="",g=0),(v.length>0||!Ui(Z)||R)&&(v+=Z,g+=Q)}const U=Hs(v);return U.length>0&&S.push(U),S.join(`
|
|
309
|
+
`)}const _1={willReadFrequently:!0},Vs=class jt{static get experimentalLetterSpacingSupported(){let t=jt._experimentalLetterSpacingSupported;if(t===void 0){const n=si.get().getCanvasRenderingContext2D().prototype;t=jt._experimentalLetterSpacingSupported="letterSpacing"in n||"textLetterSpacing"in n}return t}constructor(t,n,s,o,f,d,m,g,v,S){this.text=t,this.style=n,this.width=s,this.height=o,this.lines=f,this.lineWidths=d,this.lineHeight=m,this.maxLineWidth=g,this.fontProperties=v,S&&(this.runsByLine=S.runsByLine,this.lineAscents=S.lineAscents,this.lineDescents=S.lineDescents,this.lineHeights=S.lineHeights,this.hasDropShadow=S.hasDropShadow)}static measureText(t=" ",n,s=jt._canvas,o=n.wordWrap){var Z;const f=`${t}-${n.styleKey}-wordWrap-${o}`;if(jt._measurementCache.has(f))return jt._measurementCache.get(f);if(E_(n)&&C_(t)){const Q=S3(t,n,o,jt._context,jt._measureText,jt.measureFont,jt.canBreakChars,jt.wordWrapSplit),K=new jt(t,n,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 jt._measurementCache.set(f,K),K}const m=n._fontString,g=jt.measureFont(m);g.fontSize===0&&(g.fontSize=n.fontSize,g.ascent=n.fontSize,g.descent=0);const v=jt._context;v.font=m;const b=(o?jt._wordWrap(t,n,s):t).split(v3),A=new Array(b.length);let E=0;for(let Q=0;Q<b.length;Q++){const K=jt._measureText(b[Q],n.letterSpacing,v);A[Q]=K,E=Math.max(E,K)}const z=((Z=n._stroke)==null?void 0:Z.width)??0,M=n.lineHeight||g.fontSize,R=jt._getAlignWidth(E,n,o),O=jt._adjustWidthForStyle(R,n),B=Math.max(M,g.fontSize+z)+(b.length-1)*(M+n.leading),U=jt._adjustHeightForStyle(B,n),G=new jt(t,n,O,U,b,A,M+n.leading,E,g);return jt._measurementCache.set(f,G),G}static _adjustWidthForStyle(t,n){var f;const s=((f=n._stroke)==null?void 0:f.width)||0;let o=t+s;return n.dropShadow&&(o+=n.dropShadow.distance),o}static _adjustHeightForStyle(t,n){let s=t;return n.dropShadow&&(s+=n.dropShadow.distance),s}static _getAlignWidth(t,n,s){return s&&n.align!=="left"?Math.max(t,n.wordWrapWidth):t}static _measureText(t,n,s){let o=!1;jt.experimentalLetterSpacingSupported&&(jt.experimentalLetterSpacing?(s.letterSpacing=`${n}px`,s.textLetterSpacing=`${n}px`,o=!0):(s.letterSpacing="0px",s.textLetterSpacing="0px"));const f=s.measureText(t);let d=f.width;const m=-(f.actualBoundingBoxLeft??0);let v=(f.actualBoundingBoxRight??0)-m;if(d>0)if(o)d-=n,v-=n;else{const S=(jt.graphemeSegmenter(t).length-1)*n;d+=S,v+=S}return Math.max(d,v)}static _wordWrap(t,n,s=jt._canvas){return C3(t,n,s,jt._measureText,jt.canBreakWords,jt.canBreakChars,jt.wordWrapSplit)}static isBreakingSpace(t,n){return Ui(t)}static canBreakWords(t,n){return n}static canBreakChars(t,n,s,o,f){return!0}static wordWrapSplit(t){return jt.graphemeSegmenter(t)}static measureFont(t){if(jt._fonts[t])return jt._fonts[t];const n=jt._context;n.font=t;const s=n.measureText(jt.METRICS_STRING+jt.BASELINE_SYMBOL),o=s.actualBoundingBoxAscent??0,f=s.actualBoundingBoxDescent??0,d={ascent:o,descent:f,fontSize:o+f};return jt._fonts[t]=d,d}static clearMetrics(t=""){t?delete jt._fonts[t]:jt._fonts={}}static get _canvas(){if(!jt.__canvas){let t;try{const n=new OffscreenCanvas(0,0),s=n.getContext("2d",_1);if(s!=null&&s.measureText)return jt.__canvas=n,n;t=si.get().createCanvas()}catch{t=si.get().createCanvas()}t.width=t.height=10,jt.__canvas=t}return jt.__canvas}static get _context(){return jt.__context||(jt.__context=jt._canvas.getContext("2d",_1)),jt.__context}};Vs.METRICS_STRING="|ÉqÅ";Vs.BASELINE_SYMBOL="M";Vs.BASELINE_MULTIPLIER=1.4;Vs.HEIGHT_MULTIPLIER=2;Vs.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const i=new Intl.Segmenter;return t=>{const n=i.segment(t),s=[];let o=0;for(const f of n)s[o++]=f.segment;return s}}return i=>[...i]})();Vs.experimentalLetterSpacing=!1;Vs._fonts={};Vs._measurementCache=u3(1e3);let wu=Vs;const A3=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function dg(i){const t=typeof i.fontSize=="number"?`${i.fontSize}px`:i.fontSize;let n=i.fontFamily;Array.isArray(i.fontFamily)||(n=i.fontFamily.split(","));for(let s=n.length-1;s>=0;s--){let o=n[s].trim();!/([\"\'])[^\'\"]+\1/.test(o)&&!A3.includes(o)&&(o=`"${o}"`),n[s]=o}return`${i.fontStyle} ${i.fontVariant} ${i.fontWeight} ${t} ${n.join(",")}`}const S1=1e5;function Lm(i,t,n,s=0,o=0,f=0){if(i.texture===Ee.WHITE&&!i.fill)return Sn.shared.setValue(i.color).setAlpha(i.alpha??1).toHexa();if(i.fill){if(i.fill instanceof mp){const d=i.fill,m=t.createPattern(d.texture.source.resource,"repeat"),g=d.transform.copyTo(ne.shared);return g.scale(d.texture.source.pixelWidth,d.texture.source.pixelHeight),m.setTransform(g),m}else if(i.fill instanceof Xs){const d=i.fill,m=d.type==="linear",g=d.textureSpace==="local";let v=1,S=1;g&&n&&(v=n.width+s,S=n.height+s);let b,A=!1;if(m){const{start:E,end:z}=d;b=t.createLinearGradient(E.x*v+o,E.y*S+f,z.x*v+o,z.y*S+f),A=Math.abs(z.x-E.x)<Math.abs((z.y-E.y)*.1)}else{const{center:E,innerRadius:z,outerCenter:M,outerRadius:R}=d;b=t.createRadialGradient(E.x*v+o,E.y*S+f,z*v,M.x*v+o,M.y*S+f,R*v)}if(A&&g&&n){const E=n.lineHeight/S;for(let z=0;z<n.lines.length;z++){const M=(z*n.lineHeight+s/2)/S;d.colorStops.forEach(R=>{let O=M+R.offset*E;O=Math.max(0,Math.min(1,O)),b.addColorStop(Math.floor(O*S1)/S1,Sn.shared.setValue(R.color).toHex())})}}else d.colorStops.forEach(E=>{b.addColorStop(E.offset,Sn.shared.setValue(E.color).toHex())});return b}}else{const d=t.createPattern(i.texture.source.resource,"repeat"),m=i.matrix.copyTo(ne.shared);return m.scale(i.texture.source.pixelWidth,i.texture.source.pixelHeight),d.setTransform(m),d}return Da("FillStyle not recognised",i),"red"}const b1=new un;function gc(i){let t=0;for(let n=0;n<i.length;n++)i.charCodeAt(n)===32&&t++;return t}class M3{getCanvasAndContext(t){const{text:n,style:s,resolution:o=1}=t,f=s._getFinalPadding(),d=wu.measureText(n||" ",s),m=Math.ceil(Math.ceil(Math.max(1,d.width)+f*2)*o),g=Math.ceil(Math.ceil(Math.max(1,d.height)+f*2)*o),v=hg.getOptimalCanvasAndContext(m,g);this._renderTextToCanvas(s,f,o,v,d);const S=s.trim?l3({canvas:v.canvas,width:m,height:g,resolution:1,output:b1}):b1.set(0,0,m,g);return{canvasAndContext:v,frame:S}}returnCanvasAndContext(t){hg.returnCanvasAndContext(t)}_renderTextToCanvas(t,n,s,o,f){var Q,K,gt;if(f.runsByLine&&f.runsByLine.length>0){this._renderTaggedTextToCanvas(f,t,n,s,o);return}const{canvas:d,context:m}=o,g=dg(t),v=f.lines,S=f.lineHeight,b=f.lineWidths,A=f.maxLineWidth,E=f.fontProperties,z=d.height;if(m.resetTransform(),m.scale(s,s),m.textBaseline=t.textBaseline,(Q=t._stroke)!=null&&Q.width){const ct=t._stroke;m.lineWidth=ct.width,m.miterLimit=ct.miterLimit,m.lineJoin=ct.join,m.lineCap=ct.cap}m.font=g;let M,R;const O=t.dropShadow?2:1,B=t.wordWrap?t.wordWrapWidth:A,G=(((K=t._stroke)==null?void 0:K.width)??0)/2;let Z=(S-E.fontSize)/2;S-E.fontSize<0&&(Z=0);for(let ct=0;ct<O;++ct){const ht=t.dropShadow&&ct===0,dt=ht?Math.ceil(Math.max(1,z)+n*2):0,vt=dt*s;if(ht)this._setupDropShadow(m,t,s,vt);else{const _t=t._gradientBounds,xt=t._gradientOffset;if(_t){const Dt={width:_t.width,height:_t.height,lineHeight:_t.height,lines:f.lines};this._setFillAndStrokeStyles(m,t,Dt,n,G,(xt==null?void 0:xt.x)??0,(xt==null?void 0:xt.y)??0)}else xt?this._setFillAndStrokeStyles(m,t,f,n,G,xt.x,xt.y):this._setFillAndStrokeStyles(m,t,f,n,G);m.shadowColor="rgba(0,0,0,0)"}for(let _t=0;_t<v.length;_t++){M=G,R=G+_t*S+E.ascent+Z,M+=this._getAlignmentOffset(b[_t],B,t.align);let xt=0;if(t.align==="justify"&&t.wordWrap&&_t<v.length-1){const Dt=gc(v[_t]);Dt>0&&(xt=(B-b[_t])/Dt)}(gt=t._stroke)!=null&>.width&&this._drawLetterSpacing(v[_t],t,o,M+n,R+n-dt,!0,xt),t._fill!==void 0&&this._drawLetterSpacing(v[_t],t,o,M+n,R+n-dt,!1,xt)}}}_renderTaggedTextToCanvas(t,n,s,o,f){var G,Z,Q;const{canvas:d,context:m}=f,{runsByLine:g,lineWidths:v,maxLineWidth:S,lineAscents:b,lineHeights:A,hasDropShadow:E}=t,z=d.height;m.resetTransform(),m.scale(o,o),m.textBaseline=n.textBaseline;const M=E?2:1,R=n.wordWrap?n.wordWrapWidth:S;let O=((G=n._stroke)==null?void 0:G.width)??0;for(const K of g)for(const gt of K){const ct=((Z=gt.style._stroke)==null?void 0:Z.width)??0;ct>O&&(O=ct)}const B=O/2,U=[];for(let K=0;K<g.length;K++){const gt=g[K],ct=[];for(const ht of gt){const dt=dg(ht.style);m.font=dt,ct.push({width:wu._measureText(ht.text,ht.style.letterSpacing,m),font:dt})}U.push(ct)}for(let K=0;K<M;++K){const gt=E&&K===0,ct=gt?Math.ceil(Math.max(1,z)+s*2):0,ht=ct*o;gt||(m.shadowColor="rgba(0,0,0,0)");let dt=B;for(let vt=0;vt<g.length;vt++){const _t=g[vt],xt=v[vt],Dt=b[vt],w=A[vt],H=U[vt];let at=B;at+=this._getAlignmentOffset(xt,R,n.align);let et=0;if(n.align==="justify"&&n.wordWrap&&vt<g.length-1){let I=0;for(const st of _t)I+=gc(st.text);I>0&&(et=(R-xt)/I)}const ft=dt+Dt;let j=at+s;for(let I=0;I<_t.length;I++){const st=_t[I],{width:pt,font:Tt}=H[I];if(m.font=Tt,m.textBaseline=st.style.textBaseline,(Q=st.style._stroke)!=null&&Q.width){const Ut=st.style._stroke;if(m.lineWidth=Ut.width,m.miterLimit=Ut.miterLimit,m.lineJoin=Ut.join,m.lineCap=Ut.cap,gt)if(st.style.dropShadow)this._setupDropShadow(m,st.style,o,ht);else{const re=gc(st.text);j+=pt+re*et;continue}else{const re=wu.measureFont(Tt),ue=st.style.lineHeight||re.fontSize,ra={width:pt,height:ue,lineHeight:ue,lines:[st.text]};m.strokeStyle=Lm(Ut,m,ra,s*2,j-s,dt)}this._drawLetterSpacing(st.text,st.style,f,j,ft+s-ct,!0,et)}const Ot=gc(st.text);j+=pt+Ot*et}j=at+s;for(let I=0;I<_t.length;I++){const st=_t[I],{width:pt,font:Tt}=H[I];if(m.font=Tt,m.textBaseline=st.style.textBaseline,st.style._fill!==void 0){if(gt)if(st.style.dropShadow)this._setupDropShadow(m,st.style,o,ht);else{const Ut=gc(st.text);j+=pt+Ut*et;continue}else{const Ut=wu.measureFont(Tt),re=st.style.lineHeight||Ut.fontSize,ue={width:pt,height:re,lineHeight:re,lines:[st.text]};m.fillStyle=Lm(st.style._fill,m,ue,s*2,j-s,dt)}this._drawLetterSpacing(st.text,st.style,f,j,ft+s-ct,!1,et)}const Ot=gc(st.text);j+=pt+Ot*et}dt+=w}}}_setFillAndStrokeStyles(t,n,s,o,f,d=0,m=0){var g;if(t.fillStyle=n._fill?Lm(n._fill,t,s,o*2,d,m):null,(g=n._stroke)!=null&&g.width){const v=f+o*2;t.strokeStyle=Lm(n._stroke,t,s,v,d,m)}}_setupDropShadow(t,n,s,o){t.fillStyle="black",t.strokeStyle="black";const f=n.dropShadow,d=f.color,m=f.alpha;t.shadowColor=Sn.shared.setValue(d).setAlpha(m).toRgbaString();const g=f.blur*s,v=f.distance*s;t.shadowBlur=g,t.shadowOffsetX=Math.cos(f.angle)*v,t.shadowOffsetY=Math.sin(f.angle)*v+o}_getAlignmentOffset(t,n,s){return s==="right"?n-t:s==="center"?(n-t)/2:0}_drawLetterSpacing(t,n,s,o,f,d=!1,m=0){const{context:g}=s,v=n.letterSpacing;let S=!1;if(wu.experimentalLetterSpacingSupported&&(wu.experimentalLetterSpacing?(g.letterSpacing=`${v}px`,g.textLetterSpacing=`${v}px`,S=!0):(g.letterSpacing="0px",g.textLetterSpacing="0px")),(v===0||S)&&m===0){d?g.strokeText(t,o,f):g.fillText(t,o,f);return}if(m!==0&&(v===0||S)){const M=t.split(" ");let R=o;const O=g.measureText(" ").width;for(let B=0;B<M.length;B++)d?g.strokeText(M[B],R,f):g.fillText(M[B],R,f),R+=g.measureText(M[B]).width+O+m;return}let b=o;const A=wu.graphemeSegmenter(t);let E=g.measureText(t).width,z=0;for(let M=0;M<A.length;++M){const R=A[M];d?g.strokeText(R,b,f):g.fillText(R,b,f);let O="";for(let B=M+1;B<A.length;++B)O+=A[B];z=g.measureText(O).width,b+=E-z+v,R===" "&&(b+=m),E=z}}}const Tc=new M3,Lg=class Kr extends $l{constructor(t={}){super(),this.uid=en("textStyle"),this._tick=0,this._cachedFontString=null,R3(t),t instanceof Kr&&(t=t._toObject());const o={...Kr.defaultTextStyle,...t};for(const f in o){const d=f;this[d]=o[f]}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({...Kr.defaultDropShadow,...t}):this._dropShadow=t?this._createProxy({...Kr.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({...ol.defaultFillStyle,...t},()=>{this._fill=kr({...this._originalFill},ol.defaultFillStyle)})),this._fill=kr(t===0?"black":t,ol.defaultFillStyle),this.update())}get stroke(){return this._originalStroke}set stroke(t){t!==this._originalStroke&&(this._originalStroke=t,this._isFillStyle(t)&&(this._originalStroke=this._createProxy({...ol.defaultStrokeStyle,...t},()=>{this._stroke=$m({...this._originalStroke},ol.defaultStrokeStyle)})),this._stroke=$m(t,ol.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=Kr.defaultTextStyle;for(const n in t)this[n]=t[n]}assign(t){for(const n in t){const s=n;this[s]=t[n]}return this}get styleKey(){return`${this.uid}-${this._tick}`}get _fontString(){return this._cachedFontString===null&&(this._cachedFontString=dg(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 Kr(this._toObject())}_getFinalPadding(){let t=0;if(this._filters)for(let n=0;n<this._filters.length;n++)t+=this._filters[n].padding;return Math.max(this._padding,t)}destroy(t=!1){var s,o,f,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;(s=this._fill)!=null&&s.texture&&this._fill.texture.destroy(m),(o=this._originalFill)!=null&&o.texture&&this._originalFill.texture.destroy(m),(f=this._stroke)!=null&&f.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,n){return new Proxy(t,{set:(s,o,f)=>(s[o]===f||(s[o]=f,n==null||n(o,f),this.update()),!0)})}_isFillStyle(t){return(t??null)!==null&&!(Sn.isColorLike(t)||t instanceof Xs||t instanceof mp)}};Lg.defaultDropShadow={alpha:1,angle:Math.PI/6,blur:0,color:"black",distance:5};Lg.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 Pr=Lg;function R3(i){const t=i;if(typeof t.dropShadow=="boolean"&&t.dropShadow){const n=Pr.defaultDropShadow;i.dropShadow={alpha:t.dropShadowAlpha??n.alpha,angle:t.dropShadowAngle??n.angle,blur:t.dropShadowBlur??n.blur,color:t.dropShadowColor??n.color,distance:t.dropShadowDistance??n.distance}}if(t.strokeThickness!==void 0){ce(tn,"strokeThickness is now a part of stroke");const n=t.stroke;let s={};if(Sn.isColorLike(n))s.color=n;else if(n instanceof Xs||n instanceof mp)s.fill=n;else if(Object.hasOwnProperty.call(n,"color")||Object.hasOwnProperty.call(n,"fill"))s=n;else throw new Error("Invalid stroke value.");i.stroke={...s,width:t.strokeThickness}}if(Array.isArray(t.fillGradientStops)){if(ce(tn,"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&&Da("The number of fill colors must match the number of fill gradient stops.");const n=new Xs({start:{x:0,y:0},end:{x:0,y:1},textureSpace:"local"}),s=t.fillGradientStops.slice(),o=t.fill.map(f=>Sn.shared.setValue(f).toNumber());s.forEach((f,d)=>{n.addColorStop(f,o[d])}),i.fill={fill:n}}}function z3(i,t){const{texture:n,bounds:s}=i,o=t._style._getFinalPadding();px(s,t._anchor,n);const f=t._anchor._x*o*2,d=t._anchor._y*o*2;s.minX-=o-f,s.minY-=o-d,s.maxX-=o-f,s.maxY-=o-d}class D3{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 O3 extends D3{}class D_{constructor(t){this._renderer=t,t.runners.resolutionChange.add(this),this._managedTexts=new Kh({renderer:t,type:"renderable",onUnload:this.onTextUnload.bind(this),name:"canvasText"})}resolutionChange(){for(const t in this._managedTexts.items){const n=this._managedTexts.items[t];n!=null&&n._autoResolution&&n.onViewUpdate()}}validateRenderable(t){const n=this._getGpuText(t),s=t.styleKey;return n.currentKey!==s?!0:t._didTextUpdate}addRenderable(t,n){const s=this._getGpuText(t);if(t._didTextUpdate){const o=t._autoResolution?this._renderer.resolution:t.resolution;(s.currentKey!==t.styleKey||t._resolution!==o)&&this._updateGpuText(t),t._didTextUpdate=!1,z3(s,t)}this._renderer.renderPipes.batch.addToBatch(s,n)}updateRenderable(t){const n=this._getGpuText(t);n._batcher.updateElement(n)}_updateGpuText(t){const n=this._getGpuText(t);n.texture&&this._renderer.canvasText.decreaseReferenceCount(n.currentKey),t._resolution=t._autoResolution?this._renderer.resolution:t.resolution,n.texture=this._renderer.canvasText.getManagedTexture(t),n.currentKey=t.styleKey}_getGpuText(t){return t._gpuData[this._renderer.uid]||this.initGpuText(t)}initGpuText(t){const n=new O3;return n.currentKey="--",n.renderable=t,n.transform=t.groupTransform,n.bounds={minX:0,maxX:1,minY:0,maxY:0},n.roundPixels=this._renderer._roundPixels|t._roundPixels,t._gpuData[this._renderer.uid]=n,this._managedTexts.add(t),n}onTextUnload(t){const n=t._gpuData[this._renderer.uid];if(!n)return;const{canvasText:s}=this._renderer;s.getReferenceCount(n.currentKey)>0?s.decreaseReferenceCount(n.currentKey):n.texture&&s.returnTexture(n.texture)}destroy(){this._managedTexts.destroy(),this._renderer=null}}D_.extension={type:[kt.WebGLPipes,kt.WebGPUPipes,kt.CanvasPipes],name:"text"};const N3=new Bi;function U3(i,t,n,s,o=!1){const f=N3;f.minX=0,f.minY=0,f.maxX=i.width/s|0,f.maxY=i.height/s|0;const d=cp.getOptimalTexture(f.width,f.height,s,!1,o);return d.source.uploadMethodId="image",d.source.resource=i,d.source.alphaMode="premultiply-alpha-on-upload",d.frame.width=t/s,d.frame.height=n/s,d.source.emit("update",d.source),d.updateUvs(),d}class O_{constructor(t,n){this._activeTextures={},this._renderer=t,this._retainCanvasContext=n}getTexture(t,n,s,o){typeof t=="string"&&(ce("8.0.0","CanvasTextSystem.getTexture: Use object TextOptions instead of separate arguments"),t={text:t,style:s,resolution:n}),t.style instanceof Pr||(t.style=new Pr(t.style)),t.textureStyle instanceof Mc||(t.textureStyle=new Mc(t.textureStyle)),typeof t.text!="string"&&(t.text=t.text.toString());const{text:f,style:d,textureStyle:m,autoGenerateMipmaps:g}=t,v=t.resolution??this._renderer.resolution,{frame:S,canvasAndContext:b}=Tc.getCanvasAndContext({text:f,style:d,resolution:v}),A=U3(b.canvas,S.width,S.height,v,g);if(m&&(A.source.style=m),d.trim&&(S.pad(d.padding),A.frame.copyFrom(S),A.frame.scale(1/v),A.updateUvs()),d.filters){const E=this._applyFilters(A,d.filters);return this.returnTexture(A),Tc.returnCanvasAndContext(b),E}return this._renderer.texture.initSource(A._source),this._retainCanvasContext||Tc.returnCanvasAndContext(b),A}returnTexture(t){const n=t.source,s=n.resource;if(this._retainCanvasContext&&(s!=null&&s.getContext)){const o=s.getContext("2d");o&&Tc.returnCanvasAndContext({canvas:s,context:o})}n.resource=null,n.uploadMethodId="unknown",n.alphaMode="no-premultiply-alpha",cp.returnTexture(t,!0)}renderTextToCanvas(){ce("8.10.0","CanvasTextSystem.renderTextToCanvas: no longer supported, use CanvasTextSystem.getTexture instead")}getManagedTexture(t){t._resolution=t._autoResolution?this._renderer.resolution:t.resolution;const n=t.styleKey;if(this._activeTextures[n])return this._increaseReferenceCount(n),this._activeTextures[n].texture;const s=this.getTexture({text:t.text,style:t.style,resolution:t._resolution,textureStyle:t.textureStyle,autoGenerateMipmaps:t.autoGenerateMipmaps});return this._activeTextures[n]={texture:s,usageCount:1},s}decreaseReferenceCount(t){const n=this._activeTextures[t];n&&(n.usageCount--,n.usageCount===0&&(this.returnTexture(n.texture),this._activeTextures[t]=null))}getReferenceCount(t){var n;return((n=this._activeTextures[t])==null?void 0:n.usageCount)??0}_increaseReferenceCount(t){this._activeTextures[t].usageCount++}_applyFilters(t,n){const s=this._renderer.renderTarget.renderTarget,o=this._renderer.filter.generateFilteredTexture({texture:t,filters:n});return this._renderer.renderTarget.bind(s,!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 N_ extends O_{constructor(t){super(t,!0)}}N_.extension={type:[kt.CanvasSystem],name:"canvasText"};class U_ extends O_{constructor(t){super(t,!1)}}U_.extension={type:[kt.WebGLSystem,kt.WebGPUSystem],name:"canvasText"};ke.add(N_);ke.add(U_);ke.add(D_);class B_ extends e3{constructor(...t){const n=n3(t,"Text");super(n,Pr),this.renderPipeId="text",n.textureStyle&&(this.textureStyle=n.textureStyle instanceof Mc?n.textureStyle:new Mc(n.textureStyle)),this.autoGenerateMipmaps=n.autoGenerateMipmaps??wi.defaultOptions.autoGenerateMipmaps}updateBounds(){const t=this._bounds,n=this._anchor;let s=0,o=0;if(this._style.trim){const{frame:f,canvasAndContext:d}=Tc.getCanvasAndContext({text:this.text,style:this._style,resolution:1});Tc.returnCanvasAndContext(d),s=f.width,o=f.height}else{const f=wu.measureText(this._text,this._style);s=f.width,o=f.height}t.minX=-n._x*s,t.maxX=t.minX+s,t.minY=-n._y*o,t.maxY=t.minY+o}}ke.add(lT,sT);var wy={exports:{}},ws={};/**
|
|
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 T1;function B3(){return T1||(T1=1,ws.ConcurrentRoot=1,ws.ContinuousEventPriority=8,ws.DefaultEventPriority=32,ws.DiscreteEventPriority=2,ws.IdleEventPriority=268435456,ws.LegacyRoot=0,ws.NoEventPriority=0),ws}var E1;function w3(){return E1||(E1=1,wy.exports=B3()),wy.exports}var Ec=w3();const Xg=X.createContext({}),H3=Xg.Provider;Xg.Consumer;function w_(i,t){const n=Object.getPrototypeOf(i),s=Object.getOwnPropertyDescriptor(n,t);return!(typeof s>"u"||s.writable||s.set)}const Gu={currentUpdatePriority:Ec.DefaultEventPriority,unmountQueue:new Set};function C1(i,...t){}function H_(i,t={}){const n=i;return n.__pixireact=Object.assign({filters:[],parent:null,root:null,type:""},t),n}var G3="0.0.0-development",j3={version:G3};function q3(){}function G_(i,t,n){t instanceof Wr&&(t.__pixireact.parent=i,typeof n=="number"?i.__pixireact.filters.splice(n,0,t):i.__pixireact.filters.push(t),i.filters=i.__pixireact.filters)}function Hy(i,t){t&&(t instanceof ua?i.addChild(t):t instanceof Wr&&G_(i,t))}function Y3(){}function L3(){return!1}const mg=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"}),ep=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 j_(i){return Array.isArray(i)}function q_(i,t,n={arrays:"reference",objects:"reference",strict:!0}){const{arrays:s,objects:o,strict:f}=n;if(typeof i!=typeof t||!!i!=!!t)return!1;if(Z3(i)||V3(i))return i===t;const d=Q3(i);if(d&&o==="reference")return i===t;const m=j_(i);if(m&&s==="reference")return i===t;if((m||d)&&i===t)return!0;let g;for(g in i)if(!(g in t))return!1;let v=i;if(f&&(v=t),d&&s==="shallow"&&o==="shallow"){for(g in v)if(!q_(i[g],t[g],{strict:f,objects:"reference"}))return!1}else for(g in v)if(i[g]!==t[g])return!1;if(Y_(g)){if(m&&i.length===0&&t.length===0||d&&Object.keys(i).length===0&&Object.keys(t).length===0)return!0;if(i!==t)return!1}return!0}function X3(i){return i===null}function V3(i){return typeof i=="number"}function Q3(i){return!(i!==Object(i)||j_(i)||typeof i=="function")}function Z3(i){return typeof i=="string"}function Y_(i){return i===void 0}const K3=Object.freeze(["children","key","ref"]);function k3(i,t=[]){const n={};return Object.entries(i).reduce((s,[o,f])=>(t.includes(o)||(s[o]=f),s),n)}function pg(i,t=[]){return k3(i,K3.concat(t))}const J3="__default";function L_(i,t={},n=!1){const s=pg(i),o=pg(t),f=Object.entries(s),d=[];if(n){const m=Object.keys(o);let g=0;for(;g<m.length;){const v=m[g];!(v in s)&&f.unshift([v,`${J3}remove`]),g+=1}}return f.forEach(([m,g])=>{if(q_(g,o[m]))return;if(m in ep){d.push([m,g,!0,[]]);return}let v=[];m.includes("-")&&(v=m.split("-")),d.push([m,g,!1,v]);for(const S in s){const b=s[S];S.startsWith(`${m}-`)&&d.push([S,b,!1,S.split("-")])}}),{changes:d}}function P3(i){const t=i;return!(!t||!t.changes)}const W3="__default",A1=new Map,M1={};function R1(i,t){if(i){const n=i[t];if(!Y_(n)&&!X3(n))return n}return i}function X_(i,t){const{__pixireact:n={},...s}=i;let o;P3(t)?o=t:o=L_(t,s);const{changes:f}=o;let d=0;for(;d<f.length;){const m=f[d];let g=!1,v=m[0],S=m[1];const b=m[2],A=m[3];let E=i,z=E[v];if(v==="draw"&&typeof S=="function"&&(i instanceof fl?S(i):(g=!0,C1("warn",`The \`draw\` prop was used on a \`${n.type}\` component, but it's only valid on \`graphics\` components.`))),v in mg){const M=v;g=!0,M1[v]||(M1[v]=!0,C1("warn",`Event names must be pascal case; instead of \`${v}\`, you probably want \`${mg[M]}\`.`))}if(!g){if(A.length&&(z=A.reduce(R1,E),!(z&&z.set))){const[M,...R]=A.reverse();E=R.reverse().reduce(R1,E),v=M}if(S===`${W3}remove`)if(E instanceof ua){let M=A1.get(E.constructor);M||(M=E.constructor,M=new M,A1.set(E.constructor,M)),S=M[v]}else S=0;if(b&&n){const R=ep[v];S?E[R]=S:delete E[R]}else w_(E,v)||(E[v]=S)}d+=1}return i}function F3(i,t,n,s){const{children:o,...f}=s,{children:d,...m}=n,g=L_(f,m,!0);return g.changes.length?g:null}function I3(i,t,n,s){const o=F3(i,t,n,s);o&&X_(i,o)}const $3=Object.freeze([...Object.keys(mg),"draw"]),yg={};function tM(i){const t=i.charAt(0),n=i.substring(1);return`${t.toUpperCase()}${n}`}function eM(i,t){return t.toLowerCase()}function nM(i){let t=i;return i.startsWith("pixi")&&(t=i.replace(/^pixi([A-Z])/,eM)),t}function aM(i,t,n){const s=nM(i),o=tM(s);if(!(o in yg))throw new Error(`${o} is not part of the PIXI namespace! Did you forget to extend?`);const f=yg[o],d=pg(t,$3);Object.entries(t).forEach(([g,v])=>{if(g in ep){const S=ep[g];d[S]=v}});const m=H_(new f(d),{root:n,type:s});return X_(m,t),m}var Gy={exports:{}},jy={exports:{}},qy={exports:{}},Yy={};/**
|
|
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 z1;function iM(){return z1||(z1=1,(function(i){function t(w,H){var at=w.length;w.push(H);t:for(;0<at;){var et=at-1>>>1,ft=w[et];if(0<o(ft,H))w[et]=H,w[at]=ft,at=et;else break t}}function n(w){return w.length===0?null:w[0]}function s(w){if(w.length===0)return null;var H=w[0],at=w.pop();if(at!==H){w[0]=at;t:for(var et=0,ft=w.length,j=ft>>>1;et<j;){var I=2*(et+1)-1,st=w[I],pt=I+1,Tt=w[pt];if(0>o(st,at))pt<ft&&0>o(Tt,st)?(w[et]=Tt,w[pt]=at,et=pt):(w[et]=st,w[I]=at,et=I);else if(pt<ft&&0>o(Tt,at))w[et]=Tt,w[pt]=at,et=pt;else break t}}return H}function o(w,H){var at=w.sortIndex-H.sortIndex;return at!==0?at:w.id-H.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;i.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();i.unstable_now=function(){return d.now()-m}}var g=[],v=[],S=1,b=null,A=3,E=!1,z=!1,M=!1,R=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function U(w){for(var H=n(v);H!==null;){if(H.callback===null)s(v);else if(H.startTime<=w)s(v),H.sortIndex=H.expirationTime,t(g,H);else break;H=n(v)}}function G(w){if(M=!1,U(w),!z)if(n(g)!==null)z=!0,xt();else{var H=n(v);H!==null&&Dt(G,H.startTime-w)}}var Z=!1,Q=-1,K=5,gt=-1;function ct(){return!(i.unstable_now()-gt<K)}function ht(){if(Z){var w=i.unstable_now();gt=w;var H=!0;try{t:{z=!1,M&&(M=!1,O(Q),Q=-1),E=!0;var at=A;try{e:{for(U(w),b=n(g);b!==null&&!(b.expirationTime>w&&ct());){var et=b.callback;if(typeof et=="function"){b.callback=null,A=b.priorityLevel;var ft=et(b.expirationTime<=w);if(w=i.unstable_now(),typeof ft=="function"){b.callback=ft,U(w),H=!0;break e}b===n(g)&&s(g),U(w)}else s(g);b=n(g)}if(b!==null)H=!0;else{var j=n(v);j!==null&&Dt(G,j.startTime-w),H=!1}}break t}finally{b=null,A=at,E=!1}H=void 0}}finally{H?dt():Z=!1}}}var dt;if(typeof B=="function")dt=function(){B(ht)};else if(typeof MessageChannel<"u"){var vt=new MessageChannel,_t=vt.port2;vt.port1.onmessage=ht,dt=function(){_t.postMessage(null)}}else dt=function(){R(ht,0)};function xt(){Z||(Z=!0,dt())}function Dt(w,H){Q=R(function(){w(i.unstable_now())},H)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(w){w.callback=null},i.unstable_continueExecution=function(){z||E||(z=!0,xt())},i.unstable_forceFrameRate=function(w){0>w||125<w?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<w?Math.floor(1e3/w):5},i.unstable_getCurrentPriorityLevel=function(){return A},i.unstable_getFirstCallbackNode=function(){return n(g)},i.unstable_next=function(w){switch(A){case 1:case 2:case 3:var H=3;break;default:H=A}var at=A;A=H;try{return w()}finally{A=at}},i.unstable_pauseExecution=function(){},i.unstable_requestPaint=function(){},i.unstable_runWithPriority=function(w,H){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var at=A;A=w;try{return H()}finally{A=at}},i.unstable_scheduleCallback=function(w,H,at){var et=i.unstable_now();switch(typeof at=="object"&&at!==null?(at=at.delay,at=typeof at=="number"&&0<at?et+at:et):at=et,w){case 1:var ft=-1;break;case 2:ft=250;break;case 5:ft=1073741823;break;case 4:ft=1e4;break;default:ft=5e3}return ft=at+ft,w={id:S++,callback:H,priorityLevel:w,startTime:at,expirationTime:ft,sortIndex:-1},at>et?(w.sortIndex=at,t(v,w),n(g)===null&&w===n(v)&&(M?(O(Q),Q=-1):M=!0,Dt(G,at-et))):(w.sortIndex=ft,t(g,w),z||E||(z=!0,xt())),w},i.unstable_shouldYield=ct,i.unstable_wrapCallback=function(w){var H=A;return function(){var at=A;A=H;try{return w.apply(this,arguments)}finally{A=at}}}})(Yy)),Yy}var D1;function lM(){return D1||(D1=1,qy.exports=iM()),qy.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 O1;function sM(){return O1||(O1=1,(function(i){i.exports=function(t){function n(l,u,h,y){return new pf(l,u,h,y)}function s(){}function o(l){var u="https://react.dev/errors/"+l;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)u+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+l+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(l){return l===null||typeof l!="object"?null:(l=bf&&l[bf]||l["@@iterator"],typeof l=="function"?l:null)}function d(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===xs?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case fu:return"Fragment";case Fa:return"Portal";case Sf:return"Profiler";case _f:return"StrictMode";case wo:return"Suspense";case wl:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case xi:return(l.displayName||"Context")+".Provider";case Bl:return(l._context.displayName||"Context")+".Consumer";case hu:var u=l.render;return l=l.displayName,l||(l=u.displayName||u.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case pr:return u=l.displayName||null,u!==null?u:d(l.type)||"Memo";case Ia:u=l._payload,l=l._init;try{return d(l(u))}catch{}}return null}function m(l){if(Ho===void 0)try{throw Error()}catch(h){var u=h.stack.trim().match(/\n( *(at )?)/);Ho=u&&u[1]||"",Tf=-1<h.stack.indexOf(`
|
|
334
|
+
at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
335
|
+
`+Ho+l+Tf}function g(l,u){if(!l||Hl)return"";Hl=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var y={DetermineComponentFrameRoot:function(){try{if(u){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(Gt){var bt=Gt}Reflect.construct(l,[],St)}else{try{St.call()}catch(Gt){bt=Gt}l.call(St.prototype)}}else{try{throw Error()}catch(Gt){bt=Gt}(St=l())&&typeof St.catch=="function"&&St.catch(function(){})}}catch(Gt){if(Gt&&bt&&typeof Gt.stack=="string")return[Gt.stack,bt.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var _=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");_&&_.configurable&&Object.defineProperty(y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var T=y.DetermineComponentFrameRoot(),N=T[0],q=T[1];if(N&&q){var P=N.split(`
|
|
336
|
+
`),ut=q.split(`
|
|
337
|
+
`);for(_=y=0;y<P.length&&!P[y].includes("DetermineComponentFrameRoot");)y++;for(;_<ut.length&&!ut[_].includes("DetermineComponentFrameRoot");)_++;if(y===P.length||_===ut.length)for(y=P.length-1,_=ut.length-1;1<=y&&0<=_&&P[y]!==ut[_];)_--;for(;1<=y&&0<=_;y--,_--)if(P[y]!==ut[_]){if(y!==1||_!==1)do if(y--,_--,0>_||P[y]!==ut[_]){var yt=`
|
|
338
|
+
`+P[y].replace(" at new "," at ");return l.displayName&&yt.includes("<anonymous>")&&(yt=yt.replace("<anonymous>",l.displayName)),yt}while(1<=y&&0<=_);break}}}finally{Hl=!1,Error.prepareStackTrace=h}return(h=l?l.displayName||l.name:"")?m(h):""}function v(l){switch(l.tag){case 26:case 27:case 5:return m(l.type);case 16:return m("Lazy");case 13:return m("Suspense");case 19:return m("SuspenseList");case 0:case 15:return l=g(l.type,!1),l;case 11:return l=g(l.type.render,!1),l;case 1:return l=g(l.type,!0),l;default:return""}}function S(l){try{var u="";do u+=v(l),l=l.return;while(l);return u}catch(h){return`
|
|
339
|
+
Error generating stack: `+h.message+`
|
|
340
|
+
`+h.stack}}function b(l){var u=l,h=l;if(l.alternate)for(;u.return;)u=u.return;else{l=u;do u=l,(u.flags&4098)!==0&&(h=u.return),l=u.return;while(l)}return u.tag===3?h:null}function A(l){if(b(l)!==l)throw Error(o(188))}function E(l){var u=l.alternate;if(!u){if(u=b(l),u===null)throw Error(o(188));return u!==l?null:l}for(var h=l,y=u;;){var _=h.return;if(_===null)break;var T=_.alternate;if(T===null){if(y=_.return,y!==null){h=y;continue}break}if(_.child===T.child){for(T=_.child;T;){if(T===h)return A(_),l;if(T===y)return A(_),u;T=T.sibling}throw Error(o(188))}if(h.return!==y.return)h=_,y=T;else{for(var N=!1,q=_.child;q;){if(q===h){N=!0,h=_,y=T;break}if(q===y){N=!0,y=_,h=T;break}q=q.sibling}if(!N){for(q=T.child;q;){if(q===h){N=!0,h=T,y=_;break}if(q===y){N=!0,y=T,h=_;break}q=q.sibling}if(!N)throw Error(o(189))}}if(h.alternate!==y)throw Error(o(190))}if(h.tag!==3)throw Error(o(188));return h.stateNode.current===h?l:u}function z(l){var u=l.tag;if(u===5||u===26||u===27||u===6)return l;for(l=l.child;l!==null;){if(u=z(l),u!==null)return u;l=l.sibling}return null}function M(l){var u=l.tag;if(u===5||u===26||u===27||u===6)return l;for(l=l.child;l!==null;){if(l.tag!==4&&(u=M(l),u!==null))return u;l=l.sibling}return null}function R(l){return{current:l}}function O(l){0>$i||(l.current=Er[$i],Er[$i]=null,$i--)}function B(l,u){$i++,Er[$i]=l.current,l.current=u}function U(l){return l>>>=0,l===0?32:31-(Cr(l)/$d|0)|0}function G(l){var u=l&42;if(u!==0)return u;switch(l&-l){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 l&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function Z(l,u){var h=l.pendingLanes;if(h===0)return 0;var y=0,_=l.suspendedLanes,T=l.pingedLanes,N=l.warmLanes;l=l.finishedLanes!==0;var q=h&134217727;return q!==0?(h=q&~_,h!==0?y=G(h):(T&=q,T!==0?y=G(T):l||(N=q&~N,N!==0&&(y=G(N))))):(q=h&~_,q!==0?y=G(q):T!==0?y=G(T):l||(N=h&~N,N!==0&&(y=G(N)))),y===0?0:u!==0&&u!==y&&(u&_)===0&&(_=y&-y,N=u&-u,_>=N||_===32&&(N&4194176)!==0)?u:y}function Q(l,u){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&u)===0}function K(l,u){switch(l){case 1:case 2:case 4:case 8:return u+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 u+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 gt(){var l=yu;return yu<<=1,(yu&4194176)===0&&(yu=128),l}function ct(){var l=Ar;return Ar<<=1,(Ar&62914560)===0&&(Ar=4194304),l}function ht(l){for(var u=[],h=0;31>h;h++)u.push(l);return u}function dt(l,u){l.pendingLanes|=u,u!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function vt(l,u,h,y,_,T){var N=l.pendingLanes;l.pendingLanes=h,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=h,l.entangledLanes&=h,l.errorRecoveryDisabledLanes&=h,l.shellSuspendCounter=0;var q=l.entanglements,P=l.expirationTimes,ut=l.hiddenUpdates;for(h=N&~h;0<h;){var yt=31-Fn(h),St=1<<yt;q[yt]=0,P[yt]=-1;var bt=ut[yt];if(bt!==null)for(ut[yt]=null,yt=0;yt<bt.length;yt++){var Gt=bt[yt];Gt!==null&&(Gt.lane&=-536870913)}h&=~St}y!==0&&_t(l,y,0),T!==0&&_===0&&l.tag!==0&&(l.suspendedLanes|=T&~(N&~u))}function _t(l,u,h){l.pendingLanes|=u,l.suspendedLanes&=~u;var y=31-Fn(u);l.entangledLanes|=u,l.entanglements[y]=l.entanglements[y]|1073741824|h&4194218}function xt(l,u){var h=l.entangledLanes|=u;for(l=l.entanglements;h;){var y=31-Fn(h),_=1<<y;_&u|l[y]&u&&(l[y]|=u),h&=~_}}function Dt(l){return l&=-l,2<l?8<l?(l&134217727)!==0?32:268435456:8:2}function w(l){if(In&&typeof In.onCommitFiberRoot=="function")try{In.onCommitFiberRoot(vu,l,void 0,(l.current.flags&128)===128)}catch{}}function H(l){if(typeof am=="function"&&th(l),In&&typeof In.setStrictMode=="function")try{In.setStrictMode(vu,l)}catch{}}function at(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}function et(l,u){if(typeof l=="object"&&l!==null){var h=$o.get(l);return h!==void 0?h:(u={value:l,source:u,stack:S(u)},$o.set(l,u),u)}return{value:l,source:u,stack:S(u)}}function ft(l,u){Re[we++]=zr,Re[we++]=Rr,Rr=l,zr=u}function j(l,u,h){va[xa++]=Ei,va[xa++]=Ga,va[xa++]=$a,$a=l;var y=Ei;l=Ga;var _=32-Fn(y)-1;y&=~(1<<_),h+=1;var T=32-Fn(u)+_;if(30<T){var N=_-_%5;T=(y&(1<<N)-1).toString(32),y>>=N,_-=N,Ei=1<<32-Fn(u)+_|h<<_|y,Ga=T+l}else Ei=1<<T|h<<_|y,Ga=l}function I(l){l.return!==null&&(ft(l,1),j(l,1,0))}function st(l){for(;l===Rr;)Rr=Re[--we],Re[we]=null,zr=Re[--we],Re[we]=null;for(;l===$a;)$a=va[--xa],va[xa]=null,Ga=va[--xa],va[xa]=null,Ei=va[--xa],va[xa]=null}function pt(l,u){B(ti,u),B(Dr,l),B(dn,null),l=_s(u),O(dn),B(dn,l)}function Tt(){O(dn),O(Dr),O(ti)}function Ot(l){l.memoizedState!==null&&B(xu,l);var u=dn.current,h=Nd(u,l.type);u!==h&&(B(Dr,l),B(dn,h))}function Ut(l){Dr.current===l&&(O(dn),O(Dr)),xu.current===l&&(O(xu),Si?wt._currentValue=Wn:wt._currentValue2=Wn)}function re(l){var u=Error(o(418,""));throw Qn(et(u,l)),Or}function ue(l,u){if(!jn)throw Error(o(175));Sp(l.stateNode,l.type,l.memoizedProps,u,l)||re(l)}function ra(l){for(Rn=l.return;Rn;)switch(Rn.tag){case 3:case 27:ja=!0;return;case 5:case 13:ja=!1;return;default:Rn=Rn.return}}function Oa(l){if(!jn||l!==Rn)return!1;if(!ae)return ra(l),ae=!0,!1;var u=!1;if(vn?l.tag!==3&&l.tag!==27&&(l.tag!==5||Jd(l.type)&&!ql(l.type,l.memoizedProps))&&(u=!0):l.tag!==3&&(l.tag!==5||Jd(l.type)&&!ql(l.type,l.memoizedProps))&&(u=!0),u&&_n&&re(l),ra(l),l.tag===13){if(!jn)throw Error(o(316));if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(o(317));_n=Kd(l)}else _n=Rn?Lf(l.stateNode):null;return!0}function Un(){jn&&(_n=Rn=null,ae=!1)}function Qn(l){_a===null?_a=[l]:_a.push(l)}function rn(){for(var l=Ll,u=_u=Ll=0;u<l;){var h=Sa[u];Sa[u++]=null;var y=Sa[u];Sa[u++]=null;var _=Sa[u];Sa[u++]=null;var T=Sa[u];if(Sa[u++]=null,y!==null&&_!==null){var N=y.pending;N===null?_.next=_:(_.next=N.next,N.next=_),y.pending=_}T!==0&&ju(h,_,T)}}function Zn(l,u,h,y){Sa[Ll++]=l,Sa[Ll++]=u,Sa[Ll++]=h,Sa[Ll++]=y,_u|=y,l.lanes|=y,l=l.alternate,l!==null&&(l.lanes|=y)}function ts(l,u,h,y){return Zn(l,u,h,y),es(l)}function Za(l,u){return Zn(l,null,null,u),es(l)}function ju(l,u,h){l.lanes|=h;var y=l.alternate;y!==null&&(y.lanes|=h);for(var _=!1,T=l.return;T!==null;)T.childLanes|=h,y=T.alternate,y!==null&&(y.childLanes|=h),T.tag===22&&(l=T.stateNode,l===null||l._visibility&1||(_=!0)),l=T,T=T.return;_&&u!==null&&l.tag===3&&(T=l.stateNode,_=31-Fn(h),T=T.hiddenUpdates,l=T[_],l===null?T[_]=[u]:l.push(u),u.lane=h|536870912)}function es(l){if(50<Os)throw Os=0,Ln=null,Error(o(185));for(var u=l.return;u!==null;)l=u,u=l.return;return l.tag===3?l.stateNode:null}function Na(l){l!==Es&&l.next===null&&(Es===null?Su=Es=l:Es=Es.next=l),Ur=!0,Nr||(Nr=!0,Ph(pp))}function ml(l,u){if(!ei&&Ur){ei=!0;do for(var h=!1,y=Su;y!==null;){if(l!==0){var _=y.pendingLanes;if(_===0)var T=0;else{var N=y.suspendedLanes,q=y.pingedLanes;T=(1<<31-Fn(42|l)+1)-1,T&=_&~(N&~q),T=T&201326677?T&201326677|1:T?T|2:0}T!==0&&(h=!0,Jh(y,T))}else T=Qt,T=Z(y,y===Kt?T:0),(T&3)===0||Q(y,T)||(h=!0,Jh(y,T));y=y.next}while(h);ei=!1}}function pp(){Ur=Nr=!1;var l=0;Xl!==0&&(Yl()&&(l=Xl),Xl=0);for(var u=xn(),h=null,y=Su;y!==null;){var _=y.next,T=kh(y,u);T===0?(y.next=null,h===null?Su=_:h.next=_,_===null&&(Es=h)):(h=y,(l!==0||(T&3)!==0)&&(Ur=!0)),y=_}ml(l)}function kh(l,u){for(var h=l.suspendedLanes,y=l.pingedLanes,_=l.expirationTimes,T=l.pendingLanes&-62914561;0<T;){var N=31-Fn(T),q=1<<N,P=_[N];P===-1?((q&h)===0||(q&y)!==0)&&(_[N]=K(q,u)):P<=u&&(l.expiredLanes|=q),T&=~q}if(u=Kt,h=Qt,h=Z(l,l===u?h:0),y=l.callbackNode,h===0||l===u&&ve===2||l.cancelPendingCommit!==null)return y!==null&&y!==null&&Mr(y),l.callbackNode=null,l.callbackPriority=0;if((h&3)===0||Q(l,h)){if(u=h&-h,u===l.callbackPriority)return u;switch(y!==null&&Mr(y),Dt(h)){case 2:case 8:h=nm;break;case 32:h=Fo;break;case 268435456:h=Io;break;default:h=Fo}return y=Kn.bind(null,l),h=gu(h,y),l.callbackPriority=u,l.callbackNode=h,u}return y!==null&&y!==null&&Mr(y),l.callbackPriority=2,l.callbackNode=null,2}function Kn(l,u){var h=l.callbackNode;if(fn()&&l.callbackNode!==h)return null;var y=Qt;return y=Z(l,l===Kt?y:0),y===0?null:(cr(l,y,u),kh(l,xn()),l.callbackNode!=null&&l.callbackNode===h?Kn.bind(null,l):null)}function Jh(l,u){if(fn())return null;cr(l,u,!0)}function Ph(l){We?Yo(function(){(Rt&6)!==0?gu($f,l):l()}):gu($f,l)}function Fr(){return Xl===0&&(Xl=gt()),Xl}function Ir(l,u){if(Br===null){var h=Br=[];tc=0,$n=Fr(),Vl={status:"pending",value:void 0,then:function(y){h.push(y)}}}return tc++,u.then(Wh,Wh),u}function Wh(){if(--tc===0&&Br!==null){Vl!==null&&(Vl.status="fulfilled");var l=Br;Br=null,$n=0,Vl=null;for(var u=0;u<l.length;u++)(0,l[u])()}}function Fh(l,u){var h=[],y={status:"pending",value:null,reason:null,then:function(_){h.push(_)}};return l.then(function(){y.status="fulfilled",y.value=u;for(var _=0;_<h.length;_++)(0,h[_])(u)},function(_){for(y.status="rejected",y.reason=_,_=0;_<h.length;_++)(0,h[_])(void 0)}),y}function wc(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hc(l,u){l=l.updateQueue,u.updateQueue===l&&(u.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function Ua(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function Je(l,u,h){var y=l.updateQueue;if(y===null)return null;if(y=y.shared,(Rt&2)!==0){var _=y.pending;return _===null?u.next=u:(u.next=_.next,_.next=u),y.pending=u,u=es(l),ju(l,null,h),u}return Zn(l,y,u,h),es(l)}function Ba(l,u,h){if(u=u.updateQueue,u!==null&&(u=u.shared,(h&4194176)!==0)){var y=u.lanes;y&=l.pendingLanes,h|=y,u.lanes=h,xt(l,h)}}function Bn(l,u){var h=l.updateQueue,y=l.alternate;if(y!==null&&(y=y.updateQueue,h===y)){var _=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?_=T=N:T=T.next=N,h=h.next}while(h!==null);T===null?_=T=u:T=T.next=u}else _=T=u;h={baseState:y.baseState,firstBaseUpdate:_,lastBaseUpdate:T,shared:y.shared,callbacks:y.callbacks},l.updateQueue=h;return}l=h.lastBaseUpdate,l===null?h.firstBaseUpdate=u:l.next=u,h.lastBaseUpdate=u}function qu(){if(bu){var l=Vl;if(l!==null)throw l}}function Yu(l,u,h,y){bu=!1;var _=l.updateQueue;tl=!1;var T=_.firstBaseUpdate,N=_.lastBaseUpdate,q=_.shared.pending;if(q!==null){_.shared.pending=null;var P=q,ut=P.next;P.next=null,N===null?T=ut:N.next=ut,N=P;var yt=l.alternate;yt!==null&&(yt=yt.updateQueue,q=yt.lastBaseUpdate,q!==N&&(q===null?yt.firstBaseUpdate=ut:q.next=ut,yt.lastBaseUpdate=P))}if(T!==null){var St=_.baseState;N=0,yt=ut=P=null,q=T;do{var bt=q.lane&-536870913,Gt=bt!==q.lane;if(Gt?(Qt&bt)===bt:(y&bt)===bt){bt!==0&&bt===$n&&(bu=!0),yt!==null&&(yt=yt.next={lane:0,tag:q.tag,payload:q.payload,callback:null,next:null});t:{var aa=l,jr=q;bt=u;var Ns=h;switch(jr.tag){case 1:if(aa=jr.payload,typeof aa=="function"){St=aa.call(Ns,St,bt);break t}St=aa;break t;case 3:aa.flags=aa.flags&-65537|128;case 0:if(aa=jr.payload,bt=typeof aa=="function"?aa.call(Ns,St,bt):aa,bt==null)break t;St=vs({},St,bt);break t;case 2:tl=!0}}bt=q.callback,bt!==null&&(l.flags|=64,Gt&&(l.flags|=8192),Gt=_.callbacks,Gt===null?_.callbacks=[bt]:Gt.push(bt))}else Gt={lane:bt,tag:q.tag,payload:q.payload,callback:q.callback,next:null},yt===null?(ut=yt=Gt,P=St):yt=yt.next=Gt,N|=bt;if(q=q.next,q===null){if(q=_.shared.pending,q===null)break;Gt=q,q=Gt.next,Gt.next=null,_.lastBaseUpdate=Gt,_.shared.pending=null}}while(!0);yt===null&&(P=St),_.baseState=P,_.firstBaseUpdate=ut,_.lastBaseUpdate=yt,T===null&&(_.shared.lanes=0),Ca|=N,l.lanes=N,l.memoizedState=St}}function Ih(l,u){if(typeof l!="function")throw Error(o(191,l));l.call(u)}function Lu(l,u){var h=l.callbacks;if(h!==null)for(l.callbacks=null,l=0;l<h.length;l++)Ih(h[l],u)}function ns(l,u){if(ga(l,u))return!0;if(typeof l!="object"||l===null||typeof u!="object"||u===null)return!1;var h=Object.keys(l),y=Object.keys(u);if(h.length!==y.length)return!1;for(y=0;y<h.length;y++){var _=h[y];if(!wr.call(u,_)||!ga(l[_],u[_]))return!1}return!0}function Xu(l){return l=l.status,l==="fulfilled"||l==="rejected"}function ri(){}function Vu(l,u,h){switch(h=l[h],h===void 0?l.push(u):h!==u&&(u.then(ri,ri),u=h),u.status){case"fulfilled":return u.value;case"rejected":throw l=u.reason,l===ye?Error(o(483)):l;default:if(typeof u.status=="string")u.then(ri,ri);else{if(l=Kt,l!==null&&100<l.shellSuspendCounter)throw Error(o(482));l=u,l.status="pending",l.then(function(y){if(u.status==="pending"){var _=u;_.status="fulfilled",_.value=y}},function(y){if(u.status==="pending"){var _=u;_.status="rejected",_.reason=y}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw l=u.reason,l===ye?Error(o(483)):l}throw Cs=u,ye}}function Qs(){if(Cs===null)throw Error(o(459));var l=Cs;return Cs=null,l}function $r(l){var u=qa;return qa+=1,Ci===null&&(Ci=[]),Vu(Ci,l,u)}function Zs(l,u){u=u.props.ref,l.ref=u!==void 0?u:null}function Ks(l,u){throw u.$$typeof===xf?Error(o(525)):(l=Object.prototype.toString.call(u),Error(o(31,l==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":l)))}function ks(l){var u=l._init;return u(l._payload)}function $h(l){function u($,k){if(l){var nt=$.deletions;nt===null?($.deletions=[k],$.flags|=16):nt.push(k)}}function h($,k){if(!l)return null;for(;k!==null;)u($,k),k=k.sibling;return null}function y($){for(var k=new Map;$!==null;)$.key!==null?k.set($.key,$):k.set($.index,$),$=$.sibling;return k}function _($,k){return $=An($,k),$.index=0,$.sibling=null,$}function T($,k,nt){return $.index=nt,l?(nt=$.alternate,nt!==null?(nt=nt.index,nt<k?($.flags|=33554434,k):nt):($.flags|=33554434,k)):($.flags|=1048576,k)}function N($){return l&&$.alternate===null&&($.flags|=33554434),$}function q($,k,nt,mt){return k===null||k.tag!==6?(k=Ul(nt,$.mode,mt),k.return=$,k):(k=_(k,nt),k.return=$,k)}function P($,k,nt,mt){var At=nt.type;return At===fu?yt($,k,nt.props.children,mt,nt.key):k!==null&&(k.elementType===At||typeof At=="object"&&At!==null&&At.$$typeof===Ia&&ks(At)===k.type)?(k=_(k,nt.props),Zs(k,nt),k.return=$,k):(k=wa(nt.type,nt.key,nt.props,null,$.mode,mt),Zs(k,nt),k.return=$,k)}function ut($,k,nt,mt){return k===null||k.tag!==4||k.stateNode.containerInfo!==nt.containerInfo||k.stateNode.implementation!==nt.implementation?(k=cu(nt,$.mode,mt),k.return=$,k):(k=_(k,nt.children||[]),k.return=$,k)}function yt($,k,nt,mt,At){return k===null||k.tag!==7?(k=Ji(nt,$.mode,mt,At),k.return=$,k):(k=_(k,nt),k.return=$,k)}function St($,k,nt){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=Ul(""+k,$.mode,nt),k.return=$,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Pi:return nt=wa(k.type,k.key,k.props,null,$.mode,nt),Zs(nt,k),nt.return=$,nt;case Fa:return k=cu(k,$.mode,nt),k.return=$,k;case Ia:var mt=k._init;return k=mt(k._payload),St($,k,nt)}if(Gl(k)||f(k))return k=Ji(k,$.mode,nt,null),k.return=$,k;if(typeof k.then=="function")return St($,$r(k),nt);if(k.$$typeof===xi)return St($,lr($,k),nt);Ks($,k)}return null}function bt($,k,nt,mt){var At=k!==null?k.key:null;if(typeof nt=="string"&&nt!==""||typeof nt=="number"||typeof nt=="bigint")return At!==null?null:q($,k,""+nt,mt);if(typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case Pi:return nt.key===At?P($,k,nt,mt):null;case Fa:return nt.key===At?ut($,k,nt,mt):null;case Ia:return At=nt._init,nt=At(nt._payload),bt($,k,nt,mt)}if(Gl(nt)||f(nt))return At!==null?null:yt($,k,nt,mt,null);if(typeof nt.then=="function")return bt($,k,$r(nt),mt);if(nt.$$typeof===xi)return bt($,k,lr($,nt),mt);Ks($,nt)}return null}function Gt($,k,nt,mt,At){if(typeof mt=="string"&&mt!==""||typeof mt=="number"||typeof mt=="bigint")return $=$.get(nt)||null,q(k,$,""+mt,At);if(typeof mt=="object"&&mt!==null){switch(mt.$$typeof){case Pi:return $=$.get(mt.key===null?nt:mt.key)||null,P(k,$,mt,At);case Fa:return $=$.get(mt.key===null?nt:mt.key)||null,ut(k,$,mt,At);case Ia:var Se=mt._init;return mt=Se(mt._payload),Gt($,k,nt,mt,At)}if(Gl(mt)||f(mt))return $=$.get(nt)||null,yt(k,$,mt,At,null);if(typeof mt.then=="function")return Gt($,k,nt,$r(mt),At);if(mt.$$typeof===xi)return Gt($,k,nt,lr(k,mt),At);Ks(k,mt)}return null}function aa($,k,nt,mt){for(var At=null,Se=null,Ht=k,le=k=0,sn=null;Ht!==null&&le<nt.length;le++){Ht.index>le?(sn=Ht,Ht=null):sn=Ht.sibling;var se=bt($,Ht,nt[le],mt);if(se===null){Ht===null&&(Ht=sn);break}l&&Ht&&se.alternate===null&&u($,Ht),k=T(se,k,le),Se===null?At=se:Se.sibling=se,Se=se,Ht=sn}if(le===nt.length)return h($,Ht),ae&&ft($,le),At;if(Ht===null){for(;le<nt.length;le++)Ht=St($,nt[le],mt),Ht!==null&&(k=T(Ht,k,le),Se===null?At=Ht:Se.sibling=Ht,Se=Ht);return ae&&ft($,le),At}for(Ht=y(Ht);le<nt.length;le++)sn=Gt(Ht,$,le,nt[le],mt),sn!==null&&(l&&sn.alternate!==null&&Ht.delete(sn.key===null?le:sn.key),k=T(sn,k,le),Se===null?At=sn:Se.sibling=sn,Se=sn);return l&&Ht.forEach(function(ul){return u($,ul)}),ae&&ft($,le),At}function jr($,k,nt,mt){if(nt==null)throw Error(o(151));for(var At=null,Se=null,Ht=k,le=k=0,sn=null,se=nt.next();Ht!==null&&!se.done;le++,se=nt.next()){Ht.index>le?(sn=Ht,Ht=null):sn=Ht.sibling;var ul=bt($,Ht,se.value,mt);if(ul===null){Ht===null&&(Ht=sn);break}l&&Ht&&ul.alternate===null&&u($,Ht),k=T(ul,k,le),Se===null?At=ul:Se.sibling=ul,Se=ul,Ht=sn}if(se.done)return h($,Ht),ae&&ft($,le),At;if(Ht===null){for(;!se.done;le++,se=nt.next())se=St($,se.value,mt),se!==null&&(k=T(se,k,le),Se===null?At=se:Se.sibling=se,Se=se);return ae&&ft($,le),At}for(Ht=y(Ht);!se.done;le++,se=nt.next())se=Gt(Ht,$,le,se.value,mt),se!==null&&(l&&se.alternate!==null&&Ht.delete(se.key===null?le:se.key),k=T(se,k,le),Se===null?At=se:Se.sibling=se,Se=se);return l&&Ht.forEach(function(oc){return u($,oc)}),ae&&ft($,le),At}function Ns($,k,nt,mt){if(typeof nt=="object"&&nt!==null&&nt.type===fu&&nt.key===null&&(nt=nt.props.children),typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case Pi:t:{for(var At=nt.key;k!==null;){if(k.key===At){if(At=nt.type,At===fu){if(k.tag===7){h($,k.sibling),mt=_(k,nt.props.children),mt.return=$,$=mt;break t}}else if(k.elementType===At||typeof At=="object"&&At!==null&&At.$$typeof===Ia&&ks(At)===k.type){h($,k.sibling),mt=_(k,nt.props),Zs(mt,nt),mt.return=$,$=mt;break t}h($,k);break}else u($,k);k=k.sibling}nt.type===fu?(mt=Ji(nt.props.children,$.mode,mt,nt.key),mt.return=$,$=mt):(mt=wa(nt.type,nt.key,nt.props,null,$.mode,mt),Zs(mt,nt),mt.return=$,$=mt)}return N($);case Fa:t:{for(At=nt.key;k!==null;){if(k.key===At)if(k.tag===4&&k.stateNode.containerInfo===nt.containerInfo&&k.stateNode.implementation===nt.implementation){h($,k.sibling),mt=_(k,nt.children||[]),mt.return=$,$=mt;break t}else{h($,k);break}else u($,k);k=k.sibling}mt=cu(nt,$.mode,mt),mt.return=$,$=mt}return N($);case Ia:return At=nt._init,nt=At(nt._payload),Ns($,k,nt,mt)}if(Gl(nt))return aa($,k,nt,mt);if(f(nt)){if(At=f(nt),typeof At!="function")throw Error(o(150));return nt=At.call(nt),jr($,k,nt,mt)}if(typeof nt.then=="function")return Ns($,k,$r(nt),mt);if(nt.$$typeof===xi)return Ns($,k,lr($,nt),mt);Ks($,nt)}return typeof nt=="string"&&nt!==""||typeof nt=="number"||typeof nt=="bigint"?(nt=""+nt,k!==null&&k.tag===6?(h($,k.sibling),mt=_(k,nt),mt.return=$,$=mt):(h($,k),mt=Ul(nt,$.mode,mt),mt.return=$,$=mt),N($)):h($,k)}return function($,k,nt,mt){try{qa=0;var At=Ns($,k,nt,mt);return Ci=null,At}catch(Ht){if(Ht===ye)throw Ht;var Se=n(29,Ht,null,$.mode);return Se.lanes=mt,Se.return=$,Se}finally{}}}function Gc(l,u){l=ni,B(ba,l),B(Ai,u),ni=l|u.baseLanes}function to(){B(ba,ni),B(Ai,Ai.current)}function eo(){ni=ba.current,O(Ai),O(ba)}function oi(l){var u=l.alternate;B(Fe,Fe.current&1),B(Ta,l),Ya===null&&(u===null||Ai.current!==null||u.memoizedState!==null)&&(Ya=l)}function no(l){if(l.tag===22){if(B(Fe,Fe.current),B(Ta,l),Ya===null){var u=l.alternate;u!==null&&u.memoizedState!==null&&(Ya=l)}}else Hi()}function Hi(){B(Fe,Fe.current),B(Ta,Ta.current)}function ci(l){O(Ta),Ya===l&&(Ya=null),O(Fe)}function Ka(l){for(var u=l;u!==null;){if(u.tag===13){var h=u.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||Zo(h)||Tr(h)))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}function Jt(){throw Error(o(321))}function bn(l,u){if(u===null)return!1;for(var h=0;h<u.length&&h<l.length;h++)if(!ga(l[h],u[h]))return!1;return!0}function pl(l,u,h,y,_,T){return Mi=T,Xt=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,Nt.H=l===null||l.memoizedState===null?Ie:zn,el=!1,T=h(y,_),el=!1,ze&&(T=td(u,h,y,_)),ao(l),T}function ao(l){Nt.H=ie;var u=oe!==null&&oe.next!==null;if(Mi=0,Le=oe=Xt=null,La=!1,He=0,Tu=null,u)throw Error(o(300));l===null||Xe||(l=l.dependencies,l!==null&&bl(l)&&(Xe=!0))}function td(l,u,h,y){Xt=l;var _=0;do{if(ze&&(Tu=null),He=0,ze=!1,25<=_)throw Error(o(301));if(_+=1,Le=oe=null,l.updateQueue!=null){var T=l.updateQueue;T.lastEffect=null,T.events=null,T.stores=null,T.memoCache!=null&&(T.memoCache.index=0)}Nt.H=Zl,T=u(h,y)}while(ze);return T}function yp(){var l=Nt.H,u=l.useState()[0];return u=typeof u.then=="function"?Gi(u):u,l=l.useState()[0],(oe!==null?oe.memoizedState:null)!==l&&(Xt.flags|=1024),u}function io(){var l=Hr!==0;return Hr=0,l}function as(l,u,h){u.updateQueue=l.updateQueue,u.flags&=-2053,l.lanes&=~h}function Qu(l){if(La){for(l=l.memoizedState;l!==null;){var u=l.queue;u!==null&&(u.pending=null),l=l.next}La=!1}Mi=0,Le=oe=Xt=null,ze=!1,He=Hr=0,Tu=null}function nn(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Le===null?Xt.memoizedState=Le=l:Le=Le.next=l,Le}function Ce(){if(oe===null){var l=Xt.alternate;l=l!==null?l.memoizedState:null}else l=oe.next;var u=Le===null?Xt.memoizedState:Le.next;if(u!==null)Le=u,oe=l;else{if(l===null)throw Xt.alternate===null?Error(o(467)):Error(o(310));oe=l,l={memoizedState:oe.memoizedState,baseState:oe.baseState,baseQueue:oe.baseQueue,queue:oe.queue,next:null},Le===null?Xt.memoizedState=Le=l:Le=Le.next=l}return Le}function Gi(l){var u=He;return He+=1,Tu===null&&(Tu=[]),l=Vu(Tu,l,u),u=Xt,(Le===null?u.memoizedState:Le.next)===null&&(u=u.alternate,Nt.H=u===null||u.memoizedState===null?Ie:zn),l}function ji(l){if(l!==null&&typeof l=="object"){if(typeof l.then=="function")return Gi(l);if(l.$$typeof===xi)return pn(l)}throw Error(o(438,String(l)))}function Pe(l){var u=null,h=Xt.updateQueue;if(h!==null&&(u=h.memoCache),u==null){var y=Xt.alternate;y!==null&&(y=y.updateQueue,y!==null&&(y=y.memoCache,y!=null&&(u={data:y.data.map(function(_){return _.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),h===null&&(h=nc(),Xt.updateQueue=h),h.memoCache=u,h=u.data[u.index],h===void 0)for(h=u.data[u.index]=Array(l),y=0;y<l;y++)h[y]=Od;return u.index++,h}function fi(l,u){return typeof u=="function"?u(l):u}function Zu(l){var u=Ce();return qi(u,oe,l)}function qi(l,u,h){var y=l.queue;if(y===null)throw Error(o(311));y.lastRenderedReducer=h;var _=l.baseQueue,T=y.pending;if(T!==null){if(_!==null){var N=_.next;_.next=T.next,T.next=N}u.baseQueue=_=T,y.pending=null}if(T=l.baseState,_===null)l.memoizedState=T;else{u=_.next;var q=N=null,P=null,ut=u,yt=!1;do{var St=ut.lane&-536870913;if(St!==ut.lane?(Qt&St)===St:(Mi&St)===St){var bt=ut.revertLane;if(bt===0)P!==null&&(P=P.next={lane:0,revertLane:0,action:ut.action,hasEagerState:ut.hasEagerState,eagerState:ut.eagerState,next:null}),St===$n&&(yt=!0);else if((Mi&bt)===bt){ut=ut.next,bt===$n&&(yt=!0);continue}else St={lane:0,revertLane:ut.revertLane,action:ut.action,hasEagerState:ut.hasEagerState,eagerState:ut.eagerState,next:null},P===null?(q=P=St,N=T):P=P.next=St,Xt.lanes|=bt,Ca|=bt;St=ut.action,el&&h(T,St),T=ut.hasEagerState?ut.eagerState:h(T,St)}else bt={lane:St,revertLane:ut.revertLane,action:ut.action,hasEagerState:ut.hasEagerState,eagerState:ut.eagerState,next:null},P===null?(q=P=bt,N=T):P=P.next=bt,Xt.lanes|=St,Ca|=St;ut=ut.next}while(ut!==null&&ut!==u);if(P===null?N=T:P.next=q,!ga(T,l.memoizedState)&&(Xe=!0,yt&&(h=Vl,h!==null)))throw h;l.memoizedState=T,l.baseState=N,l.baseQueue=P,y.lastRenderedState=T}return _===null&&(y.lanes=0),[l.memoizedState,y.dispatch]}function yl(l){var u=Ce(),h=u.queue;if(h===null)throw Error(o(311));h.lastRenderedReducer=l;var y=h.dispatch,_=h.pending,T=u.memoizedState;if(_!==null){h.pending=null;var N=_=_.next;do T=l(T,N.action),N=N.next;while(N!==_);ga(T,u.memoizedState)||(Xe=!0),u.memoizedState=T,u.baseQueue===null&&(u.baseState=T),h.lastRenderedState=T}return[T,y]}function ed(l,u,h){var y=Xt,_=Ce(),T=ae;if(T){if(h===void 0)throw Error(o(407));h=h()}else h=u();var N=!ga((oe||_).memoizedState,h);if(N&&(_.memoizedState=h,Xe=!0),_=_.queue,Pu(nd.bind(null,y,_,l),[l]),_.getSnapshot!==u||N||Le!==null&&Le.memoizedState.tag&1){if(y.flags|=2048,is(9,qc.bind(null,y,_,h,u),{destroy:void 0},null),Kt===null)throw Error(o(349));T||(Mi&60)!==0||jc(y,u,h)}return h}function jc(l,u,h){l.flags|=16384,l={getSnapshot:u,value:h},u=Xt.updateQueue,u===null?(u=nc(),Xt.updateQueue=u,u.stores=[l]):(h=u.stores,h===null?u.stores=[l]:h.push(l))}function qc(l,u,h,y){u.value=h,u.getSnapshot=y,Ku(u)&&ku(l)}function nd(l,u,h){return h(function(){Ku(u)&&ku(l)})}function Ku(l){var u=l.getSnapshot;l=l.value;try{var h=u();return!ga(l,h)}catch{return!0}}function ku(l){var u=Za(l,2);u!==null&&Cn(u,l,2)}function ka(l){var u=nn();if(typeof l=="function"){var h=l;if(l=h(),el){H(!0);try{h()}finally{H(!1)}}}return u.memoizedState=u.baseState=l,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fi,lastRenderedState:l},u}function oa(l,u,h,y){return l.baseState=h,qi(l,oe,typeof y=="function"?y:fi)}function ad(l,u,h,y,_){if(rs(l))throw Error(o(485));if(l=u.action,l!==null){var T={payload:_,action:l,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,y(T),h=u.pending,h===null?(T.next=u.pending=T,id(u,T)):(T.next=h.next,u.pending=h.next=T)}}function id(l,u){var h=u.action,y=u.payload,_=l.state;if(u.isTransition){var T=Nt.T,N={};Nt.T=N;try{var q=h(_,y),P=Nt.S;P!==null&&P(N,q),lo(l,u,q)}catch(ut){Js(l,u,ut)}finally{Nt.T=T}}else try{T=h(_,y),lo(l,u,T)}catch(ut){Js(l,u,ut)}}function lo(l,u,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(y){Yc(l,u,y)},function(y){return Js(l,u,y)}):Yc(l,u,h)}function Yc(l,u,h){u.status="fulfilled",u.value=h,ld(u),l.state=h,u=l.pending,u!==null&&(h=u.next,h===u?l.pending=null:(h=h.next,u.next=h,id(l,h)))}function Js(l,u,h){var y=l.pending;if(l.pending=null,y!==null){y=y.next;do u.status="rejected",u.reason=h,ld(u),u=u.next;while(u!==y)}l.action=null}function ld(l){l=l.listeners;for(var u=0;u<l.length;u++)(0,l[u])()}function ca(l,u){return u}function so(l,u){if(ae){var h=Kt.formState;if(h!==null){t:{var y=Xt;if(ae){if(_n){var _=jd(_n,ja);if(_){_n=Lf(_),y=qd(_);break t}}re(y)}y=!1}y&&(u=h[0])}}h=nn(),h.memoizedState=h.baseState=u,y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:u},h.queue=y,h=ho.bind(null,Xt,y),y.dispatch=h,y=ka(!1);var T=mo.bind(null,Xt,!1,y.queue);return y=nn(),_={state:u,dispatch:null,action:l,pending:null},y.queue=_,h=ad.bind(null,Xt,_,T,h),_.dispatch=h,y.memoizedState=l,[u,h,!1]}function Lc(l){var u=Ce();return uo(u,oe,l)}function uo(l,u,h){u=qi(l,u,ca)[0],l=Zu(fi)[0],u=typeof u=="object"&&u!==null&&typeof u.then=="function"?Gi(u):u;var y=Ce(),_=y.queue,T=_.dispatch;return h!==y.memoizedState&&(Xt.flags|=2048,is(9,Ps.bind(null,_,h),{destroy:void 0},null)),[u,T,l]}function Ps(l,u){l.action=u}function Xc(l){var u=Ce(),h=oe;if(h!==null)return uo(u,h,l);Ce(),u=u.memoizedState,h=Ce();var y=h.queue.dispatch;return h.memoizedState=l,[u,y,!1]}function is(l,u,h,y){return l={tag:l,create:u,inst:h,deps:y,next:null},u=Xt.updateQueue,u===null&&(u=nc(),Xt.updateQueue=u),h=u.lastEffect,h===null?u.lastEffect=l.next=l:(y=h.next,h.next=l,l.next=y,u.lastEffect=l),l}function ls(){return Ce().memoizedState}function ro(l,u,h,y){var _=nn();Xt.flags|=l,_.memoizedState=is(1|u,h,{destroy:void 0},y===void 0?null:y)}function Ju(l,u,h,y){var _=Ce();y=y===void 0?null:y;var T=_.memoizedState.inst;oe!==null&&y!==null&&bn(y,oe.memoizedState.deps)?_.memoizedState=is(u,h,T,y):(Xt.flags|=l,_.memoizedState=is(1|u,h,T,y))}function Vc(l,u){ro(8390656,8,l,u)}function Pu(l,u){Ju(2048,8,l,u)}function sd(l,u){return Ju(4,2,l,u)}function ud(l,u){return Ju(4,4,l,u)}function Wu(l,u){if(typeof u=="function"){l=l();var h=u(l);return function(){typeof h=="function"?h():u(null)}}if(u!=null)return l=l(),u.current=l,function(){u.current=null}}function hi(l,u,h){h=h!=null?h.concat([l]):null,Ju(4,4,Wu.bind(null,u,l),h)}function Fu(){}function oo(l,u){var h=Ce();u=u===void 0?null:u;var y=h.memoizedState;return u!==null&&bn(u,y[1])?y[0]:(h.memoizedState=[l,u],l)}function ss(l,u){var h=Ce();u=u===void 0?null:u;var y=h.memoizedState;if(u!==null&&bn(u,y[1]))return y[0];if(y=l(),el){H(!0);try{l()}finally{H(!1)}}return h.memoizedState=[y,u],y}function gl(l,u,h){return h===void 0||(Mi&1073741824)!==0?l.memoizedState=u:(l.memoizedState=h,l=pi(),Xt.lanes|=l,Ca|=l,h)}function Qc(l,u,h,y){return ga(h,u)?h:Ai.current!==null?(l=gl(l,h,y),ga(l,u)||(Xe=!0),l):(Mi&42)===0?(Xe=!0,l.memoizedState=h):(l=pi(),Xt.lanes|=l,Ca|=l,u)}function co(l,u,h,y,_){var T=an();Mn(T!==0&&8>T?T:8);var N=Nt.T,q={};Nt.T=q,mo(l,!1,u,h);try{var P=_(),ut=Nt.S;if(ut!==null&&ut(q,P),P!==null&&typeof P=="object"&&typeof P.then=="function"){var yt=Fh(P,y);xl(l,u,yt,Gn(l))}else xl(l,u,y,Gn(l))}catch(St){xl(l,u,{then:function(){},status:"rejected",reason:St},Gn())}finally{Mn(T),Nt.T=N}}function Zc(l){var u=l.memoizedState;if(u!==null)return u;u={memoizedState:Wn,baseState:Wn,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fi,lastRenderedState:Wn},next:null};var h={};return u.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fi,lastRenderedState:h},next:null},l.memoizedState=u,l=l.alternate,l!==null&&(l.memoizedState=u),u}function us(){return pn(wt)}function di(){return Ce().memoizedState}function fo(){return Ce().memoizedState}function Iu(l){for(var u=l.return;u!==null;){switch(u.tag){case 24:case 3:var h=Gn();l=Ua(h);var y=Je(u,l,h);y!==null&&(Cn(y,u,h),Ba(y,u,h)),u={cache:xo()},l.payload=u;return}u=u.return}}function vl(l,u,h){var y=Gn();h={lane:y,revertLane:0,action:h,hasEagerState:!1,eagerState:null,next:null},rs(l)?$u(u,h):(h=ts(l,u,h,y),h!==null&&(Cn(h,l,y),Kc(h,u,y)))}function ho(l,u,h){var y=Gn();xl(l,u,h,y)}function xl(l,u,h,y){var _={lane:y,revertLane:0,action:h,hasEagerState:!1,eagerState:null,next:null};if(rs(l))$u(u,_);else{var T=l.alternate;if(l.lanes===0&&(T===null||T.lanes===0)&&(T=u.lastRenderedReducer,T!==null))try{var N=u.lastRenderedState,q=T(N,h);if(_.hasEagerState=!0,_.eagerState=q,ga(q,N))return Zn(l,u,_,0),Kt===null&&rn(),!1}catch{}finally{}if(h=ts(l,u,_,y),h!==null)return Cn(h,l,y),Kc(h,u,y),!0}return!1}function mo(l,u,h,y){if(y={lane:2,revertLane:Fr(),action:y,hasEagerState:!1,eagerState:null,next:null},rs(l)){if(u)throw Error(o(479))}else u=ts(l,h,y,2),u!==null&&Cn(u,l,2)}function rs(l){var u=l.alternate;return l===Xt||u!==null&&u===Xt}function $u(l,u){ze=La=!0;var h=l.pending;h===null?u.next=u:(u.next=h.next,h.next=u),l.pending=u}function Kc(l,u,h){if((h&4194176)!==0){var y=u.lanes;y&=l.pendingLanes,h|=y,u.lanes=h,xt(l,h)}}function Tn(l,u,h,y){u=l.memoizedState,h=h(y,u),h=h==null?u:vs({},u,h),l.memoizedState=h,l.lanes===0&&(l.updateQueue.baseState=h)}function _l(l,u,h,y,_,T,N){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(y,T,N):u.prototype&&u.prototype.isPureReactComponent?!ns(h,y)||!ns(_,T):!0}function tr(l,u,h,y){l=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(h,y),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(h,y),u.state!==l&&ac.enqueueReplaceState(u,u.state,null)}function Ja(l,u){var h=u;if("ref"in u){h={};for(var y in u)y!=="ref"&&(h[y]=u[y])}if(l=l.defaultProps){h===u&&(h=vs({},h));for(var _ in l)h[_]===void 0&&(h[_]=l[_])}return h}function po(l,u){try{var h=l.onUncaughtError;h(u.value,{componentStack:u.stack})}catch(y){setTimeout(function(){throw y})}}function yo(l,u,h){try{var y=l.onCaughtError;y(h.value,{componentStack:h.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(_){setTimeout(function(){throw _})}}function er(l,u,h){return h=Ua(h),h.tag=3,h.payload={element:null},h.callback=function(){po(l,u)},h}function Ws(l){return l=Ua(l),l.tag=3,l}function nr(l,u,h,y){var _=h.type.getDerivedStateFromError;if(typeof _=="function"){var T=y.value;l.payload=function(){return _(T)},l.callback=function(){yo(u,h,y)}}var N=h.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(l.callback=function(){yo(u,h,y),typeof _!="function"&&(Ma===null?Ma=new Set([this]):Ma.add(this));var q=y.stack;this.componentDidCatch(y.value,{componentStack:q!==null?q:""})})}function rd(l,u,h,y,_){if(h.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){if(u=h.alternate,u!==null&&os(u,h,_,!0),h=Ta.current,h!==null){switch(h.tag){case 13:return Ya===null?Pn():h.alternate===null&&te===0&&(te=3),h.flags&=-257,h.flags|=65536,h.lanes=_,y===ec?h.flags|=16384:(u=h.updateQueue,u===null?h.updateQueue=new Set([y]):u.add(y),Uo(l,y,_)),!1;case 22:return h.flags|=65536,y===ec?h.flags|=16384:(u=h.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([y])},h.updateQueue=u):(h=u.retryQueue,h===null?u.retryQueue=new Set([y]):h.add(y)),Uo(l,y,_)),!1}throw Error(o(435,h.tag))}return Uo(l,y,_),Pn(),!1}if(ae)return u=Ta.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=_,y!==Or&&(l=Error(o(422),{cause:y}),Qn(et(l,h)))):(y!==Or&&(u=Error(o(423),{cause:y}),Qn(et(u,h))),l=l.current.alternate,l.flags|=65536,_&=-_,l.lanes|=_,y=et(y,h),_=er(l.stateNode,y,_),Bn(l,_),te!==4&&(te=2)),!1;var T=Error(o(520),{cause:y});if(T=et(T,h),Cu===null?Cu=[T]:Cu.push(T),te!==4&&(te=2),u===null)return!0;y=et(y,h),h=u;do{switch(h.tag){case 3:return h.flags|=65536,l=_&-_,h.lanes|=l,l=er(h.stateNode,y,l),Bn(h,l),!1;case 1:if(u=h.type,T=h.stateNode,(h.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Ma===null||!Ma.has(T))))return h.flags|=65536,_&=-_,h.lanes|=_,_=Ws(_),nr(_,l,h,y),Bn(h,_),!1}h=h.return}while(h!==null);return!1}function mn(l,u,h,y){u.child=l===null?nh(u,null,h,y):Ql(u,l.child,h,y)}function od(l,u,h,y,_){h=h.render;var T=u.ref;if("ref"in y){var N={};for(var q in y)q!=="ref"&&(N[q]=y[q])}else N=y;return cs(u),y=pl(l,u,h,N,T,_),q=io(),l!==null&&!Xe?(as(l,u,_),Yi(l,u,_)):(ae&&q&&I(u),u.flags|=1,mn(l,u,y,_),u.child)}function cd(l,u,h,y,_){if(l===null){var T=h.type;return typeof T=="function"&&!Ki(T)&&T.defaultProps===void 0&&h.compare===null?(u.tag=15,u.type=T,go(l,u,T,y,_)):(l=wa(h.type,null,y,u,u.mode,_),l.ref=u.ref,l.return=u,u.child=l)}if(T=l.child,!$c(l,_)){var N=T.memoizedProps;if(h=h.compare,h=h!==null?h:ns,h(N,y)&&l.ref===u.ref)return Yi(l,u,_)}return u.flags|=1,l=An(T,y),l.ref=u.ref,l.return=u,u.child=l}function go(l,u,h,y,_){if(l!==null){var T=l.memoizedProps;if(ns(T,y)&&l.ref===u.ref)if(Xe=!1,u.pendingProps=y=T,$c(l,_))(l.flags&131072)!==0&&(Xe=!0);else return u.lanes=l.lanes,Yi(l,u,_)}return kc(l,u,h,y,_)}function fd(l,u,h){var y=u.pendingProps,_=y.children,T=(u.stateNode._pendingVisibility&2)!==0,N=l!==null?l.memoizedState:null;if(ar(l,u),y.mode==="hidden"||T){if((u.flags&128)!==0){if(y=N!==null?N.baseLanes|h:h,l!==null){for(_=u.child=l.child,T=0;_!==null;)T=T|_.lanes|_.childLanes,_=_.sibling;u.childLanes=T&~y}else u.childLanes=0,u.child=null;return hd(l,u,y,h)}if((h&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},l!==null&&_o(u,N!==null?N.cachePool:null),N!==null?Gc(u,N):to(),no(u);else return u.lanes=u.childLanes=536870912,hd(l,u,N!==null?N.baseLanes|h:h,h)}else N!==null?(_o(u,N.cachePool),Gc(u,N),Hi(),u.memoizedState=null):(l!==null&&_o(u,null),to(),Hi());return mn(l,u,_,h),u.child}function hd(l,u,h,y){var _=Tl();return _=_===null?null:{parent:Si?fe._currentValue:fe._currentValue2,pool:_},u.memoizedState={baseLanes:h,cachePool:_},l!==null&&_o(u,null),to(),no(u),l!==null&&os(l,u,y,!0),null}function ar(l,u){var h=u.ref;if(h===null)l!==null&&l.ref!==null&&(u.flags|=2097664);else{if(typeof h!="function"&&typeof h!="object")throw Error(o(284));(l===null||l.ref!==h)&&(u.flags|=2097664)}}function kc(l,u,h,y,_){return cs(u),h=pl(l,u,h,y,void 0,_),y=io(),l!==null&&!Xe?(as(l,u,_),Yi(l,u,_)):(ae&&y&&I(u),u.flags|=1,mn(l,u,h,_),u.child)}function dd(l,u,h,y,_,T){return cs(u),u.updateQueue=null,h=td(u,y,h,_),ao(l),y=io(),l!==null&&!Xe?(as(l,u,T),Yi(l,u,T)):(ae&&y&&I(u),u.flags|=1,mn(l,u,h,T),u.child)}function Jc(l,u,h,y,_){if(cs(u),u.stateNode===null){var T=Ts,N=h.contextType;typeof N=="object"&&N!==null&&(T=pn(N)),T=new h(y,T),u.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,T.updater=ac,u.stateNode=T,T._reactInternals=u,T=u.stateNode,T.props=y,T.state=u.memoizedState,T.refs={},wc(u),N=h.contextType,T.context=typeof N=="object"&&N!==null?pn(N):Ts,T.state=u.memoizedState,N=h.getDerivedStateFromProps,typeof N=="function"&&(Tn(u,h,N,y),T.state=u.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&&ac.enqueueReplaceState(T,T.state,null),Yu(u,y,T,_),qu(),T.state=u.memoizedState),typeof T.componentDidMount=="function"&&(u.flags|=4194308),y=!0}else if(l===null){T=u.stateNode;var q=u.memoizedProps,P=Ja(h,q);T.props=P;var ut=T.context,yt=h.contextType;N=Ts,typeof yt=="object"&&yt!==null&&(N=pn(yt));var St=h.getDerivedStateFromProps;yt=typeof St=="function"||typeof T.getSnapshotBeforeUpdate=="function",q=u.pendingProps!==q,yt||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(q||ut!==N)&&tr(u,T,y,N),tl=!1;var bt=u.memoizedState;T.state=bt,Yu(u,y,T,_),qu(),ut=u.memoizedState,q||bt!==ut||tl?(typeof St=="function"&&(Tn(u,h,St,y),ut=u.memoizedState),(P=tl||_l(u,h,P,y,bt,ut,N))?(yt||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"&&(u.flags|=4194308)):(typeof T.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=y,u.memoizedState=ut),T.props=y,T.state=ut,T.context=N,y=P):(typeof T.componentDidMount=="function"&&(u.flags|=4194308),y=!1)}else{T=u.stateNode,Hc(l,u),N=u.memoizedProps,yt=Ja(h,N),T.props=yt,St=u.pendingProps,bt=T.context,ut=h.contextType,P=Ts,typeof ut=="object"&&ut!==null&&(P=pn(ut)),q=h.getDerivedStateFromProps,(ut=typeof q=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(N!==St||bt!==P)&&tr(u,T,y,P),tl=!1,bt=u.memoizedState,T.state=bt,Yu(u,y,T,_),qu();var Gt=u.memoizedState;N!==St||bt!==Gt||tl||l!==null&&l.dependencies!==null&&bl(l.dependencies)?(typeof q=="function"&&(Tn(u,h,q,y),Gt=u.memoizedState),(yt=tl||_l(u,h,yt,y,bt,Gt,P)||l!==null&&l.dependencies!==null&&bl(l.dependencies))?(ut||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(y,Gt,P),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(y,Gt,P)),typeof T.componentDidUpdate=="function"&&(u.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof T.componentDidUpdate!="function"||N===l.memoizedProps&&bt===l.memoizedState||(u.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||N===l.memoizedProps&&bt===l.memoizedState||(u.flags|=1024),u.memoizedProps=y,u.memoizedState=Gt),T.props=y,T.state=Gt,T.context=P,y=yt):(typeof T.componentDidUpdate!="function"||N===l.memoizedProps&&bt===l.memoizedState||(u.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||N===l.memoizedProps&&bt===l.memoizedState||(u.flags|=1024),y=!1)}return T=y,ar(l,u),y=(u.flags&128)!==0,T||y?(T=u.stateNode,h=y&&typeof h.getDerivedStateFromError!="function"?null:T.render(),u.flags|=1,l!==null&&y?(u.child=Ql(u,l.child,null,_),u.child=Ql(u,null,h,_)):mn(l,u,h,_),u.memoizedState=T.state,l=u.child):l=Yi(l,u,_),l}function md(l,u,h,y){return Un(),u.flags|=256,mn(l,u,h,y),u.child}function Pc(l){return{baseLanes:l,cachePool:xd()}}function Wc(l,u,h){return l=l!==null?l.childLanes&~h:0,u&&(l|=na),l}function pd(l,u,h){var y=u.pendingProps,_=!1,T=(u.flags&128)!==0,N;if((N=T)||(N=l!==null&&l.memoizedState===null?!1:(Fe.current&2)!==0),N&&(_=!0,u.flags&=-129),N=(u.flags&32)!==0,u.flags&=-33,l===null){if(ae){if(_?oi(u):Hi(),ae){var q=_n,P;(P=q)&&(q=Qd(q,ja),q!==null?(u.memoizedState={dehydrated:q,treeContext:$a!==null?{id:Ei,overflow:Ga}:null,retryLane:536870912},P=n(18,null,null,0),P.stateNode=q,P.return=u,u.child=P,Rn=u,_n=null,P=!0):P=!1),P||re(u)}if(q=u.memoizedState,q!==null&&(q=q.dehydrated,q!==null))return Tr(q)?u.lanes=16:u.lanes=536870912,null;ci(u)}return q=y.children,y=y.fallback,_?(Hi(),_=u.mode,q=Fc({mode:"hidden",children:q},_),y=Ji(y,_,h,null),q.return=u,y.return=u,q.sibling=y,u.child=q,_=u.child,_.memoizedState=Pc(h),_.childLanes=Wc(l,N,h),u.memoizedState=Dn,y):(oi(u),ir(u,q))}if(P=l.memoizedState,P!==null&&(q=P.dehydrated,q!==null)){if(T)u.flags&256?(oi(u),u.flags&=-257,u=Ic(l,u,h)):u.memoizedState!==null?(Hi(),u.child=l.child,u.flags|=128,u=null):(Hi(),_=y.fallback,q=u.mode,y=Fc({mode:"visible",children:y.children},q),_=Ji(_,q,h,null),_.flags|=2,y.return=u,_.return=u,y.sibling=_,u.child=y,Ql(u,l.child,null,h),y=u.child,y.memoizedState=Pc(h),y.childLanes=Wc(l,N,h),u.memoizedState=Dn,u=_);else if(oi(u),Tr(q))N=Gd(q).digest,y=Error(o(419)),y.stack="",y.digest=N,Qn({value:y,source:null,stack:null}),u=Ic(l,u,h);else if(Xe||os(l,u,h,!1),N=(h&l.childLanes)!==0,Xe||N){if(N=Kt,N!==null){if(y=h&-h,(y&42)!==0)y=1;else switch(y){case 2:y=1;break;case 8:y=4;break;case 32:y=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:y=64;break;case 268435456:y=134217728;break;default:y=0}if(y=(y&(N.suspendedLanes|h))!==0?0:y,y!==0&&y!==P.retryLane)throw P.retryLane=y,Za(l,y),Cn(N,l,y),lm}Zo(q)||Pn(),u=Ic(l,u,h)}else Zo(q)?(u.flags|=128,u.child=l.child,u=ys.bind(null,l),_p(q,u),u=null):(l=P.treeContext,jn&&(_n=Ld(q),Rn=u,ae=!0,_a=null,ja=!1,l!==null&&(va[xa++]=Ei,va[xa++]=Ga,va[xa++]=$a,Ei=l.id,Ga=l.overflow,$a=u)),u=ir(u,y.children),u.flags|=4096);return u}return _?(Hi(),_=y.fallback,q=u.mode,P=l.child,T=P.sibling,y=An(P,{mode:"hidden",children:y.children}),y.subtreeFlags=P.subtreeFlags&31457280,T!==null?_=An(T,_):(_=Ji(_,q,h,null),_.flags|=2),_.return=u,y.return=u,y.sibling=_,u.child=y,y=_,_=u.child,q=l.child.memoizedState,q===null?q=Pc(h):(P=q.cachePool,P!==null?(T=Si?fe._currentValue:fe._currentValue2,P=P.parent!==T?{parent:T,pool:T}:P):P=xd(),q={baseLanes:q.baseLanes|h,cachePool:P}),_.memoizedState=q,_.childLanes=Wc(l,N,h),u.memoizedState=Dn,y):(oi(u),h=l.child,l=h.sibling,h=An(h,{mode:"visible",children:y.children}),h.return=u,h.sibling=null,l!==null&&(N=u.deletions,N===null?(u.deletions=[l],u.flags|=16):N.push(l)),u.child=h,u.memoizedState=null,h)}function ir(l,u){return u=Fc({mode:"visible",children:u},l.mode),u.return=l,l.child=u}function Fc(l,u){return Bo(l,u,0,null)}function Ic(l,u,h){return Ql(u,l.child,null,h),l=ir(u,u.pendingProps.children),l.flags|=2,u.memoizedState=null,l}function yd(l,u,h){l.lanes|=u;var y=l.alternate;y!==null&&(y.lanes|=u),tf(l.return,u,h)}function vo(l,u,h,y,_){var T=l.memoizedState;T===null?l.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:y,tail:h,tailMode:_}:(T.isBackwards=u,T.rendering=null,T.renderingStartTime=0,T.last=y,T.tail=h,T.tailMode=_)}function gd(l,u,h){var y=u.pendingProps,_=y.revealOrder,T=y.tail;if(mn(l,u,y.children,h),y=Fe.current,(y&2)!==0)y=y&1|2,u.flags|=128;else{if(l!==null&&(l.flags&128)!==0)t:for(l=u.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&yd(l,h,u);else if(l.tag===19)yd(l,h,u);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===u)break t;for(;l.sibling===null;){if(l.return===null||l.return===u)break t;l=l.return}l.sibling.return=l.return,l=l.sibling}y&=1}switch(B(Fe,y),_){case"forwards":for(h=u.child,_=null;h!==null;)l=h.alternate,l!==null&&Ka(l)===null&&(_=h),h=h.sibling;h=_,h===null?(_=u.child,u.child=null):(_=h.sibling,h.sibling=null),vo(u,!1,_,h,T);break;case"backwards":for(h=null,_=u.child,u.child=null;_!==null;){if(l=_.alternate,l!==null&&Ka(l)===null){u.child=_;break}l=_.sibling,_.sibling=h,h=_,_=l}vo(u,!0,h,null,T);break;case"together":vo(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function Yi(l,u,h){if(l!==null&&(u.dependencies=l.dependencies),Ca|=u.lanes,(h&u.childLanes)===0)if(l!==null){if(os(l,u,h,!1),(h&u.childLanes)===0)return null}else return null;if(l!==null&&u.child!==l.child)throw Error(o(153));if(u.child!==null){for(l=u.child,h=An(l,l.pendingProps),u.child=h,h.return=u;l.sibling!==null;)l=l.sibling,h=h.sibling=An(l,l.pendingProps),h.return=u;h.sibling=null}return u.child}function $c(l,u){return(l.lanes&u)!==0?!0:(l=l.dependencies,!!(l!==null&&bl(l)))}function gp(l,u,h){switch(u.tag){case 3:pt(u,u.stateNode.containerInfo),Sl(u,fe,l.memoizedState.cache),Un();break;case 27:case 5:Ot(u);break;case 4:pt(u,u.stateNode.containerInfo);break;case 10:Sl(u,u.type,u.memoizedProps.value);break;case 13:var y=u.memoizedState;if(y!==null)return y.dehydrated!==null?(oi(u),u.flags|=128,null):(h&u.child.childLanes)!==0?pd(l,u,h):(oi(u),l=Yi(l,u,h),l!==null?l.sibling:null);oi(u);break;case 19:var _=(l.flags&128)!==0;if(y=(h&u.childLanes)!==0,y||(os(l,u,h,!1),y=(h&u.childLanes)!==0),_){if(y)return gd(l,u,h);u.flags|=128}if(_=u.memoizedState,_!==null&&(_.rendering=null,_.tail=null,_.lastEffect=null),B(Fe,Fe.current),y)break;return null;case 22:case 23:return u.lanes=0,fd(l,u,h);case 24:Sl(u,fe,l.memoizedState.cache)}return Yi(l,u,h)}function vd(l,u,h){if(l!==null)if(l.memoizedProps!==u.pendingProps)Xe=!0;else{if(!$c(l,h)&&(u.flags&128)===0)return Xe=!1,gp(l,u,h);Xe=(l.flags&131072)!==0}else Xe=!1,ae&&(u.flags&1048576)!==0&&j(u,zr,u.index);switch(u.lanes=0,u.tag){case 16:t:{l=u.pendingProps;var y=u.elementType,_=y._init;if(y=_(y._payload),u.type=y,typeof y=="function")Ki(y)?(l=Ja(y,l),u.tag=1,u=Jc(null,u,y,l,h)):(u.tag=0,u=kc(null,u,y,l,h));else{if(y!=null){if(_=y.$$typeof,_===hu){u.tag=11,u=od(null,u,y,l,h);break t}else if(_===pr){u.tag=14,u=cd(null,u,y,l,h);break t}}throw u=d(y)||y,Error(o(306,u,""))}}return u;case 0:return kc(l,u,u.type,u.pendingProps,h);case 1:return y=u.type,_=Ja(y,u.pendingProps),Jc(l,u,y,_,h);case 3:t:{if(pt(u,u.stateNode.containerInfo),l===null)throw Error(o(387));var T=u.pendingProps;_=u.memoizedState,y=_.element,Hc(l,u),Yu(u,T,null,h);var N=u.memoizedState;if(T=N.cache,Sl(u,fe,T),T!==_.cache&&ef(u,[fe],h,!0),qu(),T=N.element,jn&&_.isDehydrated)if(_={element:T,isDehydrated:!1,cache:N.cache},u.updateQueue.baseState=_,u.memoizedState=_,u.flags&256){u=md(l,u,T,h);break t}else if(T!==y){y=et(Error(o(424)),u),Qn(y),u=md(l,u,T,h);break t}else for(jn&&(_n=Yd(u.stateNode.containerInfo),Rn=u,ae=!0,_a=null,ja=!0),h=nh(u,null,T,h),u.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(Un(),T===y){u=Yi(l,u,h);break t}mn(l,u,T,h)}u=u.child}return u;case 26:if(ya)return ar(l,u),l===null?(h=Wo(u.type,null,u.pendingProps,null))?u.memoizedState=h:ae||(u.stateNode=bp(u.type,u.pendingProps,ti.current,u)):u.memoizedState=Wo(u.type,l.memoizedProps,u.pendingProps,l.memoizedState),null;case 27:if(vn)return Ot(u),l===null&&vn&&ae&&(y=u.stateNode=If(u.type,u.pendingProps,ti.current,dn.current,!1),Rn=u,ja=!0,_n=Ko(y)),y=u.pendingProps.children,l!==null||ae?mn(l,u,y,h):u.child=Ql(u,null,y,h),ar(l,u),u.child;case 5:return l===null&&ae&&(Pd(u.type,u.pendingProps,dn.current),(_=y=_n)&&(y=Xd(y,u.type,u.pendingProps,ja),y!==null?(u.stateNode=y,Rn=u,_n=Ko(y),ja=!1,_=!0):_=!1),_||re(u)),Ot(u),_=u.type,T=u.pendingProps,N=l!==null?l.memoizedProps:null,y=T.children,ql(_,T)?y=null:N!==null&&ql(_,N)&&(u.flags|=32),u.memoizedState!==null&&(_=pl(l,u,yp,null,null,h),Si?wt._currentValue=_:wt._currentValue2=_),ar(l,u),mn(l,u,y,h),u.child;case 6:return l===null&&ae&&(Wd(u.pendingProps,dn.current),(l=h=_n)&&(h=Vd(h,u.pendingProps,ja),h!==null?(u.stateNode=h,Rn=u,_n=null,l=!0):l=!1),l||re(u)),null;case 13:return pd(l,u,h);case 4:return pt(u,u.stateNode.containerInfo),y=u.pendingProps,l===null?u.child=Ql(u,null,y,h):mn(l,u,y,h),u.child;case 11:return od(l,u,u.type,u.pendingProps,h);case 7:return mn(l,u,u.pendingProps,h),u.child;case 8:return mn(l,u,u.pendingProps.children,h),u.child;case 12:return mn(l,u,u.pendingProps.children,h),u.child;case 10:return y=u.pendingProps,Sl(u,u.type,y.value),mn(l,u,y.children,h),u.child;case 9:return _=u.type._context,y=u.pendingProps.children,cs(u),_=pn(_),y=y(_),u.flags|=1,mn(l,u,y,h),u.child;case 14:return cd(l,u,u.type,u.pendingProps,h);case 15:return go(l,u,u.type,u.pendingProps,h);case 19:return gd(l,u,h);case 22:return fd(l,u,h);case 24:return cs(u),y=pn(fe),l===null?(_=Tl(),_===null&&(_=Kt,T=xo(),_.pooledCache=T,T.refCount++,T!==null&&(_.pooledCacheLanes|=h),_=T),u.memoizedState={parent:y,cache:_},wc(u),Sl(u,fe,_)):((l.lanes&h)!==0&&(Hc(l,u),Yu(u,null,null,h),qu()),_=l.memoizedState,T=u.memoizedState,_.parent!==y?(_={parent:y,cache:y},u.memoizedState=_,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=_),Sl(u,fe,y)):(y=T.cache,Sl(u,fe,y),y!==_.cache&&ef(u,[fe],h,!0))),mn(l,u,u.pendingProps.children,h),u.child;case 29:throw u.pendingProps}throw Error(o(156,u.tag))}function Sl(l,u,h){Si?(B(ta,u._currentValue),u._currentValue=h):(B(ta,u._currentValue2),u._currentValue2=h)}function Li(l){var u=ta.current;Si?l._currentValue=u:l._currentValue2=u,O(ta)}function tf(l,u,h){for(;l!==null;){var y=l.alternate;if((l.childLanes&u)!==u?(l.childLanes|=u,y!==null&&(y.childLanes|=u)):y!==null&&(y.childLanes&u)!==u&&(y.childLanes|=u),l===h)break;l=l.return}}function ef(l,u,h,y){var _=l.child;for(_!==null&&(_.return=l);_!==null;){var T=_.dependencies;if(T!==null){var N=_.child;T=T.firstContext;t:for(;T!==null;){var q=T;T=_;for(var P=0;P<u.length;P++)if(q.context===u[P]){T.lanes|=h,q=T.alternate,q!==null&&(q.lanes|=h),tf(T.return,h,l),y||(N=null);break t}T=q.next}}else if(_.tag===18){if(N=_.return,N===null)throw Error(o(341));N.lanes|=h,T=N.alternate,T!==null&&(T.lanes|=h),tf(N,h,l),N=null}else N=_.child;if(N!==null)N.return=_;else for(N=_;N!==null;){if(N===l){N=null;break}if(_=N.sibling,_!==null){_.return=N.return,N=_;break}N=N.return}_=N}}function os(l,u,h,y){l=null;for(var _=u,T=!1;_!==null;){if(!T){if((_.flags&524288)!==0)T=!0;else if((_.flags&262144)!==0)break}if(_.tag===10){var N=_.alternate;if(N===null)throw Error(o(387));if(N=N.memoizedProps,N!==null){var q=_.type;ga(_.pendingProps.value,N.value)||(l!==null?l.push(q):l=[q])}}else if(_===xu.current){if(N=_.alternate,N===null)throw Error(o(387));N.memoizedState.memoizedState!==_.memoizedState.memoizedState&&(l!==null?l.push(wt):l=[wt])}_=_.return}l!==null&&ef(u,l,h,y),u.flags|=262144}function bl(l){for(l=l.firstContext;l!==null;){var u=l.context;if(!ga(Si?u._currentValue:u._currentValue2,l.memoizedValue))return!0;l=l.next}return!1}function cs(l){Kl=l,Ge=null,l=l.dependencies,l!==null&&(l.firstContext=null)}function pn(l){return nf(Kl,l)}function lr(l,u){return Kl===null&&cs(l),nf(l,u)}function nf(l,u){var h=Si?u._currentValue:u._currentValue2;if(u={context:u,memoizedValue:h,next:null},Ge===null){if(l===null)throw Error(o(308));Ge=u,l.dependencies={lanes:0,firstContext:u},l.flags|=524288}else Ge=Ge.next=u;return h}function xo(){return{controller:new sm,data:new Map,refCount:0}}function Fs(l){l.refCount--,l.refCount===0&&nl(As,function(){l.controller.abort()})}function Tl(){var l=al.current;return l!==null?l:Kt.pooledCache}function _o(l,u){u===null?B(al,al.current):B(al,u.pool)}function xd(){var l=Tl();return l===null?null:{parent:Si?fe._currentValue:fe._currentValue2,pool:l}}function fa(l){l.flags|=4}function af(l,u){if(l!==null&&l.child===u.child)return!1;if((u.flags&16)!==0)return!0;for(l=u.child;l!==null;){if((l.flags&13878)!==0||(l.subtreeFlags&13878)!==0)return!0;l=l.sibling}return!1}function So(l,u,h,y){if(gn)for(h=u.child;h!==null;){if(h.tag===5||h.tag===6)_i(l,h.stateNode);else if(!(h.tag===4||vn&&h.tag===27)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===u)break;for(;h.sibling===null;){if(h.return===null||h.return===u)return;h=h.return}h.sibling.return=h.return,h=h.sibling}else if(ma)for(var _=u.child;_!==null;){if(_.tag===5){var T=_.stateNode;h&&y&&(T=qf(T,_.type,_.memoizedProps)),_i(l,T)}else if(_.tag===6)T=_.stateNode,h&&y&&(T=Yf(T,_.memoizedProps)),_i(l,T);else if(_.tag!==4){if(_.tag===22&&_.memoizedState!==null)T=_.child,T!==null&&(T.return=_),So(l,_,!0,!0);else if(_.child!==null){_.child.return=_,_=_.child;continue}}if(_===u)break;for(;_.sibling===null;){if(_.return===null||_.return===u)return;_=_.return}_.sibling.return=_.return,_=_.sibling}}function Is(l,u,h,y){if(ma)for(var _=u.child;_!==null;){if(_.tag===5){var T=_.stateNode;h&&y&&(T=qf(T,_.type,_.memoizedProps)),Gf(l,T)}else if(_.tag===6)T=_.stateNode,h&&y&&(T=Yf(T,_.memoizedProps)),Gf(l,T);else if(_.tag!==4){if(_.tag===22&&_.memoizedState!==null)T=_.child,T!==null&&(T.return=_),Is(l,_,!(_.memoizedProps!==null&&_.memoizedProps.mode==="manual"),!0);else if(_.child!==null){_.child.return=_,_=_.child;continue}}if(_===u)break;for(;_.sibling===null;){if(_.return===null||_.return===u)return;_=_.return}_.sibling.return=_.return,_=_.sibling}}function $s(l,u){if(ma&&af(l,u)){l=u.stateNode;var h=l.containerInfo,y=Qo();Is(y,u,!1,!1),l.pendingChildren=y,fa(u),Hd(h,y)}}function lf(l,u,h,y){if(gn)l.memoizedProps!==y&&fa(u);else if(ma){var _=l.stateNode,T=l.memoizedProps;if((l=af(l,u))||T!==y){var N=dn.current;T=Hf(_,h,T,y,!l,null),T===_?u.stateNode=_:(Wi(T,h,y,N)&&fa(u),u.stateNode=T,l?So(T,u,!1,!1):fa(u))}else u.stateNode=_}}function tu(l,u,h){if(Ud(u,h)){if(l.flags|=16777216,!Fi(u,h))if(fr())l.flags|=8192;else throw Cs=ec,eh}else l.flags&=-16777217}function sf(l,u){if(Fd(u)){if(l.flags|=16777216,!Wf(u))if(fr())l.flags|=8192;else throw Cs=ec,eh}else l.flags&=-16777217}function sr(l,u){u!==null&&(l.flags|=4),l.flags&16384&&(u=l.tag!==22?ct():536870912,l.lanes|=u,ll|=u)}function fs(l,u){if(!ae)switch(l.tailMode){case"hidden":u=l.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?l.tail=null:h.sibling=null;break;case"collapsed":h=l.tail;for(var y=null;h!==null;)h.alternate!==null&&(y=h),h=h.sibling;y===null?u||l.tail===null?l.tail=null:l.tail.sibling=null:y.sibling=null}}function Ae(l){var u=l.alternate!==null&&l.alternate.child===l.child,h=0,y=0;if(u)for(var _=l.child;_!==null;)h|=_.lanes|_.childLanes,y|=_.subtreeFlags&31457280,y|=_.flags&31457280,_.return=l,_=_.sibling;else for(_=l.child;_!==null;)h|=_.lanes|_.childLanes,y|=_.subtreeFlags,y|=_.flags,_.return=l,_=_.sibling;return l.subtreeFlags|=y,l.childLanes=h,u}function _d(l,u,h){var y=u.pendingProps;switch(st(u),u.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ae(u),null;case 1:return Ae(u),null;case 3:return h=u.stateNode,y=null,l!==null&&(y=l.memoizedState.cache),u.memoizedState.cache!==y&&(u.flags|=2048),Li(fe),Tt(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(l===null||l.child===null)&&(Oa(u)?fa(u):l===null||l.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,_a!==null&&(Vi(_a),_a=null))),$s(l,u),Ae(u),null;case 26:if(ya){h=u.type;var _=u.memoizedState;return l===null?(fa(u),_!==null?(Ae(u),sf(u,_)):(Ae(u),tu(u,h,y))):_?_!==l.memoizedState?(fa(u),Ae(u),sf(u,_)):(Ae(u),u.flags&=-16777217):(gn?l.memoizedProps!==y&&fa(u):lf(l,u,h,y),Ae(u),tu(u,h,y)),null}case 27:if(vn){if(Ut(u),h=ti.current,_=u.type,l!==null&&u.stateNode!=null)gn?l.memoizedProps!==y&&fa(u):lf(l,u,_,y);else{if(!y){if(u.stateNode===null)throw Error(o(166));return Ae(u),null}l=dn.current,Oa(u)?ue(u,l):(l=If(_,y,h,l,!0),u.stateNode=l,fa(u))}return Ae(u),null}case 5:if(Ut(u),h=u.type,l!==null&&u.stateNode!=null)lf(l,u,h,y);else{if(!y){if(u.stateNode===null)throw Error(o(166));return Ae(u),null}l=dn.current,Oa(u)?ue(u,l):(_=Cf(h,y,ti.current,l,u),So(_,u,!1,!1),u.stateNode=_,Wi(_,h,y,l)&&fa(u))}return Ae(u),tu(u,u.type,u.pendingProps),null;case 6:if(l&&u.stateNode!=null)h=l.memoizedProps,gn?h!==y&&fa(u):ma&&(h!==y?(u.stateNode=jo(y,ti.current,dn.current,u),fa(u)):u.stateNode=l.stateNode);else{if(typeof y!="string"&&u.stateNode===null)throw Error(o(166));if(l=ti.current,h=dn.current,Oa(u)){if(!jn)throw Error(o(176));if(l=u.stateNode,h=u.memoizedProps,y=null,_=Rn,_!==null)switch(_.tag){case 27:case 5:y=_.memoizedProps}Zd(l,h,u,y)||re(u)}else u.stateNode=jo(y,l,h,u)}return Ae(u),null;case 13:if(y=u.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(_=Oa(u),y!==null&&y.dehydrated!==null){if(l===null){if(!_)throw Error(o(318));if(!jn)throw Error(o(344));if(_=u.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(o(317));mu(_,u)}else Un(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Ae(u),_=!1}else _a!==null&&(Vi(_a),_a=null),_=!0;if(!_)return u.flags&256?(ci(u),u):(ci(u),null)}if(ci(u),(u.flags&128)!==0)return u.lanes=h,u;if(h=y!==null,l=l!==null&&l.memoizedState!==null,h){y=u.child,_=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(_=y.alternate.memoizedState.cachePool.pool);var T=null;y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(T=y.memoizedState.cachePool.pool),T!==_&&(y.flags|=2048)}return h!==l&&h&&(u.child.flags|=8192),sr(u,u.updateQueue),Ae(u),null;case 4:return Tt(),$s(l,u),l===null&&Rf(u.stateNode.containerInfo),Ae(u),null;case 10:return Li(u.type),Ae(u),null;case 19:if(O(Fe),_=u.memoizedState,_===null)return Ae(u),null;if(y=(u.flags&128)!==0,T=_.rendering,T===null)if(y)fs(_,!1);else{if(te!==0||l!==null&&(l.flags&128)!==0)for(l=u.child;l!==null;){if(T=Ka(l),T!==null){for(u.flags|=128,fs(_,!1),l=T.updateQueue,u.updateQueue=l,sr(u,l),u.subtreeFlags=0,l=h,h=u.child;h!==null;)ki(h,l),h=h.sibling;return B(Fe,Fe.current&1|2),u.child}l=l.sibling}_.tail!==null&&xn()>Ne&&(u.flags|=128,y=!0,fs(_,!1),u.lanes=4194304)}else{if(!y)if(l=Ka(T),l!==null){if(u.flags|=128,y=!0,l=l.updateQueue,u.updateQueue=l,sr(u,l),fs(_,!0),_.tail===null&&_.tailMode==="hidden"&&!T.alternate&&!ae)return Ae(u),null}else 2*xn()-_.renderingStartTime>Ne&&h!==536870912&&(u.flags|=128,y=!0,fs(_,!1),u.lanes=4194304);_.isBackwards?(T.sibling=u.child,u.child=T):(l=_.last,l!==null?l.sibling=T:u.child=T,_.last=T)}return _.tail!==null?(u=_.tail,_.rendering=u,_.tail=u.sibling,_.renderingStartTime=xn(),u.sibling=null,l=Fe.current,B(Fe,y?l&1|2:l&1),u):(Ae(u),null);case 22:case 23:return ci(u),eo(),y=u.memoizedState!==null,l!==null?l.memoizedState!==null!==y&&(u.flags|=8192):y&&(u.flags|=8192),y?(h&536870912)!==0&&(u.flags&128)===0&&(Ae(u),u.subtreeFlags&6&&(u.flags|=8192)):Ae(u),h=u.updateQueue,h!==null&&sr(u,h.retryQueue),h=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==h&&(u.flags|=2048),l!==null&&O(al),null;case 24:return h=null,l!==null&&(h=l.memoizedState.cache),u.memoizedState.cache!==h&&(u.flags|=2048),Li(fe),Ae(u),null;case 25:return null}throw Error(o(156,u.tag))}function Sd(l,u){switch(st(u),u.tag){case 1:return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 3:return Li(fe),Tt(),l=u.flags,(l&65536)!==0&&(l&128)===0?(u.flags=l&-65537|128,u):null;case 26:case 27:case 5:return Ut(u),null;case 13:if(ci(u),l=u.memoizedState,l!==null&&l.dehydrated!==null){if(u.alternate===null)throw Error(o(340));Un()}return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 19:return O(Fe),null;case 4:return Tt(),null;case 10:return Li(u.type),null;case 22:case 23:return ci(u),eo(),l!==null&&O(al),l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 24:return Li(fe),null;case 25:return null;default:return null}}function uf(l,u){switch(st(u),u.tag){case 3:Li(fe),Tt();break;case 26:case 27:case 5:Ut(u);break;case 4:Tt();break;case 13:ci(u);break;case 19:O(Fe);break;case 10:Li(u.type);break;case 22:case 23:ci(u),eo(),l!==null&&O(al);break;case 24:Li(fe)}}function ur(l,u){try{var h=u.updateQueue,y=h!==null?h.lastEffect:null;if(y!==null){var _=y.next;h=_;do{if((h.tag&l)===l){y=void 0;var T=h.create,N=h.inst;y=T(),N.destroy=y}h=h.next}while(h!==_)}}catch(q){Pt(u,u.return,q)}}function El(l,u,h){try{var y=u.updateQueue,_=y!==null?y.lastEffect:null;if(_!==null){var T=_.next;y=T;do{if((y.tag&l)===l){var N=y.inst,q=N.destroy;if(q!==void 0){N.destroy=void 0,_=u;var P=h;try{q()}catch(ut){Pt(_,P,ut)}}}y=y.next}while(y!==T)}}catch(ut){Pt(u,u.return,ut)}}function bd(l){var u=l.updateQueue;if(u!==null){var h=l.stateNode;try{Lu(u,h)}catch(y){Pt(l,l.return,y)}}}function Td(l,u,h){h.props=Ja(l.type,l.memoizedProps),h.state=l.memoizedState;try{h.componentWillUnmount()}catch(y){Pt(l,u,y)}}function hs(l,u){try{var h=l.ref;if(h!==null){var y=l.stateNode;switch(l.tag){case 26:case 27:case 5:var _=du(y);break;default:_=y}typeof h=="function"?l.refCleanup=h(_):h.current=_}}catch(T){Pt(l,u,T)}}function Me(l,u){var h=l.ref,y=l.refCleanup;if(h!==null)if(typeof y=="function")try{y()}catch(_){Pt(l,u,_)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(_){Pt(l,u,_)}else h.current=null}function eu(l){var u=l.type,h=l.memoizedProps,y=l.stateNode;try{xp(y,u,h,l)}catch(_){Pt(l,l.return,_)}}function rf(l,u,h){try{Nf(l.stateNode,l.type,h,u,l)}catch(y){Pt(l,l.return,y)}}function of(l){return l.tag===5||l.tag===3||(ya?l.tag===26:!1)||(vn?l.tag===27:!1)||l.tag===4}function bo(l){t:for(;;){for(;l.sibling===null;){if(l.return===null||of(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&(!vn||l.tag!==27)&&l.tag!==18;){if(l.flags&2||l.child===null||l.tag===4)continue t;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function To(l,u,h){var y=l.tag;if(y===5||y===6)l=l.stateNode,u?Bf(h,l,u):Bd(h,l);else if(!(y===4||vn&&y===27)&&(l=l.child,l!==null))for(To(l,u,h),l=l.sibling;l!==null;)To(l,u,h),l=l.sibling}function nu(l,u,h){var y=l.tag;if(y===5||y===6)l=l.stateNode,u?Uf(h,l,u):Of(h,l);else if(!(y===4||vn&&y===27)&&(l=l.child,l!==null))for(nu(l,u,h),l=l.sibling;l!==null;)nu(l,u,h),l=l.sibling}function Ed(l,u,h){l=l.containerInfo;try{jf(l,h)}catch(y){Pt(u,u.return,y)}}function au(l,u){for(jl(l.containerInfo),je=u;je!==null;)if(l=je,u=l.child,(l.subtreeFlags&1028)!==0&&u!==null)u.return=l,je=u;else for(;je!==null;){l=je;var h=l.alternate;switch(u=l.flags,l.tag){case 0:break;case 11:case 15:break;case 1:if((u&1024)!==0&&h!==null){u=void 0;var y=l,_=h.memoizedProps;h=h.memoizedState;var T=y.stateNode;try{var N=Ja(y.type,_,y.elementType===y.type);u=T.getSnapshotBeforeUpdate(N,h),T.__reactInternalSnapshotBeforeUpdate=u}catch(q){Pt(y,y.return,q)}}break;case 3:(u&1024)!==0&&gn&&Vo(l.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((u&1024)!==0)throw Error(o(163))}if(u=l.sibling,u!==null){u.return=l.return,je=u;break}je=l.return}return N=Ms,Ms=!1,N}function Eo(l,u,h){var y=h.flags;switch(h.tag){case 0:case 11:case 15:mi(l,h),y&4&&ur(5,h);break;case 1:if(mi(l,h),y&4)if(l=h.stateNode,u===null)try{l.componentDidMount()}catch(q){Pt(h,h.return,q)}else{var _=Ja(h.type,u.memoizedProps);u=u.memoizedState;try{l.componentDidUpdate(_,u,l.__reactInternalSnapshotBeforeUpdate)}catch(q){Pt(h,h.return,q)}}y&64&&bd(h),y&512&&hs(h,h.return);break;case 3:if(mi(l,h),y&64&&(y=h.updateQueue,y!==null)){if(l=null,h.child!==null)switch(h.child.tag){case 27:case 5:l=du(h.child.stateNode);break;case 1:l=h.child.stateNode}try{Lu(y,l)}catch(q){Pt(h,h.return,q)}}break;case 26:if(ya){mi(l,h),y&512&&hs(h,h.return);break}case 27:case 5:mi(l,h),u===null&&y&4&&eu(h),y&512&&hs(h,h.return);break;case 12:mi(l,h);break;case 13:mi(l,h),y&4&&Cl(l,h);break;case 22:if(_=h.memoizedState!==null||ln,!_){u=u!==null&&u.memoizedState!==null||Oe;var T=ln,N=Oe;ln=_,(Oe=u)&&!N?Ml(l,h,(h.subtreeFlags&8772)!==0):mi(l,h),ln=T,Oe=N}y&512&&(h.memoizedProps.mode==="manual"?hs(h,h.return):Me(h,h.return));break;default:mi(l,h)}}function iu(l){var u=l.alternate;u!==null&&(l.alternate=null,iu(u)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(u=l.stateNode,u!==null&&zf(u)),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function ha(l,u,h){for(h=h.child;h!==null;)Co(l,u,h),h=h.sibling}function Co(l,u,h){if(In&&typeof In.onCommitFiberUnmount=="function")try{In.onCommitFiberUnmount(vu,h)}catch{}switch(h.tag){case 26:if(ya){Oe||Me(h,u),ha(l,u,h),h.memoizedState?Zf(h.memoizedState):h.stateNode&&Jf(h.stateNode);break}case 27:if(vn){Oe||Me(h,u);var y=Ve,_=ea;Ve=h.stateNode,ha(l,u,h),Id(h.stateNode),Ve=y,ea=_;break}case 5:Oe||Me(h,u);case 6:if(gn){if(y=Ve,_=ea,Ve=null,ha(l,u,h),Ve=y,ea=_,Ve!==null)if(ea)try{Ye(Ve,h.stateNode)}catch(T){Pt(h,u,T)}else try{qn(Ve,h.stateNode)}catch(T){Pt(h,u,T)}}else ha(l,u,h);break;case 18:gn&&Ve!==null&&(ea?Xf(Ve,h.stateNode):kd(Ve,h.stateNode));break;case 4:gn?(y=Ve,_=ea,Ve=h.stateNode.containerInfo,ea=!0,ha(l,u,h),Ve=y,ea=_):(ma&&Ed(h.stateNode,h,Qo()),ha(l,u,h));break;case 0:case 11:case 14:case 15:Oe||El(2,h,u),Oe||El(4,h,u),ha(l,u,h);break;case 1:Oe||(Me(h,u),y=h.stateNode,typeof y.componentWillUnmount=="function"&&Td(h,u,y)),ha(l,u,h);break;case 21:ha(l,u,h);break;case 22:Oe||Me(h,u),Oe=(y=Oe)||h.memoizedState!==null,ha(l,u,h),Oe=y;break;default:ha(l,u,h)}}function Cl(l,u){if(jn&&u.memoizedState===null&&(l=u.alternate,l!==null&&(l=l.memoizedState,l!==null&&(l=l.dehydrated,l!==null))))try{Jo(l)}catch(h){Pt(u,u.return,h)}}function lu(l){switch(l.tag){case 13:case 19:var u=l.stateNode;return u===null&&(u=l.stateNode=new Eu),u;case 22:return l=l.stateNode,u=l._retryCache,u===null&&(u=l._retryCache=new Eu),u;default:throw Error(o(435,l.tag))}}function rr(l,u){var h=lu(l);u.forEach(function(y){var _=mf.bind(null,l,y);h.has(y)||(h.add(y),y.then(_,_))})}function wn(l,u){var h=u.deletions;if(h!==null)for(var y=0;y<h.length;y++){var _=h[y],T=l,N=u;if(gn){var q=N;t:for(;q!==null;){switch(q.tag){case 27:case 5:Ve=q.stateNode,ea=!1;break t;case 3:Ve=q.stateNode.containerInfo,ea=!0;break t;case 4:Ve=q.stateNode.containerInfo,ea=!0;break t}q=q.return}if(Ve===null)throw Error(o(160));Co(T,N,_),Ve=null,ea=!1}else Co(T,N,_);T=_.alternate,T!==null&&(T.return=null),_.return=null}if(u.subtreeFlags&13878)for(u=u.child;u!==null;)Al(u,l),u=u.sibling}function Al(l,u){var h=l.alternate,y=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:wn(u,l),kn(l),y&4&&(El(3,l,l.return),ur(3,l),El(5,l,l.return));break;case 1:wn(u,l),kn(l),y&512&&(Oe||h===null||Me(h,h.return)),y&64&&ln&&(l=l.updateQueue,l!==null&&(y=l.callbacks,y!==null&&(h=l.shared.hiddenCallbacks,l.shared.hiddenCallbacks=h===null?y:h.concat(y))));break;case 26:if(ya){var _=Yn;wn(u,l),kn(l),y&512&&(Oe||h===null||Me(h,h.return)),y&4&&(y=h!==null?h.memoizedState:null,u=l.memoizedState,h===null?u===null?l.stateNode===null?l.stateNode=Kf(_,l.type,l.memoizedProps,l):kf(_,l.type,l.stateNode):l.stateNode=Qf(_,u,l.memoizedProps):y!==u?(y===null?h.stateNode!==null&&Jf(h.stateNode):Zf(y),u===null?kf(_,l.type,l.stateNode):Qf(_,u,l.memoizedProps)):u===null&&l.stateNode!==null&&rf(l,l.memoizedProps,h.memoizedProps));break}case 27:if(vn&&y&4&&l.alternate===null){_=l.stateNode;var T=l.memoizedProps;try{Tp(_),Ep(l.type,T,_,l)}catch(yt){Pt(l,l.return,yt)}}case 5:if(wn(u,l),kn(l),y&512&&(Oe||h===null||Me(h,h.return)),gn){if(l.flags&32){u=l.stateNode;try{Sr(u)}catch(yt){Pt(l,l.return,yt)}}y&4&&l.stateNode!=null&&(u=l.memoizedProps,rf(l,u,h!==null?h.memoizedProps:u)),y&1024&&(kl=!0)}break;case 6:if(wn(u,l),kn(l),y&4&&gn){if(l.stateNode===null)throw Error(o(162));y=l.memoizedProps,h=h!==null?h.memoizedProps:y,u=l.stateNode;try{wd(u,h,y)}catch(yt){Pt(l,l.return,yt)}}break;case 3:if(ya?(Pf(),_=Yn,Yn=Po(u.containerInfo),wn(u,l),Yn=_):wn(u,l),kn(l),y&4){if(gn&&jn&&h!==null&&h.memoizedState.isDehydrated)try{ko(u.containerInfo)}catch(yt){Pt(l,l.return,yt)}if(ma){y=u.containerInfo,h=u.pendingChildren;try{jf(y,h)}catch(yt){Pt(l,l.return,yt)}}}kl&&(kl=!1,cf(l));break;case 4:ya?(h=Yn,Yn=Po(l.stateNode.containerInfo),wn(u,l),kn(l),Yn=h):(wn(u,l),kn(l)),y&4&&ma&&Ed(l.stateNode,l,l.stateNode.pendingChildren);break;case 12:wn(u,l),kn(l);break;case 13:wn(u,l),kn(l),l.child.flags&8192&&l.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(Ri=xn()),y&4&&(y=l.updateQueue,y!==null&&(l.updateQueue=null,rr(l,y)));break;case 22:y&512&&(Oe||h===null||Me(h,h.return)),_=l.memoizedState!==null;var N=h!==null&&h.memoizedState!==null,q=ln,P=Oe;if(ln=q||_,Oe=P||N,wn(u,l),Oe=P,ln=q,kn(l),u=l.stateNode,u._current=l,u._visibility&=-3,u._visibility|=u._pendingVisibility&2,y&8192&&(u._visibility=_?u._visibility&-2:u._visibility|1,_&&(u=ln||Oe,h===null||N||u||su(l)),gn&&(l.memoizedProps===null||l.memoizedProps.mode!=="manual"))){t:if(h=null,gn)for(u=l;;){if(u.tag===5||ya&&u.tag===26||vn&&u.tag===27){if(h===null){N=h=u;try{T=N.stateNode,_?br(T):wf(N.stateNode,N.memoizedProps)}catch(yt){Pt(N,N.return,yt)}}}else if(u.tag===6){if(h===null){N=u;try{var ut=N.stateNode;_?Xo(ut):Ii(ut,N.memoizedProps)}catch(yt){Pt(N,N.return,yt)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===l)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break t;for(;u.sibling===null;){if(u.return===null||u.return===l)break t;h===u&&(h=null),u=u.return}h===u&&(h=null),u.sibling.return=u.return,u=u.sibling}}y&4&&(y=l.updateQueue,y!==null&&(h=y.retryQueue,h!==null&&(y.retryQueue=null,rr(l,h))));break;case 19:wn(u,l),kn(l),y&4&&(y=l.updateQueue,y!==null&&(l.updateQueue=null,rr(l,y)));break;case 21:break;default:wn(u,l),kn(l)}}function kn(l){var u=l.flags;if(u&2){try{if(gn&&(!vn||l.tag!==27)){t:{for(var h=l.return;h!==null;){if(of(h)){var y=h;break t}h=h.return}throw Error(o(160))}switch(y.tag){case 27:if(vn){var _=y.stateNode,T=bo(l);nu(l,T,_);break}case 5:var N=y.stateNode;y.flags&32&&(Sr(N),y.flags&=-33);var q=bo(l);nu(l,q,N);break;case 3:case 4:var P=y.stateNode.containerInfo,ut=bo(l);To(l,ut,P);break;default:throw Error(o(161))}}}catch(yt){Pt(l,l.return,yt)}l.flags&=-3}u&4096&&(l.flags&=-4097)}function cf(l){if(l.subtreeFlags&1024)for(l=l.child;l!==null;){var u=l;cf(u),u.tag===5&&u.flags&1024&&ge(u.stateNode),l=l.sibling}}function mi(l,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)Eo(l,u.alternate,u),u=u.sibling}function su(l){for(l=l.child;l!==null;){var u=l;switch(u.tag){case 0:case 11:case 14:case 15:El(4,u,u.return),su(u);break;case 1:Me(u,u.return);var h=u.stateNode;typeof h.componentWillUnmount=="function"&&Td(u,u.return,h),su(u);break;case 26:case 27:case 5:Me(u,u.return),su(u);break;case 22:Me(u,u.return),u.memoizedState===null&&su(u);break;default:su(u)}l=l.sibling}}function Ml(l,u,h){for(h=h&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var y=u.alternate,_=l,T=u,N=T.flags;switch(T.tag){case 0:case 11:case 15:Ml(_,T,h),ur(4,T);break;case 1:if(Ml(_,T,h),y=T,_=y.stateNode,typeof _.componentDidMount=="function")try{_.componentDidMount()}catch(ut){Pt(y,y.return,ut)}if(y=T,_=y.updateQueue,_!==null){var q=y.stateNode;try{var P=_.shared.hiddenCallbacks;if(P!==null)for(_.shared.hiddenCallbacks=null,_=0;_<P.length;_++)Ih(P[_],q)}catch(ut){Pt(y,y.return,ut)}}h&&N&64&&bd(T),hs(T,T.return);break;case 26:case 27:case 5:Ml(_,T,h),h&&y===null&&N&4&&eu(T),hs(T,T.return);break;case 12:Ml(_,T,h);break;case 13:Ml(_,T,h),h&&N&4&&Cl(_,T);break;case 22:T.memoizedState===null&&Ml(_,T,h),hs(T,T.return);break;default:Ml(_,T,h)}u=u.sibling}}function ff(l,u){var h=null;l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),l=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(l=u.memoizedState.cachePool.pool),l!==h&&(l!=null&&l.refCount++,h!=null&&Fs(h))}function Ao(l,u){l=null,u.alternate!==null&&(l=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==l&&(u.refCount++,l!=null&&Fs(l))}function Xi(l,u,h,y){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)Mo(l,u,h,y),u=u.sibling}function Mo(l,u,h,y){var _=u.flags;switch(u.tag){case 0:case 11:case 15:Xi(l,u,h,y),_&2048&&ur(9,u);break;case 3:Xi(l,u,h,y),_&2048&&(l=null,u.alternate!==null&&(l=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==l&&(u.refCount++,l!=null&&Fs(l)));break;case 12:if(_&2048){Xi(l,u,h,y),l=u.stateNode;try{var T=u.memoizedProps,N=T.id,q=T.onPostCommit;typeof q=="function"&&q(N,u.alternate===null?"mount":"update",l.passiveEffectDuration,-0)}catch(P){Pt(u,u.return,P)}}else Xi(l,u,h,y);break;case 23:break;case 22:T=u.stateNode,u.memoizedState!==null?T._visibility&4?Xi(l,u,h,y):Rl(l,u):T._visibility&4?Xi(l,u,h,y):(T._visibility|=4,En(l,u,h,y,(u.subtreeFlags&10256)!==0)),_&2048&&ff(u.alternate,u);break;case 24:Xi(l,u,h,y),_&2048&&Ao(u.alternate,u);break;default:Xi(l,u,h,y)}}function En(l,u,h,y,_){for(_=_&&(u.subtreeFlags&10256)!==0,u=u.child;u!==null;){var T=l,N=u,q=h,P=y,ut=N.flags;switch(N.tag){case 0:case 11:case 15:En(T,N,q,P,_),ur(8,N);break;case 23:break;case 22:var yt=N.stateNode;N.memoizedState!==null?yt._visibility&4?En(T,N,q,P,_):Rl(T,N):(yt._visibility|=4,En(T,N,q,P,_)),_&&ut&2048&&ff(N.alternate,N);break;case 24:En(T,N,q,P,_),_&&ut&2048&&Ao(N.alternate,N);break;default:En(T,N,q,P,_)}u=u.sibling}}function Rl(l,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var h=l,y=u,_=y.flags;switch(y.tag){case 22:Rl(h,y),_&2048&&ff(y.alternate,y);break;case 24:Rl(h,y),_&2048&&Ao(y.alternate,y);break;default:Rl(h,y)}u=u.sibling}}function on(l){if(l.subtreeFlags&Rs)for(l=l.child;l!==null;)ds(l),l=l.sibling}function ds(l){switch(l.tag){case 26:on(l),l.flags&Rs&&(l.memoizedState!==null?Ff(Yn,l.memoizedState,l.memoizedProps):Ue(l.type,l.memoizedProps));break;case 5:on(l),l.flags&Rs&&Ue(l.type,l.memoizedProps);break;case 3:case 4:if(ya){var u=Yn;Yn=Po(l.stateNode.containerInfo),on(l),Yn=u}else on(l);break;case 22:l.memoizedState===null&&(u=l.alternate,u!==null&&u.memoizedState!==null?(u=Rs,Rs=16777216,on(l),Rs=u):on(l));break;default:on(l)}}function Ro(l){var u=l.alternate;if(u!==null&&(l=u.child,l!==null)){u.child=null;do u=l.sibling,l.sibling=null,l=u;while(l!==null)}}function zl(l){var u=l.deletions;if((l.flags&16)!==0){if(u!==null)for(var h=0;h<u.length;h++){var y=u[h];je=y,Dl(y,l)}Ro(l)}if(l.subtreeFlags&10256)for(l=l.child;l!==null;)or(l),l=l.sibling}function or(l){switch(l.tag){case 0:case 11:case 15:zl(l),l.flags&2048&&El(9,l,l.return);break;case 3:zl(l);break;case 12:zl(l);break;case 22:var u=l.stateNode;l.memoizedState!==null&&u._visibility&4&&(l.return===null||l.return.tag!==13)?(u._visibility&=-5,uu(l)):zl(l);break;default:zl(l)}}function uu(l){var u=l.deletions;if((l.flags&16)!==0){if(u!==null)for(var h=0;h<u.length;h++){var y=u[h];je=y,Dl(y,l)}Ro(l)}for(l=l.child;l!==null;){switch(u=l,u.tag){case 0:case 11:case 15:El(8,u,u.return),uu(u);break;case 22:h=u.stateNode,h._visibility&4&&(h._visibility&=-5,uu(u));break;default:uu(u)}l=l.sibling}}function Dl(l,u){for(;je!==null;){var h=je;switch(h.tag){case 0:case 11:case 15:El(8,h,u);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var y=h.memoizedState.cachePool.pool;y!=null&&y.refCount++}break;case 24:Fs(h.memoizedState.cache)}if(y=h.child,y!==null)y.return=h,je=y;else t:for(h=l;je!==null;){y=je;var _=y.sibling,T=y.return;if(iu(y),y===h){je=null;break t}if(_!==null){_.return=T,je=_;break t}je=T}}}function zo(l){var u=Mf(l);if(u!=null){if(typeof u.memoizedProps["data-testname"]!="string")throw Error(o(364));return u}if(l=bs(l),l===null)throw Error(o(362));return l.stateNode.current}function ru(l,u){var h=l.tag;switch(u.$$typeof){case Gr:if(l.type===u.value)return!0;break;case sc:t:{for(u=u.value,l=[l,0],h=0;h<l.length;){var y=l[h++],_=y.tag,T=l[h++],N=u[T];if(_!==5&&_!==26&&_!==27||!Ti(y)){for(;N!=null&&ru(y,N);)T++,N=u[T];if(T===u.length){u=!0;break t}else for(y=y.child;y!==null;)l.push(y,T),y=y.sibling}}u=!1}return u;case uc:if((h===5||h===26||h===27)&&vp(l.stateNode,u.value))return!0;break;case he:if((h===5||h===6||h===26||h===27)&&(l=_r(l),l!==null&&0<=l.indexOf(u.value)))return!0;break;case $t:if((h===5||h===26||h===27)&&(l=l.memoizedProps["data-testname"],typeof l=="string"&&l.toLowerCase()===u.value.toLowerCase()))return!0;break;default:throw Error(o(365))}return!1}function Ol(l){switch(l.$$typeof){case Gr:return"<"+(d(l.value)||"Unknown")+">";case sc:return":has("+(Ol(l)||"")+")";case uc:return'[role="'+l.value+'"]';case he:return'"'+l.value+'"';case $t:return'[data-testname="'+l.value+'"]';default:throw Error(o(365))}}function Cd(l,u){var h=[];l=[l,0];for(var y=0;y<l.length;){var _=l[y++],T=_.tag,N=l[y++],q=u[N];if(T!==5&&T!==26&&T!==27||!Ti(_)){for(;q!=null&&ru(_,q);)N++,q=u[N];if(N===u.length)h.push(_);else for(_=_.child;_!==null;)l.push(_,N),_=_.sibling}}return h}function Hn(l,u){if(!bi)throw Error(o(363));l=zo(l),l=Cd(l,u),u=[],l=Array.from(l);for(var h=0;h<l.length;){var y=l[h++],_=y.tag;if(_===5||_===26||_===27)Ti(y)||u.push(y.stateNode);else for(y=y.child;y!==null;)l.push(y),y=y.sibling}return u}function Gn(){if((Rt&2)!==0&&Qt!==0)return Qt&-Qt;if(Nt.T!==null){var l=$n;return l!==0?l:Fr()}return Ha()}function pi(){na===0&&(na=(Qt&536870912)===0||ae?gt():536870912);var l=Ta.current;return l!==null&&(l.flags|=32),na}function Cn(l,u,h){(l===Kt&&ve===2||l.cancelPendingCommit!==null)&&(Wa(l,0),Pa(l,Qt,na,!1)),dt(l,h),((Rt&2)===0||l!==Kt)&&(l===Kt&&((Rt&2)===0&&(ai|=h),te===4&&Pa(l,Qt,na,!1)),Na(l))}function cr(l,u,h){if((Rt&6)!==0)throw Error(o(327));var y=!h&&(u&60)===0&&(u&l.expiredLanes)===0||Q(l,u),_=y?vi(l,u):yi(l,u,!0),T=y;do{if(_===0){Ea&&!y&&Pa(l,u,0,!1);break}else if(_===6)Pa(l,u,0,!de);else{if(h=l.current.alternate,T&&!Ad(h)){_=yi(l,u,!1),T=!1;continue}if(_===2){if(T=u,l.errorRecoveryDisabledLanes&T)var N=0;else N=l.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){u=N;t:{var q=l;_=Cu;var P=jn&&q.current.memoizedState.isDehydrated;if(P&&(Wa(q,N).flags|=256),N=yi(q,N,!1),N!==2){if(il&&!P){q.errorRecoveryDisabledLanes|=T,ai|=T,_=4;break t}T=Aa,Aa=_,T!==null&&Vi(T)}_=N}if(T=!1,_!==2)continue}}if(_===1){Wa(l,0),Pa(l,u,0,!0);break}t:{switch(y=l,_){case 0:case 1:throw Error(o(345));case 4:if((u&4194176)===u){Pa(y,u,na,!de);break t}break;case 2:Aa=null;break;case 3:case 5:break;default:throw Error(o(329))}if(y.finishedWork=h,y.finishedLanes=u,(u&62914560)===u&&(T=Ri+300-xn(),10<T)){if(Pa(y,u,na,!de),Z(y,0)!==0)break t;y.timeoutHandle=Af(Do.bind(null,y,h,Aa,ii,Au,u,na,ai,ll,de,2,-0,0),T);break t}Do(y,h,Aa,ii,Au,u,na,ai,ll,de,0,-0,0)}}break}while(!0);Na(l)}function Vi(l){Aa===null?Aa=l:Aa.push.apply(Aa,l)}function Do(l,u,h,y,_,T,N,q,P,ut,yt,St,bt){var Gt=u.subtreeFlags;if((Gt&8192||(Gt&16785408)===16785408)&&(pa(),ds(u),u=qo(),u!==null)){l.cancelPendingCommit=u(_e.bind(null,l,h,y,_,N,q,P,1,St,bt)),Pa(l,T,N,!ut);return}_e(l,h,y,_,N,q,P,yt,St,bt)}function Ad(l){for(var u=l;;){var h=u.tag;if((h===0||h===11||h===15)&&u.flags&16384&&(h=u.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var y=0;y<h.length;y++){var _=h[y],T=_.getSnapshot;_=_.value;try{if(!ga(T(),_))return!1}catch{return!1}}if(h=u.child,u.subtreeFlags&16384&&h!==null)h.return=u,u=h;else{if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function Pa(l,u,h,y){u&=~On,u&=~ai,l.suspendedLanes|=u,l.pingedLanes&=~u,y&&(l.warmLanes|=u),y=l.expirationTimes;for(var _=u;0<_;){var T=31-Fn(_),N=1<<T;y[T]=-1,_&=~N}h!==0&&_t(l,h,u)}function hf(){return(Rt&6)===0?(ml(0),!1):!0}function Jn(){if(Yt!==null){if(ve===0)var l=Yt.return;else l=Yt,Ge=Kl=null,Qu(l),Ci=null,qa=0,l=Yt;for(;l!==null;)uf(l.alternate,l),l=l.return;Yt=null}}function Wa(l,u){l.finishedWork=null,l.finishedLanes=0;var h=l.timeoutHandle;h!==Ss&&(l.timeoutHandle=Ss,xr(h)),h=l.cancelPendingCommit,h!==null&&(l.cancelPendingCommit=null,h()),Jn(),Kt=l,Yt=h=An(l.current,null),Qt=u,ve=0,Qe=null,de=!1,Ea=Q(l,u),il=!1,ll=na=On=ai=Ca=te=0,Aa=Cu=null,Au=!1,(u&8)!==0&&(u|=u&32);var y=l.entangledLanes;if(y!==0)for(l=l.entanglements,y&=u;0<y;){var _=31-Fn(y),T=1<<_;u|=l[_],y&=~T}return ni=u,rn(),h}function ms(l,u){Xt=null,Nt.H=ie,u===ye?(u=Qs(),ve=3):u===eh?(u=Qs(),ve=4):ve=u===lm?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,Qe=u,Yt===null&&(te=1,po(l,et(u,l.current)))}function fr(){var l=Ta.current;return l===null?!0:(Qt&4194176)===Qt?Ya===null:(Qt&62914560)===Qt||(Qt&536870912)!==0?l===Ya:!1}function ou(){var l=Nt.H;return Nt.H=ie,l===null?ie:l}function da(){var l=Nt.A;return Nt.A=lc,l}function Pn(){te=4,de||(Qt&4194176)!==Qt&&Ta.current!==null||(Ea=!0),(Ca&134217727)===0&&(ai&134217727)===0||Kt===null||Pa(Kt,Qt,na,!1)}function yi(l,u,h){var y=Rt;Rt|=2;var _=ou(),T=da();(Kt!==l||Qt!==u)&&(ii=null,Wa(l,u)),u=!1;var N=te;t:do try{if(ve!==0&&Yt!==null){var q=Yt,P=Qe;switch(ve){case 8:Jn(),N=6;break t;case 3:case 2:case 6:Ta.current===null&&(u=!0);var ut=ve;if(ve=0,Qe=null,Nl(l,q,P,ut),h&&Ea){N=0;break t}break;default:ut=ve,ve=0,Qe=null,Nl(l,q,P,ut)}}gi(),N=te;break}catch(yt){ms(l,yt)}while(!0);return u&&l.shellSuspendCounter++,Ge=Kl=null,Rt=y,Nt.H=_,Nt.A=T,Yt===null&&(Kt=null,Qt=0,rn()),N}function gi(){for(;Yt!==null;)df(Yt)}function vi(l,u){var h=Rt;Rt|=2;var y=ou(),_=da();Kt!==l||Qt!==u?(ii=null,Ne=xn()+500,Wa(l,u)):Ea=Q(l,u);t:do try{if(ve!==0&&Yt!==null){u=Yt;var T=Qe;e:switch(ve){case 1:ve=0,Qe=null,Nl(l,u,T,1);break;case 2:if(Xu(T)){ve=0,Qe=null,Oo(u);break}u=function(){ve===2&&Kt===l&&(ve=7),Na(l)},T.then(u,u);break t;case 3:ve=7;break t;case 4:ve=5;break t;case 7:Xu(T)?(ve=0,Qe=null,Oo(u)):(ve=0,Qe=null,Nl(l,u,T,7));break;case 5:var N=null;switch(Yt.tag){case 26:N=Yt.memoizedState;case 5:case 27:var q=Yt,P=q.type,ut=q.pendingProps;if(N?Wf(N):Fi(P,ut)){ve=0,Qe=null;var yt=q.sibling;if(yt!==null)Yt=yt;else{var St=q.return;St!==null?(Yt=St,hr(St)):Yt=null}break e}}ve=0,Qe=null,Nl(l,u,T,5);break;case 6:ve=0,Qe=null,Nl(l,u,T,6);break;case 8:Jn(),te=6;break t;default:throw Error(o(462))}}Qi();break}catch(bt){ms(l,bt)}while(!0);return Ge=Kl=null,Nt.H=y,Nt.A=_,Rt=h,Yt!==null?0:(Kt=null,Qt=0,rn(),te)}function Qi(){for(;Yt!==null&&!tm();)df(Yt)}function df(l){var u=vd(l.alternate,l,ni);l.memoizedProps=l.pendingProps,u===null?hr(l):Yt=u}function Oo(l){var u=l,h=u.alternate;switch(u.tag){case 15:case 0:u=dd(h,u,u.pendingProps,u.type,void 0,Qt);break;case 11:u=dd(h,u,u.pendingProps,u.type.render,u.ref,Qt);break;case 5:Qu(u);default:uf(h,u),u=Yt=ki(u,ni),u=vd(h,u,ni)}l.memoizedProps=l.pendingProps,u===null?hr(l):Yt=u}function Nl(l,u,h,y){Ge=Kl=null,Qu(u),Ci=null,qa=0;var _=u.return;try{if(rd(l,_,u,h,Qt)){te=1,po(l,et(h,l.current)),Yt=null;return}}catch(T){if(_!==null)throw Yt=_,T;te=1,po(l,et(h,l.current)),Yt=null;return}u.flags&32768?(ae||y===1?l=!0:Ea||(Qt&536870912)!==0?l=!1:(de=l=!0,(y===2||y===3||y===6)&&(y=Ta.current,y!==null&&y.tag===13&&(y.flags|=16384))),cn(u,l)):hr(u)}function hr(l){var u=l;do{if((u.flags&32768)!==0){cn(u,de);return}l=u.return;var h=_d(u.alternate,u,ni);if(h!==null){Yt=h;return}if(u=u.sibling,u!==null){Yt=u;return}Yt=u=l}while(u!==null);te===0&&(te=5)}function cn(l,u){do{var h=Sd(l.alternate,l);if(h!==null){h.flags&=32767,Yt=h;return}if(h=l.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!u&&(l=l.sibling,l!==null)){Yt=l;return}Yt=l=h}while(l!==null);te=6,Yt=null}function _e(l,u,h,y,_,T,N,q,P,ut){var yt=Nt.T,St=an();try{Mn(2),Nt.T=null,Ft(l,u,h,y,St,_,T,N,q,P,ut)}finally{Nt.T=yt,Mn(St)}}function Ft(l,u,h,y,_,T,N,q){do fn();while(sl!==null);if((Rt&6)!==0)throw Error(o(327));var P=l.finishedWork;if(y=l.finishedLanes,P===null)return null;if(l.finishedWork=null,l.finishedLanes=0,P===l.current)throw Error(o(177));l.callbackNode=null,l.callbackPriority=0,l.cancelPendingCommit=null;var ut=P.lanes|P.childLanes;if(ut|=_u,vt(l,y,ut,T,N,q),l===Kt&&(Yt=Kt=null,Qt=0),(P.subtreeFlags&10256)===0&&(P.flags&10256)===0||Xa||(Xa=!0,rc=ut,Ds=h,dr(Fo,function(){return fn(),null})),h=(P.flags&15990)!==0,(P.subtreeFlags&15990)!==0||h?(h=Nt.T,Nt.T=null,T=an(),Mn(2),N=Rt,Rt|=4,au(l,P),Al(P,l),Ef(l.containerInfo),l.current=P,Eo(l,P.alternate,P),em(),Rt=N,Mn(T),Nt.T=h):l.current=P,Xa?(Xa=!1,sl=l,zs=y):Zi(l,ut),ut=l.pendingLanes,ut===0&&(Ma=null),w(P.stateNode),Na(l),u!==null)for(_=l.onRecoverableError,P=0;P<u.length;P++)ut=u[P],_(ut.value,{componentStack:ut.stack});return(zs&3)!==0&&fn(),ut=l.pendingLanes,(y&4194218)!==0&&(ut&42)!==0?l===Ln?Os++:(Os=0,Ln=l):Os=0,ml(0),null}function Zi(l,u){(l.pooledCacheLanes&=u)===0&&(u=l.pooledCache,u!=null&&(l.pooledCache=null,Fs(u)))}function fn(){if(sl!==null){var l=sl,u=rc;rc=0;var h=Dt(zs),y=32>h?32:h;h=Nt.T;var _=an();try{if(Mn(y),Nt.T=null,sl===null)var T=!1;else{y=Ds,Ds=null;var N=sl,q=zs;if(sl=null,zs=0,(Rt&6)!==0)throw Error(o(331));var P=Rt;if(Rt|=4,or(N.current),Mo(N,N.current,q,y),Rt=P,ml(0,!1),In&&typeof In.onPostCommitFiberRoot=="function")try{In.onPostCommitFiberRoot(vu,N)}catch{}T=!0}return T}finally{Mn(_),Nt.T=h,Zi(l,u)}}return!1}function No(l,u,h){u=et(h,u),u=er(l.stateNode,u,2),l=Je(l,u,2),l!==null&&(dt(l,2),Na(l))}function Pt(l,u,h){if(l.tag===3)No(l,l,h);else for(;u!==null;){if(u.tag===3){No(u,l,h);break}else if(u.tag===1){var y=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Ma===null||!Ma.has(y))){l=et(h,l),h=Ws(2),y=Je(u,h,2),y!==null&&(nr(h,y,u,l),dt(y,2),Na(y));break}}u=u.return}}function Uo(l,u,h){var y=l.pingCache;if(y===null){y=l.pingCache=new Wt;var _=new Set;y.set(u,_)}else _=y.get(u),_===void 0&&(_=new Set,y.set(u,_));_.has(h)||(il=!0,_.add(h),l=Md.bind(null,l,u,h),u.then(l,l))}function Md(l,u,h){var y=l.pingCache;y!==null&&y.delete(u),l.pingedLanes|=l.suspendedLanes&h,l.warmLanes&=~h,Kt===l&&(Qt&h)===h&&(te===4||te===3&&(Qt&62914560)===Qt&&300>xn()-Ri?(Rt&2)===0&&Wa(l,0):On|=h,ll===Qt&&(ll=0)),Na(l)}function ps(l,u){u===0&&(u=ct()),l=Za(l,u),l!==null&&(dt(l,u),Na(l))}function ys(l){var u=l.memoizedState,h=0;u!==null&&(h=u.retryLane),ps(l,h)}function mf(l,u){var h=0;switch(l.tag){case 13:var y=l.stateNode,_=l.memoizedState;_!==null&&(h=_.retryLane);break;case 19:y=l.stateNode;break;case 22:y=l.stateNode._retryCache;break;default:throw Error(o(314))}y!==null&&y.delete(u),ps(l,h)}function dr(l,u){return gu(l,u)}function pf(l,u,h,y){this.tag=l,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=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ki(l){return l=l.prototype,!(!l||!l.isReactComponent)}function An(l,u){var h=l.alternate;return h===null?(h=n(l.tag,u,l.key,l.mode),h.elementType=l.elementType,h.type=l.type,h.stateNode=l.stateNode,h.alternate=l,l.alternate=h):(h.pendingProps=u,h.type=l.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=l.flags&31457280,h.childLanes=l.childLanes,h.lanes=l.lanes,h.child=l.child,h.memoizedProps=l.memoizedProps,h.memoizedState=l.memoizedState,h.updateQueue=l.updateQueue,u=l.dependencies,h.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},h.sibling=l.sibling,h.index=l.index,h.ref=l.ref,h.refCleanup=l.refCleanup,h}function ki(l,u){l.flags&=31457282;var h=l.alternate;return h===null?(l.childLanes=0,l.lanes=u,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=h.childLanes,l.lanes=h.lanes,l.child=h.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=h.memoizedProps,l.memoizedState=h.memoizedState,l.updateQueue=h.updateQueue,l.type=h.type,u=h.dependencies,l.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),l}function wa(l,u,h,y,_,T){var N=0;if(y=l,typeof l=="function")Ki(l)&&(N=1);else if(typeof l=="string")N=ya&&vn?Vf(l,h,dn.current)?26:pu(l)?27:5:ya?Vf(l,h,dn.current)?26:5:vn&&pu(l)?27:5;else t:switch(l){case fu:return Ji(h.children,_,T,u);case _f:N=8,_|=24;break;case Sf:return l=n(12,h,u,_|2),l.elementType=Sf,l.lanes=T,l;case wo:return l=n(13,h,u,_),l.elementType=wo,l.lanes=T,l;case wl:return l=n(19,h,u,_),l.elementType=wl,l.lanes=T,l;case yr:return Bo(h,_,T,u);default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case Dd:case xi:N=10;break t;case Bl:N=9;break t;case hu:N=11;break t;case pr:N=14;break t;case Ia:N=16,y=null;break t}N=29,h=Error(o(130,l===null?"null":typeof l,"")),y=null}return u=n(N,h,u,_),u.elementType=l,u.type=y,u.lanes=T,u}function Ji(l,u,h,y){return l=n(7,l,y,u),l.lanes=h,l}function Bo(l,u,h,y){l=n(22,l,y,u),l.elementType=yr,l.lanes=h;var _={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var T=_._current;if(T===null)throw Error(o(456));if((_._pendingVisibility&2)===0){var N=Za(T,2);N!==null&&(_._pendingVisibility|=2,Cn(N,T,2))}},attach:function(){var T=_._current;if(T===null)throw Error(o(456));if((_._pendingVisibility&2)!==0){var N=Za(T,2);N!==null&&(_._pendingVisibility&=-3,Cn(N,T,2))}}};return l.stateNode=_,l}function Ul(l,u,h){return l=n(6,l,null,u),l.lanes=h,l}function cu(l,u,h){return u=n(4,l.children!==null?l.children:[],l.key,u),u.lanes=h,u.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},u}function gs(l,u,h,y,_,T,N,q){this.tag=1,this.containerInfo=l,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Ss,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ht(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ht(0),this.hiddenUpdates=ht(null),this.identifierPrefix=y,this.onUncaughtError=_,this.onCaughtError=T,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=q,this.incompleteTransitions=new Map}function hn(l,u,h,y,_,T,N,q,P,ut,yt,St){return l=new gs(l,u,h,N,q,P,ut,St),u=1,T===!0&&(u|=24),T=n(3,null,null,u),l.current=T,T.stateNode=l,u=xo(),u.refCount++,l.pooledCache=u,u.refCount++,T.memoizedState={element:y,isDehydrated:h,cache:u},wc(T),l}function mr(l){return l?(l=Ts,l):Ts}function yf(l){var u=l._reactInternals;if(u===void 0)throw typeof l.render=="function"?Error(o(188)):(l=Object.keys(l).join(","),Error(o(268,l)));return l=E(u),l=l!==null?z(l):null,l===null?null:du(l.stateNode)}function Rd(l,u,h,y,_,T){_=mr(_),y.context===null?y.context=_:y.pendingContext=_,y=Ua(u),y.payload={element:h},T=T===void 0?null:T,T!==null&&(y.callback=T),h=Je(l,y,u),h!==null&&(Cn(h,l,u),Ba(h,l,u))}function zd(l,u){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var h=l.retryLane;l.retryLane=h!==0&&h<u?h:u}}function gf(l,u){zd(l,u),(l=l.alternate)&&zd(l,u)}var Mt={},vf=ip(),yn=lM(),vs=Object.assign,xf=Symbol.for("react.element"),Pi=Symbol.for("react.transitional.element"),Fa=Symbol.for("react.portal"),fu=Symbol.for("react.fragment"),_f=Symbol.for("react.strict_mode"),Sf=Symbol.for("react.profiler"),Dd=Symbol.for("react.provider"),Bl=Symbol.for("react.consumer"),xi=Symbol.for("react.context"),hu=Symbol.for("react.forward_ref"),wo=Symbol.for("react.suspense"),wl=Symbol.for("react.suspense_list"),pr=Symbol.for("react.memo"),Ia=Symbol.for("react.lazy"),yr=Symbol.for("react.offscreen"),Od=Symbol.for("react.memo_cache_sentinel"),bf=Symbol.iterator,xs=Symbol.for("react.client.reference"),Nt=vf.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ho,Tf,Hl=!1,Gl=Array.isArray,Go=t.rendererVersion,gr=t.rendererPackageName,vr=t.extraDevToolsConfig,du=t.getPublicInstance,_s=t.getRootHostContext,Nd=t.getChildHostContext,jl=t.prepareForCommit,Ef=t.resetAfterCommit,Cf=t.createInstance,_i=t.appendInitialChild,Wi=t.finalizeInitialChildren,ql=t.shouldSetTextContent,jo=t.createTextInstance,Af=t.scheduleTimeout,xr=t.cancelTimeout,Ss=t.noTimeout,Si=t.isPrimaryRenderer;t.warnsIfNotActing;var gn=t.supportsMutation,ma=t.supportsPersistence,jn=t.supportsHydration,Mf=t.getInstanceFromNode;t.beforeActiveInstanceBlur,t.afterActiveInstanceBlur;var Rf=t.preparePortalMount;t.prepareScopeUpdate,t.getInstanceFromScope;var Mn=t.setCurrentUpdatePriority,an=t.getCurrentUpdatePriority,Ha=t.resolveUpdatePriority;t.resolveEventType,t.resolveEventTimeStamp;var Yl=t.shouldAttemptEagerTransition,zf=t.detachDeletedInstance;t.requestPostPaintCallback;var Ud=t.maySuspendCommit,Fi=t.preloadInstance,pa=t.startSuspendingCommit,Ue=t.suspendInstance,qo=t.waitForCommitToBeReady,Wn=t.NotPendingTransition,wt=t.HostTransitionContext,ge=t.resetFormInstance;t.bindToConsole;var We=t.supportsMicrotasks,Yo=t.scheduleMicrotask,bi=t.supportsTestSelectors,bs=t.findFiberRoot,Lo=t.getBoundingRect,_r=t.getTextContent,Ti=t.isHiddenSubtree,vp=t.matchAccessibilityRole,Be=t.setFocusIfFocusable,Df=t.setupIntersectionObserver,Of=t.appendChild,Bd=t.appendChildToContainer,wd=t.commitTextUpdate,xp=t.commitMount,Nf=t.commitUpdate,Uf=t.insertBefore,Bf=t.insertInContainerBefore,qn=t.removeChild,Ye=t.removeChildFromContainer,Sr=t.resetTextContent,br=t.hideInstance,Xo=t.hideTextInstance,wf=t.unhideInstance,Ii=t.unhideTextInstance,Vo=t.clearContainer,Hf=t.cloneInstance,Qo=t.createContainerChildSet,Gf=t.appendChildToContainerChildSet,Hd=t.finalizeContainerChildren,jf=t.replaceContainerChildren,qf=t.cloneHiddenInstance,Yf=t.cloneHiddenTextInstance,Zo=t.isSuspenseInstancePending,Tr=t.isSuspenseInstanceFallback,Gd=t.getSuspenseInstanceFallbackErrorDetails,_p=t.registerSuspenseInstanceRetry,jd=t.canHydrateFormStateMarker,qd=t.isFormStateMarkerMatching,Lf=t.getNextHydratableSibling,Ko=t.getFirstHydratableChild,Yd=t.getFirstHydratableChildWithinContainer,Ld=t.getFirstHydratableChildWithinSuspenseInstance,Xd=t.canHydrateInstance,Vd=t.canHydrateTextInstance,Qd=t.canHydrateSuspenseInstance,Sp=t.hydrateInstance,Zd=t.hydrateTextInstance,mu=t.hydrateSuspenseInstance,Kd=t.getNextHydratableInstanceAfterSuspenseInstance,ko=t.commitHydratedContainer,Jo=t.commitHydratedSuspenseInstance,kd=t.clearSuspenseBoundary,Xf=t.clearSuspenseBoundaryFromContainer,Jd=t.shouldDeleteUnhydratedTailInstances;t.diffHydratedPropsForDevWarnings,t.diffHydratedTextForDevWarnings,t.describeHydratableInstanceForDevWarnings;var Pd=t.validateHydratableInstance,Wd=t.validateHydratableTextInstance,ya=t.supportsResources,Vf=t.isHostHoistableType,Po=t.getHoistableRoot,Wo=t.getResource,Qf=t.acquireResource,Zf=t.releaseResource,Kf=t.hydrateHoistable,kf=t.mountHoistable,Jf=t.unmountHoistable,bp=t.createHoistableInstance,Pf=t.prepareToCommitHoistables,Fd=t.mayResourceSuspendCommit,Wf=t.preloadResource,Ff=t.suspendResource,vn=t.supportsSingletons,If=t.resolveSingletonInstance,Tp=t.clearSingleton,Ep=t.acquireSingletonInstance,Id=t.releaseSingletonInstance,pu=t.isHostSingletonType,Er=[],$i=-1,Ts={},Fn=Math.clz32?Math.clz32:U,Cr=Math.log,$d=Math.LN2,yu=128,Ar=4194304,gu=yn.unstable_scheduleCallback,Mr=yn.unstable_cancelCallback,tm=yn.unstable_shouldYield,em=yn.unstable_requestPaint,xn=yn.unstable_now,$f=yn.unstable_ImmediatePriority,nm=yn.unstable_UserBlockingPriority,Fo=yn.unstable_NormalPriority,Io=yn.unstable_IdlePriority,am=yn.log,th=yn.unstable_setDisableYieldValue,vu=null,In=null,ga=typeof Object.is=="function"?Object.is:at,$o=new WeakMap,Re=[],we=0,Rr=null,zr=0,va=[],xa=0,$a=null,Ei=1,Ga="",dn=R(null),Dr=R(null),ti=R(null),xu=R(null),Rn=null,_n=null,ae=!1,_a=null,ja=!1,Or=Error(o(519)),Sa=[],Ll=0,_u=0,Su=null,Es=null,Nr=!1,Ur=!1,ei=!1,Xl=0,Br=null,tc=0,$n=0,Vl=null,tl=!1,bu=!1,wr=Object.prototype.hasOwnProperty,ye=Error(o(460)),eh=Error(o(474)),ec={then:function(){}},Cs=null,Ci=null,qa=0,Ql=$h(!0),nh=$h(!1),Ai=R(null),ba=R(0),Ta=R(null),Ya=null,Fe=R(0),Mi=0,Xt=null,oe=null,Le=null,La=!1,ze=!1,el=!1,Hr=0,He=0,Tu=null,im=0,nc=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}},ie={readContext:pn,use:ji,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useLayoutEffect:Jt,useInsertionEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useSyncExternalStore:Jt,useId:Jt};ie.useCacheRefresh=Jt,ie.useMemoCache=Jt,ie.useHostTransitionStatus=Jt,ie.useFormState=Jt,ie.useActionState=Jt,ie.useOptimistic=Jt;var Ie={readContext:pn,use:ji,useCallback:function(l,u){return nn().memoizedState=[l,u===void 0?null:u],l},useContext:pn,useEffect:Vc,useImperativeHandle:function(l,u,h){h=h!=null?h.concat([l]):null,ro(4194308,4,Wu.bind(null,u,l),h)},useLayoutEffect:function(l,u){return ro(4194308,4,l,u)},useInsertionEffect:function(l,u){ro(4,2,l,u)},useMemo:function(l,u){var h=nn();u=u===void 0?null:u;var y=l();if(el){H(!0);try{l()}finally{H(!1)}}return h.memoizedState=[y,u],y},useReducer:function(l,u,h){var y=nn();if(h!==void 0){var _=h(u);if(el){H(!0);try{h(u)}finally{H(!1)}}}else _=u;return y.memoizedState=y.baseState=_,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:_},y.queue=l,l=l.dispatch=vl.bind(null,Xt,l),[y.memoizedState,l]},useRef:function(l){var u=nn();return l={current:l},u.memoizedState=l},useState:function(l){l=ka(l);var u=l.queue,h=ho.bind(null,Xt,u);return u.dispatch=h,[l.memoizedState,h]},useDebugValue:Fu,useDeferredValue:function(l,u){var h=nn();return gl(h,l,u)},useTransition:function(){var l=ka(!1);return l=co.bind(null,Xt,l.queue,!0,!1),nn().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,u,h){var y=Xt,_=nn();if(ae){if(h===void 0)throw Error(o(407));h=h()}else{if(h=u(),Kt===null)throw Error(o(349));(Qt&60)!==0||jc(y,u,h)}_.memoizedState=h;var T={value:h,getSnapshot:u};return _.queue=T,Vc(nd.bind(null,y,T,l),[l]),y.flags|=2048,is(9,qc.bind(null,y,T,h,u),{destroy:void 0},null),h},useId:function(){var l=nn(),u=Kt.identifierPrefix;if(ae){var h=Ga,y=Ei;h=(y&~(1<<32-Fn(y)-1)).toString(32)+h,u=":"+u+"R"+h,h=Hr++,0<h&&(u+="H"+h.toString(32)),u+=":"}else h=im++,u=":"+u+"r"+h.toString(32)+":";return l.memoizedState=u},useCacheRefresh:function(){return nn().memoizedState=Iu.bind(null,Xt)}};Ie.useMemoCache=Pe,Ie.useHostTransitionStatus=us,Ie.useFormState=so,Ie.useActionState=so,Ie.useOptimistic=function(l){var u=nn();u.memoizedState=u.baseState=l;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=h,u=mo.bind(null,Xt,!0,h),h.dispatch=u,[l,u]};var zn={readContext:pn,use:ji,useCallback:oo,useContext:pn,useEffect:Pu,useImperativeHandle:hi,useInsertionEffect:sd,useLayoutEffect:ud,useMemo:ss,useReducer:Zu,useRef:ls,useState:function(){return Zu(fi)},useDebugValue:Fu,useDeferredValue:function(l,u){var h=Ce();return Qc(h,oe.memoizedState,l,u)},useTransition:function(){var l=Zu(fi)[0],u=Ce().memoizedState;return[typeof l=="boolean"?l:Gi(l),u]},useSyncExternalStore:ed,useId:di};zn.useCacheRefresh=fo,zn.useMemoCache=Pe,zn.useHostTransitionStatus=us,zn.useFormState=Lc,zn.useActionState=Lc,zn.useOptimistic=function(l,u){var h=Ce();return oa(h,oe,l,u)};var Zl={readContext:pn,use:ji,useCallback:oo,useContext:pn,useEffect:Pu,useImperativeHandle:hi,useInsertionEffect:sd,useLayoutEffect:ud,useMemo:ss,useReducer:yl,useRef:ls,useState:function(){return yl(fi)},useDebugValue:Fu,useDeferredValue:function(l,u){var h=Ce();return oe===null?gl(h,l,u):Qc(h,oe.memoizedState,l,u)},useTransition:function(){var l=yl(fi)[0],u=Ce().memoizedState;return[typeof l=="boolean"?l:Gi(l),u]},useSyncExternalStore:ed,useId:di};Zl.useCacheRefresh=fo,Zl.useMemoCache=Pe,Zl.useHostTransitionStatus=us,Zl.useFormState=Xc,Zl.useActionState=Xc,Zl.useOptimistic=function(l,u){var h=Ce();return oe!==null?oa(h,oe,l,u):(h.baseState=l,[l,h.queue.dispatch])};var ac={isMounted:function(l){return(l=l._reactInternals)?b(l)===l:!1},enqueueSetState:function(l,u,h){l=l._reactInternals;var y=Gn(),_=Ua(y);_.payload=u,h!=null&&(_.callback=h),u=Je(l,_,y),u!==null&&(Cn(u,l,y),Ba(u,l,y))},enqueueReplaceState:function(l,u,h){l=l._reactInternals;var y=Gn(),_=Ua(y);_.tag=1,_.payload=u,h!=null&&(_.callback=h),u=Je(l,_,y),u!==null&&(Cn(u,l,y),Ba(u,l,y))},enqueueForceUpdate:function(l,u){l=l._reactInternals;var h=Gn(),y=Ua(h);y.tag=2,u!=null&&(y.callback=u),u=Je(l,y,h),u!==null&&(Cn(u,l,h),Ba(u,l,h))}},ah=typeof reportError=="function"?reportError:function(l){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof l=="object"&&l!==null&&typeof l.message=="string"?String(l.message):String(l),error:l});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",l);return}console.error(l)},lm=Error(o(461)),Xe=!1,Dn={dehydrated:null,treeContext:null,retryLane:0},ta=R(null),Kl=null,Ge=null,sm=typeof AbortController<"u"?AbortController:function(){var l=[],u=this.signal={aborted:!1,addEventListener:function(h,y){l.push(y)}};this.abort=function(){u.aborted=!0,l.forEach(function(h){return h()})}},nl=yn.unstable_scheduleCallback,As=yn.unstable_NormalPriority,fe={$$typeof:xi,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},ic=Nt.S;Nt.S=function(l,u){typeof u=="object"&&u!==null&&typeof u.then=="function"&&Ir(l,u),ic!==null&&ic(l,u)};var al=R(null),ln=!1,Oe=!1,kl=!1,Eu=typeof WeakSet=="function"?WeakSet:Set,je=null,Ms=!1,Ve=null,ea=!1,Yn=null,Rs=8192,lc={getCacheForType:function(l){var u=pn(fe),h=u.data.get(l);return h===void 0&&(h=l(),u.data.set(l,h)),h}},Gr=0,sc=1,uc=2,$t=3,he=4;if(typeof Symbol=="function"&&Symbol.for){var Vt=Symbol.for;Gr=Vt("selector.component"),sc=Vt("selector.has_pseudo_class"),uc=Vt("selector.role"),$t=Vt("selector.test_id"),he=Vt("selector.text")}var Wt=typeof WeakMap=="function"?WeakMap:Map,Rt=0,Kt=null,Yt=null,Qt=0,ve=0,Qe=null,de=!1,Ea=!1,il=!1,ni=0,te=0,Ca=0,ai=0,On=0,na=0,ll=0,Cu=null,Aa=null,Au=!1,Ri=0,Ne=1/0,ii=null,Ma=null,Xa=!1,sl=null,zs=0,rc=0,Ds=null,Os=0,Ln=null;return Mt.attemptContinuousHydration=function(l){if(l.tag===13){var u=Za(l,67108864);u!==null&&Cn(u,l,67108864),gf(l,67108864)}},Mt.attemptHydrationAtCurrentPriority=function(l){if(l.tag===13){var u=Gn(),h=Za(l,u);h!==null&&Cn(h,l,u),gf(l,u)}},Mt.attemptSynchronousHydration=function(l){switch(l.tag){case 3:if(l=l.stateNode,l.current.memoizedState.isDehydrated){var u=G(l.pendingLanes);if(u!==0){for(l.pendingLanes|=2,l.entangledLanes|=2;u;){var h=1<<31-Fn(u);l.entanglements[1]|=h,u&=~h}Na(l),(Rt&6)===0&&(Ne=xn()+500,ml(0))}}break;case 13:u=Za(l,2),u!==null&&Cn(u,l,2),hf(),gf(l,2)}},Mt.batchedUpdates=function(l,u){return l(u)},Mt.createComponentSelector=function(l){return{$$typeof:Gr,value:l}},Mt.createContainer=function(l,u,h,y,_,T,N,q,P,ut){return hn(l,u,!1,null,h,y,T,N,q,P,ut,null)},Mt.createHasPseudoClassSelector=function(l){return{$$typeof:sc,value:l}},Mt.createHydrationContainer=function(l,u,h,y,_,T,N,q,P,ut,yt,St,bt){return l=hn(h,y,!0,l,_,T,q,P,ut,yt,St,bt),l.context=mr(null),h=l.current,y=Gn(),_=Ua(y),_.callback=u??null,Je(h,_,y),l.current.lanes=y,dt(l,y),Na(l),l},Mt.createPortal=function(l,u,h){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Fa,key:y==null?null:""+y,children:l,containerInfo:u,implementation:h}},Mt.createRoleSelector=function(l){return{$$typeof:uc,value:l}},Mt.createTestNameSelector=function(l){return{$$typeof:$t,value:l}},Mt.createTextSelector=function(l){return{$$typeof:he,value:l}},Mt.defaultOnCaughtError=function(l){console.error(l)},Mt.defaultOnRecoverableError=function(l){ah(l)},Mt.defaultOnUncaughtError=function(l){ah(l)},Mt.deferredUpdates=function(l){var u=Nt.T,h=an();try{return Mn(32),Nt.T=null,l()}finally{Mn(h),Nt.T=u}},Mt.discreteUpdates=function(l,u,h,y,_){var T=Nt.T,N=an();try{return Mn(2),Nt.T=null,l(u,h,y,_)}finally{Mn(N),Nt.T=T,Rt===0&&(Ne=xn()+500)}},Mt.findAllNodes=Hn,Mt.findBoundingRects=function(l,u){if(!bi)throw Error(o(363));u=Hn(l,u),l=[];for(var h=0;h<u.length;h++)l.push(Lo(u[h]));for(u=l.length-1;0<u;u--){h=l[u];for(var y=h.x,_=y+h.width,T=h.y,N=T+h.height,q=u-1;0<=q;q--)if(u!==q){var P=l[q],ut=P.x,yt=ut+P.width,St=P.y,bt=St+P.height;if(y>=ut&&T>=St&&_<=yt&&N<=bt){l.splice(u,1);break}else if(y!==ut||h.width!==P.width||bt<T||St>N){if(!(T!==St||h.height!==P.height||yt<y||ut>_)){ut>y&&(P.width+=ut-y,P.x=y),yt<_&&(P.width=_-ut),l.splice(u,1);break}}else{St>T&&(P.height+=St-T,P.y=T),bt<N&&(P.height=N-St),l.splice(u,1);break}}}return l},Mt.findHostInstance=yf,Mt.findHostInstanceWithNoPortals=function(l){return l=E(l),l=l!==null?M(l):null,l===null?null:du(l.stateNode)},Mt.findHostInstanceWithWarning=function(l){return yf(l)},Mt.flushPassiveEffects=fn,Mt.flushSyncFromReconciler=function(l){var u=Rt;Rt|=1;var h=Nt.T,y=an();try{if(Mn(2),Nt.T=null,l)return l()}finally{Mn(y),Nt.T=h,Rt=u,(Rt&6)===0&&ml(0)}},Mt.flushSyncWork=hf,Mt.focusWithin=function(l,u){if(!bi)throw Error(o(363));for(l=zo(l),u=Cd(l,u),u=Array.from(u),l=0;l<u.length;){var h=u[l++],y=h.tag;if(!Ti(h)){if((y===5||y===26||y===27)&&Be(h.stateNode))return!0;for(h=h.child;h!==null;)u.push(h),h=h.sibling}}return!1},Mt.getFindAllNodesFailureDescription=function(l,u){if(!bi)throw Error(o(363));var h=0,y=[];l=[zo(l),0];for(var _=0;_<l.length;){var T=l[_++],N=T.tag,q=l[_++],P=u[q];if((N!==5&&N!==26&&N!==27||!Ti(T))&&(ru(T,P)&&(y.push(Ol(P)),q++,q>h&&(h=q)),q<u.length))for(T=T.child;T!==null;)l.push(T,q),T=T.sibling}if(h<u.length){for(l=[];h<u.length;h++)l.push(Ol(u[h]));return`findAllNodes was able to match part of the selector:
|
|
341
|
+
`+(y.join(" > ")+`
|
|
342
|
+
|
|
343
|
+
No matching component was found for:
|
|
344
|
+
`)+l.join(" > ")}return null},Mt.getPublicRootInstance=function(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 27:case 5:return du(l.child.stateNode);default:return l.child.stateNode}},Mt.injectIntoDevTools=function(){var l={bundleType:0,version:Go,rendererPackageName:gr,currentDispatcherRef:Nt,findFiberByHostInstance:Mf,reconcilerVersion:"19.0.0"};if(vr!==null&&(l.rendererConfig=vr),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")l=!1;else{var u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(u.isDisabled||!u.supportsFiber)l=!0;else{try{vu=u.inject(l),In=u}catch{}l=!!u.checkDCE}}return l},Mt.isAlreadyRendering=function(){return!1},Mt.observeVisibleRects=function(l,u,h,y){if(!bi)throw Error(o(363));l=Hn(l,u);var _=Df(l,h,y).disconnect;return{disconnect:function(){_()}}},Mt.shouldError=function(){return null},Mt.shouldSuspend=function(){return!1},Mt.startHostTransition=function(l,u,h,y){if(l.tag!==5)throw Error(o(476));var _=Zc(l).queue;co(l,_,u,Wn,h===null?s:function(){var T=Zc(l).next.queue;return xl(l,T,{},Gn()),h(y)})},Mt.updateContainer=function(l,u,h,y){var _=u.current,T=Gn();return Rd(_,T,l,u,h,y),T},Mt.updateContainerSync=function(l,u,h,y){return u.tag===0&&fn(),Rd(u.current,2,l,u,h,y),2},Mt},i.exports.default=i.exports,Object.defineProperty(i.exports,"__esModule",{value:!0})})(jy)),jy.exports}var N1;function uM(){return N1||(N1=1,Gy.exports=sM()),Gy.exports}var rM=uM();const oM=ap(rM),cM=oM;function fM(i,t,n,s){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function hM(){}function dM(){return!1}const V_={};function mM(i){return i??V_}function pM(){return Gu.currentUpdatePriority}function yM(){return null}function gM(i){throw new Error("Not yet implemented.")}function vM(i){return i}function xM(){return V_}function _M(i){i instanceof ua?i.visible=!1:i instanceof Wr&&(i.enabled=!1)}function SM(i){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function Q_(i){if(i instanceof Wr){const t=i.__pixireact.parent;if(t){const n=t.__pixireact.filters.indexOf(i);t.__pixireact.filters.splice(n,1),t.filters=t.__pixireact.filters}i.__pixireact.parent=null}}function Z_(i,t,...n){}function U1(i,t,n){if(Z_(),t instanceof ua){const s=t,o=t,f=n;s.parent===i&&i.removeChild(o);const d=i.getChildIndex(f);i.addChildAt(o,d)}else if(t instanceof Wr){const f=t.__pixireact.filters.indexOf(n);Q_(t),G_(i,t,f)}}function bM(){return!1}function TM(){return!0}function EM(){return null}function CM(){}function AM(){}function B1(i,t){t instanceof Wr&&Q_(t),t.destroy()}function MM(i){}function RM(){}function zM(){}function DM(){return-1.1}function OM(){return null}function NM(){var n;if(Gu.currentUpdatePriority)return Gu.currentUpdatePriority;const i=typeof self<"u"&&self||typeof window<"u"&&window;if(!i)return Ec.DefaultEventPriority;switch((n=i.event)==null?void 0:n.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Ec.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Ec.ContinuousEventPriority;default:return Ec.DefaultEventPriority}}function UM(i){Gu.currentUpdatePriority=i}function BM(){return!1}function wM(){return!1}function HM(){}function GM(){}function jM(){}function qM(i){i instanceof ua?i.visible=!0:i instanceof Wr&&(i.enabled=!0)}function YM(i){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function LM(){return null}const XM={isPrimaryRenderer:!1,noTimeout:-1,NotPendingTransition:null,supportsHydration:!1,supportsMutation:!0,supportsPersistence:!1,warnsIfNotActing:!1,afterActiveInstanceBlur:q3,appendChild:Hy,appendChildToContainer:Hy,appendInitialChild:Hy,beforeActiveInstanceBlur:Y3,cancelTimeout:clearTimeout,clearContainer:L3,commitUpdate:I3,createInstance:aM,createTextInstance:fM,hideTextInstance:SM,unhideTextInstance:YM,detachDeletedInstance:hM,finalizeInitialChildren:dM,getChildHostContext:mM,getCurrentUpdatePriority:pM,getInstanceFromNode:yM,getInstanceFromScope:gM,getPublicInstance:vM,getRootHostContext:xM,hideInstance:_M,insertBefore:U1,insertInContainerBefore:U1,maySuspendCommit:bM,preloadInstance:TM,prepareForCommit:EM,preparePortalMount:CM,prepareScopeUpdate:AM,removeChild:B1,removeChildFromContainer:B1,requestPostPaintCallback:MM,resetAfterCommit:RM,resetFormInstance:zM,resolveEventTimeStamp:DM,resolveEventType:OM,resolveUpdatePriority:NM,scheduleTimeout:setTimeout,shouldAttemptEagerTransition:BM,setCurrentUpdatePriority:UM,shouldSetTextContent:wM,startSuspendingCommit:HM,suspendInstance:GM,trackSchedulerEvent:jM,unhideInstance:qM,waitForCommitToBeReady:LM,rendererPackageName:"@pixi/react",rendererVersion:j3.version},np=cM(XM);np.injectIntoDevTools();const Oc=new Map;function VM(i,t={}){let n=Oc.get(i),s=(n==null?void 0:n.applicationState)??{isInitialised:!1,isInitialising:!1};const o=(n==null?void 0:n.internalState)??{};n||(s.app=new Og,o.rootContainer=H_(s.app.stage));const f=(n==null?void 0:n.fiber)??np.createContainer(o.rootContainer,Ec.ConcurrentRoot,null,!1,null,"",console.error,console.error,console.error,null);if(!n){let d;i instanceof HTMLCanvasElement&&(d=i),d||(d=document.createElement("canvas"),i.innerHTML="",i.appendChild(d)),o.canvas=d,n={applicationState:s,fiber:f,internalState:o,render:async(g,v)=>{var S;return!s.app.renderer&&!s.isInitialised&&!s.isInitialising&&(s.isInitialising=!0,await s.app.init({...v,canvas:d}),s.isInitialising=!1,s.isInitialised=!0,s={...s},(S=t.onInit)==null||S.call(t,s.app)),Object.entries(v).forEach(([b,A])=>{const E=b;w_(v,E)||(s.app[E]=A)}),np.updateContainer(L.jsx(H3,{value:s,children:g}),f,null,()=>{}),s.app}},Oc.set(d,n)}return n}function K_(i){Gu.unmountQueue.delete(i);const t=i.fiber;t&&np.updateContainer(null,t,null,()=>{i.applicationState.app&&i.applicationState.app.destroy(),Oc.delete(i.internalState.canvas)})}function QM(){for(const i of Gu.unmountQueue)K_(i)}function ZM(i){const t=Oc.get(i);t&&(t.applicationState.isInitialised?K_(t):Gu.unmountQueue.add(t))}function KM(i){const t=Oc.get(i);t&&Gu.unmountQueue.delete(t)}var G1,j1;const Xm=typeof window<"u"&&((G1=window.document)!=null&&G1.createElement||((j1=window.navigator)==null?void 0:j1.product)==="ReactNative")?X.useLayoutEffect:X.useEffect,kM={...Pr.defaultTextStyle},JM=X.forwardRef(function(t,n){const{children:s,className:o,defaultTextStyle:f,extensions:d,onInit:m,resizeTo:g,...v}=t,S=nT(),b=X.useRef(null),A=X.useRef(null),E=X.useRef(new Set);X.useImperativeHandle(n,()=>({getApplication(){return b.current},getCanvas(){return A.current}}));const z=X.useCallback(()=>{const R=b.current;R&&(g?"current"in g?g.current instanceof HTMLElement&&(R.resizeTo=g.current):R.resizeTo=g:R.resizeTo=void 0)},[g]),M=X.useCallback(R=>{QM(),b.current=R,z(),m==null||m(R)},[m]);return Xm(()=>{if(d){const R=[...d],O=E.current;for(const B of O.values()){const U=R.indexOf(B);U===-1&&(ke.remove(B),O.delete(B)),R.splice(U,1)}for(const B of R)ke.add(B),O.add(B)}},[d]),Xm(()=>{const R=A.current;if(R){let O=Oc.get(R);O||(O=VM(R,{onInit:M})),O.render(L.jsx(S,{children:s}),v)}},[v,s,M,g]),Xm(()=>{z()},[g]),Xm(()=>{f?Object.assign(Pr.defaultTextStyle,f):Object.assign(Pr.defaultTextStyle,kM)},[f]),X.useEffect(()=>{const R=A.current;if(R)return KM(R),()=>{ZM(R)}},[]),L.jsx("canvas",{ref:A,className:o})}),PM=X.forwardRef(function(t,n){return L.jsx(ux,{children:L.jsx(JM,{ref:n,...t})})});function Vg(i){Object.assign(yg,i)}function WM(){const i=X.useContext(Xg);return Z_(i.app instanceof Og,"No Context found with `%s`. Make sure to wrap component with `%s`","Application","AppProvider"),i}const FM={idle:"#888",running:"#4caf50",completed:"#4caf50",checkpoint:"#ff9800"};function IM({rooms:i,activeRoom:t,statuses:n,onSelectRoom:s}){return L.jsxs("div",{style:{padding:"8px"},children:[L.jsx("div",{style:{color:"#888",fontSize:"0.7rem",textTransform:"uppercase",marginBottom:"8px",padding:"0 12px"},children:"Rooms"}),i.length===0&&L.jsx("div",{style:{padding:"8px 12px",color:"#666",fontSize:"0.8rem"},children:"No active squads"}),i.map(o=>{const f=n[o]||"idle",d=FM[f],m=o===t;return L.jsxs("div",{"data-testid":"room-item",onClick:()=>s(o),style:{padding:"8px 12px",cursor:"pointer",borderRadius:"4px",background:m?"#1a3a5c":"transparent",borderLeft:m?"2px solid #4caf50":"2px solid transparent",marginBottom:"4px",display:"flex",alignItems:"center",gap:"8px"},children:[L.jsx("div",{"data-testid":"status-dot",style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:d,flexShrink:0}}),L.jsx("div",{style:{fontSize:"0.875rem",color:m?"#e0e0e0":"#aaa"},children:o})]},o)})]})}function $M({entries:i}){const t=n=>new Date(n).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return i.length===0?L.jsx("div",{style:{width:"220px",height:"100%",background:"#0f0f0f",borderLeft:"1px solid #1a1a2e",padding:"16px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center",color:"#666",fontSize:"0.9rem"},children:"No activity yet"}):L.jsxs("div",{style:{width:"220px",height:"100%",background:"#0f0f0f",borderLeft:"1px solid #1a1a2e",padding:"16px",boxSizing:"border-box",overflowY:"auto"},children:[L.jsx("div",{style:{fontSize:"0.75rem",color:"#666",marginBottom:"12px"},children:"Activity Log"}),L.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:i.map(n=>L.jsxs("div",{"data-testid":"activity-entry",style:{fontSize:"0.75rem",color:"#aaa",padding:"8px",background:"#1a1a2e",borderRadius:"4px",borderLeft:"2px solid #4caf50"},children:[L.jsx("div",{style:{color:"#4caf50",marginBottom:"2px"},children:t(n.timestamp)}),L.jsx("div",{style:{fontWeight:"bold",marginBottom:"2px"},children:n.agentName}),L.jsx("div",{style:{color:"#999"},children:n.action})]},n.id))})]})}function t4({agentName:i,question:t,onRespond:n}){const[s,o]=X.useState(""),f=()=>{const m=s.trim();m&&(n(m),o(""))},d=m=>{m.key==="Enter"&&f()};return L.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:L.jsxs("div",{className:"bg-white rounded-lg shadow-lg p-6 max-w-md w-full mx-4",children:[L.jsxs("h2",{className:"text-lg font-bold text-orange-500 mb-4",children:["CHECKPOINT — ",i]}),L.jsx("p",{className:"text-gray-700 mb-6",children:t}),L.jsxs("div",{className:"flex gap-2",children:[L.jsx("input",{type:"text",placeholder:"Type your response...",value:s,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}),L.jsx("button",{onClick:f,className:"px-4 py-2 bg-orange-500 text-white rounded-md font-semibold hover:bg-orange-600 transition-colors",children:"Send"})]})]})})}function e4(i){const t=new Map;for(let n=0;n<Ky.length;n++){const s=Ky[n],o=new fl;o.circle(qt/2,qt/2+4,qt/3),o.fill(s),o.circle(qt/2,qt/3,qt/4),o.fill(s),t.set(`agent-${n}-seated`,i.renderer.generateTexture(o));const f=new fl;f.circle(qt/2+2,qt/2+4,qt/3),f.fill(s),f.circle(qt/2+3,qt/3,qt/4),f.fill(s),f.rect(qt/2+6,qt/2+2,8,3),f.fill(s),t.set(`agent-${n}-typing`,i.renderer.generateTexture(f));const d=new fl;d.circle(qt/2,qt/2,qt/3),d.fill(s),d.circle(qt/2,qt/4,qt/4),d.fill(s),d.rect(qt/2+2,qt/2+8,4,10),d.fill(s),d.rect(qt/2-6,qt/2+6,4,8),d.fill(s),t.set(`agent-${n}-walk-right`,i.renderer.generateTexture(d));const m=new fl;m.circle(qt/2,qt/2,qt/3),m.fill(s),m.circle(qt/2,qt/4,qt/4),m.fill(s),m.rect(qt/2-6,qt/2+8,4,10),m.fill(s),m.rect(qt/2+2,qt/2+6,4,8),m.fill(s),t.set(`agent-${n}-walk-left`,i.renderer.generateTexture(m));const g=new fl;g.circle(qt/2,qt/2,qt/3),g.fill(s),g.circle(qt/2,qt/4,qt/4),g.fill(s),g.rect(qt/2+4,qt/2-2,8,3),g.fill(s),g.rect(qt/2+10,qt/2-5,5,6),g.fill(14142664),t.set(`agent-${n}-coffee`,i.renderer.generateTexture(g))}return t}function n4(i,t){const n=i%Ky.length;let s;switch(t){case"working":s="typing";break;case"idle":s="seated";break;case"coffee":s="coffee";break;case"walk-right":s="walk-right";break;case"walk-left":s="walk-left";break;case"delivering":s="walk-right";break;case"checkpoint":case"done":default:s="seated";break}return`agent-${n}-${s}`}function a4(i,t,n){i.rect(0,0,t,n),i.fill(la.floor);const s=24;for(let o=0;o<n;o+=s)i.moveTo(0,o),i.lineTo(t,o),i.stroke({width:1,color:la.floorPlank,alpha:.3});i.rect(0,0,t,40),i.fill({color:la.wall,alpha:.15})}function i4(i,t,n){i.roundRect(t,n,Km,ax,4),i.fill(la.desk),i.roundRect(t+2,n+2,Km-4,8,2),i.fill(la.deskTop);const s=28,o=20,f=t+(Km-s)/2,d=n+12;i.roundRect(f,d,s,o,2),i.fill(la.monitor),i.roundRect(f+2,d+2,s-4,o-6,1),i.fill(la.monitorScreen),i.rect(f+s/2-2,d+o,4,6),i.fill(la.monitor)}function l4(i,t,n){i.roundRect(t,n,40,60,2),i.fill(la.bookshelf);for(let s=0;s<3;s++){const o=n+8+s*18;i.rect(t+4,o,32,2),i.fill(la.deskShadow);for(let f=0;f<4;f++){const d=t+5+f*8,m=10+Math.random()*4;i.rect(d,o-m,6,m),i.fill(la.bookColors[f%la.bookColors.length])}}}function w1(i,t,n){i.roundRect(t,n+16,20,16,2),i.fill(la.pot),i.circle(t+10,n+10,10),i.fill(la.plant),i.circle(t+4,n+6,7),i.fill(la.plant),i.circle(t+16,n+6,7),i.fill(la.plant)}function s4(i,t,n){i.roundRect(t,n,64,32,3),i.fill(Mm.counter),i.roundRect(t+4,n-8,24,32,2),i.fill(Mm.machine),i.circle(t+16,n-2,2),i.fill({color:Mm.machineLight,alpha:.8}),i.circle(t+48,n+16,6),i.fill({color:Mm.cup,alpha:.5})}function u4(i,t,n){i.roundRect(t-8,n-12,112,72,4),i.stroke({width:1,color:uy.border,alpha:.3}),i.roundRect(t,n,96,48,4),i.fill(uy.table);const s=12,o=[{cx:t+16,cy:n-8},{cx:t+48,cy:n-8},{cx:t+80,cy:n-8},{cx:t+16,cy:n+52},{cx:t+48,cy:n+52},{cx:t+80,cy:n+52}];for(const f of o)i.roundRect(f.cx-s/2,f.cy-s/2,s,s,2),i.fill(uy.chair)}const r4={running:_c.statusRunning,idle:_c.statusIdle,completed:_c.statusRunning,checkpoint:_c.statusCheckpoint};function o4(i,t,n,s){const o=n*.8,f=t+(n-o)/2;i.roundRect(f,8,o,28,6),i.fill({color:_c.background,alpha:.8});const d=r4[s]??_c.statusIdle;i.circle(f+o-16,22,4),i.fill(d)}Vg({Container:ua,Graphics:fl,Sprite:zc,Text:B_});function c4({agent:i,textures:t,bubbleText:n,animX:s,animY:o,animPose:f}){const d=n4(i.colorIndex,f),m=t.get(d),g=V2[i.status==="walking"?"idle":i.status]??8947848,v=i.status==="checkpoint",S=X.useCallback(A=>{A.clear(),A.circle(0,0,qt/2+6),A.fill({color:g,alpha:v?.4:.15})},[g,v]),b=X.useCallback(A=>{if(A.clear(),!n)return;const E=Math.min(n.length*5+16,160);A.roundRect(-E/2,-40,E,28,6),A.fill({color:1710638,alpha:.9})},[n]);return L.jsxs("container",{x:s,y:o,children:[L.jsx("graphics",{draw:S}),m&&L.jsx("sprite",{texture:m,anchor:.5}),L.jsx("text",{text:i.name,y:qt/2+4,anchor:{x:.5,y:0},style:{fontSize:9,fill:"#cccccc",fontFamily:"sans-serif"}}),v&&L.jsx("text",{text:"⚠",y:-qt/2-12,anchor:.5,style:{fontSize:14,fill:"#ff9800",fontFamily:"sans-serif"}}),n&&L.jsxs(L.Fragment,{children:[L.jsx("graphics",{draw:b}),L.jsx("text",{text:n.length>80?n.slice(-80)+"…":n,y:-48,anchor:{x:.5,y:.5},style:{fontSize:8,fill:"#ffffff",fontFamily:"sans-serif",wordWrap:!0,wordWrapWidth:140}})]})]})}Vg({Container:ua,Graphics:fl,Text:B_});function f4({squadName:i,status:t,agents:n,textures:s,bubbles:o,animStates:f,originX:d,originY:m}){const g={x:0,y:0},v=zh(g),S=ix(g),b=X.useCallback(A=>{A.clear(),a4(A,js,Cc),o4(A,0,js,t);for(let E=0;E<n.length;E++){const z=Rh(E,g);i4(A,z.x-48,z.y-32)}s4(A,v.x,v.y),u4(A,S.x,S.y),l4(A,js-60,44),w1(A,10,Cc-50),w1(A,js-40,50)},[n.length,t]);return L.jsxs("container",{x:d,y:m,children:[L.jsx("graphics",{draw:b}),L.jsx("text",{text:i,x:js/2,y:22,anchor:.5,style:{fontSize:14,fill:"#ffffff",fontFamily:"sans-serif",fontWeight:"bold"}}),n.map(A=>{const E=`${i}:${A.id}`,z=o[E],M=f[A.id];return L.jsx(c4,{agent:A,textures:s,bubbleText:(z==null?void 0:z.text)??null,animX:(M==null?void 0:M.x)??A.position.x,animY:(M==null?void 0:M.y)??A.position.y,animPose:(M==null?void 0:M.pose)??(A.status==="working"?"typing":"seated")},A.id)})]})}const H1=45,h4=48,d4=18,m4=4e3,Vm=180,Ly=600;function p4(i){const t={x:0,y:0},n=Math.random();if(n<.3)return{...Rh(i,t),destination:"desk"};if(n<.55){const s=zh(t);return{x:s.x+(Math.random()-.5)*30,y:s.y+(Math.random()-.5)*20,destination:"coffee"}}else if(n<.75){const s=ix(t);return{x:s.x+(Math.random()-.5)*40,y:s.y+(Math.random()-.5)*30,destination:"meeting"}}else return{x:60+Math.random()*(js-120),y:60+Math.random()*(Cc-120),destination:"wander"}}function y4(i){const[t,n]=X.useState({}),s=X.useRef({}),o=X.useRef({}),f=X.useRef({}),d=X.useRef({}),m=X.useRef(0),g=X.useRef({});X.useEffect(()=>{const S=Ze.subscribe((b,A)=>{var M,R;const E=b.bubbles,z=A.bubbles;for(const O of Object.keys(E))if(((M=E[O])==null?void 0:M.updatedAt)!==((R=z[O])==null?void 0:R.updatedAt)){g.current[O]&&clearTimeout(g.current[O]);const[B,U]=O.split(":");g.current[O]=setTimeout(()=>{Ze.getState().clearBubble(B,U),delete g.current[O]},m4)}});return()=>{S();for(const b of Object.values(g.current))clearTimeout(b);g.current={}}},[]);const v=X.useCallback(()=>{m.current++;const S=m.current,b=Ze.getState(),A={};for(const[E,z]of Object.entries(b.agentVisuals)){s.current[E]||(s.current[E]={}),o.current[E]||(o.current[E]={}),A[E]={};for(const M of z){const R=s.current[E],O=o.current[E],B=`${E}:${M.id}`;O[M.id]||(O[M.id]={x:M.position.x,y:M.position.y,baseY:M.position.y},f.current[B]=Math.floor(Math.random()*Ly));const U=O[M.id];if(M.targetPosition&&(!R[M.id]||R[M.id].progress>=1)&&(R[M.id]={startX:U.x,startY:U.baseY,targetX:M.targetPosition.x,targetY:M.targetPosition.y,progress:0,duration:H1,baseY:M.targetPosition.y}),M.status==="idle"&&(!R[M.id]||R[M.id].progress>=1)&&(f.current[B]===void 0&&(f.current[B]=Vm+Math.floor(Math.random()*(Ly-Vm))),f.current[B]--,f.current[B]<=0)){const Z=p4(M.deskIndex);d.current[B]=Z.destination,R[M.id]={startX:U.x,startY:U.baseY,targetX:Z.x,targetY:Z.y,progress:0,duration:H1+Math.floor(Math.random()*30),baseY:Z.y},f.current[B]=Vm+Math.floor(Math.random()*(Ly-Vm))}const G=R[M.id];if(G&&G.progress<1){G.progress=Math.min(1,G.progress+1/G.duration);const Z=J2(G.progress);U.x=lv(G.startX,G.targetX,Z),U.y=lv(G.startY,G.targetY,Z),U.baseY=G.baseY;const Q=Math.floor(S/d4)%2===0?"walk-right":"walk-left";A[E][M.id]={x:U.x,y:U.y,pose:Q}}else if(M.status==="working"){const Z=Math.floor(S/h4)%2===0?"typing":"seated";A[E][M.id]={x:U.x,y:U.baseY,pose:Z}}else if(M.status==="idle"){const Z=d.current[B]??"coffee",Q=Math.sin(S*.07+M.deskIndex*1.5)*2;let K;Z==="coffee"?K="coffee":Z==="meeting"?K=Math.floor(S/60)%2===0?"seated":"coffee":K="seated",A[E][M.id]={x:U.x,y:U.baseY+Q,pose:K}}else M.status==="checkpoint"?A[E][M.id]={x:U.x,y:U.baseY,pose:"seated"}:A[E][M.id]={x:U.x,y:U.baseY,pose:"seated"}}}n(A)},[]);return X.useEffect(()=>{if(i)return i.add(v),()=>{i.remove(v)}},[i,v]),t}Vg({Container:ua});const g4=.3,v4=2;function x4(){const{app:i}=WM(),t=X.useRef(null),[n,s]=X.useState(new Map),o=X.useRef(null),f=Ze(E=>E.rooms),d=Ze(E=>E.agentVisuals),m=Ze(E=>E.bubbles),g=Ra(E=>E.activeStates),v=y4((i==null?void 0:i.ticker)??null);X.useEffect(()=>{i!=null&&i.renderer&&s(e4(i))},[i]);const S=X.useCallback(E=>{const z=t.current;z&&(o.current={startX:E.globalX,startY:E.globalY,pivotX:z.pivot.x,pivotY:z.pivot.y})},[]),b=X.useCallback(E=>{const z=t.current,M=o.current;if(!z||!M)return;const R=(E.globalX-M.startX)/z.scale.x,O=(E.globalY-M.startY)/z.scale.y;z.pivot.x=M.pivotX-R,z.pivot.y=M.pivotY-O},[]),A=X.useCallback(()=>{o.current=null},[]);return X.useEffect(()=>{const E=i==null?void 0:i.canvas;if(!E)return;const z=M=>{M.preventDefault();const R=t.current;if(!R)return;const O=M.deltaY>0?.9:1.1,B=Math.max(g4,Math.min(v4,R.scale.x*O));R.scale.set(B)};return E.addEventListener("wheel",z,{passive:!1}),()=>E.removeEventListener("wheel",z)},[i]),L.jsx("container",{ref:t,eventMode:"static",onpointerdown:S,onpointermove:b,onpointerup:A,onpointerupoutside:A,children:f.map((E,z)=>{var U;const M=P2(z,f.length),R=d[E]??[],O=((U=g[E])==null?void 0:U.status)??"idle",B=v[E]??{};return L.jsx(f4,{squadName:E,status:O,agents:R,textures:n,bubbles:m,animStates:B,originX:M.x,originY:M.y},E)})})}function _4(){var S,b;const i=Ra(A=>A.activeStates),t=Ze(A=>A.rooms),n=Ze(A=>A.activeRoom),s=Ze(A=>A.setActiveRoom),o=Ze(A=>A.activityLog),f=Ze(A=>A.checkpoints),d=n?f[n]:void 0,g=(n?((S=o[n])==null?void 0:S.entries)??[]:[]).map(A=>({...A,timestamp:new Date(A.timestamp).toISOString()})),v={};for(const A of t)v[A]=((b=i[A])==null?void 0:b.status)??"idle";return L.jsxs("div",{style:{display:"flex",height:"100%"},children:[L.jsx(IM,{rooms:t,activeRoom:n,statuses:v,onSelectRoom:s}),L.jsxs("div",{style:{flex:1,position:"relative",overflow:"hidden"},children:[L.jsx(PM,{background:2760462,antialias:!0,resizeTo:window,style:{width:"100%",height:"100%"},children:L.jsx(x4,{})}),d&&L.jsx(t4,{agentName:d.agentName,question:d.question,onRespond:A=>X2(n,A)})]}),L.jsx($M,{entries:g})]})}function S4({message:i}){if(i.role==="agent_dm")return L.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:[L.jsx("div",{style:{fontSize:11,color:"#a0a0d0",fontWeight:600,marginBottom:4},children:i.agentName}),L.jsx("div",{style:{color:"#e0e0e0",fontSize:14,lineHeight:1.5},children:i.content})]});const t=i.role==="user";return L.jsx("div",{"data-role":i.role,style:{alignSelf:t?"flex-end":"flex-start",background:t?"#3b5bdb":"#1e1e2e",borderRadius:12,padding:"8px 14px",maxWidth:"75%",marginBottom:8},children:L.jsx("div",{style:{color:"#e0e0e0",fontSize:14,lineHeight:1.5,whiteSpace:"pre-wrap"},children:i.content})})}function b4(){const[i,t]=X.useState(""),n=X.useRef(null),s=Ra(E=>E.selectedSquad),o=Oi(E=>E.messages),f=Oi(E=>E.streaming),d=Oi(E=>E.streamingText),m=Oi(E=>E.error),g=Oi(E=>E.addUserMessage),v=Oi(E=>E.startStreaming),S=Oi(E=>E.loadHistory);if(X.useEffect(()=>{s&&S(s)},[s,S]),X.useEffect(()=>{var E,z;(z=(E=n.current)==null?void 0:E.scrollIntoView)==null||z.call(E,{behavior:"smooth"})},[o,d]),!s)return L.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 E=i.trim();!E||f||(g(E),v(),Y2(s,E),t(""))},A=E=>{E.key==="Enter"&&!E.shiftKey&&(E.preventDefault(),b())};return L.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",background:"#0f0f1a"},children:[L.jsxs("div",{style:{flex:1,overflowY:"auto",padding:16,display:"flex",flexDirection:"column"},children:[o.map(E=>L.jsx(S4,{message:E},E.id)),f&&d&&L.jsx("div",{"data-role":"assistant",style:{alignSelf:"flex-start",background:"#1e1e2e",borderRadius:12,padding:"8px 14px",maxWidth:"75%",marginBottom:8},children:L.jsx("div",{style:{color:"#e0e0e0",fontSize:14,lineHeight:1.5,whiteSpace:"pre-wrap"},children:d})}),m&&L.jsx("div",{style:{alignSelf:"center",background:"#3a1a1a",border:"1px solid #c53030",borderRadius:8,padding:"8px 14px",color:"#fc8181",fontSize:13,marginBottom:8},children:m}),L.jsx("div",{ref:n})]}),L.jsxs("div",{style:{display:"flex",padding:12,borderTop:"1px solid #2a2a3e",gap:8},children:[L.jsx("input",{type:"text",value:i,onChange:E=>t(E.target.value),onKeyDown:A,placeholder:"Type a message...",disabled:f,style:{flex:1,background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:8,padding:"10px 14px",color:"#e0e0e0",fontSize:14,outline:"none"}}),L.jsx("button",{onClick:b,disabled:!i.trim()||f,"aria-label":"Send",style:{background:!i.trim()||f?"#2a2a3e":"#3b5bdb",color:"#fff",border:"none",borderRadius:8,padding:"10px 20px",fontSize:14,cursor:!i.trim()||f?"not-allowed":"pointer",fontWeight:600},children:"Send"})]})]})}const T4={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 E4({agent:i}){return L.jsxs("div",{style:{background:"#1e1e2e",borderRadius:8,padding:"12px 16px",marginBottom:8,border:"1px solid #2a2a3e"},children:[L.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:6},children:[L.jsx("span",{style:{fontWeight:600,fontSize:14,color:"#e0e0e0"},children:i.name}),L.jsx("span",{style:{backgroundColor:T4[i.status],color:"#fff",fontSize:11,fontWeight:600,padding:"2px 8px",borderRadius:10,textTransform:"lowercase"},children:i.status})]}),L.jsx("div",{style:{fontSize:12,color:"#9ca3af"},children:i.stepLabel})]})}const C4=[{key:"pending",label:"Pending",color:"rgb(107, 114, 128)",filter:i=>i.status==="idle"},{key:"running",label:"Running",color:"rgb(59, 130, 246)",filter:i=>i.status==="working"||i.status==="checkpoint"||i.status==="delivering"},{key:"done",label:"Done",color:"rgb(34, 197, 94)",filter:i=>i.status==="done"}];function A4(){const i=Ra(o=>o.selectedSquad),t=Ra(o=>o.activeStates),n=i?t[i]:null,s=X.useMemo(()=>n?C4.map(o=>({...o,agents:n.agents.filter(o.filter)})):null,[n]);return i?n?L.jsx("div",{style:{display:"flex",gap:16,padding:20,height:"100%",overflow:"auto"},children:s.map(o=>L.jsxs("div",{"data-testid":`column-${o.key}`,style:{flex:1,background:"#16161e",borderRadius:10,padding:16,display:"flex",flexDirection:"column",minWidth:220},children:[L.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16,paddingBottom:12,borderBottom:`2px solid ${o.color}`},children:[L.jsx("span",{style:{fontWeight:700,fontSize:14,color:"#e0e0e0"},children:o.label}),L.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})]}),L.jsx("div",{style:{flex:1,overflowY:"auto"},children:o.agents.map(f=>L.jsx(E4,{agent:f},f.id))})]},o.key))}):L.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#9ca3af"},children:"No active state for this squad"}):L.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#9ca3af"},children:"Select a squad to view the kanban board"})}function M4(){const i=cl(Z=>Z.user),[t,n]=X.useState([]),[s,o]=X.useState(!0),[f,d]=X.useState(""),[m,g]=X.useState(""),[v,S]=X.useState("viewer"),[b,A]=X.useState(null),[E,z]=X.useState(null),M=X.useCallback(async()=>{try{const Z=await fetch("/api/users",{credentials:"include"});if(Z.ok){const Q=await Z.json();n(Q.users)}}catch{A("Failed to load users")}finally{o(!1)}},[]);X.useEffect(()=>{M()},[M]);const R=async()=>{if(!(!f.trim()||!m.trim())){A(null);try{const Z=await fetch("/api/auth/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:f,password:m,role:v}),credentials:"include"});if(!Z.ok){const Q=await Z.json();A(Q.error||"Failed to create user");return}d(""),g(""),S("viewer"),await M()}catch{A("Network error")}}},O=async(Z,Q)=>{try{(await fetch(`/api/users/${Z}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({role:Q}),credentials:"include"})).ok&&await M()}catch{A("Failed to update role")}},B=async Z=>{try{(await fetch(`/api/users/${Z}`,{method:"DELETE",credentials:"include"})).ok&&(z(null),await M())}catch{A("Failed to delete user")}},U={background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:6,padding:"8px 12px",color:"#e0e0e0",fontSize:13,outline:"none"},G={padding:"8px 16px",borderRadius:6,border:"none",fontWeight:600,fontSize:13,cursor:"pointer"};return s?L.jsx("div",{style:{color:"#9ca3af",padding:20},children:"Loading users..."}):L.jsxs("div",{children:[L.jsx("h3",{style:{color:"#e0e0e0",marginBottom:16,fontSize:16,fontWeight:700},children:"User Management"}),b&&L.jsx("div",{style:{background:"#3b1818",color:"#f87171",padding:"8px 12px",borderRadius:6,marginBottom:12,fontSize:13},children:b}),L.jsxs("div",{style:{display:"flex",gap:8,marginBottom:20,flexWrap:"wrap",alignItems:"center"},children:[L.jsx("input",{placeholder:"Username",value:f,onChange:Z=>d(Z.target.value),style:{...U,flex:1,minWidth:120}}),L.jsx("input",{placeholder:"Password",type:"password",value:m,onChange:Z=>g(Z.target.value),style:{...U,flex:1,minWidth:120}}),L.jsxs("select",{value:v,onChange:Z=>S(Z.target.value),style:{...U,minWidth:100},children:[L.jsx("option",{value:"viewer",children:"viewer"}),L.jsx("option",{value:"operator",children:"operator"}),L.jsx("option",{value:"admin",children:"admin"})]}),L.jsx("button",{onClick:R,style:{...G,background:"#3b82f6",color:"#fff"},children:"Create User"})]}),L.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13},children:[L.jsx("thead",{children:L.jsxs("tr",{style:{borderBottom:"1px solid #2a2a3e"},children:[L.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Username"}),L.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Email"}),L.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Role"}),L.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Last Login"}),L.jsx("th",{style:{textAlign:"right",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Actions"})]})}),L.jsx("tbody",{children:t.map(Z=>L.jsxs("tr",{style:{borderBottom:"1px solid #1e1e2e"},children:[L.jsx("td",{style:{padding:"10px 12px",color:"#e0e0e0"},children:Z.username}),L.jsx("td",{style:{padding:"10px 12px",color:"#9ca3af"},children:Z.email||"—"}),L.jsx("td",{style:{padding:"10px 12px"},children:Z.id===(i==null?void 0:i.id)?L.jsx("span",{style:{color:"#9ca3af"},children:Z.role}):L.jsxs("select",{value:Z.role,onChange:Q=>O(Z.id,Q.target.value),style:{...U,padding:"4px 8px",fontSize:12},children:[L.jsx("option",{value:"viewer",children:"viewer"}),L.jsx("option",{value:"operator",children:"operator"}),L.jsx("option",{value:"admin",children:"admin"})]})}),L.jsx("td",{style:{padding:"10px 12px",color:"#9ca3af",fontSize:12},children:Z.last_login?new Date(Z.last_login).toLocaleDateString():"—"}),L.jsx("td",{style:{padding:"10px 12px",textAlign:"right"},children:Z.id!==(i==null?void 0:i.id)&&(E===Z.id?L.jsxs("span",{style:{display:"inline-flex",gap:6,alignItems:"center"},children:[L.jsx("span",{style:{color:"#f87171",fontSize:12},children:"Confirm Delete"}),L.jsx("button",{onClick:()=>B(Z.id),style:{...G,background:"#dc2626",color:"#fff",padding:"4px 10px",fontSize:12},children:"Yes"}),L.jsx("button",{onClick:()=>z(null),style:{...G,background:"#2a2a3e",color:"#9ca3af",padding:"4px 10px",fontSize:12},children:"No"})]}):L.jsx("button",{onClick:()=>z(Z.id),style:{...G,background:"#2a2a3e",color:"#f87171",padding:"4px 10px",fontSize:12},children:"Delete"}))})]},Z.id))})]})]})}function R4(){const i=Ra(v=>v.selectedSquad),t=Ra(v=>v.activeStates),[n,s]=X.useState(null),[o,f]=X.useState(!1),d=i?t[i]:null;if(X.useEffect(()=>{if(!i){s(null);return}f(!0),fetch(`/api/squads/${i}`,{credentials:"include"}).then(v=>v.ok?v.json():null).then(v=>{v&&s(v.data)}).finally(()=>f(!1))},[i]),!i)return L.jsx("div",{style:{color:"#9ca3af",padding:20},children:"Select a squad to view details"});if(o)return L.jsx("div",{style:{color:"#9ca3af",padding:20},children:"Loading squad details..."});const m={marginBottom:24},g={fontSize:12,color:"#9ca3af",fontWeight:600,marginBottom:6,textTransform:"uppercase",letterSpacing:"0.05em"};return L.jsxs("div",{children:[L.jsx("h3",{style:{color:"#e0e0e0",marginBottom:16,fontSize:16,fontWeight:700},children:"Squad Info"}),n&&L.jsxs(L.Fragment,{children:[L.jsxs("div",{style:m,children:[L.jsx("div",{style:g,children:"Name"}),L.jsx("div",{style:{color:"#e0e0e0",fontSize:14,fontWeight:600},children:n.name})]}),L.jsxs("div",{style:m,children:[L.jsx("div",{style:g,children:"Description"}),L.jsx("div",{style:{color:"#e0e0e0",fontSize:14},children:n.description})]}),L.jsxs("div",{style:m,children:[L.jsx("div",{style:g,children:"Agents"}),L.jsx("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:n.agents.map(v=>L.jsx("span",{style:{background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:6,padding:"4px 10px",fontSize:12,color:"#e0e0e0"},children:v.name},v.id))})]}),L.jsxs("div",{style:m,children:[L.jsx("div",{style:g,children:"Pipeline Steps"}),L.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:n.pipeline.steps.map((v,S)=>L.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:6,padding:"8px 12px",fontSize:13},children:[L.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:S+1}),L.jsx("span",{style:{color:"#e0e0e0"},children:v.label}),L.jsx("span",{style:{color:"#6b7280",fontSize:11,marginLeft:"auto"},children:v.agent})]},v.id))})]})]}),d&&L.jsxs("div",{style:m,children:[L.jsx("div",{style:g,children:"Current State"}),L.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 z4(){const[i,t]=X.useState(null),[n,s]=X.useState(null),[o,f]=X.useState(!0),[d,m]=X.useState(null),g=X.useCallback(async()=>{f(!0);try{const b=await fetch("/api/health",{credentials:"include"});if(b.ok){const A=await b.json();t(A),s(A.status==="ok")}else s(!1)}catch{s(!1)}finally{f(!1),m(new Date().toLocaleTimeString())}},[]);X.useEffect(()=>{g()},[g]);const v={fontSize:12,color:"#9ca3af",fontWeight:600,marginBottom:6,textTransform:"uppercase",letterSpacing:"0.05em"},S={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"10px 12px",background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:6,marginBottom:8,fontSize:13};return L.jsxs("div",{children:[L.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[L.jsx("h3",{style:{color:"#e0e0e0",fontSize:16,fontWeight:700},children:"Server Info"}),L.jsx("button",{onClick:g,style:{padding:"6px 14px",borderRadius:6,border:"none",background:"#2a2a3e",color:"#e0e0e0",fontWeight:600,fontSize:12,cursor:"pointer"},children:"Refresh"})]}),L.jsxs("div",{style:{marginBottom:24},children:[L.jsx("div",{style:v,children:"Health Status"}),L.jsxs("div",{style:S,children:[L.jsx("span",{style:{color:"#e0e0e0"},children:"API Server"}),o?L.jsx("span",{style:{color:"#9ca3af"},children:"Checking..."}):L.jsx("span",{style:{color:n?"#22c55e":"#ef4444",fontWeight:600},children:n?"Healthy":"Unhealthy"})]})]}),L.jsxs("div",{style:{marginBottom:24},children:[L.jsx("div",{style:v,children:"Environment"}),L.jsxs("div",{style:S,children:[L.jsx("span",{style:{color:"#e0e0e0"},children:"API Port"}),L.jsx("span",{style:{color:"#9ca3af"},children:"3001"})]}),L.jsxs("div",{style:S,children:[L.jsx("span",{style:{color:"#e0e0e0"},children:"Dashboard Port (dev)"}),L.jsx("span",{style:{color:"#9ca3af"},children:"5173"})]})]}),d&&L.jsxs("div",{style:{fontSize:11,color:"#6b7280",textAlign:"right"},children:["Last checked: ",d]})]})}function D4(){const i=cl(d=>d.user),t=(i==null?void 0:i.role)==="admin",[n,s]=X.useState(t?"users":"squad"),f=[{key:"users",label:"Users",adminOnly:!0},{key:"squad",label:"Squad"},{key:"server",label:"Server"}].filter(d=>!d.adminOnly||t);return L.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",padding:20},children:[L.jsx("div",{style:{display:"flex",gap:4,marginBottom:20,borderBottom:"1px solid #2a2a3e",paddingBottom:0},children:f.map(d=>L.jsx("button",{onClick:()=>s(d.key),style:{padding:"10px 20px",border:"none",borderBottom:n===d.key?"2px solid #3b82f6":"2px solid transparent",background:"transparent",color:n===d.key?"#e0e0e0":"#6b7280",fontWeight:n===d.key?700:500,fontSize:14,cursor:"pointer",transition:"color 0.15s, border-color 0.15s"},children:d.label},d.key))}),L.jsxs("div",{style:{flex:1,overflow:"auto"},children:[n==="users"&&t&&L.jsx(M4,{}),n==="squad"&&L.jsx(R4,{}),n==="server"&&L.jsx(z4,{})]})]})}KS.createRoot(document.getElementById("root")).render(L.jsx(X.StrictMode,{children:L.jsx(g2,{children:L.jsxs(kb,{children:[L.jsx(Bu,{path:"/login",element:L.jsx(F2,{})}),L.jsxs(Bu,{path:"/",element:L.jsx(W2,{}),children:[L.jsx(Bu,{index:!0,element:L.jsx(Qb,{to:"/office",replace:!0})}),L.jsx(Bu,{path:"office",element:L.jsx(_4,{})}),L.jsx(Bu,{path:"chat",element:L.jsx(b4,{})}),L.jsx(Bu,{path:"kanban",element:L.jsx(A4,{})}),L.jsx(Bu,{path:"settings",element:L.jsx(D4,{})})]})]})})}));export{Bi as $,e_ as A,Yh as B,Sn as C,si as D,$l as E,Xs as F,fl as G,Zx as H,hg as I,jC as J,YC as K,kC as L,ne as M,QC as N,hp as O,sa as P,Wr as Q,tg as R,cC as S,Ee as T,Fm as U,gT as V,Zh as W,zg as X,WC as Y,Qa as Z,xx as _,Va as a,cp as a0,Cv as a1,zc as a2,D3 as a3,JT as a4,Mv as a5,gy as a6,Rv as a7,WT as a8,Mc as a9,un as aa,bx as ab,$A as ac,n_ as ad,ce as ae,Qh as af,tn as ag,$E as ah,JE as ai,_C as aj,dC as ak,qC as al,LC as am,JC as an,KC as ao,PC as ap,en as b,De as c,km as d,kt as e,hA as f,xE as g,aA as h,mp as i,Ox as j,ke as k,bc as l,Sx as m,ua as n,uC as o,Dg as p,Kh as q,OT as r,dp as s,Xv as t,DE as u,Jm as v,Da as w,Rg as x,Ix as y,wi as z};
|