expxagents 0.6.0 → 0.7.1
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/__tests__/cli.test.d.ts +1 -0
- package/dist/__tests__/cli.test.js +23 -0
- package/dist/cli/src/commands/init.js +12 -2
- package/dist/cli/src/commands/virtual-office.js +50 -5
- package/dist/cli/src/utils/config.d.ts +5 -0
- package/dist/cli/src/utils/config.js +1 -1
- package/dist/commands/create.d.ts +1 -0
- package/dist/commands/create.js +34 -0
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.js +58 -0
- package/dist/commands/install.d.ts +1 -0
- package/dist/commands/install.js +16 -0
- package/dist/commands/list.d.ts +1 -0
- package/dist/commands/list.js +58 -0
- package/dist/commands/run.d.ts +1 -0
- package/dist/commands/run.js +173 -0
- package/dist/commands/server.d.ts +1 -0
- package/dist/commands/server.js +22 -0
- package/dist/commands/stop.d.ts +1 -0
- package/dist/commands/stop.js +23 -0
- package/dist/commands/uninstall.d.ts +1 -0
- package/dist/commands/uninstall.js +12 -0
- package/dist/dashboard/assets/BufferResource-Cf2Uo4_f.js +185 -0
- package/dist/dashboard/assets/CanvasRenderer-DFdMBORe.js +1 -0
- package/dist/dashboard/assets/RenderTargetSystem-CMh8XRf_.js +172 -0
- package/dist/dashboard/assets/WebGLRenderer-B5huw0RY.js +156 -0
- package/dist/dashboard/assets/WebGPURenderer-BdIKurkV.js +41 -0
- package/dist/dashboard/assets/browserAll-BjVJrv1L.js +14 -0
- package/dist/dashboard/assets/index-DwTFo09S.js +344 -0
- package/dist/dashboard/assets/webworkerAll-DMtK63GZ.js +83 -0
- package/dist/dashboard/index.html +16 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +47 -0
- package/dist/server/api/health-routes.d.ts +3 -0
- package/dist/server/api/health-routes.d.ts.map +1 -0
- package/dist/server/api/health-routes.js +6 -0
- package/dist/server/api/health-routes.js.map +1 -0
- package/dist/server/api/squads-routes.d.ts +7 -0
- package/dist/server/api/squads-routes.d.ts.map +1 -0
- package/dist/server/api/squads-routes.js +91 -0
- package/dist/server/api/squads-routes.js.map +1 -0
- package/dist/server/api/users-routes.d.ts +8 -0
- package/dist/server/api/users-routes.d.ts.map +1 -0
- package/dist/server/api/users-routes.js +45 -0
- package/dist/server/api/users-routes.js.map +1 -0
- package/dist/server/app.d.ts +7 -0
- package/dist/server/app.d.ts.map +1 -0
- package/dist/server/app.js +109 -0
- package/dist/server/app.js.map +1 -0
- package/dist/server/auth/auth-middleware.d.ts +13 -0
- package/dist/server/auth/auth-middleware.d.ts.map +1 -0
- package/dist/server/auth/auth-middleware.js +25 -0
- package/dist/server/auth/auth-middleware.js.map +1 -0
- package/dist/server/auth/auth-routes.d.ts +9 -0
- package/dist/server/auth/auth-routes.d.ts.map +1 -0
- package/dist/server/auth/auth-routes.js +149 -0
- package/dist/server/auth/auth-routes.js.map +1 -0
- package/dist/server/auth/jwt.d.ts +14 -0
- package/dist/server/auth/jwt.d.ts.map +1 -0
- package/dist/server/auth/jwt.js +16 -0
- package/dist/server/auth/jwt.js.map +1 -0
- package/dist/server/auth/password.d.ts +3 -0
- package/dist/server/auth/password.d.ts.map +1 -0
- package/dist/server/auth/password.js +9 -0
- package/dist/server/auth/password.js.map +1 -0
- package/dist/server/bridge/__tests__/chat-handler.test.d.ts +2 -0
- package/dist/server/bridge/__tests__/chat-handler.test.d.ts.map +1 -0
- package/dist/server/bridge/__tests__/chat-handler.test.js +132 -0
- package/dist/server/bridge/__tests__/chat-handler.test.js.map +1 -0
- package/dist/server/bridge/__tests__/chat-integration.test.d.ts +2 -0
- package/dist/server/bridge/__tests__/chat-integration.test.d.ts.map +1 -0
- package/dist/server/bridge/__tests__/chat-integration.test.js +141 -0
- package/dist/server/bridge/__tests__/chat-integration.test.js.map +1 -0
- package/dist/server/bridge/__tests__/claude-bridge.test.d.ts +2 -0
- package/dist/server/bridge/__tests__/claude-bridge.test.d.ts.map +1 -0
- package/dist/server/bridge/__tests__/claude-bridge.test.js +223 -0
- package/dist/server/bridge/__tests__/claude-bridge.test.js.map +1 -0
- package/dist/server/bridge/__tests__/conversation.test.d.ts +2 -0
- package/dist/server/bridge/__tests__/conversation.test.d.ts.map +1 -0
- package/dist/server/bridge/__tests__/conversation.test.js +168 -0
- package/dist/server/bridge/__tests__/conversation.test.js.map +1 -0
- package/dist/server/bridge/__tests__/stream-parser.test.d.ts +2 -0
- package/dist/server/bridge/__tests__/stream-parser.test.d.ts.map +1 -0
- package/dist/server/bridge/__tests__/stream-parser.test.js +66 -0
- package/dist/server/bridge/__tests__/stream-parser.test.js.map +1 -0
- package/dist/server/bridge/chat-handler.d.ts +19 -0
- package/dist/server/bridge/chat-handler.d.ts.map +1 -0
- package/dist/server/bridge/chat-handler.js +104 -0
- package/dist/server/bridge/chat-handler.js.map +1 -0
- package/dist/server/bridge/claude-bridge.d.ts +27 -0
- package/dist/server/bridge/claude-bridge.d.ts.map +1 -0
- package/dist/server/bridge/claude-bridge.js +91 -0
- package/dist/server/bridge/claude-bridge.js.map +1 -0
- package/dist/server/bridge/conversation.d.ts +44 -0
- package/dist/server/bridge/conversation.d.ts.map +1 -0
- package/dist/server/bridge/conversation.js +73 -0
- package/dist/server/bridge/conversation.js.map +1 -0
- package/dist/server/bridge/stream-parser.d.ts +14 -0
- package/dist/server/bridge/stream-parser.d.ts.map +1 -0
- package/dist/server/bridge/stream-parser.js +26 -0
- package/dist/server/bridge/stream-parser.js.map +1 -0
- package/dist/server/config.d.ts +10 -0
- package/dist/server/config.d.ts.map +1 -0
- package/dist/server/config.js +22 -0
- package/dist/server/config.js.map +1 -0
- package/dist/server/db/__tests__/chat-tables.test.d.ts +2 -0
- package/dist/server/db/__tests__/chat-tables.test.d.ts.map +1 -0
- package/dist/server/db/__tests__/chat-tables.test.js +82 -0
- package/dist/server/db/__tests__/chat-tables.test.js.map +1 -0
- package/dist/server/db/connection.d.ts +4 -0
- package/dist/server/db/connection.d.ts.map +1 -0
- package/dist/server/db/connection.js +21 -0
- package/dist/server/db/connection.js.map +1 -0
- package/dist/server/db/migrations.d.ts +4 -0
- package/dist/server/db/migrations.d.ts.map +1 -0
- package/dist/server/db/migrations.js +17 -0
- package/dist/server/db/migrations.js.map +1 -0
- package/dist/server/db/schema.d.ts +2 -0
- package/dist/server/db/schema.d.ts.map +1 -0
- package/dist/server/db/schema.js +44 -0
- package/dist/server/db/schema.js.map +1 -0
- package/dist/server/index.d.ts +2 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +18 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/routes/__tests__/conversations.test.d.ts +2 -0
- package/dist/server/routes/__tests__/conversations.test.d.ts.map +1 -0
- package/dist/server/routes/__tests__/conversations.test.js +94 -0
- package/dist/server/routes/__tests__/conversations.test.js.map +1 -0
- package/dist/server/routes/conversations.d.ts +8 -0
- package/dist/server/routes/conversations.d.ts.map +1 -0
- package/dist/server/routes/conversations.js +25 -0
- package/dist/server/routes/conversations.js.map +1 -0
- package/dist/server/watcher/file-watcher.d.ts +12 -0
- package/dist/server/watcher/file-watcher.d.ts.map +1 -0
- package/dist/server/watcher/file-watcher.js +68 -0
- package/dist/server/watcher/file-watcher.js.map +1 -0
- package/dist/server/watcher/state-parser.d.ts +77 -0
- package/dist/server/watcher/state-parser.d.ts.map +1 -0
- package/dist/server/watcher/state-parser.js +74 -0
- package/dist/server/watcher/state-parser.js.map +1 -0
- package/dist/server/ws/ws-auth.d.ts +4 -0
- package/dist/server/ws/ws-auth.d.ts.map +1 -0
- package/dist/server/ws/ws-auth.js +42 -0
- package/dist/server/ws/ws-auth.js.map +1 -0
- package/dist/server/ws/ws-handler.d.ts +11 -0
- package/dist/server/ws/ws-handler.d.ts.map +1 -0
- package/dist/server/ws/ws-handler.js +107 -0
- package/dist/server/ws/ws-handler.js.map +1 -0
- package/dist/server/ws/ws-rooms.d.ts +12 -0
- package/dist/server/ws/ws-rooms.d.ts.map +1 -0
- package/dist/server/ws/ws-rooms.js +52 -0
- package/dist/server/ws/ws-rooms.js.map +1 -0
- package/dist/utils/config.d.ts +15 -0
- package/dist/utils/config.js +23 -0
- package/package.json +16 -5
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browserAll-BjVJrv1L.js","assets/webworkerAll-DMtK63GZ.js","assets/WebGPURenderer-BdIKurkV.js","assets/BufferResource-Cf2Uo4_f.js","assets/RenderTargetSystem-CMh8XRf_.js","assets/WebGLRenderer-B5huw0RY.js","assets/CanvasRenderer-DFdMBORe.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 tp(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Pp={exports:{}},dh={};/**
|
|
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 w0;function US(){if(w0)return dh;w0=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 dh.Fragment=t,dh.jsx=n,dh.jsxs=n,dh}var H0;function BS(){return H0||(H0=1,Pp.exports=US()),Pp.exports}var q=BS(),Wp={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 G0;function wS(){if(G0)return Lt;G0=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(Y){return Y===null||typeof Y!="object"?null:(Y=A&&Y[A]||Y["@@iterator"],typeof Y=="function"?Y:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,M={};function O(Y,tt,st){this.props=Y,this.context=tt,this.refs=M,this.updater=st||R}O.prototype.isReactComponent={},O.prototype.setState=function(Y,tt){if(typeof Y!="object"&&typeof Y!="function"&&Y!=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,Y,tt,"setState")},O.prototype.forceUpdate=function(Y){this.updater.enqueueForceUpdate(this,Y,"forceUpdate")};function B(){}B.prototype=O.prototype;function w(Y,tt,st){this.props=Y,this.context=tt,this.refs=M,this.updater=st||R}var H=w.prototype=new B;H.constructor=w,z(H,O.prototype),H.isPureReactComponent=!0;var J=Array.isArray;function Q(){}var Z={H:null,A:null,T:null,S:null},gt=Object.prototype.hasOwnProperty;function ct(Y,tt,st){var pt=st.ref;return{$$typeof:i,type:Y,key:tt,ref:pt!==void 0?pt:null,props:st}}function ft(Y,tt){return ct(Y.type,tt,Y.props)}function ht(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===i}function vt(Y){var tt={"=":"=0",":":"=2"};return"$"+Y.replace(/[=:]/g,function(st){return tt[st]})}var _t=/\/+/g;function xt(Y,tt){return typeof Y=="object"&&Y!==null&&Y.key!=null?vt(""+Y.key):tt.toString(36)}function Dt(Y){switch(Y.status){case"fulfilled":return Y.value;case"rejected":throw Y.reason;default:switch(typeof Y.status=="string"?Y.then(Q,Q):(Y.status="pending",Y.then(function(tt){Y.status==="pending"&&(Y.status="fulfilled",Y.value=tt)},function(tt){Y.status==="pending"&&(Y.status="rejected",Y.reason=tt)})),Y.status){case"fulfilled":return Y.value;case"rejected":throw Y.reason}}throw Y}function U(Y,tt,st,pt,Tt){var Ot=typeof Y;(Ot==="undefined"||Ot==="boolean")&&(Y=null);var Ut=!1;if(Y===null)Ut=!0;else switch(Ot){case"bigint":case"string":case"number":Ut=!0;break;case"object":switch(Y.$$typeof){case i:case t:Ut=!0;break;case S:return Ut=Y._init,U(Ut(Y._payload),tt,st,pt,Tt)}}if(Ut)return Tt=Tt(Y),Ut=pt===""?"."+xt(Y,0):pt,J(Tt)?(st="",Ut!=null&&(st=Ut.replace(_t,"$&/")+"/"),U(Tt,tt,st,"",function(oa){return oa})):Tt!=null&&(ht(Tt)&&(Tt=ft(Tt,st+(Tt.key==null||Y&&Y.key===Tt.key?"":(""+Tt.key).replace(_t,"$&/")+"/")+Ut)),tt.push(Tt)),1;Ut=0;var re=pt===""?".":pt+":";if(J(Y))for(var ue=0;ue<Y.length;ue++)pt=Y[ue],Ot=re+xt(pt,ue),Ut+=U(pt,tt,st,Ot,Tt);else if(ue=E(Y),typeof ue=="function")for(Y=ue.call(Y),ue=0;!(pt=Y.next()).done;)pt=pt.value,Ot=re+xt(pt,ue++),Ut+=U(pt,tt,st,Ot,Tt);else if(Ot==="object"){if(typeof Y.then=="function")return U(Dt(Y),tt,st,pt,Tt);throw tt=String(Y),Error("Objects are not valid as a React child (found: "+(tt==="[object Object]"?"object with keys {"+Object.keys(Y).join(", ")+"}":tt)+"). If you meant to render a collection of children, use an array instead.")}return Ut}function X(Y,tt,st){if(Y==null)return Y;var pt=[],Tt=0;return U(Y,pt,"","",function(Ot){return tt.call(st,Ot,Tt++)}),pt}function it(Y){if(Y._status===-1){var tt=Y._result;tt=tt(),tt.then(function(st){(Y._status===0||Y._status===-1)&&(Y._status=1,Y._result=st)},function(st){(Y._status===0||Y._status===-1)&&(Y._status=2,Y._result=st)}),Y._status===-1&&(Y._status=0,Y._result=tt)}if(Y._status===1)return Y._result.default;throw Y._result}var nt=typeof reportError=="function"?reportError:function(Y){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var tt=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof Y=="object"&&Y!==null&&typeof Y.message=="string"?String(Y.message):String(Y),error:Y});if(!window.dispatchEvent(tt))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",Y);return}console.error(Y)},mt={map:X,forEach:function(Y,tt,st){X(Y,function(){tt.apply(this,arguments)},st)},count:function(Y){var tt=0;return X(Y,function(){tt++}),tt},toArray:function(Y){return X(Y,function(tt){return tt})||[]},only:function(Y){if(!ht(Y))throw Error("React.Children.only expected to receive a single React element child.");return Y}};return Lt.Activity=b,Lt.Children=mt,Lt.Component=O,Lt.Fragment=n,Lt.Profiler=o,Lt.PureComponent=w,Lt.StrictMode=s,Lt.Suspense=g,Lt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,Lt.__COMPILER_RUNTIME={__proto__:null,c:function(Y){return Z.H.useMemoCache(Y)}},Lt.cache=function(Y){return function(){return Y.apply(null,arguments)}},Lt.cacheSignal=function(){return null},Lt.cloneElement=function(Y,tt,st){if(Y==null)throw Error("The argument must be a React element, but you passed "+Y+".");var pt=z({},Y.props),Tt=Y.key;if(tt!=null)for(Ot in tt.key!==void 0&&(Tt=""+tt.key),tt)!gt.call(tt,Ot)||Ot==="key"||Ot==="__self"||Ot==="__source"||Ot==="ref"&&tt.ref===void 0||(pt[Ot]=tt[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(Y.type,Tt,pt)},Lt.createContext=function(Y){return Y={$$typeof:d,_currentValue:Y,_currentValue2:Y,_threadCount:0,Provider:null,Consumer:null},Y.Provider=Y,Y.Consumer={$$typeof:f,_context:Y},Y},Lt.createElement=function(Y,tt,st){var pt,Tt={},Ot=null;if(tt!=null)for(pt in tt.key!==void 0&&(Ot=""+tt.key),tt)gt.call(tt,pt)&&pt!=="key"&&pt!=="__self"&&pt!=="__source"&&(Tt[pt]=tt[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(Y&&Y.defaultProps)for(pt in Ut=Y.defaultProps,Ut)Tt[pt]===void 0&&(Tt[pt]=Ut[pt]);return ct(Y,Ot,Tt)},Lt.createRef=function(){return{current:null}},Lt.forwardRef=function(Y){return{$$typeof:m,render:Y}},Lt.isValidElement=ht,Lt.lazy=function(Y){return{$$typeof:S,_payload:{_status:-1,_result:Y},_init:it}},Lt.memo=function(Y,tt){return{$$typeof:v,type:Y,compare:tt===void 0?null:tt}},Lt.startTransition=function(Y){var tt=Z.T,st={};Z.T=st;try{var pt=Y(),Tt=Z.S;Tt!==null&&Tt(st,pt),typeof pt=="object"&&pt!==null&&typeof pt.then=="function"&&pt.then(Q,nt)}catch(Ot){nt(Ot)}finally{tt!==null&&st.types!==null&&(tt.types=st.types),Z.T=tt}},Lt.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},Lt.use=function(Y){return Z.H.use(Y)},Lt.useActionState=function(Y,tt,st){return Z.H.useActionState(Y,tt,st)},Lt.useCallback=function(Y,tt){return Z.H.useCallback(Y,tt)},Lt.useContext=function(Y){return Z.H.useContext(Y)},Lt.useDebugValue=function(){},Lt.useDeferredValue=function(Y,tt){return Z.H.useDeferredValue(Y,tt)},Lt.useEffect=function(Y,tt){return Z.H.useEffect(Y,tt)},Lt.useEffectEvent=function(Y){return Z.H.useEffectEvent(Y)},Lt.useId=function(){return Z.H.useId()},Lt.useImperativeHandle=function(Y,tt,st){return Z.H.useImperativeHandle(Y,tt,st)},Lt.useInsertionEffect=function(Y,tt){return Z.H.useInsertionEffect(Y,tt)},Lt.useLayoutEffect=function(Y,tt){return Z.H.useLayoutEffect(Y,tt)},Lt.useMemo=function(Y,tt){return Z.H.useMemo(Y,tt)},Lt.useOptimistic=function(Y,tt){return Z.H.useOptimistic(Y,tt)},Lt.useReducer=function(Y,tt,st){return Z.H.useReducer(Y,tt,st)},Lt.useRef=function(Y){return Z.H.useRef(Y)},Lt.useState=function(Y){return Z.H.useState(Y)},Lt.useSyncExternalStore=function(Y,tt,st){return Z.H.useSyncExternalStore(Y,tt,st)},Lt.useTransition=function(){return Z.H.useTransition()},Lt.version="19.2.4",Lt}var j0;function ep(){return j0||(j0=1,Wp.exports=wS()),Wp.exports}var L=ep();const Tm=tp(L);var Fp={exports:{}},mh={},Ip={exports:{}},$p={};/**
|
|
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 q0;function HS(){return q0||(q0=1,(function(i){function t(U,X){var it=U.length;U.push(X);t:for(;0<it;){var nt=it-1>>>1,mt=U[nt];if(0<o(mt,X))U[nt]=X,U[it]=mt,it=nt;else break t}}function n(U){return U.length===0?null:U[0]}function s(U){if(U.length===0)return null;var X=U[0],it=U.pop();if(it!==X){U[0]=it;t:for(var nt=0,mt=U.length,Y=mt>>>1;nt<Y;){var tt=2*(nt+1)-1,st=U[tt],pt=tt+1,Tt=U[pt];if(0>o(st,it))pt<mt&&0>o(Tt,st)?(U[nt]=Tt,U[pt]=it,nt=pt):(U[nt]=st,U[tt]=it,nt=tt);else if(pt<mt&&0>o(Tt,it))U[nt]=Tt,U[pt]=it,nt=pt;else break t}}return X}function o(U,X){var it=U.sortIndex-X.sortIndex;return it!==0?it:U.id-X.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,R=!1,z=!1,M=!1,O=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function H(U){for(var X=n(v);X!==null;){if(X.callback===null)s(v);else if(X.startTime<=U)s(v),X.sortIndex=X.expirationTime,t(g,X);else break;X=n(v)}}function J(U){if(z=!1,H(U),!R)if(n(g)!==null)R=!0,Q||(Q=!0,vt());else{var X=n(v);X!==null&&Dt(J,X.startTime-U)}}var Q=!1,Z=-1,gt=5,ct=-1;function ft(){return M?!0:!(i.unstable_now()-ct<gt)}function ht(){if(M=!1,Q){var U=i.unstable_now();ct=U;var X=!0;try{t:{R=!1,z&&(z=!1,B(Z),Z=-1),E=!0;var it=A;try{e:{for(H(U),b=n(g);b!==null&&!(b.expirationTime>U&&ft());){var nt=b.callback;if(typeof nt=="function"){b.callback=null,A=b.priorityLevel;var mt=nt(b.expirationTime<=U);if(U=i.unstable_now(),typeof mt=="function"){b.callback=mt,H(U),X=!0;break e}b===n(g)&&s(g),H(U)}else s(g);b=n(g)}if(b!==null)X=!0;else{var Y=n(v);Y!==null&&Dt(J,Y.startTime-U),X=!1}}break t}finally{b=null,A=it,E=!1}X=void 0}}finally{X?vt():Q=!1}}}var vt;if(typeof w=="function")vt=function(){w(ht)};else if(typeof MessageChannel<"u"){var _t=new MessageChannel,xt=_t.port2;_t.port1.onmessage=ht,vt=function(){xt.postMessage(null)}}else vt=function(){O(ht,0)};function Dt(U,X){Z=O(function(){U(i.unstable_now())},X)}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(U){U.callback=null},i.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):gt=0<U?Math.floor(1e3/U):5},i.unstable_getCurrentPriorityLevel=function(){return A},i.unstable_next=function(U){switch(A){case 1:case 2:case 3:var X=3;break;default:X=A}var it=A;A=X;try{return U()}finally{A=it}},i.unstable_requestPaint=function(){M=!0},i.unstable_runWithPriority=function(U,X){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var it=A;A=U;try{return X()}finally{A=it}},i.unstable_scheduleCallback=function(U,X,it){var nt=i.unstable_now();switch(typeof it=="object"&&it!==null?(it=it.delay,it=typeof it=="number"&&0<it?nt+it:nt):it=nt,U){case 1:var mt=-1;break;case 2:mt=250;break;case 5:mt=1073741823;break;case 4:mt=1e4;break;default:mt=5e3}return mt=it+mt,U={id:S++,callback:X,priorityLevel:U,startTime:it,expirationTime:mt,sortIndex:-1},it>nt?(U.sortIndex=it,t(v,U),n(g)===null&&U===n(v)&&(z?(B(Z),Z=-1):z=!0,Dt(J,it-nt))):(U.sortIndex=mt,t(g,U),R||E||(R=!0,Q||(Q=!0,vt()))),U},i.unstable_shouldYield=ft,i.unstable_wrapCallback=function(U){var X=A;return function(){var it=A;A=X;try{return U.apply(this,arguments)}finally{A=it}}}})($p)),$p}var Y0;function GS(){return Y0||(Y0=1,Ip.exports=HS()),Ip.exports}var ty={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 L0;function jS(){if(L0)return ia;L0=1;var i=ep();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 X0;function qS(){if(X0)return ty.exports;X0=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=jS(),ty.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 V0;function YS(){if(V0)return mh;V0=1;var i=GS(),t=ep(),n=qS();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"),R=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),w=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),gt=Symbol.for("react.lazy"),ct=Symbol.for("react.activity"),ft=Symbol.for("react.memo_cache_sentinel"),ht=Symbol.iterator;function vt(e){return e===null||typeof e!="object"?null:(e=ht&&e[ht]||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 z:return"Fragment";case O:return"Profiler";case M:return"StrictMode";case J:return"Suspense";case Q:return"SuspenseList";case ct:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case w:return e.displayName||"Context";case B:return(e._context.displayName||"Context")+".Consumer";case H:var a=e.render;return e=e.displayName,e||(e=a.displayName||a.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z: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,U=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,it={pending:!1,data:null,method:null,action:null},nt=[],mt=-1;function Y(e){return{current:e}}function tt(e){0>mt||(e.current=nt[mt],nt[mt]=null,mt--)}function st(e,a){mt++,nt[mt]=e.current,e.current=a}var pt=Y(null),Tt=Y(null),Ot=Y(null),Ut=Y(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)?i0(e):0;break;default:if(e=a.tagName,a=a.namespaceURI)a=i0(a),e=l0(a,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}tt(pt),st(pt,e)}function ue(){tt(pt),tt(Tt),tt(Ot)}function oa(e){e.memoizedState!==null&&st(Ut,e);var a=pt.current,r=l0(a,e.type);a!==r&&(st(Tt,e),st(pt,r))}function Oa(e){Tt.current===e&&(tt(pt),tt(Tt)),Ut.current===e&&(tt(Ut),oh._currentValue=it)}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(at){var $=at}Reflect.construct(e,[],ot)}else{try{ot.call()}catch(at){$=at}e.call(ot.prototype)}}else{try{throw Error()}catch(at){$=at}(ot=e())&&typeof ot.catch=="function"&&ot.catch(function(){})}}catch(at){if(at&&$&&typeof at.stack=="string")return[at.stack,$.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 j=C.split(`
|
|
45
|
+
`),F=D.split(`
|
|
46
|
+
`);for(p=c=0;c<j.length&&!j[c].includes("DetermineComponentFrameRoot");)c++;for(;p<F.length&&!F[p].includes("DetermineComponentFrameRoot");)p++;if(c===j.length||p===F.length)for(c=j.length-1,p=F.length-1;1<=c&&0<=p&&j[c]!==F[p];)p--;for(;1<=c&&0<=p;c--,p--)if(j[c]!==F[p]){if(c!==1||p!==1)do if(c--,p--,0>p||j[c]!==F[p]){var lt=`
|
|
47
|
+
`+j[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,hp=i.unstable_shouldYield,Zh=i.unstable_requestPaint,Kn=i.unstable_now,Kh=i.unstable_getCurrentPriorityLevel,kh=i.unstable_ImmediatePriority,Fr=i.unstable_UserBlockingPriority,Ir=i.unstable_NormalPriority,Jh=i.unstable_LowPriority,Ph=i.unstable_IdlePriority,Bc=i.log,wc=i.unstable_setDisableYieldValue,Ua=null,Je=null;function Ba(e){if(typeof Bc=="function"&&wc(e),Je&&typeof Je.setStrictMode=="function")try{Je.setStrictMode(Ua,e)}catch{}}var Bn=Math.clz32?Math.clz32:Wh,qu=Math.log,Yu=Math.LN2;function Wh(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 Vs(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 Qs(){var e=Xu;return Xu<<=1,(Xu&62914560)===0&&(Xu=4194304),e}function Zs(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 Fh(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,j=e.expirationTimes,F=e.hiddenUpdates;for(r=C&~r;0<r;){var lt=31-Bn(r),ot=1<<lt;D[lt]=0,j[lt]=-1;var $=F[lt];if($!==null)for(F[lt]=null,lt=0;lt<$.length;lt++){var at=$[lt];at!==null&&(at.lane&=-536870913)}r&=~ot}c!==0&&Hc(e,c,0),x!==0&&p===0&&e.tag!==0&&(e.suspendedLanes|=x&~(C&~a))}function Hc(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=X.p;return e!==0?e:(e=window.event,e===void 0?32:R0(e.type))}function ci(e,a){var r=X.p;try{return X.p=e,a()}finally{X.p=r}}var Ka=Math.random().toString(36).slice(2),Jt="__reactFiber$"+Ka,bn="__reactProps$"+Ka,pl="__reactContainer$"+Ka,ao="__reactEvents$"+Ka,Ih="__reactListeners$"+Ka,dp="__reactHandles$"+Ka,io="__reactResources$"+Ka,as="__reactMarker$"+Ka;function Qu(e){delete e[Jt],delete e[bn],delete e[ao],delete e[Ih],delete e[dp]}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=h0(e);e!==null;){if(r=e[Jt])return r;e=h0(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 $h=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]*$"),Gc={},jc={};function td(e){return es.call(jc,e)?!0:es.call(Gc,e)?!1:$h.test(e)?jc[e]=!0:(Gc[e]=!0,!1)}function Ku(e,a,r){if(td(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 ca(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ed(e){var a=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function nd(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=ed(e)?"checked":"value";e._valueTracker=nd(e,a,""+e[a])}}function qc(e){if(!e)return!1;var a=e._valueTracker;if(!a)return!0;var r=a.getValue(),c="";return e&&(c=ed(e)?e.checked?"true":"false":e.value),e=c,e!==r?(a.setValue(e),!0):!1}function ks(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 ad=/[\n"\\]/g;function fa(e){return e.replace(ad,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=""+ca(a)):e.value!==""+ca(a)&&(e.value=""+ca(a)):C!=="submit"&&C!=="reset"||e.removeAttribute("value"),a!=null?uo(e,C,ca(a)):r!=null?uo(e,C,ca(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=""+ca(D):e.removeAttribute("name")}function Yc(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?""+ca(r):"",a=a!=null?""+ca(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"&&ks(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function Js(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=""+ca(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 Lc(e,a,r){if(a!=null&&(a=""+ca(a),a!==e.value&&(e.value=a),r==null)){e.defaultValue!==a&&(e.defaultValue=a);return}e.defaultValue=r!=null?""+ca(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=ca(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 Xc(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 id=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"]]),ld=/^[\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 ld.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 Vc(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="'+fa(""+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&&qc(c)}break t;case"textarea":Lc(e,r.value,r.defaultValue);break t;case"select":a=r.value,a!=null&&Js(e,!!r.multiple,a,!1)}}}var co=!1;function Qc(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,Vc(a),e)))for(a=0;a<e.length;a++)Vc(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 Zc(){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:Zc,this.isPropagationStopped=Zc,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,Ps,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!==Ps&&(Ps&&e.type==="mousemove"?(yo=e.screenX-Ps.screenX,er=e.screenY-Ps.screenY):er=yo=0,Ps=e),yo)},movementY:function(e){return"movementY"in e?e.movementY:er}}),sd=Tn(nr),mn=b({},nr,{dataTransfer:0}),ud=Tn(mn),rd=b({},Ja,{relatedTarget:0}),go=Tn(rd),od=b({},_l,{animationName:0,elapsedTime:0,pseudoElement:0}),cd=Tn(od),ar=b({},_l,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Kc=Tn(ar),fd=b({},_l,{data:0}),kc=Tn(fd),hd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Jc={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"},Pc={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dd(e){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(e):(e=Pc[e])?!!a[e]:!1}function ir(){return dd}var Wc=b({},Ja,{key:function(e){if(e.key){var a=hd[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"?Jc[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}}),Fc=Tn(Wc),md=b({},nr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vo=Tn(md),pd=b({},Ja,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ir}),Yi=Tn(pd),Ic=b({},_l,{propertyName:0,elapsedTime:0,pseudoElement:0}),mp=Tn(Ic),yd=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(yd),Li=b({},_l,{newState:0,oldState:0}),$c=Tn(Li),tf=[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=" ",ef=!1;function xo(e,a){switch(e){case"keyup":return tf.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ws(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 Ws(a);case"keypress":return a.which!==32?null:(ef=!0,lr);case"textInput":return e=a.data,e===lr&&ef?null:e;default:return null}}function gd(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 ha={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 nf(e){var a=e&&e.nodeName&&e.nodeName.toLowerCase();return a==="input"?!!ha[e.type]:a==="textarea"}function So(e,a,r,c){ss?gl?gl.push(c):gl=[c]:ss=c,a=rm(a,"onChange"),0<a.length&&(r=new tr("onChange","change",null,r,c),e.push({event:r,listeners:a}))}var Fs=null,Is=null;function af(e){Ig(e,0)}function $s(e){var a=Gi(e);if(qc(a))return e}function lf(e,a){if(e==="change")return a}var sr=!1;if(di){var fs;if(di){var Ae="oninput"in document;if(!Ae){var vd=document.createElement("div");vd.setAttribute("oninput","return;"),Ae=typeof vd.oninput=="function"}fs=Ae}else fs=!1;sr=fs&&(!document.documentMode||9<document.documentMode)}function xd(){Fs&&(Fs.detachEvent("onpropertychange",sf),Is=Fs=null)}function sf(e){if(e.propertyName==="value"&&$s(Is)){var a=[];So(a,Is,e,oo(e)),Qc(af,a)}}function ur(e,a,r){e==="focusin"?(xd(),Fs=a,Is=r,Fs.attachEvent("onpropertychange",sf)):e==="focusout"&&xd()}function El(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $s(Is)}function _d(e,a){if(e==="click")return $s(a)}function Sd(e,a){if(e==="input"||e==="change")return $s(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 tu(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 uf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rf(e,a){var r=uf(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=uf(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=ks(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=ks(e.document)}return a}function eu(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 bd=di&&"documentMode"in document&&11>=document.documentMode,nu=null,Eo=null,au=null,da=!1;function Co(e,a,r){var c=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;da||nu==null||nu!==ks(c)||(c=nu,"selectionStart"in c&&eu(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}),au&&tu(au,c)||(au=c,c=rm(Eo,"onSelect"),0<c.length&&(a=new tr("onSelect","select",null,a,r),e.push({event:a,listeners:c}),a.target=nu)))}function Cl(e,a){var r={};return r[e.toLowerCase()]=a.toLowerCase(),r["Webkit"+e]="webkit"+a,r["Moz"+e]="moz"+a,r}var iu={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 iu.animationend.animation,delete iu.animationiteration.animation,delete iu.animationstart.animation),"TransitionEvent"in window||delete iu.transitionend.transition);function Al(e){if(rr[e])return rr[e];if(!iu[e])return e;var a=iu[e],r;for(r in a)if(a.hasOwnProperty(r)&&r in wn)return rr[e]=a[r];return e}var kn=Al("animationend"),of=Al("animationiteration"),mi=Al("animationstart"),lu=Al("transitionrun"),Ml=Al("transitionstart"),cf=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 su(e,a,r,c){return or(e,a,r,c),uu(e)}function Dl(e,a){return or(e,null,null,a),uu(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 uu(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 Td(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 Td(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=SS(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 z:return Vi(r.children,p,x,a);case M:C=8,p|=24;break;case O:return e=Hn(12,r,a,p|2),e.elementType=O,e.lanes=x,e;case J:return e=Hn(13,r,a,p),e.elementType=J,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 w:C=10;break t;case B:C=9;break t;case H:C=11;break t;case Z: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 Ed(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 ff=new WeakMap;function Jn(e,a){if(typeof e=="object"&&e!==null){var r=ff.get(e);return r!==void 0?r:(a={value:e,source:a,stack:ju(a)},ff.set(e,a),a)}return{value:e,source:a,stack:ju(a)}}var Wa=[],ms=0,fr=null,ru=0,ma=[],Pn=0,yi=null,gi=1,vi="";function Qi(e,a){Wa[ms++]=ru,Wa[ms++]=fr,fr=e,ru=a}function hf(e,a,r){ma[Pn++]=gi,ma[Pn++]=vi,ma[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),hf(e,1,0))}function Nl(e){for(;e===fr;)fr=Wa[--ms],Wa[ms]=null,ru=Wa[--ms],Wa[ms]=null;for(;e===yi;)yi=ma[--Pn],ma[Pn]=null,vi=ma[--Pn],ma[Pn]=null,gi=ma[--Pn],ma[Pn]=null}function hr(e,a){ma[Pn++]=gi,ma[Pn++]=vi,ma[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<ih.length;r++)It(ih[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),Yc(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||n0(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 Cd(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 Cd(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")||Bp(e.type,e.memoizedProps)),r=!r),r&&_e&&Pt(e),Cd(e),a===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));_e=f0(e)}else if(a===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));_e=f0(e)}else a===27?(a=_e,Mu(e.type)?(e=qp,qp=null,_e=e):_e=a):_e=cn?zi(e.stateNode.nextSibling):null;return!0}function ys(){_e=cn=null,Ft=!1}function df(){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 mf=Y(null),Ki=null,An=null;function ki(e,a,r){st(mf,a._currentValue),a._currentValue=r}function wa(e){e._currentValue=mf.current,tt(mf)}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 j=0;j<a.length;j++)if(D.context===a[j]){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(oh):e=[oh])}p=p.return}e!==null&&Bo(a,e,r,c),a.flags|=262144}function ou(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 pf(Ki,e)}function mr(e,a){return Ki===null&&gs(e),pf(e,a)}function pf(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 Ad=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()})}},Md=i.unstable_scheduleCallback,yf=i.unstable_NormalPriority,Mt={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function gf(){return{controller:new Ad,data:new Map,refCount:0}}function yn(e){e.refCount--,e.refCount===0&&Md(yf,function(){e.controller.abort()})}var vs=null,vf=0,Pi=0,Fa=null;function cu(e,a){if(vs===null){var r=vs=[];vf=0,Pi=Cp(),Fa={status:"pending",value:void 0,then:function(c){r.push(c)}}}return vf++,a.then(xf,xf),a}function xf(){if(--vf===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 _f(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 Rd=U.S;U.S=function(e,a){Eu=Kn(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&cu(e,a),Rd!==null&&Rd(e,a)};var Bl=Y(null);function xi(){var e=Bl.current;return e!==null?e:he.pooledCache}function fu(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 zd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Sf(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,bf(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,bf(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 bf(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=[]),Sf(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 hu(e){function a(k,V){if(e){var W=k.deletions;W===null?(k.deletions=[V],k.flags|=16):W.push(V)}}function r(k,V){if(!e)return null;for(;V!==null;)a(k,V),V=V.sibling;return null}function c(k){for(var V=new Map;k!==null;)k.key!==null?V.set(k.key,k):V.set(k.index,k),k=k.sibling;return V}function p(k,V){return k=pi(k,V),k.index=0,k.sibling=null,k}function x(k,V,W){return k.index=W,e?(W=k.alternate,W!==null?(W=W.index,W<V?(k.flags|=67108866,V):W):(k.flags|=67108866,V)):(k.flags|=1048576,V)}function C(k){return e&&k.alternate===null&&(k.flags|=67108866),k}function D(k,V,W,rt){return V===null||V.tag!==6?(V=Do(W,k.mode,rt),V.return=k,V):(V=p(V,W),V.return=k,V)}function j(k,V,W,rt){var zt=W.type;return zt===z?lt(k,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=k,V):(V=cr(W.type,W.key,W.props,null,k.mode,rt),gr(V,W),V.return=k,V)}function F(k,V,W,rt){return V===null||V.tag!==4||V.stateNode.containerInfo!==W.containerInfo||V.stateNode.implementation!==W.implementation?(V=Pa(W,k.mode,rt),V.return=k,V):(V=p(V,W.children||[]),V.return=k,V)}function lt(k,V,W,rt,zt){return V===null||V.tag!==7?(V=Vi(W,k.mode,rt,zt),V.return=k,V):(V=p(V,W),V.return=k,V)}function ot(k,V,W){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return V=Do(""+V,k.mode,W),V.return=k,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case E:return W=cr(V.type,V.key,V.props,null,k.mode,W),gr(W,V),W.return=k,W;case R:return V=Pa(V,k.mode,W),V.return=k,V;case gt:return V=xs(V),ot(k,V,W)}if(Dt(V)||vt(V))return V=Vi(V,k.mode,W,null),V.return=k,V;if(typeof V.then=="function")return ot(k,Go(V),W);if(V.$$typeof===w)return ot(k,mr(k,V),W);vr(k,V)}return null}function $(k,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(k,V,""+W,rt);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case E:return W.key===zt?j(k,V,W,rt):null;case R:return W.key===zt?F(k,V,W,rt):null;case gt:return W=xs(W),$(k,V,W,rt)}if(Dt(W)||vt(W))return zt!==null?null:lt(k,V,W,rt,null);if(typeof W.then=="function")return $(k,V,Go(W),rt);if(W.$$typeof===w)return $(k,V,mr(k,W),rt);vr(k,W)}return null}function at(k,V,W,rt,zt){if(typeof rt=="string"&&rt!==""||typeof rt=="number"||typeof rt=="bigint")return k=k.get(W)||null,D(V,k,""+rt,zt);if(typeof rt=="object"&&rt!==null){switch(rt.$$typeof){case E:return k=k.get(rt.key===null?W:rt.key)||null,j(V,k,rt,zt);case R:return k=k.get(rt.key===null?W:rt.key)||null,F(V,k,rt,zt);case gt:return rt=xs(rt),at(k,V,W,rt,zt)}if(Dt(rt)||vt(rt))return k=k.get(W)||null,lt(V,k,rt,zt,null);if(typeof rt.then=="function")return at(k,V,W,Go(rt),zt);if(rt.$$typeof===w)return at(k,V,W,mr(V,rt),zt);vr(V,rt)}return null}function Et(k,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=$(k,Ct,W[Zt],rt);if(pe===null){Ct===null&&(Ct=ee);break}e&&Ct&&pe.alternate===null&&a(k,Ct),V=x(pe,V,Zt),me===null?zt=pe:me.sibling=pe,me=pe,Ct=ee}if(Zt===W.length)return r(k,Ct),Ft&&Qi(k,Zt),zt;if(Ct===null){for(;Zt<W.length;Zt++)Ct=ot(k,W[Zt],rt),Ct!==null&&(V=x(Ct,V,Zt),me===null?zt=Ct:me.sibling=Ct,me=Ct);return Ft&&Qi(k,Zt),zt}for(Ct=c(Ct);Zt<W.length;Zt++)ee=at(Ct,k,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(Nu){return a(k,Nu)}),Ft&&Qi(k,Zt),zt}function Bt(k,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 Nu=$(k,Ct,pe.value,rt);if(Nu===null){Ct===null&&(Ct=ee);break}e&&Ct&&Nu.alternate===null&&a(k,Ct),V=x(Nu,V,Zt),me===null?zt=Nu:me.sibling=Nu,me=Nu,Ct=ee}if(pe.done)return r(k,Ct),Ft&&Qi(k,Zt),zt;if(Ct===null){for(;!pe.done;Zt++,pe=W.next())pe=ot(k,pe.value,rt),pe!==null&&(V=x(pe,V,Zt),me===null?zt=pe:me.sibling=pe,me=pe);return Ft&&Qi(k,Zt),zt}for(Ct=c(Ct);!pe.done;Zt++,pe=W.next())pe=at(Ct,k,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(NS){return a(k,NS)}),Ft&&Qi(k,Zt),zt}function Te(k,V,W,rt){if(typeof W=="object"&&W!==null&&W.type===z&&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===z){if(V.tag===7){r(k,V.sibling),rt=p(V,W.props.children),rt.return=k,k=rt;break t}}else if(V.elementType===zt||typeof zt=="object"&&zt!==null&&zt.$$typeof===gt&&xs(zt)===V.type){r(k,V.sibling),rt=p(V,W.props),gr(rt,W),rt.return=k,k=rt;break t}r(k,V);break}else a(k,V);V=V.sibling}W.type===z?(rt=Vi(W.props.children,k.mode,rt,W.key),rt.return=k,k=rt):(rt=cr(W.type,W.key,W.props,null,k.mode,rt),gr(rt,W),rt.return=k,k=rt)}return C(k);case R: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(k,V.sibling),rt=p(V,W.children||[]),rt.return=k,k=rt;break t}else{r(k,V);break}else a(k,V);V=V.sibling}rt=Pa(W,k.mode,rt),rt.return=k,k=rt}return C(k);case gt:return W=xs(W),Te(k,V,W,rt)}if(Dt(W))return Et(k,V,W,rt);if(vt(W)){if(zt=vt(W),typeof zt!="function")throw Error(s(150));return W=zt.call(W),Bt(k,V,W,rt)}if(typeof W.then=="function")return Te(k,V,Go(W),rt);if(W.$$typeof===w)return Te(k,V,mr(k,W),rt);vr(k,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,V!==null&&V.tag===6?(r(k,V.sibling),rt=p(V,W),rt.return=k,k=rt):(r(k,V),rt=Do(W,k.mode,rt),rt.return=k,k=rt),C(k)):r(k,V)}return function(k,V,W,rt){try{Gl=0;var zt=Te(k,V,W,rt);return Hl=null,zt}catch(Ct){if(Ct===wl||Ct===Ia)throw Ct;var me=Hn(29,Ct,null,k.mode);return me.lanes=rt,me.return=k,me}finally{}}}var _s=hu(!0),Dd=hu(!1),jl=!1;function Tf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ef(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=uu(e),zo(e,null,r),a}return or(e,c,a,r),uu(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 Cf=!1;function xr(){if(Cf){var e=Fa;if(e!==null)throw e}}function Ss(e,a,r,c){Cf=!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 j=D,F=j.next;j.next=null,C===null?x=F:C.next=F,C=j;var lt=e.alternate;lt!==null&&(lt=lt.updateQueue,D=lt.lastBaseUpdate,D!==C&&(D===null?lt.firstBaseUpdate=F:D.next=F,lt.lastBaseUpdate=j))}if(x!==null){var ot=p.baseState;C=0,lt=F=j=null,D=x;do{var $=D.lane&-536870913,at=$!==D.lane;if(at?(Wt&$)===$:(c&$)===$){$!==0&&$===Pi&&(Cf=!0),lt!==null&&(lt=lt.next={lane:0,tag:D.tag,payload:D.payload,callback:null,next:null});t:{var Et=e,Bt=D;$=a;var Te=r;switch(Bt.tag){case 1:if(Et=Bt.payload,typeof Et=="function"){ot=Et.call(Te,ot,$);break t}ot=Et;break t;case 3:Et.flags=Et.flags&-65537|128;case 0:if(Et=Bt.payload,$=typeof Et=="function"?Et.call(Te,ot,$):Et,$==null)break t;ot=b({},ot,$);break t;case 2:jl=!0}}$=D.callback,$!==null&&(e.flags|=64,at&&(e.flags|=8192),at=p.callbacks,at===null?p.callbacks=[$]:at.push($))}else at={lane:$,tag:D.tag,payload:D.payload,callback:D.callback,next:null},lt===null?(F=lt=at,j=ot):lt=lt.next=at,C|=$;if(D=D.next,D===null){if(D=p.shared.pending,D===null)break;at=D,D=at.next,at.next=null,p.lastBaseUpdate=at,p.shared.pending=null}}while(!0);lt===null&&(j=ot),p.baseState=j,p.firstBaseUpdate=F,p.lastBaseUpdate=lt,x===null&&(p.shared.lanes=0),Ca|=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 pa=Y(null),jn=Y(0);function Af(e,a){e=Qe,st(jn,e),st(pa,a),Qe=e|a.baseLanes}function Mf(){st(jn,Qe),st(pa,pa.current)}function Mn(){Qe=jn.current,tt(pa),tt(jn)}var an=Y(null),Ha=null;function Yl(e){var a=e.alternate;st(Ue,Ue.current&1),st(an,e),Ha===null&&(a===null||pa.current!==null||a.memoizedState!==null)&&(Ha=e)}function Rf(e){st(Ue,Ue.current),st(an,e),Ha===null&&(Ha=e)}function Od(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 ya(e){tt(an),Ha===e&&(Ha=null),tt(Ue)}var Ue=Y(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||Gp(r)||jp(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,pp=0;function Be(){throw Error(s(321))}function zf(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 Df(e,a,r,c,p,x){return Wn=x,wt=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,U.H=e===null||e.memoizedState===null?Fd:pu,bs=!1,x=r(c,p),bs=!1,bi&&(x=Ud(a,r,c,p)),Nd(e),x}function Nd(e){U.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&&ou(e)&&(Re=!0))}function Ud(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)}U.H=Ar,x=a(r,c)}while(bi);return x}function yp(){var e=U.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 Of(){var e=Lo!==0;return Lo=0,e}function Nf(e,a,r){a.updateQueue=e.updateQueue,a.flags&=-2053,e.lanes&=~r}function Uf(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=Sf(Ti,e,a),a=wt,(We===null?a.memoizedState:We.next)===null&&(a=a.alternate,U.H=a===null||a.memoizedState===null?Fd:pu),e}function Xo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return br(e);if(e.$$typeof===w)return hn(e)}throw Error(s(438,String(e)))}function Bf(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]=ft;return a.index++,r}function Ii(e,a){return typeof a=="function"?a(e):a}function Vo(e){var a=Ye();return wf(a,ge,e)}function wf(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,j=null,F=a,lt=!1;do{var ot=F.lane&-536870913;if(ot!==F.lane?(Wt&ot)===ot:(Wn&ot)===ot){var $=F.revertLane;if($===0)j!==null&&(j=j.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&$)===$){F=F.next,$===Pi&&(lt=!0);continue}else ot={lane:0,revertLane:F.revertLane,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},j===null?(D=j=ot,C=x):j=j.next=ot,wt.lanes|=$,Ca|=$;ot=F.action,bs&&r(x,ot),x=F.hasEagerState?F.eagerState:r(x,ot)}else $={lane:ot,revertLane:F.revertLane,gesture:F.gesture,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},j===null?(D=j=$,C=x):j=j.next=$,wt.lanes|=ot,Ca|=ot;F=F.next}while(F!==null&&F!==a);if(j===null?C=x:j.next=D,!Me(x,e.memoizedState)&&(Re=!0,lt&&(r=Fa,r!==null)))throw r;e.memoizedState=x,e.baseState=C,e.baseQueue=j,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 Hf(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,Lf(jf.bind(null,c,p,e),[e]),p.getSnapshot!==a||C||We!==null&&We.memoizedState.tag&1){if(c.flags|=2048,du(9,{destroy:void 0},Gf.bind(null,c,p,r,a),null),he===null)throw Error(s(349));x||(Wn&127)!==0||Bd(c,a,r)}return r}function Bd(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 Gf(e,a,r,c){a.value=r,a.getSnapshot=c,qf(a)&&Zo(e)}function jf(e,a,r){return r(function(){qf(a)&&Zo(e)})}function qf(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 wd(e,a,r,c){return e.baseState=r,wf(e,ge,typeof c=="function"?c:Ii)}function gp(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)}};U.T!==null?r(!0):x.isTransition=!1,c(x),r=a.pending,r===null?(x.next=a.pending=x,Hd(a,x)):(x.next=r.next,a.pending=r.next=x)}}function Hd(e,a){var r=a.action,c=a.payload,p=e.state;if(a.isTransition){var x=U.T,C={};U.T=C;try{var D=r(p,c),j=U.S;j!==null&&j(C,D),Gd(e,a,D)}catch(F){Ko(e,a,F)}finally{x!==null&&C.types!==null&&(x.types=C.types),U.T=x}}else try{x=r(p,c),Gd(e,a,x)}catch(F){Ko(e,a,F)}}function Gd(e,a,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(c){Yf(e,a,c)},function(c){return Ko(e,a,c)}):Yf(e,a,r)}function Yf(e,a,r){a.status="fulfilled",a.value=r,jd(a),e.state=r,a=e.pending,a!==null&&(r=a.next,r===a?e.pending=null:(r=r.next,a.next=r,Hd(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,jd(a),a=a.next;while(a!==c)}e.action=null}function jd(e){e=e.listeners;for(var a=0;a<e.length;a++)(0,e[a])()}function qd(e,a){return a}function Yd(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:qd,lastRenderedState:a},r.queue=c,r=Wd.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=gp.bind(null,wt,p,x,r),p.dispatch=r,c.memoizedState=e,[a,r,!1]}function Ld(e){var a=Ye();return Xd(a,ge,e)}function Xd(e,a,r){if(a=wf(e,a,qd)[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,du(9,{destroy:void 0},vp.bind(null,p,r),null)),[c,x,e]}function vp(e,a){e.action=a}function Vd(e){var a=Ye(),r=ge;if(r!==null)return Xd(a,r,e);Ye(),a=a.memoizedState,r=Ye();var c=r.queue.dispatch;return r.memoizedState=e,[a,c,!1]}function du(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 Qd(){return Ye().memoizedState}function ko(e,a,r,c){var p=qn();wt.flags|=e,p.memoizedState=du(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&&zf(c,ge.memoizedState.deps)?p.memoizedState=du(a,x,r,c):(wt.flags|=e,p.memoizedState=du(1|a,x,r,c))}function Zd(e,a){ko(8390656,8,e,a)}function Lf(e,a){Jo(2048,8,e,a)}function Kd(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 kd(e){var a=Ye().memoizedState;return Kd({ref:a,nextImpl:e}),function(){if(($t&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}function Jd(e,a){return Jo(4,2,e,a)}function ga(e,a){return Jo(4,4,e,a)}function Xf(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,Xf.bind(null,a,e),r)}function Wo(){}function Vf(e,a){var r=Ye();a=a===void 0?null:a;var c=r.memoizedState;return a!==null&&zf(a,c[1])?c[0]:(r.memoizedState=[e,a],e)}function Qf(e,a){var r=Ye();a=a===void 0?null:a;var c=r.memoizedState;if(a!==null&&zf(a,c[1]))return c[0];if(c=e(),bs){Ba(!0);try{e()}finally{Ba(!1)}}return r.memoizedState=[c,a],c}function Zf(e,a,r){return r===void 0||(Wn&1073741824)!==0&&(Wt&261930)===0?e.memoizedState=a:(e.memoizedState=r,e=l(),wt.lanes|=e,Ca|=e,r)}function Kf(e,a,r,c){return Me(r,a)?r:pa.current!==null?(e=Zf(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,Ca|=e,a)}function kf(e,a,r,c,p){var x=X.p;X.p=x!==0&&8>x?x:8;var C=U.T,D={};U.T=D,Er(e,!1,a,r);try{var j=p(),F=U.S;if(F!==null&&F(D,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var lt=_f(j,c);mu(e,a,lt,Ln(e))}else mu(e,a,c,Ln(e))}catch(ot){mu(e,a,{then:function(){},status:"rejected",reason:ot},Ln())}finally{X.p=x,C!==null&&D.types!==null&&(C.types=D.types),U.T=C}}function xp(){}function Jf(e,a,r,c){if(e.tag!==5)throw Error(s(476));var p=Pd(e).queue;kf(e,p,a,it,r===null?xp:function(){return Pf(e),r(c)})}function Pd(e){var a=e.memoizedState;if(a!==null)return a;a={memoizedState:it,baseState:it,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:it},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 Pf(e){var a=Pd(e);a.next===null&&(a=e.alternate.memoizedState),mu(e,a.next.queue,{},Ln())}function Wf(){return hn(oh)}function vn(){return Ye().memoizedState}function Ff(){return Ye().memoizedState}function _p(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:gf()},e.payload=a;return}a=a.return}}function Sp(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=su(e,a,r,c),r!==null&&(u(r,e,c),Fn(r,a,c)))}function Wd(e,a,r){var c=Ln();mu(e,a,r,c)}function mu(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=su(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:Cp(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},$i(e)){if(a)throw Error(s(479))}else a=su(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 Fd={readContext:hn,use:Xo,useCallback:function(e,a){return qn().memoizedState=[e,a===void 0?null:a],e},useContext:hn,useEffect:Zd,useImperativeHandle:function(e,a,r){r=r!=null?r.concat([e]):null,ko(4194308,4,Xf.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=Sp.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=Wd.bind(null,wt,a);return a.dispatch=r,[e.memoizedState,r]},useDebugValue:Wo,useDeferredValue:function(e,a){var r=qn();return Zf(r,e,a)},useTransition:function(){var e=Tr(!1);return e=kf.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||Bd(c,a,r)}p.memoizedState=r;var x={value:r,getSnapshot:a};return p.queue=x,Zd(jf.bind(null,c,x,e),[e]),c.flags|=2048,du(9,{destroy:void 0},Gf.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=pp++,a="_"+a+"r_"+r.toString(32)+"_";return e.memoizedState=a},useHostTransitionStatus:Wf,useFormState:Yd,useActionState:Yd,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:Bf,useCacheRefresh:function(){return qn().memoizedState=_p.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)}}},pu={readContext:hn,use:Xo,useCallback:Vf,useContext:hn,useEffect:Lf,useImperativeHandle:Po,useInsertionEffect:Jd,useLayoutEffect:ga,useMemo:Qf,useReducer:Vo,useRef:Qd,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:Hf,useId:vn,useHostTransitionStatus:Wf,useFormState:Ld,useActionState:Ld,useOptimistic:function(e,a){var r=Ye();return wd(r,ge,e,a)},useMemoCache:Bf,useCacheRefresh:Ff};pu.useEffectEvent=kd;var Ar={readContext:hn,use:Xo,useCallback:Vf,useContext:hn,useEffect:Lf,useImperativeHandle:Po,useInsertionEffect:Jd,useLayoutEffect:ga,useMemo:Qf,useReducer:Qo,useRef:Qd,useState:function(){return Qo(Ii)},useDebugValue:Wo,useDeferredValue:function(e,a){var r=Ye();return ge===null?Zf(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:Hf,useId:vn,useHostTransitionStatus:Wf,useFormState:Vd,useActionState:Vd,useOptimistic:function(e,a){var r=Ye();return ge!==null?wd(r,ge,e,a):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:Bf,useCacheRefresh:Ff};Ar.useEffectEvent=kd;function yu(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 Id(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?!tu(r,c)||!tu(p,x):!0}function $d(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 If(e){Rl(e)}function tm(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 em(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 $f(e,a,r){return r=_i(r),r.tag=3,r.payload={element:null},r.callback=function(){Io(e,a)},r}function gu(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(){em(a,r,c)}}var C=r.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(e.callback=function(){em(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 va(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),bp(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)),bp(e,c,p)),!1}throw Error(s(435,r.tag))}return bp(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=$f(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=$f(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=gu(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?Dd(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=Df(e,a,r,C,x,p),D=Of(),e!==null&&!Re?(Nf(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,xa(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:tu,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 xa(e,a,r,c,p){if(e!==null){var x=e.memoizedProps;if(tu(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 vu(e,a,r,c,p)}function _a(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&&fu(a,x!==null?x.cachePool:null),x!==null?Af(a,x):Mf(),Od(a);else return c=a.lanes=536870912,Ei(e,a,x!==null?x.baseLanes|r:r,r,c)}else x!==null?(fu(a,x.cachePool),Af(a,x),Fi(),a.memoizedState=null):(e!==null&&fu(a,null),Mf(),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&&fu(a,null),Mf(),Od(a),e!==null&&Ul(e,a,c,!0),a.childLanes=p,null}function Ga(e,a){return a=xu({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,ya(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(Rf(a),(e=_e)?(e=c0(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=Ed(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(Rf(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 vu(e,a,r,c,p){return gs(a),r=Df(e,a,r,c,void 0,p),c=Of(),e!==null&&!Re?(Nf(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=Ud(a,c,r,p),Nd(e),c=Of(),e!==null&&!Re?(Nf(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={},Tf(a),C=r.contextType,x.context=typeof C=="object"&&C!==null?hn(C):Ol,x.state=a.memoizedState,C=r.getDerivedStateFromProps,typeof C=="function"&&(yu(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,j=xn(r,D);x.props=j;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)&&$d(a,x,c,C),jl=!1;var $=a.memoizedState;x.state=$,Ss(a,c,x,p),xr(),F=a.memoizedState,D||$!==F||jl?(typeof ot=="function"&&(yu(a,r,ot,c),F=a.memoizedState),(j=jl||Id(a,r,j,c,$,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=j):(typeof x.componentDidMount=="function"&&(a.flags|=4194308),c=!1)}else{x=a.stateNode,Ef(e,a),C=a.memoizedProps,lt=xn(r,C),x.props=lt,ot=a.pendingProps,$=x.context,F=r.contextType,j=Ol,typeof F=="object"&&F!==null&&(j=hn(F)),D=r.getDerivedStateFromProps,(F=typeof D=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(C!==ot||$!==j)&&$d(a,x,c,j),jl=!1,$=a.memoizedState,x.state=$,Ss(a,c,x,p),xr();var at=a.memoizedState;C!==ot||$!==at||jl||e!==null&&e.dependencies!==null&&ou(e.dependencies)?(typeof D=="function"&&(yu(a,r,D,c),at=a.memoizedState),(lt=jl||Id(a,r,lt,c,$,at,j)||e!==null&&e.dependencies!==null&&ou(e.dependencies))?(F||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(c,at,j),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(c,at,j)),typeof x.componentDidUpdate=="function"&&(a.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof x.componentDidUpdate!="function"||C===e.memoizedProps&&$===e.memoizedState||(a.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&$===e.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=at),x.props=c,x.state=at,x.context=j,c=lt):(typeof x.componentDidUpdate!="function"||C===e.memoizedProps&&$===e.memoizedState||(a.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&$===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 Sa={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 ba(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=c0(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=Ed(e),r.return=a,a.child=r,cn=a,_e=null)):e=null,e===null)throw Pt(a);return jp(e)?a.lanes=32:a.lanes=536870912,null}var D=c.children;return c=c.fallback,p?(Fi(),p=a.mode,D=xu({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=Sa,$a(null,c)):(Yl(a),Ll(a,D))}var j=e.memoizedState;if(j!==null&&(D=j.dehydrated,D!==null)){if(x)a.flags&256?(Yl(a),a.flags&=-257,a=_u(e,a,r)):a.memoizedState!==null?(Fi(),a.child=e.child,a.flags|=128,a=null):(Fi(),D=c.fallback,p=a.mode,c=xu({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=Sa,a=$a(null,c));else if(Yl(a),jp(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=_u(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!==j.retryLane))throw j.retryLane=c,Dl(e,c),u(C,e,c),$o;Gp(D)||Gt(),a=_u(e,a,r)}else Gp(D)?(a.flags|=192,a.child=e.child,a=null):(e=j.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,j=e.child,F=j.sibling,c=pi(j,{mode:"hidden",children:c.children}),c.subtreeFlags=j.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?(j=Mt._currentValue,p=p.parent!==j?{parent:j,pool:j}:p):p=wo(),D={baseLanes:D.baseLanes|r,cachePool:p}),c.memoizedState=D,c.childLanes=Or(e,C,r),a.memoizedState=Sa,$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=xu({mode:"visible",children:a},e.mode),a.return=e,e.child=a}function xu(e,a){return e=Hn(22,e,null,a),e.lanes=0,e}function _u(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?ru: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),Ca|=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&&ou(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:oa(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,Rf(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?ba(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,_a(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&&hf(a,ru,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=vu(null,a,e,c,r));else{if(e!=null){var p=e.$$typeof;if(p===H){a.tag=11,a=Rr(null,a,e,c,r);break t}else if(p===Z){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 vu(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,Ef(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=Dd(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=y0(a.type,null,a.pendingProps,null))?a.memoizedState=r:Ft||(r=a.type,e=a.pendingProps,c=om(Ot.current).createElement(r),c[Jt]=a,c[bn]=e,Xn(c,r,e),Pe(c),a.stateNode=c):a.memoizedState=y0(a.type,e.memoizedProps,a.pendingProps,e.memoizedState),null;case 27:return oa(a),e===null&&Ft&&(c=a.stateNode=d0(a.type,a.pendingProps,Ot.current),cn=a,fn=!0,p=_e,Mu(a.type)?(qp=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=rS(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)),oa(a),p=a.type,x=a.pendingProps,C=e!==null?e.memoizedProps:null,c=x.children,Bp(p,x)?c=null:C!==null&&Bp(p,C)&&(a.flags|=32),a.memoizedState!==null&&(p=Df(e,a,yp,null,null,r),oh._currentValue=p),ti(e,a),we(e,a,c,r),a.child;case 6:return e===null&&Ft&&((e=r=_e)&&(r=oS(r,a.pendingProps,fn),r!==null?(a.stateNode=r,cn=a,_e=null,e=!0):e=!1),e||Pt(a)),null;case 13:return ba(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 xa(e,a,a.type,a.pendingProps,r);case 19:return Ur(e,a,r);case 31:return Dr(e,a,r);case 22:return _a(e,a,r,a.pendingProps);case 24:return gs(a),c=hn(Mt),e===null?(p=xi(),p===null&&(p=he,x=gf(),p.pooledCache=x,x.refCount++,x!==null&&(p.pooledCacheLanes|=r),p=x),a.memoizedState={parent:c,cache:p},Tf(a),ki(a,Mt,p)):((e.lanes&r)!==0&&(Ef(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,!S0(a))if(yt())e.flags|=8192;else throw Nt=yr,pr}function Su(e,a){a!==null&&(e.flags|=4),e.flags&16384&&(a=e.tag!==22?Qs():536870912,e.lanes|=a,Aa|=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 th(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,df())),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=d0(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=om(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||n0(e.nodeValue,r)),e||Pt(a,!0)}else e=om(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=df(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return a.flags&256?(ya(a),a):(ya(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=df(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(ya(a),a):(ya(a),null)}return ya(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),Su(a,a.updateQueue),ye(a),null);case 4:return ue(),e===null&&zp(a.stateNode.containerInfo),ye(a),null;case 10:return wa(a.type),ye(a),null;case 19:if(tt(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,Su(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()>Ma&&(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,Su(a,e),wr(c,!0),c.tail===null&&c.tailMode==="hidden"&&!x.alternate&&!Ft)return ye(a),null}else 2*Kn()-c.renderingStartTime>Ma&&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 ya(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&&Su(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&&tt(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(ya(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(ya(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 tt(Ue),null;case 4:return ue(),null;case 10:return wa(a.type),null;case 22:case 23:return ya(a),Mn(),e!==null&&tt(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&&ya(a);break;case 13:ya(a);break;case 19:tt(Ue);break;case 10:wa(a.type);break;case 22:case 23:ya(a),Mn(),e!==null&&tt(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 j=r,F=D;try{F()}catch(lt){xe(p,j,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 eh(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 Ta(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 Ea(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;nS(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&&Mu(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&&Mu(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&&Mu(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&&Mu(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 bu(e,a){if(e=e.containerInfo,Np=ym,e=To(e),eu(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,j=-1,F=0,lt=0,ot=e,$=null;e:for(;;){for(var at;ot!==r||p!==0&&ot.nodeType!==3||(D=C+p),ot!==x||c!==0&&ot.nodeType!==3||(j=C+c),ot.nodeType===3&&(C+=ot.nodeValue.length),(at=ot.firstChild)!==null;)$=ot,ot=at;for(;;){if(ot===e)break e;if($===r&&++F===p&&(D=C),$===x&&++lt===c&&(j=C),(at=ot.nextSibling)!==null)break;ot=$,$=ot.parentNode}ot=at}r=D===-1||j===-1?null:{start:D,end:j}}else r=null}r=r||{start:0,end:0}}else r=null;for(Up={focusedElem:e,selectionRange:r},ym=!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)Hp(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Hp(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 nm(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&&Ea(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&&nh(e,r),c&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=Q_.bind(null,r),cS(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||Ta(r,a),zn(e,a,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:ze||Ta(r,a);var c=ie,p=Ie;Mu(r.type)&&(ie=r.stateNode,Ie=!1),zn(e,a,r),sh(r.stateNode),ie=c,Ie=p;break;case 5:ze||Ta(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,r0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),mc(e)):r0(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||(Ta(r,a),c=r.stateNode,typeof c.componentWillUnmount=="function"&&eh(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 nh(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 am(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=am(e);a.forEach(function(c){if(!r.has(c)){r.add(c);var p=Z_.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(Mu(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||Ta(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||Ta(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=x0("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=x0("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 _0(p,e.type,e.stateNode);else e.stateNode=v0(p,c,e.memoizedProps);else x!==c?(x===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):x.count--,c===null?_0(p,e.type,e.stateNode):v0(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||Ta(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||Ta(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(hm=null,p=ta,ta=cm(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,im(e));break;case 4:c=ta,ta=cm(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 j=r!==null&&r.memoizedState!==null,F=La,lt=ze;if(La=F||p,ze=lt||j,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||j||La||ze||As(e)),r=null,a=e;;){if(a.tag===5||a.tag===26){if(r===null){j=r=a;try{if(x=j.stateNode,p)C=x.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{D=j.stateNode;var ot=j.memoizedProps.style,$=ot!=null&&ot.hasOwnProperty("display")?ot.display:null;D.style.display=$==null||typeof $=="boolean"?"":(""+$).trim()}}catch(Et){xe(j,j.return,Et)}}}else if(a.tag===6){if(r===null){j=a;try{j.stateNode.nodeValue=p?"":j.memoizedProps}catch(Et){xe(j,j.return,Et)}}}else if(a.tag===18){if(r===null){j=a;try{var at=j.stateNode;p?o0(at,!0):o0(j.stateNode,!1)}catch(Et){xe(j,j.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 j=r.stateNode.containerInfo,F=Mi(e);Xt(e,F,j);break;default:throw Error(s(161))}}catch(lt){xe(e,e.return,lt)}e.flags&=-3}a&4096&&(e.flags&=-4097)}function im(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var a=e;im(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;)nm(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:Ta(a,a.return);var r=a.stateNode;typeof r.componentWillUnmount=="function"&&eh(a,a.return,r),As(a);break;case 27:sh(a.stateNode);case 26:case 5:Ta(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 j=p.shared.hiddenCallbacks;if(j!==null)for(p.shared.hiddenCallbacks=null,p=0;p<j.length;p++)Si(j[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&&Ea(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&&nh(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(j){xe(a,a.return,j)}}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):Tu(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,j=c,F=C.flags;switch(C.tag){case 0:case 11:case 15:kl(x,C,D,j,p),Ci(8,C);break;case 23:break;case 22:var lt=C.stateNode;C.memoizedState!==null?lt._visibility&2?kl(x,C,D,j,p):Tu(x,C):(lt._visibility|=2,kl(x,C,D,j,p)),p&&F&2048&&ic(C.alternate,C);break;case 24:kl(x,C,D,j,p),p&&F&2048&&al(C.alternate,C);break;default:kl(x,C,D,j,p)}a=a.sibling}}function Tu(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:Tu(r,c),p&2048&&ic(c.alternate,c);break;case 24:Tu(r,c),p&2048&&al(c.alternate,c);break;default:Tu(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&&bS(r,ta,e.memoizedState,e.memoizedProps);break;case 5:Ms(e,a,r);break;case 3:case 4:var c=ta;ta=cm(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,Ca=0,il=0,ni=0,te=0,Aa=0,ai=null,On=null,na=!1,ll=0,Eu=0,Ma=1/0,Cu=null,Ri=null,Ne=0,ii=null,Ra=null,Xa=0,sl=0,zs=null,rc=null,Ds=0,Os=null;function Ln(){return($t&2)!==0&&Wt!==0?Wt&-Wt:U.T!==null?Cp():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||Vs(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 j=D.current.memoizedState.isDehydrated;if(j&&(P(D,C).flags|=256),C=aa(D,C,!1),C!==2){if(ve&&!j){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=s0(y.bind(null,c,r,On,Cu,na,a,te,il,Aa,Yt,x,"Throttled",-0,0),p);break t}y(c,r,On,Cu,na,a,te,il,Aa,Yt,x,null,-0,0)}}break}while(!0);Jl(e)}function y(e,a,r,c,p,x,C,D,j,F,lt,ot,$,at){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?Eu-Kn():0;if(Et=TS(ot,Et),Et!==null){Xa=x,e.cancelPendingCommit=Et(Ht.bind(null,e,a,x,r,c,p,C,D,j,lt,ot,null,$,at)),T(e,x,C,!F);return}}Ht(e,a,x,r,c,p,C,D,j)}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&&Hc(e,r,a)}function N(){return($t&6)===0?(ah(0),!1):!0}function G(){if(Vt!==null){if(Rt===0)var e=Vt.return;else e=Vt,An=Ki=null,Uf(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,lS(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Xa=0,G(),he=e,Vt=r=pi(e.current,null),Wt=a,Rt=0,Kt=null,Yt=!1,Qt=Vs(e,a),ve=!1,Aa=te=ni=il=Ca=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,U.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=U.H;return U.H=Cr,e===null?Cr:e}function bt(){var e=U.A;return U.A=sc,e}function Gt(){de=4,Yt||(Wt&4194048)!==Wt&&an.current!==null||(Qt=!0),(Ca&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)&&(Cu=null,P(e,a)),a=!1;var C=de;t:do try{if(Rt!==0&&Vt!==null){var D=Vt,j=Kt;switch(Rt){case 8:G(),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,dt(e,D,j,F),r&&Qt){C=0;break t}break;default:F=Rt,Rt=0,Kt=null,dt(e,D,j,F)}}jr(),C=de;break}catch(lt){ut(e,lt)}while(!0);return a&&e.shellSuspendCounter++,An=Ki=null,$t=c,U.H=p,U.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?(Cu=null,Ma=Kn()+500,P(e,a)):Qt=Vs(e,a);t:do try{if(Rt!==0&&Vt!==null){a=Vt;var x=Kt;e:switch(Rt){case 1:Rt=0,Kt=null,dt(e,a,x,1);break;case 2:case 9:if(zd(x)){Rt=0,Kt=null,et(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:zd(x)?(Rt=0,Kt=null,et(a)):(Rt=0,Kt=null,dt(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?S0(C):D.stateNode.complete){Rt=0,Kt=null;var j=D.sibling;if(j!==null)Vt=j;else{var F=D.return;F!==null?(Vt=F,At(F)):Vt=null}break e}}Rt=0,Kt=null,dt(e,a,x,5);break;case 6:Rt=0,Kt=null,dt(e,a,x,6);break;case 8:G(),de=6;break t;default:throw Error(s(462))}}I();break}catch(lt){ut(e,lt)}while(!0);return An=Ki=null,U.H=c,U.A=p,$t=r,Vt!==null?0:(he=null,Wt=0,zl(),de)}function I(){for(;Vt!==null&&!hp();)K(Vt)}function K(e){var a=tc(e.alternate,e,Qe);e.memoizedProps=e.pendingProps,a===null?At(e):Vt=a}function et(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:Uf(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 dt(e,a,r,c){An=Ki=null,Uf(a),Hl=null,Gl=0;var p=a.return;try{if(va(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=th(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,j){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,Fh(e,r,x,C,D,j),e===he&&(Vt=he=null,Wt=0),Ra=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,K_(Ir,function(){return Vg(),null})):(e.callbackNode=null,e.callbackPriority=0),c=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||c){c=U.T,U.T=null,p=X.p,X.p=2,C=$t,$t|=4;try{bu(e,a,r)}finally{$t=C,X.p=p,U.T=c}}Ne=1,le(),sn(),se()}}function le(){if(Ne===1){Ne=0;var e=ii,a=Ra,r=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||r){r=U.T,U.T=null;var c=X.p;X.p=2;var p=$t;$t|=4;try{Kl(a,e);var x=Up,C=To(e.containerInfo),D=x.focusedElem,j=x.selectionRange;if(C!==D&&D&&D.ownerDocument&&bo(D.ownerDocument.documentElement,D)){if(j!==null&&eu(D)){var F=j.start,lt=j.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,$=ot&&ot.defaultView||window;if($.getSelection){var at=$.getSelection(),Et=D.textContent.length,Bt=Math.min(j.start,Et),Te=j.end===void 0?Bt:Math.min(j.end,Et);!at.extend&&Bt>Te&&(C=Te,Te=Bt,Bt=C);var k=rf(D,Bt),V=rf(D,Te);if(k&&V&&(at.rangeCount!==1||at.anchorNode!==k.node||at.anchorOffset!==k.offset||at.focusNode!==V.node||at.focusOffset!==V.offset)){var W=ot.createRange();W.setStart(k.node,k.offset),at.removeAllRanges(),Bt>Te?(at.addRange(W),at.extend(V.node,V.offset)):(W.setEnd(V.node,V.offset),at.addRange(W))}}}}for(ot=[],at=D;at=at.parentNode;)at.nodeType===1&&ot.push({element:at,left:at.scrollLeft,top:at.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}}ym=!!Np,Up=Np=null}finally{$t=p,X.p=c,U.T=r}}e.current=a,Ne=2}}function sn(){if(Ne===2){Ne=0;var e=ii,a=Ra,r=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||r){r=U.T,U.T=null;var c=X.p;X.p=2;var p=$t;$t|=4;try{nm(e,a.alternate,a)}finally{$t=p,X.p=c,U.T=r}}Ne=3}}function se(){if(Ne===4||Ne===3){Ne=0,Zh();var e=ii,a=Ra,r=Xa,c=rc;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Ne=5:(Ne=0,Ra=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=U.T,p=X.p,X.p=2,U.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{U.T=a,X.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,ah(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(),Vg()}function Vg(){if(Ne!==5)return!1;var e=ii,a=sl;sl=0;var r=no(Xa),c=U.T,p=X.p;try{X.p=32>r?32:r,U.T=null,r=zs,zs=null;var x=ii,C=Xa;if(Ne=0,Ra=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,ah(0,!1),Je&&typeof Je.onPostCommitFiberRoot=="function")try{Je.onPostCommitFiberRoot(Ua,x)}catch{}return!0}finally{X.p=p,U.T=c,ul(e,a)}}function Qg(e,a,r){a=Jn(r,a),a=$f(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)Qg(e,e,r);else for(;a!==null;){if(a.tag===3){Qg(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=gu(2),c=Wi(a,r,2),c!==null&&(In(r,c,a,e),Ks(c,2),Jl(c));break}}a=a.return}}function bp(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=V_.bind(null,e,a,r),a.then(e,e))}function V_(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,Aa===Wt&&(Aa=0)),Jl(e)}function Zg(e,a){a===0&&(a=Qs()),e=Dl(e,a),e!==null&&(Ks(e,a),Jl(e))}function Q_(e){var a=e.memoizedState,r=0;a!==null&&(r=a.retryLane),Zg(e,r)}function Z_(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),Zg(e,r)}function K_(e,a){return Na(e,a)}var lm=null,cc=null,Tp=!1,sm=!1,Ep=!1,Au=0;function Jl(e){e!==cc&&e.next===null&&(cc===null?lm=cc=e:cc=cc.next=e),sm=!0,Tp||(Tp=!0,J_())}function ah(e,a){if(!Ep&&sm){Ep=!0;do for(var r=!1,c=lm;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,Pg(c,x))}else x=Wt,x=Vu(c,c===he?x:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(x&3)===0||Vs(c,x)||(r=!0,Pg(c,x));c=c.next}while(r);Ep=!1}}function k_(){Kg()}function Kg(){sm=Tp=!1;var e=0;Au!==0&&iS()&&(e=Au);for(var a=Kn(),r=null,c=lm;c!==null;){var p=c.next,x=kg(c,a);x===0?(c.next=null,r===null?lm=p:r.next=p,p===null&&(cc=r)):(r=c,(e!==0||(x&3)!==0)&&(sm=!0)),c=p}Ne!==0&&Ne!==5||ah(e),Au!==0&&(Au=0)}function kg(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,j=p[C];j===-1?((D&r)===0||(D&c)!==0)&&(p[C]=$r(D,a)):j<=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||Vs(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=Ph;break;default:r=Ir}return c=Jg.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 Jg(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),kg(e,Kn()),e.callbackNode!=null&&e.callbackNode===r?Jg.bind(null,e):null)}function Pg(e,a){if(oc())return null;h(e,a,!0)}function J_(){sS(function(){($t&6)!==0?Na(kh,k_):Kg()})}function Cp(){if(Au===0){var e=Pi;e===0&&(e=Lu,Lu<<=1,(Lu&261888)===0&&(Lu=256)),Au=e}return Au}function Wg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Wu(""+e)}function Fg(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 P_(e,a,r,c,p){if(a==="submit"&&r&&r.stateNode===p){var x=Wg((p[bn]||null).action),C=c.submitter;C&&(a=(a=C[bn]||null)?Wg(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(Au!==0){var j=C?Fg(p,C):new FormData(p);Jf(r,{pending:!0,data:j,method:p.method,action:x},null,j)}}else typeof x=="function"&&(D.preventDefault(),j=C?Fg(p,C):new FormData(p),Jf(r,{pending:!0,data:j,method:p.method,action:x},x,j))},currentTarget:p}]})}}for(var Ap=0;Ap<Mo.length;Ap++){var Mp=Mo[Ap],W_=Mp.toLowerCase(),F_=Mp[0].toUpperCase()+Mp.slice(1);En(W_,"on"+F_)}En(kn,"onAnimationEnd"),En(of,"onAnimationIteration"),En(mi,"onAnimationStart"),En("dblclick","onDoubleClick"),En("focusin","onFocus"),En("focusout","onBlur"),En(lu,"onTransitionRun"),En(Ml,"onTransitionStart"),En(cf,"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 ih="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(" "),I_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ih));function Ig(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],j=D.instance,F=D.currentTarget;if(D=D.listener,j!==x&&p.isPropagationStopped())break t;x=D,p.currentTarget=F;try{x(p)}catch(lt){Rl(lt)}p.currentTarget=null,x=j}else for(C=0;C<c.length;C++){if(D=c[C],j=D.instance,F=D.currentTarget,D=D.listener,j!==x&&p.isPropagationStopped())break t;x=D,p.currentTarget=F;try{x(p)}catch(lt){Rl(lt)}p.currentTarget=null,x=j}}}}function It(e,a){var r=a[ao];r===void 0&&(r=a[ao]=new Set);var c=e+"__bubble";r.has(c)||($g(a,e,2,!1),r.add(c))}function Rp(e,a,r){var c=0;a&&(c|=4),$g(r,e,c,a)}var um="_reactListening"+Math.random().toString(36).slice(2);function zp(e){if(!e[um]){e[um]=!0,fi.forEach(function(r){r!=="selectionchange"&&(I_.has(r)||Rp(r,!1,e),Rp(r,!0,e))});var a=e.nodeType===9?e:e.ownerDocument;a===null||a[um]||(a[um]=!0,Rp("selectionchange",!1,a))}}function $g(e,a,r,c){switch(R0(a)){case 2:var p=AS;break;case 8:p=MS;break;default:p=Qp}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 Dp(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 j=C.tag;if((j===3||j===4)&&C.stateNode.containerInfo===p)return;C=C.return}for(;D!==null;){if(C=nn(D),C===null)return;if(j=C.tag,j===5||j===6||j===26||j===27){c=x=C;continue t}D=D.parentNode}}c=c.return}Qc(function(){var F=x,lt=oo(r),ot=[];t:{var $=Xi.get(e);if($!==void 0){var at=tr,Et=e;switch(e){case"keypress":if(rs(r)===0)break t;case"keydown":case"keyup":at=Fc;break;case"focusin":Et="focus",at=go;break;case"focusout":Et="blur",at=go;break;case"beforeblur":case"afterblur":at=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":at=sd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":at=ud;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":at=Yi;break;case kn:case of:case mi:at=cd;break;case Ao:at=mp;break;case"scroll":case"scrollend":at=po;break;case"wheel":at=Sl;break;case"copy":case"cut":case"paste":at=Kc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":at=vo;break;case"toggle":case"beforetoggle":at=$c}var Bt=(a&4)!==0,Te=!Bt&&(e==="scroll"||e==="scrollend"),k=Bt?$!==null?$+"Capture":null:$;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||k===null||(rt=us(V,k),rt!=null&&Bt.push(lh(V,rt,W))),Te)break;V=V.return}0<Bt.length&&($=new at($,Et,null,r,lt),ot.push({event:$,listeners:Bt}))}}if((a&7)===0){t:{if($=e==="mouseover"||e==="pointerover",at=e==="mouseout"||e==="pointerout",$&&r!==Fu&&(Et=r.relatedTarget||r.fromElement)&&(nn(Et)||Et[pl]))break t;if((at||$)&&($=lt.window===lt?lt:($=lt.ownerDocument)?$.defaultView||$.parentWindow:window,at?(Et=r.relatedTarget||r.toElement,at=F,Et=Et?nn(Et):null,Et!==null&&(Te=f(Et),Bt=Et.tag,Et!==Te||Bt!==5&&Bt!==27&&Bt!==6)&&(Et=null)):(at=null,Et=F),at!==Et)){if(Bt=sd,rt="onMouseLeave",k="onMouseEnter",V="mouse",(e==="pointerout"||e==="pointerover")&&(Bt=vo,rt="onPointerLeave",k="onPointerEnter",V="pointer"),Te=at==null?$:Gi(at),W=Et==null?$:Gi(Et),$=new Bt(rt,V+"leave",at,r,lt),$.target=Te,$.relatedTarget=W,rt=null,nn(lt)===F&&(Bt=new Bt(k,V+"enter",Et,r,lt),Bt.target=W,Bt.relatedTarget=Te,rt=Bt),Te=rt,at&&Et)e:{for(Bt=$_,k=at,V=Et,W=0,rt=k;rt;rt=Bt(rt))W++;rt=0;for(var zt=V;zt;zt=Bt(zt))rt++;for(;0<W-rt;)k=Bt(k),W--;for(;0<rt-W;)V=Bt(V),rt--;for(;W--;){if(k===V||V!==null&&k===V.alternate){Bt=k;break e}k=Bt(k),V=Bt(V)}Bt=null}else Bt=null;at!==null&&t0(ot,$,at,Bt,!1),Et!==null&&Te!==null&&t0(ot,Te,Et,Bt,!0)}}t:{if($=F?Gi(F):window,at=$.nodeName&&$.nodeName.toLowerCase(),at==="select"||at==="input"&&$.type==="file")var me=lf;else if(nf($))if(sr)me=Sd;else{me=El;var Ct=ur}else at=$.nodeName,!at||at.toLowerCase()!=="input"||$.type!=="checkbox"&&$.type!=="radio"?F&&Pu(F.elementType)&&(me=lf):me=_d;if(me&&(me=me(e,F))){So(ot,me,r,lt);break t}Ct&&Ct(e,$,F),e==="focusout"&&F&&$.type==="number"&&F.memoizedProps.value!=null&&uo($,"number",$.value)}switch(Ct=F?Gi(F):window,e){case"focusin":(nf(Ct)||Ct.contentEditable==="true")&&(nu=Ct,Eo=F,au=null);break;case"focusout":au=Eo=nu=null;break;case"mousedown":da=!0;break;case"contextmenu":case"mouseup":case"dragend":da=!1,Co(ot,r,lt);break;case"selectionchange":if(bd)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=rm(F,ee),0<Ct.length&&(ee=new kc(ee,e,null,r,lt),ot.push({event:ee,listeners:Ct}),Zt?ee.data=Zt:(Zt=Ws(r),Zt!==null&&(ee.data=Zt)))),(Zt=cs?_o(e,r):gd(e,r))&&(ee=rm(F,"onBeforeInput"),0<ee.length&&(Ct=new kc("onBeforeInput","beforeinput",null,r,lt),ot.push({event:Ct,listeners:ee}),Ct.data=Zt)),P_(ot,e,F,r,lt)}Ig(ot,a)})}function lh(e,a,r){return{instance:e,listener:a,currentTarget:r}}function rm(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(lh(e,p,x)),p=us(e,a),p!=null&&c.push(lh(e,p,x))),e.tag===3)return c;e=e.return}return[]}function $_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function t0(e,a,r,c,p){for(var x=a._reactName,C=[];r!==null&&r!==c;){var D=r,j=D.alternate,F=D.stateNode;if(D=D.tag,j!==null&&j===c)break;D!==5&&D!==26&&D!==27||F===null||(j=F,p?(F=us(r,x),F!=null&&C.unshift(lh(r,F,j))):p||(F=us(r,x),F!=null&&C.push(lh(r,F,j)))),r=r.return}C.length!==0&&e.push({event:a,listeners:C})}var tS=/\r\n?/g,eS=/\u0000|\uFFFD/g;function e0(e){return(typeof e=="string"?e:""+e).replace(tS,`
|
|
50
|
+
`).replace(eS,"")}function n0(e,a){return a=e0(a),e0(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":Xc(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=id.get(r)||r,Ku(e,r,c))}}function Op(e,a,r,c,p,x){switch(r){case"style":Xc(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,j=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":j=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)}}Yc(e,x,D,j,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?Js(e,!!c,a,!1):r!=null&&Js(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(j in r)if(r.hasOwnProperty(j)&&(c=r[j],c!=null))switch(j){case"selected":e.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:be(e,a,j,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<ih.length;c++)It(ih[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&&Op(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 nS(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,j=null,F=null,lt=null;for(at in r){var ot=r[at];if(r.hasOwnProperty(at)&&ot!=null)switch(at){case"checked":break;case"value":break;case"defaultValue":j=ot;default:c.hasOwnProperty(at)||be(e,a,at,null,c,ot)}}for(var $ in c){var at=c[$];if(ot=r[$],c.hasOwnProperty($)&&(at!=null||ot!=null))switch($){case"type":x=at;break;case"name":p=at;break;case"checked":F=at;break;case"defaultChecked":lt=at;break;case"value":C=at;break;case"defaultValue":D=at;break;case"children":case"dangerouslySetInnerHTML":if(at!=null)throw Error(s(137,a));break;default:at!==ot&&be(e,a,$,at,c,ot)}}so(e,C,D,j,F,lt,x,p);return;case"select":at=C=D=$=null;for(x in r)if(j=r[x],r.hasOwnProperty(x)&&j!=null)switch(x){case"value":break;case"multiple":at=j;default:c.hasOwnProperty(x)||be(e,a,x,null,c,j)}for(p in c)if(x=c[p],j=r[p],c.hasOwnProperty(p)&&(x!=null||j!=null))switch(p){case"value":$=x;break;case"defaultValue":D=x;break;case"multiple":C=x;default:x!==j&&be(e,a,p,x,c,j)}a=D,r=C,c=at,$!=null?Js(e,!!r,$,!1):!!c!=!!r&&(a!=null?Js(e,!!r,a,!0):Js(e,!!r,r?[]:"",!1));return;case"textarea":at=$=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":$=p;break;case"defaultValue":at=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)}Lc(e,$,at);return;case"option":for(var Et in r)if($=r[Et],r.hasOwnProperty(Et)&&$!=null&&!c.hasOwnProperty(Et))switch(Et){case"selected":e.selected=!1;break;default:be(e,a,Et,null,c,$)}for(j in c)if($=c[j],at=r[j],c.hasOwnProperty(j)&&$!==at&&($!=null||at!=null))switch(j){case"selected":e.selected=$&&typeof $!="function"&&typeof $!="symbol";break;default:be(e,a,j,$,c,at)}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)$=r[Bt],r.hasOwnProperty(Bt)&&$!=null&&!c.hasOwnProperty(Bt)&&be(e,a,Bt,null,c,$);for(F in c)if($=c[F],at=r[F],c.hasOwnProperty(F)&&$!==at&&($!=null||at!=null))switch(F){case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(s(137,a));break;default:be(e,a,F,$,c,at)}return;default:if(Pu(a)){for(var Te in r)$=r[Te],r.hasOwnProperty(Te)&&$!==void 0&&!c.hasOwnProperty(Te)&&Op(e,a,Te,void 0,c,$);for(lt in c)$=c[lt],at=r[lt],!c.hasOwnProperty(lt)||$===at||$===void 0&&at===void 0||Op(e,a,lt,$,c,at);return}}for(var k in r)$=r[k],r.hasOwnProperty(k)&&$!=null&&!c.hasOwnProperty(k)&&be(e,a,k,null,c,$);for(ot in c)$=c[ot],at=r[ot],!c.hasOwnProperty(ot)||$===at||$==null&&at==null||be(e,a,ot,$,c,at)}function a0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function aS(){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&&a0(C)){for(C=0,D=p.responseEnd,c+=1;c<r.length;c++){var j=r[c],F=j.startTime;if(F>D)break;var lt=j.transferSize,ot=j.initiatorType;lt&&a0(ot)&&(j=j.responseEnd,C+=lt*(j<D?1:(D-F)/(j-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 Np=null,Up=null;function om(e){return e.nodeType===9?e:e.ownerDocument}function i0(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 l0(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 Bp(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 wp=null;function iS(){var e=window.event;return e&&e.type==="popstate"?e===wp?!1:(wp=e,!0):(wp=null,!1)}var s0=typeof setTimeout=="function"?setTimeout:void 0,lS=typeof clearTimeout=="function"?clearTimeout:void 0,u0=typeof Promise=="function"?Promise:void 0,sS=typeof queueMicrotask=="function"?queueMicrotask:typeof u0<"u"?function(e){return u0.resolve(null).then(e).catch(uS)}:s0;function uS(e){setTimeout(function(){throw e})}function Mu(e){return e==="head"}function r0(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")sh(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,sh(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"&&sh(e.ownerDocument.body);r=p}while(r);mc(a)}function o0(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 Hp(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":Hp(r),Qu(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function rS(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 oS(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 c0(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 Gp(e){return e.data==="$?"||e.data==="$~"}function jp(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function cS(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 qp=null;function f0(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 h0(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 d0(e,a,r){switch(a=om(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 sh(e){for(var a=e.attributes;a.length;)e.removeAttributeNode(a[0]);Qu(e)}var Di=new Map,m0=new Set;function cm(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Us=X.d;X.d={f:fS,r:hS,D:dS,C:mS,L:pS,m:yS,X:vS,S:gS,M:xS};function fS(){var e=Us.f(),a=N();return e||a}function hS(e){var a=Ce(e);a!==null&&a.tag===5&&a.type==="form"?Pf(a):Us.r(e)}var fc=typeof document>"u"?null:document;function p0(e,a,r){var c=fc;if(c&&typeof a=="string"&&a){var p=fa(a);p='link[rel="'+e+'"][href="'+p+'"]',typeof r=="string"&&(p+='[crossorigin="'+r+'"]'),m0.has(p)||(m0.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 dS(e){Us.D(e),p0("dns-prefetch",e,null)}function mS(e,a){Us.C(e,a),p0("preconnect",e,a)}function pS(e,a,r){Us.L(e,a,r);var c=fc;if(c&&e&&a){var p='link[rel="preload"][as="'+fa(a)+'"]';a==="image"&&r&&r.imageSrcSet?(p+='[imagesrcset="'+fa(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(p+='[imagesizes="'+fa(r.imageSizes)+'"]')):p+='[href="'+fa(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(uh(x))||a==="script"&&c.querySelector(rh(x))||(a=c.createElement("link"),Xn(a,"link",e),Pe(a),c.head.appendChild(a)))}}function yS(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="'+fa(c)+'"][href="'+fa(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(rh(x)))return}c=r.createElement("link"),Xn(c,"link",e),Pe(c),r.head.appendChild(c)}}}function gS(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(uh(x)))D.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":a},r),(r=Di.get(x))&&Yp(e,r);var j=C=c.createElement("link");Pe(j),Xn(j,"link",e),j._p=new Promise(function(F,lt){j.onload=F,j.onerror=lt}),j.addEventListener("load",function(){D.loading|=1}),j.addEventListener("error",function(){D.loading|=2}),D.loading|=4,fm(C,a,c)}C={type:"stylesheet",instance:C,count:1,state:D},p.set(x,C)}}}function vS(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(rh(p)),x||(e=b({src:e,async:!0},a),(a=Di.get(p))&&Lp(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 xS(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(rh(p)),x||(e=b({src:e,async:!0,type:"module"},a),(a=Di.get(p))&&Lp(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 y0(e,a,r,c){var p=(p=Ot.current)?cm(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(uh(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||_S(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="'+fa(e)+'"'}function uh(e){return'link[rel="stylesheet"]['+e+"]"}function g0(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function _S(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="'+fa(e)+'"]'}function rh(e){return"script[async]"+e}function v0(e,a,r){if(a.count++,a.instance===null)switch(a.type){case"style":var c=e.querySelector('style[data-href~="'+fa(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),fm(c,r.precedence,e),a.instance=c;case"stylesheet":p=hc(r.href);var x=e.querySelector(uh(p));if(x)return a.state.loading|=4,a.instance=x,Pe(x),x;c=g0(r),(p=Di.get(p))&&Yp(c,p),x=(e.ownerDocument||e).createElement("link"),Pe(x);var C=x;return C._p=new Promise(function(D,j){C.onload=D,C.onerror=j}),Xn(x,"link",c),a.state.loading|=4,fm(x,r.precedence,e),a.instance=x;case"script":return x=dc(r.src),(p=e.querySelector(rh(x)))?(a.instance=p,Pe(p),p):(c=r,(p=Di.get(x))&&(c=b({},r),Lp(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,fm(c,r.precedence,e));return a.instance}function fm(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 Yp(e,a){e.crossOrigin==null&&(e.crossOrigin=a.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=a.referrerPolicy),e.title==null&&(e.title=a.title)}function Lp(e,a){e.crossOrigin==null&&(e.crossOrigin=a.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=a.referrerPolicy),e.integrity==null&&(e.integrity=a.integrity)}var hm=null;function x0(e,a,r){if(hm===null){var c=new Map,p=hm=new Map;p.set(r,c)}else p=hm,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 _0(e,a,r){e=e.ownerDocument||e,e.head.insertBefore(r,a==="title"?e.querySelector("head > title"):null)}function SS(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 S0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function bS(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(uh(p));if(x){a=x._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(e.count++,e=dm.bind(e),a.then(e,e)),r.state.loading|=4,r.instance=x,Pe(x);return}x=a.ownerDocument||a,c=g0(c),(p=Di.get(p))&&Yp(c,p),x=x.createElement("link"),Pe(x);var C=x;C._p=new Promise(function(D,j){C.onload=D,C.onerror=j}),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=dm.bind(e),a.addEventListener("load",r),a.addEventListener("error",r))}}var Xp=0;function TS(e,a){return e.stylesheets&&e.count===0&&pm(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var c=setTimeout(function(){if(e.stylesheets&&pm(e,e.stylesheets),e.unsuspend){var x=e.unsuspend;e.unsuspend=null,x()}},6e4+a);0<e.imgBytes&&Xp===0&&(Xp=62500*aS());var p=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&pm(e,e.stylesheets),e.unsuspend)){var x=e.unsuspend;e.unsuspend=null,x()}},(e.imgBytes>Xp?50:800)+a);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function dm(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pm(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var mm=null;function pm(e,a){e.stylesheets=null,e.unsuspend!==null&&(e.count++,mm=new Map,a.forEach(ES,e),mm=null,dm.call(e))}function ES(e,a){if(!(a.state.loading&4)){var r=mm.get(e);if(r)var c=r.get(null);else{r=new Map,mm.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=dm.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 oh={$$typeof:w,Provider:null,Consumer:null,_currentValue:it,_currentValue2:it,_threadCount:0};function CS(e,a,r,c,p,x,C,D,j){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=Zs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zs(0),this.hiddenUpdates=Zs(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=x,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function b0(e,a,r,c,p,x,C,D,j,F,lt,ot){return e=new CS(e,a,r,C,j,F,lt,ot,D),a=1,x===!0&&(a|=24),x=Hn(3,null,null,a),e.current=x,x.stateNode=e,a=gf(),a.refCount++,e.pooledCache=a,a.refCount++,x.memoizedState={element:c,isDehydrated:r,cache:a},Tf(x),e}function T0(e){return e?(e=Ol,e):Ol}function E0(e,a,r,c,p,x){p=T0(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 C0(e,a){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<a?r:a}}function Vp(e,a){C0(e,a),(e=e.alternate)&&C0(e,a)}function A0(e){if(e.tag===13||e.tag===31){var a=Dl(e,67108864);a!==null&&u(a,e,67108864),Vp(e,67108864)}}function M0(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),Vp(e,a)}}var ym=!0;function AS(e,a,r,c){var p=U.T;U.T=null;var x=X.p;try{X.p=2,Qp(e,a,r,c)}finally{X.p=x,U.T=p}}function MS(e,a,r,c){var p=U.T;U.T=null;var x=X.p;try{X.p=8,Qp(e,a,r,c)}finally{X.p=x,U.T=p}}function Qp(e,a,r,c){if(ym){var p=Zp(c);if(p===null)Dp(e,a,c,gm,r),z0(e,c);else if(zS(p,e,a,r,c))c.stopPropagation();else if(z0(e,c),a&4&&-1<RS.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 j=1<<31-Bn(C);D.entanglements[1]|=j,C&=~j}Jl(x),($t&6)===0&&(Ma=Kn()+500,ah(0))}}break;case 31:case 13:D=Dl(x,2),D!==null&&u(D,x,2),N(),Vp(x,2)}if(x=Zp(c),x===null&&Dp(e,a,c,gm,r),x===p)break;p=x}p!==null&&c.stopPropagation()}else Dp(e,a,c,null,r)}}function Zp(e){return e=oo(e),Kp(e)}var gm=null;function Kp(e){if(gm=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 gm=e,null}function R0(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(Kh()){case kh:return 2;case Fr:return 8;case Ir:case Jh:return 32;case Ph:return 268435456;default:return 32}default:return 32}}var kp=!1,Ru=null,zu=null,Du=null,ch=new Map,fh=new Map,Ou=[],RS="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 z0(e,a){switch(e){case"focusin":case"focusout":Ru=null;break;case"dragenter":case"dragleave":zu=null;break;case"mouseover":case"mouseout":Du=null;break;case"pointerover":case"pointerout":ch.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":fh.delete(a.pointerId)}}function hh(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&&A0(a)),e):(e.eventSystemFlags|=c,a=e.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),e)}function zS(e,a,r,c,p){switch(a){case"focusin":return Ru=hh(Ru,e,a,r,c,p),!0;case"dragenter":return zu=hh(zu,e,a,r,c,p),!0;case"mouseover":return Du=hh(Du,e,a,r,c,p),!0;case"pointerover":var x=p.pointerId;return ch.set(x,hh(ch.get(x)||null,e,a,r,c,p)),!0;case"gotpointercapture":return x=p.pointerId,fh.set(x,hh(fh.get(x)||null,e,a,r,c,p)),!0}return!1}function D0(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(){M0(r)});return}}else if(a===31){if(a=m(r),a!==null){e.blockedOn=a,ci(e.priority,function(){M0(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 vm(e){if(e.blockedOn!==null)return!1;for(var a=e.targetContainers;0<a.length;){var r=Zp(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&&A0(a),e.blockedOn=r,!1;a.shift()}return!0}function O0(e,a,r){vm(e)&&r.delete(a)}function DS(){kp=!1,Ru!==null&&vm(Ru)&&(Ru=null),zu!==null&&vm(zu)&&(zu=null),Du!==null&&vm(Du)&&(Du=null),ch.forEach(O0),fh.forEach(O0)}function xm(e,a){e.blockedOn===a&&(e.blockedOn=null,kp||(kp=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,DS)))}var _m=null;function N0(e){_m!==e&&(_m=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){_m===e&&(_m=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(Kp(c||r)===null)continue;break}var x=Ce(r);x!==null&&(e.splice(a,3),a-=3,Jf(x,{pending:!0,data:p,method:r.method,action:c},c,p))}}))}function mc(e){function a(j){return xm(j,e)}Ru!==null&&xm(Ru,e),zu!==null&&xm(zu,e),Du!==null&&xm(Du,e),ch.forEach(a),fh.forEach(a);for(var r=0;r<Ou.length;r++){var c=Ou[r];c.blockedOn===e&&(c.blockedOn=null)}for(;0<Ou.length&&(r=Ou[0],r.blockedOn===null);)D0(r),r.blockedOn===null&&Ou.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||N0(r);else if(C){var D=null;if(x&&x.hasAttribute("formAction")){if(p=x,C=x[bn]||null)D=C.formAction;else if(Kp(p)!==null)continue}else D=C.action;typeof D=="function"?r[c+1]=D:(r.splice(c,3),c-=3),N0(r)}}}function U0(){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 Jp(e){this._internalRoot=e}Sm.prototype.render=Jp.prototype.render=function(e){var a=this._internalRoot;if(a===null)throw Error(s(409));var r=a.current,c=Ln();E0(r,c,e,a,null,null)},Sm.prototype.unmount=Jp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var a=e.containerInfo;E0(e.current,2,null,e,null,null),N(),a[pl]=null}};function Sm(e){this._internalRoot=e}Sm.prototype.unstable_scheduleHydration=function(e){if(e){var a=Hi();e={blockedOn:null,target:e,priority:a};for(var r=0;r<Ou.length&&a!==0&&a<Ou[r].priority;r++);Ou.splice(r,0,e),r===0&&D0(e)}};var B0=t.version;if(B0!=="19.2.4")throw Error(s(527,B0,"19.2.4"));X.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 OS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bm.isDisabled&&bm.supportsFiber)try{Ua=bm.inject(OS),Je=bm}catch{}}return mh.createRoot=function(e,a){if(!o(e))throw Error(s(299));var r=!1,c="",p=If,x=tm,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=b0(e,1,!1,null,null,r,c,null,p,x,C,U0),e[pl]=a.current,zp(e),new Jp(a)},mh.hydrateRoot=function(e,a,r){if(!o(e))throw Error(s(299));var c=!1,p="",x=If,C=tm,D=Fo,j=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&&(j=r.formState)),a=b0(e,1,!0,a,r??null,c,p,j,x,C,D,U0),a.context=T0(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,zp(e),new Sm(a)},mh.version="19.2.4",mh}var Q0;function LS(){if(Q0)return Fp.exports;Q0=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(),Fp.exports=YS(),Fp.exports}var XS=LS();/**
|
|
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 Z0="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 VS(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 jy("",{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:Nh(o)}return ZS(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 QS(){return Math.random().toString(36).substring(2,10)}function k0(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 jy(i,t,n=null,s,o){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof t=="string"?Oc(t):t,state:n,key:t&&t.key||s||QS(),unstable_mask:o}}function Nh({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 Oc(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 ZS(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 M=S(),O=M==null?null:M-v;v=M,g&&g({action:m,location:z.location,delta:O})}function A(M,O){m="PUSH";let B=K0(M)?M:jy(z.location,M,O);v=S()+1;let w=k0(B,v),H=z.createHref(B.unstable_mask||B);try{d.pushState(w,"",H)}catch(J){if(J instanceof DOMException&&J.name==="DataCloneError")throw J;o.location.assign(H)}f&&g&&g({action:m,location:z.location,delta:1})}function E(M,O){m="REPLACE";let B=K0(M)?M:jy(z.location,M,O);v=S();let w=k0(B,v),H=z.createHref(B.unstable_mask||B);d.replaceState(w,"",H),f&&g&&g({action:m,location:z.location,delta:0})}function R(M){return KS(M)}let z={get action(){return m},get location(){return i(o,d)},listen(M){if(g)throw new Error("A history only accepts one active listener");return o.addEventListener(Z0,b),g=M,()=>{o.removeEventListener(Z0,b),g=null}},createHref(M){return t(o,M)},createURL:R,encodeLocation(M){let O=R(M);return{pathname:O.pathname,search:O.search,hash:O.hash}},push:A,replace:E,go(M){return d.go(M)}};return z}function KS(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:Nh(i);return s=s.replace(/ $/,"%20"),!t&&s.startsWith("//")&&(s=n+s),new URL(s,n)}function H1(i,t,n="/"){return kS(i,t,n,!1)}function kS(i,t,n,s){let o=typeof t=="string"?Oc(t):t,f=Ys(o.pathname||"/",n);if(f==null)return null;let d=G1(i);JS(d);let m=null;for(let g=0;m==null&&g<d.length;++g){let v=lb(f);m=ab(d[g],v,s)}return m}function G1(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}".`),G1(d.children,t,A,b,g)),!(d.path==null&&!d.index)&&t.push({path:b,score:eb(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 j1(d.path))f(d,m,!0,v)}),t}function j1(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=j1(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 JS(i){i.sort((t,n)=>t.score!==n.score?n.score-t.score:nb(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}var PS=/^:[\w-]+$/,WS=3,FS=2,IS=1,$S=10,tb=-2,J0=i=>i==="*";function eb(i,t){let n=i.split("/"),s=n.length;return n.some(J0)&&(s+=tb),t&&(s+=FS),n.filter(o=>!J0(o)).reduce((o,f)=>o+(PS.test(f)?WS:f===""?IS:$S),s)}function nb(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 ab(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=Km({path:g.relativePath,caseSensitive:g.caseSensitive,end:v},S),A=g.route;if(!b&&v&&n&&!s[s.length-1].route.index&&(b=Km({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:ob(Fl([f,b.pathnameBase])),route:A}),b.pathnameBase!=="/"&&(f=Fl([f,b.pathnameBase]))}return d}function Km(i,t){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[n,s]=ib(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 R=m[A]||"";d=f.slice(0,f.length-R.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 ib(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 lb(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 Ys(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 sb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function ub(i,t="/"){let{pathname:n,search:s="",hash:o=""}=typeof i=="string"?Oc(i):i,f;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?f=P0(n.substring(1),"/"):f=P0(n,t)):f=t,{pathname:f,search:cb(s),hash:fb(o)}}function P0(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 ey(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 rb(i){return i.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function yg(i){let t=rb(i);return t.map((n,s)=>s===t.length-1?n.pathname:n.pathnameBase)}function np(i,t,n,s=!1){let o;typeof i=="string"?o=Oc(i):(o={...i},qe(!o.pathname||!o.pathname.includes("?"),ey("?","pathname","search",o)),qe(!o.pathname||!o.pathname.includes("#"),ey("#","pathname","hash",o)),qe(!o.search||!o.search.includes("#"),ey("#","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=ub(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,"/"),ob=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),cb=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,fb=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i,hb=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 db(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}function mb(i){return i.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var q1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Y1(i,t){let n=i;if(typeof n!="string"||!sb.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let s=n,o=!1;if(q1)try{let f=new URL(window.location.href),d=n.startsWith("//")?new URL(f.protocol+n):new URL(n),m=Ys(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 L1=["POST","PUT","PATCH","DELETE"];new Set(L1);var pb=["GET",...L1];new Set(pb);var Nc=L.createContext(null);Nc.displayName="DataRouter";var ap=L.createContext(null);ap.displayName="DataRouterState";var yb=L.createContext(!1),X1=L.createContext({isTransitioning:!1});X1.displayName="ViewTransition";var gb=L.createContext(new Map);gb.displayName="Fetchers";var vb=L.createContext(null);vb.displayName="Await";var ui=L.createContext(null);ui.displayName="Navigation";var Yh=L.createContext(null);Yh.displayName="Location";var dl=L.createContext({outlet:null,matches:[],isDataRoute:!1});dl.displayName="Route";var gg=L.createContext(null);gg.displayName="RouteError";var V1="REACT_ROUTER_ERROR",xb="REDIRECT",_b="ROUTE_ERROR_RESPONSE";function Sb(i){if(i.startsWith(`${V1}:${xb}:{`))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 bb(i){if(i.startsWith(`${V1}:${_b}:{`))try{let t=JSON.parse(i.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new hb(t.status,t.statusText,t.data)}catch{}}function Tb(i,{relative:t}={}){qe(Uc(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:s}=L.useContext(ui),{hash:o,pathname:f,search:d}=Lh(i,{relative:t}),m=f;return n!=="/"&&(m=f==="/"?n:Fl([n,f])),s.createHref({pathname:m,search:d,hash:o})}function Uc(){return L.useContext(Yh)!=null}function Il(){return qe(Uc(),"useLocation() may be used only in the context of a <Router> component."),L.useContext(Yh).location}var Q1="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Z1(i){L.useContext(ui).static||L.useLayoutEffect(i)}function ip(){let{isDataRoute:i}=L.useContext(dl);return i?jb():Eb()}function Eb(){qe(Uc(),"useNavigate() may be used only in the context of a <Router> component.");let i=L.useContext(Nc),{basename:t,navigator:n}=L.useContext(ui),{matches:s}=L.useContext(dl),{pathname:o}=Il(),f=JSON.stringify(yg(s)),d=L.useRef(!1);return Z1(()=>{d.current=!0}),L.useCallback((g,v={})=>{if(hl(d.current,Q1),!d.current)return;if(typeof g=="number"){n.go(g);return}let S=np(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 Cb=L.createContext(null);function Ab(i){let t=L.useContext(dl).outlet;return L.useMemo(()=>t&&L.createElement(Cb.Provider,{value:i},t),[t,i])}function Lh(i,{relative:t}={}){let{matches:n}=L.useContext(dl),{pathname:s}=Il(),o=JSON.stringify(yg(n));return L.useMemo(()=>np(i,JSON.parse(o),s,t==="path"),[i,o,s,t])}function Mb(i,t){return K1(i,t)}function K1(i,t,n){var M;qe(Uc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=L.useContext(ui),{matches:o}=L.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||"";J1(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"?Oc(t):t;qe(g==="/"||((M=O.pathname)==null?void 0:M.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 R=H1(i,{pathname:E});hl(v||R!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),hl(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let z=Nb(R&&R.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&&z?L.createElement(Yh.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...b},navigationType:"POP"}},z):z}function Rb(){let i=Gb(),t=db(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=L.createElement(L.Fragment,null,L.createElement("p",null,"💿 Hey developer 👋"),L.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",L.createElement("code",{style:f},"ErrorBoundary")," or"," ",L.createElement("code",{style:f},"errorElement")," prop on your route.")),L.createElement(L.Fragment,null,L.createElement("h2",null,"Unexpected Application Error!"),L.createElement("h3",{style:{fontStyle:"italic"}},t),n?L.createElement("pre",{style:o},n):null,d)}var zb=L.createElement(Rb,null),k1=class extends L.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=bb(i.digest);n&&(i=n)}let t=i!==void 0?L.createElement(dl.Provider,{value:this.props.routeContext},L.createElement(gg.Provider,{value:i,children:this.props.component})):this.props.children;return this.context?L.createElement(Db,{error:i},t):t}};k1.contextType=yb;var ny=new WeakMap;function Db({children:i,error:t}){let{basename:n}=L.useContext(ui);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let s=Sb(t.digest);if(s){let o=ny.get(t);if(o)throw o;let f=Y1(s.location,n);if(q1&&!ny.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 ny.set(t,d),d}return L.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return i}function Ob({routeContext:i,match:t,children:n}){let s=L.useContext(Nc);return s&&s.static&&s.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=t.route.id),L.createElement(dl.Provider,{value:i},n)}function Nb(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,R=b.route.loader&&!A.hasOwnProperty(b.route.id)&&(!E||E[b.route.id]===void 0);if(b.route.lazy||R){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:mb(s.matches),errorInfo:b})}:void 0;return o.reduceRight((S,b,A)=>{let E,R=!1,z=null,M=null;s&&(E=f&&b.route.id?f[b.route.id]:void 0,z=b.route.errorElement||zb,d&&(m<0&&A===0?(J1("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,M=null):m===A&&(R=!0,M=b.route.hydrateFallbackElement||null)));let O=t.concat(o.slice(0,A+1)),B=()=>{let w;return E?w=z:R?w=M:b.route.Component?w=L.createElement(b.route.Component,null):b.route.element?w=b.route.element:w=S,L.createElement(Ob,{match:b,routeContext:{outlet:S,matches:O,isDataRoute:s!=null},children:w})};return s&&(b.route.ErrorBoundary||b.route.errorElement||A===0)?L.createElement(k1,{location:s.location,revalidation:s.revalidation,component:z,error:E,children:B(),routeContext:{outlet:null,matches:O,isDataRoute:!0},onError:v}):B()},null)}function vg(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ub(i){let t=L.useContext(Nc);return qe(t,vg(i)),t}function Bb(i){let t=L.useContext(ap);return qe(t,vg(i)),t}function wb(i){let t=L.useContext(dl);return qe(t,vg(i)),t}function xg(i){let t=wb(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 Hb(){return xg("useRouteId")}function Gb(){var s;let i=L.useContext(gg),t=Bb("useRouteError"),n=xg("useRouteError");return i!==void 0?i:(s=t.errors)==null?void 0:s[n]}function jb(){let{router:i}=Ub("useNavigate"),t=xg("useNavigate"),n=L.useRef(!1);return Z1(()=>{n.current=!0}),L.useCallback(async(o,f={})=>{hl(n.current,Q1),n.current&&(typeof o=="number"?await i.navigate(o):await i.navigate(o,{fromRouteId:t,...f}))},[i,t])}var W0={};function J1(i,t,n){!t&&!W0[i]&&(W0[i]=!0,hl(!1,n))}L.memo(qb);function qb({routes:i,future:t,state:n,isStatic:s,onError:o}){return K1(i,void 0,{state:n,isStatic:s,onError:o})}function Yb({to:i,replace:t,state:n,relative:s}){qe(Uc(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=L.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}=L.useContext(dl),{pathname:d}=Il(),m=ip(),g=np(i,yg(f),d,s==="path"),v=JSON.stringify(g);return L.useEffect(()=>{m(JSON.parse(v),{replace:t,state:n,relative:s})},[m,v,s,t,n]),null}function Lb(i){return Ab(i.context)}function Uu(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 Xb({basename:i="/",children:t=null,location:n,navigationType:s="POP",navigator:o,static:f=!1,unstable_useTransitions:d}){qe(!Uc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=i.replace(/^\/*/,"/"),g=L.useMemo(()=>({basename:m,navigator:o,static:f,unstable_useTransitions:d,future:{}}),[m,o,f,d]);typeof n=="string"&&(n=Oc(n));let{pathname:v="/",search:S="",hash:b="",state:A=null,key:E="default",unstable_mask:R}=n,z=L.useMemo(()=>{let M=Ys(v,m);return M==null?null:{location:{pathname:M,search:S,hash:b,state:A,key:E,unstable_mask:R},navigationType:s}},[m,v,S,b,A,E,s,R]);return hl(z!=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.`),z==null?null:L.createElement(ui.Provider,{value:g},L.createElement(Yh.Provider,{children:t,value:z}))}function Vb({children:i,location:t}){return Mb(qy(i),t)}function qy(i,t=[]){let n=[];return L.Children.forEach(i,(s,o)=>{if(!L.isValidElement(s))return;let f=[...t,o];if(s.type===L.Fragment){n.push.apply(n,qy(s.props.children,f));return}qe(s.type===Uu,`[${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=qy(s.props.children,f)),n.push(d)}),n}var Lm="get",Xm="application/x-www-form-urlencoded";function lp(i){return typeof HTMLElement<"u"&&i instanceof HTMLElement}function Qb(i){return lp(i)&&i.tagName.toLowerCase()==="button"}function Zb(i){return lp(i)&&i.tagName.toLowerCase()==="form"}function Kb(i){return lp(i)&&i.tagName.toLowerCase()==="input"}function kb(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function Jb(i,t){return i.button===0&&(!t||t==="_self")&&!kb(i)}var Em=null;function Pb(){if(Em===null)try{new FormData(document.createElement("form"),0),Em=!1}catch{Em=!0}return Em}var Wb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ay(i){return i!=null&&!Wb.has(i)?(hl(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Xm}"`),null):i}function Fb(i,t){let n,s,o,f,d;if(Zb(i)){let m=i.getAttribute("action");s=m?Ys(m,t):null,n=i.getAttribute("method")||Lm,o=ay(i.getAttribute("enctype"))||Xm,f=new FormData(i)}else if(Qb(i)||Kb(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?Ys(g,t):null,n=i.getAttribute("formmethod")||m.getAttribute("method")||Lm,o=ay(i.getAttribute("formenctype"))||ay(m.getAttribute("enctype"))||Xm,f=new FormData(m,i),!Pb()){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(lp(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Lm,s=null,o=Xm,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 _g(i,t){if(i===!1||i===null||typeof i>"u")throw new Error(t)}function Ib(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&&Ys(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${s}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${s}`,o}async function $b(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 t2(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 e2(i,t,n){let s=await Promise.all(i.map(async o=>{let f=t.routes[o.route.id];if(f){let d=await $b(f,n);return d.links?d.links():[]}return[]}));return l2(s.flat(1).filter(t2).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function F0(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 n2(i,t,{includeHydrateFallback:n}={}){return a2(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 a2(i){return[...new Set(i)]}function i2(i){let t={},n=Object.keys(i).sort();for(let s of n)t[s]=i[s];return t}function l2(i,t){let n=new Set;return new Set(t),i.reduce((s,o)=>{let f=JSON.stringify(i2(o));return n.has(f)||(n.add(f),s.push({key:f,link:o})),s},[])}function P1(){let i=L.useContext(Nc);return _g(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function s2(){let i=L.useContext(ap);return _g(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var Sg=L.createContext(void 0);Sg.displayName="FrameworkContext";function W1(){let i=L.useContext(Sg);return _g(i,"You must render this element inside a <HydratedRouter> element"),i}function u2(i,t){let n=L.useContext(Sg),[s,o]=L.useState(!1),[f,d]=L.useState(!1),{onFocus:m,onBlur:g,onMouseEnter:v,onMouseLeave:S,onTouchStart:b}=t,A=L.useRef(null);L.useEffect(()=>{if(i==="render"&&d(!0),i==="viewport"){let z=O=>{O.forEach(B=>{d(B.isIntersecting)})},M=new IntersectionObserver(z,{threshold:.5});return A.current&&M.observe(A.current),()=>{M.disconnect()}}},[i]),L.useEffect(()=>{if(s){let z=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(z)}}},[s]);let E=()=>{o(!0)},R=()=>{o(!1),d(!1)};return n?i!=="intent"?[f,A,{}]:[f,A,{onFocus:ph(m,E),onBlur:ph(g,R),onMouseEnter:ph(v,E),onMouseLeave:ph(S,R),onTouchStart:ph(b,E)}]:[!1,A,{}]}function ph(i,t){return n=>{i&&i(n),n.defaultPrevented||t(n)}}function r2({page:i,...t}){let{router:n}=P1(),s=L.useMemo(()=>H1(n.routes,i,n.basename),[n.routes,i,n.basename]);return s?L.createElement(c2,{page:i,matches:s,...t}):null}function o2(i){let{manifest:t,routeModules:n}=W1(),[s,o]=L.useState([]);return L.useEffect(()=>{let f=!1;return e2(i,t,n).then(d=>{f||o(d)}),()=>{f=!0}},[i,t,n]),s}function c2({page:i,matches:t,...n}){let s=Il(),{future:o,manifest:f,routeModules:d}=W1(),{basename:m}=P1(),{loaderData:g,matches:v}=s2(),S=L.useMemo(()=>F0(i,t,v,f,s,"data"),[i,t,v,f,s]),b=L.useMemo(()=>F0(i,t,v,f,s,"assets"),[i,t,v,f,s]),A=L.useMemo(()=>{if(i===s.pathname+s.search+s.hash)return[];let z=new Set,M=!1;if(t.forEach(B=>{var H;let w=f.routes[B.route.id];!w||!w.hasLoader||(!S.some(J=>J.route.id===B.route.id)&&B.route.id in g&&((H=d[B.route.id])!=null&&H.shouldRevalidate)||w.hasClientLoader?M=!0:z.add(B.route.id))}),z.size===0)return[];let O=Ib(i,m,o.unstable_trailingSlashAwareDataRequests,"data");return M&&z.size>0&&O.searchParams.set("_routes",t.filter(B=>z.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=L.useMemo(()=>n2(b,f),[b,f]),R=o2(b);return L.createElement(L.Fragment,null,A.map(z=>L.createElement("link",{key:z,rel:"prefetch",as:"fetch",href:z,...n})),E.map(z=>L.createElement("link",{key:z,rel:"modulepreload",href:z,...n})),R.map(({key:z,link:M})=>L.createElement("link",{key:z,nonce:n.nonce,...M,crossOrigin:M.crossOrigin??n.crossOrigin})))}function f2(...i){return t=>{i.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var h2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{h2&&(window.__reactRouterVersion="7.13.1")}catch{}function d2({basename:i,children:t,unstable_useTransitions:n,window:s}){let o=L.useRef();o.current==null&&(o.current=VS({window:s,v5Compat:!0}));let f=o.current,[d,m]=L.useState({action:f.action,location:f.location}),g=L.useCallback(v=>{n===!1?m(v):L.startTransition(()=>m(v))},[n]);return L.useLayoutEffect(()=>f.listen(g),[f,g]),L.createElement(Xb,{basename:i,children:t,location:d.location,navigationType:d.action,navigator:f,unstable_useTransitions:n})}var F1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,I1=L.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,...R},z){let{basename:M,navigator:O,unstable_useTransitions:B}=L.useContext(ui),w=typeof S=="string"&&F1.test(S),H=Y1(S,M);S=H.to;let J=Tb(S,{relative:o}),Q=Il(),Z=null;if(m){let Dt=np(m,[],Q.unstable_mask?Q.unstable_mask.pathname:"/",!0);M!=="/"&&(Dt.pathname=Dt.pathname==="/"?M:Fl([M,Dt.pathname])),Z=O.createHref(Dt)}let[gt,ct,ft]=u2(s,R),ht=y2(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||ht(Dt)}let _t=!(H.isExternal||f),xt=L.createElement("a",{...R,...ft,href:(_t?Z:void 0)||H.absoluteURL||J,onClick:_t?vt:t,ref:f2(z,ct),target:v,"data-discover":!w&&n==="render"?"true":void 0});return gt&&!w?L.createElement(L.Fragment,null,xt,L.createElement(r2,{page:J})):xt});I1.displayName="Link";var Th=L.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=Lh(d,{relative:v.relative}),A=Il(),E=L.useContext(ap),{navigator:R,basename:z}=L.useContext(ui),M=E!=null&&S2(b)&&m===!0,O=R.encodeLocation?R.encodeLocation(b).pathname:b.pathname,B=A.pathname,w=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;n||(B=B.toLowerCase(),w=w?w.toLowerCase():null,O=O.toLowerCase()),w&&z&&(w=Ys(w,z)||w);const H=O!=="/"&&O.endsWith("/")?O.length-1:O.length;let J=B===O||!o&&B.startsWith(O)&&B.charAt(H)==="/",Q=w!=null&&(w===O||!o&&w.startsWith(O)&&w.charAt(O.length)==="/"),Z={isActive:J,isPending:Q,isTransitioning:M},gt=J?t:void 0,ct;typeof s=="function"?ct=s(Z):ct=[s,J?"active":null,Q?"pending":null,M?"transitioning":null].filter(Boolean).join(" ");let ft=typeof f=="function"?f(Z):f;return L.createElement(I1,{...v,"aria-current":gt,className:ct,ref:S,style:ft,to:d,viewTransition:m},typeof g=="function"?g(Z):g)});Th.displayName="NavLink";var m2=L.forwardRef(({discover:i="render",fetcherKey:t,navigate:n,reloadDocument:s,replace:o,state:f,method:d=Lm,action:m,onSubmit:g,relative:v,preventScrollReset:S,viewTransition:b,unstable_defaultShouldRevalidate:A,...E},R)=>{let{unstable_useTransitions:z}=L.useContext(ui),M=x2(),O=_2(m,{relative:v}),B=d.toLowerCase()==="get"?"get":"post",w=typeof m=="string"&&F1.test(m),H=J=>{if(g&&g(J),J.defaultPrevented)return;J.preventDefault();let Q=J.nativeEvent.submitter,Z=(Q==null?void 0:Q.getAttribute("formmethod"))||d,gt=()=>M(Q||J.currentTarget,{fetcherKey:t,method:Z,navigate:n,replace:o,state:f,relative:v,preventScrollReset:S,viewTransition:b,unstable_defaultShouldRevalidate:A});z&&n!==!1?L.startTransition(()=>gt()):gt()};return L.createElement("form",{ref:R,method:B,action:O,onSubmit:s?g:H,...E,"data-discover":!w&&i==="render"?"true":void 0})});m2.displayName="Form";function p2(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function $1(i){let t=L.useContext(Nc);return qe(t,p2(i)),t}function y2(i,{target:t,replace:n,unstable_mask:s,state:o,preventScrollReset:f,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:g,unstable_useTransitions:v}={}){let S=ip(),b=Il(),A=Lh(i,{relative:d});return L.useCallback(E=>{if(Jb(E,t)){E.preventDefault();let R=n!==void 0?n:Nh(b)===Nh(A),z=()=>S(i,{replace:R,unstable_mask:s,state:o,preventScrollReset:f,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:g});v?L.startTransition(()=>z()):z()}},[b,S,A,n,s,o,t,i,f,d,m,g,v])}var g2=0,v2=()=>`__${String(++g2)}__`;function x2(){let{router:i}=$1("useSubmit"),{basename:t}=L.useContext(ui),n=Hb(),s=i.fetch,o=i.navigate;return L.useCallback(async(f,d={})=>{let{action:m,method:g,encType:v,formData:S,body:b}=Fb(f,t);if(d.navigate===!1){let A=d.fetcherKey||v2();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 _2(i,{relative:t}={}){let{basename:n}=L.useContext(ui),s=L.useContext(dl);qe(s,"useFormAction must be used inside a RouteContext");let[o]=s.matches.slice(-1),f={...Lh(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])),Nh(f)}function S2(i,{relative:t}={}){let n=L.useContext(X1);qe(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=$1("useViewTransitionState"),o=Lh(i,{relative:t});if(!n.isTransitioning)return!1;let f=Ys(n.currentLocation.pathname,s)||n.currentLocation.pathname,d=Ys(n.nextLocation.pathname,s)||n.nextLocation.pathname;return Km(o.pathname,d)!=null||Km(o.pathname,f)!=null}const I0=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},b2=(i=>i?I0(i):I0),T2=i=>i;function E2(i,t=T2){const n=Tm.useSyncExternalStore(i.subscribe,Tm.useCallback(()=>t(i.getState()),[i,t]),Tm.useCallback(()=>t(i.getInitialState()),[i,t]));return Tm.useDebugValue(n),n}const $0=i=>{const t=b2(i),n=s=>E2(t,s);return Object.assign(n,t),n},sp=(i=>i?$0(i):$0),cl=sp(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})})),la=sp((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 C2=0;function tv(){return`local-${Date.now()}-${++C2}`}const Oi=sp((i,t)=>({messages:[],conversationId:null,streaming:!1,streamingText:"",error:null,addUserMessage:n=>{const s={id:tv(),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:tv(),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 A2(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,R,z,M,O,B;try{const w=JSON.parse(m.data),H=i.current;switch(w.type){case"squad:state":(g=H.onSquadState)==null||g.call(H,w.squadName,w.state);break;case"squad:inactive":(v=H.onSquadInactive)==null||v.call(H,w.squadName,w.reason);break;case"chat:chunk":(S=H.onChatChunk)==null||S.call(H,w.squadName,w.conversationId,w.delta);break;case"chat:done":(b=H.onChatDone)==null||b.call(H,w.squadName,w.conversationId,w.messageId);break;case"chat:error":(A=H.onChatError)==null||A.call(H,w.squadName,w.error);break;case"chat:agent_dm":(E=H.onChatAgentDm)==null||E.call(H,w.squadName,w.conversationId,w.agentId,w.agentName,w.message);break;case"chat:conversation_created":(R=H.onChatConversationCreated)==null||R.call(H,w.squadName,w.conversationId);break;case"agent:output_chunk":(z=H.onAgentOutputChunk)==null||z.call(H,w.squadName,w.agentId,w.agentName,w.delta);break;case"agent:step_start":(M=H.onAgentStepStart)==null||M.call(H,w.squadName,w.agentId,w.agentName,w.stepIndex,w.stepLabel);break;case"agent:step_complete":(O=H.onAgentStepComplete)==null||O.call(H,w.squadName,w.agentId,w.agentName,w.stepIndex,w.stepLabel);break;case"squad:checkpoint":(B=H.onSquadCheckpoint)==null||B.call(H,w.squadName,w.agentId,w.agentName,w.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 M2(i={}){const t=L.useRef(null),n=L.useRef(i),s=L.useRef(new Set);n.current=i,L.useEffect(()=>{const g=A2(n);t.current=g;for(const v of s.current)g.subscribe(v);return()=>{g.disconnect()}},[]);const o=L.useCallback(g=>{var v;s.current.add(g),(v=t.current)==null||v.subscribe(g)},[]),f=L.useCallback(g=>{var v;s.current.delete(g),(v=t.current)==null||v.unsubscribe(g)},[]),d=L.useCallback((g,v)=>{var S;(S=t.current)==null||S.sendChat(g,v)},[]),m=L.useCallback((g,v)=>{var S;(S=t.current)==null||S.sendCheckpointResponse(g,v)},[]);return{subscribe:o,unsubscribe:f,sendChat:d,sendCheckpointResponse:m}}const R2={idle:"#888",working:"#4caf50",delivering:"#4fc3f7",done:"#4caf50",checkpoint:"#ff9800",running:"#4caf50",completed:"#4caf50"},z2={idle:"○",working:"●",delivering:"→",done:"✓",checkpoint:"◆",running:"●",completed:"✓"};function D2({status:i}){if(!i)return null;const t=R2[i]||"#888",n=z2[i]||"○";return q.jsxs("span",{style:{color:t,fontSize:"0.75rem"},children:[n," ",i]})}function O2({squad:i,selected:t,onClick:n}){return q.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:[q.jsx("div",{style:{fontSize:"0.875rem",color:t?"#e0e0e0":"#aaa"},children:i.name}),q.jsx(D2,{status:i.status})]})}function N2({squads:i,selectedSquad:t,onSelect:n}){return q.jsxs("div",{style:{padding:"8px"},children:[q.jsx("div",{style:{color:"#888",fontSize:"0.7rem",textTransform:"uppercase",marginBottom:"8px",padding:"0 12px"},children:"Squads"}),i.length===0&&q.jsx("div",{style:{padding:"8px 12px",color:"#666",fontSize:"0.8rem"},children:"No squads found"}),i.map(s=>q.jsx(O2,{squad:s,selected:s.code===t,onClick:()=>n(s.code)},s.code))]})}function U2(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 B2({state:i}){const[t,n]=L.useState(0);return L.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?q.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:[q.jsxs("span",{children:["Step ",i.step.current,"/",i.step.total,": ",i.step.label]}),i.status==="running"&&q.jsxs("span",{children:["Elapsed: ",U2(t)]}),i.handoff&&q.jsxs("span",{style:{color:"#4caf50"},children:[i.handoff.from," → ",i.handoff.to]})]}):q.jsx("div",{})}let Yy=null;function w2(i){Yy=i}function H2(i,t){Yy&&Yy(i,t)}let Ly=null;function G2(i){Ly=i}function j2(i,t){Ly&&Ly(i,t)}const qt=32,Vm=96,tx=64,sa={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]},Xy=[5227511,5025616,16750592,15022389,9315498,16771899],q2={idle:8947848,working:5025616,delivering:5227511,done:5025616,checkpoint:16750592},Cm={counter:4073251,machine:4342338,machineLight:16711680,cup:14142664},iy={table:5125166,chair:6111287,border:4073251},_c={background:1713022,statusRunning:5025616,statusIdle:8947848,statusCheckpoint:16750592},wu=640,Uh=480,ev=64,Y2=64,L2=80,X2=Vm+32,V2=tx+48,nv=2,av=3;function iv(i,t,n){const s=Math.max(0,Math.min(1,n));return i+(t-i)*s}function Q2(i){return i<.5?2*i*i:1-Math.pow(-2*i+2,2)/2}function Vy(i,t){const n=i%av,s=Math.floor(i/av);return{x:n*(wu+ev),y:s*(Uh+ev)}}function Qy(i,t){const n=i%nv,s=Math.floor(i/nv);return{x:t.x+Y2+n*X2,y:t.y+L2+s*V2}}function Zy(i){return{x:i.x+wu-80,y:i.y+Uh-80}}function Z2(i){return{x:i.x+wu-160,y:i.y+Math.floor(Uh/2)}}const lv=500,sv=50;let uv=0;function K2(i){return{idle:"idle",working:"working",delivering:"walking",done:"idle",checkpoint:"checkpoint"}[i]??"idle"}const Ze=sp(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>lv&&(m=m.slice(m.length-lv)),{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:++uv,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>sv?g.slice(g.length-sv):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(v=>[v.id,v])),d=s.rooms.indexOf(t),m=Vy(Math.max(0,d),s.rooms.length||1),g=n.map((v,S)=>{const b=f.get(v.id);if(b)return{...b,name:v.name,deskIndex:S};const A=v.status?K2(v.status):"idle",E=A==="working"||A==="checkpoint"?Qy(S,m):Zy(m);return{id:v.id,name:v.name,colorIndex:S%6,status:A,deskIndex:S,position:E,targetPosition:null}});return{agentVisuals:{...s.agentVisuals,[t]:g}}}),setAgentStatus:(t,n,s)=>i(o=>{const f=o.agentVisuals[t];if(!f)return o;const d=o.rooms.indexOf(t),m=Vy(Math.max(0,d),o.rooms.length||1),g=f.map(v=>{if(v.id!==n)return v;let S;return s==="working"||s==="checkpoint"?S=Qy(v.deskIndex,m):S=Zy(m),{...v,status:s,targetPosition:S}});return{agentVisuals:{...o.agentVisuals,[t]:g}}}),reset:()=>{uv=0,i({rooms:[],activeRoom:null,bubbles:{},activityLog:{},checkpoints:{},agentVisuals:{}})}}));function k2(){const i=cl(U=>U.user),t=cl(U=>U.isAuthenticated),n=cl(U=>U.loading),s=cl(U=>U.logout),o=cl(U=>U.checkAuth),f=ip(),d=Il(),m=d.pathname==="/office"||d.pathname==="/",g=la(U=>U.squads),v=la(U=>U.selectedSquad),S=la(U=>v?U.activeStates[v]:null),b=la(U=>U.fetchSquads),A=la(U=>U.selectSquad),E=la(U=>U.setSquadState),R=la(U=>U.clearSquadState),z=L.useCallback((U,X)=>{E(U,X);const it=Object.keys(la.getState().activeStates);it.includes(U)||it.push(U),Ze.getState().syncRooms(it),X.status!=="checkpoint"&&Ze.getState().clearCheckpoint(U),X.agents&&Ze.getState().setAgents(U,X.agents.map(nt=>({id:nt.id,name:nt.name,status:nt.status})))},[E]),M=L.useCallback(U=>{R(U);const X=Object.keys(la.getState().activeStates);Ze.getState().syncRooms(X.filter(it=>it!==U))},[R]),O=L.useCallback((U,X)=>{Oi.getState().setConversationId(X)},[]),B=L.useCallback((U,X,it)=>{const nt=Oi.getState();nt.streaming||nt.startStreaming(),nt.appendChunk(it)},[]),w=L.useCallback((U,X,it)=>{Oi.getState().finishStreaming(it)},[]),H=L.useCallback((U,X)=>{Oi.getState().setError(X)},[]),J=L.useCallback((U,X,it,nt,mt)=>{Oi.getState().addAgentDm({agentId:it,agentName:nt,content:mt})},[]),Q=L.useCallback((U,X,it,nt)=>{Ze.getState().appendBubble(U,X,nt)},[]),Z=L.useCallback((U,X,it,nt,mt)=>{Ze.getState().addActivity(U,it,`started "${mt}"`),Ze.getState().setAgentStatus(U,X,"working")},[]),gt=L.useCallback((U,X,it,nt,mt)=>{Ze.getState().addActivity(U,it,`completed "${mt}"`),Ze.getState().setAgentStatus(U,X,"idle")},[]),ct=L.useCallback((U,X,it,nt)=>{Ze.getState().setCheckpoint(U,X,it,nt),Ze.getState().setAgentStatus(U,X,"checkpoint")},[]),ft=L.useCallback(()=>{Ze.getState().clearAllBubbles()},[]),{subscribe:ht,unsubscribe:vt,sendChat:_t,sendCheckpointResponse:xt}=M2({onSquadState:z,onSquadInactive:M,onChatConversationCreated:O,onChatChunk:B,onChatDone:w,onChatError:H,onChatAgentDm:J,onAgentOutputChunk:Q,onAgentStepStart:Z,onAgentStepComplete:gt,onSquadCheckpoint:ct,onReconnect:ft});L.useEffect(()=>{w2(_t)},[_t]),L.useEffect(()=>{G2(xt)},[xt]),L.useEffect(()=>{b()},[b]),L.useEffect(()=>{if(v)return ht(v),()=>vt(v)},[v,ht,vt]),L.useEffect(()=>{t||o()},[]),L.useEffect(()=>{!n&&!t&&f("/login")},[n,t,f]);const Dt=U=>({padding:"6px 12px",color:U?"#4fc3f7":"#888",textDecoration:"none",fontSize:"0.85rem"});return q.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100vh",background:"#0f0f1a",color:"#e0e0e0"},children:[q.jsxs("header",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 16px",background:"#16213e",borderBottom:"1px solid #1a1a2e"},children:[q.jsx("span",{style:{color:"#4fc3f7",fontWeight:"bold",fontSize:"1.1rem"},children:"ExpxAgents"}),q.jsxs("span",{style:{color:"#888",fontSize:"0.85rem"},children:[i==null?void 0:i.username," | ",q.jsx("span",{style:{color:"#4caf50"},children:"● Connected"}),q.jsx("button",{onClick:s,style:{marginLeft:"12px",background:"none",border:"none",color:"#888",cursor:"pointer",fontSize:"0.8rem"},children:"Logout"})]})]}),q.jsxs("div",{style:{display:"flex",flex:1,overflow:"hidden"},children:[q.jsxs("aside",{style:{width:"200px",background:"#16213e",borderRight:"1px solid #1a1a2e",display:"flex",flexDirection:"column",overflowY:"auto"},children:[!m&&q.jsx(N2,{squads:g,selectedSquad:v,onSelect:A}),!m&&q.jsx("hr",{style:{border:"none",borderTop:"1px solid #333",margin:"8px 12px"}}),q.jsxs("nav",{style:{padding:"8px"},children:[q.jsx("div",{style:{color:"#888",fontSize:"0.7rem",textTransform:"uppercase",marginBottom:"8px",padding:"0 12px"},children:"Views"}),q.jsx(Th,{to:"/office",style:({isActive:U})=>Dt(U),children:"Office"}),q.jsx("br",{}),q.jsx(Th,{to:"/chat",style:({isActive:U})=>Dt(U),children:"Chat"}),q.jsx("br",{}),q.jsx(Th,{to:"/kanban",style:({isActive:U})=>Dt(U),children:"Kanban"}),q.jsx("br",{}),q.jsx(Th,{to:"/settings",style:({isActive:U})=>Dt(U),children:"Settings"})]})]}),q.jsx("main",{style:{flex:1,overflow:"auto"},children:q.jsx(Lb,{})})]}),q.jsx(B2,{state:S})]})}function J2(){const[i,t]=L.useState(""),[n,s]=L.useState(""),o=cl(S=>S.login),f=cl(S=>S.loading),d=cl(S=>S.error),m=cl(S=>S.isAuthenticated),g=ip();L.useEffect(()=>{m&&g("/",{replace:!0})},[m,g]);const v=S=>{S.preventDefault(),o(i,n)};return q.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",background:"#0f0f1a"},children:q.jsxs("form",{onSubmit:v,style:{background:"#1a1a2e",padding:"2rem",borderRadius:"8px",width:"320px"},children:[q.jsx("h1",{style:{color:"#4fc3f7",marginBottom:"1.5rem",textAlign:"center",fontSize:"1.5rem"},children:"ExpxAgents"}),d&&q.jsx("div",{style:{color:"#ef5350",marginBottom:"1rem",fontSize:"0.875rem"},children:d}),q.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"}}),q.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"}}),q.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 ex(i,t,n){if(!i)return;if(n(i)===!0)return i;let s=i.child;for(;s;){const o=ex(s,t,n);if(o)return o;s=s.sibling}}function nx(i){try{return Object.defineProperties(i,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return i}}const bg=nx(L.createContext(null));let ax=class extends L.Component{render(){return L.createElement(bg.Provider,{value:this._reactInternals},this.props.children)}};function P2(){const i=L.useContext(bg);if(i===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=L.useId();return L.useMemo(()=>{for(const n of[i,i==null?void 0:i.alternate]){if(!n)continue;const s=ex(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 W2=Symbol.for("react.context"),F2=i=>i!==null&&typeof i=="object"&&"$$typeof"in i&&i.$$typeof===W2;function I2(){const i=P2(),[t]=L.useState(()=>new Map);t.clear();let n=i;for(;n;){const s=n.type;F2(s)&&s!==bg&&!t.has(s)&&t.set(s,L.use(nx(s))),n=n.return}return t}function $2(){const i=I2();return L.useMemo(()=>Array.from(i.keys()).reduce((t,n)=>s=>L.createElement(t,null,L.createElement(n.Provider,{...s,value:i.get(n)})),t=>L.createElement(ax,{...t})),[i])}const tT="modulepreload",eT=function(i){return"/"+i},rv={},Mh=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=eT(v),v in rv)return;rv[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":tT,S||(A.as="script"),A.crossOrigin="",A.href=v,g&&A.setAttribute("nonce",g),document.head.appendChild(A),S)return new Promise((E,R)=>{A.addEventListener("load",E),A.addEventListener("error",()=>R(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},Am=(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)=>Am(d.value,n)-Am(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)=>Am(f,n)-Am(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))}},nT={extension:{type:kt.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await Mh(()=>import("./browserAll-BjVJrv1L.js"),__vite__mapDeps([0,1]))}},aT={extension:{type:kt.Environment,name:"webworker",priority:0},test:()=>typeof self<"u"&&self.WorkerGlobalScope!==void 0,load:async()=>{await Mh(()=>import("./webworkerAll-DMtK63GZ.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 ly={exports:{}},ov;function iT(){return ov||(ov=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),R=n?n+v:v;return g._events[R]?g._events[R].fn?g._events[R]=[g._events[R],E]:g._events[R].push(E):(g._events[R]=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,R=new Array(E);A<E;A++)R[A]=b[A].fn;return R},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,R){var z=n?n+v:v;if(!this._events[z])return!1;var M=this._events[z],O=arguments.length,B,w;if(M.fn){switch(M.once&&this.removeListener(v,M.fn,void 0,!0),O){case 1:return M.fn.call(M.context),!0;case 2:return M.fn.call(M.context,S),!0;case 3:return M.fn.call(M.context,S,b),!0;case 4:return M.fn.call(M.context,S,b,A),!0;case 5:return M.fn.call(M.context,S,b,A,E),!0;case 6:return M.fn.call(M.context,S,b,A,E,R),!0}for(w=1,B=new Array(O-1);w<O;w++)B[w-1]=arguments[w];M.fn.apply(M.context,B)}else{var H=M.length,J;for(w=0;w<H;w++)switch(M[w].once&&this.removeListener(v,M[w].fn,void 0,!0),O){case 1:M[w].fn.call(M[w].context);break;case 2:M[w].fn.call(M[w].context,S);break;case 3:M[w].fn.call(M[w].context,S,b);break;case 4:M[w].fn.call(M[w].context,S,b,A);break;default:if(!B)for(J=1,B=new Array(O-1);J<O;J++)B[J-1]=arguments[J];M[w].fn.apply(M[w].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 R=this._events[E];if(R.fn)R.fn===S&&(!A||R.once)&&(!b||R.context===b)&&d(this,E);else{for(var z=0,M=[],O=R.length;z<O;z++)(R[z].fn!==S||A&&!R[z].once||b&&R[z].context!==b)&&M.push(R[z]);M.length?this._events[E]=M.length===1?M[0]:M: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})(ly)),ly.exports}var lT=iT();const $l=tp(lT),sT=Math.PI*2,uT=180/Math.PI,rT=Math.PI/180;class ua{constructor(t=0,n=0){this.x=0,this.y=0,this.x=t,this.y=n}clone(){return new ua(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 sy.x=0,sy.y=0,sy}}const sy=new ua;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 ua;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 ua;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(sT-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 cT.identity()}static get shared(){return oT.identity()}}const oT=new ne,cT=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],ky=[],ix=[],Mm=Math.sign;function fT(){for(let i=0;i<16;i++){const t=[];ky.push(t);for(let n=0;n<16;n++){const s=Mm(Lr[i]*Lr[n]+Vr[i]*Xr[n]),o=Mm(Xr[i]*Lr[n]+Qr[i]*Xr[n]),f=Mm(Lr[i]*Vr[n]+Vr[i]*Qr[n]),d=Mm(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),ix.push(t)}}fT();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)=>ky[i][t],sub:(i,t)=>ky[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=ix[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,R=i.b,z=i.c,M=i.d;i.a=m*E+g*z,i.b=m*R+g*M,i.c=v*E+S*z,i.d=v*R+S*M,i.tx=b*E+A*z+i.tx,i.ty=b*R+A*M+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)}},Rm=[new ua,new ua,new ua,new ua];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,R=g+d+v,z=m+S,M=m+f-S,O=g+S,B=g+d-S;return t>=b&&t<=A&&n>=E&&n<=R&&!(t>z&&t<M&&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 ft=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>ft}const s=this.left,o=this.right,f=this.top,d=this.bottom;if(o<=s||d<=f)return!1;const m=Rm[0].set(t.left,t.top),g=Rm[1].set(t.left,t.bottom),v=Rm[2].set(t.right,t.top),S=Rm[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),R=A*s+E*f,z=A*o+E*f,M=A*s+E*d,O=A*o+E*d;if(Math.max(R,z,M,O)<=A*m.x+E*m.y||Math.min(R,z,M,O)>=A*S.x+E*S.y)return!1;const B=b*(m.y-v.y),w=b*(v.x-m.x),H=B*s+w*f,J=B*o+w*f,Q=B*s+w*d,Z=B*o+w*d;return!(Math.max(H,J,Q,Z)<=B*m.x+w*m.y||Math.min(H,J,Q,Z)>=B*S.x+w*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 uy={default:-1};function en(i="default"){return uy[i]===void 0&&(uy[i]=-1),++uy[i]}const cv=new Set,tn="8.0.0",hT="8.3.4",Sc={quiet:!1,noColor:!1},ce=((i,t,n=3)=>{if(Sc.quiet||cv.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))),cv.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 lx=()=>{};function Cc(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 fv(i){return!(i&i-1)&&!!i}function sx(i){const t={};for(const n in i)i[n]!==void 0&&(t[n]=i[n]);return t}const hv=Object.create(null);function dT(i){const t=hv[i];return t===void 0&&(hv[i]=en("resource")),t}const ux=class rx extends $l{constructor(t={}){super(),this._resourceType="textureSampler",this._touched=0,this._maxAnisotropy=1,this.destroyed=!1,t={...rx.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=dT(t),this._resourceId}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this.removeAllListeners()}};ux.defaultOptions={addressMode:"clamp-to-edge",scaleMode:"linear"};let Ac=ux;const ox=class cx 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={...cx.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 Ac(sx(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=fv(this.pixelWidth)&&fv(this.pixelHeight)}static test(t){throw new Error("Unimplemented")}};ox.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=ox;class Tg 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}}Tg.extension=kt.TextureSource;const dv=new ne;class mT{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&&(dv.set(s.width/o.width,0,0,s.height/o.height,-o.x/o.width,-o.y/o.height),this.mapCoord.append(dv));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 mT(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=lx;Ee.WHITE=new Ee({source:new Tg({resource:new Uint8Array([255,255,255,255]),width:1,height:1,alphaMode:"premultiply-alpha-on-upload",label:"WHITE"}),label:"WHITE"});Ee.WHITE.destroy=lx;function fx(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 mv=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=mv,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=mv,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,R=this.maxX,z=this.maxY,M=d*t+g*n+S,O=m*t+v*n+b;M<A&&(A=M),O<E&&(E=O),M>R&&(R=M),O>z&&(z=O),M=d*s+g*n+S,O=m*s+v*n+b,M<A&&(A=M),O<E&&(E=O),M>R&&(R=M),O>z&&(z=O),M=d*t+g*o+S,O=m*t+v*o+b,M<A&&(A=M),O<E&&(E=O),M>R&&(R=M),O>z&&(z=O),M=d*s+g*o+S,O=m*s+v*o+b,M<A&&(A=M),O<E&&(E=O),M>R&&(R=M),O>z&&(z=O),this.minX=A,this.minY=E,this.maxX=R,this.maxY=z}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,R=o.ty;for(let z=n;z<s;z+=2){const M=t[z],O=t[z+1],B=v*M+b*O+E,w=S*M+A*O+R;f=B<f?B:f,d=w<d?w:d,m=B>m?B:m,g=w>g?w: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 pT={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},hx=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},pv=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)}},ry=function(i){return{r:Nn(i.r),g:Nn(i.g),b:Nn(i.b),a:Nn(i.a,3)}},yT=/^#([0-9a-f]{3,8})$/i,zm=function(i){var t=i.toString(16);return t.length<2?"0"+t:t},dx=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}},mx=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}},yv=function(i){return{h:hx(i.h),s:Ni(i.s,0,100),l:Ni(i.l,0,100),a:Ni(i.a)}},gv=function(i){return{h:Nn(i.h),s:Nn(i.s),l:Nn(i.l),a:Nn(i.a,3)}},vv=function(i){return mx((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},Rh=function(i){return{h:(t=dx(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},gT=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,vT=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,xT=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,_T=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Jy={string:[[function(i){var t=yT.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=xT.exec(i)||_T.exec(i);return t?t[2]!==t[4]||t[4]!==t[6]?null:pv({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=gT.exec(i)||vT.exec(i);if(!t)return null;var n,s,o=yv({h:(n=t[1],s=t[2],s===void 0&&(s="deg"),Number(n)*(pT[s]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return vv(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)?pv({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=yv({h:Number(t),s:Number(n),l:Number(s),a:Number(f)});return vv(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:hx(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 mx(d)},"hsv"]]},xv=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]},ST=function(i){return typeof i=="string"?xv(i.trim(),Jy.string):typeof i=="object"&&i!==null?xv(i,Jy.object):[null,void 0]},oy=function(i,t){var n=Rh(i);return{h:n.h,s:Ni(n.s+100*t,0,100),l:n.l,a:n.a}},cy=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},_v=function(i,t){var n=Rh(i);return{h:n.h,s:n.s,l:Ni(n.l+100*t,0,100),a:n.a}},Py=(function(){function i(t){this.parsed=ST(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(cy(this.rgba),2)},i.prototype.isDark=function(){return cy(this.rgba)<.5},i.prototype.isLight=function(){return cy(this.rgba)>=.5},i.prototype.toHex=function(){return t=ry(this.rgba),n=t.r,s=t.g,o=t.b,d=(f=t.a)<1?zm(Nn(255*f)):"","#"+zm(n)+zm(s)+zm(o)+d;var t,n,s,o,f,d},i.prototype.toRgb=function(){return ry(this.rgba)},i.prototype.toRgbString=function(){return t=ry(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 gv(Rh(this.rgba))},i.prototype.toHslString=function(){return t=gv(Rh(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=dx(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(oy(this.rgba,t))},i.prototype.desaturate=function(t){return t===void 0&&(t=.1),Pl(oy(this.rgba,-t))},i.prototype.grayscale=function(){return Pl(oy(this.rgba,-1))},i.prototype.lighten=function(t){return t===void 0&&(t=.1),Pl(_v(this.rgba,t))},i.prototype.darken=function(t){return t===void 0&&(t=.1),Pl(_v(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=Rh(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 Py?i:new Py(i)},Sv=[],bT=function(i){i.forEach(function(t){Sv.indexOf(t)<0&&(t(Py,Jy),Sv.push(t))})};function TT(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 R in n){var z=(m=S,g=f[R],Math.pow(m.r-g.r,2)+Math.pow(m.g-g.g,2)+Math.pow(m.b-g.b,2));z<b&&(b=z,A=R)}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"])}bT([TT]);const Mc=class Eh{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 Eh)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]=Eh._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=Eh.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 Eh||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}};Mc.shared=new Mc;Mc._temp=new Mc;Mc.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let Sn=Mc;const ET={cullArea:null,cullable:!1,cullableChildren:!0};let fy=0;const bv=500;function Da(...i){fy!==bv&&(fy++,fy===bv?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...i))}const Xh={_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 CT{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 AT{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 CT(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 AT;Xh.register(Qa);const MT={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 RT(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 zT={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)}RT(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)}},DT={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 Tv{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 OT{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 Wy=new OT;ke.handleByList(kt.MaskEffect,Wy._effectClasses);const NT={_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),Wy.returnMaskEffect(t),this._maskEffect=null),i!=null&&(this._maskEffect=Wy.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 Tv);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 Tv),this._filterEffect.filterArea=i},get filterArea(){var i;return(i=this._filterEffect)==null?void 0:i.filterArea}},UT={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),js=Qa.getPool(Bi),BT=new ne,wT={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=js.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(BT).invert()),t.addBounds(s),js.return(s)}else this.renderGroup&&(t.addBounds(s,this.relativeGroupTransform),js.return(s))}};function px(i,t,n){n.clear();let s,o;return i.parent?t?s=i.parent.worldTransform:(o=za.get().identity(),s=Eg(i,o)):s=ne.IDENTITY,yx(i,n,s,t),o&&za.return(o),n.isValid||n.set(0,0,0,0),n}function yx(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=js.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++)yx(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),js.return(t)}s||za.return(o)}function Eg(i,t){const n=i.parent;return n&&(Eg(n,t),n.updateLocalTransform(),t.append(n.localTransform)),t}function gx(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 Ev=16777215;function Cv(i,t){return i===Ev?t:t===Ev?i:gx(i,t)}function Qm(i){return((i&255)<<16)+(i&65280)+(i>>16&255)}const HT={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=Eg(this,za.get().identity());return i.appendFrom(this.localTransform,n),za.return(n),i},getGlobalTint(i){if(i)return this.renderGroup?Qm(this.renderGroup.worldColor):this.parentRenderGroup?Qm(Cv(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let t=this.localColor,n=this.parent;for(;n;)t=Cv(t,n.localColor),n=n.parent;return Qm(t)}};function vx(i,t,n){return t.clear(),n||(n=ne.IDENTITY),xx(i,t,n,i,!0),t.isValid||t.set(0,0,0,0),t}function xx(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=js.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++)xx(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),js.return(t)}za.return(f)}function _x(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&&_x(o,t)}return t.didChange}const GT=new ne,jT={_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),_x(this,i),i.didChange&&vx(this,i.localBounds,GT),i.localBounds},getBounds(i,t){return px(this,i,t||new Bi)}},qT={_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}},YT={_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(LT))}};function LT(i,t){return i._zIndex-t._zIndex}const XT={getGlobalPosition(i=new ua,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 Cg{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 VT=0;class QT{constructor(t){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this.textureStyle=new Ac(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_${VT++}`})}getOptimalTexture(t,n,s=1,o,f=!1){let d=Math.ceil(t*s-1e-6),m=Math.ceil(n*s-1e-6);d=Cc(d),m=Cc(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 up=new QT;Xh.register(up);class ZT{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 Cg,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&&(up.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 KT(i,t,n={}){for(const s in t)!n[s]&&t[s]!==void 0&&(i[s]=t[s])}const hy=new Vn(null),Dm=new Vn(null),dy=new Vn(null,1,1),Om=new Vn(null),Av=1,kT=2,my=4;class ra 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=dy,this._pivot=Dm,this._origin=Om,this._skew=hy,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=[],KT(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(ra,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(ZT,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*uT}set angle(t){this.rotation=t*rT}get pivot(){return this._pivot===Dm&&(this._pivot=new Vn(this,0,0)),this._pivot}set pivot(t){this._pivot===Dm&&(this._pivot=new Vn(this,0,0),this._origin!==Om&&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===hy&&(this._skew=new Vn(this,0,0)),this._skew}set skew(t){this._skew===hy&&(this._skew=new Vn(this,0,0)),this._skew.copyFrom(t)}get scale(){return this._scale===dy&&(this._scale=new Vn(this,1,1)),this._scale}set scale(t){this._scale===dy&&(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===Om&&(this._origin=new Vn(this,0,0)),this._origin}set origin(t){this._origin===Om&&(this._origin=new Vn(this,0,0),this._pivot!==Dm&&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|=Av,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|=Av,this._onUpdate())}get tint(){return Qm(this.localColor)}set blendMode(t){this.localBlendMode!==t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=kT,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|=my,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|=my,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|=my,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(ra,zT,wT,XT,qT,jT,NT,UT,YT,ET,MT,HT,DT);class Ag extends ra{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 Rc extends Ag{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 Rc(t):new Rc(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 fx(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 JT=new Bi;function Sx(i,t,n){const s=JT;i.measurable=!0,px(i,n,s),t.addBoundsMask(s),i.measurable=!1}function bx(i,t,n){const s=js.get();i.measurable=!0;const o=za.get().identity(),f=Tx(i,n,o);vx(i,s,f),i.measurable=!1,t.addBoundsMask(s),za.return(o),js.return(s)}function Tx(i,t,n){return i?(i!==t&&(Tx(i.parent,t,n),i.updateLocalTransform(),n.append(i.localTransform)),n):(Da("Mask bounds, renderable is not inside the root container"),n)}class Ex{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 Rc),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||Sx(this.mask,t,n)}addLocalBounds(t,n){bx(this.mask,t,n)}containsPoint(t,n){const s=this.mask;return n(s,t)}destroy(){this.reset()}static test(t){return t instanceof Rc}}Ex.extension=kt.MaskEffect;class Cx{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"}}Cx.extension=kt.MaskEffect;class Ax{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){Sx(this.mask,t,n)}addLocalBounds(t,n){bx(this.mask,t,n)}containsPoint(t,n){const s=this.mask;return n(s,t)}destroy(){this.reset()}static test(t){return t instanceof ra}}Ax.extension=kt.MaskEffect;const PT={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 Mv=PT;const si={get(){return Mv},set(i){Mv=i}};class Mx 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"))}}Mx.extension=kt.TextureSource;class km 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}}km.extension=kt.TextureSource;var Jm=(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))(Jm||{});class py{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 Rx=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 py(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=Jm.NORMAL){return this._addListener(new py(t,n,s))}addOnce(t,n,s=Jm.NORMAL){return this._addListener(new py(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}};Rx.targetFPMS=.06;let bc=Rx,yy;async function WT(){return yy??(yy=(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"})()),yy}const rp=class zx extends wi{constructor(t){super(t),this.isReady=!1,this.uploadMethodId="video",t={...zx.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 WT(),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}};rp.extension=kt.TextureSource;rp.defaultOptions={...wi.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1};rp.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let FT=rp;const vc=(i,t,n=!1)=>(Array.isArray(i)||(i=[i]),t?i.map(s=>typeof s=="string"||n?t(s):s):i);class IT{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 IT,Fy=[];ke.handleByList(kt.TextureSource,Fy);function Dx(i={}){const t=i&&i.resource,n=t?i.resource:i,s=t?i:{resource:i};for(let o=0;o<Fy.length;o++){const f=Fy[o];if(f.test(n))return new f(s)}throw new Error(`Could not find a source type for resource: ${s.resource}`)}function $T(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:Dx(o)});return f.on("destroy",()=>{xc.has(s)&&xc.remove(s)}),t||xc.set(s,f),f}function tE(i,t=!1){return typeof i=="string"?xc.get(i):i instanceof wi?new Ee({source:i}):$T(i,t)}Ee.from=tE;wi.from=Dx;ke.add(Ex,Cx,Ax,FT,km,Mx,Tg);var Ox=(i=>(i[i.Low=0]="Low",i[i.Normal=1]="Normal",i[i.High=2]="High",i))(Ox||{});function rl(i){if(typeof i!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(i)}`)}function yh(i){return i.split("?")[0].split("#")[0]}function eE(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function nE(i,t,n){return i.replace(new RegExp(eE(t),"g"),n)}function aE(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 Bh={toPosix(i){return nE(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=yh(this.toPosix(t??si.get().getBaseUrl())),o=yh(this.toPosix(n??this.rootname(s)));return i=this.toPosix(i),i.startsWith("/")?Bh.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=aE(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=yh(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=yh(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=yh(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 Nx(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?Nx(i.replace(s[n],m),t,n+1,s,o):o.push(i.replace(s[n],m))}}function iE(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)}),Nx(i,o,0,n,s)}else s.push(i);return s}const Rv=i=>!Array.isArray(i);class Ux{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(z=>typeof z=="string"?iE(z):Array.isArray(z)?z:[z]),A=this.getAlias(f);Array.isArray(A)?A.forEach(s):s(A);const E=[],R=z=>{const M=this._parsers.find(O=>O.test(z));return{src:z,...M==null?void 0:M.parse(z)}};b.forEach(z=>{z.forEach(M=>{let O={};if(typeof M!="object"?O=R(M):(m=M.data??m,g=M.format??g,(M.loadParser||M.parser)&&(v=M.loadParser??v,S=M.parser??S),O={...R(M.src),...M}),!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(z=>{this._assetMap[z]=E})})}resolveBundle(t){const n=Rv(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=Rv(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=Bh.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??lE(t.src),g!==void 0&&(t.progressSize=g),t}}Ux.RETINA_PREFIX=/@([0-9\.]+)x/;function lE(i){return i.split(".").pop().split("?").shift().split("#").shift()}const zv=(i,t)=>{const n=t.split("?")[1];return n&&(i+=`?${n}`),i},Bx=class Ch{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<=Ch.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:Ch.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*Ch.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*Ch.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=[]}};Bx.BATCH_SIZE=1e3;let Dv=Bx;const sE=["jpg","png","jpeg","avif","webp","basis","etc2","bc7","bc6h","bc5","bc4","bc3","bc2","bc1","eac","astc"];function wx(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=Bh.dirname(i[0]);t.linkedSheets.forEach((f,d)=>{const m=wx([`${o}/${t.data.meta.related_multi_packs[d]}`],f,!0);Object.assign(s,m)})}return s}const uE={extension:kt.Asset,cache:{test:i=>i instanceof Dv,getCacheableAssets:(i,t)=>wx(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"&&sE.includes(o)},parse:i=>{var n;const t=i.split(".");return{resolution:parseFloat(((n=Ux.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:Ox.Normal,name:"spritesheetLoader"},async testParse(i,t){return Bh.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=Bh.dirname(t.src);m&&m.lastIndexOf("/")!==m.length-1&&(m+="/");let g;if(s instanceof Ee)g=s;else{const E=zv(m+(o??i.meta.image),t.src);g=(await n.load([{src:E,data:f}]))[E]}const v=new Dv({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 z of S){if(typeof z!="string")continue;let M=m+z;(A=t.data)!=null&&A.ignoreMultiPack||(M=zv(M,t.src),E.push(n.load({src:M,data:{textureOptions:f,ignoreMultiPack:!0}})))}const R=await Promise.all(E);v.linkedSheets=R,R.forEach(z=>{z.linkedSheets=[v].concat(v.linkedSheets.filter(M=>M!==z))})}return v},async unload(i,t,n){await n.unload(i.textureSource._sourceOrigin),i.destroy(!1)}}};ke.add(uE);const gy=Object.create(null),Ov=Object.create(null);function Mg(i,t){let n=Ov[i];return n===void 0&&(gy[t]===void 0&&(gy[t]=1),Ov[i]=n=gy[t]++),n}let pc;function Hx(){return(!pc||pc!=null&&pc.isContextLost())&&(pc=si.get().createCanvas().getContext("webgl",{})),pc}let Nm;function rE(){if(!Nm){Nm="mediump";const i=Hx();i&&i.getShaderPrecisionFormat&&(Nm=i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision?"highp":"mediump")}return Nm}function oE(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 cE(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 fE(i,t){return t?`#version 300 es
|
|
81
|
+
${i}`:i}const hE={},dE={};function mE(i,{name:t="pixi-program"},n=!0){t=t.replace(/\s+/g,"-"),t+=n?"-fragment":"-vertex";const s=n?hE:dE;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 pE(i,t){return t?i.replace("#version 300 es",""):i}const vy={stripVersion:pE,ensurePrecision:cE,addProgramDefines:oE,setProgramName:mE,insertVersion:fE},gh=Object.create(null),Gx=class Iy{constructor(t){t={...Iy.defaultOptions,...t};const n=t.fragment.indexOf("#version 300 es")!==-1,s={stripVersion:n,ensurePrecision:{requestedFragmentPrecision:t.preferredFragmentPrecision,requestedVertexPrecision:t.preferredVertexPrecision,maxSupportedVertexPrecision:"highp",maxSupportedFragmentPrecision:rE()},setProgramName:{name:t.name},addProgramDefines:n,insertVersion:n};let o=t.fragment,f=t.vertex;Object.keys(vy).forEach(d=>{const m=s[d];o=vy[d](o,m,!0),f=vy[d](f,m,!1)}),this.fragment=o,this.vertex=f,this.transformFeedbackVaryings=t.transformFeedbackVaryings,this._key=Mg(`${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,gh[this._cacheKey]=null}static from(t){const n=`${t.vertex}:${t.fragment}`;return gh[n]||(gh[n]=new Iy(t),gh[n]._cacheKey=n),gh[n]}};Gx.defaultOptions={preferredVertexPrecision:"highp",preferredFragmentPrecision:"mediump"};let Rg=Gx;const Nv={uint8x2:{size:2,stride:2,normalised:!1},uint8x4:{size:4,stride:4,normalised:!1},sint8x2:{size:2,stride:2,normalised:!1},sint8x4:{size:4,stride:4,normalised:!1},unorm8x2:{size:2,stride:2,normalised:!0},unorm8x4:{size:4,stride:4,normalised:!0},snorm8x2:{size:2,stride:2,normalised:!0},snorm8x4:{size:4,stride:4,normalised:!0},uint16x2:{size:2,stride:4,normalised:!1},uint16x4:{size:4,stride:8,normalised:!1},sint16x2:{size:2,stride:4,normalised:!1},sint16x4:{size:4,stride:8,normalised:!1},unorm16x2:{size:2,stride:4,normalised:!0},unorm16x4:{size:4,stride:8,normalised:!0},snorm16x2:{size:2,stride:4,normalised:!0},snorm16x4:{size:4,stride:8,normalised:!0},float16x2:{size:2,stride:4,normalised:!1},float16x4:{size:4,stride:8,normalised:!1},float32:{size:1,stride:4,normalised:!1},float32x2:{size:2,stride:8,normalised:!1},float32x3:{size:3,stride:12,normalised:!1},float32x4:{size:4,stride:16,normalised:!1},uint32:{size:1,stride:4,normalised:!1},uint32x2:{size:2,stride:8,normalised:!1},uint32x3:{size:3,stride:12,normalised:!1},uint32x4:{size:4,stride:16,normalised:!1},sint32:{size:1,stride:4,normalised:!1},sint32x2:{size:2,stride:8,normalised:!1},sint32x3:{size:3,stride:12,normalised:!1},sint32x4:{size:4,stride:16,normalised:!1}};function yE(i){return Nv[i]??Nv.float32}const gE={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"},Uv=/@location\((\d+)\)\s+([a-zA-Z0-9_]+)\s*:\s*([a-zA-Z0-9_<>]+)(?:,|\s|\)|$)/g;function Bv(i,t){let n;for(;(n=Uv.exec(i))!==null;){const s=gE[n[3]]??"float32";t[n[2]]={location:parseInt(n[1],10),format:s,stride:yE(s).stride,offset:0,instance:!1,start:0}}Uv.lastIndex=0}function vE(i){return i.replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"")}function xE({source:i,entryPoint:t}){const n={},s=vE(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(Bv(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&&Bv(S[1],n)}}return n}function xy(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 R=E.match(g)[1],z=E.match(m).reduce((M,O)=>{const[B,w]=O.split(":");return M[B.trim()]=w.trim(),M},{});return z?{name:R,members:z}:null}).filter(({name:E})=>v.some(R=>R.type===E||R.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 _E({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 SE({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 bE(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 vh=Object.create(null);class Vh{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=xy(n.source);this.structsAndGroups=v}else{const v=xy(s.source),S=xy(n.source);this.structsAndGroups=bE(v,S)}this.layout=o??SE(this.structsAndGroups),this.gpuLayout=f??_E(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=Mg(s,"program")}get attributeData(){return this._attributeData??(this._attributeData=xE(this.vertex)),this._attributeData}destroy(){this.gpuLayout=null,this.layout=null,this.structsAndGroups=null,this.fragment=null,this.vertex=null,vh[this._cacheKey]=null}static from(t){const n=`${t.vertex.source}:${t.fragment.source}:${t.fragment.entryPoint}:${t.vertex.entryPoint}`;return vh[n]||(vh[n]=new Vh(t),vh[n]._cacheKey=n),vh[n]}}const jx=["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>"],TE=jx.reduce((i,t)=>(i[t]=!0,i),{});function EE(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 qx=class Yx{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={...Yx.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,!TE[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: ${jx.join(", ")}`)}f.value??(f.value=EE(f.type,f.size)),s[o]=f.value}this.uniforms=s,this._dirtyId=1,this.ubo=n.ubo,this.isStatic=n.isStatic,this._signature=Mg(Object.keys(s).map(o=>`${o}-${t[o].type}`).join("-"),"uniform-group")}update(){this._dirtyId++}};qx.defaultOptions={ubo:!1,isStatic:!1};let Lx=qx;class Zm{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 $y=(i=>(i[i.WEBGL=1]="WEBGL",i[i.WEBGPU=2]="WEBGPU",i[i.CANVAS=4]="CANVAS",i[i.BOTH=3]="BOTH",i))($y||{});class op 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|=$y.WEBGPU),s&&(d|=$y.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 Zm,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 Lx(A));const E=g[b];E&&(o[E.group]||(o[E.group]=new Zm,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 Zm,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=Vh.from(n)),s&&(d=Rg.from(s)),new op({gpuProgram:f,glProgram:d,...o})}}const CE={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},_y=0,Sy=1,by=2,Ty=3,Ey=4,Cy=5,tg=class Xx{constructor(){this.data=0,this.blendMode="normal",this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<_y)}set blend(t){!!(this.data&1<<_y)!==t&&(this.data^=1<<_y)}get offsets(){return!!(this.data&1<<Sy)}set offsets(t){!!(this.data&1<<Sy)!==t&&(this.data^=1<<Sy)}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<<by)}set culling(t){!!(this.data&1<<by)!==t&&(this.data^=1<<by)}get depthTest(){return!!(this.data&1<<Ty)}set depthTest(t){!!(this.data&1<<Ty)!==t&&(this.data^=1<<Ty)}get depthMask(){return!!(this.data&1<<Cy)}set depthMask(t){!!(this.data&1<<Cy)!==t&&(this.data^=1<<Cy)}get clockwiseFrontFace(){return!!(this.data&1<<Ey)}set clockwiseFrontFace(t){!!(this.data&1<<Ey)!==t&&(this.data^=1<<Ey)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!=="none",this._blendMode=t,this._blendModeId=CE[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 Xx;return t.depthTest=!1,t.blend=!0,t}};tg.default2d=tg.for2d();let zg=tg;const Vx=class eg extends op{constructor(t){t={...eg.defaultOptions,...t},super(t),this.enabled=!0,this._state=zg.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=Vh.from(n)),s&&(d=Rg.from(s)),new eg({gpuProgram:f,glProgram:d,...o})}};Vx.defaultOptions={blendMode:"normal",resolution:1,padding:0,antialias:"off",blendRequired:!1,clipToViewport:!0};let Wr=Vx;const ng=[];ke.handleByNamedList(kt.Environment,ng);async function AE(i){if(!i)for(let t=0;t<ng.length;t++){const n=ng[t];if(n.value.test()){await n.value.load();return}}}let xh;function ME(){if(typeof xh=="boolean")return xh;try{xh=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{xh=!1}return xh}function wv(i,t,n=2){const s=t&&t.length,o=s?t[0]*n:i.length;let f=Qx(i,0,o,n,!0);const d=[];if(!f||f.next===f.prev)return d;let m,g,v;if(s&&(f=NE(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],R=i[A+1];E<m&&(m=E),R<g&&(g=R),E>S&&(S=E),R>b&&(b=R)}v=Math.max(S-m,b-g),v=v!==0?32767/v:0}return wh(f,d,n,m,g,v,0),d}function Qx(i,t,n,s,o){let f;if(o===VE(i,t,n,s)>0)for(let d=t;d<n;d+=s)f=Hv(d/s|0,i[d],i[d+1],f);else for(let d=n-s;d>=t;d-=s)f=Hv(d/s|0,i[d],i[d+1],f);return f&&zc(f,f.next)&&(Gh(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&&(zc(n,n.next)||Ke(n.prev,n,n.next)===0)){if(Gh(n),n=t=n.prev,n===n.next)break;s=!0}else n=n.next;while(s||n!==t);return t}function wh(i,t,n,s,o,f,d){if(!i)return;!d&&f&&GE(i,s,o,f);let m=i;for(;i.prev!==i.next;){const g=i.prev,v=i.next;if(f?zE(i,s,o,f):RE(i)){t.push(g.i,i.i,v.i),Gh(i),i=v.next,m=v.next;continue}if(i=v,i===m){d?d===1?(i=DE(Jr(i),t),wh(i,t,n,s,o,f,2)):d===2&&OE(i,t,n,s,o,f):wh(Jr(i),t,n,s,o,f,1);break}}}function RE(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 R=s.next;for(;R!==t;){if(R.x>=S&&R.x<=A&&R.y>=b&&R.y<=E&&Ah(o,m,f,g,d,v,R.x,R.y)&&Ke(R.prev,R,R.next)>=0)return!1;R=R.next}return!0}function zE(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),R=Math.min(S,b,A),z=Math.max(m,g,v),M=Math.max(S,b,A),O=ag(E,R,t,n,s),B=ag(z,M,t,n,s);let w=i.prevZ,H=i.nextZ;for(;w&&w.z>=O&&H&&H.z<=B;){if(w.x>=E&&w.x<=z&&w.y>=R&&w.y<=M&&w!==o&&w!==d&&Ah(m,S,g,b,v,A,w.x,w.y)&&Ke(w.prev,w,w.next)>=0||(w=w.prevZ,H.x>=E&&H.x<=z&&H.y>=R&&H.y<=M&&H!==o&&H!==d&&Ah(m,S,g,b,v,A,H.x,H.y)&&Ke(H.prev,H,H.next)>=0))return!1;H=H.nextZ}for(;w&&w.z>=O;){if(w.x>=E&&w.x<=z&&w.y>=R&&w.y<=M&&w!==o&&w!==d&&Ah(m,S,g,b,v,A,w.x,w.y)&&Ke(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;H&&H.z<=B;){if(H.x>=E&&H.x<=z&&H.y>=R&&H.y<=M&&H!==o&&H!==d&&Ah(m,S,g,b,v,A,H.x,H.y)&&Ke(H.prev,H,H.next)>=0)return!1;H=H.nextZ}return!0}function DE(i,t){let n=i;do{const s=n.prev,o=n.next.next;!zc(s,o)&&Kx(s,n,n.next,o)&&Hh(s,o)&&Hh(o,s)&&(t.push(s.i,n.i,o.i),Gh(n),Gh(n.next),n=i=o),n=n.next}while(n!==i);return Jr(n)}function OE(i,t,n,s,o,f){let d=i;do{let m=d.next.next;for(;m!==d.prev;){if(d.i!==m.i&&YE(d,m)){let g=kx(d,m);d=Jr(d,d.next),g=Jr(g,g.next),wh(d,t,n,s,o,f,0),wh(g,t,n,s,o,f,0);return}m=m.next}d=d.next}while(d!==i)}function NE(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=Qx(i,m,g,s,!1);v===v.next&&(v.steiner=!0),o.push(qE(v))}o.sort(UE);for(let f=0;f<o.length;f++)n=BE(o[f],n);return n}function UE(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 BE(i,t){const n=wE(i,t);if(!n)return t;const s=kx(n,i);return Jr(s,s.next),Jr(n,n.next)}function wE(i,t){let n=t;const s=i.x,o=i.y;let f=-1/0,d;if(zc(i,n))return n;do{if(zc(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&&Zx(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);Hh(n,i)&&(b<S||b===S&&(n.x>d.x||n.x===d.x&&HE(d,n)))&&(d=n,S=b)}n=n.next}while(n!==m);return d}function HE(i,t){return Ke(i.prev,i,t.prev)<0&&Ke(t.next,i,i.next)<0}function GE(i,t,n,s){let o=i;do o.z===0&&(o.z=ag(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,jE(o)}function jE(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 ag(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 qE(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 Zx(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 Ah(i,t,n,s,o,f,d,m){return!(i===d&&t===m)&&Zx(i,t,n,s,o,f,d,m)}function YE(i,t){return i.next.i!==t.i&&i.prev.i!==t.i&&!LE(i,t)&&(Hh(i,t)&&Hh(t,i)&&XE(i,t)&&(Ke(i.prev,i,t.prev)||Ke(i,t.prev,t))||zc(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 zc(i,t){return i.x===t.x&&i.y===t.y}function Kx(i,t,n,s){const o=Bm(Ke(i,t,n)),f=Bm(Ke(i,t,s)),d=Bm(Ke(n,s,i)),m=Bm(Ke(n,s,t));return!!(o!==f&&d!==m||o===0&&Um(i,n,t)||f===0&&Um(i,s,t)||d===0&&Um(n,i,s)||m===0&&Um(n,t,s))}function Um(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 Bm(i){return i>0?1:i<0?-1:0}function LE(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&&Kx(n,n.next,i,t))return!0;n=n.next}while(n!==i);return!1}function Hh(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 XE(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 kx(i,t){const n=ig(i.i,i.x,i.y),s=ig(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 Hv(i,t,n,s){const o=ig(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 Gh(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 ig(i,t,n){return{i,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function VE(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 QE=wv.default||wv;var Jx=(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))(Jx||{});class ZE{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 KE=["init","destroy","contextChange","resolutionChange","resetState","renderEnd","renderStart","render","update","postrender","prerender"],Px=class Wx 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=[...KE,...this.config.runners??[]];this._addRunners(...n),this._unsafeEvalCheck()}async init(t={}){const n=t.skipExtensionImports===!0?!0:t.manageImports===!1;await AE(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={...Wx.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 ra&&(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=Jx.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 ZE(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)&&Xh.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(!ME())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()}};Px.defaultOptions={resolution:1,failIfMajorPerformanceCaveat:!1,roundPixels:!1};let Fx=Px,wm;function kE(i){return wm!==void 0||(wm=(()=>{var n;const t={stencil:!0,failIfMajorPerformanceCaveat:i??Fx.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}})()),wm}let Hm;async function JE(i={}){return Hm!==void 0||(Hm=await(async()=>{const t=si.get().getNavigator().gpu;if(!t)return!1;try{return await(await t.requestAdapter(i)).requestDevice(),!0}catch{return!1}})()),Hm}const Gv=["webgl","webgpu","canvas"];async function PE(i){let t=[];i.preference?(t.push(i.preference),Gv.forEach(f=>{f!==i.preference&&t.push(f)})):t=Gv.slice();let n,s={};for(let f=0;f<t.length;f++){const d=t[f];if(d==="webgpu"&&await JE()){const{WebGPURenderer:m}=await Mh(async()=>{const{WebGPURenderer:g}=await import("./WebGPURenderer-BdIKurkV.js");return{WebGPURenderer:g}},__vite__mapDeps([2,3,4]));n=m,s={...i,...i.webgpu};break}else if(d==="webgl"&&kE(i.failIfMajorPerformanceCaveat??Fx.defaultOptions.failIfMajorPerformanceCaveat)){const{WebGLRenderer:m}=await Mh(async()=>{const{WebGLRenderer:g}=await import("./WebGLRenderer-B5huw0RY.js");return{WebGLRenderer:g}},__vite__mapDeps([5,3,4]));n=m,s={...i,...i.webgl};break}else if(d==="canvas"){const{CanvasRenderer:m}=await Mh(async()=>{const{CanvasRenderer:g}=await import("./CanvasRenderer-DFdMBORe.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 Ix="8.17.0";class $x{static init(){var t;(t=globalThis.__PIXI_APP_INIT__)==null||t.call(globalThis,this,Ix)}static destroy(){}}$x.extension=kt.Application;class WE{constructor(t){this._renderer=t}init(){var t;(t=globalThis.__PIXI_RENDERER_INIT__)==null||t.call(globalThis,this._renderer,Ix)}destroy(){this._renderer=null}}WE.extension={type:[kt.WebGLSystem,kt.WebGPUSystem],name:"initHook",priority:-10};class t_{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}}t_.extension=kt.Application;class e_{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,Jm.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()}}}e_.extension=kt.Application;ke.add(t_);ke.add(e_);const n_=class lg{constructor(...t){this.stage=new ra,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 ra),this.renderer=await PE(t),lg._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=lg._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}};n_._plugins=[];let Dg=n_;ke.handleByList(kt.Application,Dg._plugins);ke.add($x);var Ay,jv;function FE(){if(jv)return Ay;jv=1,Ay=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 Ay}var IE=FE();const $E=tp(IE);function tC(i,t){const n=$E(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 Og{constructor(t=0,n=0,s=0){this.type="circle",this.x=t,this.y=n,this.radius=s}clone(){return new Og(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 Ng{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 Ng(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,R=n-this.y,z=E*E/(v*v)+R*R/(S*S),M=E*E/(b*b)+R*R/(A*A);return z>1&&M<=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 eC(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,R;A<0?(E=n,R=s):A>1?(E=o,R=f):(E=n+A*g,R=s+A*v);const z=i-E,M=t-R;return z*z+M*M}let nC,aC;class zh{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(nC),s=t.getBounds(aC);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 zh(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],R=g[(S+3)%g.length],z=eC(t,n,b,A,E,R),M=Math.sign((E-b)*(n-A)-(R-A)*(t-b));if(z<=(M<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 Gm=(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 Ug{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 Ug(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,R=m-v*2,z=g-v*2,M=f+m,O=d+g;return(t>=f-S&&t<=f+b||t>=M-b&&t<=M+S)&&n>=E&&n<=E+z||(n>=d-S&&n<=d+b||n>=O-b&&n<=O+S)&&t>=A&&t<=A+R?!0:t<A&&n<E&&Gm(t,n,A,E,v,b,S)||t>M-v&&n<E&&Gm(t,n,M-v,E,v,b,S)||t>M-v&&n>O-v&&Gm(t,n,M-v,O-v,v,b,S)||t<A&&n>O-v&&Gm(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 a_={};function iC(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 a_[s]||lC(i,t,s,n)}function lC(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 Zm(o);return a_[n]=d,d}class qv{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 Yv(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 sC={normal:"normal-npm",add:"add-npm",screen:"screen-npm"};var uC=(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))(uC||{});function Lv(i,t){return t.alphaMode==="no-premultiply-alpha"&&sC[i]||i}const rC=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
|
|
83
|
+
`);function oC(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 cC(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=rC.replace(/%forloop%/gi,oC(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 fC(){var t;if(yc)return yc;const i=Hx();return yc=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),yc=cC(yc,i),(t=i.getExtension("WEBGL_lose_context"))==null||t.loseContext(),yc}class hC{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 dC{constructor(){this.renderPipeId="batch",this.action="startBatch",this.start=0,this.size=0,this.textures=new hC,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 Dh=[];let Pm=0;Xh.register({clear:()=>{if(Dh.length>0)for(const i of Dh)i&&i.destroy();Dh.length=0,Pm=0}});function Xv(){return Pm>0?Dh[--Pm]:new dC}function Vv(i){i.elements=null,Dh[Pm++]=i}let _h=0;const i_=class l_{constructor(t){this.uid=en("batcher"),this.dirty=!0,this.batchIndex=0,this.batches=[],this._elements=[],t={...l_.defaultOptions,...t},t.maxTextures||(ce("v8.8.0","maxTextures is a required option for Batcher now, please pass it in the options"),t.maxTextures=fC());const{maxTextures:n,attributesInitialSize:s,indicesInitialSize:o}=t;this.attributeBuffer=new qv(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++)Vv(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=Xv(),o=s.textures;o.clear();const f=n[this.elementStart];let d=Lv(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",R=[];const z=this.maxTextures;for(let M=this.elementStart;M<this.elementSize;++M){const O=n[M];n[M]=null;const w=O.texture._source,H=Lv(O.blendMode,w),J=d!==H||m!==O.topology;if(w._batchTick===_h&&!J){O._textureId=w._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,R.push(O);continue}w._batchTick=_h,(o.count>=z||J)&&(this._finishBatch(s,A,b-A,o,d,m,t,E,R),E="renderBatch",A=b,d=H,m=O.topology,s=Xv(),o=s.textures,o.clear(),R=[],++_h),O._textureId=w._textureBindLocation=o.count,o.ids[w.uid]=o.count,o.textures[o.count++]=w,O._batch=s,R.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,R),A=b,++_h),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,++_h,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 qv(n);Yv(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 Yv(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++)Vv(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}}};i_.defaultOptions={maxTextures:null,attributesInitialSize:4,indicesInitialSize:6};let mC=i_;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 jh 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 s_(i,t){if(!(i instanceof jh)){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 jh({data:i,label:t?"index-mesh-buffer":"vertex-mesh-buffer",usage:n})}return i}function pC(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],R=o[A+1];E>m&&(m=E),R>g&&(g=R),E<f&&(f=E),R<d&&(d=R)}return n.minX=f,n.minY=d,n.maxX=m,n.maxY=g,n}function yC(i){return(i instanceof jh||Array.isArray(i)||i.BYTES_PER_ELEMENT)&&(i={buffer:i}),i.buffer=s_(i.buffer,!1),i}class gC 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=yC(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=s_(t,!0),this.buffers.push(this.indexBuffer)}get bounds(){return this._boundsDirty?(this._boundsDirty=!1,pC(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 vC=new Float32Array(1),xC=new Uint32Array(1);class _C extends gC{constructor(){const n=new jh({data:vC,label:"attribute-batch-buffer",usage:Va.VERTEX|Va.COPY_DST,shrinkToFit:!1}),s=new jh({data:xC,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 Qv(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 SC=/\{\{(.*?)\}\}/g;function Zv(i){var s;const t={};return(((s=i.match(SC))==null?void 0:s.map(o=>o.replace(/[{()}]/g,"")))??[]).forEach(o=>{t[o]=[]}),t}function Kv(i,t){let n;const s=/@in\s+([^;]+);/g;for(;(n=s.exec(i))!==null;)t.push(n[1])}function kv(i,t,n=!1){const s=[];Kv(t,s),i.forEach(m=>{m.header&&Kv(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 Jv(i,t){let n;const s=/@out\s+([^;]+);/g;for(;(n=s.exec(i))!==null;)t.push(n[1])}function bC(i){const n=/\b(\w+)\s*:/g.exec(i);return n?n[1]:""}function TC(i){const t=/@.*?\s+/g;return i.replace(t,"")}function EC(i,t){const n=[];Jv(t,n),i.forEach(g=>{g.header&&Jv(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 ${TC(g)};`).join(`
|
|
89
|
+
`),d=`return VSOutput(
|
|
90
|
+
${n.sort().map(g=>` ${bC(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 Pv(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),My=new Map;let CC=0;function AC({template:i,bits:t}){const n=u_(i,t);if(Hu[n])return Hu[n];const{vertex:s,fragment:o}=RC(i,t);return Hu[n]=r_(s,o,t),Hu[n]}function MC({template:i,bits:t}){const n=u_(i,t);return Hu[n]||(Hu[n]=r_(i.vertex,i.fragment,t)),Hu[n]}function RC(i,t){const n=t.map(d=>d.vertex).filter(d=>!!d),s=t.map(d=>d.fragment).filter(d=>!!d);let o=kv(n,i.vertex,!0);o=EC(n,o);const f=kv(s,i.fragment,!0);return{vertex:o,fragment:f}}function u_(i,t){return t.map(n=>(My.has(n)||My.set(n,CC++),My.get(n))).sort((n,s)=>n-s).join("-")+i.vertex+i.fragment}function r_(i,t,n){const s=Zv(i),o=Zv(t);return n.forEach(f=>{Qv(f.vertex,s,f.name),Qv(f.fragment,o,f.name)}),{vertex:Pv(i,s),fragment:Pv(t,o)}}const zC=`
|
|
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
|
+
`,DC=`
|
|
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
|
+
`,OC=`
|
|
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
|
+
`,NC=`
|
|
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
|
+
`,UC={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
|
+
`}},BC={name:"global-uniforms-bit",vertex:{header:`
|
|
235
|
+
uniform mat3 uProjectionMatrix;
|
|
236
|
+
uniform mat3 uWorldTransformMatrix;
|
|
237
|
+
uniform vec4 uWorldColorAlpha;
|
|
238
|
+
uniform vec2 uResolution;
|
|
239
|
+
`}};function wC({bits:i,name:t}){const n=AC({template:{fragment:DC,vertex:zC},bits:[UC,...i]});return Vh.from({name:t,vertex:{source:n.vertex,entryPoint:"main"},fragment:{source:n.fragment,entryPoint:"main"}})}function HC({bits:i,name:t}){return new Rg({name:t,...MC({template:{vertex:OC,fragment:NC},bits:[BC,...i]})})}const GC={name:"color-bit",vertex:{header:`
|
|
240
|
+
@in aColor: vec4<f32>;
|
|
241
|
+
`,main:`
|
|
242
|
+
vColor *= vec4<f32>(aColor.rgb * aColor.a, aColor.a);
|
|
243
|
+
`}},jC={name:"color-bit",vertex:{header:`
|
|
244
|
+
in vec4 aColor;
|
|
245
|
+
`,main:`
|
|
246
|
+
vColor *= vec4(aColor.rgb * aColor.a, aColor.a);
|
|
247
|
+
`}},Ry={};function qC(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 YC(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 LC(i){return Ry[i]||(Ry[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
|
+
${qC(i)}
|
|
263
|
+
`,main:`
|
|
264
|
+
var uvDx = dpdx(vUV);
|
|
265
|
+
var uvDy = dpdy(vUV);
|
|
266
|
+
|
|
267
|
+
${YC(i)}
|
|
268
|
+
`}}),Ry[i]}const zy={};function XC(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 VC(i){return zy[i]||(zy[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
|
+
${XC(i)}
|
|
288
|
+
`}}),zy[i]}const QC={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
|
+
`}},ZC={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
|
+
`}},Wv={};function KC(i){let t=Wv[i];if(t)return t;const n=new Int32Array(i);for(let s=0;s<i;s++)n[s]=s;return t=Wv[i]=new Lx({uTextures:{value:n,type:"i32",size:i}},{isStatic:!0}),t}class Fv extends op{constructor(t){const n=HC({name:"batch",bits:[jC,VC(t),ZC]}),s=wC({name:"batch",bits:[GC,LC(t),QC]});super({glProgram:n,gpuProgram:s,resources:{batchSamplers:KC(t)}}),this.maxTextures=t}}let Sh=null;const o_=class c_ extends mC{constructor(t){super(t),this.geometry=new _C,this.name=c_.extension.name,this.vertexSize=6,Sh??(Sh=new Fv(t.maxTextures)),this.shader=Sh}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:R,uvs:z}=t,M=t.color,O=t.attributeOffset,B=O+t.attributeSize;for(let w=O;w<B;w++){const H=w*2,J=R[H],Q=R[H+1];n[o++]=g*J+S*Q+A,n[o++]=b*Q+v*J+E,n[o++]=z[H],n[o++]=z[H+1],s[o++]=M,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,R=t.bounds,z=R.maxX,M=R.minX,O=R.maxY,B=R.minY,w=d.uvs,H=t.color,J=f<<16|t.roundPixels&65535;n[o+0]=g*M+S*B+A,n[o+1]=b*B+v*M+E,n[o+2]=w.x0,n[o+3]=w.y0,s[o+4]=H,s[o+5]=J,n[o+6]=g*z+S*B+A,n[o+7]=b*B+v*z+E,n[o+8]=w.x1,n[o+9]=w.y1,s[o+10]=H,s[o+11]=J,n[o+12]=g*z+S*O+A,n[o+13]=b*O+v*z+E,n[o+14]=w.x2,n[o+15]=w.y2,s[o+16]=H,s[o+17]=J,n[o+18]=g*M+S*O+A,n[o+19]=b*O+v*M+E,n[o+20]=w.x3,n[o+21]=w.y3,s[o+22]=H,s[o+23]=J}_updateMaxTextures(t){this.shader.maxTextures!==t&&(Sh=new Fv(t),this.shader=Sh)}destroy(){this.shader=null,super.destroy()}};o_.extension={type:[kt.Batcher],name:"default"};let kC=o_;class Qh{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 JC(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,R=m.ty;for(;g<d;){const z=i[n],M=i[n+1];s[o]=v*z+b*M+E,s[o+1]=S*z+A*M+R,o+=f,n+=t,g++}}function PC(i,t,n,s){let o=0;for(t*=n;o<s;)i[t]=0,i[t+1]=0,t+=n,o++}function f_(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],R=i[b+1];i[b]=f*E+m*R+v,i[b+1]=d*E+g*R+S,b+=s}}const WC=new ne;class Bg{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?gx(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)||WC}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 qh={extension:{type:kt.ShapeBuilder,name:"circle"},build(i,t){let n,s,o,f,d,m;if(i.type==="circle"){const H=i;if(d=m=H.radius,d<=0)return!1;n=H.x,s=H.y,o=f=0}else if(i.type==="ellipse"){const H=i;if(d=H.halfWidth,m=H.halfHeight,d<=0||m<=0)return!1;n=H.x,s=H.y,o=f=0}else{const H=i,J=H.width/2,Q=H.height/2;n=H.x+J,s=H.y+Q,d=m=Math.max(0,Math.min(H.radius,Math.min(J,Q))),o=J-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,R=o+d,z=f,M=n+R,O=n-R,B=s+z;if(t[S++]=M,t[S++]=B,t[--b]=B,t[--b]=O,f){const H=s-z;t[A++]=O,t[A++]=H,t[--E]=H,t[--E]=M}for(let H=1;H<g;H++){const J=Math.PI/2*(H/g),Q=o+Math.cos(J)*d,Z=f+Math.sin(J)*m,gt=n+Q,ct=n-Q,ft=s+Z,ht=s-Z;t[S++]=gt,t[S++]=ft,t[--b]=ft,t[--b]=ct,t[A++]=ct,t[A++]=ht,t[--E]=ht,t[--E]=gt}R=o,z=f+m,M=n+R,O=n-R,B=s+z;const w=s-z;return t[S++]=M,t[S++]=B,t[--E]=w,t[--E]=M,o&&(t[S++]=O,t[S++]=B,t[--E]=w,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}},FC={...qh,extension:{...qh.extension,name:"ellipse"}},IC={...qh,extension:{...qh.extension,name:"roundedRectangle"}},h_=1e-4,Iv=1e-4;function $C(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 $v(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 R=g+A,z=v+E,M=S+A,O=b+E;return m.push(R,z),m.push(M,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,R=Math.abs(E),z=Math.sqrt(g*g+v*v),M=(15*R*Math.sqrt(z)/Math.PI>>0)+1,O=E/M;if(A+=O,m){d.push(i,t),d.push(n,s);for(let B=1,w=A;B<M;B++,w+=O)d.push(i,t),d.push(i+Math.sin(w)*z,t+Math.cos(w)*z);d.push(i,t),d.push(o,f)}else{d.push(n,s),d.push(i,t);for(let B=1,w=A;B<M;B++,w+=O)d.push(i+Math.sin(w)*z,t+Math.cos(w)*z),d.push(i,t);d.push(o,f),d.push(i,t)}return M*2}function tA(i,t,n,s,o,f){const d=h_;if(i.length===0)return;const m=t;let g=m.alignment;if(t.alignment!==.5){let nt=$C(i);g=(g-.5)*nt+.5}const v=new ua(i[0],i[1]),S=new ua(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 nt=(v.x+S.x)*.5,mt=(S.y+v.y)*.5;i.unshift(nt,mt),i.push(nt,mt)}const E=o,R=i.length/2;let z=i.length;const M=E.length/2,O=m.width/2,B=O*O,w=m.miterLimit*m.miterLimit;let H=i[0],J=i[1],Q=i[2],Z=i[3],gt=0,ct=0,ft=-(J-Z),ht=H-Q,vt=0,_t=0,xt=Math.sqrt(ft*ft+ht*ht);ft/=xt,ht/=xt,ft*=O,ht*=O;const Dt=g,U=(1-Dt)*2,X=Dt*2;b||(m.cap==="round"?z+=qr(H-ft*(U-X)*.5,J-ht*(U-X)*.5,H-ft*U,J-ht*U,H+ft*X,J+ht*X,E,!0)+2:m.cap==="square"&&(z+=$v(H,J,ft,ht,U,X,!0,E))),E.push(H-ft*U,J-ht*U),E.push(H+ft*X,J+ht*X);for(let nt=1;nt<R-1;++nt){H=i[(nt-1)*2],J=i[(nt-1)*2+1],Q=i[nt*2],Z=i[nt*2+1],gt=i[(nt+1)*2],ct=i[(nt+1)*2+1],ft=-(J-Z),ht=H-Q,xt=Math.sqrt(ft*ft+ht*ht),ft/=xt,ht/=xt,ft*=O,ht*=O,vt=-(Z-ct),_t=Q-gt,xt=Math.sqrt(vt*vt+_t*_t),vt/=xt,_t/=xt,vt*=O,_t*=O;const mt=Q-H,Y=J-Z,tt=Q-gt,st=ct-Z,pt=mt*tt+Y*st,Tt=Y*tt-st*mt,Ot=Tt<0;if(Math.abs(Tt)<.001*Math.abs(pt)){E.push(Q-ft*U,Z-ht*U),E.push(Q+ft*X,Z+ht*X),pt>=0&&(m.join==="round"?z+=qr(Q,Z,Q-ft*U,Z-ht*U,Q-vt*U,Z-_t*U,E,!1)+4:z+=2,E.push(Q-vt*X,Z-_t*X),E.push(Q+vt*U,Z+_t*U));continue}const Ut=(-ft+H)*(-ht+Z)-(-ft+Q)*(-ht+J),re=(-vt+gt)*(-_t+Z)-(-vt+Q)*(-_t+ct),ue=(mt*re-tt*Ut)/Tt,oa=(st*Ut-Y*re)/Tt,Oa=(ue-Q)*(ue-Q)+(oa-Z)*(oa-Z),Un=Q+(ue-Q)*U,Qn=Z+(oa-Z)*U,rn=Q-(ue-Q)*X,Zn=Z-(oa-Z)*X,ts=Math.min(mt*mt+Y*Y,tt*tt+st*st),Za=Ot?U:X,ju=ts+Za*Za*B;Oa<=ju?m.join==="bevel"||Oa/B>w?(Ot?(E.push(Un,Qn),E.push(Q+ft*X,Z+ht*X),E.push(Un,Qn),E.push(Q+vt*X,Z+_t*X)):(E.push(Q-ft*U,Z-ht*U),E.push(rn,Zn),E.push(Q-vt*U,Z-_t*U),E.push(rn,Zn)),z+=2):m.join==="round"?Ot?(E.push(Un,Qn),E.push(Q+ft*X,Z+ht*X),z+=qr(Q,Z,Q+ft*X,Z+ht*X,Q+vt*X,Z+_t*X,E,!0)+4,E.push(Un,Qn),E.push(Q+vt*X,Z+_t*X)):(E.push(Q-ft*U,Z-ht*U),E.push(rn,Zn),z+=qr(Q,Z,Q-ft*U,Z-ht*U,Q-vt*U,Z-_t*U,E,!1)+4,E.push(Q-vt*U,Z-_t*U),E.push(rn,Zn)):(E.push(Un,Qn),E.push(rn,Zn)):(E.push(Q-ft*U,Z-ht*U),E.push(Q+ft*X,Z+ht*X),m.join==="round"?Ot?z+=qr(Q,Z,Q+ft*X,Z+ht*X,Q+vt*X,Z+_t*X,E,!0)+2:z+=qr(Q,Z,Q-ft*U,Z-ht*U,Q-vt*U,Z-_t*U,E,!1)+2:m.join==="miter"&&Oa/B<=w&&(Ot?(E.push(rn,Zn),E.push(rn,Zn)):(E.push(Un,Qn),E.push(Un,Qn)),z+=2),E.push(Q-vt*U,Z-_t*U),E.push(Q+vt*X,Z+_t*X),z+=2)}H=i[(R-2)*2],J=i[(R-2)*2+1],Q=i[(R-1)*2],Z=i[(R-1)*2+1],ft=-(J-Z),ht=H-Q,xt=Math.sqrt(ft*ft+ht*ht),ft/=xt,ht/=xt,ft*=O,ht*=O,E.push(Q-ft*U,Z-ht*U),E.push(Q+ft*X,Z+ht*X),b||(m.cap==="round"?z+=qr(Q-ft*(U-X)*.5,Z-ht*(U-X)*.5,Q-ft*U,Z-ht*U,Q+ft*X,Z+ht*X,E,!1)+2:m.cap==="square"&&(z+=$v(Q,Z,ft,ht,U,X,!1,E)));const it=Iv*Iv;for(let nt=M;nt<z+M-2;++nt)H=E[nt*2],J=E[nt*2+1],Q=E[(nt+1)*2],Z=E[(nt+1)*2+1],gt=E[(nt+2)*2],ct=E[(nt+2)*2+1],!(Math.abs(H*(Z-ct)+Q*(ct-J)+gt*(J-Z))<it)&&f.push(nt,nt+1,nt+2)}function eA(i,t,n,s){const o=h_;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 d_(i,t,n,s,o,f,d){const m=QE(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 nA=[],aA={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){d_(i,nA,t,n,s,o,f)}},iA={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}},lA={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}},t1=[{offset:0,color:"white"},{offset:1,color:"black"}],wg=class sg{constructor(...t){this.uid=en("fillGradient"),this._tick=0,this.type="linear",this.colorStops=[];let n=sA(t);n={...n.type==="radial"?sg.defaultRadialOptions:sg.defaultLinearOptions,...sx(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 M=t;t=s,s=M,f*=-1}if(d<0){const M=n;n=o,o=M,d*=-1}}const g=this.colorStops.length?this.colorStops:t1,v=this._textureSize,{canvas:S,context:b}=n1(v,1),A=m?b.createLinearGradient(this._textureSize,0,0,0):b.createLinearGradient(0,0,this._textureSize,0);e1(A,g),b.fillStyle=A,b.fillRect(0,0,v,1),this.texture=new Ee({source:new km({resource:S,addressMode:this._wrapMode})});const E=Math.sqrt(f*f+d*d),R=Math.atan2(d,f),z=new ne;z.scale(E/v,1),z.rotate(R),z.translate(t,n),this.textureSpace==="local"&&z.scale(v,v),this.transform=z}buildGradient(){this.texture||this._tick++,this.type==="linear"?this.buildLinearGradient():this.buildRadialGradient()}buildRadialGradient(){if(this.texture)return;const t=this.colorStops.length?this.colorStops:t1,n=this._textureSize,{canvas:s,context:o}=n1(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),R=(f-b)*E,z=(d-A)*E,M=o.createRadialGradient(R,z,v*E,(m-b)*E,(g-A)*E,S*E);e1(M,t),o.fillStyle=t[t.length-1].color,o.fillRect(0,0,n,n),o.fillStyle=M,o.translate(R,z),o.rotate(this.rotation),o.scale(1,this.scale),o.translate(-R,-z),o.fillRect(0,0,n,n),this.texture=new Ee({source:new km({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}`}};wg.defaultLinearOptions={start:{x:0,y:0},end:{x:0,y:1},colorStops:[],textureSpace:"local",type:"linear",textureSize:256,wrapMode:"clamp-to-edge"};wg.defaultRadialOptions={center:{x:.5,y:.5},innerRadius:0,outerRadius:.5,colorStops:[],scale:1,textureSpace:"local",type:"radial",textureSize:256,wrapMode:"clamp-to-edge"};let Ls=wg;function e1(i,t){for(let n=0;n<t.length;n++){const s=t[n];i.addColorStop(s.offset,s.color)}}function n1(i,t){const n=si.get().createCanvas(i,t),s=n.getContext("2d");return{canvas:n,context:s}}function sA(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]??Ls.defaultLinearOptions.textureSize}),t}const uA=new ne,rA=new un;function oA(i,t,n,s){const o=t.matrix?i.copyFrom(t.matrix).invert():i.identity();if(t.textureSpace==="local"){const d=n.getBounds(rA);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,R=o.b,z=o.c,M=o.d;o.a*=v,o.b*=v,o.c*=S,o.d*=S,o.tx=b*E+A*z+o.tx,o.ty=b*R+A*M+o.ty}else o.translate(t.texture.frame.x,t.texture.frame.y),o.scale(1/t.texture.source.width,1/t.texture.source.height);const f=t.texture.source.style;return!(t.fill instanceof Ls)&&f.addressMode==="clamp-to-edge"&&(f.addressMode="repeat",f.update()),s&&o.append(uA.copyFrom(s).invert()),o}const cp={};ke.handleByMap(kt.ShapeBuilder,cp);ke.add(iA,aA,lA,qh,FC,IC);const cA=new un,fA=new ne;function hA(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")dA(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&&a1(v.shapePath,g,!0,s,n),v&&(m.shapePrimitives[m.shapePrimitives.length-1].holes=v.shapePath.shapePrimitives),a1(m,g,d,s,n)}}}function dA(i,t,n){const s=[],o=cp.rectangle,f=cA;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&&f_(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 R=Qa.get(Bg);R.indexOffset=S,R.indexSize=v.length-S,R.attributeOffset=b,R.attributeSize=m.length/2-b,R.baseColor=i.style,R.alpha=i.alpha,R.texture=A,R.geometryData=n,t.push(R)}function a1(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=cp[g.type];if(!A.build(g,b))return;const E=m.length,R=f.length/2;let z="triangle-list";if(v&&f_(b,v),n){const w=g.closePath??!0,H=t;H.pixelLine?(eA(b,w,f,m),z="line-list"):tA(b,H,!1,w,f,m)}else if(S){const w=[],H=b.slice();mA(S).forEach(Q=>{w.push(H.length/2),H.push(...Q)}),d_(H,w,f,2,R,m,E)}else A.triangulate(b,f,2,R,m,E);const M=d.length/2,O=t.texture;if(O!==Ee.WHITE){const w=oA(fA,t,g,v);JC(f,2,R,d,M,2,f.length/2-R,w)}else PC(d,M,2,f.length/2-R);const B=Qa.get(Bg);B.indexOffset=E,B.indexSize=m.length-E,B.attributeOffset=R,B.attributeSize=f.length/2-R,B.baseColor=t.color,B.alpha=t.alpha,B.texture=O,B.geometryData=o,B.topology=z,s.push(B)})}function mA(i){const t=[];for(let n=0;n<i.length;n++){const s=i[n].shape,o=[];cp[s.type].build(s,o)&&t.push(o)}return t}class pA{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 yA{constructor(){this.instructions=new Cg}init(t){const n=t.maxTextures;this.batcher?this.batcher._updateMaxTextures(n):this.batcher=new kC({maxTextures:n}),this.instructions.reset()}get geometry(){return ce(hT,"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 Hg=class ug{constructor(t){this._renderer=t,this._managedContexts=new Qh({renderer:t,type:"resource",name:"graphicsContext"})}init(t){ug.defaultOptions.bezierSmoothness=(t==null?void 0:t.bezierSmoothness)??ug.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(),hA(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(yA,{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=iC(A.textures.textures,A.textures.count,this._renderer.limits.maxBatchableTextures)}return n}_initContext(t){const n=new pA;return n.context=t,t._gpuData[this._renderer.uid]=n,this._managedContexts.add(t),n}destroy(){this._managedContexts.destroy(),this._renderer=null}};Hg.extension={type:[kt.WebGLSystem,kt.WebGPUSystem],name:"graphicsContext"};Hg.defaultOptions={bezierSmoothness:.5};let Gg=Hg;const gA=8,jm=11920929e-14,vA=1;function m_(i,t,n,s,o,f,d,m,g,v){const b=Math.min(.99,Math.max(0,v??Gg.defaultOptions.bezierSmoothness));let A=(vA-b)/1;return A*=A,xA(t,n,s,o,f,d,m,g,i,A),i}function xA(i,t,n,s,o,f,d,m,g,v){rg(i,t,n,s,o,f,d,m,g,v,0),g.push(d,m)}function rg(i,t,n,s,o,f,d,m,g,v,S){if(S>gA)return;const b=(i+n)/2,A=(t+s)/2,E=(n+o)/2,R=(s+f)/2,z=(o+d)/2,M=(f+m)/2,O=(b+E)/2,B=(A+R)/2,w=(E+z)/2,H=(R+M)/2,J=(O+w)/2,Q=(B+H)/2;if(S>0){let Z=d-i,gt=m-t;const ct=Math.abs((n-d)*gt-(s-m)*Z),ft=Math.abs((o-d)*gt-(f-m)*Z);if(ct>jm&&ft>jm){if((ct+ft)*(ct+ft)<=v*(Z*Z+gt*gt)){g.push(J,Q);return}}else if(ct>jm){if(ct*ct<=v*(Z*Z+gt*gt)){g.push(J,Q);return}}else if(ft>jm){if(ft*ft<=v*(Z*Z+gt*gt)){g.push(J,Q);return}}else if(Z=J-(i+d)/2,gt=Q-(t+m)/2,Z*Z+gt*gt<=v){g.push(J,Q);return}}rg(i,t,b,A,O,B,J,Q,g,v,S+1),rg(J,Q,w,H,z,M,d,m,g,v,S+1)}const _A=8,SA=11920929e-14,bA=1;function TA(i,t,n,s,o,f,d,m){const v=Math.min(.99,Math.max(0,m??Gg.defaultOptions.bezierSmoothness));let S=(bA-v)/1;return S*=S,EA(t,n,s,o,f,d,i,S),i}function EA(i,t,n,s,o,f,d,m){og(d,i,t,n,s,o,f,m,0),d.push(o,f)}function og(i,t,n,s,o,f,d,m,g){if(g>_A)return;const v=(t+s)/2,S=(n+o)/2,b=(s+f)/2,A=(o+d)/2,E=(v+b)/2,R=(S+A)/2;let z=f-t,M=d-n;const O=Math.abs((s-f)*M-(o-d)*z);if(O>SA){if(O*O<=m*(z*z+M*M)){i.push(E,R);return}}else if(z=E-(t+f)/2,M=R-(n+d)/2,z*z+M*M<=m){i.push(E,R);return}og(i,t,n,v,S,E,R,m,g+1),og(i,E,R,b,A,f,d,m,g+1)}function p_(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),R=t+A*s,z=n+E*s;i.push(R,z),S+=v}}function CA(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,R=S*S+b*b,z=g*S+v*b,M=f*Math.sqrt(E)/A,O=f*Math.sqrt(R)/A,B=M*z/E,w=O*z/R,H=M*b+O*v,J=M*S+O*g,Q=v*(O+B),Z=g*(O+B),gt=b*(M+w),ct=S*(M+w),ft=Math.atan2(Z-J,Q-H),ht=Math.atan2(ct-J,gt-H);p_(i,H+t,J+n,f,ft,ht,v*S>b*g)}const Oh=Math.PI*2,Dy={centerX:0,centerY:0,ang1:0,ang2:0},Oy=({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 AA(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 i1=(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)},MA=(i,t,n,s,o,f,d,m,g,v,S,b,A)=>{const E=Math.pow(o,2),R=Math.pow(f,2),z=Math.pow(S,2),M=Math.pow(b,2);let O=E*R-E*M-R*z;O<0&&(O=0),O/=E*M+R*z,O=Math.sqrt(O)*(d===m?-1:1);const B=O*o/f*b,w=O*-f/o*S,H=v*B-g*w+(i+n)/2,J=g*B+v*w+(t+s)/2,Q=(S-B)/o,Z=(b-w)/f,gt=(-S-B)/o,ct=(-b-w)/f,ft=i1(1,0,Q,Z);let ht=i1(Q,Z,gt,ct);m===0&&ht>0&&(ht-=Oh),m===1&&ht<0&&(ht+=Oh),A.centerX=H,A.centerY=J,A.ang1=ft,A.ang2=ht};function RA(i,t,n,s,o,f,d,m=0,g=0,v=0){if(f===0||d===0)return;const S=Math.sin(m*Oh/360),b=Math.cos(m*Oh/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 R=Math.pow(A,2)/Math.pow(f,2)+Math.pow(E,2)/Math.pow(d,2);R>1&&(f*=Math.sqrt(R),d*=Math.sqrt(R)),MA(t,n,s,o,f,d,g,v,S,b,A,E,Dy);let{ang1:z,ang2:M}=Dy;const{centerX:O,centerY:B}=Dy;let w=Math.abs(M)/(Oh/4);Math.abs(1-w)<1e-7&&(w=1);const H=Math.max(Math.ceil(w),1);M/=H;let J=i[i.length-2],Q=i[i.length-1];const Z={x:0,y:0};for(let gt=0;gt<H;gt++){const ct=AA(z,M),{x:ft,y:ht}=Oy(ct[0],f,d,b,S,O,B,Z),{x:vt,y:_t}=Oy(ct[1],f,d,b,S,O,B,Z),{x:xt,y:Dt}=Oy(ct[2],f,d,b,S,O,B,Z);m_(i,J,Q,ft,ht,vt,_t,xt,Dt),J=xt,Q=Dt,z+=M}}function zA(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,R=!1;S.nx*b.nx-S.ny*-b.ny<0?A<0?A=Math.PI+A:(A=Math.PI-A,E=-1,R=!0):A>0&&(E=-1,R=!0);const z=A/2;let M,O=Math.abs(Math.cos(z)*g/Math.sin(z));O>Math.min(S.len/2,b.len/2)?(O=Math.min(S.len/2,b.len/2),M=Math.abs(O*Math.sin(z)/Math.cos(z))):M=g;const B=m.x+b.nx*O+-b.ny*M*E,w=m.y+b.ny*O+b.nx*M*E,H=Math.atan2(S.ny,S.nx)+Math.PI/2*E,J=Math.atan2(b.ny,b.nx)-Math.PI/2*E;d===0&&i.moveTo(B+Math.cos(H)*M,w+Math.sin(H)*M),i.arc(B,w,M,H,J,R),f=m}}function DA(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 M=Math.min(A/2,v);E=f(g,S,M/A)}const R=o(b,g);let z;if(R<1e-4)z=g;else{const M=Math.min(R/2,v);z=f(g,b,M/R)}m===0?i.moveTo(E.x,E.y):i.lineTo(E.x,E.y),i.quadraticCurveTo(g.x,g.y,z.x,z.y,s)}}const OA=new un;class NA{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 p_(m,t,n,s,o,f,d),this}arcTo(t,n,s,o,f){this._ensurePoly();const d=this._currentPoly.points;return CA(d,t,n,s,o,f),this}arcToSvg(t,n,s,o,f,d,m){const g=this._currentPoly.points;return RA(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 m_(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 TA(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 Og(t,n,s),o),this}poly(t,n,s){const o=new zh(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,R=t+s*Math.cos(E),z=n+s*Math.sin(E),M=E+Math.PI+b,O=E-Math.PI-b,B=R+f*Math.cos(M),w=z+f*Math.sin(M),H=R+f*Math.cos(O),J=z+f*Math.sin(O);A===0?this.moveTo(B,w):this.lineTo(B,w),this.quadraticCurveTo(R,z,H,J,m)}return this.closePath()}roundShape(t,n,s=!1,o){return t.length<3?this:(s?DA(this,t,n,o):zA(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 Ng(t,n,s,o),f),this}roundRect(t,n,s,o,f,d){return this.drawShape(new Ug(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 zh,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 zh,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(OA);o.transform?t.addRect(f,o.transform):t.addRect(f)}return t}}class qs{constructor(t,n=!1){this.instructions=[],this.uid=en("graphicsPath"),this._dirty=!0,this.checkForHoles=n,typeof t=="string"?tC(t,this):this.instructions=(t==null?void 0:t.slice())??[]}get shapePath(){return this._shapePath||(this._shapePath=new NA(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(ua.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(ua.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,R=A*S+g;b.push(t+E*Math.cos(R),n+E*Math.sin(R))}return this.poly(b,!0,m),this}clone(t=!1){const n=new qs;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,R=0,z=0;for(let M=0;M<this.instructions.length;M++){const O=this.instructions[M],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],R=B[0],z=B[1],B[0]=n*R+o*z,B[1]=s*R+f*z,B[5]=n*g+o*v+d,B[6]=s*g+f*v+m;break;case"circle":B[4]=bh(B[3],t);break;case"rect":B[4]=bh(B[4],t);break;case"ellipse":B[8]=bh(B[8],t);break;case"roundRect":B[5]=bh(B[5],t);break;case"addPath":B[0].transform(t);break;case"poly":B[2]=bh(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 bh(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 UA(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]=BA(d);break;case"radialgradient":t.defs[d.id]=wA();break}}}}function BA(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 Ls(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 wA(i){return Da("[SVG Parser] Radial gradients are not yet supported"),new Ls(0,0,1,0)}function l1(i){const t=i.match(/url\s*\(\s*['"]?\s*#([^'"\s)]+)\s*['"]?\s*\)/i);return t?t[1]:""}const s1={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 y_(i,t){const n=i.getAttribute("style"),s={},o={},f={strokeStyle:s,fillStyle:o,useFill:!1,useStroke:!1};for(const d in s1){const m=i.getAttribute(d);m&&u1(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(":");s1[v]&&u1(t,f,v,S.trim())}}return{strokeStyle:f.useStroke?s:null,fillStyle:f.useFill?o:null,useFill:f.useFill,useStroke:f.useStroke}}function u1(i,t,n,s){switch(n){case"stroke":if(s!=="none"){if(s.startsWith("url(")){const o=l1(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=l1(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 HA(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 GA(i){return i.split(/(?=[Mm])/).filter(s=>s.trim().length>0)}function jA(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 r1(i,t){const n=new qs(i,!1);for(const s of n.instructions)t.instructions.push(s)}function qA(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 qs};UA(i,n);const s=i.children,{fillStyle:o,strokeStyle:f}=y_(i,n);for(let d=0;d<s.length;d++){const m=s[d];m.nodeName.toLowerCase()!=="defs"&&g_(m,n,o,f)}return t}function g_(i,t,n,s){const o=i.children,{fillStyle:f,strokeStyle:d}=y_(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,R,z,M,O,B,w,H,J,Q,Z,gt;switch(i.nodeName.toLowerCase()){case"path":{J=i.getAttribute("d");const ct=i.getAttribute("fill-rule"),ft=GA(J),ht=ct==="evenodd",vt=ft.length>1;if(ht&&vt){const xt=ft.map(U=>({path:U,area:jA(U)}));if(xt.sort((U,X)=>X.area-U.area),ft.length>3||!HA(xt))for(let U=0;U<xt.length;U++){const X=xt[U],it=U===0;t.context.beginPath();const nt=new qs(void 0,!0);r1(X.path,nt),t.context.path(nt),it?(n&&t.context.fill(n),s&&t.context.stroke(s)):t.context.cut()}else for(let U=0;U<xt.length;U++){const X=xt[U],it=U%2===1;t.context.beginPath();const nt=new qs(void 0,!0);r1(X.path,nt),t.context.path(nt),it?t.context.cut():(n&&t.context.fill(n),s&&t.context.stroke(s))}}else{const xt=ct?ct==="evenodd":!0;Q=new qs(J,xt),t.context.path(Q),n&&t.context.fill(n),s&&t.context.stroke(s)}break}case"circle":R=$e(i,"cx",0),z=$e(i,"cy",0),M=$e(i,"r",0),t.context.ellipse(R,z,M,M),n&&t.context.fill(n),s&&t.context.stroke(s);break;case"rect":g=$e(i,"x",0),v=$e(i,"y",0),Z=$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,Z,gt,O||B):t.context.rect(g,v,Z,gt),n&&t.context.fill(n),s&&t.context.stroke(s);break;case"ellipse":R=$e(i,"cx",0),z=$e(i,"cy",0),O=$e(i,"rx",0),B=$e(i,"ry",0),t.context.beginPath(),t.context.ellipse(R,z,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":H=i.getAttribute("points"),w=H.match(/-?\d+/g).map(ct=>parseInt(ct,10)),t.context.poly(w,!0),n&&t.context.fill(n),s&&t.context.stroke(s);break;case"polyline":H=i.getAttribute("points"),w=H.match(/-?\d+/g).map(ct=>parseInt(ct,10)),t.context.poly(w,!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++)g_(o[ct],t,n,s)}const o1={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 fp{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=o1[n].addressModeU,t.source.style.addressModeV=o1[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 YA(i){return Sn.isColorLike(i)}function c1(i){return i instanceof fp}function f1(i){return i instanceof Ls}function LA(i){return i instanceof Ee}function XA(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 VA(i,t,n){return i.texture=t,{...n,...i}}function h1(i,t,n){return i.fill=t,i.color=16777215,i.texture=t.texture,i.matrix=t.transform,{...n,...i}}function d1(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 QA(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 YA(i)?XA(n,i,t):LA(i)?VA(n,i,t):c1(i)?h1(n,i,t):f1(i)?d1(n,i,t):s.fill&&c1(s.fill)?h1(s,s.fill,t):s.fill&&f1(s.fill)?d1(s,s.fill,t):QA(s,t)}function Wm(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 ZA(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],R=d[v],z=d[v+1],M=d[b],O=d[b+1],B=A-R,w=E-z,H=M-R,J=O-z,Q=B*B+w*w,Z=H*H+J*J;if(Q<1e-12||Z<1e-12)continue;let ft=(B*H+w*J)/Math.sqrt(Q*Z);ft<-1?ft=-1:ft>1&&(ft=1);const ht=Math.sqrt((1-ft)*.5);if(ht<1e-6)continue;const vt=Math.min(1/ht,t);vt>n&&(n=vt)}}return n}const KA=new ua,m1=new ne,jg=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 qs,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=Wm(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 qs,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(ua.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=Wm(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++,qA(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):(m1.set(t,n,s,o,f,d),this._transform.append(m1),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*=ZA(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,R=E?E.applyInverse(t,KA):t;if(d.action==="fill")s=A.contains(R.x,R.y);else{const M=v;s=A.strokeContains(R.x,R.y,M.width,M.alignment)}const z=m.hole;if(z){const M=(o=z.shapePath)==null?void 0:o.shapePrimitives;if(M)for(let O=0;O<M.length;O++)M[O].shape.contains(R.x,R.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}};jg.defaultFillStyle={color:16777215,alpha:1,texture:Ee.WHITE,matrix:null,fill:null,textureSpace:"local"};jg.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=jg;class kA{constructor(){this.isBatchable=!1}reset(){this.isBatchable=!1,this.context=null,this.graphicsData&&(this.graphicsData.destroy(),this.graphicsData=null)}destroy(){this.reset()}}class JA{constructor(){this.instructions=new Cg}init(){this.instructions.reset()}destroy(){this.instructions.destroy(),this.instructions=null}}const qg=class cg{constructor(t){this._renderer=t,this._managedContexts=new Qh({renderer:t,type:"resource",name:"graphicsContext"})}init(t){cg.defaultOptions.bezierSmoothness=(t==null?void 0:t.bezierSmoothness)??cg.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 JA,s=this.getGpuContext(t);return s.graphicsData=n,n.init(),n}_initContext(t){const n=new kA;return n.context=t,t._gpuData[this._renderer.uid]=n,this._managedContexts.add(t),n}destroy(){this._managedContexts.destroy(),this._renderer=null}};qg.extension={type:[kt.CanvasSystem],name:"graphicsContext"};qg.defaultOptions={bezierSmoothness:.5};let PA=qg;class v_{constructor(t,n){this.state=zg.for2d(),this.renderer=t,this._adaptor=n,this.renderer.runners.contextChange.add(this),this._managedGraphics=new Qh({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}}v_.extension={type:[kt.CanvasPipes],name:"graphics"};function WA(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 FA{constructor(){this.batches=[],this.batched=!1}destroy(){this.batches.forEach(t=>{Qa.return(t)}),this.batches.length=0}}class x_{constructor(t,n){this.state=zg.for2d(),this.renderer=t,this._adaptor=n,this.renderer.runners.contextChange.add(this),this._managedGraphics=new Qh({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,WA(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 FA;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(Bg);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}}x_.extension={type:[kt.WebGLPipes,kt.WebGPUPipes],name:"graphics"};ke.add(v_);ke.add(x_);ke.add(PA);ke.add(Gg);class fl extends Ag{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 IA extends Ag{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 $A(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 t3{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=Cc(t),n=Cc(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 fg=new t3;Xh.register(fg);let Yr=null,Gs=null;function e3(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=Cc(i),Yr.height=Cc(t))}function p1(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 y1(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 n3(...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(e3(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&&p1(g,o,S);)++S;if(S===f)return un.EMPTY;for(;p1(g,o,A);)--A;for(;y1(g,o,v,S,A);)++v;for(;y1(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 a3{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 i3(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 a3(i,t,n)}function __(i){return!!i.tagStyles&&Object.keys(i.tagStyles).length>0}function S_(i){return i.includes("<")}function l3(i,t){return i.clone().assign(t)}function s3(i,t){const n=[],s=t.tagStyles;if(!__(t)||!S_(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=l3(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 u3=[10,13],r3=new Set(u3),o3=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288],c3=new Set(o3),f3=[9,32];new Set(f3);const h3=[45,8208,8211,8212,173],d3=new Set(h3),m3=/(\r\n|\r|\n)/,p3=/(?:\r\n|\r|\n)/;function Fm(i){return typeof i!="string"?!1:r3.has(i.charCodeAt(0))}function Ui(i,t){return typeof i!="string"?!1:c3.has(i.charCodeAt(0))}function y3(i){return typeof i!="string"?!1:d3.has(i.charCodeAt(0))}function b_(i){return i==="normal"||i==="pre-line"}function T_(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 E_(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)||Fm(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),y3(o)&&f&&!Ui(f)&&!Fm(f)&&(t.push(n.join("")),n.length=0)}return n.length>0&&t.push(n.join("")),t}function C_(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 g3=/\r\n|\r|\n/g;function v3(i,t,n,s,o,f,d,m){var Dt,U;const g=s3(i,t);if(T_(t.whiteSpace))for(let X=0;X<g.length;X++){const it=g[X];g[X]={text:it.text.replace(g3," "),style:it.style}}const S=[];let b=[];for(const X of g){const it=X.text.split(m3);for(let nt=0;nt<it.length;nt++){const mt=it[nt];mt===`\r
|
|
307
|
+
`||mt==="\r"||mt===`
|
|
308
|
+
`?(S.push(b),b=[]):mt.length>0&&b.push({text:mt,style:X.style})}}(b.length>0||S.length===0)&&S.push(b);const A=n?x3(S,t,s,o,d,m):S,E=[],R=[],z=[],M=[],O=[];let B=0;const w=t._fontString,H=f(w);H.fontSize===0&&(H.fontSize=t.fontSize,H.ascent=t.fontSize);let J="",Q=!!t.dropShadow,Z=((Dt=t._stroke)==null?void 0:Dt.width)||0;for(const X of A){let it=0,nt=H.ascent,mt=H.descent,Y="";for(const st of X){const pt=st.style._fontString,Tt=f(pt);pt!==J&&(s.font=pt,J=pt);const Ot=o(st.text,st.style.letterSpacing,s);it+=Ot,nt=Math.max(nt,Tt.ascent),mt=Math.max(mt,Tt.descent),Y+=st.text;const Ut=((U=st.style._stroke)==null?void 0:U.width)||0;Ut>Z&&(Z=Ut),!Q&&st.style.dropShadow&&(Q=!0)}X.length===0&&(nt=H.ascent,mt=H.descent),E.push(it),R.push(nt),z.push(mt),O.push(Y);const tt=t.lineHeight||nt+mt;M.push(tt+t.leading),B=Math.max(B,it)}const gt=Z,ht=(n&&t.align!=="left"?Math.max(B,t.wordWrapWidth):B)+gt+(t.dropShadow?t.dropShadow.distance:0);let vt=0;for(let X=0;X<M.length;X++)vt+=M[X];vt=Math.max(vt,M[0]+gt);const _t=vt+(t.dropShadow?t.dropShadow.distance:0),xt=t.lineHeight||H.fontSize;return{width:ht,height:_t,lines:O,lineWidths:E,lineHeight:xt+t.leading,maxLineWidth:B,fontProperties:H,runsByLine:A,lineAscents:R,lineDescents:z,lineHeights:M,hasDropShadow:Q}}function x3(i,t,n,s,o,f){var M;const{letterSpacing:d,whiteSpace:m,wordWrapWidth:g,breakWords:v}=t,S=b_(m),b=g+d,A={};let E="";const R=(O,B)=>{const w=`${O}|${B.styleKey}`;let H=A[w];if(H===void 0){const J=B._fontString;J!==E&&(n.font=J,E=J),H=s(O,B.letterSpacing,n)+B.letterSpacing,A[w]=H}return H},z=[];for(const O of i){const B=_3(O),w=z.length,H=vt=>{let _t=0,xt=vt;do{const{token:Dt,style:U}=B[xt];_t+=R(Dt,U),xt++}while(xt<B.length&&B[xt].continuesFromPrevious);return _t},J=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=[],Z=0,gt=!S,ct=null;const ft=()=>{ct&&ct.text.length>0&&Q.push(ct),ct=null},ht=()=>{if(ft(),Q.length>0){const vt=Q[Q.length-1];vt.text=Hs(vt.text),vt.text.length===0&&Q.pop()}z.push(Q),Q=[],Z=0,gt=!1};for(let vt=0;vt<B.length;vt++){const{token:_t,style:xt,continuesFromPrevious:Dt}=B[vt],U=R(_t,xt);if(S){const nt=Ui(_t),mt=(ct==null?void 0:ct.text[ct.text.length-1])??((M=Q[Q.length-1])==null?void 0:M.text.slice(-1))??"",Y=mt?Ui(mt):!1;if(nt&&Y)continue}const X=!Dt,it=X?H(vt):U;if(it>b&&X)if(Z>0&&ht(),v){const nt=J(vt);for(let mt=0;mt<nt.length;mt++){const Y=nt[mt].token,tt=nt[mt].style,st=C_(Y,v,f,o);for(const pt of st){const Tt=R(pt,tt);Tt+Z>b&&ht(),!ct||ct.style!==tt?(ft(),ct={text:pt,style:tt}):ct.text+=pt,Z+=Tt}}vt+=nt.length-1}else{const nt=J(vt);ft(),z.push(nt.map(mt=>({text:mt.token,style:mt.style}))),gt=!1,vt+=nt.length-1}else if(it+Z>b&&X){if(Ui(_t)){gt=!1;continue}ht(),ct={text:_t,style:xt},Z=U}else if(Dt&&!v)!ct||ct.style!==xt?(ft(),ct={text:_t,style:xt}):ct.text+=_t,Z+=U;else{const nt=Ui(_t);if(Z===0&&nt&&!gt)continue;!ct||ct.style!==xt?(ft(),ct={text:_t,style:xt}):ct.text+=_t,Z+=U}}if(ft(),Q.length>0){const vt=Q[Q.length-1];vt.text=Hs(vt.text),vt.text.length===0&&Q.pop()}(Q.length>0||z.length===w)&&z.push(Q)}return z}function _3(i){const t=[];let n=!1;for(const s of i){const o=E_(s.text);let f=!0;for(const d of o){const m=Ui(d)||Fm(d),g=f&&n&&!m;t.push({token:d,style:s.style,continuesFromPrevious:g}),n=!m,f=!1}}return t}const S3={willReadFrequently:!0};function g1(i,t,n,s,o){let f=n[i];return typeof f!="number"&&(f=o(i,t,s)+t,n[i]=f),f}function b3(i,t,n,s,o,f,d){const m=n.getContext("2d",S3);m.font=t._fontString;let g=0,v="";const S=[],b=Object.create(null),{letterSpacing:A,whiteSpace:E}=t,R=b_(E),z=T_(E);let M=!R;const O=t.wordWrapWidth+A,B=E_(i);for(let H=0;H<B.length;H++){let J=B[H];if(Fm(J)){if(!z){S.push(Hs(v)),M=!R,v="",g=0;continue}J=" "}if(R){const Z=Ui(J),gt=Ui(v[v.length-1]);if(Z&>)continue}const Q=g1(J,A,b,m,s);if(Q>O)if(v!==""&&(S.push(Hs(v)),v="",g=0),o(J,t.breakWords)){const Z=C_(J,t.breakWords,d,f);for(const gt of Z){const ct=g1(gt,A,b,m,s);ct+g>O&&(S.push(Hs(v)),M=!1,v="",g=0),v+=gt,g+=ct}}else v.length>0&&(S.push(Hs(v)),v="",g=0),S.push(Hs(J)),M=!1,v="",g=0;else Q+g>O&&(M=!1,S.push(Hs(v)),v="",g=0),(v.length>0||!Ui(J)||M)&&(v+=J,g+=Q)}const w=Hs(v);return w.length>0&&S.push(w),S.join(`
|
|
309
|
+
`)}const v1={willReadFrequently:!0},Xs=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 J;const f=`${t}-${n.styleKey}-wordWrap-${o}`;if(jt._measurementCache.has(f))return jt._measurementCache.get(f);if(__(n)&&S_(t)){const Q=v3(t,n,o,jt._context,jt._measureText,jt.measureFont,jt.canBreakChars,jt.wordWrapSplit),Z=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,Z),Z}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(p3),A=new Array(b.length);let E=0;for(let Q=0;Q<b.length;Q++){const Z=jt._measureText(b[Q],n.letterSpacing,v);A[Q]=Z,E=Math.max(E,Z)}const R=((J=n._stroke)==null?void 0:J.width)??0,z=n.lineHeight||g.fontSize,M=jt._getAlignWidth(E,n,o),O=jt._adjustWidthForStyle(M,n),B=Math.max(z,g.fontSize+R)+(b.length-1)*(z+n.leading),w=jt._adjustHeightForStyle(B,n),H=new jt(t,n,O,w,b,A,z+n.leading,E,g);return jt._measurementCache.set(f,H),H}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 b3(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",v1);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",v1)),jt.__context}};Xs.METRICS_STRING="|ÉqÅ";Xs.BASELINE_SYMBOL="M";Xs.BASELINE_MULTIPLIER=1.4;Xs.HEIGHT_MULTIPLIER=2;Xs.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]})();Xs.experimentalLetterSpacing=!1;Xs._fonts={};Xs._measurementCache=i3(1e3);let Bu=Xs;const T3=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function hg(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)&&!T3.includes(o)&&(o=`"${o}"`),n[s]=o}return`${i.fontStyle} ${i.fontVariant} ${i.fontWeight} ${t} ${n.join(",")}`}const x1=1e5;function qm(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 fp){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 Ls){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:R}=d;b=t.createLinearGradient(E.x*v+o,E.y*S+f,R.x*v+o,R.y*S+f),A=Math.abs(R.x-E.x)<Math.abs((R.y-E.y)*.1)}else{const{center:E,innerRadius:R,outerCenter:z,outerRadius:M}=d;b=t.createRadialGradient(E.x*v+o,E.y*S+f,R*v,z.x*v+o,z.y*S+f,M*v)}if(A&&g&&n){const E=n.lineHeight/S;for(let R=0;R<n.lines.length;R++){const z=(R*n.lineHeight+s/2)/S;d.colorStops.forEach(M=>{let O=z+M.offset*E;O=Math.max(0,Math.min(1,O)),b.addColorStop(Math.floor(O*x1)/x1,Sn.shared.setValue(M.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 _1=new un;function gc(i){let t=0;for(let n=0;n<i.length;n++)i.charCodeAt(n)===32&&t++;return t}class E3{getCanvasAndContext(t){const{text:n,style:s,resolution:o=1}=t,f=s._getFinalPadding(),d=Bu.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=fg.getOptimalCanvasAndContext(m,g);this._renderTextToCanvas(s,f,o,v,d);const S=s.trim?n3({canvas:v.canvas,width:m,height:g,resolution:1,output:_1}):_1.set(0,0,m,g);return{canvasAndContext:v,frame:S}}returnCanvasAndContext(t){fg.returnCanvasAndContext(t)}_renderTextToCanvas(t,n,s,o,f){var Q,Z,gt;if(f.runsByLine&&f.runsByLine.length>0){this._renderTaggedTextToCanvas(f,t,n,s,o);return}const{canvas:d,context:m}=o,g=hg(t),v=f.lines,S=f.lineHeight,b=f.lineWidths,A=f.maxLineWidth,E=f.fontProperties,R=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 z,M;const O=t.dropShadow?2:1,B=t.wordWrap?t.wordWrapWidth:A,H=(((Z=t._stroke)==null?void 0:Z.width)??0)/2;let J=(S-E.fontSize)/2;S-E.fontSize<0&&(J=0);for(let ct=0;ct<O;++ct){const ft=t.dropShadow&&ct===0,ht=ft?Math.ceil(Math.max(1,R)+n*2):0,vt=ht*s;if(ft)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,H,(xt==null?void 0:xt.x)??0,(xt==null?void 0:xt.y)??0)}else xt?this._setFillAndStrokeStyles(m,t,f,n,H,xt.x,xt.y):this._setFillAndStrokeStyles(m,t,f,n,H);m.shadowColor="rgba(0,0,0,0)"}for(let _t=0;_t<v.length;_t++){z=H,M=H+_t*S+E.ascent+J,z+=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,z+n,M+n-ht,!0,xt),t._fill!==void 0&&this._drawLetterSpacing(v[_t],t,o,z+n,M+n-ht,!1,xt)}}}_renderTaggedTextToCanvas(t,n,s,o,f){var H,J,Q;const{canvas:d,context:m}=f,{runsByLine:g,lineWidths:v,maxLineWidth:S,lineAscents:b,lineHeights:A,hasDropShadow:E}=t,R=d.height;m.resetTransform(),m.scale(o,o),m.textBaseline=n.textBaseline;const z=E?2:1,M=n.wordWrap?n.wordWrapWidth:S;let O=((H=n._stroke)==null?void 0:H.width)??0;for(const Z of g)for(const gt of Z){const ct=((J=gt.style._stroke)==null?void 0:J.width)??0;ct>O&&(O=ct)}const B=O/2,w=[];for(let Z=0;Z<g.length;Z++){const gt=g[Z],ct=[];for(const ft of gt){const ht=hg(ft.style);m.font=ht,ct.push({width:Bu._measureText(ft.text,ft.style.letterSpacing,m),font:ht})}w.push(ct)}for(let Z=0;Z<z;++Z){const gt=E&&Z===0,ct=gt?Math.ceil(Math.max(1,R)+s*2):0,ft=ct*o;gt||(m.shadowColor="rgba(0,0,0,0)");let ht=B;for(let vt=0;vt<g.length;vt++){const _t=g[vt],xt=v[vt],Dt=b[vt],U=A[vt],X=w[vt];let it=B;it+=this._getAlignmentOffset(xt,M,n.align);let nt=0;if(n.align==="justify"&&n.wordWrap&&vt<g.length-1){let tt=0;for(const st of _t)tt+=gc(st.text);tt>0&&(nt=(M-xt)/tt)}const mt=ht+Dt;let Y=it+s;for(let tt=0;tt<_t.length;tt++){const st=_t[tt],{width:pt,font:Tt}=X[tt];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,ft);else{const re=gc(st.text);Y+=pt+re*nt;continue}else{const re=Bu.measureFont(Tt),ue=st.style.lineHeight||re.fontSize,oa={width:pt,height:ue,lineHeight:ue,lines:[st.text]};m.strokeStyle=qm(Ut,m,oa,s*2,Y-s,ht)}this._drawLetterSpacing(st.text,st.style,f,Y,mt+s-ct,!0,nt)}const Ot=gc(st.text);Y+=pt+Ot*nt}Y=it+s;for(let tt=0;tt<_t.length;tt++){const st=_t[tt],{width:pt,font:Tt}=X[tt];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,ft);else{const Ut=gc(st.text);Y+=pt+Ut*nt;continue}else{const Ut=Bu.measureFont(Tt),re=st.style.lineHeight||Ut.fontSize,ue={width:pt,height:re,lineHeight:re,lines:[st.text]};m.fillStyle=qm(st.style._fill,m,ue,s*2,Y-s,ht)}this._drawLetterSpacing(st.text,st.style,f,Y,mt+s-ct,!1,nt)}const Ot=gc(st.text);Y+=pt+Ot*nt}ht+=U}}}_setFillAndStrokeStyles(t,n,s,o,f,d=0,m=0){var g;if(t.fillStyle=n._fill?qm(n._fill,t,s,o*2,d,m):null,(g=n._stroke)!=null&&g.width){const v=f+o*2;t.strokeStyle=qm(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(Bu.experimentalLetterSpacingSupported&&(Bu.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 z=t.split(" ");let M=o;const O=g.measureText(" ").width;for(let B=0;B<z.length;B++)d?g.strokeText(z[B],M,f):g.fillText(z[B],M,f),M+=g.measureText(z[B]).width+O+m;return}let b=o;const A=Bu.graphemeSegmenter(t);let E=g.measureText(t).width,R=0;for(let z=0;z<A.length;++z){const M=A[z];d?g.strokeText(M,b,f):g.fillText(M,b,f);let O="";for(let B=z+1;B<A.length;++B)O+=A[B];R=g.measureText(O).width,b+=E-R+v,M===" "&&(b+=m),E=R}}}const Tc=new E3,Yg=class Kr extends $l{constructor(t={}){super(),this.uid=en("textStyle"),this._tick=0,this._cachedFontString=null,C3(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=Wm({...this._originalStroke},ol.defaultStrokeStyle)})),this._stroke=Wm(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=hg(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 Ls||t instanceof fp)}};Yg.defaultDropShadow={alpha:1,angle:Math.PI/6,blur:0,color:"black",distance:5};Yg.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=Yg;function C3(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 Ls||n instanceof fp)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 Ls({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 A3(i,t){const{texture:n,bounds:s}=i,o=t._style._getFinalPadding();fx(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 M3{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 R3 extends M3{}class A_{constructor(t){this._renderer=t,t.runners.resolutionChange.add(this),this._managedTexts=new Qh({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,A3(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 R3;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}}A_.extension={type:[kt.WebGLPipes,kt.WebGPUPipes,kt.CanvasPipes],name:"text"};const z3=new Bi;function D3(i,t,n,s,o=!1){const f=z3;f.minX=0,f.minY=0,f.maxX=i.width/s|0,f.maxY=i.height/s|0;const d=up.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 M_{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 Ac||(t.textureStyle=new Ac(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=D3(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",up.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 R_ extends M_{constructor(t){super(t,!0)}}R_.extension={type:[kt.CanvasSystem],name:"canvasText"};class z_ extends M_{constructor(t){super(t,!1)}}z_.extension={type:[kt.WebGLSystem,kt.WebGPUSystem],name:"canvasText"};ke.add(R_);ke.add(z_);ke.add(A_);class D_ extends IA{constructor(...t){const n=$A(t,"Text");super(n,Pr),this.renderPipeId="text",n.textureStyle&&(this.textureStyle=n.textureStyle instanceof Ac?n.textureStyle:new Ac(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=Bu.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(nT,aT);var Ny={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 S1;function O3(){return S1||(S1=1,ws.ConcurrentRoot=1,ws.ContinuousEventPriority=8,ws.DefaultEventPriority=32,ws.DiscreteEventPriority=2,ws.IdleEventPriority=268435456,ws.LegacyRoot=0,ws.NoEventPriority=0),ws}var b1;function N3(){return b1||(b1=1,Ny.exports=O3()),Ny.exports}var Ec=N3();const Lg=L.createContext({}),U3=Lg.Provider;Lg.Consumer;function O_(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 T1(i,...t){}function N_(i,t={}){const n=i;return n.__pixireact=Object.assign({filters:[],parent:null,root:null,type:""},t),n}var B3="0.0.0-development",w3={version:B3};function H3(){}function U_(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 Uy(i,t){t&&(t instanceof ra?i.addChild(t):t instanceof Wr&&U_(i,t))}function G3(){}function j3(){return!1}const dg=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"}),Im=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 B_(i){return Array.isArray(i)}function w_(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(X3(i)||Y3(i))return i===t;const d=L3(i);if(d&&o==="reference")return i===t;const m=B_(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(!w_(i[g],t[g],{strict:f,objects:"reference"}))return!1}else for(g in v)if(i[g]!==t[g])return!1;if(H_(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 q3(i){return i===null}function Y3(i){return typeof i=="number"}function L3(i){return!(i!==Object(i)||B_(i)||typeof i=="function")}function X3(i){return typeof i=="string"}function H_(i){return i===void 0}const V3=Object.freeze(["children","key","ref"]);function Q3(i,t=[]){const n={};return Object.entries(i).reduce((s,[o,f])=>(t.includes(o)||(s[o]=f),s),n)}function mg(i,t=[]){return Q3(i,V3.concat(t))}const Z3="__default";function G_(i,t={},n=!1){const s=mg(i),o=mg(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,`${Z3}remove`]),g+=1}}return f.forEach(([m,g])=>{if(w_(g,o[m]))return;if(m in Im){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 K3(i){const t=i;return!(!t||!t.changes)}const k3="__default",E1=new Map,C1={};function A1(i,t){if(i){const n=i[t];if(!H_(n)&&!q3(n))return n}return i}function j_(i,t){const{__pixireact:n={},...s}=i;let o;K3(t)?o=t:o=G_(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,R=E[v];if(v==="draw"&&typeof S=="function"&&(i instanceof fl?S(i):(g=!0,T1("warn",`The \`draw\` prop was used on a \`${n.type}\` component, but it's only valid on \`graphics\` components.`))),v in dg){const z=v;g=!0,C1[v]||(C1[v]=!0,T1("warn",`Event names must be pascal case; instead of \`${v}\`, you probably want \`${dg[z]}\`.`))}if(!g){if(A.length&&(R=A.reduce(A1,E),!(R&&R.set))){const[z,...M]=A.reverse();E=M.reverse().reduce(A1,E),v=z}if(S===`${k3}remove`)if(E instanceof ra){let z=E1.get(E.constructor);z||(z=E.constructor,z=new z,E1.set(E.constructor,z)),S=z[v]}else S=0;if(b&&n){const M=Im[v];S?E[M]=S:delete E[M]}else O_(E,v)||(E[v]=S)}d+=1}return i}function J3(i,t,n,s){const{children:o,...f}=s,{children:d,...m}=n,g=G_(f,m,!0);return g.changes.length?g:null}function P3(i,t,n,s){const o=J3(i,t,n,s);o&&j_(i,o)}const W3=Object.freeze([...Object.keys(dg),"draw"]),pg={};function F3(i){const t=i.charAt(0),n=i.substring(1);return`${t.toUpperCase()}${n}`}function I3(i,t){return t.toLowerCase()}function $3(i){let t=i;return i.startsWith("pixi")&&(t=i.replace(/^pixi([A-Z])/,I3)),t}function tM(i,t,n){const s=$3(i),o=F3(s);if(!(o in pg))throw new Error(`${o} is not part of the PIXI namespace! Did you forget to extend?`);const f=pg[o],d=mg(t,W3);Object.entries(t).forEach(([g,v])=>{if(g in Im){const S=Im[g];d[S]=v}});const m=N_(new f(d),{root:n,type:s});return j_(m,t),m}var By={exports:{}},wy={exports:{}},Hy={exports:{}},Gy={};/**
|
|
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 M1;function eM(){return M1||(M1=1,(function(i){function t(U,X){var it=U.length;U.push(X);t:for(;0<it;){var nt=it-1>>>1,mt=U[nt];if(0<o(mt,X))U[nt]=X,U[it]=mt,it=nt;else break t}}function n(U){return U.length===0?null:U[0]}function s(U){if(U.length===0)return null;var X=U[0],it=U.pop();if(it!==X){U[0]=it;t:for(var nt=0,mt=U.length,Y=mt>>>1;nt<Y;){var tt=2*(nt+1)-1,st=U[tt],pt=tt+1,Tt=U[pt];if(0>o(st,it))pt<mt&&0>o(Tt,st)?(U[nt]=Tt,U[pt]=it,nt=pt):(U[nt]=st,U[tt]=it,nt=tt);else if(pt<mt&&0>o(Tt,it))U[nt]=Tt,U[pt]=it,nt=pt;else break t}}return X}function o(U,X){var it=U.sortIndex-X.sortIndex;return it!==0?it:U.id-X.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,R=!1,z=!1,M=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function w(U){for(var X=n(v);X!==null;){if(X.callback===null)s(v);else if(X.startTime<=U)s(v),X.sortIndex=X.expirationTime,t(g,X);else break;X=n(v)}}function H(U){if(z=!1,w(U),!R)if(n(g)!==null)R=!0,xt();else{var X=n(v);X!==null&&Dt(H,X.startTime-U)}}var J=!1,Q=-1,Z=5,gt=-1;function ct(){return!(i.unstable_now()-gt<Z)}function ft(){if(J){var U=i.unstable_now();gt=U;var X=!0;try{t:{R=!1,z&&(z=!1,O(Q),Q=-1),E=!0;var it=A;try{e:{for(w(U),b=n(g);b!==null&&!(b.expirationTime>U&&ct());){var nt=b.callback;if(typeof nt=="function"){b.callback=null,A=b.priorityLevel;var mt=nt(b.expirationTime<=U);if(U=i.unstable_now(),typeof mt=="function"){b.callback=mt,w(U),X=!0;break e}b===n(g)&&s(g),w(U)}else s(g);b=n(g)}if(b!==null)X=!0;else{var Y=n(v);Y!==null&&Dt(H,Y.startTime-U),X=!1}}break t}finally{b=null,A=it,E=!1}X=void 0}}finally{X?ht():J=!1}}}var ht;if(typeof B=="function")ht=function(){B(ft)};else if(typeof MessageChannel<"u"){var vt=new MessageChannel,_t=vt.port2;vt.port1.onmessage=ft,ht=function(){_t.postMessage(null)}}else ht=function(){M(ft,0)};function xt(){J||(J=!0,ht())}function Dt(U,X){Q=M(function(){U(i.unstable_now())},X)}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(U){U.callback=null},i.unstable_continueExecution=function(){R||E||(R=!0,xt())},i.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<U?Math.floor(1e3/U):5},i.unstable_getCurrentPriorityLevel=function(){return A},i.unstable_getFirstCallbackNode=function(){return n(g)},i.unstable_next=function(U){switch(A){case 1:case 2:case 3:var X=3;break;default:X=A}var it=A;A=X;try{return U()}finally{A=it}},i.unstable_pauseExecution=function(){},i.unstable_requestPaint=function(){},i.unstable_runWithPriority=function(U,X){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var it=A;A=U;try{return X()}finally{A=it}},i.unstable_scheduleCallback=function(U,X,it){var nt=i.unstable_now();switch(typeof it=="object"&&it!==null?(it=it.delay,it=typeof it=="number"&&0<it?nt+it:nt):it=nt,U){case 1:var mt=-1;break;case 2:mt=250;break;case 5:mt=1073741823;break;case 4:mt=1e4;break;default:mt=5e3}return mt=it+mt,U={id:S++,callback:X,priorityLevel:U,startTime:it,expirationTime:mt,sortIndex:-1},it>nt?(U.sortIndex=it,t(v,U),n(g)===null&&U===n(v)&&(z?(O(Q),Q=-1):z=!0,Dt(H,it-nt))):(U.sortIndex=mt,t(g,U),R||E||(R=!0,xt())),U},i.unstable_shouldYield=ct,i.unstable_wrapCallback=function(U){var X=A;return function(){var it=A;A=X;try{return U.apply(this,arguments)}finally{A=it}}}})(Gy)),Gy}var R1;function nM(){return R1||(R1=1,Hy.exports=eM()),Hy.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 z1;function aM(){return z1||(z1=1,(function(i){i.exports=function(t){function n(l,u,h,y){return new mf(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=Sf&&l[Sf]||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 cu:return"Fragment";case Fa:return"Portal";case _f:return"Profiler";case xf: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 fu: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]||"",bf=-1<h.stack.indexOf(`
|
|
334
|
+
at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
335
|
+
`+Ho+l+bf}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],G=T[1];if(N&&G){var P=N.split(`
|
|
336
|
+
`),ut=G.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,G=_.child;G;){if(G===h){N=!0,h=_,y=T;break}if(G===y){N=!0,y=_,h=T;break}G=G.sibling}if(!N){for(G=T.child;G;){if(G===h){N=!0,h=T,y=_;break}if(G===y){N=!0,y=T,h=_;break}G=G.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 R(l){var u=l.tag;if(u===5||u===26||u===27||u===6)return l;for(l=l.child;l!==null;){if(u=R(l),u!==null)return u;l=l.sibling}return null}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(l.tag!==4&&(u=z(l),u!==null))return u;l=l.sibling}return null}function M(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 w(l){return l>>>=0,l===0?32:31-(Cr(l)/Fd|0)|0}function H(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 J(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 G=h&134217727;return G!==0?(h=G&~_,h!==0?y=H(h):(T&=G,T!==0?y=H(T):l||(N=G&~N,N!==0&&(y=H(N))))):(G=h&~_,G!==0?y=H(G):T!==0?y=H(T):l||(N=h&~N,N!==0&&(y=H(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 Z(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=pu;return pu<<=1,(pu&4194176)===0&&(pu=128),l}function ct(){var l=Ar;return Ar<<=1,(Ar&62914560)===0&&(Ar=4194304),l}function ft(l){for(var u=[],h=0;31>h;h++)u.push(l);return u}function ht(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 G=l.entanglements,P=l.expirationTimes,ut=l.hiddenUpdates;for(h=N&~h;0<h;){var yt=31-Fn(h),St=1<<yt;G[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 U(l){if(In&&typeof In.onCommitFiberRoot=="function")try{In.onCommitFiberRoot(gu,l,void 0,(l.current.flags&128)===128)}catch{}}function X(l){if(typeof em=="function"&&$f(l),In&&typeof In.setStrictMode=="function")try{In.setStrictMode(gu,l)}catch{}}function it(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}function nt(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 mt(l,u){Re[we++]=zr,Re[we++]=Rr,Rr=l,zr=u}function Y(l,u,h){xa[_a++]=Ei,xa[_a++]=Ga,xa[_a++]=$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 tt(l){l.return!==null&&(mt(l,1),Y(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=xa[--_a],xa[_a]=null,Ga=xa[--_a],xa[_a]=null,Ei=xa[--_a],xa[_a]=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(vu,l);var u=dn.current,h=Dd(u,l.type);u!==h&&(B(Dr,l),B(dn,h))}function Ut(l){Dr.current===l&&(O(dn),O(Dr)),vu.current===l&&(O(vu),Si?wt._currentValue=Wn:wt._currentValue2=Wn)}function re(l){var u=Error(o(418,""));throw Qn(nt(u,l)),Or}function ue(l,u){if(!jn)throw Error(o(175));vp(l.stateNode,l.type,l.memoizedProps,u,l)||re(l)}function oa(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 oa(l),ae=!0,!1;var u=!1;if(vn?l.tag!==3&&l.tag!==27&&(l.tag!==5||Kd(l.type)&&!ql(l.type,l.memoizedProps))&&(u=!0):l.tag!==3&&(l.tag!==5||Kd(l.type)&&!ql(l.type,l.memoizedProps))&&(u=!0),u&&_n&&re(l),oa(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=Qd(l)}else _n=Rn?Yf(l.stateNode):null;return!0}function Un(){jn&&(_n=Rn=null,ae=!1)}function Qn(l){Sa===null?Sa=[l]:Sa.push(l)}function rn(){for(var l=Ll,u=xu=Ll=0;u<l;){var h=ba[u];ba[u++]=null;var y=ba[u];ba[u++]=null;var _=ba[u];ba[u++]=null;var T=ba[u];if(ba[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){ba[Ll++]=l,ba[Ll++]=u,ba[Ll++]=h,ba[Ll++]=y,xu|=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?_u=Es=l:Es=Es.next=l),Ur=!0,Nr||(Nr=!0,kh(hp))}function ml(l,u){if(!ei&&Ur){ei=!0;do for(var h=!1,y=_u;y!==null;){if(l!==0){var _=y.pendingLanes;if(_===0)var T=0;else{var N=y.suspendedLanes,G=y.pingedLanes;T=(1<<31-Fn(42|l)+1)-1,T&=_&~(N&~G),T=T&201326677?T&201326677|1:T?T|2:0}T!==0&&(h=!0,Kh(y,T))}else T=Qt,T=J(y,y===Kt?T:0),(T&3)===0||Q(y,T)||(h=!0,Kh(y,T));y=y.next}while(h);ei=!1}}function hp(){Ur=Nr=!1;var l=0;Xl!==0&&(Yl()&&(l=Xl),Xl=0);for(var u=xn(),h=null,y=_u;y!==null;){var _=y.next,T=Zh(y,u);T===0?(y.next=null,h===null?_u=_:h.next=_,_===null&&(Es=h)):(h=y,(l!==0||(T&3)!==0)&&(Ur=!0)),y=_}ml(l)}function Zh(l,u){for(var h=l.suspendedLanes,y=l.pingedLanes,_=l.expirationTimes,T=l.pendingLanes&-62914561;0<T;){var N=31-Fn(T),G=1<<N,P=_[N];P===-1?((G&h)===0||(G&y)!==0)&&(_[N]=Z(G,u)):P<=u&&(l.expiredLanes|=G),T&=~G}if(u=Kt,h=Qt,h=J(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=tm;break;case 32:h=Fo;break;case 268435456:h=Io;break;default:h=Fo}return y=Kn.bind(null,l),h=yu(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=J(l,l===Kt?y:0),y===0?null:(cr(l,y,u),Zh(l,xn()),l.callbackNode!=null&&l.callbackNode===h?Kn.bind(null,l):null)}function Kh(l,u){if(fn())return null;cr(l,u,!0)}function kh(l){We?Yo(function(){(Rt&6)!==0?yu(If,l):l()}):yu(If,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(Jh,Jh),u}function Jh(){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 Ph(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 Bc(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wc(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(Su){var l=Vl;if(l!==null)throw l}}function Yu(l,u,h,y){Su=!1;var _=l.updateQueue;tl=!1;var T=_.firstBaseUpdate,N=_.lastBaseUpdate,G=_.shared.pending;if(G!==null){_.shared.pending=null;var P=G,ut=P.next;P.next=null,N===null?T=ut:N.next=ut,N=P;var yt=l.alternate;yt!==null&&(yt=yt.updateQueue,G=yt.lastBaseUpdate,G!==N&&(G===null?yt.firstBaseUpdate=ut:G.next=ut,yt.lastBaseUpdate=P))}if(T!==null){var St=_.baseState;N=0,yt=ut=P=null,G=T;do{var bt=G.lane&-536870913,Gt=bt!==G.lane;if(Gt?(Qt&bt)===bt:(y&bt)===bt){bt!==0&&bt===$n&&(Su=!0),yt!==null&&(yt=yt.next={lane:0,tag:G.tag,payload:G.payload,callback:null,next:null});t:{var aa=l,jr=G;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=G.callback,bt!==null&&(l.flags|=64,Gt&&(l.flags|=8192),Gt=_.callbacks,Gt===null?_.callbacks=[bt]:Gt.push(bt))}else Gt={lane:bt,tag:G.tag,payload:G.payload,callback:G.callback,next:null},yt===null?(ut=yt=Gt,P=St):yt=yt.next=Gt,N|=bt;if(G=G.next,G===null){if(G=_.shared.pending,G===null)break;Gt=G,G=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),Aa|=N,l.lanes=N,l.memoizedState=St}}function Wh(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++)Wh(h[l],u)}function ns(l,u){if(va(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,_)||!va(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 Vs(){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 Qs(l,u){u=u.props.ref,l.ref=u!==void 0?u:null}function Zs(l,u){throw u.$$typeof===vf?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 Fh(l){function u(I,K){if(l){var et=I.deletions;et===null?(I.deletions=[K],I.flags|=16):et.push(K)}}function h(I,K){if(!l)return null;for(;K!==null;)u(I,K),K=K.sibling;return null}function y(I){for(var K=new Map;I!==null;)I.key!==null?K.set(I.key,I):K.set(I.index,I),I=I.sibling;return K}function _(I,K){return I=An(I,K),I.index=0,I.sibling=null,I}function T(I,K,et){return I.index=et,l?(et=I.alternate,et!==null?(et=et.index,et<K?(I.flags|=33554434,K):et):(I.flags|=33554434,K)):(I.flags|=1048576,K)}function N(I){return l&&I.alternate===null&&(I.flags|=33554434),I}function G(I,K,et,dt){return K===null||K.tag!==6?(K=Ul(et,I.mode,dt),K.return=I,K):(K=_(K,et),K.return=I,K)}function P(I,K,et,dt){var At=et.type;return At===cu?yt(I,K,et.props.children,dt,et.key):K!==null&&(K.elementType===At||typeof At=="object"&&At!==null&&At.$$typeof===Ia&&Ks(At)===K.type)?(K=_(K,et.props),Qs(K,et),K.return=I,K):(K=wa(et.type,et.key,et.props,null,I.mode,dt),Qs(K,et),K.return=I,K)}function ut(I,K,et,dt){return K===null||K.tag!==4||K.stateNode.containerInfo!==et.containerInfo||K.stateNode.implementation!==et.implementation?(K=ou(et,I.mode,dt),K.return=I,K):(K=_(K,et.children||[]),K.return=I,K)}function yt(I,K,et,dt,At){return K===null||K.tag!==7?(K=Ji(et,I.mode,dt,At),K.return=I,K):(K=_(K,et),K.return=I,K)}function St(I,K,et){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return K=Ul(""+K,I.mode,et),K.return=I,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case Pi:return et=wa(K.type,K.key,K.props,null,I.mode,et),Qs(et,K),et.return=I,et;case Fa:return K=ou(K,I.mode,et),K.return=I,K;case Ia:var dt=K._init;return K=dt(K._payload),St(I,K,et)}if(Gl(K)||f(K))return K=Ji(K,I.mode,et,null),K.return=I,K;if(typeof K.then=="function")return St(I,$r(K),et);if(K.$$typeof===xi)return St(I,lr(I,K),et);Zs(I,K)}return null}function bt(I,K,et,dt){var At=K!==null?K.key:null;if(typeof et=="string"&&et!==""||typeof et=="number"||typeof et=="bigint")return At!==null?null:G(I,K,""+et,dt);if(typeof et=="object"&&et!==null){switch(et.$$typeof){case Pi:return et.key===At?P(I,K,et,dt):null;case Fa:return et.key===At?ut(I,K,et,dt):null;case Ia:return At=et._init,et=At(et._payload),bt(I,K,et,dt)}if(Gl(et)||f(et))return At!==null?null:yt(I,K,et,dt,null);if(typeof et.then=="function")return bt(I,K,$r(et),dt);if(et.$$typeof===xi)return bt(I,K,lr(I,et),dt);Zs(I,et)}return null}function Gt(I,K,et,dt,At){if(typeof dt=="string"&&dt!==""||typeof dt=="number"||typeof dt=="bigint")return I=I.get(et)||null,G(K,I,""+dt,At);if(typeof dt=="object"&&dt!==null){switch(dt.$$typeof){case Pi:return I=I.get(dt.key===null?et:dt.key)||null,P(K,I,dt,At);case Fa:return I=I.get(dt.key===null?et:dt.key)||null,ut(K,I,dt,At);case Ia:var Se=dt._init;return dt=Se(dt._payload),Gt(I,K,et,dt,At)}if(Gl(dt)||f(dt))return I=I.get(et)||null,yt(K,I,dt,At,null);if(typeof dt.then=="function")return Gt(I,K,et,$r(dt),At);if(dt.$$typeof===xi)return Gt(I,K,et,lr(K,dt),At);Zs(K,dt)}return null}function aa(I,K,et,dt){for(var At=null,Se=null,Ht=K,le=K=0,sn=null;Ht!==null&&le<et.length;le++){Ht.index>le?(sn=Ht,Ht=null):sn=Ht.sibling;var se=bt(I,Ht,et[le],dt);if(se===null){Ht===null&&(Ht=sn);break}l&&Ht&&se.alternate===null&&u(I,Ht),K=T(se,K,le),Se===null?At=se:Se.sibling=se,Se=se,Ht=sn}if(le===et.length)return h(I,Ht),ae&&mt(I,le),At;if(Ht===null){for(;le<et.length;le++)Ht=St(I,et[le],dt),Ht!==null&&(K=T(Ht,K,le),Se===null?At=Ht:Se.sibling=Ht,Se=Ht);return ae&&mt(I,le),At}for(Ht=y(Ht);le<et.length;le++)sn=Gt(Ht,I,le,et[le],dt),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(I,ul)}),ae&&mt(I,le),At}function jr(I,K,et,dt){if(et==null)throw Error(o(151));for(var At=null,Se=null,Ht=K,le=K=0,sn=null,se=et.next();Ht!==null&&!se.done;le++,se=et.next()){Ht.index>le?(sn=Ht,Ht=null):sn=Ht.sibling;var ul=bt(I,Ht,se.value,dt);if(ul===null){Ht===null&&(Ht=sn);break}l&&Ht&&ul.alternate===null&&u(I,Ht),K=T(ul,K,le),Se===null?At=ul:Se.sibling=ul,Se=ul,Ht=sn}if(se.done)return h(I,Ht),ae&&mt(I,le),At;if(Ht===null){for(;!se.done;le++,se=et.next())se=St(I,se.value,dt),se!==null&&(K=T(se,K,le),Se===null?At=se:Se.sibling=se,Se=se);return ae&&mt(I,le),At}for(Ht=y(Ht);!se.done;le++,se=et.next())se=Gt(Ht,I,le,se.value,dt),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(I,oc)}),ae&&mt(I,le),At}function Ns(I,K,et,dt){if(typeof et=="object"&&et!==null&&et.type===cu&&et.key===null&&(et=et.props.children),typeof et=="object"&&et!==null){switch(et.$$typeof){case Pi:t:{for(var At=et.key;K!==null;){if(K.key===At){if(At=et.type,At===cu){if(K.tag===7){h(I,K.sibling),dt=_(K,et.props.children),dt.return=I,I=dt;break t}}else if(K.elementType===At||typeof At=="object"&&At!==null&&At.$$typeof===Ia&&Ks(At)===K.type){h(I,K.sibling),dt=_(K,et.props),Qs(dt,et),dt.return=I,I=dt;break t}h(I,K);break}else u(I,K);K=K.sibling}et.type===cu?(dt=Ji(et.props.children,I.mode,dt,et.key),dt.return=I,I=dt):(dt=wa(et.type,et.key,et.props,null,I.mode,dt),Qs(dt,et),dt.return=I,I=dt)}return N(I);case Fa:t:{for(At=et.key;K!==null;){if(K.key===At)if(K.tag===4&&K.stateNode.containerInfo===et.containerInfo&&K.stateNode.implementation===et.implementation){h(I,K.sibling),dt=_(K,et.children||[]),dt.return=I,I=dt;break t}else{h(I,K);break}else u(I,K);K=K.sibling}dt=ou(et,I.mode,dt),dt.return=I,I=dt}return N(I);case Ia:return At=et._init,et=At(et._payload),Ns(I,K,et,dt)}if(Gl(et))return aa(I,K,et,dt);if(f(et)){if(At=f(et),typeof At!="function")throw Error(o(150));return et=At.call(et),jr(I,K,et,dt)}if(typeof et.then=="function")return Ns(I,K,$r(et),dt);if(et.$$typeof===xi)return Ns(I,K,lr(I,et),dt);Zs(I,et)}return typeof et=="string"&&et!==""||typeof et=="number"||typeof et=="bigint"?(et=""+et,K!==null&&K.tag===6?(h(I,K.sibling),dt=_(K,et),dt.return=I,I=dt):(h(I,K),dt=Ul(et,I.mode,dt),dt.return=I,I=dt),N(I)):h(I,K)}return function(I,K,et,dt){try{qa=0;var At=Ns(I,K,et,dt);return Ci=null,At}catch(Ht){if(Ht===ye)throw Ht;var Se=n(29,Ht,null,I.mode);return Se.lanes=dt,Se.return=I,Se}finally{}}}function Hc(l,u){l=ni,B(Ta,l),B(Ai,u),ni=l|u.baseLanes}function to(){B(Ta,ni),B(Ai,Ai.current)}function eo(){ni=Ta.current,O(Ai),O(Ta)}function oi(l){var u=l.alternate;B(Fe,Fe.current&1),B(Ea,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(Ea,l),Ya===null){var u=l.alternate;u!==null&&u.memoizedState!==null&&(Ya=l)}}else Hi()}function Hi(){B(Fe,Fe.current),B(Ea,Ea.current)}function ci(l){O(Ea),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(!va(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=Ih(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,bu=null,u)throw Error(o(300));l===null||Xe||(l=l.dependencies,l!==null&&bl(l)&&(Xe=!0))}function Ih(l,u,h,y){Xt=l;var _=0;do{if(ze&&(bu=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 dp(){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,bu=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,bu===null&&(bu=[]),l=Vu(bu,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]=zd;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 G=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?(G=P=St,N=T):P=P.next=St,Xt.lanes|=bt,Aa|=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?(G=P=bt,N=T):P=P.next=bt,Xt.lanes|=St,Aa|=St;ut=ut.next}while(ut!==null&&ut!==u);if(P===null?N=T:P.next=G,!va(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!==_);va(T,u.memoizedState)||(Xe=!0),u.memoizedState=T,u.baseQueue===null&&(u.baseState=T),h.lastRenderedState=T}return[T,y]}function $h(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=!va((oe||_).memoizedState,h);if(N&&(_.memoizedState=h,Xe=!0),_=_.queue,Pu(td.bind(null,y,_,l),[l]),_.getSnapshot!==u||N||Le!==null&&Le.memoizedState.tag&1){if(y.flags|=2048,is(9,jc.bind(null,y,_,h,u),{destroy:void 0},null),Kt===null)throw Error(o(349));T||(Mi&60)!==0||Gc(y,u,h)}return h}function Gc(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 jc(l,u,h,y){u.value=h,u.getSnapshot=y,Ku(u)&&ku(l)}function td(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!va(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){X(!0);try{h()}finally{X(!1)}}}return u.memoizedState=u.baseState=l,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fi,lastRenderedState:l},u}function ca(l,u,h,y){return l.baseState=h,qi(l,oe,typeof y=="function"?y:fi)}function ed(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,nd(u,T)):(T.next=h.next,u.pending=h.next=T)}}function nd(l,u){var h=u.action,y=u.payload,_=l.state;if(u.isTransition){var T=Nt.T,N={};Nt.T=N;try{var G=h(_,y),P=Nt.S;P!==null&&P(N,G),lo(l,u,G)}catch(ut){ks(l,u,ut)}finally{Nt.T=T}}else try{T=h(_,y),lo(l,u,T)}catch(ut){ks(l,u,ut)}}function lo(l,u,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(y){qc(l,u,y)},function(y){return ks(l,u,y)}):qc(l,u,h)}function qc(l,u,h){u.status="fulfilled",u.value=h,ad(u),l.state=h,u=l.pending,u!==null&&(h=u.next,h===u?l.pending=null:(h=h.next,u.next=h,nd(l,h)))}function ks(l,u,h){var y=l.pending;if(l.pending=null,y!==null){y=y.next;do u.status="rejected",u.reason=h,ad(u),u=u.next;while(u!==y)}l.action=null}function ad(l){l=l.listeners;for(var u=0;u<l.length;u++)(0,l[u])()}function fa(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 _=Hd(_n,ja);if(_){_n=Yf(_),y=Gd(_);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:fa,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=ed.bind(null,Xt,_,T,h),_.dispatch=h,y.memoizedState=l,[u,h,!1]}function Yc(l){var u=Ce();return uo(u,oe,l)}function uo(l,u,h){u=qi(l,u,fa)[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,Js.bind(null,_,h),{destroy:void 0},null)),[u,T,l]}function Js(l,u){l.action=u}function Lc(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 Xc(l,u){ro(8390656,8,l,u)}function Pu(l,u){Ju(2048,8,l,u)}function id(l,u){return Ju(4,2,l,u)}function ld(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){X(!0);try{l()}finally{X(!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,Aa|=l,h)}function Vc(l,u,h,y){return va(h,u)?h:Ai.current!==null?(l=gl(l,h,y),va(l,u)||(Xe=!0),l):(Mi&42)===0?(Xe=!0,l.memoizedState=h):(l=pi(),Xt.lanes|=l,Aa|=l,u)}function co(l,u,h,y,_){var T=an();Mn(T!==0&&8>T?T:8);var N=Nt.T,G={};Nt.T=G,mo(l,!1,u,h);try{var P=_(),ut=Nt.S;if(ut!==null&&ut(G,P),P!==null&&typeof P=="object"&&typeof P.then=="function"){var yt=Ph(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 Qc(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),Zc(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,G=T(N,h);if(_.hasEagerState=!0,_.eagerState=G,va(G,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),Zc(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 Zc(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 Ps(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"&&(Ra===null?Ra=new Set([this]):Ra.add(this));var G=y.stack;this.componentDidCatch(y.value,{componentStack:G!==null?G:""})})}function sd(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=Ea.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=Ea.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=_,y!==Or&&(l=Error(o(422),{cause:y}),Qn(nt(l,h)))):(y!==Or&&(u=Error(o(423),{cause:y}),Qn(nt(u,h))),l=l.current.alternate,l.flags|=65536,_&=-_,l.lanes|=_,y=nt(y,h),_=er(l.stateNode,y,_),Bn(l,_),te!==4&&(te=2)),!1;var T=Error(o(520),{cause:y});if(T=nt(T,h),Eu===null?Eu=[T]:Eu.push(T),te!==4&&(te=2),u===null)return!0;y=nt(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"&&(Ra===null||!Ra.has(T))))return h.flags|=65536,_&=-_,h.lanes|=_,_=Ps(_),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?eh(u,null,h,y):Ql(u,l.child,h,y)}function ud(l,u,h,y,_){h=h.render;var T=u.ref;if("ref"in y){var N={};for(var G in y)G!=="ref"&&(N[G]=y[G])}else N=y;return cs(u),y=pl(l,u,h,N,T,_),G=io(),l!==null&&!Xe?(as(l,u,_),Yi(l,u,_)):(ae&&G&&tt(u),u.flags|=1,mn(l,u,y,_),u.child)}function rd(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,!Ic(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,Ic(l,_))(l.flags&131072)!==0&&(Xe=!0);else return u.lanes=l.lanes,Yi(l,u,_)}return Kc(l,u,h,y,_)}function od(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 cd(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?Hc(u,N):to(),no(u);else return u.lanes=u.childLanes=536870912,cd(l,u,N!==null?N.baseLanes|h:h,h)}else N!==null?(_o(u,N.cachePool),Hc(u,N),Hi(),u.memoizedState=null):(l!==null&&_o(u,null),to(),Hi());return mn(l,u,_,h),u.child}function cd(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&&tt(u),u.flags|=1,mn(l,u,h,_),u.child)}function fd(l,u,h,y,_,T){return cs(u),u.updateQueue=null,h=Ih(u,y,h,_),ao(l),y=io(),l!==null&&!Xe?(as(l,u,T),Yi(l,u,T)):(ae&&y&&tt(u),u.flags|=1,mn(l,u,h,T),u.child)}function kc(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={},Bc(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 G=u.memoizedProps,P=Ja(h,G);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",G=u.pendingProps!==G,yt||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(G||ut!==N)&&tr(u,T,y,N),tl=!1;var bt=u.memoizedState;T.state=bt,Yu(u,y,T,_),qu(),ut=u.memoizedState,G||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,wc(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)),G=h.getDerivedStateFromProps,(ut=typeof G=="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 G=="function"&&(Tn(u,h,G,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 hd(l,u,h,y){return Un(),u.flags|=256,mn(l,u,h,y),u.child}function Jc(l){return{baseLanes:l,cachePool:gd()}}function Pc(l,u,h){return l=l!==null?l.childLanes&~h:0,u&&(l|=na),l}function dd(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 G=_n,P;(P=G)&&(G=Xd(G,ja),G!==null?(u.memoizedState={dehydrated:G,treeContext:$a!==null?{id:Ei,overflow:Ga}:null,retryLane:536870912},P=n(18,null,null,0),P.stateNode=G,P.return=u,u.child=P,Rn=u,_n=null,P=!0):P=!1),P||re(u)}if(G=u.memoizedState,G!==null&&(G=G.dehydrated,G!==null))return Tr(G)?u.lanes=16:u.lanes=536870912,null;ci(u)}return G=y.children,y=y.fallback,_?(Hi(),_=u.mode,G=Wc({mode:"hidden",children:G},_),y=Ji(y,_,h,null),G.return=u,y.return=u,G.sibling=y,u.child=G,_=u.child,_.memoizedState=Jc(h),_.childLanes=Pc(l,N,h),u.memoizedState=Dn,y):(oi(u),ir(u,G))}if(P=l.memoizedState,P!==null&&(G=P.dehydrated,G!==null)){if(T)u.flags&256?(oi(u),u.flags&=-257,u=Fc(l,u,h)):u.memoizedState!==null?(Hi(),u.child=l.child,u.flags|=128,u=null):(Hi(),_=y.fallback,G=u.mode,y=Wc({mode:"visible",children:y.children},G),_=Ji(_,G,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=Jc(h),y.childLanes=Pc(l,N,h),u.memoizedState=Dn,u=_);else if(oi(u),Tr(G))N=wd(G).digest,y=Error(o(419)),y.stack="",y.digest=N,Qn({value:y,source:null,stack:null}),u=Fc(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),am}Zo(G)||Pn(),u=Fc(l,u,h)}else Zo(G)?(u.flags|=128,u.child=l.child,u=ys.bind(null,l),gp(G,u),u=null):(l=P.treeContext,jn&&(_n=qd(G),Rn=u,ae=!0,Sa=null,ja=!1,l!==null&&(xa[_a++]=Ei,xa[_a++]=Ga,xa[_a++]=$a,Ei=l.id,Ga=l.overflow,$a=u)),u=ir(u,y.children),u.flags|=4096);return u}return _?(Hi(),_=y.fallback,G=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(_,G,h,null),_.flags|=2),_.return=u,y.return=u,y.sibling=_,u.child=y,y=_,_=u.child,G=l.child.memoizedState,G===null?G=Jc(h):(P=G.cachePool,P!==null?(T=Si?fe._currentValue:fe._currentValue2,P=P.parent!==T?{parent:T,pool:T}:P):P=gd(),G={baseLanes:G.baseLanes|h,cachePool:P}),_.memoizedState=G,_.childLanes=Pc(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=Wc({mode:"visible",children:u},l.mode),u.return=l,l.child=u}function Wc(l,u){return Bo(l,u,0,null)}function Fc(l,u,h){return Ql(u,l.child,null,h),l=ir(u,u.pendingProps.children),l.flags|=2,u.memoizedState=null,l}function md(l,u,h){l.lanes|=u;var y=l.alternate;y!==null&&(y.lanes|=u),$c(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 pd(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&&md(l,h,u);else if(l.tag===19)md(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),Aa|=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 Ic(l,u){return(l.lanes&u)!==0?!0:(l=l.dependencies,!!(l!==null&&bl(l)))}function mp(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?dd(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 pd(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,od(l,u,h);case 24:Sl(u,fe,l.memoizedState.cache)}return Yi(l,u,h)}function yd(l,u,h){if(l!==null)if(l.memoizedProps!==u.pendingProps)Xe=!0;else{if(!Ic(l,h)&&(u.flags&128)===0)return Xe=!1,mp(l,u,h);Xe=(l.flags&131072)!==0}else Xe=!1,ae&&(u.flags&1048576)!==0&&Y(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=kc(null,u,y,l,h)):(u.tag=0,u=Kc(null,u,y,l,h));else{if(y!=null){if(_=y.$$typeof,_===fu){u.tag=11,u=ud(null,u,y,l,h);break t}else if(_===pr){u.tag=14,u=rd(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),kc(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,wc(l,u),Yu(u,T,null,h);var N=u.memoizedState;if(T=N.cache,Sl(u,fe,T),T!==_.cache&&tf(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=hd(l,u,T,h);break t}else if(T!==y){y=nt(Error(o(424)),u),Qn(y),u=hd(l,u,T,h);break t}else for(jn&&(_n=jd(u.stateNode.containerInfo),Rn=u,ae=!0,Sa=null,ja=!0),h=eh(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(ga)return ar(l,u),l===null?(h=Wo(u.type,null,u.pendingProps,null))?u.memoizedState=h:ae||(u.stateNode=xp(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=Ff(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&&(kd(u.type,u.pendingProps,dn.current),(_=y=_n)&&(y=Yd(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,dp,null,null,h),Si?wt._currentValue=_:wt._currentValue2=_),ar(l,u),mn(l,u,y,h),u.child;case 6:return l===null&&ae&&(Jd(u.pendingProps,dn.current),(l=h=_n)&&(h=Ld(h,u.pendingProps,ja),h!==null?(u.stateNode=h,Rn=u,_n=null,l=!0):l=!1),l||re(u)),null;case 13:return dd(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 ud(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 rd(l,u,u.type,u.pendingProps,h);case 15:return go(l,u,u.type,u.pendingProps,h);case 19:return pd(l,u,h);case 22:return od(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:_},Bc(u),Sl(u,fe,_)):((l.lanes&h)!==0&&(wc(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&&tf(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 $c(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 tf(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 G=T;T=_;for(var P=0;P<u.length;P++)if(G.context===u[P]){T.lanes|=h,G=T.alternate,G!==null&&(G.lanes|=h),$c(T.return,h,l),y||(N=null);break t}T=G.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),$c(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 G=_.type;va(_.pendingProps.value,N.value)||(l!==null?l.push(G):l=[G])}}else if(_===vu.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&&tf(u,l,h,y),u.flags|=262144}function bl(l){for(l=l.firstContext;l!==null;){var u=l.context;if(!va(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 ef(Kl,l)}function lr(l,u){return Kl===null&&cs(l),ef(l,u)}function ef(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 im,data:new Map,refCount:0}}function Ws(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 gd(){var l=Tl();return l===null?null:{parent:Si?fe._currentValue:fe._currentValue2,pool:l}}function ha(l){l.flags|=4}function nf(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(pa)for(var _=u.child;_!==null;){if(_.tag===5){var T=_.stateNode;h&&y&&(T=jf(T,_.type,_.memoizedProps)),_i(l,T)}else if(_.tag===6)T=_.stateNode,h&&y&&(T=qf(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 Fs(l,u,h,y){if(pa)for(var _=u.child;_!==null;){if(_.tag===5){var T=_.stateNode;h&&y&&(T=jf(T,_.type,_.memoizedProps)),Hf(l,T)}else if(_.tag===6)T=_.stateNode,h&&y&&(T=qf(T,_.memoizedProps)),Hf(l,T);else if(_.tag!==4){if(_.tag===22&&_.memoizedState!==null)T=_.child,T!==null&&(T.return=_),Fs(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 Is(l,u){if(pa&&nf(l,u)){l=u.stateNode;var h=l.containerInfo,y=Qo();Fs(y,u,!1,!1),l.pendingChildren=y,ha(u),Bd(h,y)}}function af(l,u,h,y){if(gn)l.memoizedProps!==y&&ha(u);else if(pa){var _=l.stateNode,T=l.memoizedProps;if((l=nf(l,u))||T!==y){var N=dn.current;T=wf(_,h,T,y,!l,null),T===_?u.stateNode=_:(Wi(T,h,y,N)&&ha(u),u.stateNode=T,l?So(T,u,!1,!1):ha(u))}else u.stateNode=_}}function $s(l,u,h){if(Od(u,h)){if(l.flags|=16777216,!Fi(u,h))if(fr())l.flags|=8192;else throw Cs=ec,th}else l.flags&=-16777217}function lf(l,u){if(Pd(u)){if(l.flags|=16777216,!Pf(u))if(fr())l.flags|=8192;else throw Cs=ec,th}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 vd(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)?ha(u):l===null||l.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,Sa!==null&&(Vi(Sa),Sa=null))),Is(l,u),Ae(u),null;case 26:if(ga){h=u.type;var _=u.memoizedState;return l===null?(ha(u),_!==null?(Ae(u),lf(u,_)):(Ae(u),$s(u,h,y))):_?_!==l.memoizedState?(ha(u),Ae(u),lf(u,_)):(Ae(u),u.flags&=-16777217):(gn?l.memoizedProps!==y&&ha(u):af(l,u,h,y),Ae(u),$s(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&&ha(u):af(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=Ff(_,y,h,l,!0),u.stateNode=l,ha(u))}return Ae(u),null}case 5:if(Ut(u),h=u.type,l!==null&&u.stateNode!=null)af(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):(_=Ef(h,y,ti.current,l,u),So(_,u,!1,!1),u.stateNode=_,Wi(_,h,y,l)&&ha(u))}return Ae(u),$s(u,u.type,u.pendingProps),null;case 6:if(l&&u.stateNode!=null)h=l.memoizedProps,gn?h!==y&&ha(u):pa&&(h!==y?(u.stateNode=jo(y,ti.current,dn.current,u),ha(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}Vd(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));du(_,u)}else Un(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Ae(u),_=!1}else Sa!==null&&(Vi(Sa),Sa=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(),Is(l,u),l===null&&Mf(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 xd(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 sf(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(G){Pt(u,u.return,G)}}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,G=N.destroy;if(G!==void 0){N.destroy=void 0,_=u;var P=h;try{G()}catch(ut){Pt(_,P,ut)}}}y=y.next}while(y!==T)}}catch(ut){Pt(u,u.return,ut)}}function _d(l){var u=l.updateQueue;if(u!==null){var h=l.stateNode;try{Lu(u,h)}catch(y){Pt(l,l.return,y)}}}function Sd(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 _=hu(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 tu(l){var u=l.type,h=l.memoizedProps,y=l.stateNode;try{yp(y,u,h,l)}catch(_){Pt(l,l.return,_)}}function uf(l,u,h){try{Of(l.stateNode,l.type,h,u,l)}catch(y){Pt(l,l.return,y)}}function rf(l){return l.tag===5||l.tag===3||(ga?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||rf(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?Uf(h,l,u):Nd(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 eu(l,u,h){var y=l.tag;if(y===5||y===6)l=l.stateNode,u?Nf(h,l,u):Df(h,l);else if(!(y===4||vn&&y===27)&&(l=l.child,l!==null))for(eu(l,u,h),l=l.sibling;l!==null;)eu(l,u,h),l=l.sibling}function bd(l,u,h){l=l.containerInfo;try{Gf(l,h)}catch(y){Pt(u,u.return,y)}}function nu(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(G){Pt(y,y.return,G)}}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(G){Pt(h,h.return,G)}else{var _=Ja(h.type,u.memoizedProps);u=u.memoizedState;try{l.componentDidUpdate(_,u,l.__reactInternalSnapshotBeforeUpdate)}catch(G){Pt(h,h.return,G)}}y&64&&_d(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=hu(h.child.stateNode);break;case 1:l=h.child.stateNode}try{Lu(y,l)}catch(G){Pt(h,h.return,G)}}break;case 26:if(ga){mi(l,h),y&512&&hs(h,h.return);break}case 27:case 5:mi(l,h),u===null&&y&4&&tu(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 au(l){var u=l.alternate;u!==null&&(l.alternate=null,au(u)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(u=l.stateNode,u!==null&&Rf(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 da(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(gu,h)}catch{}switch(h.tag){case 26:if(ga){Oe||Me(h,u),da(l,u,h),h.memoizedState?Qf(h.memoizedState):h.stateNode&&kf(h.stateNode);break}case 27:if(vn){Oe||Me(h,u);var y=Ve,_=ea;Ve=h.stateNode,da(l,u,h),Wd(h.stateNode),Ve=y,ea=_;break}case 5:Oe||Me(h,u);case 6:if(gn){if(y=Ve,_=ea,Ve=null,da(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 da(l,u,h);break;case 18:gn&&Ve!==null&&(ea?Lf(Ve,h.stateNode):Zd(Ve,h.stateNode));break;case 4:gn?(y=Ve,_=ea,Ve=h.stateNode.containerInfo,ea=!0,da(l,u,h),Ve=y,ea=_):(pa&&bd(h.stateNode,h,Qo()),da(l,u,h));break;case 0:case 11:case 14:case 15:Oe||El(2,h,u),Oe||El(4,h,u),da(l,u,h);break;case 1:Oe||(Me(h,u),y=h.stateNode,typeof y.componentWillUnmount=="function"&&Sd(h,u,y)),da(l,u,h);break;case 21:da(l,u,h);break;case 22:Oe||Me(h,u),Oe=(y=Oe)||h.memoizedState!==null,da(l,u,h),Oe=y;break;default:da(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 iu(l){switch(l.tag){case 13:case 19:var u=l.stateNode;return u===null&&(u=l.stateNode=new Tu),u;case 22:return l=l.stateNode,u=l._retryCache,u===null&&(u=l._retryCache=new Tu),u;default:throw Error(o(435,l.tag))}}function rr(l,u){var h=iu(l);u.forEach(function(y){var _=df.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 G=N;t:for(;G!==null;){switch(G.tag){case 27:case 5:Ve=G.stateNode,ea=!1;break t;case 3:Ve=G.stateNode.containerInfo,ea=!0;break t;case 4:Ve=G.stateNode.containerInfo,ea=!0;break t}G=G.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(ga){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=Zf(_,l.type,l.memoizedProps,l):Kf(_,l.type,l.stateNode):l.stateNode=Vf(_,u,l.memoizedProps):y!==u?(y===null?h.stateNode!==null&&kf(h.stateNode):Qf(y),u===null?Kf(_,l.type,l.stateNode):Vf(_,u,l.memoizedProps)):u===null&&l.stateNode!==null&&uf(l,l.memoizedProps,h.memoizedProps));break}case 27:if(vn&&y&4&&l.alternate===null){_=l.stateNode;var T=l.memoizedProps;try{_p(_),Sp(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,uf(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{Ud(u,h,y)}catch(yt){Pt(l,l.return,yt)}}break;case 3:if(ga?(Jf(),_=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(pa){y=u.containerInfo,h=u.pendingChildren;try{Gf(y,h)}catch(yt){Pt(l,l.return,yt)}}}kl&&(kl=!1,of(l));break;case 4:ga?(h=Yn,Yn=Po(l.stateNode.containerInfo),wn(u,l),kn(l),Yn=h):(wn(u,l),kn(l)),y&4&&pa&&bd(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,G=ln,P=Oe;if(ln=G||_,Oe=P||N,wn(u,l),Oe=P,ln=G,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||lu(l)),gn&&(l.memoizedProps===null||l.memoizedProps.mode!=="manual"))){t:if(h=null,gn)for(u=l;;){if(u.tag===5||ga&&u.tag===26||vn&&u.tag===27){if(h===null){N=h=u;try{T=N.stateNode,_?br(T):Bf(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(rf(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);eu(l,T,_);break}case 5:var N=y.stateNode;y.flags&32&&(Sr(N),y.flags&=-33);var G=bo(l);eu(l,G,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 of(l){if(l.subtreeFlags&1024)for(l=l.child;l!==null;){var u=l;of(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 lu(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),lu(u);break;case 1:Me(u,u.return);var h=u.stateNode;typeof h.componentWillUnmount=="function"&&Sd(u,u.return,h),lu(u);break;case 26:case 27:case 5:Me(u,u.return),lu(u);break;case 22:Me(u,u.return),u.memoizedState===null&&lu(u);break;default:lu(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 G=y.stateNode;try{var P=_.shared.hiddenCallbacks;if(P!==null)for(_.shared.hiddenCallbacks=null,_=0;_<P.length;_++)Wh(P[_],G)}catch(ut){Pt(y,y.return,ut)}}h&&N&64&&_d(T),hs(T,T.return);break;case 26:case 27:case 5:Ml(_,T,h),h&&y===null&&N&4&&tu(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 cf(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&&Ws(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&&Ws(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&&Ws(l)));break;case 12:if(_&2048){Xi(l,u,h,y),l=u.stateNode;try{var T=u.memoizedProps,N=T.id,G=T.onPostCommit;typeof G=="function"&&G(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&&cf(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,G=h,P=y,ut=N.flags;switch(N.tag){case 0:case 11:case 15:En(T,N,G,P,_),ur(8,N);break;case 23:break;case 22:var yt=N.stateNode;N.memoizedState!==null?yt._visibility&4?En(T,N,G,P,_):Rl(T,N):(yt._visibility|=4,En(T,N,G,P,_)),_&&ut&2048&&cf(N.alternate,N);break;case 24:En(T,N,G,P,_),_&&ut&2048&&Ao(N.alternate,N);break;default:En(T,N,G,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&&cf(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?Wf(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(ga){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,su(l)):zl(l);break;default:zl(l)}}function su(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),su(u);break;case 22:h=u.stateNode,h._visibility&4&&(h._visibility&=-5,su(u));break;default:su(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:Ws(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(au(y),y===h){je=null;break t}if(_!==null){_.return=T,je=_;break t}je=T}}}function zo(l){var u=Af(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 uu(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&&uu(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)&&pp(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 Td(l,u){var h=[];l=[l,0];for(var y=0;y<l.length;){var _=l[y++],T=_.tag,N=l[y++],G=u[N];if(T!==5&&T!==26&&T!==27||!Ti(_)){for(;G!=null&&uu(_,G);)N++,G=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=Td(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=Ea.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)),ht(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){Ca&&!y&&Pa(l,u,0,!1);break}else if(_===6)Pa(l,u,0,!de);else{if(h=l.current.alternate,T&&!Ed(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 G=l;_=Eu;var P=jn&&G.current.memoizedState.isDehydrated;if(P&&(Wa(G,N).flags|=256),N=yi(G,N,!1),N!==2){if(il&&!P){G.errorRecoveryDisabledLanes|=T,ai|=T,_=4;break t}T=Ma,Ma=_,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:Ma=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),J(y,0)!==0)break t;y.timeoutHandle=Cf(Do.bind(null,y,h,Ma,ii,Cu,u,na,ai,ll,de,2,-0,0),T);break t}Do(y,h,Ma,ii,Cu,u,na,ai,ll,de,0,-0,0)}}break}while(!0);Na(l)}function Vi(l){Ma===null?Ma=l:Ma.push.apply(Ma,l)}function Do(l,u,h,y,_,T,N,G,P,ut,yt,St,bt){var Gt=u.subtreeFlags;if((Gt&8192||(Gt&16785408)===16785408)&&(ya(),ds(u),u=qo(),u!==null)){l.cancelPendingCommit=u(_e.bind(null,l,h,y,_,N,G,P,1,St,bt)),Pa(l,T,N,!ut);return}_e(l,h,y,_,N,G,P,yt,St,bt)}function Ed(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(!va(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 ff(){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;)sf(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,Ca=Q(l,u),il=!1,ll=na=On=ai=Aa=te=0,Ma=Eu=null,Cu=!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=Vs(),ve=3):u===th?(u=Vs(),ve=4):ve=u===am?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,Qe=u,Yt===null&&(te=1,po(l,nt(u,l.current)))}function fr(){var l=Ea.current;return l===null?!0:(Qt&4194176)===Qt?Ya===null:(Qt&62914560)===Qt||(Qt&536870912)!==0?l===Ya:!1}function ru(){var l=Nt.H;return Nt.H=ie,l===null?ie:l}function ma(){var l=Nt.A;return Nt.A=lc,l}function Pn(){te=4,de||(Qt&4194176)!==Qt&&Ea.current!==null||(Ca=!0),(Aa&134217727)===0&&(ai&134217727)===0||Kt===null||Pa(Kt,Qt,na,!1)}function yi(l,u,h){var y=Rt;Rt|=2;var _=ru(),T=ma();(Kt!==l||Qt!==u)&&(ii=null,Wa(l,u)),u=!1;var N=te;t:do try{if(ve!==0&&Yt!==null){var G=Yt,P=Qe;switch(ve){case 8:Jn(),N=6;break t;case 3:case 2:case 6:Ea.current===null&&(u=!0);var ut=ve;if(ve=0,Qe=null,Nl(l,G,P,ut),h&&Ca){N=0;break t}break;default:ut=ve,ve=0,Qe=null,Nl(l,G,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;)hf(Yt)}function vi(l,u){var h=Rt;Rt|=2;var y=ru(),_=ma();Kt!==l||Qt!==u?(ii=null,Ne=xn()+500,Wa(l,u)):Ca=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 G=Yt,P=G.type,ut=G.pendingProps;if(N?Pf(N):Fi(P,ut)){ve=0,Qe=null;var yt=G.sibling;if(yt!==null)Yt=yt;else{var St=G.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&&!Id();)hf(Yt)}function hf(l){var u=yd(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=fd(h,u,u.pendingProps,u.type,void 0,Qt);break;case 11:u=fd(h,u,u.pendingProps,u.type.render,u.ref,Qt);break;case 5:Qu(u);default:sf(h,u),u=Yt=ki(u,ni),u=yd(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(sd(l,_,u,h,Qt)){te=1,po(l,nt(h,l.current)),Yt=null;return}}catch(T){if(_!==null)throw Yt=_,T;te=1,po(l,nt(h,l.current)),Yt=null;return}u.flags&32768?(ae||y===1?l=!0:Ca||(Qt&536870912)!==0?l=!1:(de=l=!0,(y===2||y===3||y===6)&&(y=Ea.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=vd(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=xd(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,G,P,ut){var yt=Nt.T,St=an();try{Mn(2),Nt.T=null,Ft(l,u,h,y,St,_,T,N,G,P,ut)}finally{Nt.T=yt,Mn(St)}}function Ft(l,u,h,y,_,T,N,G){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|=xu,vt(l,y,ut,T,N,G),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,nu(l,P),Al(P,l),Tf(l.containerInfo),l.current=P,Eo(l,P.alternate,P),$d(),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&&(Ra=null),U(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,Ws(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,G=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,G,y),Rt=P,ml(0,!1),In&&typeof In.onPostCommitFiberRoot=="function")try{In.onPostCommitFiberRoot(gu,N)}catch{}T=!0}return T}finally{Mn(_),Nt.T=h,Zi(l,u)}}return!1}function No(l,u,h){u=nt(h,u),u=er(l.stateNode,u,2),l=Je(l,u,2),l!==null&&(ht(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"&&(Ra===null||!Ra.has(y))){l=nt(h,l),h=Ps(2),y=Je(u,h,2),y!==null&&(nr(h,y,u,l),ht(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=Cd.bind(null,l,u,h),u.then(l,l))}function Cd(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&&(ht(l,u),Na(l))}function ys(l){var u=l.memoizedState,h=0;u!==null&&(h=u.retryLane),ps(l,h)}function df(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 yu(l,u)}function mf(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=ga&&vn?Xf(l,h,dn.current)?26:mu(l)?27:5:ga?Xf(l,h,dn.current)?26:5:vn&&mu(l)?27:5;else t:switch(l){case cu:return Ji(h.children,_,T,u);case xf:N=8,_|=24;break;case _f:return l=n(12,h,u,_|2),l.elementType=_f,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 Rd:case xi:N=10;break t;case Bl:N=9;break t;case fu: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 ou(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,G){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=ft(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ft(0),this.hiddenUpdates=ft(null),this.identifierPrefix=y,this.onUncaughtError=_,this.onCaughtError=T,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=G,this.incompleteTransitions=new Map}function hn(l,u,h,y,_,T,N,G,P,ut,yt,St){return l=new gs(l,u,h,N,G,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},Bc(T),l}function mr(l){return l?(l=Ts,l):Ts}function pf(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?R(l):null,l===null?null:hu(l.stateNode)}function Ad(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 Md(l,u){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var h=l.retryLane;l.retryLane=h!==0&&h<u?h:u}}function yf(l,u){Md(l,u),(l=l.alternate)&&Md(l,u)}var Mt={},gf=ep(),yn=nM(),vs=Object.assign,vf=Symbol.for("react.element"),Pi=Symbol.for("react.transitional.element"),Fa=Symbol.for("react.portal"),cu=Symbol.for("react.fragment"),xf=Symbol.for("react.strict_mode"),_f=Symbol.for("react.profiler"),Rd=Symbol.for("react.provider"),Bl=Symbol.for("react.consumer"),xi=Symbol.for("react.context"),fu=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"),zd=Symbol.for("react.memo_cache_sentinel"),Sf=Symbol.iterator,xs=Symbol.for("react.client.reference"),Nt=gf.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ho,bf,Hl=!1,Gl=Array.isArray,Go=t.rendererVersion,gr=t.rendererPackageName,vr=t.extraDevToolsConfig,hu=t.getPublicInstance,_s=t.getRootHostContext,Dd=t.getChildHostContext,jl=t.prepareForCommit,Tf=t.resetAfterCommit,Ef=t.createInstance,_i=t.appendInitialChild,Wi=t.finalizeInitialChildren,ql=t.shouldSetTextContent,jo=t.createTextInstance,Cf=t.scheduleTimeout,xr=t.cancelTimeout,Ss=t.noTimeout,Si=t.isPrimaryRenderer;t.warnsIfNotActing;var gn=t.supportsMutation,pa=t.supportsPersistence,jn=t.supportsHydration,Af=t.getInstanceFromNode;t.beforeActiveInstanceBlur,t.afterActiveInstanceBlur;var Mf=t.preparePortalMount;t.prepareScopeUpdate,t.getInstanceFromScope;var Mn=t.setCurrentUpdatePriority,an=t.getCurrentUpdatePriority,Ha=t.resolveUpdatePriority;t.resolveEventType,t.resolveEventTimeStamp;var Yl=t.shouldAttemptEagerTransition,Rf=t.detachDeletedInstance;t.requestPostPaintCallback;var Od=t.maySuspendCommit,Fi=t.preloadInstance,ya=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,pp=t.matchAccessibilityRole,Be=t.setFocusIfFocusable,zf=t.setupIntersectionObserver,Df=t.appendChild,Nd=t.appendChildToContainer,Ud=t.commitTextUpdate,yp=t.commitMount,Of=t.commitUpdate,Nf=t.insertBefore,Uf=t.insertInContainerBefore,qn=t.removeChild,Ye=t.removeChildFromContainer,Sr=t.resetTextContent,br=t.hideInstance,Xo=t.hideTextInstance,Bf=t.unhideInstance,Ii=t.unhideTextInstance,Vo=t.clearContainer,wf=t.cloneInstance,Qo=t.createContainerChildSet,Hf=t.appendChildToContainerChildSet,Bd=t.finalizeContainerChildren,Gf=t.replaceContainerChildren,jf=t.cloneHiddenInstance,qf=t.cloneHiddenTextInstance,Zo=t.isSuspenseInstancePending,Tr=t.isSuspenseInstanceFallback,wd=t.getSuspenseInstanceFallbackErrorDetails,gp=t.registerSuspenseInstanceRetry,Hd=t.canHydrateFormStateMarker,Gd=t.isFormStateMarkerMatching,Yf=t.getNextHydratableSibling,Ko=t.getFirstHydratableChild,jd=t.getFirstHydratableChildWithinContainer,qd=t.getFirstHydratableChildWithinSuspenseInstance,Yd=t.canHydrateInstance,Ld=t.canHydrateTextInstance,Xd=t.canHydrateSuspenseInstance,vp=t.hydrateInstance,Vd=t.hydrateTextInstance,du=t.hydrateSuspenseInstance,Qd=t.getNextHydratableInstanceAfterSuspenseInstance,ko=t.commitHydratedContainer,Jo=t.commitHydratedSuspenseInstance,Zd=t.clearSuspenseBoundary,Lf=t.clearSuspenseBoundaryFromContainer,Kd=t.shouldDeleteUnhydratedTailInstances;t.diffHydratedPropsForDevWarnings,t.diffHydratedTextForDevWarnings,t.describeHydratableInstanceForDevWarnings;var kd=t.validateHydratableInstance,Jd=t.validateHydratableTextInstance,ga=t.supportsResources,Xf=t.isHostHoistableType,Po=t.getHoistableRoot,Wo=t.getResource,Vf=t.acquireResource,Qf=t.releaseResource,Zf=t.hydrateHoistable,Kf=t.mountHoistable,kf=t.unmountHoistable,xp=t.createHoistableInstance,Jf=t.prepareToCommitHoistables,Pd=t.mayResourceSuspendCommit,Pf=t.preloadResource,Wf=t.suspendResource,vn=t.supportsSingletons,Ff=t.resolveSingletonInstance,_p=t.clearSingleton,Sp=t.acquireSingletonInstance,Wd=t.releaseSingletonInstance,mu=t.isHostSingletonType,Er=[],$i=-1,Ts={},Fn=Math.clz32?Math.clz32:w,Cr=Math.log,Fd=Math.LN2,pu=128,Ar=4194304,yu=yn.unstable_scheduleCallback,Mr=yn.unstable_cancelCallback,Id=yn.unstable_shouldYield,$d=yn.unstable_requestPaint,xn=yn.unstable_now,If=yn.unstable_ImmediatePriority,tm=yn.unstable_UserBlockingPriority,Fo=yn.unstable_NormalPriority,Io=yn.unstable_IdlePriority,em=yn.log,$f=yn.unstable_setDisableYieldValue,gu=null,In=null,va=typeof Object.is=="function"?Object.is:it,$o=new WeakMap,Re=[],we=0,Rr=null,zr=0,xa=[],_a=0,$a=null,Ei=1,Ga="",dn=M(null),Dr=M(null),ti=M(null),vu=M(null),Rn=null,_n=null,ae=!1,Sa=null,ja=!1,Or=Error(o(519)),ba=[],Ll=0,xu=0,_u=null,Es=null,Nr=!1,Ur=!1,ei=!1,Xl=0,Br=null,tc=0,$n=0,Vl=null,tl=!1,Su=!1,wr=Object.prototype.hasOwnProperty,ye=Error(o(460)),th=Error(o(474)),ec={then:function(){}},Cs=null,Ci=null,qa=0,Ql=Fh(!0),eh=Fh(!1),Ai=M(null),Ta=M(0),Ea=M(null),Ya=null,Fe=M(0),Mi=0,Xt=null,oe=null,Le=null,La=!1,ze=!1,el=!1,Hr=0,He=0,bu=null,nm=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:Xc,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){X(!0);try{l()}finally{X(!1)}}return h.memoizedState=[y,u],y},useReducer:function(l,u,h){var y=nn();if(h!==void 0){var _=h(u);if(el){X(!0);try{h(u)}finally{X(!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||Gc(y,u,h)}_.memoizedState=h;var T={value:h,getSnapshot:u};return _.queue=T,Xc(td.bind(null,y,T,l),[l]),y.flags|=2048,is(9,jc.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=nm++,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:id,useLayoutEffect:ld,useMemo:ss,useReducer:Zu,useRef:ls,useState:function(){return Zu(fi)},useDebugValue:Fu,useDeferredValue:function(l,u){var h=Ce();return Vc(h,oe.memoizedState,l,u)},useTransition:function(){var l=Zu(fi)[0],u=Ce().memoizedState;return[typeof l=="boolean"?l:Gi(l),u]},useSyncExternalStore:$h,useId:di};zn.useCacheRefresh=fo,zn.useMemoCache=Pe,zn.useHostTransitionStatus=us,zn.useFormState=Yc,zn.useActionState=Yc,zn.useOptimistic=function(l,u){var h=Ce();return ca(h,oe,l,u)};var Zl={readContext:pn,use:ji,useCallback:oo,useContext:pn,useEffect:Pu,useImperativeHandle:hi,useInsertionEffect:id,useLayoutEffect:ld,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):Vc(h,oe.memoizedState,l,u)},useTransition:function(){var l=yl(fi)[0],u=Ce().memoizedState;return[typeof l=="boolean"?l:Gi(l),u]},useSyncExternalStore:$h,useId:di};Zl.useCacheRefresh=fo,Zl.useMemoCache=Pe,Zl.useHostTransitionStatus=us,Zl.useFormState=Lc,Zl.useActionState=Lc,Zl.useOptimistic=function(l,u){var h=Ce();return oe!==null?ca(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))}},nh=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)},am=Error(o(461)),Xe=!1,Dn={dehydrated:null,treeContext:null,retryLane:0},ta=M(null),Kl=null,Ge=null,im=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=M(null),ln=!1,Oe=!1,kl=!1,Tu=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,Ca=!1,il=!1,ni=0,te=0,Aa=0,ai=0,On=0,na=0,ll=0,Eu=null,Ma=null,Cu=!1,Ri=0,Ne=1/0,ii=null,Ra=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),yf(l,67108864)}},Mt.attemptHydrationAtCurrentPriority=function(l){if(l.tag===13){var u=Gn(),h=Za(l,u);h!==null&&Cn(h,l,u),yf(l,u)}},Mt.attemptSynchronousHydration=function(l){switch(l.tag){case 3:if(l=l.stateNode,l.current.memoizedState.isDehydrated){var u=H(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),ff(),yf(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,G,P,ut){return hn(l,u,!1,null,h,y,T,N,G,P,ut,null)},Mt.createHasPseudoClassSelector=function(l){return{$$typeof:sc,value:l}},Mt.createHydrationContainer=function(l,u,h,y,_,T,N,G,P,ut,yt,St,bt){return l=hn(h,y,!0,l,_,T,G,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,ht(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){nh(l)},Mt.defaultOnUncaughtError=function(l){nh(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,G=u-1;0<=G;G--)if(u!==G){var P=l[G],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=pf,Mt.findHostInstanceWithNoPortals=function(l){return l=E(l),l=l!==null?z(l):null,l===null?null:hu(l.stateNode)},Mt.findHostInstanceWithWarning=function(l){return pf(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=ff,Mt.focusWithin=function(l,u){if(!bi)throw Error(o(363));for(l=zo(l),u=Td(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,G=l[_++],P=u[G];if((N!==5&&N!==26&&N!==27||!Ti(T))&&(uu(T,P)&&(y.push(Ol(P)),G++,G>h&&(h=G)),G<u.length))for(T=T.child;T!==null;)l.push(T,G),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 hu(l.child.stateNode);default:return l.child.stateNode}},Mt.injectIntoDevTools=function(){var l={bundleType:0,version:Go,rendererPackageName:gr,currentDispatcherRef:Nt,findFiberByHostInstance:Af,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{gu=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 _=zf(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 _=Qc(l).queue;co(l,_,u,Wn,h===null?s:function(){var T=Qc(l).next.queue;return xl(l,T,{},Gn()),h(y)})},Mt.updateContainer=function(l,u,h,y){var _=u.current,T=Gn();return Ad(_,T,l,u,h,y),T},Mt.updateContainerSync=function(l,u,h,y){return u.tag===0&&fn(),Ad(u.current,2,l,u,h,y),2},Mt},i.exports.default=i.exports,Object.defineProperty(i.exports,"__esModule",{value:!0})})(wy)),wy.exports}var D1;function iM(){return D1||(D1=1,By.exports=aM()),By.exports}var lM=iM();const sM=tp(lM),uM=sM;function rM(i,t,n,s){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function oM(){}function cM(){return!1}const q_={};function fM(i){return i??q_}function hM(){return Gu.currentUpdatePriority}function dM(){return null}function mM(i){throw new Error("Not yet implemented.")}function pM(i){return i}function yM(){return q_}function gM(i){i instanceof ra?i.visible=!1:i instanceof Wr&&(i.enabled=!1)}function vM(i){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function Y_(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 L_(i,t,...n){}function O1(i,t,n){if(L_(),t instanceof ra){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);Y_(t),U_(i,t,f)}}function xM(){return!1}function _M(){return!0}function SM(){return null}function bM(){}function TM(){}function N1(i,t){t instanceof Wr&&Y_(t),t.destroy()}function EM(i){}function CM(){}function AM(){}function MM(){return-1.1}function RM(){return null}function zM(){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 DM(i){Gu.currentUpdatePriority=i}function OM(){return!1}function NM(){return!1}function UM(){}function BM(){}function wM(){}function HM(i){i instanceof ra?i.visible=!0:i instanceof Wr&&(i.enabled=!0)}function GM(i){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function jM(){return null}const qM={isPrimaryRenderer:!1,noTimeout:-1,NotPendingTransition:null,supportsHydration:!1,supportsMutation:!0,supportsPersistence:!1,warnsIfNotActing:!1,afterActiveInstanceBlur:H3,appendChild:Uy,appendChildToContainer:Uy,appendInitialChild:Uy,beforeActiveInstanceBlur:G3,cancelTimeout:clearTimeout,clearContainer:j3,commitUpdate:P3,createInstance:tM,createTextInstance:rM,hideTextInstance:vM,unhideTextInstance:GM,detachDeletedInstance:oM,finalizeInitialChildren:cM,getChildHostContext:fM,getCurrentUpdatePriority:hM,getInstanceFromNode:dM,getInstanceFromScope:mM,getPublicInstance:pM,getRootHostContext:yM,hideInstance:gM,insertBefore:O1,insertInContainerBefore:O1,maySuspendCommit:xM,preloadInstance:_M,prepareForCommit:SM,preparePortalMount:bM,prepareScopeUpdate:TM,removeChild:N1,removeChildFromContainer:N1,requestPostPaintCallback:EM,resetAfterCommit:CM,resetFormInstance:AM,resolveEventTimeStamp:MM,resolveEventType:RM,resolveUpdatePriority:zM,scheduleTimeout:setTimeout,shouldAttemptEagerTransition:OM,setCurrentUpdatePriority:DM,shouldSetTextContent:NM,startSuspendingCommit:UM,suspendInstance:BM,trackSchedulerEvent:wM,unhideInstance:HM,waitForCommitToBeReady:jM,rendererPackageName:"@pixi/react",rendererVersion:w3.version},$m=uM(qM);$m.injectIntoDevTools();const Dc=new Map;function YM(i,t={}){let n=Dc.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 Dg,o.rootContainer=N_(s.app.stage));const f=(n==null?void 0:n.fiber)??$m.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;O_(v,E)||(s.app[E]=A)}),$m.updateContainer(q.jsx(U3,{value:s,children:g}),f,null,()=>{}),s.app}},Dc.set(d,n)}return n}function X_(i){Gu.unmountQueue.delete(i);const t=i.fiber;t&&$m.updateContainer(null,t,null,()=>{i.applicationState.app&&i.applicationState.app.destroy(),Dc.delete(i.internalState.canvas)})}function LM(){for(const i of Gu.unmountQueue)X_(i)}function XM(i){const t=Dc.get(i);t&&(t.applicationState.isInitialised?X_(t):Gu.unmountQueue.add(t))}function VM(i){const t=Dc.get(i);t&&Gu.unmountQueue.delete(t)}var B1,w1;const Ym=typeof window<"u"&&((B1=window.document)!=null&&B1.createElement||((w1=window.navigator)==null?void 0:w1.product)==="ReactNative")?L.useLayoutEffect:L.useEffect,QM={...Pr.defaultTextStyle},ZM=L.forwardRef(function(t,n){const{children:s,className:o,defaultTextStyle:f,extensions:d,onInit:m,resizeTo:g,...v}=t,S=$2(),b=L.useRef(null),A=L.useRef(null),E=L.useRef(new Set);L.useImperativeHandle(n,()=>({getApplication(){return b.current},getCanvas(){return A.current}}));const R=L.useCallback(()=>{const M=b.current;M&&(g?"current"in g?g.current instanceof HTMLElement&&(M.resizeTo=g.current):M.resizeTo=g:M.resizeTo=void 0)},[g]),z=L.useCallback(M=>{LM(),b.current=M,R(),m==null||m(M)},[m]);return Ym(()=>{if(d){const M=[...d],O=E.current;for(const B of O.values()){const w=M.indexOf(B);w===-1&&(ke.remove(B),O.delete(B)),M.splice(w,1)}for(const B of M)ke.add(B),O.add(B)}},[d]),Ym(()=>{const M=A.current;if(M){let O=Dc.get(M);O||(O=YM(M,{onInit:z})),O.render(q.jsx(S,{children:s}),v)}},[v,s,z,g]),Ym(()=>{R()},[g]),Ym(()=>{f?Object.assign(Pr.defaultTextStyle,f):Object.assign(Pr.defaultTextStyle,QM)},[f]),L.useEffect(()=>{const M=A.current;if(M)return VM(M),()=>{XM(M)}},[]),q.jsx("canvas",{ref:A,className:o})}),KM=L.forwardRef(function(t,n){return q.jsx(ax,{children:q.jsx(ZM,{ref:n,...t})})});function Xg(i){Object.assign(pg,i)}function kM(){const i=L.useContext(Lg);return L_(i.app instanceof Dg,"No Context found with `%s`. Make sure to wrap component with `%s`","Application","AppProvider"),i}const JM={idle:"#888",running:"#4caf50",completed:"#4caf50",checkpoint:"#ff9800"};function PM({rooms:i,activeRoom:t,statuses:n,onSelectRoom:s}){return q.jsxs("div",{style:{padding:"8px"},children:[q.jsx("div",{style:{color:"#888",fontSize:"0.7rem",textTransform:"uppercase",marginBottom:"8px",padding:"0 12px"},children:"Rooms"}),i.length===0&&q.jsx("div",{style:{padding:"8px 12px",color:"#666",fontSize:"0.8rem"},children:"No active squads"}),i.map(o=>{const f=n[o]||"idle",d=JM[f],m=o===t;return q.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:[q.jsx("div",{"data-testid":"status-dot",style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:d,flexShrink:0}}),q.jsx("div",{style:{fontSize:"0.875rem",color:m?"#e0e0e0":"#aaa"},children:o})]},o)})]})}function WM({entries:i}){const t=n=>new Date(n).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return i.length===0?q.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"}):q.jsxs("div",{style:{width:"220px",height:"100%",background:"#0f0f0f",borderLeft:"1px solid #1a1a2e",padding:"16px",boxSizing:"border-box",overflowY:"auto"},children:[q.jsx("div",{style:{fontSize:"0.75rem",color:"#666",marginBottom:"12px"},children:"Activity Log"}),q.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:i.map(n=>q.jsxs("div",{"data-testid":"activity-entry",style:{fontSize:"0.75rem",color:"#aaa",padding:"8px",background:"#1a1a2e",borderRadius:"4px",borderLeft:"2px solid #4caf50"},children:[q.jsx("div",{style:{color:"#4caf50",marginBottom:"2px"},children:t(n.timestamp)}),q.jsx("div",{style:{fontWeight:"bold",marginBottom:"2px"},children:n.agentName}),q.jsx("div",{style:{color:"#999"},children:n.action})]},n.id))})]})}function FM({agentName:i,question:t,onRespond:n}){const[s,o]=L.useState(""),f=()=>{const m=s.trim();m&&(n(m),o(""))},d=m=>{m.key==="Enter"&&f()};return q.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:q.jsxs("div",{className:"bg-white rounded-lg shadow-lg p-6 max-w-md w-full mx-4",children:[q.jsxs("h2",{className:"text-lg font-bold text-orange-500 mb-4",children:["CHECKPOINT — ",i]}),q.jsx("p",{className:"text-gray-700 mb-6",children:t}),q.jsxs("div",{className:"flex gap-2",children:[q.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}),q.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 IM(i){const t=new Map;for(let n=0;n<Xy.length;n++){const s=Xy[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 $M(i,t){const n=i%Xy.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 t4(i,t,n){i.rect(0,0,t,n),i.fill(sa.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:sa.floorPlank,alpha:.3});i.rect(0,0,t,40),i.fill({color:sa.wall,alpha:.15})}function e4(i,t,n){i.roundRect(t,n,Vm,tx,4),i.fill(sa.desk),i.roundRect(t+2,n+2,Vm-4,8,2),i.fill(sa.deskTop);const s=28,o=20,f=t+(Vm-s)/2,d=n+12;i.roundRect(f,d,s,o,2),i.fill(sa.monitor),i.roundRect(f+2,d+2,s-4,o-6,1),i.fill(sa.monitorScreen),i.rect(f+s/2-2,d+o,4,6),i.fill(sa.monitor)}function n4(i,t,n){i.roundRect(t,n,40,60,2),i.fill(sa.bookshelf);for(let s=0;s<3;s++){const o=n+8+s*18;i.rect(t+4,o,32,2),i.fill(sa.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(sa.bookColors[f%sa.bookColors.length])}}}function U1(i,t,n){i.roundRect(t,n+16,20,16,2),i.fill(sa.pot),i.circle(t+10,n+10,10),i.fill(sa.plant),i.circle(t+4,n+6,7),i.fill(sa.plant),i.circle(t+16,n+6,7),i.fill(sa.plant)}function a4(i,t,n){i.roundRect(t,n,64,32,3),i.fill(Cm.counter),i.roundRect(t+4,n-8,24,32,2),i.fill(Cm.machine),i.circle(t+16,n-2,2),i.fill({color:Cm.machineLight,alpha:.8}),i.circle(t+48,n+16,6),i.fill({color:Cm.cup,alpha:.5})}function i4(i,t,n){i.roundRect(t-8,n-12,112,72,4),i.stroke({width:1,color:iy.border,alpha:.3}),i.roundRect(t,n,96,48,4),i.fill(iy.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(iy.chair)}const l4={running:_c.statusRunning,idle:_c.statusIdle,completed:_c.statusRunning,checkpoint:_c.statusCheckpoint};function s4(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=l4[s]??_c.statusIdle;i.circle(f+o-16,22,4),i.fill(d)}Xg({Container:ra,Graphics:fl,Sprite:Rc,Text:D_});function u4({agent:i,textures:t,bubbleText:n,animX:s,animY:o,animPose:f}){const d=$M(i.colorIndex,f),m=t.get(d),g=q2[i.status==="walking"?"idle":i.status]??8947848,v=i.status==="checkpoint",S=L.useCallback(A=>{A.clear(),A.circle(0,0,qt/2+6),A.fill({color:g,alpha:v?.4:.15})},[g,v]),b=L.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 q.jsxs("container",{x:s,y:o,children:[q.jsx("graphics",{draw:S}),m&&q.jsx("sprite",{texture:m,anchor:.5}),q.jsx("text",{text:i.name,y:qt/2+4,anchor:{x:.5,y:0},style:{fontSize:9,fill:"#cccccc",fontFamily:"sans-serif"}}),v&&q.jsx("text",{text:"⚠",y:-qt/2-12,anchor:.5,style:{fontSize:14,fill:"#ff9800",fontFamily:"sans-serif"}}),n&&q.jsxs(q.Fragment,{children:[q.jsx("graphics",{draw:b}),q.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}})]})]})}Xg({Container:ra,Graphics:fl,Text:D_});function r4({squadName:i,status:t,agents:n,textures:s,bubbles:o,animStates:f,originX:d,originY:m}){const g={x:0,y:0},v=Zy(g),S=Z2(g),b=L.useCallback(A=>{A.clear(),t4(A,wu,Uh),s4(A,0,wu,t);for(let E=0;E<n.length;E++){const R=Qy(E,g);e4(A,R.x-48,R.y-32)}a4(A,v.x,v.y),i4(A,S.x,S.y),n4(A,wu-60,44),U1(A,10,Uh-50),U1(A,wu-40,50)},[n.length,t]);return q.jsxs("container",{x:d,y:m,children:[q.jsx("graphics",{draw:b}),q.jsx("text",{text:i,x:wu/2,y:22,anchor:.5,style:{fontSize:14,fill:"#ffffff",fontFamily:"sans-serif",fontWeight:"bold"}}),n.map(A=>{const E=`${i}:${A.id}`,R=o[E],z=f[A.id];return q.jsx(u4,{agent:A,textures:s,bubbleText:(R==null?void 0:R.text)??null,animX:(z==null?void 0:z.x)??A.position.x,animY:(z==null?void 0:z.y)??A.position.y,animPose:(z==null?void 0:z.pose)??(A.status==="working"?"typing":"seated")},A.id)})]})}const o4=45,c4=48,f4=18,h4=4e3;function d4(i){const[t,n]=L.useState({}),s=L.useRef({}),o=L.useRef({}),f=L.useRef(0),d=L.useRef({});L.useEffect(()=>{const g=Ze.subscribe((v,S)=>{var E,R;const b=v.bubbles,A=S.bubbles;for(const z of Object.keys(b))if(((E=b[z])==null?void 0:E.updatedAt)!==((R=A[z])==null?void 0:R.updatedAt)){d.current[z]&&clearTimeout(d.current[z]);const[M,O]=z.split(":");d.current[z]=setTimeout(()=>{Ze.getState().clearBubble(M,O),delete d.current[z]},h4)}});return()=>{g();for(const v of Object.values(d.current))clearTimeout(v);d.current={}}},[]);const m=L.useCallback(()=>{f.current++;const g=f.current,v=Ze.getState(),S={};for(const[b,A]of Object.entries(v.agentVisuals)){s.current[b]||(s.current[b]={}),o.current[b]||(o.current[b]={}),S[b]={};for(const E of A){const R=s.current[b],z=o.current[b];z[E.id]||(z[E.id]={x:E.position.x,y:E.position.y,baseY:E.position.y});const M=z[E.id];E.targetPosition&&(!R[E.id]||R[E.id].progress>=1)&&(R[E.id]={startX:M.x,startY:M.baseY,targetX:E.targetPosition.x,targetY:E.targetPosition.y,progress:0,duration:o4,baseY:E.targetPosition.y});const O=R[E.id];if(O&&O.progress<1){O.progress=Math.min(1,O.progress+1/O.duration);const B=Q2(O.progress);M.x=iv(O.startX,O.targetX,B),M.y=iv(O.startY,O.targetY,B),M.baseY=O.baseY;const w=Math.floor(g/f4)%2===0?"walk-right":"walk-left";S[b][E.id]={x:M.x,y:M.y,pose:w}}else if(E.status==="working"){const B=Math.floor(g/c4)%2===0?"typing":"seated";S[b][E.id]={x:M.x,y:M.baseY,pose:B}}else if(E.status==="idle"){const B=Math.sin(g*.07)*2;S[b][E.id]={x:M.x,y:M.baseY+B,pose:"coffee"}}else E.status==="checkpoint"?S[b][E.id]={x:M.x,y:M.baseY,pose:"seated"}:S[b][E.id]={x:M.x,y:M.baseY,pose:"seated"}}}n(S)},[]);return L.useEffect(()=>{if(i)return i.add(m),()=>{i.remove(m)}},[i,m]),t}Xg({Container:ra});const m4=.3,p4=2;function y4(){const{app:i}=kM(),t=L.useRef(null),[n,s]=L.useState(new Map),o=L.useRef(null),f=Ze(E=>E.rooms),d=Ze(E=>E.agentVisuals),m=Ze(E=>E.bubbles),g=la(E=>E.activeStates),v=d4((i==null?void 0:i.ticker)??null);L.useEffect(()=>{i!=null&&i.renderer&&s(IM(i))},[i]);const S=L.useCallback(E=>{const R=t.current;R&&(o.current={startX:E.globalX,startY:E.globalY,pivotX:R.pivot.x,pivotY:R.pivot.y})},[]),b=L.useCallback(E=>{const R=t.current,z=o.current;if(!R||!z)return;const M=(E.globalX-z.startX)/R.scale.x,O=(E.globalY-z.startY)/R.scale.y;R.pivot.x=z.pivotX-M,R.pivot.y=z.pivotY-O},[]),A=L.useCallback(()=>{o.current=null},[]);return L.useEffect(()=>{const E=i==null?void 0:i.canvas;if(!E)return;const R=z=>{z.preventDefault();const M=t.current;if(!M)return;const O=z.deltaY>0?.9:1.1,B=Math.max(m4,Math.min(p4,M.scale.x*O));M.scale.set(B)};return E.addEventListener("wheel",R,{passive:!1}),()=>E.removeEventListener("wheel",R)},[i]),q.jsx("container",{ref:t,eventMode:"static",onpointerdown:S,onpointermove:b,onpointerup:A,onpointerupoutside:A,children:f.map((E,R)=>{var w;const z=Vy(R,f.length),M=d[E]??[],O=((w=g[E])==null?void 0:w.status)??"idle",B=v[E]??{};return q.jsx(r4,{squadName:E,status:O,agents:M,textures:n,bubbles:m,animStates:B,originX:z.x,originY:z.y},E)})})}function g4(){var S,b;const i=la(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 q.jsxs("div",{style:{display:"flex",height:"100%"},children:[q.jsx(PM,{rooms:t,activeRoom:n,statuses:v,onSelectRoom:s}),q.jsxs("div",{style:{flex:1,position:"relative",overflow:"hidden"},children:[t.length===0&&q.jsx("div",{style:{padding:"2rem",color:"#888"},children:"No active squads"}),t.length>0&&q.jsx(KM,{background:2760462,antialias:!0,resizeTo:window,style:{width:"100%",height:"100%"},children:q.jsx(y4,{})}),d&&q.jsx(FM,{agentName:d.agentName,question:d.question,onRespond:A=>j2(n,A)})]}),q.jsx(WM,{entries:g})]})}function v4({message:i}){if(i.role==="agent_dm")return q.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:[q.jsx("div",{style:{fontSize:11,color:"#a0a0d0",fontWeight:600,marginBottom:4},children:i.agentName}),q.jsx("div",{style:{color:"#e0e0e0",fontSize:14,lineHeight:1.5},children:i.content})]});const t=i.role==="user";return q.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:q.jsx("div",{style:{color:"#e0e0e0",fontSize:14,lineHeight:1.5,whiteSpace:"pre-wrap"},children:i.content})})}function x4(){const[i,t]=L.useState(""),n=L.useRef(null),s=la(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(L.useEffect(()=>{s&&S(s)},[s,S]),L.useEffect(()=>{var E,R;(R=(E=n.current)==null?void 0:E.scrollIntoView)==null||R.call(E,{behavior:"smooth"})},[o,d]),!s)return q.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(),H2(s,E),t(""))},A=E=>{E.key==="Enter"&&!E.shiftKey&&(E.preventDefault(),b())};return q.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",background:"#0f0f1a"},children:[q.jsxs("div",{style:{flex:1,overflowY:"auto",padding:16,display:"flex",flexDirection:"column"},children:[o.map(E=>q.jsx(v4,{message:E},E.id)),f&&d&&q.jsx("div",{"data-role":"assistant",style:{alignSelf:"flex-start",background:"#1e1e2e",borderRadius:12,padding:"8px 14px",maxWidth:"75%",marginBottom:8},children:q.jsx("div",{style:{color:"#e0e0e0",fontSize:14,lineHeight:1.5,whiteSpace:"pre-wrap"},children:d})}),m&&q.jsx("div",{style:{alignSelf:"center",background:"#3a1a1a",border:"1px solid #c53030",borderRadius:8,padding:"8px 14px",color:"#fc8181",fontSize:13,marginBottom:8},children:m}),q.jsx("div",{ref:n})]}),q.jsxs("div",{style:{display:"flex",padding:12,borderTop:"1px solid #2a2a3e",gap:8},children:[q.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"}}),q.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 _4={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 S4({agent:i}){return q.jsxs("div",{style:{background:"#1e1e2e",borderRadius:8,padding:"12px 16px",marginBottom:8,border:"1px solid #2a2a3e"},children:[q.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:6},children:[q.jsx("span",{style:{fontWeight:600,fontSize:14,color:"#e0e0e0"},children:i.name}),q.jsx("span",{style:{backgroundColor:_4[i.status],color:"#fff",fontSize:11,fontWeight:600,padding:"2px 8px",borderRadius:10,textTransform:"lowercase"},children:i.status})]}),q.jsx("div",{style:{fontSize:12,color:"#9ca3af"},children:i.stepLabel})]})}const b4=[{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 T4(){const i=la(o=>o.selectedSquad),t=la(o=>o.activeStates),n=i?t[i]:null,s=L.useMemo(()=>n?b4.map(o=>({...o,agents:n.agents.filter(o.filter)})):null,[n]);return i?n?q.jsx("div",{style:{display:"flex",gap:16,padding:20,height:"100%",overflow:"auto"},children:s.map(o=>q.jsxs("div",{"data-testid":`column-${o.key}`,style:{flex:1,background:"#16161e",borderRadius:10,padding:16,display:"flex",flexDirection:"column",minWidth:220},children:[q.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16,paddingBottom:12,borderBottom:`2px solid ${o.color}`},children:[q.jsx("span",{style:{fontWeight:700,fontSize:14,color:"#e0e0e0"},children:o.label}),q.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})]}),q.jsx("div",{style:{flex:1,overflowY:"auto"},children:o.agents.map(f=>q.jsx(S4,{agent:f},f.id))})]},o.key))}):q.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#9ca3af"},children:"No active state for this squad"}):q.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#9ca3af"},children:"Select a squad to view the kanban board"})}function E4(){const i=cl(J=>J.user),[t,n]=L.useState([]),[s,o]=L.useState(!0),[f,d]=L.useState(""),[m,g]=L.useState(""),[v,S]=L.useState("viewer"),[b,A]=L.useState(null),[E,R]=L.useState(null),z=L.useCallback(async()=>{try{const J=await fetch("/api/users",{credentials:"include"});if(J.ok){const Q=await J.json();n(Q.users)}}catch{A("Failed to load users")}finally{o(!1)}},[]);L.useEffect(()=>{z()},[z]);const M=async()=>{if(!(!f.trim()||!m.trim())){A(null);try{const J=await fetch("/api/auth/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:f,password:m,role:v}),credentials:"include"});if(!J.ok){const Q=await J.json();A(Q.error||"Failed to create user");return}d(""),g(""),S("viewer"),await z()}catch{A("Network error")}}},O=async(J,Q)=>{try{(await fetch(`/api/users/${J}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({role:Q}),credentials:"include"})).ok&&await z()}catch{A("Failed to update role")}},B=async J=>{try{(await fetch(`/api/users/${J}`,{method:"DELETE",credentials:"include"})).ok&&(R(null),await z())}catch{A("Failed to delete user")}},w={background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:6,padding:"8px 12px",color:"#e0e0e0",fontSize:13,outline:"none"},H={padding:"8px 16px",borderRadius:6,border:"none",fontWeight:600,fontSize:13,cursor:"pointer"};return s?q.jsx("div",{style:{color:"#9ca3af",padding:20},children:"Loading users..."}):q.jsxs("div",{children:[q.jsx("h3",{style:{color:"#e0e0e0",marginBottom:16,fontSize:16,fontWeight:700},children:"User Management"}),b&&q.jsx("div",{style:{background:"#3b1818",color:"#f87171",padding:"8px 12px",borderRadius:6,marginBottom:12,fontSize:13},children:b}),q.jsxs("div",{style:{display:"flex",gap:8,marginBottom:20,flexWrap:"wrap",alignItems:"center"},children:[q.jsx("input",{placeholder:"Username",value:f,onChange:J=>d(J.target.value),style:{...w,flex:1,minWidth:120}}),q.jsx("input",{placeholder:"Password",type:"password",value:m,onChange:J=>g(J.target.value),style:{...w,flex:1,minWidth:120}}),q.jsxs("select",{value:v,onChange:J=>S(J.target.value),style:{...w,minWidth:100},children:[q.jsx("option",{value:"viewer",children:"viewer"}),q.jsx("option",{value:"operator",children:"operator"}),q.jsx("option",{value:"admin",children:"admin"})]}),q.jsx("button",{onClick:M,style:{...H,background:"#3b82f6",color:"#fff"},children:"Create User"})]}),q.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13},children:[q.jsx("thead",{children:q.jsxs("tr",{style:{borderBottom:"1px solid #2a2a3e"},children:[q.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Username"}),q.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Email"}),q.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Role"}),q.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Last Login"}),q.jsx("th",{style:{textAlign:"right",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Actions"})]})}),q.jsx("tbody",{children:t.map(J=>q.jsxs("tr",{style:{borderBottom:"1px solid #1e1e2e"},children:[q.jsx("td",{style:{padding:"10px 12px",color:"#e0e0e0"},children:J.username}),q.jsx("td",{style:{padding:"10px 12px",color:"#9ca3af"},children:J.email||"—"}),q.jsx("td",{style:{padding:"10px 12px"},children:J.id===(i==null?void 0:i.id)?q.jsx("span",{style:{color:"#9ca3af"},children:J.role}):q.jsxs("select",{value:J.role,onChange:Q=>O(J.id,Q.target.value),style:{...w,padding:"4px 8px",fontSize:12},children:[q.jsx("option",{value:"viewer",children:"viewer"}),q.jsx("option",{value:"operator",children:"operator"}),q.jsx("option",{value:"admin",children:"admin"})]})}),q.jsx("td",{style:{padding:"10px 12px",color:"#9ca3af",fontSize:12},children:J.last_login?new Date(J.last_login).toLocaleDateString():"—"}),q.jsx("td",{style:{padding:"10px 12px",textAlign:"right"},children:J.id!==(i==null?void 0:i.id)&&(E===J.id?q.jsxs("span",{style:{display:"inline-flex",gap:6,alignItems:"center"},children:[q.jsx("span",{style:{color:"#f87171",fontSize:12},children:"Confirm Delete"}),q.jsx("button",{onClick:()=>B(J.id),style:{...H,background:"#dc2626",color:"#fff",padding:"4px 10px",fontSize:12},children:"Yes"}),q.jsx("button",{onClick:()=>R(null),style:{...H,background:"#2a2a3e",color:"#9ca3af",padding:"4px 10px",fontSize:12},children:"No"})]}):q.jsx("button",{onClick:()=>R(J.id),style:{...H,background:"#2a2a3e",color:"#f87171",padding:"4px 10px",fontSize:12},children:"Delete"}))})]},J.id))})]})]})}function C4(){const i=la(v=>v.selectedSquad),t=la(v=>v.activeStates),[n,s]=L.useState(null),[o,f]=L.useState(!1),d=i?t[i]:null;if(L.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 q.jsx("div",{style:{color:"#9ca3af",padding:20},children:"Select a squad to view details"});if(o)return q.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 q.jsxs("div",{children:[q.jsx("h3",{style:{color:"#e0e0e0",marginBottom:16,fontSize:16,fontWeight:700},children:"Squad Info"}),n&&q.jsxs(q.Fragment,{children:[q.jsxs("div",{style:m,children:[q.jsx("div",{style:g,children:"Name"}),q.jsx("div",{style:{color:"#e0e0e0",fontSize:14,fontWeight:600},children:n.name})]}),q.jsxs("div",{style:m,children:[q.jsx("div",{style:g,children:"Description"}),q.jsx("div",{style:{color:"#e0e0e0",fontSize:14},children:n.description})]}),q.jsxs("div",{style:m,children:[q.jsx("div",{style:g,children:"Agents"}),q.jsx("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:n.agents.map(v=>q.jsx("span",{style:{background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:6,padding:"4px 10px",fontSize:12,color:"#e0e0e0"},children:v.name},v.id))})]}),q.jsxs("div",{style:m,children:[q.jsx("div",{style:g,children:"Pipeline Steps"}),q.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:n.pipeline.steps.map((v,S)=>q.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:6,padding:"8px 12px",fontSize:13},children:[q.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}),q.jsx("span",{style:{color:"#e0e0e0"},children:v.label}),q.jsx("span",{style:{color:"#6b7280",fontSize:11,marginLeft:"auto"},children:v.agent})]},v.id))})]})]}),d&&q.jsxs("div",{style:m,children:[q.jsx("div",{style:g,children:"Current State"}),q.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 A4(){const[i,t]=L.useState(null),[n,s]=L.useState(null),[o,f]=L.useState(!0),[d,m]=L.useState(null),g=L.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())}},[]);L.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 q.jsxs("div",{children:[q.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[q.jsx("h3",{style:{color:"#e0e0e0",fontSize:16,fontWeight:700},children:"Server Info"}),q.jsx("button",{onClick:g,style:{padding:"6px 14px",borderRadius:6,border:"none",background:"#2a2a3e",color:"#e0e0e0",fontWeight:600,fontSize:12,cursor:"pointer"},children:"Refresh"})]}),q.jsxs("div",{style:{marginBottom:24},children:[q.jsx("div",{style:v,children:"Health Status"}),q.jsxs("div",{style:S,children:[q.jsx("span",{style:{color:"#e0e0e0"},children:"API Server"}),o?q.jsx("span",{style:{color:"#9ca3af"},children:"Checking..."}):q.jsx("span",{style:{color:n?"#22c55e":"#ef4444",fontWeight:600},children:n?"Healthy":"Unhealthy"})]})]}),q.jsxs("div",{style:{marginBottom:24},children:[q.jsx("div",{style:v,children:"Environment"}),q.jsxs("div",{style:S,children:[q.jsx("span",{style:{color:"#e0e0e0"},children:"API Port"}),q.jsx("span",{style:{color:"#9ca3af"},children:"3001"})]}),q.jsxs("div",{style:S,children:[q.jsx("span",{style:{color:"#e0e0e0"},children:"Dashboard Port (dev)"}),q.jsx("span",{style:{color:"#9ca3af"},children:"5173"})]})]}),d&&q.jsxs("div",{style:{fontSize:11,color:"#6b7280",textAlign:"right"},children:["Last checked: ",d]})]})}function M4(){const i=cl(d=>d.user),t=(i==null?void 0:i.role)==="admin",[n,s]=L.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 q.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",padding:20},children:[q.jsx("div",{style:{display:"flex",gap:4,marginBottom:20,borderBottom:"1px solid #2a2a3e",paddingBottom:0},children:f.map(d=>q.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))}),q.jsxs("div",{style:{flex:1,overflow:"auto"},children:[n==="users"&&t&&q.jsx(E4,{}),n==="squad"&&q.jsx(C4,{}),n==="server"&&q.jsx(A4,{})]})]})}XS.createRoot(document.getElementById("root")).render(q.jsx(L.StrictMode,{children:q.jsx(d2,{children:q.jsxs(Vb,{children:[q.jsx(Uu,{path:"/login",element:q.jsx(J2,{})}),q.jsxs(Uu,{path:"/",element:q.jsx(k2,{}),children:[q.jsx(Uu,{index:!0,element:q.jsx(Yb,{to:"/office",replace:!0})}),q.jsx(Uu,{path:"office",element:q.jsx(g4,{})}),q.jsx(Uu,{path:"chat",element:q.jsx(x4,{})}),q.jsx(Uu,{path:"kanban",element:q.jsx(T4,{})}),q.jsx(Uu,{path:"settings",element:q.jsx(M4,{})})]})]})})}));export{Bi as $,Fx as A,jh as B,Sn as C,si as D,$l as E,Ls as F,fl as G,Lx as H,fg as I,wC as J,GC as K,QC as L,ne as M,LC as N,op as O,ua as P,Wr as Q,$y as R,uC as S,Ee as T,Jm as U,mT as V,Vh as W,Rg as X,kC as Y,Qa as Z,px as _,Va as a,up as a0,Tv as a1,Rc as a2,M3 as a3,ZT as a4,Cv as a5,my as a6,Av as a7,kT as a8,Ac as a9,un as aa,vx as ab,WA as ac,Ix as ad,ce as ae,Xh as af,tn as ag,WE as ah,ZE as ai,gC as aj,cC as ak,HC as al,jC as am,ZC as an,VC as ao,KC as ap,en as b,De as c,Qm as d,kt as e,oA as f,yE as g,tA as h,fp as i,Mx as j,ke as k,bc as l,gx as m,ra as n,iC as o,zg as p,Qh as q,RT as r,cp as s,Yv as t,ME as u,Zm as v,Da as w,Mg as x,Jx as y,wi as z};
|