sage-team 3.2.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,298 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browserAll-zc5HDK2a.js","assets/webworkerAll-Co7a_7ex.js","assets/Filter-iIUx3NZ6.js","assets/WebGPURenderer-oCb_9bme.js","assets/BufferResource-rbY-rh0f.js","assets/RenderTargetSystem-Dv6oaLwm.js","assets/WebGLRenderer-B2iuXG0A.js","assets/CanvasRenderer-Cu2-XlW0.js"])))=>i.map(i=>d[i]);
2
+ var c1=Object.defineProperty;var h1=(l,t,n)=>t in l?c1(l,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):l[t]=n;var le=(l,t,n)=>h1(l,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))a(r);new MutationObserver(r=>{for(const u of r)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function n(r){const u={};return r.integrity&&(u.integrity=r.integrity),r.referrerPolicy&&(u.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?u.credentials="include":r.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function a(r){if(r.ep)return;r.ep=!0;const u=n(r);fetch(r.href,u)}})();function Th(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Sc={exports:{}},ja={};/**
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 Yp;function f1(){if(Yp)return ja;Yp=1;var l=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,r,u){var c=null;if(u!==void 0&&(c=""+u),r.key!==void 0&&(c=""+r.key),"key"in r){u={};for(var f in r)f!=="key"&&(u[f]=r[f])}else u=r;return r=u.ref,{$$typeof:l,type:a,key:c,ref:r!==void 0?r:null,props:u}}return ja.Fragment=t,ja.jsx=n,ja.jsxs=n,ja}var Xp;function d1(){return Xp||(Xp=1,Sc.exports=f1()),Sc.exports}var tt=d1(),Tc={exports:{}},dt={};/**
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 qp;function m1(){if(qp)return dt;qp=1;var l=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),b=Symbol.iterator;function _(M){return M===null||typeof M!="object"?null:(M=b&&M[b]||M["@@iterator"],typeof M=="function"?M:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,T={};function w(M,Y,F){this.props=M,this.context=Y,this.refs=T,this.updater=F||S}w.prototype.isReactComponent={},w.prototype.setState=function(M,Y){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,Y,"setState")},w.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function E(){}E.prototype=w.prototype;function D(M,Y,F){this.props=M,this.context=Y,this.refs=T,this.updater=F||S}var O=D.prototype=new E;O.constructor=D,A(O,w.prototype),O.isPureReactComponent=!0;var q=Array.isArray;function k(){}var G={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function Q(M,Y,F){var I=F.ref;return{$$typeof:l,type:M,key:Y,ref:I!==void 0?I:null,props:F}}function W(M,Y){return Q(M.type,Y,M.props)}function K(M){return typeof M=="object"&&M!==null&&M.$$typeof===l}function J(M){var Y={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(F){return Y[F]})}var it=/\/+/g;function nt(M,Y){return typeof M=="object"&&M!==null&&M.key!=null?J(""+M.key):Y.toString(36)}function Tt(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(k,k):(M.status="pending",M.then(function(Y){M.status==="pending"&&(M.status="fulfilled",M.value=Y)},function(Y){M.status==="pending"&&(M.status="rejected",M.reason=Y)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function z(M,Y,F,I,rt){var ct=typeof M;(ct==="undefined"||ct==="boolean")&&(M=null);var ft=!1;if(M===null)ft=!0;else switch(ct){case"bigint":case"string":case"number":ft=!0;break;case"object":switch(M.$$typeof){case l:case t:ft=!0;break;case g:return ft=M._init,z(ft(M._payload),Y,F,I,rt)}}if(ft)return rt=rt(M),ft=I===""?"."+nt(M,0):I,q(rt)?(F="",ft!=null&&(F=ft.replace(it,"$&/")+"/"),z(rt,Y,F,"",function(qe){return qe})):rt!=null&&(K(rt)&&(rt=W(rt,F+(rt.key==null||M&&M.key===rt.key?"":(""+rt.key).replace(it,"$&/")+"/")+ft)),Y.push(rt)),1;ft=0;var Ht=I===""?".":I+":";if(q(M))for(var Mt=0;Mt<M.length;Mt++)I=M[Mt],ct=Ht+nt(I,Mt),ft+=z(I,Y,F,ct,rt);else if(Mt=_(M),typeof Mt=="function")for(M=Mt.call(M),Mt=0;!(I=M.next()).done;)I=I.value,ct=Ht+nt(I,Mt++),ft+=z(I,Y,F,ct,rt);else if(ct==="object"){if(typeof M.then=="function")return z(Tt(M),Y,F,I,rt);throw Y=String(M),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return ft}function L(M,Y,F){if(M==null)return M;var I=[],rt=0;return z(M,I,"","",function(ct){return Y.call(F,ct,rt++)}),I}function et(M){if(M._status===-1){var Y=M._result;Y=Y(),Y.then(function(F){(M._status===0||M._status===-1)&&(M._status=1,M._result=F)},function(F){(M._status===0||M._status===-1)&&(M._status=2,M._result=F)}),M._status===-1&&(M._status=0,M._result=Y)}if(M._status===1)return M._result.default;throw M._result}var Z=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},at={map:L,forEach:function(M,Y,F){L(M,function(){Y.apply(this,arguments)},F)},count:function(M){var Y=0;return L(M,function(){Y++}),Y},toArray:function(M){return L(M,function(Y){return Y})||[]},only:function(M){if(!K(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return dt.Activity=x,dt.Children=at,dt.Component=w,dt.Fragment=n,dt.Profiler=r,dt.PureComponent=D,dt.StrictMode=a,dt.Suspense=m,dt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,dt.__COMPILER_RUNTIME={__proto__:null,c:function(M){return G.H.useMemoCache(M)}},dt.cache=function(M){return function(){return M.apply(null,arguments)}},dt.cacheSignal=function(){return null},dt.cloneElement=function(M,Y,F){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var I=A({},M.props),rt=M.key;if(Y!=null)for(ct in Y.key!==void 0&&(rt=""+Y.key),Y)!$.call(Y,ct)||ct==="key"||ct==="__self"||ct==="__source"||ct==="ref"&&Y.ref===void 0||(I[ct]=Y[ct]);var ct=arguments.length-2;if(ct===1)I.children=F;else if(1<ct){for(var ft=Array(ct),Ht=0;Ht<ct;Ht++)ft[Ht]=arguments[Ht+2];I.children=ft}return Q(M.type,rt,I)},dt.createContext=function(M){return M={$$typeof:c,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:u,_context:M},M},dt.createElement=function(M,Y,F){var I,rt={},ct=null;if(Y!=null)for(I in Y.key!==void 0&&(ct=""+Y.key),Y)$.call(Y,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(rt[I]=Y[I]);var ft=arguments.length-2;if(ft===1)rt.children=F;else if(1<ft){for(var Ht=Array(ft),Mt=0;Mt<ft;Mt++)Ht[Mt]=arguments[Mt+2];rt.children=Ht}if(M&&M.defaultProps)for(I in ft=M.defaultProps,ft)rt[I]===void 0&&(rt[I]=ft[I]);return Q(M,ct,rt)},dt.createRef=function(){return{current:null}},dt.forwardRef=function(M){return{$$typeof:f,render:M}},dt.isValidElement=K,dt.lazy=function(M){return{$$typeof:g,_payload:{_status:-1,_result:M},_init:et}},dt.memo=function(M,Y){return{$$typeof:p,type:M,compare:Y===void 0?null:Y}},dt.startTransition=function(M){var Y=G.T,F={};G.T=F;try{var I=M(),rt=G.S;rt!==null&&rt(F,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(k,Z)}catch(ct){Z(ct)}finally{Y!==null&&F.types!==null&&(Y.types=F.types),G.T=Y}},dt.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},dt.use=function(M){return G.H.use(M)},dt.useActionState=function(M,Y,F){return G.H.useActionState(M,Y,F)},dt.useCallback=function(M,Y){return G.H.useCallback(M,Y)},dt.useContext=function(M){return G.H.useContext(M)},dt.useDebugValue=function(){},dt.useDeferredValue=function(M,Y){return G.H.useDeferredValue(M,Y)},dt.useEffect=function(M,Y){return G.H.useEffect(M,Y)},dt.useEffectEvent=function(M){return G.H.useEffectEvent(M)},dt.useId=function(){return G.H.useId()},dt.useImperativeHandle=function(M,Y,F){return G.H.useImperativeHandle(M,Y,F)},dt.useInsertionEffect=function(M,Y){return G.H.useInsertionEffect(M,Y)},dt.useLayoutEffect=function(M,Y){return G.H.useLayoutEffect(M,Y)},dt.useMemo=function(M,Y){return G.H.useMemo(M,Y)},dt.useOptimistic=function(M,Y){return G.H.useOptimistic(M,Y)},dt.useReducer=function(M,Y,F){return G.H.useReducer(M,Y,F)},dt.useRef=function(M){return G.H.useRef(M)},dt.useState=function(M){return G.H.useState(M)},dt.useSyncExternalStore=function(M,Y,F){return G.H.useSyncExternalStore(M,Y,F)},dt.useTransition=function(){return G.H.useTransition()},dt.version="19.2.4",dt}var Vp;function Ah(){return Vp||(Vp=1,Tc.exports=m1()),Tc.exports}var ii=Ah();const Or=Th(ii);var Ac={exports:{}},Ya={},wc={exports:{}},Cc={};/**
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 Pp;function p1(){return Pp||(Pp=1,(function(l){function t(z,L){var et=z.length;z.push(L);t:for(;0<et;){var Z=et-1>>>1,at=z[Z];if(0<r(at,L))z[Z]=L,z[et]=at,et=Z;else break t}}function n(z){return z.length===0?null:z[0]}function a(z){if(z.length===0)return null;var L=z[0],et=z.pop();if(et!==L){z[0]=et;t:for(var Z=0,at=z.length,M=at>>>1;Z<M;){var Y=2*(Z+1)-1,F=z[Y],I=Y+1,rt=z[I];if(0>r(F,et))I<at&&0>r(rt,F)?(z[Z]=rt,z[I]=et,Z=I):(z[Z]=F,z[Y]=et,Z=Y);else if(I<at&&0>r(rt,et))z[Z]=rt,z[I]=et,Z=I;else break t}}return L}function r(z,L){var et=z.sortIndex-L.sortIndex;return et!==0?et:z.id-L.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;l.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();l.unstable_now=function(){return c.now()-f}}var m=[],p=[],g=1,x=null,b=3,_=!1,S=!1,A=!1,T=!1,w=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function O(z){for(var L=n(p);L!==null;){if(L.callback===null)a(p);else if(L.startTime<=z)a(p),L.sortIndex=L.expirationTime,t(m,L);else break;L=n(p)}}function q(z){if(A=!1,O(z),!S)if(n(m)!==null)S=!0,k||(k=!0,J());else{var L=n(p);L!==null&&Tt(q,L.startTime-z)}}var k=!1,G=-1,$=5,Q=-1;function W(){return T?!0:!(l.unstable_now()-Q<$)}function K(){if(T=!1,k){var z=l.unstable_now();Q=z;var L=!0;try{t:{S=!1,A&&(A=!1,E(G),G=-1),_=!0;var et=b;try{e:{for(O(z),x=n(m);x!==null&&!(x.expirationTime>z&&W());){var Z=x.callback;if(typeof Z=="function"){x.callback=null,b=x.priorityLevel;var at=Z(x.expirationTime<=z);if(z=l.unstable_now(),typeof at=="function"){x.callback=at,O(z),L=!0;break e}x===n(m)&&a(m),O(z)}else a(m);x=n(m)}if(x!==null)L=!0;else{var M=n(p);M!==null&&Tt(q,M.startTime-z),L=!1}}break t}finally{x=null,b=et,_=!1}L=void 0}}finally{L?J():k=!1}}}var J;if(typeof D=="function")J=function(){D(K)};else if(typeof MessageChannel<"u"){var it=new MessageChannel,nt=it.port2;it.port1.onmessage=K,J=function(){nt.postMessage(null)}}else J=function(){w(K,0)};function Tt(z,L){G=w(function(){z(l.unstable_now())},L)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(z){z.callback=null},l.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<z?Math.floor(1e3/z):5},l.unstable_getCurrentPriorityLevel=function(){return b},l.unstable_next=function(z){switch(b){case 1:case 2:case 3:var L=3;break;default:L=b}var et=b;b=L;try{return z()}finally{b=et}},l.unstable_requestPaint=function(){T=!0},l.unstable_runWithPriority=function(z,L){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var et=b;b=z;try{return L()}finally{b=et}},l.unstable_scheduleCallback=function(z,L,et){var Z=l.unstable_now();switch(typeof et=="object"&&et!==null?(et=et.delay,et=typeof et=="number"&&0<et?Z+et:Z):et=Z,z){case 1:var at=-1;break;case 2:at=250;break;case 5:at=1073741823;break;case 4:at=1e4;break;default:at=5e3}return at=et+at,z={id:g++,callback:L,priorityLevel:z,startTime:et,expirationTime:at,sortIndex:-1},et>Z?(z.sortIndex=et,t(p,z),n(m)===null&&z===n(p)&&(A?(E(G),G=-1):A=!0,Tt(q,et-Z))):(z.sortIndex=at,t(m,z),S||_||(S=!0,k||(k=!0,J()))),z},l.unstable_shouldYield=W,l.unstable_wrapCallback=function(z){var L=b;return function(){var et=b;b=L;try{return z.apply(this,arguments)}finally{b=et}}}})(Cc)),Cc}var Fp;function g1(){return Fp||(Fp=1,wc.exports=p1()),wc.exports}var Mc={exports:{}},pe={};/**
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 Qp;function y1(){if(Qp)return pe;Qp=1;var l=Ah();function t(m){var p="https://react.dev/errors/"+m;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)p+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+m+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={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},r=Symbol.for("react.portal");function u(m,p,g){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:x==null?null:""+x,children:m,containerInfo:p,implementation:g}}var c=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(m,p){if(m==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return pe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,pe.createPortal=function(m,p){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(t(299));return u(m,p,null,g)},pe.flushSync=function(m){var p=c.T,g=a.p;try{if(c.T=null,a.p=2,m)return m()}finally{c.T=p,a.p=g,a.d.f()}},pe.preconnect=function(m,p){typeof m=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,a.d.C(m,p))},pe.prefetchDNS=function(m){typeof m=="string"&&a.d.D(m)},pe.preinit=function(m,p){if(typeof m=="string"&&p&&typeof p.as=="string"){var g=p.as,x=f(g,p.crossOrigin),b=typeof p.integrity=="string"?p.integrity:void 0,_=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;g==="style"?a.d.S(m,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:x,integrity:b,fetchPriority:_}):g==="script"&&a.d.X(m,{crossOrigin:x,integrity:b,fetchPriority:_,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},pe.preinitModule=function(m,p){if(typeof m=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var g=f(p.as,p.crossOrigin);a.d.M(m,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&a.d.M(m)},pe.preload=function(m,p){if(typeof m=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var g=p.as,x=f(g,p.crossOrigin);a.d.L(m,g,{crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},pe.preloadModule=function(m,p){if(typeof m=="string")if(p){var g=f(p.as,p.crossOrigin);a.d.m(m,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else a.d.m(m)},pe.requestFormReset=function(m){a.d.r(m)},pe.unstable_batchedUpdates=function(m,p){return m(p)},pe.useFormState=function(m,p,g){return c.H.useFormState(m,p,g)},pe.useFormStatus=function(){return c.H.useHostTransitionStatus()},pe.version="19.2.4",pe}var Wp;function x1(){if(Wp)return Mc.exports;Wp=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(t){console.error(t)}}return l(),Mc.exports=y1(),Mc.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 Zp;function _1(){if(Zp)return Ya;Zp=1;var l=g1(),t=Ah(),n=x1();function a(e){var i="https://react.dev/errors/"+e;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+e+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var i=e,s=e;if(e.alternate)for(;i.return;)i=i.return;else{e=i;do i=e,(i.flags&4098)!==0&&(s=i.return),e=i.return;while(e)}return i.tag===3?s:null}function c(e){if(e.tag===13){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function f(e){if(e.tag===31){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function m(e){if(u(e)!==e)throw Error(a(188))}function p(e){var i=e.alternate;if(!i){if(i=u(e),i===null)throw Error(a(188));return i!==e?null:e}for(var s=e,o=i;;){var h=s.return;if(h===null)break;var d=h.alternate;if(d===null){if(o=h.return,o!==null){s=o;continue}break}if(h.child===d.child){for(d=h.child;d;){if(d===s)return m(h),e;if(d===o)return m(h),i;d=d.sibling}throw Error(a(188))}if(s.return!==o.return)s=h,o=d;else{for(var y=!1,v=h.child;v;){if(v===s){y=!0,s=h,o=d;break}if(v===o){y=!0,o=h,s=d;break}v=v.sibling}if(!y){for(v=d.child;v;){if(v===s){y=!0,s=d,o=h;break}if(v===o){y=!0,o=d,s=h;break}v=v.sibling}if(!y)throw Error(a(189))}}if(s.alternate!==o)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?e:i}function g(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e;for(e=e.child;e!==null;){if(i=g(e),i!==null)return i;e=e.sibling}return null}var x=Object.assign,b=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),D=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),W=Symbol.for("react.memo_cache_sentinel"),K=Symbol.iterator;function J(e){return e===null||typeof e!="object"?null:(e=K&&e[K]||e["@@iterator"],typeof e=="function"?e:null)}var it=Symbol.for("react.client.reference");function nt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===it?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case A:return"Fragment";case w:return"Profiler";case T:return"StrictMode";case q:return"Suspense";case k:return"SuspenseList";case Q:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case S:return"Portal";case D:return e.displayName||"Context";case E:return(e._context.displayName||"Context")+".Consumer";case O:var i=e.render;return e=e.displayName,e||(e=i.displayName||i.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return i=e.displayName||null,i!==null?i:nt(e.type)||"Memo";case $:i=e._payload,e=e._init;try{return nt(e(i))}catch{}}return null}var Tt=Array.isArray,z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,et={pending:!1,data:null,method:null,action:null},Z=[],at=-1;function M(e){return{current:e}}function Y(e){0>at||(e.current=Z[at],Z[at]=null,at--)}function F(e,i){at++,Z[at]=e.current,e.current=i}var I=M(null),rt=M(null),ct=M(null),ft=M(null);function Ht(e,i){switch(F(ct,i),F(rt,e),F(I,null),i.nodeType){case 9:case 11:e=(e=i.documentElement)&&(e=e.namespaceURI)?cp(e):0;break;default:if(e=i.tagName,i=i.namespaceURI)i=cp(i),e=hp(i,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Y(I),F(I,e)}function Mt(){Y(I),Y(rt),Y(ct)}function qe(e){e.memoizedState!==null&&F(ft,e);var i=I.current,s=hp(i,e.type);i!==s&&(F(rt,e),F(I,s))}function Fi(e){rt.current===e&&(Y(I),Y(rt)),ft.current===e&&(Y(ft),Na._currentValue=et)}var li,di;function ye(e){if(li===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);li=i&&i[1]||"",di=-1<s.stack.indexOf(`
43
+ at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
44
+ `+li+e+di}var ri=!1;function Qs(e,i){if(!e||ri)return"";ri=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(i){var P=function(){throw Error()};if(Object.defineProperty(P.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(P,[])}catch(j){var H=j}Reflect.construct(e,[],P)}else{try{P.call()}catch(j){H=j}e.call(P.prototype)}}else{try{throw Error()}catch(j){H=j}(P=e())&&typeof P.catch=="function"&&P.catch(function(){})}}catch(j){if(j&&H&&typeof j.stack=="string")return[j.stack,H.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=o.DetermineComponentFrameRoot(),y=d[0],v=d[1];if(y&&v){var C=y.split(`
45
+ `),N=v.split(`
46
+ `);for(h=o=0;o<C.length&&!C[o].includes("DetermineComponentFrameRoot");)o++;for(;h<N.length&&!N[h].includes("DetermineComponentFrameRoot");)h++;if(o===C.length||h===N.length)for(o=C.length-1,h=N.length-1;1<=o&&0<=h&&C[o]!==N[h];)h--;for(;1<=o&&0<=h;o--,h--)if(C[o]!==N[h]){if(o!==1||h!==1)do if(o--,h--,0>h||C[o]!==N[h]){var X=`
47
+ `+C[o].replace(" at new "," at ");return e.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",e.displayName)),X}while(1<=o&&0<=h);break}}}finally{ri=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?ye(s):""}function dl(e,i){switch(e.tag){case 26:case 27:case 5:return ye(e.type);case 16:return ye("Lazy");case 13:return e.child!==i&&i!==null?ye("Suspense Fallback"):ye("Suspense");case 19:return ye("SuspenseList");case 0:case 15:return Qs(e.type,!1);case 11:return Qs(e.type.render,!1);case 1:return Qs(e.type,!0);case 31:return ye("Activity");default:return""}}function ml(e){try{var i="",s=null;do i+=dl(e,s),s=e,e=e.return;while(e);return i}catch(o){return`
48
+ Error generating stack: `+o.message+`
49
+ `+o.stack}}var pl=Object.prototype.hasOwnProperty,ro=l.unstable_scheduleCallback,oo=l.unstable_cancelCallback,X0=l.unstable_shouldYield,q0=l.unstable_requestPaint,De=l.unstable_now,V0=l.unstable_getCurrentPriorityLevel,Yh=l.unstable_ImmediatePriority,Xh=l.unstable_UserBlockingPriority,gl=l.unstable_NormalPriority,P0=l.unstable_LowPriority,qh=l.unstable_IdlePriority,F0=l.log,Q0=l.unstable_setDisableYieldValue,Ws=null,Be=null;function Qi(e){if(typeof F0=="function"&&Q0(e),Be&&typeof Be.setStrictMode=="function")try{Be.setStrictMode(Ws,e)}catch{}}var Oe=Math.clz32?Math.clz32:K0,W0=Math.log,Z0=Math.LN2;function K0(e){return e>>>=0,e===0?32:31-(W0(e)/Z0|0)|0}var yl=256,xl=262144,_l=4194304;function vn(e){var i=e&42;if(i!==0)return i;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function bl(e,i,s){var o=e.pendingLanes;if(o===0)return 0;var h=0,d=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var v=o&134217727;return v!==0?(o=v&~d,o!==0?h=vn(o):(y&=v,y!==0?h=vn(y):s||(s=v&~e,s!==0&&(h=vn(s))))):(v=o&~d,v!==0?h=vn(v):y!==0?h=vn(y):s||(s=o&~e,s!==0&&(h=vn(s)))),h===0?0:i!==0&&i!==h&&(i&d)===0&&(d=h&-h,s=i&-i,d>=s||d===32&&(s&4194048)!==0)?i:h}function Zs(e,i){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&i)===0}function I0(e,i){switch(e){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vh(){var e=_l;return _l<<=1,(_l&62914560)===0&&(_l=4194304),e}function uo(e){for(var i=[],s=0;31>s;s++)i.push(e);return i}function Ks(e,i){e.pendingLanes|=i,i!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function J0(e,i,s,o,h,d){var y=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var v=e.entanglements,C=e.expirationTimes,N=e.hiddenUpdates;for(s=y&~s;0<s;){var X=31-Oe(s),P=1<<X;v[X]=0,C[X]=-1;var H=N[X];if(H!==null)for(N[X]=null,X=0;X<H.length;X++){var j=H[X];j!==null&&(j.lane&=-536870913)}s&=~P}o!==0&&Ph(e,o,0),d!==0&&h===0&&e.tag!==0&&(e.suspendedLanes|=d&~(y&~i))}function Ph(e,i,s){e.pendingLanes|=i,e.suspendedLanes&=~i;var o=31-Oe(i);e.entangledLanes|=i,e.entanglements[o]=e.entanglements[o]|1073741824|s&261930}function Fh(e,i){var s=e.entangledLanes|=i;for(e=e.entanglements;s;){var o=31-Oe(s),h=1<<o;h&i|e[o]&i&&(e[o]|=i),s&=~h}}function Qh(e,i){var s=i&-i;return s=(s&42)!==0?1:co(s),(s&(e.suspendedLanes|i))!==0?0:s}function co(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 ho(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Wh(){var e=L.p;return e!==0?e:(e=window.event,e===void 0?32:Gp(e.type))}function Zh(e,i){var s=L.p;try{return L.p=e,i()}finally{L.p=s}}var Wi=Math.random().toString(36).slice(2),oe="__reactFiber$"+Wi,Se="__reactProps$"+Wi,Kn="__reactContainer$"+Wi,fo="__reactEvents$"+Wi,$0="__reactListeners$"+Wi,tx="__reactHandles$"+Wi,Kh="__reactResources$"+Wi,Is="__reactMarker$"+Wi;function mo(e){delete e[oe],delete e[Se],delete e[fo],delete e[$0],delete e[tx]}function In(e){var i=e[oe];if(i)return i;for(var s=e.parentNode;s;){if(i=s[Kn]||s[oe]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(e=xp(e);e!==null;){if(s=e[oe])return s;e=xp(e)}return i}e=s,s=e.parentNode}return null}function Jn(e){if(e=e[oe]||e[Kn]){var i=e.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return e}return null}function Js(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e.stateNode;throw Error(a(33))}function $n(e){var i=e[Kh];return i||(i=e[Kh]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function se(e){e[Is]=!0}var Ih=new Set,Jh={};function Sn(e,i){ts(e,i),ts(e+"Capture",i)}function ts(e,i){for(Jh[e]=i,e=0;e<i.length;e++)Ih.add(i[e])}var ex=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]*$"),$h={},tf={};function ix(e){return pl.call(tf,e)?!0:pl.call($h,e)?!1:ex.test(e)?tf[e]=!0:($h[e]=!0,!1)}function vl(e,i,s){if(ix(i))if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(i);return;case"boolean":var o=i.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(i);return}}e.setAttribute(i,""+s)}}function Sl(e,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttribute(i,""+s)}}function vi(e,i,s,o){if(o===null)e.removeAttribute(s);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(i,s,""+o)}}function Ve(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ef(e){var i=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function nx(e,i,s){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);if(!e.hasOwnProperty(i)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var h=o.get,d=o.set;return Object.defineProperty(e,i,{configurable:!0,get:function(){return h.call(this)},set:function(y){s=""+y,d.call(this,y)}}),Object.defineProperty(e,i,{enumerable:o.enumerable}),{getValue:function(){return s},setValue:function(y){s=""+y},stopTracking:function(){e._valueTracker=null,delete e[i]}}}}function po(e){if(!e._valueTracker){var i=ef(e)?"checked":"value";e._valueTracker=nx(e,i,""+e[i])}}function nf(e){if(!e)return!1;var i=e._valueTracker;if(!i)return!0;var s=i.getValue(),o="";return e&&(o=ef(e)?e.checked?"true":"false":e.value),e=o,e!==s?(i.setValue(e),!0):!1}function Tl(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 sx=/[\n"\\]/g;function Pe(e){return e.replace(sx,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function go(e,i,s,o,h,d,y,v){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),i!=null?y==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+Ve(i)):e.value!==""+Ve(i)&&(e.value=""+Ve(i)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),i!=null?yo(e,y,Ve(i)):s!=null?yo(e,y,Ve(s)):o!=null&&e.removeAttribute("value"),h==null&&d!=null&&(e.defaultChecked=!!d),h!=null&&(e.checked=h&&typeof h!="function"&&typeof h!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+Ve(v):e.removeAttribute("name")}function sf(e,i,s,o,h,d,y,v){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),i!=null||s!=null){if(!(d!=="submit"&&d!=="reset"||i!=null)){po(e);return}s=s!=null?""+Ve(s):"",i=i!=null?""+Ve(i):s,v||i===e.value||(e.value=i),e.defaultValue=i}o=o??h,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=v?e.checked:!!o,e.defaultChecked=!!o,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),po(e)}function yo(e,i,s){i==="number"&&Tl(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function es(e,i,s,o){if(e=e.options,i){i={};for(var h=0;h<s.length;h++)i["$"+s[h]]=!0;for(s=0;s<e.length;s++)h=i.hasOwnProperty("$"+e[s].value),e[s].selected!==h&&(e[s].selected=h),h&&o&&(e[s].defaultSelected=!0)}else{for(s=""+Ve(s),i=null,h=0;h<e.length;h++){if(e[h].value===s){e[h].selected=!0,o&&(e[h].defaultSelected=!0);return}i!==null||e[h].disabled||(i=e[h])}i!==null&&(i.selected=!0)}}function af(e,i,s){if(i!=null&&(i=""+Ve(i),i!==e.value&&(e.value=i),s==null)){e.defaultValue!==i&&(e.defaultValue=i);return}e.defaultValue=s!=null?""+Ve(s):""}function lf(e,i,s,o){if(i==null){if(o!=null){if(s!=null)throw Error(a(92));if(Tt(o)){if(1<o.length)throw Error(a(93));o=o[0]}s=o}s==null&&(s=""),i=s}s=Ve(i),e.defaultValue=s,o=e.textContent,o===s&&o!==""&&o!==null&&(e.value=o),po(e)}function is(e,i){if(i){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=i;return}}e.textContent=i}var ax=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 rf(e,i,s){var o=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?o?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="":o?e.setProperty(i,s):typeof s!="number"||s===0||ax.has(i)?i==="float"?e.cssFloat=s:e[i]=(""+s).trim():e[i]=s+"px"}function of(e,i,s){if(i!=null&&typeof i!="object")throw Error(a(62));if(e=e.style,s!=null){for(var o in s)!s.hasOwnProperty(o)||i!=null&&i.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var h in i)o=i[h],i.hasOwnProperty(h)&&s[h]!==o&&rf(e,h,o)}else for(var d in i)i.hasOwnProperty(d)&&rf(e,d,i[d])}function xo(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var lx=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"]]),rx=/^[\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 Al(e){return rx.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Si(){}var _o=null;function bo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ns=null,ss=null;function uf(e){var i=Jn(e);if(i&&(e=i.stateNode)){var s=e[Se]||null;t:switch(e=i.stateNode,i.type){case"input":if(go(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),i=s.name,s.type==="radio"&&i!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Pe(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var o=s[i];if(o!==e&&o.form===e.form){var h=o[Se]||null;if(!h)throw Error(a(90));go(o,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(i=0;i<s.length;i++)o=s[i],o.form===e.form&&nf(o)}break t;case"textarea":af(e,s.value,s.defaultValue);break t;case"select":i=s.value,i!=null&&es(e,!!s.multiple,i,!1)}}}var vo=!1;function cf(e,i,s){if(vo)return e(i,s);vo=!0;try{var o=e(i);return o}finally{if(vo=!1,(ns!==null||ss!==null)&&(hr(),ns&&(i=ns,e=ss,ss=ns=null,uf(i),e)))for(i=0;i<e.length;i++)uf(e[i])}}function $s(e,i){var s=e.stateNode;if(s===null)return null;var o=s[Se]||null;if(o===null)return null;s=o[i];t:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break t;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(a(231,i,typeof s));return s}var Ti=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),So=!1;if(Ti)try{var ta={};Object.defineProperty(ta,"passive",{get:function(){So=!0}}),window.addEventListener("test",ta,ta),window.removeEventListener("test",ta,ta)}catch{So=!1}var Zi=null,To=null,wl=null;function hf(){if(wl)return wl;var e,i=To,s=i.length,o,h="value"in Zi?Zi.value:Zi.textContent,d=h.length;for(e=0;e<s&&i[e]===h[e];e++);var y=s-e;for(o=1;o<=y&&i[s-o]===h[d-o];o++);return wl=h.slice(e,1<o?1-o:void 0)}function Cl(e){var i=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&i===13&&(e=13)):e=i,e===10&&(e=13),32<=e||e===13?e:0}function Ml(){return!0}function ff(){return!1}function Te(e){function i(s,o,h,d,y){this._reactName=s,this._targetInst=h,this.type=o,this.nativeEvent=d,this.target=y,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(s=e[v],this[v]=s?s(d):d[v]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Ml:ff,this.isPropagationStopped=ff,this}return x(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Ml)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Ml)},persist:function(){},isPersistent:Ml}),i}var Tn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},El=Te(Tn),ea=x({},Tn,{view:0,detail:0}),ox=Te(ea),Ao,wo,ia,Rl=x({},ea,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mo,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!==ia&&(ia&&e.type==="mousemove"?(Ao=e.screenX-ia.screenX,wo=e.screenY-ia.screenY):wo=Ao=0,ia=e),Ao)},movementY:function(e){return"movementY"in e?e.movementY:wo}}),df=Te(Rl),ux=x({},Rl,{dataTransfer:0}),cx=Te(ux),hx=x({},ea,{relatedTarget:0}),Co=Te(hx),fx=x({},Tn,{animationName:0,elapsedTime:0,pseudoElement:0}),dx=Te(fx),mx=x({},Tn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),px=Te(mx),gx=x({},Tn,{data:0}),mf=Te(gx),yx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xx={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"},_x={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bx(e){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(e):(e=_x[e])?!!i[e]:!1}function Mo(){return bx}var vx=x({},ea,{key:function(e){if(e.key){var i=yx[e.key]||e.key;if(i!=="Unidentified")return i}return e.type==="keypress"?(e=Cl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?xx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mo,charCode:function(e){return e.type==="keypress"?Cl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Cl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Sx=Te(vx),Tx=x({},Rl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pf=Te(Tx),Ax=x({},ea,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mo}),wx=Te(Ax),Cx=x({},Tn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Mx=Te(Cx),Ex=x({},Rl,{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}),Rx=Te(Ex),zx=x({},Tn,{newState:0,oldState:0}),Dx=Te(zx),Bx=[9,13,27,32],Eo=Ti&&"CompositionEvent"in window,na=null;Ti&&"documentMode"in document&&(na=document.documentMode);var Ox=Ti&&"TextEvent"in window&&!na,gf=Ti&&(!Eo||na&&8<na&&11>=na),yf=" ",xf=!1;function _f(e,i){switch(e){case"keyup":return Bx.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var as=!1;function Gx(e,i){switch(e){case"compositionend":return bf(i);case"keypress":return i.which!==32?null:(xf=!0,yf);case"textInput":return e=i.data,e===yf&&xf?null:e;default:return null}}function Ux(e,i){if(as)return e==="compositionend"||!Eo&&_f(e,i)?(e=hf(),wl=To=Zi=null,as=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return gf&&i.locale!=="ko"?null:i.data;default:return null}}var Nx={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 vf(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i==="input"?!!Nx[e.type]:i==="textarea"}function Sf(e,i,s,o){ns?ss?ss.push(o):ss=[o]:ns=o,i=xr(i,"onChange"),0<i.length&&(s=new El("onChange","change",null,s,o),e.push({event:s,listeners:i}))}var sa=null,aa=null;function kx(e){sp(e,0)}function zl(e){var i=Js(e);if(nf(i))return e}function Tf(e,i){if(e==="change")return i}var Af=!1;if(Ti){var Ro;if(Ti){var zo="oninput"in document;if(!zo){var wf=document.createElement("div");wf.setAttribute("oninput","return;"),zo=typeof wf.oninput=="function"}Ro=zo}else Ro=!1;Af=Ro&&(!document.documentMode||9<document.documentMode)}function Cf(){sa&&(sa.detachEvent("onpropertychange",Mf),aa=sa=null)}function Mf(e){if(e.propertyName==="value"&&zl(aa)){var i=[];Sf(i,aa,e,bo(e)),cf(kx,i)}}function Hx(e,i,s){e==="focusin"?(Cf(),sa=i,aa=s,sa.attachEvent("onpropertychange",Mf)):e==="focusout"&&Cf()}function Lx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zl(aa)}function jx(e,i){if(e==="click")return zl(i)}function Yx(e,i){if(e==="input"||e==="change")return zl(i)}function Xx(e,i){return e===i&&(e!==0||1/e===1/i)||e!==e&&i!==i}var Ge=typeof Object.is=="function"?Object.is:Xx;function la(e,i){if(Ge(e,i))return!0;if(typeof e!="object"||e===null||typeof i!="object"||i===null)return!1;var s=Object.keys(e),o=Object.keys(i);if(s.length!==o.length)return!1;for(o=0;o<s.length;o++){var h=s[o];if(!pl.call(i,h)||!Ge(e[h],i[h]))return!1}return!0}function Ef(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rf(e,i){var s=Ef(e);e=0;for(var o;s;){if(s.nodeType===3){if(o=e+s.textContent.length,e<=i&&o>=i)return{node:s,offset:i-e};e=o}t:{for(;s;){if(s.nextSibling){s=s.nextSibling;break t}s=s.parentNode}s=void 0}s=Ef(s)}}function zf(e,i){return e&&i?e===i?!0:e&&e.nodeType===3?!1:i&&i.nodeType===3?zf(e,i.parentNode):"contains"in e?e.contains(i):e.compareDocumentPosition?!!(e.compareDocumentPosition(i)&16):!1:!1}function Df(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var i=Tl(e.document);i instanceof e.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)e=i.contentWindow;else break;i=Tl(e.document)}return i}function Do(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i&&(i==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||i==="textarea"||e.contentEditable==="true")}var qx=Ti&&"documentMode"in document&&11>=document.documentMode,ls=null,Bo=null,ra=null,Oo=!1;function Bf(e,i,s){var o=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Oo||ls==null||ls!==Tl(o)||(o=ls,"selectionStart"in o&&Do(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),ra&&la(ra,o)||(ra=o,o=xr(Bo,"onSelect"),0<o.length&&(i=new El("onSelect","select",null,i,s),e.push({event:i,listeners:o}),i.target=ls)))}function An(e,i){var s={};return s[e.toLowerCase()]=i.toLowerCase(),s["Webkit"+e]="webkit"+i,s["Moz"+e]="moz"+i,s}var rs={animationend:An("Animation","AnimationEnd"),animationiteration:An("Animation","AnimationIteration"),animationstart:An("Animation","AnimationStart"),transitionrun:An("Transition","TransitionRun"),transitionstart:An("Transition","TransitionStart"),transitioncancel:An("Transition","TransitionCancel"),transitionend:An("Transition","TransitionEnd")},Go={},Of={};Ti&&(Of=document.createElement("div").style,"AnimationEvent"in window||(delete rs.animationend.animation,delete rs.animationiteration.animation,delete rs.animationstart.animation),"TransitionEvent"in window||delete rs.transitionend.transition);function wn(e){if(Go[e])return Go[e];if(!rs[e])return e;var i=rs[e],s;for(s in i)if(i.hasOwnProperty(s)&&s in Of)return Go[e]=i[s];return e}var Gf=wn("animationend"),Uf=wn("animationiteration"),Nf=wn("animationstart"),Vx=wn("transitionrun"),Px=wn("transitionstart"),Fx=wn("transitioncancel"),kf=wn("transitionend"),Hf=new Map,Uo="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(" ");Uo.push("scrollEnd");function oi(e,i){Hf.set(e,i),Sn(i,[e])}var Dl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Fe=[],os=0,No=0;function Bl(){for(var e=os,i=No=os=0;i<e;){var s=Fe[i];Fe[i++]=null;var o=Fe[i];Fe[i++]=null;var h=Fe[i];Fe[i++]=null;var d=Fe[i];if(Fe[i++]=null,o!==null&&h!==null){var y=o.pending;y===null?h.next=h:(h.next=y.next,y.next=h),o.pending=h}d!==0&&Lf(s,h,d)}}function Ol(e,i,s,o){Fe[os++]=e,Fe[os++]=i,Fe[os++]=s,Fe[os++]=o,No|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function ko(e,i,s,o){return Ol(e,i,s,o),Gl(e)}function Cn(e,i){return Ol(e,null,null,i),Gl(e)}function Lf(e,i,s){e.lanes|=s;var o=e.alternate;o!==null&&(o.lanes|=s);for(var h=!1,d=e.return;d!==null;)d.childLanes|=s,o=d.alternate,o!==null&&(o.childLanes|=s),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(h=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,h&&i!==null&&(h=31-Oe(s),e=d.hiddenUpdates,o=e[h],o===null?e[h]=[i]:o.push(i),i.lane=s|536870912),d):null}function Gl(e){if(50<Ra)throw Ra=0,Fu=null,Error(a(185));for(var i=e.return;i!==null;)e=i,i=e.return;return e.tag===3?e.stateNode:null}var us={};function Qx(e,i,s,o){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ue(e,i,s,o){return new Qx(e,i,s,o)}function Ho(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ai(e,i){var s=e.alternate;return s===null?(s=Ue(e.tag,i,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=i,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,i=e.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function jf(e,i){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=i,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,i=s.dependencies,e.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),e}function Ul(e,i,s,o,h,d){var y=0;if(o=e,typeof e=="function")Ho(e)&&(y=1);else if(typeof e=="string")y=J_(e,s,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else t:switch(e){case Q:return e=Ue(31,s,i,h),e.elementType=Q,e.lanes=d,e;case A:return Mn(s.children,h,d,i);case T:y=8,h|=24;break;case w:return e=Ue(12,s,i,h|2),e.elementType=w,e.lanes=d,e;case q:return e=Ue(13,s,i,h),e.elementType=q,e.lanes=d,e;case k:return e=Ue(19,s,i,h),e.elementType=k,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case D:y=10;break t;case E:y=9;break t;case O:y=11;break t;case G:y=14;break t;case $:y=16,o=null;break t}y=29,s=Error(a(130,e===null?"null":typeof e,"")),o=null}return i=Ue(y,s,i,h),i.elementType=e,i.type=o,i.lanes=d,i}function Mn(e,i,s,o){return e=Ue(7,e,o,i),e.lanes=s,e}function Lo(e,i,s){return e=Ue(6,e,null,i),e.lanes=s,e}function Yf(e){var i=Ue(18,null,null,0);return i.stateNode=e,i}function jo(e,i,s){return i=Ue(4,e.children!==null?e.children:[],e.key,i),i.lanes=s,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},i}var Xf=new WeakMap;function Qe(e,i){if(typeof e=="object"&&e!==null){var s=Xf.get(e);return s!==void 0?s:(i={value:e,source:i,stack:ml(i)},Xf.set(e,i),i)}return{value:e,source:i,stack:ml(i)}}var cs=[],hs=0,Nl=null,oa=0,We=[],Ze=0,Ki=null,mi=1,pi="";function wi(e,i){cs[hs++]=oa,cs[hs++]=Nl,Nl=e,oa=i}function qf(e,i,s){We[Ze++]=mi,We[Ze++]=pi,We[Ze++]=Ki,Ki=e;var o=mi;e=pi;var h=32-Oe(o)-1;o&=~(1<<h),s+=1;var d=32-Oe(i)+h;if(30<d){var y=h-h%5;d=(o&(1<<y)-1).toString(32),o>>=y,h-=y,mi=1<<32-Oe(i)+h|s<<h|o,pi=d+e}else mi=1<<d|s<<h|o,pi=e}function Yo(e){e.return!==null&&(wi(e,1),qf(e,1,0))}function Xo(e){for(;e===Nl;)Nl=cs[--hs],cs[hs]=null,oa=cs[--hs],cs[hs]=null;for(;e===Ki;)Ki=We[--Ze],We[Ze]=null,pi=We[--Ze],We[Ze]=null,mi=We[--Ze],We[Ze]=null}function Vf(e,i){We[Ze++]=mi,We[Ze++]=pi,We[Ze++]=Ki,mi=i.id,pi=i.overflow,Ki=e}var ue=null,Lt=null,St=!1,Ii=null,Ke=!1,qo=Error(a(519));function Ji(e){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ua(Qe(i,e)),qo}function Pf(e){var i=e.stateNode,s=e.type,o=e.memoizedProps;switch(i[oe]=e,i[Se]=o,s){case"dialog":xt("cancel",i),xt("close",i);break;case"iframe":case"object":case"embed":xt("load",i);break;case"video":case"audio":for(s=0;s<Da.length;s++)xt(Da[s],i);break;case"source":xt("error",i);break;case"img":case"image":case"link":xt("error",i),xt("load",i);break;case"details":xt("toggle",i);break;case"input":xt("invalid",i),sf(i,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":xt("invalid",i);break;case"textarea":xt("invalid",i),lf(i,o.value,o.defaultValue,o.children)}s=o.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||o.suppressHydrationWarning===!0||op(i.textContent,s)?(o.popover!=null&&(xt("beforetoggle",i),xt("toggle",i)),o.onScroll!=null&&xt("scroll",i),o.onScrollEnd!=null&&xt("scrollend",i),o.onClick!=null&&(i.onclick=Si),i=!0):i=!1,i||Ji(e,!0)}function Ff(e){for(ue=e.return;ue;)switch(ue.tag){case 5:case 31:case 13:Ke=!1;return;case 27:case 3:Ke=!0;return;default:ue=ue.return}}function fs(e){if(e!==ue)return!1;if(!St)return Ff(e),St=!0,!1;var i=e.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||rc(e.type,e.memoizedProps)),s=!s),s&&Lt&&Ji(e),Ff(e),i===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));Lt=yp(e)}else if(i===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));Lt=yp(e)}else i===27?(i=Lt,dn(e.type)?(e=fc,fc=null,Lt=e):Lt=i):Lt=ue?Je(e.stateNode.nextSibling):null;return!0}function En(){Lt=ue=null,St=!1}function Vo(){var e=Ii;return e!==null&&(Me===null?Me=e:Me.push.apply(Me,e),Ii=null),e}function ua(e){Ii===null?Ii=[e]:Ii.push(e)}var Po=M(null),Rn=null,Ci=null;function $i(e,i,s){F(Po,i._currentValue),i._currentValue=s}function Mi(e){e._currentValue=Po.current,Y(Po)}function Fo(e,i,s){for(;e!==null;){var o=e.alternate;if((e.childLanes&i)!==i?(e.childLanes|=i,o!==null&&(o.childLanes|=i)):o!==null&&(o.childLanes&i)!==i&&(o.childLanes|=i),e===s)break;e=e.return}}function Qo(e,i,s,o){var h=e.child;for(h!==null&&(h.return=e);h!==null;){var d=h.dependencies;if(d!==null){var y=h.child;d=d.firstContext;t:for(;d!==null;){var v=d;d=h;for(var C=0;C<i.length;C++)if(v.context===i[C]){d.lanes|=s,v=d.alternate,v!==null&&(v.lanes|=s),Fo(d.return,s,e),o||(y=null);break t}d=v.next}}else if(h.tag===18){if(y=h.return,y===null)throw Error(a(341));y.lanes|=s,d=y.alternate,d!==null&&(d.lanes|=s),Fo(y,s,e),y=null}else y=h.child;if(y!==null)y.return=h;else for(y=h;y!==null;){if(y===e){y=null;break}if(h=y.sibling,h!==null){h.return=y.return,y=h;break}y=y.return}h=y}}function ds(e,i,s,o){e=null;for(var h=i,d=!1;h!==null;){if(!d){if((h.flags&524288)!==0)d=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var y=h.alternate;if(y===null)throw Error(a(387));if(y=y.memoizedProps,y!==null){var v=h.type;Ge(h.pendingProps.value,y.value)||(e!==null?e.push(v):e=[v])}}else if(h===ft.current){if(y=h.alternate,y===null)throw Error(a(387));y.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(e!==null?e.push(Na):e=[Na])}h=h.return}e!==null&&Qo(i,e,s,o),i.flags|=262144}function kl(e){for(e=e.firstContext;e!==null;){if(!Ge(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function zn(e){Rn=e,Ci=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ce(e){return Qf(Rn,e)}function Hl(e,i){return Rn===null&&zn(e),Qf(e,i)}function Qf(e,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},Ci===null){if(e===null)throw Error(a(308));Ci=i,e.dependencies={lanes:0,firstContext:i},e.flags|=524288}else Ci=Ci.next=i;return s}var Wx=typeof AbortController<"u"?AbortController:function(){var e=[],i=this.signal={aborted:!1,addEventListener:function(s,o){e.push(o)}};this.abort=function(){i.aborted=!0,e.forEach(function(s){return s()})}},Zx=l.unstable_scheduleCallback,Kx=l.unstable_NormalPriority,Jt={$$typeof:D,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wo(){return{controller:new Wx,data:new Map,refCount:0}}function ca(e){e.refCount--,e.refCount===0&&Zx(Kx,function(){e.controller.abort()})}var ha=null,Zo=0,ms=0,ps=null;function Ix(e,i){if(ha===null){var s=ha=[];Zo=0,ms=Ju(),ps={status:"pending",value:void 0,then:function(o){s.push(o)}}}return Zo++,i.then(Wf,Wf),i}function Wf(){if(--Zo===0&&ha!==null){ps!==null&&(ps.status="fulfilled");var e=ha;ha=null,ms=0,ps=null;for(var i=0;i<e.length;i++)(0,e[i])()}}function Jx(e,i){var s=[],o={status:"pending",value:null,reason:null,then:function(h){s.push(h)}};return e.then(function(){o.status="fulfilled",o.value=i;for(var h=0;h<s.length;h++)(0,s[h])(i)},function(h){for(o.status="rejected",o.reason=h,h=0;h<s.length;h++)(0,s[h])(void 0)}),o}var Zf=z.S;z.S=function(e,i){Bm=De(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&Ix(e,i),Zf!==null&&Zf(e,i)};var Dn=M(null);function Ko(){var e=Dn.current;return e!==null?e:Nt.pooledCache}function Ll(e,i){i===null?F(Dn,Dn.current):F(Dn,i.pool)}function Kf(){var e=Ko();return e===null?null:{parent:Jt._currentValue,pool:e}}var gs=Error(a(460)),Io=Error(a(474)),jl=Error(a(542)),Yl={then:function(){}};function If(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Jf(e,i,s){switch(s=e[s],s===void 0?e.push(i):s!==i&&(i.then(Si,Si),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,td(e),e;default:if(typeof i.status=="string")i.then(Si,Si);else{if(e=Nt,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=i,e.status="pending",e.then(function(o){if(i.status==="pending"){var h=i;h.status="fulfilled",h.value=o}},function(o){if(i.status==="pending"){var h=i;h.status="rejected",h.reason=o}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,td(e),e}throw On=i,gs}}function Bn(e){try{var i=e._init;return i(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(On=s,gs):s}}var On=null;function $f(){if(On===null)throw Error(a(459));var e=On;return On=null,e}function td(e){if(e===gs||e===jl)throw Error(a(483))}var ys=null,fa=0;function Xl(e){var i=fa;return fa+=1,ys===null&&(ys=[]),Jf(ys,e,i)}function da(e,i){i=i.props.ref,e.ref=i!==void 0?i:null}function ql(e,i){throw i.$$typeof===b?Error(a(525)):(e=Object.prototype.toString.call(i),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e)))}function ed(e){function i(B,R){if(e){var U=B.deletions;U===null?(B.deletions=[R],B.flags|=16):U.push(R)}}function s(B,R){if(!e)return null;for(;R!==null;)i(B,R),R=R.sibling;return null}function o(B){for(var R=new Map;B!==null;)B.key!==null?R.set(B.key,B):R.set(B.index,B),B=B.sibling;return R}function h(B,R){return B=Ai(B,R),B.index=0,B.sibling=null,B}function d(B,R,U){return B.index=U,e?(U=B.alternate,U!==null?(U=U.index,U<R?(B.flags|=67108866,R):U):(B.flags|=67108866,R)):(B.flags|=1048576,R)}function y(B){return e&&B.alternate===null&&(B.flags|=67108866),B}function v(B,R,U,V){return R===null||R.tag!==6?(R=Lo(U,B.mode,V),R.return=B,R):(R=h(R,U),R.return=B,R)}function C(B,R,U,V){var ot=U.type;return ot===A?X(B,R,U.props.children,V,U.key):R!==null&&(R.elementType===ot||typeof ot=="object"&&ot!==null&&ot.$$typeof===$&&Bn(ot)===R.type)?(R=h(R,U.props),da(R,U),R.return=B,R):(R=Ul(U.type,U.key,U.props,null,B.mode,V),da(R,U),R.return=B,R)}function N(B,R,U,V){return R===null||R.tag!==4||R.stateNode.containerInfo!==U.containerInfo||R.stateNode.implementation!==U.implementation?(R=jo(U,B.mode,V),R.return=B,R):(R=h(R,U.children||[]),R.return=B,R)}function X(B,R,U,V,ot){return R===null||R.tag!==7?(R=Mn(U,B.mode,V,ot),R.return=B,R):(R=h(R,U),R.return=B,R)}function P(B,R,U){if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return R=Lo(""+R,B.mode,U),R.return=B,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case _:return U=Ul(R.type,R.key,R.props,null,B.mode,U),da(U,R),U.return=B,U;case S:return R=jo(R,B.mode,U),R.return=B,R;case $:return R=Bn(R),P(B,R,U)}if(Tt(R)||J(R))return R=Mn(R,B.mode,U,null),R.return=B,R;if(typeof R.then=="function")return P(B,Xl(R),U);if(R.$$typeof===D)return P(B,Hl(B,R),U);ql(B,R)}return null}function H(B,R,U,V){var ot=R!==null?R.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return ot!==null?null:v(B,R,""+U,V);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case _:return U.key===ot?C(B,R,U,V):null;case S:return U.key===ot?N(B,R,U,V):null;case $:return U=Bn(U),H(B,R,U,V)}if(Tt(U)||J(U))return ot!==null?null:X(B,R,U,V,null);if(typeof U.then=="function")return H(B,R,Xl(U),V);if(U.$$typeof===D)return H(B,R,Hl(B,U),V);ql(B,U)}return null}function j(B,R,U,V,ot){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return B=B.get(U)||null,v(R,B,""+V,ot);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case _:return B=B.get(V.key===null?U:V.key)||null,C(R,B,V,ot);case S:return B=B.get(V.key===null?U:V.key)||null,N(R,B,V,ot);case $:return V=Bn(V),j(B,R,U,V,ot)}if(Tt(V)||J(V))return B=B.get(U)||null,X(R,B,V,ot,null);if(typeof V.then=="function")return j(B,R,U,Xl(V),ot);if(V.$$typeof===D)return j(B,R,U,Hl(R,V),ot);ql(R,V)}return null}function st(B,R,U,V){for(var ot=null,wt=null,lt=R,pt=R=0,bt=null;lt!==null&&pt<U.length;pt++){lt.index>pt?(bt=lt,lt=null):bt=lt.sibling;var Ct=H(B,lt,U[pt],V);if(Ct===null){lt===null&&(lt=bt);break}e&&lt&&Ct.alternate===null&&i(B,lt),R=d(Ct,R,pt),wt===null?ot=Ct:wt.sibling=Ct,wt=Ct,lt=bt}if(pt===U.length)return s(B,lt),St&&wi(B,pt),ot;if(lt===null){for(;pt<U.length;pt++)lt=P(B,U[pt],V),lt!==null&&(R=d(lt,R,pt),wt===null?ot=lt:wt.sibling=lt,wt=lt);return St&&wi(B,pt),ot}for(lt=o(lt);pt<U.length;pt++)bt=j(lt,B,pt,U[pt],V),bt!==null&&(e&&bt.alternate!==null&&lt.delete(bt.key===null?pt:bt.key),R=d(bt,R,pt),wt===null?ot=bt:wt.sibling=bt,wt=bt);return e&&lt.forEach(function(xn){return i(B,xn)}),St&&wi(B,pt),ot}function ut(B,R,U,V){if(U==null)throw Error(a(151));for(var ot=null,wt=null,lt=R,pt=R=0,bt=null,Ct=U.next();lt!==null&&!Ct.done;pt++,Ct=U.next()){lt.index>pt?(bt=lt,lt=null):bt=lt.sibling;var xn=H(B,lt,Ct.value,V);if(xn===null){lt===null&&(lt=bt);break}e&&lt&&xn.alternate===null&&i(B,lt),R=d(xn,R,pt),wt===null?ot=xn:wt.sibling=xn,wt=xn,lt=bt}if(Ct.done)return s(B,lt),St&&wi(B,pt),ot;if(lt===null){for(;!Ct.done;pt++,Ct=U.next())Ct=P(B,Ct.value,V),Ct!==null&&(R=d(Ct,R,pt),wt===null?ot=Ct:wt.sibling=Ct,wt=Ct);return St&&wi(B,pt),ot}for(lt=o(lt);!Ct.done;pt++,Ct=U.next())Ct=j(lt,B,pt,Ct.value,V),Ct!==null&&(e&&Ct.alternate!==null&&lt.delete(Ct.key===null?pt:Ct.key),R=d(Ct,R,pt),wt===null?ot=Ct:wt.sibling=Ct,wt=Ct);return e&&lt.forEach(function(u1){return i(B,u1)}),St&&wi(B,pt),ot}function Gt(B,R,U,V){if(typeof U=="object"&&U!==null&&U.type===A&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case _:t:{for(var ot=U.key;R!==null;){if(R.key===ot){if(ot=U.type,ot===A){if(R.tag===7){s(B,R.sibling),V=h(R,U.props.children),V.return=B,B=V;break t}}else if(R.elementType===ot||typeof ot=="object"&&ot!==null&&ot.$$typeof===$&&Bn(ot)===R.type){s(B,R.sibling),V=h(R,U.props),da(V,U),V.return=B,B=V;break t}s(B,R);break}else i(B,R);R=R.sibling}U.type===A?(V=Mn(U.props.children,B.mode,V,U.key),V.return=B,B=V):(V=Ul(U.type,U.key,U.props,null,B.mode,V),da(V,U),V.return=B,B=V)}return y(B);case S:t:{for(ot=U.key;R!==null;){if(R.key===ot)if(R.tag===4&&R.stateNode.containerInfo===U.containerInfo&&R.stateNode.implementation===U.implementation){s(B,R.sibling),V=h(R,U.children||[]),V.return=B,B=V;break t}else{s(B,R);break}else i(B,R);R=R.sibling}V=jo(U,B.mode,V),V.return=B,B=V}return y(B);case $:return U=Bn(U),Gt(B,R,U,V)}if(Tt(U))return st(B,R,U,V);if(J(U)){if(ot=J(U),typeof ot!="function")throw Error(a(150));return U=ot.call(U),ut(B,R,U,V)}if(typeof U.then=="function")return Gt(B,R,Xl(U),V);if(U.$$typeof===D)return Gt(B,R,Hl(B,U),V);ql(B,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,R!==null&&R.tag===6?(s(B,R.sibling),V=h(R,U),V.return=B,B=V):(s(B,R),V=Lo(U,B.mode,V),V.return=B,B=V),y(B)):s(B,R)}return function(B,R,U,V){try{fa=0;var ot=Gt(B,R,U,V);return ys=null,ot}catch(lt){if(lt===gs||lt===jl)throw lt;var wt=Ue(29,lt,null,B.mode);return wt.lanes=V,wt.return=B,wt}finally{}}}var Gn=ed(!0),id=ed(!1),tn=!1;function Jo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $o(e,i){e=e.updateQueue,i.updateQueue===e&&(i.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function en(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function nn(e,i,s){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Et&2)!==0){var h=o.pending;return h===null?i.next=i:(i.next=h.next,h.next=i),o.pending=i,i=Gl(e),Lf(e,null,s),i}return Ol(e,o,i,s),Gl(e)}function ma(e,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var o=i.lanes;o&=e.pendingLanes,s|=o,i.lanes=s,Fh(e,s)}}function tu(e,i){var s=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,s===o)){var h=null,d=null;if(s=s.firstBaseUpdate,s!==null){do{var y={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};d===null?h=d=y:d=d.next=y,s=s.next}while(s!==null);d===null?h=d=i:d=d.next=i}else h=d=i;s={baseState:o.baseState,firstBaseUpdate:h,lastBaseUpdate:d,shared:o.shared,callbacks:o.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=i:e.next=i,s.lastBaseUpdate=i}var eu=!1;function pa(){if(eu){var e=ps;if(e!==null)throw e}}function ga(e,i,s,o){eu=!1;var h=e.updateQueue;tn=!1;var d=h.firstBaseUpdate,y=h.lastBaseUpdate,v=h.shared.pending;if(v!==null){h.shared.pending=null;var C=v,N=C.next;C.next=null,y===null?d=N:y.next=N,y=C;var X=e.alternate;X!==null&&(X=X.updateQueue,v=X.lastBaseUpdate,v!==y&&(v===null?X.firstBaseUpdate=N:v.next=N,X.lastBaseUpdate=C))}if(d!==null){var P=h.baseState;y=0,X=N=C=null,v=d;do{var H=v.lane&-536870913,j=H!==v.lane;if(j?(_t&H)===H:(o&H)===H){H!==0&&H===ms&&(eu=!0),X!==null&&(X=X.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});t:{var st=e,ut=v;H=i;var Gt=s;switch(ut.tag){case 1:if(st=ut.payload,typeof st=="function"){P=st.call(Gt,P,H);break t}P=st;break t;case 3:st.flags=st.flags&-65537|128;case 0:if(st=ut.payload,H=typeof st=="function"?st.call(Gt,P,H):st,H==null)break t;P=x({},P,H);break t;case 2:tn=!0}}H=v.callback,H!==null&&(e.flags|=64,j&&(e.flags|=8192),j=h.callbacks,j===null?h.callbacks=[H]:j.push(H))}else j={lane:H,tag:v.tag,payload:v.payload,callback:v.callback,next:null},X===null?(N=X=j,C=P):X=X.next=j,y|=H;if(v=v.next,v===null){if(v=h.shared.pending,v===null)break;j=v,v=j.next,j.next=null,h.lastBaseUpdate=j,h.shared.pending=null}}while(!0);X===null&&(C=P),h.baseState=C,h.firstBaseUpdate=N,h.lastBaseUpdate=X,d===null&&(h.shared.lanes=0),on|=y,e.lanes=y,e.memoizedState=P}}function nd(e,i){if(typeof e!="function")throw Error(a(191,e));e.call(i)}function sd(e,i){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)nd(s[e],i)}var xs=M(null),Vl=M(0);function ad(e,i){e=Ni,F(Vl,e),F(xs,i),Ni=e|i.baseLanes}function iu(){F(Vl,Ni),F(xs,xs.current)}function nu(){Ni=Vl.current,Y(xs),Y(Vl)}var Ne=M(null),Ie=null;function sn(e){var i=e.alternate;F(Wt,Wt.current&1),F(Ne,e),Ie===null&&(i===null||xs.current!==null||i.memoizedState!==null)&&(Ie=e)}function su(e){F(Wt,Wt.current),F(Ne,e),Ie===null&&(Ie=e)}function ld(e){e.tag===22?(F(Wt,Wt.current),F(Ne,e),Ie===null&&(Ie=e)):an()}function an(){F(Wt,Wt.current),F(Ne,Ne.current)}function ke(e){Y(Ne),Ie===e&&(Ie=null),Y(Wt)}var Wt=M(0);function Pl(e){for(var i=e;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||cc(s)||hc(s)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Ei=0,mt=null,Bt=null,$t=null,Fl=!1,_s=!1,Un=!1,Ql=0,ya=0,bs=null,$x=0;function qt(){throw Error(a(321))}function au(e,i){if(i===null)return!1;for(var s=0;s<i.length&&s<e.length;s++)if(!Ge(e[s],i[s]))return!1;return!0}function lu(e,i,s,o,h,d){return Ei=d,mt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,z.H=e===null||e.memoizedState===null?qd:vu,Un=!1,d=s(o,h),Un=!1,_s&&(d=od(i,s,o,h)),rd(e),d}function rd(e){z.H=ba;var i=Bt!==null&&Bt.next!==null;if(Ei=0,$t=Bt=mt=null,Fl=!1,ya=0,bs=null,i)throw Error(a(300));e===null||te||(e=e.dependencies,e!==null&&kl(e)&&(te=!0))}function od(e,i,s,o){mt=e;var h=0;do{if(_s&&(bs=null),ya=0,_s=!1,25<=h)throw Error(a(301));if(h+=1,$t=Bt=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}z.H=Vd,d=i(s,o)}while(_s);return d}function t_(){var e=z.H,i=e.useState()[0];return i=typeof i.then=="function"?xa(i):i,e=e.useState()[0],(Bt!==null?Bt.memoizedState:null)!==e&&(mt.flags|=1024),i}function ru(){var e=Ql!==0;return Ql=0,e}function ou(e,i,s){i.updateQueue=e.updateQueue,i.flags&=-2053,e.lanes&=~s}function uu(e){if(Fl){for(e=e.memoizedState;e!==null;){var i=e.queue;i!==null&&(i.pending=null),e=e.next}Fl=!1}Ei=0,$t=Bt=mt=null,_s=!1,ya=Ql=0,bs=null}function xe(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $t===null?mt.memoizedState=$t=e:$t=$t.next=e,$t}function Zt(){if(Bt===null){var e=mt.alternate;e=e!==null?e.memoizedState:null}else e=Bt.next;var i=$t===null?mt.memoizedState:$t.next;if(i!==null)$t=i,Bt=e;else{if(e===null)throw mt.alternate===null?Error(a(467)):Error(a(310));Bt=e,e={memoizedState:Bt.memoizedState,baseState:Bt.baseState,baseQueue:Bt.baseQueue,queue:Bt.queue,next:null},$t===null?mt.memoizedState=$t=e:$t=$t.next=e}return $t}function Wl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xa(e){var i=ya;return ya+=1,bs===null&&(bs=[]),e=Jf(bs,e,i),i=mt,($t===null?i.memoizedState:$t.next)===null&&(i=i.alternate,z.H=i===null||i.memoizedState===null?qd:vu),e}function Zl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return xa(e);if(e.$$typeof===D)return ce(e)}throw Error(a(438,String(e)))}function cu(e){var i=null,s=mt.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var o=mt.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(i={data:o.data.map(function(h){return h.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=Wl(),mt.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(e),o=0;o<e;o++)s[o]=W;return i.index++,s}function Ri(e,i){return typeof i=="function"?i(e):i}function Kl(e){var i=Zt();return hu(i,Bt,e)}function hu(e,i,s){var o=e.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=s;var h=e.baseQueue,d=o.pending;if(d!==null){if(h!==null){var y=h.next;h.next=d.next,d.next=y}i.baseQueue=h=d,o.pending=null}if(d=e.baseState,h===null)e.memoizedState=d;else{i=h.next;var v=y=null,C=null,N=i,X=!1;do{var P=N.lane&-536870913;if(P!==N.lane?(_t&P)===P:(Ei&P)===P){var H=N.revertLane;if(H===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),P===ms&&(X=!0);else if((Ei&H)===H){N=N.next,H===ms&&(X=!0);continue}else P={lane:0,revertLane:N.revertLane,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},C===null?(v=C=P,y=d):C=C.next=P,mt.lanes|=H,on|=H;P=N.action,Un&&s(d,P),d=N.hasEagerState?N.eagerState:s(d,P)}else H={lane:P,revertLane:N.revertLane,gesture:N.gesture,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},C===null?(v=C=H,y=d):C=C.next=H,mt.lanes|=P,on|=P;N=N.next}while(N!==null&&N!==i);if(C===null?y=d:C.next=v,!Ge(d,e.memoizedState)&&(te=!0,X&&(s=ps,s!==null)))throw s;e.memoizedState=d,e.baseState=y,e.baseQueue=C,o.lastRenderedState=d}return h===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function fu(e){var i=Zt(),s=i.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=e;var o=s.dispatch,h=s.pending,d=i.memoizedState;if(h!==null){s.pending=null;var y=h=h.next;do d=e(d,y.action),y=y.next;while(y!==h);Ge(d,i.memoizedState)||(te=!0),i.memoizedState=d,i.baseQueue===null&&(i.baseState=d),s.lastRenderedState=d}return[d,o]}function ud(e,i,s){var o=mt,h=Zt(),d=St;if(d){if(s===void 0)throw Error(a(407));s=s()}else s=i();var y=!Ge((Bt||h).memoizedState,s);if(y&&(h.memoizedState=s,te=!0),h=h.queue,pu(fd.bind(null,o,h,e),[e]),h.getSnapshot!==i||y||$t!==null&&$t.memoizedState.tag&1){if(o.flags|=2048,vs(9,{destroy:void 0},hd.bind(null,o,h,s,i),null),Nt===null)throw Error(a(349));d||(Ei&127)!==0||cd(o,i,s)}return s}function cd(e,i,s){e.flags|=16384,e={getSnapshot:i,value:s},i=mt.updateQueue,i===null?(i=Wl(),mt.updateQueue=i,i.stores=[e]):(s=i.stores,s===null?i.stores=[e]:s.push(e))}function hd(e,i,s,o){i.value=s,i.getSnapshot=o,dd(i)&&md(e)}function fd(e,i,s){return s(function(){dd(i)&&md(e)})}function dd(e){var i=e.getSnapshot;e=e.value;try{var s=i();return!Ge(e,s)}catch{return!0}}function md(e){var i=Cn(e,2);i!==null&&Ee(i,e,2)}function du(e){var i=xe();if(typeof e=="function"){var s=e;if(e=s(),Un){Qi(!0);try{s()}finally{Qi(!1)}}}return i.memoizedState=i.baseState=e,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ri,lastRenderedState:e},i}function pd(e,i,s,o){return e.baseState=s,hu(e,Bt,typeof o=="function"?o:Ri)}function e_(e,i,s,o,h){if($l(e))throw Error(a(485));if(e=i.action,e!==null){var d={payload:h,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){d.listeners.push(y)}};z.T!==null?s(!0):d.isTransition=!1,o(d),s=i.pending,s===null?(d.next=i.pending=d,gd(i,d)):(d.next=s.next,i.pending=s.next=d)}}function gd(e,i){var s=i.action,o=i.payload,h=e.state;if(i.isTransition){var d=z.T,y={};z.T=y;try{var v=s(h,o),C=z.S;C!==null&&C(y,v),yd(e,i,v)}catch(N){mu(e,i,N)}finally{d!==null&&y.types!==null&&(d.types=y.types),z.T=d}}else try{d=s(h,o),yd(e,i,d)}catch(N){mu(e,i,N)}}function yd(e,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(o){xd(e,i,o)},function(o){return mu(e,i,o)}):xd(e,i,s)}function xd(e,i,s){i.status="fulfilled",i.value=s,_d(i),e.state=s,i=e.pending,i!==null&&(s=i.next,s===i?e.pending=null:(s=s.next,i.next=s,gd(e,s)))}function mu(e,i,s){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do i.status="rejected",i.reason=s,_d(i),i=i.next;while(i!==o)}e.action=null}function _d(e){e=e.listeners;for(var i=0;i<e.length;i++)(0,e[i])()}function bd(e,i){return i}function vd(e,i){if(St){var s=Nt.formState;if(s!==null){t:{var o=mt;if(St){if(Lt){e:{for(var h=Lt,d=Ke;h.nodeType!==8;){if(!d){h=null;break e}if(h=Je(h.nextSibling),h===null){h=null;break e}}d=h.data,h=d==="F!"||d==="F"?h:null}if(h){Lt=Je(h.nextSibling),o=h.data==="F!";break t}}Ji(o)}o=!1}o&&(i=s[0])}}return s=xe(),s.memoizedState=s.baseState=i,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bd,lastRenderedState:i},s.queue=o,s=jd.bind(null,mt,o),o.dispatch=s,o=du(!1),d=bu.bind(null,mt,!1,o.queue),o=xe(),h={state:i,dispatch:null,action:e,pending:null},o.queue=h,s=e_.bind(null,mt,h,d,s),h.dispatch=s,o.memoizedState=e,[i,s,!1]}function Sd(e){var i=Zt();return Td(i,Bt,e)}function Td(e,i,s){if(i=hu(e,i,bd)[0],e=Kl(Ri)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var o=xa(i)}catch(y){throw y===gs?jl:y}else o=i;i=Zt();var h=i.queue,d=h.dispatch;return s!==i.memoizedState&&(mt.flags|=2048,vs(9,{destroy:void 0},i_.bind(null,h,s),null)),[o,d,e]}function i_(e,i){e.action=i}function Ad(e){var i=Zt(),s=Bt;if(s!==null)return Td(i,s,e);Zt(),i=i.memoizedState,s=Zt();var o=s.queue.dispatch;return s.memoizedState=e,[i,o,!1]}function vs(e,i,s,o){return e={tag:e,create:s,deps:o,inst:i,next:null},i=mt.updateQueue,i===null&&(i=Wl(),mt.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=e.next=e:(o=s.next,s.next=e,e.next=o,i.lastEffect=e),e}function wd(){return Zt().memoizedState}function Il(e,i,s,o){var h=xe();mt.flags|=e,h.memoizedState=vs(1|i,{destroy:void 0},s,o===void 0?null:o)}function Jl(e,i,s,o){var h=Zt();o=o===void 0?null:o;var d=h.memoizedState.inst;Bt!==null&&o!==null&&au(o,Bt.memoizedState.deps)?h.memoizedState=vs(i,d,s,o):(mt.flags|=e,h.memoizedState=vs(1|i,d,s,o))}function Cd(e,i){Il(8390656,8,e,i)}function pu(e,i){Jl(2048,8,e,i)}function n_(e){mt.flags|=4;var i=mt.updateQueue;if(i===null)i=Wl(),mt.updateQueue=i,i.events=[e];else{var s=i.events;s===null?i.events=[e]:s.push(e)}}function Md(e){var i=Zt().memoizedState;return n_({ref:i,nextImpl:e}),function(){if((Et&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function Ed(e,i){return Jl(4,2,e,i)}function Rd(e,i){return Jl(4,4,e,i)}function zd(e,i){if(typeof i=="function"){e=e();var s=i(e);return function(){typeof s=="function"?s():i(null)}}if(i!=null)return e=e(),i.current=e,function(){i.current=null}}function Dd(e,i,s){s=s!=null?s.concat([e]):null,Jl(4,4,zd.bind(null,i,e),s)}function gu(){}function Bd(e,i){var s=Zt();i=i===void 0?null:i;var o=s.memoizedState;return i!==null&&au(i,o[1])?o[0]:(s.memoizedState=[e,i],e)}function Od(e,i){var s=Zt();i=i===void 0?null:i;var o=s.memoizedState;if(i!==null&&au(i,o[1]))return o[0];if(o=e(),Un){Qi(!0);try{e()}finally{Qi(!1)}}return s.memoizedState=[o,i],o}function yu(e,i,s){return s===void 0||(Ei&1073741824)!==0&&(_t&261930)===0?e.memoizedState=i:(e.memoizedState=s,e=Gm(),mt.lanes|=e,on|=e,s)}function Gd(e,i,s,o){return Ge(s,i)?s:xs.current!==null?(e=yu(e,s,o),Ge(e,i)||(te=!0),e):(Ei&42)===0||(Ei&1073741824)!==0&&(_t&261930)===0?(te=!0,e.memoizedState=s):(e=Gm(),mt.lanes|=e,on|=e,i)}function Ud(e,i,s,o,h){var d=L.p;L.p=d!==0&&8>d?d:8;var y=z.T,v={};z.T=v,bu(e,!1,i,s);try{var C=h(),N=z.S;if(N!==null&&N(v,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var X=Jx(C,o);_a(e,i,X,je(e))}else _a(e,i,o,je(e))}catch(P){_a(e,i,{then:function(){},status:"rejected",reason:P},je())}finally{L.p=d,y!==null&&v.types!==null&&(y.types=v.types),z.T=y}}function s_(){}function xu(e,i,s,o){if(e.tag!==5)throw Error(a(476));var h=Nd(e).queue;Ud(e,h,i,et,s===null?s_:function(){return kd(e),s(o)})}function Nd(e){var i=e.memoizedState;if(i!==null)return i;i={memoizedState:et,baseState:et,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ri,lastRenderedState:et},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ri,lastRenderedState:s},next:null},e.memoizedState=i,e=e.alternate,e!==null&&(e.memoizedState=i),i}function kd(e){var i=Nd(e);i.next===null&&(i=e.alternate.memoizedState),_a(e,i.next.queue,{},je())}function _u(){return ce(Na)}function Hd(){return Zt().memoizedState}function Ld(){return Zt().memoizedState}function a_(e){for(var i=e.return;i!==null;){switch(i.tag){case 24:case 3:var s=je();e=en(s);var o=nn(i,e,s);o!==null&&(Ee(o,i,s),ma(o,i,s)),i={cache:Wo()},e.payload=i;return}i=i.return}}function l_(e,i,s){var o=je();s={lane:o,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},$l(e)?Yd(i,s):(s=ko(e,i,s,o),s!==null&&(Ee(s,e,o),Xd(s,i,o)))}function jd(e,i,s){var o=je();_a(e,i,s,o)}function _a(e,i,s,o){var h={lane:o,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if($l(e))Yd(i,h);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=i.lastRenderedReducer,d!==null))try{var y=i.lastRenderedState,v=d(y,s);if(h.hasEagerState=!0,h.eagerState=v,Ge(v,y))return Ol(e,i,h,0),Nt===null&&Bl(),!1}catch{}finally{}if(s=ko(e,i,h,o),s!==null)return Ee(s,e,o),Xd(s,i,o),!0}return!1}function bu(e,i,s,o){if(o={lane:2,revertLane:Ju(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},$l(e)){if(i)throw Error(a(479))}else i=ko(e,s,o,2),i!==null&&Ee(i,e,2)}function $l(e){var i=e.alternate;return e===mt||i!==null&&i===mt}function Yd(e,i){_s=Fl=!0;var s=e.pending;s===null?i.next=i:(i.next=s.next,s.next=i),e.pending=i}function Xd(e,i,s){if((s&4194048)!==0){var o=i.lanes;o&=e.pendingLanes,s|=o,i.lanes=s,Fh(e,s)}}var ba={readContext:ce,use:Zl,useCallback:qt,useContext:qt,useEffect:qt,useImperativeHandle:qt,useLayoutEffect:qt,useInsertionEffect:qt,useMemo:qt,useReducer:qt,useRef:qt,useState:qt,useDebugValue:qt,useDeferredValue:qt,useTransition:qt,useSyncExternalStore:qt,useId:qt,useHostTransitionStatus:qt,useFormState:qt,useActionState:qt,useOptimistic:qt,useMemoCache:qt,useCacheRefresh:qt};ba.useEffectEvent=qt;var qd={readContext:ce,use:Zl,useCallback:function(e,i){return xe().memoizedState=[e,i===void 0?null:i],e},useContext:ce,useEffect:Cd,useImperativeHandle:function(e,i,s){s=s!=null?s.concat([e]):null,Il(4194308,4,zd.bind(null,i,e),s)},useLayoutEffect:function(e,i){return Il(4194308,4,e,i)},useInsertionEffect:function(e,i){Il(4,2,e,i)},useMemo:function(e,i){var s=xe();i=i===void 0?null:i;var o=e();if(Un){Qi(!0);try{e()}finally{Qi(!1)}}return s.memoizedState=[o,i],o},useReducer:function(e,i,s){var o=xe();if(s!==void 0){var h=s(i);if(Un){Qi(!0);try{s(i)}finally{Qi(!1)}}}else h=i;return o.memoizedState=o.baseState=h,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:h},o.queue=e,e=e.dispatch=l_.bind(null,mt,e),[o.memoizedState,e]},useRef:function(e){var i=xe();return e={current:e},i.memoizedState=e},useState:function(e){e=du(e);var i=e.queue,s=jd.bind(null,mt,i);return i.dispatch=s,[e.memoizedState,s]},useDebugValue:gu,useDeferredValue:function(e,i){var s=xe();return yu(s,e,i)},useTransition:function(){var e=du(!1);return e=Ud.bind(null,mt,e.queue,!0,!1),xe().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,i,s){var o=mt,h=xe();if(St){if(s===void 0)throw Error(a(407));s=s()}else{if(s=i(),Nt===null)throw Error(a(349));(_t&127)!==0||cd(o,i,s)}h.memoizedState=s;var d={value:s,getSnapshot:i};return h.queue=d,Cd(fd.bind(null,o,d,e),[e]),o.flags|=2048,vs(9,{destroy:void 0},hd.bind(null,o,d,s,i),null),s},useId:function(){var e=xe(),i=Nt.identifierPrefix;if(St){var s=pi,o=mi;s=(o&~(1<<32-Oe(o)-1)).toString(32)+s,i="_"+i+"R_"+s,s=Ql++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=$x++,i="_"+i+"r_"+s.toString(32)+"_";return e.memoizedState=i},useHostTransitionStatus:_u,useFormState:vd,useActionState:vd,useOptimistic:function(e){var i=xe();i.memoizedState=i.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=bu.bind(null,mt,!0,s),s.dispatch=i,[e,i]},useMemoCache:cu,useCacheRefresh:function(){return xe().memoizedState=a_.bind(null,mt)},useEffectEvent:function(e){var i=xe(),s={impl:e};return i.memoizedState=s,function(){if((Et&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},vu={readContext:ce,use:Zl,useCallback:Bd,useContext:ce,useEffect:pu,useImperativeHandle:Dd,useInsertionEffect:Ed,useLayoutEffect:Rd,useMemo:Od,useReducer:Kl,useRef:wd,useState:function(){return Kl(Ri)},useDebugValue:gu,useDeferredValue:function(e,i){var s=Zt();return Gd(s,Bt.memoizedState,e,i)},useTransition:function(){var e=Kl(Ri)[0],i=Zt().memoizedState;return[typeof e=="boolean"?e:xa(e),i]},useSyncExternalStore:ud,useId:Hd,useHostTransitionStatus:_u,useFormState:Sd,useActionState:Sd,useOptimistic:function(e,i){var s=Zt();return pd(s,Bt,e,i)},useMemoCache:cu,useCacheRefresh:Ld};vu.useEffectEvent=Md;var Vd={readContext:ce,use:Zl,useCallback:Bd,useContext:ce,useEffect:pu,useImperativeHandle:Dd,useInsertionEffect:Ed,useLayoutEffect:Rd,useMemo:Od,useReducer:fu,useRef:wd,useState:function(){return fu(Ri)},useDebugValue:gu,useDeferredValue:function(e,i){var s=Zt();return Bt===null?yu(s,e,i):Gd(s,Bt.memoizedState,e,i)},useTransition:function(){var e=fu(Ri)[0],i=Zt().memoizedState;return[typeof e=="boolean"?e:xa(e),i]},useSyncExternalStore:ud,useId:Hd,useHostTransitionStatus:_u,useFormState:Ad,useActionState:Ad,useOptimistic:function(e,i){var s=Zt();return Bt!==null?pd(s,Bt,e,i):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:cu,useCacheRefresh:Ld};Vd.useEffectEvent=Md;function Su(e,i,s,o){i=e.memoizedState,s=s(o,i),s=s==null?i:x({},i,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var Tu={enqueueSetState:function(e,i,s){e=e._reactInternals;var o=je(),h=en(o);h.payload=i,s!=null&&(h.callback=s),i=nn(e,h,o),i!==null&&(Ee(i,e,o),ma(i,e,o))},enqueueReplaceState:function(e,i,s){e=e._reactInternals;var o=je(),h=en(o);h.tag=1,h.payload=i,s!=null&&(h.callback=s),i=nn(e,h,o),i!==null&&(Ee(i,e,o),ma(i,e,o))},enqueueForceUpdate:function(e,i){e=e._reactInternals;var s=je(),o=en(s);o.tag=2,i!=null&&(o.callback=i),i=nn(e,o,s),i!==null&&(Ee(i,e,s),ma(i,e,s))}};function Pd(e,i,s,o,h,d,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,d,y):i.prototype&&i.prototype.isPureReactComponent?!la(s,o)||!la(h,d):!0}function Fd(e,i,s,o){e=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,o),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,o),i.state!==e&&Tu.enqueueReplaceState(i,i.state,null)}function Nn(e,i){var s=i;if("ref"in i){s={};for(var o in i)o!=="ref"&&(s[o]=i[o])}if(e=e.defaultProps){s===i&&(s=x({},s));for(var h in e)s[h]===void 0&&(s[h]=e[h])}return s}function Qd(e){Dl(e)}function Wd(e){console.error(e)}function Zd(e){Dl(e)}function tr(e,i){try{var s=e.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(o){setTimeout(function(){throw o})}}function Kd(e,i,s){try{var o=e.onCaughtError;o(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function Au(e,i,s){return s=en(s),s.tag=3,s.payload={element:null},s.callback=function(){tr(e,i)},s}function Id(e){return e=en(e),e.tag=3,e}function Jd(e,i,s,o){var h=s.type.getDerivedStateFromError;if(typeof h=="function"){var d=o.value;e.payload=function(){return h(d)},e.callback=function(){Kd(i,s,o)}}var y=s.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Kd(i,s,o),typeof h!="function"&&(un===null?un=new Set([this]):un.add(this));var v=o.stack;this.componentDidCatch(o.value,{componentStack:v!==null?v:""})})}function r_(e,i,s,o,h){if(s.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(i=s.alternate,i!==null&&ds(i,s,h,!0),s=Ne.current,s!==null){switch(s.tag){case 31:case 13:return Ie===null?fr():s.alternate===null&&Vt===0&&(Vt=3),s.flags&=-257,s.flags|=65536,s.lanes=h,o===Yl?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([o]):i.add(o),Zu(e,o,h)),!1;case 22:return s.flags|=65536,o===Yl?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([o])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([o]):s.add(o)),Zu(e,o,h)),!1}throw Error(a(435,s.tag))}return Zu(e,o,h),fr(),!1}if(St)return i=Ne.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=h,o!==qo&&(e=Error(a(422),{cause:o}),ua(Qe(e,s)))):(o!==qo&&(i=Error(a(423),{cause:o}),ua(Qe(i,s))),e=e.current.alternate,e.flags|=65536,h&=-h,e.lanes|=h,o=Qe(o,s),h=Au(e.stateNode,o,h),tu(e,h),Vt!==4&&(Vt=2)),!1;var d=Error(a(520),{cause:o});if(d=Qe(d,s),Ea===null?Ea=[d]:Ea.push(d),Vt!==4&&(Vt=2),i===null)return!0;o=Qe(o,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,e=h&-h,s.lanes|=e,e=Au(s.stateNode,o,e),tu(s,e),!1;case 1:if(i=s.type,d=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(un===null||!un.has(d))))return s.flags|=65536,h&=-h,s.lanes|=h,h=Id(h),Jd(h,e,s,o),tu(s,h),!1}s=s.return}while(s!==null);return!1}var wu=Error(a(461)),te=!1;function he(e,i,s,o){i.child=e===null?id(i,null,s,o):Gn(i,e.child,s,o)}function $d(e,i,s,o,h){s=s.render;var d=i.ref;if("ref"in o){var y={};for(var v in o)v!=="ref"&&(y[v]=o[v])}else y=o;return zn(i),o=lu(e,i,s,y,d,h),v=ru(),e!==null&&!te?(ou(e,i,h),zi(e,i,h)):(St&&v&&Yo(i),i.flags|=1,he(e,i,o,h),i.child)}function tm(e,i,s,o,h){if(e===null){var d=s.type;return typeof d=="function"&&!Ho(d)&&d.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=d,em(e,i,d,o,h)):(e=Ul(s.type,null,o,i,i.mode,h),e.ref=i.ref,e.return=i,i.child=e)}if(d=e.child,!Ou(e,h)){var y=d.memoizedProps;if(s=s.compare,s=s!==null?s:la,s(y,o)&&e.ref===i.ref)return zi(e,i,h)}return i.flags|=1,e=Ai(d,o),e.ref=i.ref,e.return=i,i.child=e}function em(e,i,s,o,h){if(e!==null){var d=e.memoizedProps;if(la(d,o)&&e.ref===i.ref)if(te=!1,i.pendingProps=o=d,Ou(e,h))(e.flags&131072)!==0&&(te=!0);else return i.lanes=e.lanes,zi(e,i,h)}return Cu(e,i,s,o,h)}function im(e,i,s,o){var h=o.children,d=e!==null?e.memoizedState:null;if(e===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((i.flags&128)!==0){if(d=d!==null?d.baseLanes|s:s,e!==null){for(o=i.child=e.child,h=0;o!==null;)h=h|o.lanes|o.childLanes,o=o.sibling;o=h&~d}else o=0,i.child=null;return nm(e,i,d,s,o)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ll(i,d!==null?d.cachePool:null),d!==null?ad(i,d):iu(),ld(i);else return o=i.lanes=536870912,nm(e,i,d!==null?d.baseLanes|s:s,s,o)}else d!==null?(Ll(i,d.cachePool),ad(i,d),an(),i.memoizedState=null):(e!==null&&Ll(i,null),iu(),an());return he(e,i,h,s),i.child}function va(e,i){return e!==null&&e.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function nm(e,i,s,o,h){var d=Ko();return d=d===null?null:{parent:Jt._currentValue,pool:d},i.memoizedState={baseLanes:s,cachePool:d},e!==null&&Ll(i,null),iu(),ld(i),e!==null&&ds(e,i,o,!0),i.childLanes=h,null}function er(e,i){return i=nr({mode:i.mode,children:i.children},e.mode),i.ref=e.ref,e.child=i,i.return=e,i}function sm(e,i,s){return Gn(i,e.child,null,s),e=er(i,i.pendingProps),e.flags|=2,ke(i),i.memoizedState=null,e}function o_(e,i,s){var o=i.pendingProps,h=(i.flags&128)!==0;if(i.flags&=-129,e===null){if(St){if(o.mode==="hidden")return e=er(i,o),i.lanes=536870912,va(null,e);if(su(i),(e=Lt)?(e=gp(e,Ke),e=e!==null&&e.data==="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:Ki!==null?{id:mi,overflow:pi}:null,retryLane:536870912,hydrationErrors:null},s=Yf(e),s.return=i,i.child=s,ue=i,Lt=null)):e=null,e===null)throw Ji(i);return i.lanes=536870912,null}return er(i,o)}var d=e.memoizedState;if(d!==null){var y=d.dehydrated;if(su(i),h)if(i.flags&256)i.flags&=-257,i=sm(e,i,s);else if(i.memoizedState!==null)i.child=e.child,i.flags|=128,i=null;else throw Error(a(558));else if(te||ds(e,i,s,!1),h=(s&e.childLanes)!==0,te||h){if(o=Nt,o!==null&&(y=Qh(o,s),y!==0&&y!==d.retryLane))throw d.retryLane=y,Cn(e,y),Ee(o,e,y),wu;fr(),i=sm(e,i,s)}else e=d.treeContext,Lt=Je(y.nextSibling),ue=i,St=!0,Ii=null,Ke=!1,e!==null&&Vf(i,e),i=er(i,o),i.flags|=4096;return i}return e=Ai(e.child,{mode:o.mode,children:o.children}),e.ref=i.ref,i.child=e,e.return=i,e}function ir(e,i){var s=i.ref;if(s===null)e!==null&&e.ref!==null&&(i.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(e===null||e.ref!==s)&&(i.flags|=4194816)}}function Cu(e,i,s,o,h){return zn(i),s=lu(e,i,s,o,void 0,h),o=ru(),e!==null&&!te?(ou(e,i,h),zi(e,i,h)):(St&&o&&Yo(i),i.flags|=1,he(e,i,s,h),i.child)}function am(e,i,s,o,h,d){return zn(i),i.updateQueue=null,s=od(i,o,s,h),rd(e),o=ru(),e!==null&&!te?(ou(e,i,d),zi(e,i,d)):(St&&o&&Yo(i),i.flags|=1,he(e,i,s,d),i.child)}function lm(e,i,s,o,h){if(zn(i),i.stateNode===null){var d=us,y=s.contextType;typeof y=="object"&&y!==null&&(d=ce(y)),d=new s(o,d),i.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Tu,i.stateNode=d,d._reactInternals=i,d=i.stateNode,d.props=o,d.state=i.memoizedState,d.refs={},Jo(i),y=s.contextType,d.context=typeof y=="object"&&y!==null?ce(y):us,d.state=i.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(Su(i,s,y,o),d.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(y=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),y!==d.state&&Tu.enqueueReplaceState(d,d.state,null),ga(i,o,d,h),pa(),d.state=i.memoizedState),typeof d.componentDidMount=="function"&&(i.flags|=4194308),o=!0}else if(e===null){d=i.stateNode;var v=i.memoizedProps,C=Nn(s,v);d.props=C;var N=d.context,X=s.contextType;y=us,typeof X=="object"&&X!==null&&(y=ce(X));var P=s.getDerivedStateFromProps;X=typeof P=="function"||typeof d.getSnapshotBeforeUpdate=="function",v=i.pendingProps!==v,X||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(v||N!==y)&&Fd(i,d,o,y),tn=!1;var H=i.memoizedState;d.state=H,ga(i,o,d,h),pa(),N=i.memoizedState,v||H!==N||tn?(typeof P=="function"&&(Su(i,s,P,o),N=i.memoizedState),(C=tn||Pd(i,s,C,o,H,N,y))?(X||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(i.flags|=4194308)):(typeof d.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=o,i.memoizedState=N),d.props=o,d.state=N,d.context=y,o=C):(typeof d.componentDidMount=="function"&&(i.flags|=4194308),o=!1)}else{d=i.stateNode,$o(e,i),y=i.memoizedProps,X=Nn(s,y),d.props=X,P=i.pendingProps,H=d.context,N=s.contextType,C=us,typeof N=="object"&&N!==null&&(C=ce(N)),v=s.getDerivedStateFromProps,(N=typeof v=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(y!==P||H!==C)&&Fd(i,d,o,C),tn=!1,H=i.memoizedState,d.state=H,ga(i,o,d,h),pa();var j=i.memoizedState;y!==P||H!==j||tn||e!==null&&e.dependencies!==null&&kl(e.dependencies)?(typeof v=="function"&&(Su(i,s,v,o),j=i.memoizedState),(X=tn||Pd(i,s,X,o,H,j,C)||e!==null&&e.dependencies!==null&&kl(e.dependencies))?(N||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(o,j,C),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(o,j,C)),typeof d.componentDidUpdate=="function"&&(i.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&H===e.memoizedState||(i.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&H===e.memoizedState||(i.flags|=1024),i.memoizedProps=o,i.memoizedState=j),d.props=o,d.state=j,d.context=C,o=X):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&H===e.memoizedState||(i.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&H===e.memoizedState||(i.flags|=1024),o=!1)}return d=o,ir(e,i),o=(i.flags&128)!==0,d||o?(d=i.stateNode,s=o&&typeof s.getDerivedStateFromError!="function"?null:d.render(),i.flags|=1,e!==null&&o?(i.child=Gn(i,e.child,null,h),i.child=Gn(i,null,s,h)):he(e,i,s,h),i.memoizedState=d.state,e=i.child):e=zi(e,i,h),e}function rm(e,i,s,o){return En(),i.flags|=256,he(e,i,s,o),i.child}var Mu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Eu(e){return{baseLanes:e,cachePool:Kf()}}function Ru(e,i,s){return e=e!==null?e.childLanes&~s:0,i&&(e|=Le),e}function om(e,i,s){var o=i.pendingProps,h=!1,d=(i.flags&128)!==0,y;if((y=d)||(y=e!==null&&e.memoizedState===null?!1:(Wt.current&2)!==0),y&&(h=!0,i.flags&=-129),y=(i.flags&32)!==0,i.flags&=-33,e===null){if(St){if(h?sn(i):an(),(e=Lt)?(e=gp(e,Ke),e=e!==null&&e.data!=="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:Ki!==null?{id:mi,overflow:pi}:null,retryLane:536870912,hydrationErrors:null},s=Yf(e),s.return=i,i.child=s,ue=i,Lt=null)):e=null,e===null)throw Ji(i);return hc(e)?i.lanes=32:i.lanes=536870912,null}var v=o.children;return o=o.fallback,h?(an(),h=i.mode,v=nr({mode:"hidden",children:v},h),o=Mn(o,h,s,null),v.return=i,o.return=i,v.sibling=o,i.child=v,o=i.child,o.memoizedState=Eu(s),o.childLanes=Ru(e,y,s),i.memoizedState=Mu,va(null,o)):(sn(i),zu(i,v))}var C=e.memoizedState;if(C!==null&&(v=C.dehydrated,v!==null)){if(d)i.flags&256?(sn(i),i.flags&=-257,i=Du(e,i,s)):i.memoizedState!==null?(an(),i.child=e.child,i.flags|=128,i=null):(an(),v=o.fallback,h=i.mode,o=nr({mode:"visible",children:o.children},h),v=Mn(v,h,s,null),v.flags|=2,o.return=i,v.return=i,o.sibling=v,i.child=o,Gn(i,e.child,null,s),o=i.child,o.memoizedState=Eu(s),o.childLanes=Ru(e,y,s),i.memoizedState=Mu,i=va(null,o));else if(sn(i),hc(v)){if(y=v.nextSibling&&v.nextSibling.dataset,y)var N=y.dgst;y=N,o=Error(a(419)),o.stack="",o.digest=y,ua({value:o,source:null,stack:null}),i=Du(e,i,s)}else if(te||ds(e,i,s,!1),y=(s&e.childLanes)!==0,te||y){if(y=Nt,y!==null&&(o=Qh(y,s),o!==0&&o!==C.retryLane))throw C.retryLane=o,Cn(e,o),Ee(y,e,o),wu;cc(v)||fr(),i=Du(e,i,s)}else cc(v)?(i.flags|=192,i.child=e.child,i=null):(e=C.treeContext,Lt=Je(v.nextSibling),ue=i,St=!0,Ii=null,Ke=!1,e!==null&&Vf(i,e),i=zu(i,o.children),i.flags|=4096);return i}return h?(an(),v=o.fallback,h=i.mode,C=e.child,N=C.sibling,o=Ai(C,{mode:"hidden",children:o.children}),o.subtreeFlags=C.subtreeFlags&65011712,N!==null?v=Ai(N,v):(v=Mn(v,h,s,null),v.flags|=2),v.return=i,o.return=i,o.sibling=v,i.child=o,va(null,o),o=i.child,v=e.child.memoizedState,v===null?v=Eu(s):(h=v.cachePool,h!==null?(C=Jt._currentValue,h=h.parent!==C?{parent:C,pool:C}:h):h=Kf(),v={baseLanes:v.baseLanes|s,cachePool:h}),o.memoizedState=v,o.childLanes=Ru(e,y,s),i.memoizedState=Mu,va(e.child,o)):(sn(i),s=e.child,e=s.sibling,s=Ai(s,{mode:"visible",children:o.children}),s.return=i,s.sibling=null,e!==null&&(y=i.deletions,y===null?(i.deletions=[e],i.flags|=16):y.push(e)),i.child=s,i.memoizedState=null,s)}function zu(e,i){return i=nr({mode:"visible",children:i},e.mode),i.return=e,e.child=i}function nr(e,i){return e=Ue(22,e,null,i),e.lanes=0,e}function Du(e,i,s){return Gn(i,e.child,null,s),e=zu(i,i.pendingProps.children),e.flags|=2,i.memoizedState=null,e}function um(e,i,s){e.lanes|=i;var o=e.alternate;o!==null&&(o.lanes|=i),Fo(e.return,i,s)}function Bu(e,i,s,o,h,d){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:o,tail:s,tailMode:h,treeForkCount:d}:(y.isBackwards=i,y.rendering=null,y.renderingStartTime=0,y.last=o,y.tail=s,y.tailMode=h,y.treeForkCount=d)}function cm(e,i,s){var o=i.pendingProps,h=o.revealOrder,d=o.tail;o=o.children;var y=Wt.current,v=(y&2)!==0;if(v?(y=y&1|2,i.flags|=128):y&=1,F(Wt,y),he(e,i,o,s),o=St?oa:0,!v&&e!==null&&(e.flags&128)!==0)t:for(e=i.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&um(e,s,i);else if(e.tag===19)um(e,s,i);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===i)break t;for(;e.sibling===null;){if(e.return===null||e.return===i)break t;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(h){case"forwards":for(s=i.child,h=null;s!==null;)e=s.alternate,e!==null&&Pl(e)===null&&(h=s),s=s.sibling;s=h,s===null?(h=i.child,i.child=null):(h=s.sibling,s.sibling=null),Bu(i,!1,h,s,d,o);break;case"backwards":case"unstable_legacy-backwards":for(s=null,h=i.child,i.child=null;h!==null;){if(e=h.alternate,e!==null&&Pl(e)===null){i.child=h;break}e=h.sibling,h.sibling=s,s=h,h=e}Bu(i,!0,s,null,d,o);break;case"together":Bu(i,!1,null,null,void 0,o);break;default:i.memoizedState=null}return i.child}function zi(e,i,s){if(e!==null&&(i.dependencies=e.dependencies),on|=i.lanes,(s&i.childLanes)===0)if(e!==null){if(ds(e,i,s,!1),(s&i.childLanes)===0)return null}else return null;if(e!==null&&i.child!==e.child)throw Error(a(153));if(i.child!==null){for(e=i.child,s=Ai(e,e.pendingProps),i.child=s,s.return=i;e.sibling!==null;)e=e.sibling,s=s.sibling=Ai(e,e.pendingProps),s.return=i;s.sibling=null}return i.child}function Ou(e,i){return(e.lanes&i)!==0?!0:(e=e.dependencies,!!(e!==null&&kl(e)))}function u_(e,i,s){switch(i.tag){case 3:Ht(i,i.stateNode.containerInfo),$i(i,Jt,e.memoizedState.cache),En();break;case 27:case 5:qe(i);break;case 4:Ht(i,i.stateNode.containerInfo);break;case 10:$i(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,su(i),null;break;case 13:var o=i.memoizedState;if(o!==null)return o.dehydrated!==null?(sn(i),i.flags|=128,null):(s&i.child.childLanes)!==0?om(e,i,s):(sn(i),e=zi(e,i,s),e!==null?e.sibling:null);sn(i);break;case 19:var h=(e.flags&128)!==0;if(o=(s&i.childLanes)!==0,o||(ds(e,i,s,!1),o=(s&i.childLanes)!==0),h){if(o)return cm(e,i,s);i.flags|=128}if(h=i.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),F(Wt,Wt.current),o)break;return null;case 22:return i.lanes=0,im(e,i,s,i.pendingProps);case 24:$i(i,Jt,e.memoizedState.cache)}return zi(e,i,s)}function hm(e,i,s){if(e!==null)if(e.memoizedProps!==i.pendingProps)te=!0;else{if(!Ou(e,s)&&(i.flags&128)===0)return te=!1,u_(e,i,s);te=(e.flags&131072)!==0}else te=!1,St&&(i.flags&1048576)!==0&&qf(i,oa,i.index);switch(i.lanes=0,i.tag){case 16:t:{var o=i.pendingProps;if(e=Bn(i.elementType),i.type=e,typeof e=="function")Ho(e)?(o=Nn(e,o),i.tag=1,i=lm(null,i,e,o,s)):(i.tag=0,i=Cu(null,i,e,o,s));else{if(e!=null){var h=e.$$typeof;if(h===O){i.tag=11,i=$d(null,i,e,o,s);break t}else if(h===G){i.tag=14,i=tm(null,i,e,o,s);break t}}throw i=nt(e)||e,Error(a(306,i,""))}}return i;case 0:return Cu(e,i,i.type,i.pendingProps,s);case 1:return o=i.type,h=Nn(o,i.pendingProps),lm(e,i,o,h,s);case 3:t:{if(Ht(i,i.stateNode.containerInfo),e===null)throw Error(a(387));o=i.pendingProps;var d=i.memoizedState;h=d.element,$o(e,i),ga(i,o,null,s);var y=i.memoizedState;if(o=y.cache,$i(i,Jt,o),o!==d.cache&&Qo(i,[Jt],s,!0),pa(),o=y.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:y.cache},i.updateQueue.baseState=d,i.memoizedState=d,i.flags&256){i=rm(e,i,o,s);break t}else if(o!==h){h=Qe(Error(a(424)),i),ua(h),i=rm(e,i,o,s);break t}else{switch(e=i.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Lt=Je(e.firstChild),ue=i,St=!0,Ii=null,Ke=!0,s=id(i,null,o,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(En(),o===h){i=zi(e,i,s);break t}he(e,i,o,s)}i=i.child}return i;case 26:return ir(e,i),e===null?(s=Sp(i.type,null,i.pendingProps,null))?i.memoizedState=s:St||(s=i.type,e=i.pendingProps,o=_r(ct.current).createElement(s),o[oe]=i,o[Se]=e,fe(o,s,e),se(o),i.stateNode=o):i.memoizedState=Sp(i.type,e.memoizedProps,i.pendingProps,e.memoizedState),null;case 27:return qe(i),e===null&&St&&(o=i.stateNode=_p(i.type,i.pendingProps,ct.current),ue=i,Ke=!0,h=Lt,dn(i.type)?(fc=h,Lt=Je(o.firstChild)):Lt=h),he(e,i,i.pendingProps.children,s),ir(e,i),e===null&&(i.flags|=4194304),i.child;case 5:return e===null&&St&&((h=o=Lt)&&(o=L_(o,i.type,i.pendingProps,Ke),o!==null?(i.stateNode=o,ue=i,Lt=Je(o.firstChild),Ke=!1,h=!0):h=!1),h||Ji(i)),qe(i),h=i.type,d=i.pendingProps,y=e!==null?e.memoizedProps:null,o=d.children,rc(h,d)?o=null:y!==null&&rc(h,y)&&(i.flags|=32),i.memoizedState!==null&&(h=lu(e,i,t_,null,null,s),Na._currentValue=h),ir(e,i),he(e,i,o,s),i.child;case 6:return e===null&&St&&((e=s=Lt)&&(s=j_(s,i.pendingProps,Ke),s!==null?(i.stateNode=s,ue=i,Lt=null,e=!0):e=!1),e||Ji(i)),null;case 13:return om(e,i,s);case 4:return Ht(i,i.stateNode.containerInfo),o=i.pendingProps,e===null?i.child=Gn(i,null,o,s):he(e,i,o,s),i.child;case 11:return $d(e,i,i.type,i.pendingProps,s);case 7:return he(e,i,i.pendingProps,s),i.child;case 8:return he(e,i,i.pendingProps.children,s),i.child;case 12:return he(e,i,i.pendingProps.children,s),i.child;case 10:return o=i.pendingProps,$i(i,i.type,o.value),he(e,i,o.children,s),i.child;case 9:return h=i.type._context,o=i.pendingProps.children,zn(i),h=ce(h),o=o(h),i.flags|=1,he(e,i,o,s),i.child;case 14:return tm(e,i,i.type,i.pendingProps,s);case 15:return em(e,i,i.type,i.pendingProps,s);case 19:return cm(e,i,s);case 31:return o_(e,i,s);case 22:return im(e,i,s,i.pendingProps);case 24:return zn(i),o=ce(Jt),e===null?(h=Ko(),h===null&&(h=Nt,d=Wo(),h.pooledCache=d,d.refCount++,d!==null&&(h.pooledCacheLanes|=s),h=d),i.memoizedState={parent:o,cache:h},Jo(i),$i(i,Jt,h)):((e.lanes&s)!==0&&($o(e,i),ga(i,null,null,s),pa()),h=e.memoizedState,d=i.memoizedState,h.parent!==o?(h={parent:o,cache:o},i.memoizedState=h,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=h),$i(i,Jt,o)):(o=d.cache,$i(i,Jt,o),o!==h.cache&&Qo(i,[Jt],s,!0))),he(e,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function Di(e){e.flags|=4}function Gu(e,i,s,o,h){if((i=(e.mode&32)!==0)&&(i=!1),i){if(e.flags|=16777216,(h&335544128)===h)if(e.stateNode.complete)e.flags|=8192;else if(Hm())e.flags|=8192;else throw On=Yl,Io}else e.flags&=-16777217}function fm(e,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Mp(i))if(Hm())e.flags|=8192;else throw On=Yl,Io}function sr(e,i){i!==null&&(e.flags|=4),e.flags&16384&&(i=e.tag!==22?Vh():536870912,e.lanes|=i,ws|=i)}function Sa(e,i){if(!St)switch(e.tailMode){case"hidden":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?i||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function jt(e){var i=e.alternate!==null&&e.alternate.child===e.child,s=0,o=0;if(i)for(var h=e.child;h!==null;)s|=h.lanes|h.childLanes,o|=h.subtreeFlags&65011712,o|=h.flags&65011712,h.return=e,h=h.sibling;else for(h=e.child;h!==null;)s|=h.lanes|h.childLanes,o|=h.subtreeFlags,o|=h.flags,h.return=e,h=h.sibling;return e.subtreeFlags|=o,e.childLanes=s,i}function c_(e,i,s){var o=i.pendingProps;switch(Xo(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jt(i),null;case 1:return jt(i),null;case 3:return s=i.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),i.memoizedState.cache!==o&&(i.flags|=2048),Mi(Jt),Mt(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(fs(i)?Di(i):e===null||e.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Vo())),jt(i),null;case 26:var h=i.type,d=i.memoizedState;return e===null?(Di(i),d!==null?(jt(i),fm(i,d)):(jt(i),Gu(i,h,null,o,s))):d?d!==e.memoizedState?(Di(i),jt(i),fm(i,d)):(jt(i),i.flags&=-16777217):(e=e.memoizedProps,e!==o&&Di(i),jt(i),Gu(i,h,e,o,s)),null;case 27:if(Fi(i),s=ct.current,h=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==o&&Di(i);else{if(!o){if(i.stateNode===null)throw Error(a(166));return jt(i),null}e=I.current,fs(i)?Pf(i):(e=_p(h,o,s),i.stateNode=e,Di(i))}return jt(i),null;case 5:if(Fi(i),h=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==o&&Di(i);else{if(!o){if(i.stateNode===null)throw Error(a(166));return jt(i),null}if(d=I.current,fs(i))Pf(i);else{var y=_r(ct.current);switch(d){case 1:d=y.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:d=y.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":d=y.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":d=y.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":d=y.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof o.is=="string"?y.createElement("select",{is:o.is}):y.createElement("select"),o.multiple?d.multiple=!0:o.size&&(d.size=o.size);break;default:d=typeof o.is=="string"?y.createElement(h,{is:o.is}):y.createElement(h)}}d[oe]=i,d[Se]=o;t:for(y=i.child;y!==null;){if(y.tag===5||y.tag===6)d.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===i)break t;for(;y.sibling===null;){if(y.return===null||y.return===i)break t;y=y.return}y.sibling.return=y.return,y=y.sibling}i.stateNode=d;t:switch(fe(d,h,o),h){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break t;case"img":o=!0;break t;default:o=!1}o&&Di(i)}}return jt(i),Gu(i,i.type,e===null?null:e.memoizedProps,i.pendingProps,s),null;case 6:if(e&&i.stateNode!=null)e.memoizedProps!==o&&Di(i);else{if(typeof o!="string"&&i.stateNode===null)throw Error(a(166));if(e=ct.current,fs(i)){if(e=i.stateNode,s=i.memoizedProps,o=null,h=ue,h!==null)switch(h.tag){case 27:case 5:o=h.memoizedProps}e[oe]=i,e=!!(e.nodeValue===s||o!==null&&o.suppressHydrationWarning===!0||op(e.nodeValue,s)),e||Ji(i,!0)}else e=_r(e).createTextNode(o),e[oe]=i,i.stateNode=e}return jt(i),null;case 31:if(s=i.memoizedState,e===null||e.memoizedState!==null){if(o=fs(i),s!==null){if(e===null){if(!o)throw Error(a(318));if(e=i.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(557));e[oe]=i}else En(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;jt(i),e=!1}else s=Vo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return i.flags&256?(ke(i),i):(ke(i),null);if((i.flags&128)!==0)throw Error(a(558))}return jt(i),null;case 13:if(o=i.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(h=fs(i),o!==null&&o.dehydrated!==null){if(e===null){if(!h)throw Error(a(318));if(h=i.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(a(317));h[oe]=i}else En(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;jt(i),h=!1}else h=Vo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=h),h=!0;if(!h)return i.flags&256?(ke(i),i):(ke(i),null)}return ke(i),(i.flags&128)!==0?(i.lanes=s,i):(s=o!==null,e=e!==null&&e.memoizedState!==null,s&&(o=i.child,h=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(h=o.alternate.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==h&&(o.flags|=2048)),s!==e&&s&&(i.child.flags|=8192),sr(i,i.updateQueue),jt(i),null);case 4:return Mt(),e===null&&ic(i.stateNode.containerInfo),jt(i),null;case 10:return Mi(i.type),jt(i),null;case 19:if(Y(Wt),o=i.memoizedState,o===null)return jt(i),null;if(h=(i.flags&128)!==0,d=o.rendering,d===null)if(h)Sa(o,!1);else{if(Vt!==0||e!==null&&(e.flags&128)!==0)for(e=i.child;e!==null;){if(d=Pl(e),d!==null){for(i.flags|=128,Sa(o,!1),e=d.updateQueue,i.updateQueue=e,sr(i,e),i.subtreeFlags=0,e=s,s=i.child;s!==null;)jf(s,e),s=s.sibling;return F(Wt,Wt.current&1|2),St&&wi(i,o.treeForkCount),i.child}e=e.sibling}o.tail!==null&&De()>ur&&(i.flags|=128,h=!0,Sa(o,!1),i.lanes=4194304)}else{if(!h)if(e=Pl(d),e!==null){if(i.flags|=128,h=!0,e=e.updateQueue,i.updateQueue=e,sr(i,e),Sa(o,!0),o.tail===null&&o.tailMode==="hidden"&&!d.alternate&&!St)return jt(i),null}else 2*De()-o.renderingStartTime>ur&&s!==536870912&&(i.flags|=128,h=!0,Sa(o,!1),i.lanes=4194304);o.isBackwards?(d.sibling=i.child,i.child=d):(e=o.last,e!==null?e.sibling=d:i.child=d,o.last=d)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=De(),e.sibling=null,s=Wt.current,F(Wt,h?s&1|2:s&1),St&&wi(i,o.treeForkCount),e):(jt(i),null);case 22:case 23:return ke(i),nu(),o=i.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(i.flags|=8192):o&&(i.flags|=8192),o?(s&536870912)!==0&&(i.flags&128)===0&&(jt(i),i.subtreeFlags&6&&(i.flags|=8192)):jt(i),s=i.updateQueue,s!==null&&sr(i,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),o=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(o=i.memoizedState.cachePool.pool),o!==s&&(i.flags|=2048),e!==null&&Y(Dn),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),Mi(Jt),jt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function h_(e,i){switch(Xo(i),i.tag){case 1:return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 3:return Mi(Jt),Mt(),e=i.flags,(e&65536)!==0&&(e&128)===0?(i.flags=e&-65537|128,i):null;case 26:case 27:case 5:return Fi(i),null;case 31:if(i.memoizedState!==null){if(ke(i),i.alternate===null)throw Error(a(340));En()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 13:if(ke(i),e=i.memoizedState,e!==null&&e.dehydrated!==null){if(i.alternate===null)throw Error(a(340));En()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 19:return Y(Wt),null;case 4:return Mt(),null;case 10:return Mi(i.type),null;case 22:case 23:return ke(i),nu(),e!==null&&Y(Dn),e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 24:return Mi(Jt),null;case 25:return null;default:return null}}function dm(e,i){switch(Xo(i),i.tag){case 3:Mi(Jt),Mt();break;case 26:case 27:case 5:Fi(i);break;case 4:Mt();break;case 31:i.memoizedState!==null&&ke(i);break;case 13:ke(i);break;case 19:Y(Wt);break;case 10:Mi(i.type);break;case 22:case 23:ke(i),nu(),e!==null&&Y(Dn);break;case 24:Mi(Jt)}}function Ta(e,i){try{var s=i.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var h=o.next;s=h;do{if((s.tag&e)===e){o=void 0;var d=s.create,y=s.inst;o=d(),y.destroy=o}s=s.next}while(s!==h)}}catch(v){Dt(i,i.return,v)}}function ln(e,i,s){try{var o=i.updateQueue,h=o!==null?o.lastEffect:null;if(h!==null){var d=h.next;o=d;do{if((o.tag&e)===e){var y=o.inst,v=y.destroy;if(v!==void 0){y.destroy=void 0,h=i;var C=s,N=v;try{N()}catch(X){Dt(h,C,X)}}}o=o.next}while(o!==d)}}catch(X){Dt(i,i.return,X)}}function mm(e){var i=e.updateQueue;if(i!==null){var s=e.stateNode;try{sd(i,s)}catch(o){Dt(e,e.return,o)}}}function pm(e,i,s){s.props=Nn(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(o){Dt(e,i,o)}}function Aa(e,i){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof s=="function"?e.refCleanup=s(o):s.current=o}}catch(h){Dt(e,i,h)}}function gi(e,i){var s=e.ref,o=e.refCleanup;if(s!==null)if(typeof o=="function")try{o()}catch(h){Dt(e,i,h)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(h){Dt(e,i,h)}else s.current=null}function gm(e){var i=e.type,s=e.memoizedProps,o=e.stateNode;try{t:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&o.focus();break t;case"img":s.src?o.src=s.src:s.srcSet&&(o.srcset=s.srcSet)}}catch(h){Dt(e,e.return,h)}}function Uu(e,i,s){try{var o=e.stateNode;O_(o,e.type,s,i),o[Se]=i}catch(h){Dt(e,e.return,h)}}function ym(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&dn(e.type)||e.tag===4}function Nu(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||ym(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&&dn(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 ku(e,i,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,i?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,i):(i=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,i.appendChild(e),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=Si));else if(o!==4&&(o===27&&dn(e.type)&&(s=e.stateNode,i=null),e=e.child,e!==null))for(ku(e,i,s),e=e.sibling;e!==null;)ku(e,i,s),e=e.sibling}function ar(e,i,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,i?s.insertBefore(e,i):s.appendChild(e);else if(o!==4&&(o===27&&dn(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(ar(e,i,s),e=e.sibling;e!==null;)ar(e,i,s),e=e.sibling}function xm(e){var i=e.stateNode,s=e.memoizedProps;try{for(var o=e.type,h=i.attributes;h.length;)i.removeAttributeNode(h[0]);fe(i,o,s),i[oe]=e,i[Se]=s}catch(d){Dt(e,e.return,d)}}var Bi=!1,ee=!1,Hu=!1,_m=typeof WeakSet=="function"?WeakSet:Set,ae=null;function f_(e,i){if(e=e.containerInfo,ac=Cr,e=Df(e),Do(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else t:{s=(s=e.ownerDocument)&&s.defaultView||window;var o=s.getSelection&&s.getSelection();if(o&&o.rangeCount!==0){s=o.anchorNode;var h=o.anchorOffset,d=o.focusNode;o=o.focusOffset;try{s.nodeType,d.nodeType}catch{s=null;break t}var y=0,v=-1,C=-1,N=0,X=0,P=e,H=null;e:for(;;){for(var j;P!==s||h!==0&&P.nodeType!==3||(v=y+h),P!==d||o!==0&&P.nodeType!==3||(C=y+o),P.nodeType===3&&(y+=P.nodeValue.length),(j=P.firstChild)!==null;)H=P,P=j;for(;;){if(P===e)break e;if(H===s&&++N===h&&(v=y),H===d&&++X===o&&(C=y),(j=P.nextSibling)!==null)break;P=H,H=P.parentNode}P=j}s=v===-1||C===-1?null:{start:v,end:C}}else s=null}s=s||{start:0,end:0}}else s=null;for(lc={focusedElem:e,selectionRange:s},Cr=!1,ae=i;ae!==null;)if(i=ae,e=i.child,(i.subtreeFlags&1028)!==0&&e!==null)e.return=i,ae=e;else for(;ae!==null;){switch(i=ae,d=i.alternate,e=i.flags,i.tag){case 0:if((e&4)!==0&&(e=i.updateQueue,e=e!==null?e.events:null,e!==null))for(s=0;s<e.length;s++)h=e[s],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,s=i,h=d.memoizedProps,d=d.memoizedState,o=s.stateNode;try{var st=Nn(s.type,h);e=o.getSnapshotBeforeUpdate(st,d),o.__reactInternalSnapshotBeforeUpdate=e}catch(ut){Dt(s,s.return,ut)}}break;case 3:if((e&1024)!==0){if(e=i.stateNode.containerInfo,s=e.nodeType,s===9)uc(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":uc(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(a(163))}if(e=i.sibling,e!==null){e.return=i.return,ae=e;break}ae=i.return}}function bm(e,i,s){var o=s.flags;switch(s.tag){case 0:case 11:case 15:Gi(e,s),o&4&&Ta(5,s);break;case 1:if(Gi(e,s),o&4)if(e=s.stateNode,i===null)try{e.componentDidMount()}catch(y){Dt(s,s.return,y)}else{var h=Nn(s.type,i.memoizedProps);i=i.memoizedState;try{e.componentDidUpdate(h,i,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Dt(s,s.return,y)}}o&64&&mm(s),o&512&&Aa(s,s.return);break;case 3:if(Gi(e,s),o&64&&(e=s.updateQueue,e!==null)){if(i=null,s.child!==null)switch(s.child.tag){case 27:case 5:i=s.child.stateNode;break;case 1:i=s.child.stateNode}try{sd(e,i)}catch(y){Dt(s,s.return,y)}}break;case 27:i===null&&o&4&&xm(s);case 26:case 5:Gi(e,s),i===null&&o&4&&gm(s),o&512&&Aa(s,s.return);break;case 12:Gi(e,s);break;case 31:Gi(e,s),o&4&&Tm(e,s);break;case 13:Gi(e,s),o&4&&Am(e,s),o&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=v_.bind(null,s),Y_(e,s))));break;case 22:if(o=s.memoizedState!==null||Bi,!o){i=i!==null&&i.memoizedState!==null||ee,h=Bi;var d=ee;Bi=o,(ee=i)&&!d?Ui(e,s,(s.subtreeFlags&8772)!==0):Gi(e,s),Bi=h,ee=d}break;case 30:break;default:Gi(e,s)}}function vm(e){var i=e.alternate;i!==null&&(e.alternate=null,vm(i)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(i=e.stateNode,i!==null&&mo(i)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Yt=null,Ae=!1;function Oi(e,i,s){for(s=s.child;s!==null;)Sm(e,i,s),s=s.sibling}function Sm(e,i,s){if(Be&&typeof Be.onCommitFiberUnmount=="function")try{Be.onCommitFiberUnmount(Ws,s)}catch{}switch(s.tag){case 26:ee||gi(s,i),Oi(e,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:ee||gi(s,i);var o=Yt,h=Ae;dn(s.type)&&(Yt=s.stateNode,Ae=!1),Oi(e,i,s),Oa(s.stateNode),Yt=o,Ae=h;break;case 5:ee||gi(s,i);case 6:if(o=Yt,h=Ae,Yt=null,Oi(e,i,s),Yt=o,Ae=h,Yt!==null)if(Ae)try{(Yt.nodeType===9?Yt.body:Yt.nodeName==="HTML"?Yt.ownerDocument.body:Yt).removeChild(s.stateNode)}catch(d){Dt(s,i,d)}else try{Yt.removeChild(s.stateNode)}catch(d){Dt(s,i,d)}break;case 18:Yt!==null&&(Ae?(e=Yt,mp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),Os(e)):mp(Yt,s.stateNode));break;case 4:o=Yt,h=Ae,Yt=s.stateNode.containerInfo,Ae=!0,Oi(e,i,s),Yt=o,Ae=h;break;case 0:case 11:case 14:case 15:ln(2,s,i),ee||ln(4,s,i),Oi(e,i,s);break;case 1:ee||(gi(s,i),o=s.stateNode,typeof o.componentWillUnmount=="function"&&pm(s,i,o)),Oi(e,i,s);break;case 21:Oi(e,i,s);break;case 22:ee=(o=ee)||s.memoizedState!==null,Oi(e,i,s),ee=o;break;default:Oi(e,i,s)}}function Tm(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Os(e)}catch(s){Dt(i,i.return,s)}}}function Am(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Os(e)}catch(s){Dt(i,i.return,s)}}function d_(e){switch(e.tag){case 31:case 13:case 19:var i=e.stateNode;return i===null&&(i=e.stateNode=new _m),i;case 22:return e=e.stateNode,i=e._retryCache,i===null&&(i=e._retryCache=new _m),i;default:throw Error(a(435,e.tag))}}function lr(e,i){var s=d_(e);i.forEach(function(o){if(!s.has(o)){s.add(o);var h=S_.bind(null,e,o);o.then(h,h)}})}function we(e,i){var s=i.deletions;if(s!==null)for(var o=0;o<s.length;o++){var h=s[o],d=e,y=i,v=y;t:for(;v!==null;){switch(v.tag){case 27:if(dn(v.type)){Yt=v.stateNode,Ae=!1;break t}break;case 5:Yt=v.stateNode,Ae=!1;break t;case 3:case 4:Yt=v.stateNode.containerInfo,Ae=!0;break t}v=v.return}if(Yt===null)throw Error(a(160));Sm(d,y,h),Yt=null,Ae=!1,d=h.alternate,d!==null&&(d.return=null),h.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)wm(i,e),i=i.sibling}var ui=null;function wm(e,i){var s=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:we(i,e),Ce(e),o&4&&(ln(3,e,e.return),Ta(3,e),ln(5,e,e.return));break;case 1:we(i,e),Ce(e),o&512&&(ee||s===null||gi(s,s.return)),o&64&&Bi&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?o:s.concat(o))));break;case 26:var h=ui;if(we(i,e),Ce(e),o&512&&(ee||s===null||gi(s,s.return)),o&4){var d=s!==null?s.memoizedState:null;if(o=e.memoizedState,s===null)if(o===null)if(e.stateNode===null){t:{o=e.type,s=e.memoizedProps,h=h.ownerDocument||h;e:switch(o){case"title":d=h.getElementsByTagName("title")[0],(!d||d[Is]||d[oe]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=h.createElement(o),h.head.insertBefore(d,h.querySelector("head > title"))),fe(d,o,s),d[oe]=e,se(d),o=d;break t;case"link":var y=wp("link","href",h).get(o+(s.href||""));if(y){for(var v=0;v<y.length;v++)if(d=y[v],d.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&d.getAttribute("rel")===(s.rel==null?null:s.rel)&&d.getAttribute("title")===(s.title==null?null:s.title)&&d.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){y.splice(v,1);break e}}d=h.createElement(o),fe(d,o,s),h.head.appendChild(d);break;case"meta":if(y=wp("meta","content",h).get(o+(s.content||""))){for(v=0;v<y.length;v++)if(d=y[v],d.getAttribute("content")===(s.content==null?null:""+s.content)&&d.getAttribute("name")===(s.name==null?null:s.name)&&d.getAttribute("property")===(s.property==null?null:s.property)&&d.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&d.getAttribute("charset")===(s.charSet==null?null:s.charSet)){y.splice(v,1);break e}}d=h.createElement(o),fe(d,o,s),h.head.appendChild(d);break;default:throw Error(a(468,o))}d[oe]=e,se(d),o=d}e.stateNode=o}else Cp(h,e.type,e.stateNode);else e.stateNode=Ap(h,o,e.memoizedProps);else d!==o?(d===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):d.count--,o===null?Cp(h,e.type,e.stateNode):Ap(h,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Uu(e,e.memoizedProps,s.memoizedProps)}break;case 27:we(i,e),Ce(e),o&512&&(ee||s===null||gi(s,s.return)),s!==null&&o&4&&Uu(e,e.memoizedProps,s.memoizedProps);break;case 5:if(we(i,e),Ce(e),o&512&&(ee||s===null||gi(s,s.return)),e.flags&32){h=e.stateNode;try{is(h,"")}catch(st){Dt(e,e.return,st)}}o&4&&e.stateNode!=null&&(h=e.memoizedProps,Uu(e,h,s!==null?s.memoizedProps:h)),o&1024&&(Hu=!0);break;case 6:if(we(i,e),Ce(e),o&4){if(e.stateNode===null)throw Error(a(162));o=e.memoizedProps,s=e.stateNode;try{s.nodeValue=o}catch(st){Dt(e,e.return,st)}}break;case 3:if(Sr=null,h=ui,ui=br(i.containerInfo),we(i,e),ui=h,Ce(e),o&4&&s!==null&&s.memoizedState.isDehydrated)try{Os(i.containerInfo)}catch(st){Dt(e,e.return,st)}Hu&&(Hu=!1,Cm(e));break;case 4:o=ui,ui=br(e.stateNode.containerInfo),we(i,e),Ce(e),ui=o;break;case 12:we(i,e),Ce(e);break;case 31:we(i,e),Ce(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,lr(e,o)));break;case 13:we(i,e),Ce(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(or=De()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,lr(e,o)));break;case 22:h=e.memoizedState!==null;var C=s!==null&&s.memoizedState!==null,N=Bi,X=ee;if(Bi=N||h,ee=X||C,we(i,e),ee=X,Bi=N,Ce(e),o&8192)t:for(i=e.stateNode,i._visibility=h?i._visibility&-2:i._visibility|1,h&&(s===null||C||Bi||ee||kn(e)),s=null,i=e;;){if(i.tag===5||i.tag===26){if(s===null){C=s=i;try{if(d=C.stateNode,h)y=d.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{v=C.stateNode;var P=C.memoizedProps.style,H=P!=null&&P.hasOwnProperty("display")?P.display:null;v.style.display=H==null||typeof H=="boolean"?"":(""+H).trim()}}catch(st){Dt(C,C.return,st)}}}else if(i.tag===6){if(s===null){C=i;try{C.stateNode.nodeValue=h?"":C.memoizedProps}catch(st){Dt(C,C.return,st)}}}else if(i.tag===18){if(s===null){C=i;try{var j=C.stateNode;h?pp(j,!0):pp(C.stateNode,!1)}catch(st){Dt(C,C.return,st)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===e)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break t;for(;i.sibling===null;){if(i.return===null||i.return===e)break t;s===i&&(s=null),i=i.return}s===i&&(s=null),i.sibling.return=i.return,i=i.sibling}o&4&&(o=e.updateQueue,o!==null&&(s=o.retryQueue,s!==null&&(o.retryQueue=null,lr(e,s))));break;case 19:we(i,e),Ce(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,lr(e,o)));break;case 30:break;case 21:break;default:we(i,e),Ce(e)}}function Ce(e){var i=e.flags;if(i&2){try{for(var s,o=e.return;o!==null;){if(ym(o)){s=o;break}o=o.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var h=s.stateNode,d=Nu(e);ar(e,d,h);break;case 5:var y=s.stateNode;s.flags&32&&(is(y,""),s.flags&=-33);var v=Nu(e);ar(e,v,y);break;case 3:case 4:var C=s.stateNode.containerInfo,N=Nu(e);ku(e,N,C);break;default:throw Error(a(161))}}catch(X){Dt(e,e.return,X)}e.flags&=-3}i&4096&&(e.flags&=-4097)}function Cm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var i=e;Cm(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),e=e.sibling}}function Gi(e,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)bm(e,i.alternate,i),i=i.sibling}function kn(e){for(e=e.child;e!==null;){var i=e;switch(i.tag){case 0:case 11:case 14:case 15:ln(4,i,i.return),kn(i);break;case 1:gi(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&pm(i,i.return,s),kn(i);break;case 27:Oa(i.stateNode);case 26:case 5:gi(i,i.return),kn(i);break;case 22:i.memoizedState===null&&kn(i);break;case 30:kn(i);break;default:kn(i)}e=e.sibling}}function Ui(e,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var o=i.alternate,h=e,d=i,y=d.flags;switch(d.tag){case 0:case 11:case 15:Ui(h,d,s),Ta(4,d);break;case 1:if(Ui(h,d,s),o=d,h=o.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(N){Dt(o,o.return,N)}if(o=d,h=o.updateQueue,h!==null){var v=o.stateNode;try{var C=h.shared.hiddenCallbacks;if(C!==null)for(h.shared.hiddenCallbacks=null,h=0;h<C.length;h++)nd(C[h],v)}catch(N){Dt(o,o.return,N)}}s&&y&64&&mm(d),Aa(d,d.return);break;case 27:xm(d);case 26:case 5:Ui(h,d,s),s&&o===null&&y&4&&gm(d),Aa(d,d.return);break;case 12:Ui(h,d,s);break;case 31:Ui(h,d,s),s&&y&4&&Tm(h,d);break;case 13:Ui(h,d,s),s&&y&4&&Am(h,d);break;case 22:d.memoizedState===null&&Ui(h,d,s),Aa(d,d.return);break;case 30:break;default:Ui(h,d,s)}i=i.sibling}}function Lu(e,i){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(e=i.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&ca(s))}function ju(e,i){e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&ca(e))}function ci(e,i,s,o){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Mm(e,i,s,o),i=i.sibling}function Mm(e,i,s,o){var h=i.flags;switch(i.tag){case 0:case 11:case 15:ci(e,i,s,o),h&2048&&Ta(9,i);break;case 1:ci(e,i,s,o);break;case 3:ci(e,i,s,o),h&2048&&(e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&ca(e)));break;case 12:if(h&2048){ci(e,i,s,o),e=i.stateNode;try{var d=i.memoizedProps,y=d.id,v=d.onPostCommit;typeof v=="function"&&v(y,i.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(C){Dt(i,i.return,C)}}else ci(e,i,s,o);break;case 31:ci(e,i,s,o);break;case 13:ci(e,i,s,o);break;case 23:break;case 22:d=i.stateNode,y=i.alternate,i.memoizedState!==null?d._visibility&2?ci(e,i,s,o):wa(e,i):d._visibility&2?ci(e,i,s,o):(d._visibility|=2,Ss(e,i,s,o,(i.subtreeFlags&10256)!==0||!1)),h&2048&&Lu(y,i);break;case 24:ci(e,i,s,o),h&2048&&ju(i.alternate,i);break;default:ci(e,i,s,o)}}function Ss(e,i,s,o,h){for(h=h&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var d=e,y=i,v=s,C=o,N=y.flags;switch(y.tag){case 0:case 11:case 15:Ss(d,y,v,C,h),Ta(8,y);break;case 23:break;case 22:var X=y.stateNode;y.memoizedState!==null?X._visibility&2?Ss(d,y,v,C,h):wa(d,y):(X._visibility|=2,Ss(d,y,v,C,h)),h&&N&2048&&Lu(y.alternate,y);break;case 24:Ss(d,y,v,C,h),h&&N&2048&&ju(y.alternate,y);break;default:Ss(d,y,v,C,h)}i=i.sibling}}function wa(e,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=e,o=i,h=o.flags;switch(o.tag){case 22:wa(s,o),h&2048&&Lu(o.alternate,o);break;case 24:wa(s,o),h&2048&&ju(o.alternate,o);break;default:wa(s,o)}i=i.sibling}}var Ca=8192;function Ts(e,i,s){if(e.subtreeFlags&Ca)for(e=e.child;e!==null;)Em(e,i,s),e=e.sibling}function Em(e,i,s){switch(e.tag){case 26:Ts(e,i,s),e.flags&Ca&&e.memoizedState!==null&&$_(s,ui,e.memoizedState,e.memoizedProps);break;case 5:Ts(e,i,s);break;case 3:case 4:var o=ui;ui=br(e.stateNode.containerInfo),Ts(e,i,s),ui=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=Ca,Ca=16777216,Ts(e,i,s),Ca=o):Ts(e,i,s));break;default:Ts(e,i,s)}}function Rm(e){var i=e.alternate;if(i!==null&&(e=i.child,e!==null)){i.child=null;do i=e.sibling,e.sibling=null,e=i;while(e!==null)}}function Ma(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var o=i[s];ae=o,Dm(o,e)}Rm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)zm(e),e=e.sibling}function zm(e){switch(e.tag){case 0:case 11:case 15:Ma(e),e.flags&2048&&ln(9,e,e.return);break;case 3:Ma(e);break;case 12:Ma(e);break;case 22:var i=e.stateNode;e.memoizedState!==null&&i._visibility&2&&(e.return===null||e.return.tag!==13)?(i._visibility&=-3,rr(e)):Ma(e);break;default:Ma(e)}}function rr(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var o=i[s];ae=o,Dm(o,e)}Rm(e)}for(e=e.child;e!==null;){switch(i=e,i.tag){case 0:case 11:case 15:ln(8,i,i.return),rr(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,rr(i));break;default:rr(i)}e=e.sibling}}function Dm(e,i){for(;ae!==null;){var s=ae;switch(s.tag){case 0:case 11:case 15:ln(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var o=s.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:ca(s.memoizedState.cache)}if(o=s.child,o!==null)o.return=s,ae=o;else t:for(s=e;ae!==null;){o=ae;var h=o.sibling,d=o.return;if(vm(o),o===s){ae=null;break t}if(h!==null){h.return=d,ae=h;break t}ae=d}}}var m_={getCacheForType:function(e){var i=ce(Jt),s=i.data.get(e);return s===void 0&&(s=e(),i.data.set(e,s)),s},cacheSignal:function(){return ce(Jt).controller.signal}},p_=typeof WeakMap=="function"?WeakMap:Map,Et=0,Nt=null,yt=null,_t=0,zt=0,He=null,rn=!1,As=!1,Yu=!1,Ni=0,Vt=0,on=0,Hn=0,Xu=0,Le=0,ws=0,Ea=null,Me=null,qu=!1,or=0,Bm=0,ur=1/0,cr=null,un=null,ie=0,cn=null,Cs=null,ki=0,Vu=0,Pu=null,Om=null,Ra=0,Fu=null;function je(){return(Et&2)!==0&&_t!==0?_t&-_t:z.T!==null?Ju():Wh()}function Gm(){if(Le===0)if((_t&536870912)===0||St){var e=xl;xl<<=1,(xl&3932160)===0&&(xl=262144),Le=e}else Le=536870912;return e=Ne.current,e!==null&&(e.flags|=32),Le}function Ee(e,i,s){(e===Nt&&(zt===2||zt===9)||e.cancelPendingCommit!==null)&&(Ms(e,0),hn(e,_t,Le,!1)),Ks(e,s),((Et&2)===0||e!==Nt)&&(e===Nt&&((Et&2)===0&&(Hn|=s),Vt===4&&hn(e,_t,Le,!1)),yi(e))}function Um(e,i,s){if((Et&6)!==0)throw Error(a(327));var o=!s&&(i&127)===0&&(i&e.expiredLanes)===0||Zs(e,i),h=o?x_(e,i):Wu(e,i,!0),d=o;do{if(h===0){As&&!o&&hn(e,i,0,!1);break}else{if(s=e.current.alternate,d&&!g_(s)){h=Wu(e,i,!1),d=!1;continue}if(h===2){if(d=i,e.errorRecoveryDisabledLanes&d)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){i=y;t:{var v=e;h=Ea;var C=v.current.memoizedState.isDehydrated;if(C&&(Ms(v,y).flags|=256),y=Wu(v,y,!1),y!==2){if(Yu&&!C){v.errorRecoveryDisabledLanes|=d,Hn|=d,h=4;break t}d=Me,Me=h,d!==null&&(Me===null?Me=d:Me.push.apply(Me,d))}h=y}if(d=!1,h!==2)continue}}if(h===1){Ms(e,0),hn(e,i,0,!0);break}t:{switch(o=e,d=h,d){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:hn(o,i,Le,!rn);break t;case 2:Me=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(h=or+300-De(),10<h)){if(hn(o,i,Le,!rn),bl(o,0,!0)!==0)break t;ki=i,o.timeoutHandle=fp(Nm.bind(null,o,s,Me,cr,qu,i,Le,Hn,ws,rn,d,"Throttled",-0,0),h);break t}Nm(o,s,Me,cr,qu,i,Le,Hn,ws,rn,d,null,-0,0)}}break}while(!0);yi(e)}function Nm(e,i,s,o,h,d,y,v,C,N,X,P,H,j){if(e.timeoutHandle=-1,P=i.subtreeFlags,P&8192||(P&16785408)===16785408){P={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Si},Em(i,d,P);var st=(d&62914560)===d?or-De():(d&4194048)===d?Bm-De():0;if(st=t1(P,st),st!==null){ki=d,e.cancelPendingCommit=st(Vm.bind(null,e,i,d,s,o,h,y,v,C,X,P,null,H,j)),hn(e,d,y,!N);return}}Vm(e,i,d,s,o,h,y,v,C)}function g_(e){for(var i=e;;){var s=i.tag;if((s===0||s===11||s===15)&&i.flags&16384&&(s=i.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var o=0;o<s.length;o++){var h=s[o],d=h.getSnapshot;h=h.value;try{if(!Ge(d(),h))return!1}catch{return!1}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;else{if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function hn(e,i,s,o){i&=~Xu,i&=~Hn,e.suspendedLanes|=i,e.pingedLanes&=~i,o&&(e.warmLanes|=i),o=e.expirationTimes;for(var h=i;0<h;){var d=31-Oe(h),y=1<<d;o[d]=-1,h&=~y}s!==0&&Ph(e,s,i)}function hr(){return(Et&6)===0?(za(0),!1):!0}function Qu(){if(yt!==null){if(zt===0)var e=yt.return;else e=yt,Ci=Rn=null,uu(e),ys=null,fa=0,e=yt;for(;e!==null;)dm(e.alternate,e),e=e.return;yt=null}}function Ms(e,i){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,N_(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),ki=0,Qu(),Nt=e,yt=s=Ai(e.current,null),_t=i,zt=0,He=null,rn=!1,As=Zs(e,i),Yu=!1,ws=Le=Xu=Hn=on=Vt=0,Me=Ea=null,qu=!1,(i&8)!==0&&(i|=i&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=i;0<o;){var h=31-Oe(o),d=1<<h;i|=e[h],o&=~d}return Ni=i,Bl(),s}function km(e,i){mt=null,z.H=ba,i===gs||i===jl?(i=$f(),zt=3):i===Io?(i=$f(),zt=4):zt=i===wu?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,He=i,yt===null&&(Vt=1,tr(e,Qe(i,e.current)))}function Hm(){var e=Ne.current;return e===null?!0:(_t&4194048)===_t?Ie===null:(_t&62914560)===_t||(_t&536870912)!==0?e===Ie:!1}function Lm(){var e=z.H;return z.H=ba,e===null?ba:e}function jm(){var e=z.A;return z.A=m_,e}function fr(){Vt=4,rn||(_t&4194048)!==_t&&Ne.current!==null||(As=!0),(on&134217727)===0&&(Hn&134217727)===0||Nt===null||hn(Nt,_t,Le,!1)}function Wu(e,i,s){var o=Et;Et|=2;var h=Lm(),d=jm();(Nt!==e||_t!==i)&&(cr=null,Ms(e,i)),i=!1;var y=Vt;t:do try{if(zt!==0&&yt!==null){var v=yt,C=He;switch(zt){case 8:Qu(),y=6;break t;case 3:case 2:case 9:case 6:Ne.current===null&&(i=!0);var N=zt;if(zt=0,He=null,Es(e,v,C,N),s&&As){y=0;break t}break;default:N=zt,zt=0,He=null,Es(e,v,C,N)}}y_(),y=Vt;break}catch(X){km(e,X)}while(!0);return i&&e.shellSuspendCounter++,Ci=Rn=null,Et=o,z.H=h,z.A=d,yt===null&&(Nt=null,_t=0,Bl()),y}function y_(){for(;yt!==null;)Ym(yt)}function x_(e,i){var s=Et;Et|=2;var o=Lm(),h=jm();Nt!==e||_t!==i?(cr=null,ur=De()+500,Ms(e,i)):As=Zs(e,i);t:do try{if(zt!==0&&yt!==null){i=yt;var d=He;e:switch(zt){case 1:zt=0,He=null,Es(e,i,d,1);break;case 2:case 9:if(If(d)){zt=0,He=null,Xm(i);break}i=function(){zt!==2&&zt!==9||Nt!==e||(zt=7),yi(e)},d.then(i,i);break t;case 3:zt=7;break t;case 4:zt=5;break t;case 7:If(d)?(zt=0,He=null,Xm(i)):(zt=0,He=null,Es(e,i,d,7));break;case 5:var y=null;switch(yt.tag){case 26:y=yt.memoizedState;case 5:case 27:var v=yt;if(y?Mp(y):v.stateNode.complete){zt=0,He=null;var C=v.sibling;if(C!==null)yt=C;else{var N=v.return;N!==null?(yt=N,dr(N)):yt=null}break e}}zt=0,He=null,Es(e,i,d,5);break;case 6:zt=0,He=null,Es(e,i,d,6);break;case 8:Qu(),Vt=6;break t;default:throw Error(a(462))}}__();break}catch(X){km(e,X)}while(!0);return Ci=Rn=null,z.H=o,z.A=h,Et=s,yt!==null?0:(Nt=null,_t=0,Bl(),Vt)}function __(){for(;yt!==null&&!X0();)Ym(yt)}function Ym(e){var i=hm(e.alternate,e,Ni);e.memoizedProps=e.pendingProps,i===null?dr(e):yt=i}function Xm(e){var i=e,s=i.alternate;switch(i.tag){case 15:case 0:i=am(s,i,i.pendingProps,i.type,void 0,_t);break;case 11:i=am(s,i,i.pendingProps,i.type.render,i.ref,_t);break;case 5:uu(i);default:dm(s,i),i=yt=jf(i,Ni),i=hm(s,i,Ni)}e.memoizedProps=e.pendingProps,i===null?dr(e):yt=i}function Es(e,i,s,o){Ci=Rn=null,uu(i),ys=null,fa=0;var h=i.return;try{if(r_(e,h,i,s,_t)){Vt=1,tr(e,Qe(s,e.current)),yt=null;return}}catch(d){if(h!==null)throw yt=h,d;Vt=1,tr(e,Qe(s,e.current)),yt=null;return}i.flags&32768?(St||o===1?e=!0:As||(_t&536870912)!==0?e=!1:(rn=e=!0,(o===2||o===9||o===3||o===6)&&(o=Ne.current,o!==null&&o.tag===13&&(o.flags|=16384))),qm(i,e)):dr(i)}function dr(e){var i=e;do{if((i.flags&32768)!==0){qm(i,rn);return}e=i.return;var s=c_(i.alternate,i,Ni);if(s!==null){yt=s;return}if(i=i.sibling,i!==null){yt=i;return}yt=i=e}while(i!==null);Vt===0&&(Vt=5)}function qm(e,i){do{var s=h_(e.alternate,e);if(s!==null){s.flags&=32767,yt=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(e=e.sibling,e!==null)){yt=e;return}yt=e=s}while(e!==null);Vt=6,yt=null}function Vm(e,i,s,o,h,d,y,v,C){e.cancelPendingCommit=null;do mr();while(ie!==0);if((Et&6)!==0)throw Error(a(327));if(i!==null){if(i===e.current)throw Error(a(177));if(d=i.lanes|i.childLanes,d|=No,J0(e,s,d,y,v,C),e===Nt&&(yt=Nt=null,_t=0),Cs=i,cn=e,ki=s,Vu=d,Pu=h,Om=o,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,T_(gl,function(){return Zm(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||o){o=z.T,z.T=null,h=L.p,L.p=2,y=Et,Et|=4;try{f_(e,i,s)}finally{Et=y,L.p=h,z.T=o}}ie=1,Pm(),Fm(),Qm()}}function Pm(){if(ie===1){ie=0;var e=cn,i=Cs,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=z.T,z.T=null;var o=L.p;L.p=2;var h=Et;Et|=4;try{wm(i,e);var d=lc,y=Df(e.containerInfo),v=d.focusedElem,C=d.selectionRange;if(y!==v&&v&&v.ownerDocument&&zf(v.ownerDocument.documentElement,v)){if(C!==null&&Do(v)){var N=C.start,X=C.end;if(X===void 0&&(X=N),"selectionStart"in v)v.selectionStart=N,v.selectionEnd=Math.min(X,v.value.length);else{var P=v.ownerDocument||document,H=P&&P.defaultView||window;if(H.getSelection){var j=H.getSelection(),st=v.textContent.length,ut=Math.min(C.start,st),Gt=C.end===void 0?ut:Math.min(C.end,st);!j.extend&&ut>Gt&&(y=Gt,Gt=ut,ut=y);var B=Rf(v,ut),R=Rf(v,Gt);if(B&&R&&(j.rangeCount!==1||j.anchorNode!==B.node||j.anchorOffset!==B.offset||j.focusNode!==R.node||j.focusOffset!==R.offset)){var U=P.createRange();U.setStart(B.node,B.offset),j.removeAllRanges(),ut>Gt?(j.addRange(U),j.extend(R.node,R.offset)):(U.setEnd(R.node,R.offset),j.addRange(U))}}}}for(P=[],j=v;j=j.parentNode;)j.nodeType===1&&P.push({element:j,left:j.scrollLeft,top:j.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<P.length;v++){var V=P[v];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}Cr=!!ac,lc=ac=null}finally{Et=h,L.p=o,z.T=s}}e.current=i,ie=2}}function Fm(){if(ie===2){ie=0;var e=cn,i=Cs,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=z.T,z.T=null;var o=L.p;L.p=2;var h=Et;Et|=4;try{bm(e,i.alternate,i)}finally{Et=h,L.p=o,z.T=s}}ie=3}}function Qm(){if(ie===4||ie===3){ie=0,q0();var e=cn,i=Cs,s=ki,o=Om;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?ie=5:(ie=0,Cs=cn=null,Wm(e,e.pendingLanes));var h=e.pendingLanes;if(h===0&&(un=null),ho(s),i=i.stateNode,Be&&typeof Be.onCommitFiberRoot=="function")try{Be.onCommitFiberRoot(Ws,i,void 0,(i.current.flags&128)===128)}catch{}if(o!==null){i=z.T,h=L.p,L.p=2,z.T=null;try{for(var d=e.onRecoverableError,y=0;y<o.length;y++){var v=o[y];d(v.value,{componentStack:v.stack})}}finally{z.T=i,L.p=h}}(ki&3)!==0&&mr(),yi(e),h=e.pendingLanes,(s&261930)!==0&&(h&42)!==0?e===Fu?Ra++:(Ra=0,Fu=e):Ra=0,za(0)}}function Wm(e,i){(e.pooledCacheLanes&=i)===0&&(i=e.pooledCache,i!=null&&(e.pooledCache=null,ca(i)))}function mr(){return Pm(),Fm(),Qm(),Zm()}function Zm(){if(ie!==5)return!1;var e=cn,i=Vu;Vu=0;var s=ho(ki),o=z.T,h=L.p;try{L.p=32>s?32:s,z.T=null,s=Pu,Pu=null;var d=cn,y=ki;if(ie=0,Cs=cn=null,ki=0,(Et&6)!==0)throw Error(a(331));var v=Et;if(Et|=4,zm(d.current),Mm(d,d.current,y,s),Et=v,za(0,!1),Be&&typeof Be.onPostCommitFiberRoot=="function")try{Be.onPostCommitFiberRoot(Ws,d)}catch{}return!0}finally{L.p=h,z.T=o,Wm(e,i)}}function Km(e,i,s){i=Qe(s,i),i=Au(e.stateNode,i,2),e=nn(e,i,2),e!==null&&(Ks(e,2),yi(e))}function Dt(e,i,s){if(e.tag===3)Km(e,e,s);else for(;i!==null;){if(i.tag===3){Km(i,e,s);break}else if(i.tag===1){var o=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(un===null||!un.has(o))){e=Qe(s,e),s=Id(2),o=nn(i,s,2),o!==null&&(Jd(s,o,i,e),Ks(o,2),yi(o));break}}i=i.return}}function Zu(e,i,s){var o=e.pingCache;if(o===null){o=e.pingCache=new p_;var h=new Set;o.set(i,h)}else h=o.get(i),h===void 0&&(h=new Set,o.set(i,h));h.has(s)||(Yu=!0,h.add(s),e=b_.bind(null,e,i,s),i.then(e,e))}function b_(e,i,s){var o=e.pingCache;o!==null&&o.delete(i),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,Nt===e&&(_t&s)===s&&(Vt===4||Vt===3&&(_t&62914560)===_t&&300>De()-or?(Et&2)===0&&Ms(e,0):Xu|=s,ws===_t&&(ws=0)),yi(e)}function Im(e,i){i===0&&(i=Vh()),e=Cn(e,i),e!==null&&(Ks(e,i),yi(e))}function v_(e){var i=e.memoizedState,s=0;i!==null&&(s=i.retryLane),Im(e,s)}function S_(e,i){var s=0;switch(e.tag){case 31:case 13:var o=e.stateNode,h=e.memoizedState;h!==null&&(s=h.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(a(314))}o!==null&&o.delete(i),Im(e,s)}function T_(e,i){return ro(e,i)}var pr=null,Rs=null,Ku=!1,gr=!1,Iu=!1,fn=0;function yi(e){e!==Rs&&e.next===null&&(Rs===null?pr=Rs=e:Rs=Rs.next=e),gr=!0,Ku||(Ku=!0,w_())}function za(e,i){if(!Iu&&gr){Iu=!0;do for(var s=!1,o=pr;o!==null;){if(e!==0){var h=o.pendingLanes;if(h===0)var d=0;else{var y=o.suspendedLanes,v=o.pingedLanes;d=(1<<31-Oe(42|e)+1)-1,d&=h&~(y&~v),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(s=!0,ep(o,d))}else d=_t,d=bl(o,o===Nt?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(d&3)===0||Zs(o,d)||(s=!0,ep(o,d));o=o.next}while(s);Iu=!1}}function A_(){Jm()}function Jm(){gr=Ku=!1;var e=0;fn!==0&&U_()&&(e=fn);for(var i=De(),s=null,o=pr;o!==null;){var h=o.next,d=$m(o,i);d===0?(o.next=null,s===null?pr=h:s.next=h,h===null&&(Rs=s)):(s=o,(e!==0||(d&3)!==0)&&(gr=!0)),o=h}ie!==0&&ie!==5||za(e),fn!==0&&(fn=0)}function $m(e,i){for(var s=e.suspendedLanes,o=e.pingedLanes,h=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var y=31-Oe(d),v=1<<y,C=h[y];C===-1?((v&s)===0||(v&o)!==0)&&(h[y]=I0(v,i)):C<=i&&(e.expiredLanes|=v),d&=~v}if(i=Nt,s=_t,s=bl(e,e===i?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,s===0||e===i&&(zt===2||zt===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&oo(o),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||Zs(e,s)){if(i=s&-s,i===e.callbackPriority)return i;switch(o!==null&&oo(o),ho(s)){case 2:case 8:s=Xh;break;case 32:s=gl;break;case 268435456:s=qh;break;default:s=gl}return o=tp.bind(null,e),s=ro(s,o),e.callbackPriority=i,e.callbackNode=s,i}return o!==null&&o!==null&&oo(o),e.callbackPriority=2,e.callbackNode=null,2}function tp(e,i){if(ie!==0&&ie!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(mr()&&e.callbackNode!==s)return null;var o=_t;return o=bl(e,e===Nt?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(Um(e,o,i),$m(e,De()),e.callbackNode!=null&&e.callbackNode===s?tp.bind(null,e):null)}function ep(e,i){if(mr())return null;Um(e,i,!0)}function w_(){k_(function(){(Et&6)!==0?ro(Yh,A_):Jm()})}function Ju(){if(fn===0){var e=ms;e===0&&(e=yl,yl<<=1,(yl&261888)===0&&(yl=256)),fn=e}return fn}function ip(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Al(""+e)}function np(e,i){var s=i.ownerDocument.createElement("input");return s.name=i.name,s.value=i.value,e.id&&s.setAttribute("form",e.id),i.parentNode.insertBefore(s,i),e=new FormData(e),s.parentNode.removeChild(s),e}function C_(e,i,s,o,h){if(i==="submit"&&s&&s.stateNode===h){var d=ip((h[Se]||null).action),y=o.submitter;y&&(i=(i=y[Se]||null)?ip(i.formAction):y.getAttribute("formAction"),i!==null&&(d=i,y=null));var v=new El("action","action",null,o,h);e.push({event:v,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(fn!==0){var C=y?np(h,y):new FormData(h);xu(s,{pending:!0,data:C,method:h.method,action:d},null,C)}}else typeof d=="function"&&(v.preventDefault(),C=y?np(h,y):new FormData(h),xu(s,{pending:!0,data:C,method:h.method,action:d},d,C))},currentTarget:h}]})}}for(var $u=0;$u<Uo.length;$u++){var tc=Uo[$u],M_=tc.toLowerCase(),E_=tc[0].toUpperCase()+tc.slice(1);oi(M_,"on"+E_)}oi(Gf,"onAnimationEnd"),oi(Uf,"onAnimationIteration"),oi(Nf,"onAnimationStart"),oi("dblclick","onDoubleClick"),oi("focusin","onFocus"),oi("focusout","onBlur"),oi(Vx,"onTransitionRun"),oi(Px,"onTransitionStart"),oi(Fx,"onTransitionCancel"),oi(kf,"onTransitionEnd"),ts("onMouseEnter",["mouseout","mouseover"]),ts("onMouseLeave",["mouseout","mouseover"]),ts("onPointerEnter",["pointerout","pointerover"]),ts("onPointerLeave",["pointerout","pointerover"]),Sn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Sn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Sn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Sn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Sn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Sn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Da="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(" "),R_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Da));function sp(e,i){i=(i&4)!==0;for(var s=0;s<e.length;s++){var o=e[s],h=o.event;o=o.listeners;t:{var d=void 0;if(i)for(var y=o.length-1;0<=y;y--){var v=o[y],C=v.instance,N=v.currentTarget;if(v=v.listener,C!==d&&h.isPropagationStopped())break t;d=v,h.currentTarget=N;try{d(h)}catch(X){Dl(X)}h.currentTarget=null,d=C}else for(y=0;y<o.length;y++){if(v=o[y],C=v.instance,N=v.currentTarget,v=v.listener,C!==d&&h.isPropagationStopped())break t;d=v,h.currentTarget=N;try{d(h)}catch(X){Dl(X)}h.currentTarget=null,d=C}}}}function xt(e,i){var s=i[fo];s===void 0&&(s=i[fo]=new Set);var o=e+"__bubble";s.has(o)||(ap(i,e,2,!1),s.add(o))}function ec(e,i,s){var o=0;i&&(o|=4),ap(s,e,o,i)}var yr="_reactListening"+Math.random().toString(36).slice(2);function ic(e){if(!e[yr]){e[yr]=!0,Ih.forEach(function(s){s!=="selectionchange"&&(R_.has(s)||ec(s,!1,e),ec(s,!0,e))});var i=e.nodeType===9?e:e.ownerDocument;i===null||i[yr]||(i[yr]=!0,ec("selectionchange",!1,i))}}function ap(e,i,s,o){switch(Gp(i)){case 2:var h=n1;break;case 8:h=s1;break;default:h=yc}s=h.bind(null,i,s,e),h=void 0,!So||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(h=!0),o?h!==void 0?e.addEventListener(i,s,{capture:!0,passive:h}):e.addEventListener(i,s,!0):h!==void 0?e.addEventListener(i,s,{passive:h}):e.addEventListener(i,s,!1)}function nc(e,i,s,o,h){var d=o;if((i&1)===0&&(i&2)===0&&o!==null)t:for(;;){if(o===null)return;var y=o.tag;if(y===3||y===4){var v=o.stateNode.containerInfo;if(v===h)break;if(y===4)for(y=o.return;y!==null;){var C=y.tag;if((C===3||C===4)&&y.stateNode.containerInfo===h)return;y=y.return}for(;v!==null;){if(y=In(v),y===null)return;if(C=y.tag,C===5||C===6||C===26||C===27){o=d=y;continue t}v=v.parentNode}}o=o.return}cf(function(){var N=d,X=bo(s),P=[];t:{var H=Hf.get(e);if(H!==void 0){var j=El,st=e;switch(e){case"keypress":if(Cl(s)===0)break t;case"keydown":case"keyup":j=Sx;break;case"focusin":st="focus",j=Co;break;case"focusout":st="blur",j=Co;break;case"beforeblur":case"afterblur":j=Co;break;case"click":if(s.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":j=df;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":j=cx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":j=wx;break;case Gf:case Uf:case Nf:j=dx;break;case kf:j=Mx;break;case"scroll":case"scrollend":j=ox;break;case"wheel":j=Rx;break;case"copy":case"cut":case"paste":j=px;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":j=pf;break;case"toggle":case"beforetoggle":j=Dx}var ut=(i&4)!==0,Gt=!ut&&(e==="scroll"||e==="scrollend"),B=ut?H!==null?H+"Capture":null:H;ut=[];for(var R=N,U;R!==null;){var V=R;if(U=V.stateNode,V=V.tag,V!==5&&V!==26&&V!==27||U===null||B===null||(V=$s(R,B),V!=null&&ut.push(Ba(R,V,U))),Gt)break;R=R.return}0<ut.length&&(H=new j(H,st,null,s,X),P.push({event:H,listeners:ut}))}}if((i&7)===0){t:{if(H=e==="mouseover"||e==="pointerover",j=e==="mouseout"||e==="pointerout",H&&s!==_o&&(st=s.relatedTarget||s.fromElement)&&(In(st)||st[Kn]))break t;if((j||H)&&(H=X.window===X?X:(H=X.ownerDocument)?H.defaultView||H.parentWindow:window,j?(st=s.relatedTarget||s.toElement,j=N,st=st?In(st):null,st!==null&&(Gt=u(st),ut=st.tag,st!==Gt||ut!==5&&ut!==27&&ut!==6)&&(st=null)):(j=null,st=N),j!==st)){if(ut=df,V="onMouseLeave",B="onMouseEnter",R="mouse",(e==="pointerout"||e==="pointerover")&&(ut=pf,V="onPointerLeave",B="onPointerEnter",R="pointer"),Gt=j==null?H:Js(j),U=st==null?H:Js(st),H=new ut(V,R+"leave",j,s,X),H.target=Gt,H.relatedTarget=U,V=null,In(X)===N&&(ut=new ut(B,R+"enter",st,s,X),ut.target=U,ut.relatedTarget=Gt,V=ut),Gt=V,j&&st)e:{for(ut=z_,B=j,R=st,U=0,V=B;V;V=ut(V))U++;V=0;for(var ot=R;ot;ot=ut(ot))V++;for(;0<U-V;)B=ut(B),U--;for(;0<V-U;)R=ut(R),V--;for(;U--;){if(B===R||R!==null&&B===R.alternate){ut=B;break e}B=ut(B),R=ut(R)}ut=null}else ut=null;j!==null&&lp(P,H,j,ut,!1),st!==null&&Gt!==null&&lp(P,Gt,st,ut,!0)}}t:{if(H=N?Js(N):window,j=H.nodeName&&H.nodeName.toLowerCase(),j==="select"||j==="input"&&H.type==="file")var wt=Tf;else if(vf(H))if(Af)wt=Yx;else{wt=Lx;var lt=Hx}else j=H.nodeName,!j||j.toLowerCase()!=="input"||H.type!=="checkbox"&&H.type!=="radio"?N&&xo(N.elementType)&&(wt=Tf):wt=jx;if(wt&&(wt=wt(e,N))){Sf(P,wt,s,X);break t}lt&&lt(e,H,N),e==="focusout"&&N&&H.type==="number"&&N.memoizedProps.value!=null&&yo(H,"number",H.value)}switch(lt=N?Js(N):window,e){case"focusin":(vf(lt)||lt.contentEditable==="true")&&(ls=lt,Bo=N,ra=null);break;case"focusout":ra=Bo=ls=null;break;case"mousedown":Oo=!0;break;case"contextmenu":case"mouseup":case"dragend":Oo=!1,Bf(P,s,X);break;case"selectionchange":if(qx)break;case"keydown":case"keyup":Bf(P,s,X)}var pt;if(Eo)t:{switch(e){case"compositionstart":var bt="onCompositionStart";break t;case"compositionend":bt="onCompositionEnd";break t;case"compositionupdate":bt="onCompositionUpdate";break t}bt=void 0}else as?_f(e,s)&&(bt="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(bt="onCompositionStart");bt&&(gf&&s.locale!=="ko"&&(as||bt!=="onCompositionStart"?bt==="onCompositionEnd"&&as&&(pt=hf()):(Zi=X,To="value"in Zi?Zi.value:Zi.textContent,as=!0)),lt=xr(N,bt),0<lt.length&&(bt=new mf(bt,e,null,s,X),P.push({event:bt,listeners:lt}),pt?bt.data=pt:(pt=bf(s),pt!==null&&(bt.data=pt)))),(pt=Ox?Gx(e,s):Ux(e,s))&&(bt=xr(N,"onBeforeInput"),0<bt.length&&(lt=new mf("onBeforeInput","beforeinput",null,s,X),P.push({event:lt,listeners:bt}),lt.data=pt)),C_(P,e,N,s,X)}sp(P,i)})}function Ba(e,i,s){return{instance:e,listener:i,currentTarget:s}}function xr(e,i){for(var s=i+"Capture",o=[];e!==null;){var h=e,d=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||d===null||(h=$s(e,s),h!=null&&o.unshift(Ba(e,h,d)),h=$s(e,i),h!=null&&o.push(Ba(e,h,d))),e.tag===3)return o;e=e.return}return[]}function z_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function lp(e,i,s,o,h){for(var d=i._reactName,y=[];s!==null&&s!==o;){var v=s,C=v.alternate,N=v.stateNode;if(v=v.tag,C!==null&&C===o)break;v!==5&&v!==26&&v!==27||N===null||(C=N,h?(N=$s(s,d),N!=null&&y.unshift(Ba(s,N,C))):h||(N=$s(s,d),N!=null&&y.push(Ba(s,N,C)))),s=s.return}y.length!==0&&e.push({event:i,listeners:y})}var D_=/\r\n?/g,B_=/\u0000|\uFFFD/g;function rp(e){return(typeof e=="string"?e:""+e).replace(D_,`
50
+ `).replace(B_,"")}function op(e,i){return i=rp(i),rp(e)===i}function Ot(e,i,s,o,h,d){switch(s){case"children":typeof o=="string"?i==="body"||i==="textarea"&&o===""||is(e,o):(typeof o=="number"||typeof o=="bigint")&&i!=="body"&&is(e,""+o);break;case"className":Sl(e,"class",o);break;case"tabIndex":Sl(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Sl(e,s,o);break;case"style":of(e,o,d);break;case"data":if(i!=="object"){Sl(e,"data",o);break}case"src":case"href":if(o===""&&(i!=="a"||s!=="href")){e.removeAttribute(s);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(s);break}o=Al(""+o),e.setAttribute(s,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(s,"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 d=="function"&&(s==="formAction"?(i!=="input"&&Ot(e,i,"name",h.name,h,null),Ot(e,i,"formEncType",h.formEncType,h,null),Ot(e,i,"formMethod",h.formMethod,h,null),Ot(e,i,"formTarget",h.formTarget,h,null)):(Ot(e,i,"encType",h.encType,h,null),Ot(e,i,"method",h.method,h,null),Ot(e,i,"target",h.target,h,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(s);break}o=Al(""+o),e.setAttribute(s,o);break;case"onClick":o!=null&&(e.onclick=Si);break;case"onScroll":o!=null&&xt("scroll",e);break;case"onScrollEnd":o!=null&&xt("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(s=o.__html,s!=null){if(h.children!=null)throw Error(a(60));e.innerHTML=s}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}s=Al(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(s,""+o):e.removeAttribute(s);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":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":o===!0?e.setAttribute(s,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(s,o):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(s,o):e.removeAttribute(s);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(s):e.setAttribute(s,o);break;case"popover":xt("beforetoggle",e),xt("toggle",e),vl(e,"popover",o);break;case"xlinkActuate":vi(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":vi(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":vi(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":vi(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":vi(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":vi(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":vi(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":vi(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":vi(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":vl(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=lx.get(s)||s,vl(e,s,o))}}function sc(e,i,s,o,h,d){switch(s){case"style":of(e,o,d);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(s=o.__html,s!=null){if(h.children!=null)throw Error(a(60));e.innerHTML=s}}break;case"children":typeof o=="string"?is(e,o):(typeof o=="number"||typeof o=="bigint")&&is(e,""+o);break;case"onScroll":o!=null&&xt("scroll",e);break;case"onScrollEnd":o!=null&&xt("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Si);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Jh.hasOwnProperty(s))t:{if(s[0]==="o"&&s[1]==="n"&&(h=s.endsWith("Capture"),i=s.slice(2,h?s.length-7:void 0),d=e[Se]||null,d=d!=null?d[s]:null,typeof d=="function"&&e.removeEventListener(i,d,h),typeof o=="function")){typeof d!="function"&&d!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(i,o,h);break t}s in e?e[s]=o:o===!0?e.setAttribute(s,""):vl(e,s,o)}}}function fe(e,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xt("error",e),xt("load",e);var o=!1,h=!1,d;for(d in s)if(s.hasOwnProperty(d)){var y=s[d];if(y!=null)switch(d){case"src":o=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Ot(e,i,d,y,s,null)}}h&&Ot(e,i,"srcSet",s.srcSet,s,null),o&&Ot(e,i,"src",s.src,s,null);return;case"input":xt("invalid",e);var v=d=y=h=null,C=null,N=null;for(o in s)if(s.hasOwnProperty(o)){var X=s[o];if(X!=null)switch(o){case"name":h=X;break;case"type":y=X;break;case"checked":C=X;break;case"defaultChecked":N=X;break;case"value":d=X;break;case"defaultValue":v=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(a(137,i));break;default:Ot(e,i,o,X,s,null)}}sf(e,d,v,C,N,y,h,!1);return;case"select":xt("invalid",e),o=y=d=null;for(h in s)if(s.hasOwnProperty(h)&&(v=s[h],v!=null))switch(h){case"value":d=v;break;case"defaultValue":y=v;break;case"multiple":o=v;default:Ot(e,i,h,v,s,null)}i=d,s=y,e.multiple=!!o,i!=null?es(e,!!o,i,!1):s!=null&&es(e,!!o,s,!0);return;case"textarea":xt("invalid",e),d=h=o=null;for(y in s)if(s.hasOwnProperty(y)&&(v=s[y],v!=null))switch(y){case"value":o=v;break;case"defaultValue":h=v;break;case"children":d=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(a(91));break;default:Ot(e,i,y,v,s,null)}lf(e,o,h,d);return;case"option":for(C in s)if(s.hasOwnProperty(C)&&(o=s[C],o!=null))switch(C){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:Ot(e,i,C,o,s,null)}return;case"dialog":xt("beforetoggle",e),xt("toggle",e),xt("cancel",e),xt("close",e);break;case"iframe":case"object":xt("load",e);break;case"video":case"audio":for(o=0;o<Da.length;o++)xt(Da[o],e);break;case"image":xt("error",e),xt("load",e);break;case"details":xt("toggle",e);break;case"embed":case"source":case"link":xt("error",e),xt("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(N in s)if(s.hasOwnProperty(N)&&(o=s[N],o!=null))switch(N){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Ot(e,i,N,o,s,null)}return;default:if(xo(i)){for(X in s)s.hasOwnProperty(X)&&(o=s[X],o!==void 0&&sc(e,i,X,o,s,void 0));return}}for(v in s)s.hasOwnProperty(v)&&(o=s[v],o!=null&&Ot(e,i,v,o,s,null))}function O_(e,i,s,o){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,d=null,y=null,v=null,C=null,N=null,X=null;for(j in s){var P=s[j];if(s.hasOwnProperty(j)&&P!=null)switch(j){case"checked":break;case"value":break;case"defaultValue":C=P;default:o.hasOwnProperty(j)||Ot(e,i,j,null,o,P)}}for(var H in o){var j=o[H];if(P=s[H],o.hasOwnProperty(H)&&(j!=null||P!=null))switch(H){case"type":d=j;break;case"name":h=j;break;case"checked":N=j;break;case"defaultChecked":X=j;break;case"value":y=j;break;case"defaultValue":v=j;break;case"children":case"dangerouslySetInnerHTML":if(j!=null)throw Error(a(137,i));break;default:j!==P&&Ot(e,i,H,j,o,P)}}go(e,y,v,C,N,X,d,h);return;case"select":j=y=v=H=null;for(d in s)if(C=s[d],s.hasOwnProperty(d)&&C!=null)switch(d){case"value":break;case"multiple":j=C;default:o.hasOwnProperty(d)||Ot(e,i,d,null,o,C)}for(h in o)if(d=o[h],C=s[h],o.hasOwnProperty(h)&&(d!=null||C!=null))switch(h){case"value":H=d;break;case"defaultValue":v=d;break;case"multiple":y=d;default:d!==C&&Ot(e,i,h,d,o,C)}i=v,s=y,o=j,H!=null?es(e,!!s,H,!1):!!o!=!!s&&(i!=null?es(e,!!s,i,!0):es(e,!!s,s?[]:"",!1));return;case"textarea":j=H=null;for(v in s)if(h=s[v],s.hasOwnProperty(v)&&h!=null&&!o.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:Ot(e,i,v,null,o,h)}for(y in o)if(h=o[y],d=s[y],o.hasOwnProperty(y)&&(h!=null||d!=null))switch(y){case"value":H=h;break;case"defaultValue":j=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(a(91));break;default:h!==d&&Ot(e,i,y,h,o,d)}af(e,H,j);return;case"option":for(var st in s)if(H=s[st],s.hasOwnProperty(st)&&H!=null&&!o.hasOwnProperty(st))switch(st){case"selected":e.selected=!1;break;default:Ot(e,i,st,null,o,H)}for(C in o)if(H=o[C],j=s[C],o.hasOwnProperty(C)&&H!==j&&(H!=null||j!=null))switch(C){case"selected":e.selected=H&&typeof H!="function"&&typeof H!="symbol";break;default:Ot(e,i,C,H,o,j)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ut in s)H=s[ut],s.hasOwnProperty(ut)&&H!=null&&!o.hasOwnProperty(ut)&&Ot(e,i,ut,null,o,H);for(N in o)if(H=o[N],j=s[N],o.hasOwnProperty(N)&&H!==j&&(H!=null||j!=null))switch(N){case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(a(137,i));break;default:Ot(e,i,N,H,o,j)}return;default:if(xo(i)){for(var Gt in s)H=s[Gt],s.hasOwnProperty(Gt)&&H!==void 0&&!o.hasOwnProperty(Gt)&&sc(e,i,Gt,void 0,o,H);for(X in o)H=o[X],j=s[X],!o.hasOwnProperty(X)||H===j||H===void 0&&j===void 0||sc(e,i,X,H,o,j);return}}for(var B in s)H=s[B],s.hasOwnProperty(B)&&H!=null&&!o.hasOwnProperty(B)&&Ot(e,i,B,null,o,H);for(P in o)H=o[P],j=s[P],!o.hasOwnProperty(P)||H===j||H==null&&j==null||Ot(e,i,P,H,o,j)}function up(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function G_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,i=0,s=performance.getEntriesByType("resource"),o=0;o<s.length;o++){var h=s[o],d=h.transferSize,y=h.initiatorType,v=h.duration;if(d&&v&&up(y)){for(y=0,v=h.responseEnd,o+=1;o<s.length;o++){var C=s[o],N=C.startTime;if(N>v)break;var X=C.transferSize,P=C.initiatorType;X&&up(P)&&(C=C.responseEnd,y+=X*(C<v?1:(v-N)/(C-N)))}if(--o,i+=8*(d+y)/(h.duration/1e3),e++,10<e)break}}if(0<e)return i/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var ac=null,lc=null;function _r(e){return e.nodeType===9?e:e.ownerDocument}function cp(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 hp(e,i){if(e===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&i==="foreignObject"?0:e}function rc(e,i){return e==="textarea"||e==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var oc=null;function U_(){var e=window.event;return e&&e.type==="popstate"?e===oc?!1:(oc=e,!0):(oc=null,!1)}var fp=typeof setTimeout=="function"?setTimeout:void 0,N_=typeof clearTimeout=="function"?clearTimeout:void 0,dp=typeof Promise=="function"?Promise:void 0,k_=typeof queueMicrotask=="function"?queueMicrotask:typeof dp<"u"?function(e){return dp.resolve(null).then(e).catch(H_)}:fp;function H_(e){setTimeout(function(){throw e})}function dn(e){return e==="head"}function mp(e,i){var s=i,o=0;do{var h=s.nextSibling;if(e.removeChild(s),h&&h.nodeType===8)if(s=h.data,s==="/$"||s==="/&"){if(o===0){e.removeChild(h),Os(i);return}o--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")o++;else if(s==="html")Oa(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,Oa(s);for(var d=s.firstChild;d;){var y=d.nextSibling,v=d.nodeName;d[Is]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&d.rel.toLowerCase()==="stylesheet"||s.removeChild(d),d=y}}else s==="body"&&Oa(e.ownerDocument.body);s=h}while(s);Os(i)}function pp(e,i){var s=e;e=0;do{var o=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),o&&o.nodeType===8)if(s=o.data,s==="/$"){if(e===0)break;e--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||e++;s=o}while(s)}function uc(e){var i=e.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":uc(s),mo(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function L_(e,i,s,o){for(;e.nodeType===1;){var h=s;if(e.nodeName.toLowerCase()!==i.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[Is])switch(i){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==h.rel||e.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||e.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||e.getAttribute("title")!==(h.title==null?null:h.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(h.src==null?null:h.src)||e.getAttribute("type")!==(h.type==null?null:h.type)||e.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(i==="input"&&e.type==="hidden"){var d=h.name==null?null:""+h.name;if(h.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Je(e.nextSibling),e===null)break}return null}function j_(e,i,s){if(i==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=Je(e.nextSibling),e===null))return null;return e}function gp(e,i){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Je(e.nextSibling),e===null))return null;return e}function cc(e){return e.data==="$?"||e.data==="$~"}function hc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Y_(e,i){var s=e.ownerDocument;if(e.data==="$~")e._reactRetry=i;else if(e.data!=="$?"||s.readyState!=="loading")i();else{var o=function(){i(),s.removeEventListener("DOMContentLoaded",o)};s.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Je(e){for(;e!=null;e=e.nextSibling){var i=e.nodeType;if(i===1||i===3)break;if(i===8){if(i=e.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return e}var fc=null;function yp(e){e=e.nextSibling;for(var i=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(i===0)return Je(e.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}e=e.nextSibling}return null}function xp(e){e=e.previousSibling;for(var i=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return e;i--}else s!=="/$"&&s!=="/&"||i++}e=e.previousSibling}return null}function _p(e,i,s){switch(i=_r(s),e){case"html":if(e=i.documentElement,!e)throw Error(a(452));return e;case"head":if(e=i.head,!e)throw Error(a(453));return e;case"body":if(e=i.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function Oa(e){for(var i=e.attributes;i.length;)e.removeAttributeNode(i[0]);mo(e)}var $e=new Map,bp=new Set;function br(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Hi=L.d;L.d={f:X_,r:q_,D:V_,C:P_,L:F_,m:Q_,X:Z_,S:W_,M:K_};function X_(){var e=Hi.f(),i=hr();return e||i}function q_(e){var i=Jn(e);i!==null&&i.tag===5&&i.type==="form"?kd(i):Hi.r(e)}var zs=typeof document>"u"?null:document;function vp(e,i,s){var o=zs;if(o&&typeof i=="string"&&i){var h=Pe(i);h='link[rel="'+e+'"][href="'+h+'"]',typeof s=="string"&&(h+='[crossorigin="'+s+'"]'),bp.has(h)||(bp.add(h),e={rel:e,crossOrigin:s,href:i},o.querySelector(h)===null&&(i=o.createElement("link"),fe(i,"link",e),se(i),o.head.appendChild(i)))}}function V_(e){Hi.D(e),vp("dns-prefetch",e,null)}function P_(e,i){Hi.C(e,i),vp("preconnect",e,i)}function F_(e,i,s){Hi.L(e,i,s);var o=zs;if(o&&e&&i){var h='link[rel="preload"][as="'+Pe(i)+'"]';i==="image"&&s&&s.imageSrcSet?(h+='[imagesrcset="'+Pe(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(h+='[imagesizes="'+Pe(s.imageSizes)+'"]')):h+='[href="'+Pe(e)+'"]';var d=h;switch(i){case"style":d=Ds(e);break;case"script":d=Bs(e)}$e.has(d)||(e=x({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:e,as:i},s),$e.set(d,e),o.querySelector(h)!==null||i==="style"&&o.querySelector(Ga(d))||i==="script"&&o.querySelector(Ua(d))||(i=o.createElement("link"),fe(i,"link",e),se(i),o.head.appendChild(i)))}}function Q_(e,i){Hi.m(e,i);var s=zs;if(s&&e){var o=i&&typeof i.as=="string"?i.as:"script",h='link[rel="modulepreload"][as="'+Pe(o)+'"][href="'+Pe(e)+'"]',d=h;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Bs(e)}if(!$e.has(d)&&(e=x({rel:"modulepreload",href:e},i),$e.set(d,e),s.querySelector(h)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Ua(d)))return}o=s.createElement("link"),fe(o,"link",e),se(o),s.head.appendChild(o)}}}function W_(e,i,s){Hi.S(e,i,s);var o=zs;if(o&&e){var h=$n(o).hoistableStyles,d=Ds(e);i=i||"default";var y=h.get(d);if(!y){var v={loading:0,preload:null};if(y=o.querySelector(Ga(d)))v.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":i},s),(s=$e.get(d))&&dc(e,s);var C=y=o.createElement("link");se(C),fe(C,"link",e),C._p=new Promise(function(N,X){C.onload=N,C.onerror=X}),C.addEventListener("load",function(){v.loading|=1}),C.addEventListener("error",function(){v.loading|=2}),v.loading|=4,vr(y,i,o)}y={type:"stylesheet",instance:y,count:1,state:v},h.set(d,y)}}}function Z_(e,i){Hi.X(e,i);var s=zs;if(s&&e){var o=$n(s).hoistableScripts,h=Bs(e),d=o.get(h);d||(d=s.querySelector(Ua(h)),d||(e=x({src:e,async:!0},i),(i=$e.get(h))&&mc(e,i),d=s.createElement("script"),se(d),fe(d,"link",e),s.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(h,d))}}function K_(e,i){Hi.M(e,i);var s=zs;if(s&&e){var o=$n(s).hoistableScripts,h=Bs(e),d=o.get(h);d||(d=s.querySelector(Ua(h)),d||(e=x({src:e,async:!0,type:"module"},i),(i=$e.get(h))&&mc(e,i),d=s.createElement("script"),se(d),fe(d,"link",e),s.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(h,d))}}function Sp(e,i,s,o){var h=(h=ct.current)?br(h):null;if(!h)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=Ds(s.href),s=$n(h).hoistableStyles,o=s.get(i),o||(o={type:"style",instance:null,count:0,state:null},s.set(i,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=Ds(s.href);var d=$n(h).hoistableStyles,y=d.get(e);if(y||(h=h.ownerDocument||h,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,y),(d=h.querySelector(Ga(e)))&&!d._p&&(y.instance=d,y.state.loading=5),$e.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},$e.set(e,s),d||I_(h,e,s,y.state))),i&&o===null)throw Error(a(528,""));return y}if(i&&o!==null)throw Error(a(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Bs(s),s=$n(h).hoistableScripts,o=s.get(i),o||(o={type:"script",instance:null,count:0,state:null},s.set(i,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Ds(e){return'href="'+Pe(e)+'"'}function Ga(e){return'link[rel="stylesheet"]['+e+"]"}function Tp(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function I_(e,i,s,o){e.querySelector('link[rel="preload"][as="style"]['+i+"]")?o.loading=1:(i=e.createElement("link"),o.preload=i,i.addEventListener("load",function(){return o.loading|=1}),i.addEventListener("error",function(){return o.loading|=2}),fe(i,"link",s),se(i),e.head.appendChild(i))}function Bs(e){return'[src="'+Pe(e)+'"]'}function Ua(e){return"script[async]"+e}function Ap(e,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var o=e.querySelector('style[data-href~="'+Pe(s.href)+'"]');if(o)return i.instance=o,se(o),o;var h=x({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),se(o),fe(o,"style",h),vr(o,s.precedence,e),i.instance=o;case"stylesheet":h=Ds(s.href);var d=e.querySelector(Ga(h));if(d)return i.state.loading|=4,i.instance=d,se(d),d;o=Tp(s),(h=$e.get(h))&&dc(o,h),d=(e.ownerDocument||e).createElement("link"),se(d);var y=d;return y._p=new Promise(function(v,C){y.onload=v,y.onerror=C}),fe(d,"link",o),i.state.loading|=4,vr(d,s.precedence,e),i.instance=d;case"script":return d=Bs(s.src),(h=e.querySelector(Ua(d)))?(i.instance=h,se(h),h):(o=s,(h=$e.get(d))&&(o=x({},s),mc(o,h)),e=e.ownerDocument||e,h=e.createElement("script"),se(h),fe(h,"link",o),e.head.appendChild(h),i.instance=h);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(o=i.instance,i.state.loading|=4,vr(o,s.precedence,e));return i.instance}function vr(e,i,s){for(var o=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=o.length?o[o.length-1]:null,d=h,y=0;y<o.length;y++){var v=o[y];if(v.dataset.precedence===i)d=v;else if(d!==h)break}d?d.parentNode.insertBefore(e,d.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(e,i.firstChild))}function dc(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.title==null&&(e.title=i.title)}function mc(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.integrity==null&&(e.integrity=i.integrity)}var Sr=null;function wp(e,i,s){if(Sr===null){var o=new Map,h=Sr=new Map;h.set(s,o)}else h=Sr,o=h.get(s),o||(o=new Map,h.set(s,o));if(o.has(e))return o;for(o.set(e,null),s=s.getElementsByTagName(e),h=0;h<s.length;h++){var d=s[h];if(!(d[Is]||d[oe]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var y=d.getAttribute(i)||"";y=e+y;var v=o.get(y);v?v.push(d):o.set(y,[d])}}return o}function Cp(e,i,s){e=e.ownerDocument||e,e.head.insertBefore(s,i==="title"?e.querySelector("head > title"):null)}function J_(e,i,s){if(s===1||i.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return e=i.disabled,typeof i.precedence=="string"&&e==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function Mp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function $_(e,i,s,o){if(s.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var h=Ds(o.href),d=i.querySelector(Ga(h));if(d){i=d._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(e.count++,e=Tr.bind(e),i.then(e,e)),s.state.loading|=4,s.instance=d,se(d);return}d=i.ownerDocument||i,o=Tp(o),(h=$e.get(h))&&dc(o,h),d=d.createElement("link"),se(d);var y=d;y._p=new Promise(function(v,C){y.onload=v,y.onerror=C}),fe(d,"link",o),s.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(e.count++,s=Tr.bind(e),i.addEventListener("load",s),i.addEventListener("error",s))}}var pc=0;function t1(e,i){return e.stylesheets&&e.count===0&&wr(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var o=setTimeout(function(){if(e.stylesheets&&wr(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+i);0<e.imgBytes&&pc===0&&(pc=62500*G_());var h=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&wr(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>pc?50:800)+i);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(h)}}:null}function Tr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)wr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ar=null;function wr(e,i){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ar=new Map,i.forEach(e1,e),Ar=null,Tr.call(e))}function e1(e,i){if(!(i.state.loading&4)){var s=Ar.get(e);if(s)var o=s.get(null);else{s=new Map,Ar.set(e,s);for(var h=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<h.length;d++){var y=h[d];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(s.set(y.dataset.precedence,y),o=y)}o&&s.set(null,o)}h=i.instance,y=h.getAttribute("data-precedence"),d=s.get(y)||o,d===o&&s.set(null,h),s.set(y,h),this.count++,o=Tr.bind(this),h.addEventListener("load",o),h.addEventListener("error",o),d?d.parentNode.insertBefore(h,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(h,e.firstChild)),i.state.loading|=4}}var Na={$$typeof:D,Provider:null,Consumer:null,_currentValue:et,_currentValue2:et,_threadCount:0};function i1(e,i,s,o,h,d,y,v,C){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=uo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=uo(0),this.hiddenUpdates=uo(null),this.identifierPrefix=o,this.onUncaughtError=h,this.onCaughtError=d,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function Ep(e,i,s,o,h,d,y,v,C,N,X,P){return e=new i1(e,i,s,y,C,N,X,P,v),i=1,d===!0&&(i|=24),d=Ue(3,null,null,i),e.current=d,d.stateNode=e,i=Wo(),i.refCount++,e.pooledCache=i,i.refCount++,d.memoizedState={element:o,isDehydrated:s,cache:i},Jo(d),e}function Rp(e){return e?(e=us,e):us}function zp(e,i,s,o,h,d){h=Rp(h),o.context===null?o.context=h:o.pendingContext=h,o=en(i),o.payload={element:s},d=d===void 0?null:d,d!==null&&(o.callback=d),s=nn(e,o,i),s!==null&&(Ee(s,e,i),ma(s,e,i))}function Dp(e,i){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<i?s:i}}function gc(e,i){Dp(e,i),(e=e.alternate)&&Dp(e,i)}function Bp(e){if(e.tag===13||e.tag===31){var i=Cn(e,67108864);i!==null&&Ee(i,e,67108864),gc(e,67108864)}}function Op(e){if(e.tag===13||e.tag===31){var i=je();i=co(i);var s=Cn(e,i);s!==null&&Ee(s,e,i),gc(e,i)}}var Cr=!0;function n1(e,i,s,o){var h=z.T;z.T=null;var d=L.p;try{L.p=2,yc(e,i,s,o)}finally{L.p=d,z.T=h}}function s1(e,i,s,o){var h=z.T;z.T=null;var d=L.p;try{L.p=8,yc(e,i,s,o)}finally{L.p=d,z.T=h}}function yc(e,i,s,o){if(Cr){var h=xc(o);if(h===null)nc(e,i,o,Mr,s),Up(e,o);else if(l1(h,e,i,s,o))o.stopPropagation();else if(Up(e,o),i&4&&-1<a1.indexOf(e)){for(;h!==null;){var d=Jn(h);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var y=vn(d.pendingLanes);if(y!==0){var v=d;for(v.pendingLanes|=2,v.entangledLanes|=2;y;){var C=1<<31-Oe(y);v.entanglements[1]|=C,y&=~C}yi(d),(Et&6)===0&&(ur=De()+500,za(0))}}break;case 31:case 13:v=Cn(d,2),v!==null&&Ee(v,d,2),hr(),gc(d,2)}if(d=xc(o),d===null&&nc(e,i,o,Mr,s),d===h)break;h=d}h!==null&&o.stopPropagation()}else nc(e,i,o,null,s)}}function xc(e){return e=bo(e),_c(e)}var Mr=null;function _c(e){if(Mr=null,e=In(e),e!==null){var i=u(e);if(i===null)e=null;else{var s=i.tag;if(s===13){if(e=c(i),e!==null)return e;e=null}else if(s===31){if(e=f(i),e!==null)return e;e=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;e=null}else i!==e&&(e=null)}}return Mr=e,null}function Gp(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(V0()){case Yh:return 2;case Xh:return 8;case gl:case P0:return 32;case qh:return 268435456;default:return 32}default:return 32}}var bc=!1,mn=null,pn=null,gn=null,ka=new Map,Ha=new Map,yn=[],a1="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 Up(e,i){switch(e){case"focusin":case"focusout":mn=null;break;case"dragenter":case"dragleave":pn=null;break;case"mouseover":case"mouseout":gn=null;break;case"pointerover":case"pointerout":ka.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ha.delete(i.pointerId)}}function La(e,i,s,o,h,d){return e===null||e.nativeEvent!==d?(e={blockedOn:i,domEventName:s,eventSystemFlags:o,nativeEvent:d,targetContainers:[h]},i!==null&&(i=Jn(i),i!==null&&Bp(i)),e):(e.eventSystemFlags|=o,i=e.targetContainers,h!==null&&i.indexOf(h)===-1&&i.push(h),e)}function l1(e,i,s,o,h){switch(i){case"focusin":return mn=La(mn,e,i,s,o,h),!0;case"dragenter":return pn=La(pn,e,i,s,o,h),!0;case"mouseover":return gn=La(gn,e,i,s,o,h),!0;case"pointerover":var d=h.pointerId;return ka.set(d,La(ka.get(d)||null,e,i,s,o,h)),!0;case"gotpointercapture":return d=h.pointerId,Ha.set(d,La(Ha.get(d)||null,e,i,s,o,h)),!0}return!1}function Np(e){var i=In(e.target);if(i!==null){var s=u(i);if(s!==null){if(i=s.tag,i===13){if(i=c(s),i!==null){e.blockedOn=i,Zh(e.priority,function(){Op(s)});return}}else if(i===31){if(i=f(s),i!==null){e.blockedOn=i,Zh(e.priority,function(){Op(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Er(e){if(e.blockedOn!==null)return!1;for(var i=e.targetContainers;0<i.length;){var s=xc(e.nativeEvent);if(s===null){s=e.nativeEvent;var o=new s.constructor(s.type,s);_o=o,s.target.dispatchEvent(o),_o=null}else return i=Jn(s),i!==null&&Bp(i),e.blockedOn=s,!1;i.shift()}return!0}function kp(e,i,s){Er(e)&&s.delete(i)}function r1(){bc=!1,mn!==null&&Er(mn)&&(mn=null),pn!==null&&Er(pn)&&(pn=null),gn!==null&&Er(gn)&&(gn=null),ka.forEach(kp),Ha.forEach(kp)}function Rr(e,i){e.blockedOn===i&&(e.blockedOn=null,bc||(bc=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,r1)))}var zr=null;function Hp(e){zr!==e&&(zr=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){zr===e&&(zr=null);for(var i=0;i<e.length;i+=3){var s=e[i],o=e[i+1],h=e[i+2];if(typeof o!="function"){if(_c(o||s)===null)continue;break}var d=Jn(s);d!==null&&(e.splice(i,3),i-=3,xu(d,{pending:!0,data:h,method:s.method,action:o},o,h))}}))}function Os(e){function i(C){return Rr(C,e)}mn!==null&&Rr(mn,e),pn!==null&&Rr(pn,e),gn!==null&&Rr(gn,e),ka.forEach(i),Ha.forEach(i);for(var s=0;s<yn.length;s++){var o=yn[s];o.blockedOn===e&&(o.blockedOn=null)}for(;0<yn.length&&(s=yn[0],s.blockedOn===null);)Np(s),s.blockedOn===null&&yn.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(o=0;o<s.length;o+=3){var h=s[o],d=s[o+1],y=h[Se]||null;if(typeof d=="function")y||Hp(s);else if(y){var v=null;if(d&&d.hasAttribute("formAction")){if(h=d,y=d[Se]||null)v=y.formAction;else if(_c(h)!==null)continue}else v=y.action;typeof v=="function"?s[o+1]=v:(s.splice(o,3),o-=3),Hp(s)}}}function Lp(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(y){return h=y})},focusReset:"manual",scroll:"manual"})}function i(){h!==null&&(h(),h=null),o||setTimeout(s,20)}function s(){if(!o&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,h=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),h!==null&&(h(),h=null)}}}function vc(e){this._internalRoot=e}Dr.prototype.render=vc.prototype.render=function(e){var i=this._internalRoot;if(i===null)throw Error(a(409));var s=i.current,o=je();zp(s,o,e,i,null,null)},Dr.prototype.unmount=vc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var i=e.containerInfo;zp(e.current,2,null,e,null,null),hr(),i[Kn]=null}};function Dr(e){this._internalRoot=e}Dr.prototype.unstable_scheduleHydration=function(e){if(e){var i=Wh();e={blockedOn:null,target:e,priority:i};for(var s=0;s<yn.length&&i!==0&&i<yn[s].priority;s++);yn.splice(s,0,e),s===0&&Np(e)}};var jp=t.version;if(jp!=="19.2.4")throw Error(a(527,jp,"19.2.4"));L.findDOMNode=function(e){var i=e._reactInternals;if(i===void 0)throw typeof e.render=="function"?Error(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=p(i),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var o1={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Br=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Br.isDisabled&&Br.supportsFiber)try{Ws=Br.inject(o1),Be=Br}catch{}}return Ya.createRoot=function(e,i){if(!r(e))throw Error(a(299));var s=!1,o="",h=Qd,d=Wd,y=Zd;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(o=i.identifierPrefix),i.onUncaughtError!==void 0&&(h=i.onUncaughtError),i.onCaughtError!==void 0&&(d=i.onCaughtError),i.onRecoverableError!==void 0&&(y=i.onRecoverableError)),i=Ep(e,1,!1,null,null,s,o,null,h,d,y,Lp),e[Kn]=i.current,ic(e),new vc(i)},Ya.hydrateRoot=function(e,i,s){if(!r(e))throw Error(a(299));var o=!1,h="",d=Qd,y=Wd,v=Zd,C=null;return s!=null&&(s.unstable_strictMode===!0&&(o=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onUncaughtError!==void 0&&(d=s.onUncaughtError),s.onCaughtError!==void 0&&(y=s.onCaughtError),s.onRecoverableError!==void 0&&(v=s.onRecoverableError),s.formState!==void 0&&(C=s.formState)),i=Ep(e,1,!0,i,s??null,o,h,C,d,y,v,Lp),i.context=Rp(null),s=i.current,o=je(),o=co(o),h=en(o),h.callback=null,nn(s,h,o),s=o,i.current.lanes=s,Ks(i,s),yi(i),e[Kn]=i.current,ic(e),new Dr(i)},Ya.version="19.2.4",Ya}var Kp;function b1(){if(Kp)return Ac.exports;Kp=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(t){console.error(t)}}return l(),Ac.exports=_1(),Ac.exports}var v1=b1();const Ip=l=>{let t;const n=new Set,a=(p,g)=>{const x=typeof p=="function"?p(t):p;if(!Object.is(x,t)){const b=t;t=g??(typeof x!="object"||x===null)?x:Object.assign({},t,x),n.forEach(_=>_(t,b))}},r=()=>t,f={setState:a,getState:r,getInitialState:()=>m,subscribe:p=>(n.add(p),()=>n.delete(p))},m=t=l(a,r,f);return f},S1=(l=>l?Ip(l):Ip),T1=l=>l;function A1(l,t=T1){const n=Or.useSyncExternalStore(l.subscribe,Or.useCallback(()=>t(l.getState()),[l,t]),Or.useCallback(()=>t(l.getInitialState()),[l,t]));return Or.useDebugValue(n),n}const Jp=l=>{const t=S1(l),n=a=>A1(t,a);return Object.assign(n,t),n},w1=(l=>l?Jp(l):Jp),Rt=w1(l=>({connected:!1,agents:[],tasks:[],messages:[],prs:[],sprint:null,selectedPR:null,wowEvents:[],setConnected:t=>l({connected:t}),setAgents:t=>l({agents:t}),setTasks:t=>l({tasks:t}),setSprint:t=>l({sprint:t}),setPRs:t=>l({prs:t}),setSelectedPR:t=>l({selectedPR:t}),addMessage:t=>l(n=>({messages:[...n.messages.slice(-199),t]})),updateAgent:(t,n)=>l(a=>({agents:a.agents.map(r=>r.id===t?{...r,...n}:r)})),updateTask:(t,n)=>l(a=>({tasks:a.tasks.map(r=>r.id===t?{...r,...n}:r)})),addPR:t=>l(n=>({prs:[...n.prs,t]})),updatePR:(t,n)=>l(a=>({prs:a.prs.map(r=>r.id===t?{...r,...n}:r)})),pushWow:t=>l(n=>({wowEvents:[...n.wowEvents,t]})),popWow:()=>{const n=Rt.getState().wowEvents;if(n.length===0)return;const a=n[0];return Rt.setState({wowEvents:n.slice(1)}),a}}));function C1(){const l=ii.useRef(null),{setConnected:t,setAgents:n,setTasks:a,setPRs:r,addMessage:u,updateAgent:c,updateTask:f,addPR:m,updatePR:p}=Rt.getState();ii.useEffect(()=>{function g(){const b=window.location.protocol==="https:"?"wss:":"ws:",_=new WebSocket(`${b}//${window.location.host}`);l.current=_,_.onopen=()=>{Rt.setState({connected:!0})},_.onclose=()=>{Rt.setState({connected:!1}),setTimeout(g,2e3)},_.onerror=()=>{_.close()},_.onmessage=S=>{try{const A=JSON.parse(S.data);x(A)}catch{}}}function x(b){switch(b.type){case"snapshot":b.agents&&n(b.agents),b.tasks&&a(b.tasks),b.prs&&r(b.prs);break;case"agent:status":c(b.agentId,{status:b.status});break;case"agent:move":c(b.agentId,{position_room:b.room,position_seat:b.seat});break;case"task:status":f(b.taskId,{status:b.status});break;case"task:assigned":f(b.taskId,{assigned_to:b.agentId,status:"in_progress"}),c(b.agentId,{current_task_id:b.taskId,status:"coding"});break;case"task:completed":f(b.taskId,{status:"done"});break;case"message":u(b.message);break;case"pr:created":m(b.pr);break;case"pr:updated":p(b.prId,b.updates);break;case"sprint:created":Rt.setState({sprint:b.sprint});break;case"sprint:completed":Rt.setState(_=>({sprint:_.sprint?{..._.sprint,status:"completed"}:null})),Rt.getState().pushWow({type:"sprint:complete"});break;case"meeting:start":Rt.getState().pushWow({type:"meeting:start",agents:b.agents||[]});break;case"meeting:end":Rt.getState().pushWow({type:"meeting:end"});break;case"crisis:start":Rt.getState().pushWow({type:"crisis:start",reason:b.reason||""});break;case"crisis:resolved":Rt.getState().pushWow({type:"crisis:resolved"});break;case"pr:merged":Rt.getState().pushWow({type:"pr:merged",agentId:b.agentId,title:b.title});break;case"deploy:success":Rt.getState().pushWow({type:"deploy:success"});break;case"pair:start":Rt.getState().pushWow({type:"pair:start",agents:b.agents||[]});break;case"pair:end":Rt.getState().pushWow({type:"pair:end"});break}}return g(),()=>{var b;(b=l.current)==null||b.close()}},[])}const M1="modulepreload",E1=function(l){return"/"+l},$p={},$a=function(t,n,a){let r=Promise.resolve();if(n&&n.length>0){let c=function(p){return Promise.all(p.map(g=>Promise.resolve(g).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),m=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));r=c(n.map(p=>{if(p=E1(p),p in $p)return;$p[p]=!0;const g=p.endsWith(".css"),x=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${x}`))return;const b=document.createElement("link");if(b.rel=g?"stylesheet":M1,g||(b.as="script"),b.crossOrigin="",b.href=p,m&&b.setAttribute("nonce",m),document.head.appendChild(b),g)return new Promise((_,S)=>{b.addEventListener("load",_),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${p}`)))})}))}function u(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return r.then(c=>{for(const f of c||[])f.status==="rejected"&&u(f.reason);return t().catch(u)})};var gt=(l=>(l.Application="application",l.WebGLPipes="webgl-pipes",l.WebGLPipesAdaptor="webgl-pipes-adaptor",l.WebGLSystem="webgl-system",l.WebGPUPipes="webgpu-pipes",l.WebGPUPipesAdaptor="webgpu-pipes-adaptor",l.WebGPUSystem="webgpu-system",l.CanvasSystem="canvas-system",l.CanvasPipesAdaptor="canvas-pipes-adaptor",l.CanvasPipes="canvas-pipes",l.Asset="asset",l.LoadParser="load-parser",l.ResolveParser="resolve-parser",l.CacheParser="cache-parser",l.DetectionParser="detection-parser",l.MaskEffect="mask-effect",l.BlendMode="blend-mode",l.TextureSource="texture-source",l.Environment="environment",l.ShapeBuilder="shape-builder",l.Batcher="batcher",l))(gt||{});const eh=l=>{if(typeof l=="function"||typeof l=="object"&&l.extension){if(!l.extension)throw new Error("Extension class must have an extension object");l={...typeof l.extension!="object"?{type:l.extension}:l.extension,ref:l}}if(typeof l=="object")l={...l};else throw new Error("Invalid extension type");return typeof l.type=="string"&&(l.type=[l.type]),l},Gr=(l,t)=>eh(l).priority??t,It={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...l){return l.map(eh).forEach(t=>{t.type.forEach(n=>{var a,r;return(r=(a=this._removeHandlers)[n])==null?void 0:r.call(a,t)})}),this},add(...l){return l.map(eh).forEach(t=>{t.type.forEach(n=>{var u,c;const a=this._addHandlers,r=this._queue;a[n]?(c=a[n])==null||c.call(a,t):(r[n]=r[n]||[],(u=r[n])==null||u.push(t))})}),this},handle(l,t,n){var c;const a=this._addHandlers,r=this._removeHandlers;if(a[l]||r[l])throw new Error(`Extension type ${l} already has a handler`);a[l]=t,r[l]=n;const u=this._queue;return u[l]&&((c=u[l])==null||c.forEach(f=>t(f)),delete u[l]),this},handleByMap(l,t){return this.handle(l,n=>{n.name&&(t[n.name]=n.ref)},n=>{n.name&&delete t[n.name]})},handleByNamedList(l,t,n=-1){return this.handle(l,a=>{t.findIndex(u=>u.name===a.name)>=0||(t.push({name:a.name,value:a.ref}),t.sort((u,c)=>Gr(c.value,n)-Gr(u.value,n)))},a=>{const r=t.findIndex(u=>u.name===a.name);r!==-1&&t.splice(r,1)})},handleByList(l,t,n=-1){return this.handle(l,a=>{t.includes(a.ref)||(t.push(a.ref),t.sort((r,u)=>Gr(u,n)-Gr(r,n)))},a=>{const r=t.indexOf(a.ref);r!==-1&&t.splice(r,1)})},mixin(l,...t){for(const n of t)Object.defineProperties(l.prototype,Object.getOwnPropertyDescriptors(n))}},R1={extension:{type:gt.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await $a(()=>import("./browserAll-zc5HDK2a.js"),__vite__mapDeps([0,1,2]))}},z1={extension:{type:gt.Environment,name:"webworker",priority:0},test:()=>typeof self<"u"&&self.WorkerGlobalScope!==void 0,load:async()=>{await $a(()=>import("./webworkerAll-Co7a_7ex.js"),__vite__mapDeps([1,2]))}};class me{constructor(t,n,a){this._x=n||0,this._y=a||0,this._observer=t}clone(t){return new me(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 Ec={exports:{}},tg;function D1(){return tg||(tg=1,(function(l){var t=Object.prototype.hasOwnProperty,n="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(n=!1));function r(m,p,g){this.fn=m,this.context=p,this.once=g||!1}function u(m,p,g,x,b){if(typeof g!="function")throw new TypeError("The listener must be a function");var _=new r(g,x||m,b),S=n?n+p:p;return m._events[S]?m._events[S].fn?m._events[S]=[m._events[S],_]:m._events[S].push(_):(m._events[S]=_,m._eventsCount++),m}function c(m,p){--m._eventsCount===0?m._events=new a:delete m._events[p]}function f(){this._events=new a,this._eventsCount=0}f.prototype.eventNames=function(){var p=[],g,x;if(this._eventsCount===0)return p;for(x in g=this._events)t.call(g,x)&&p.push(n?x.slice(1):x);return Object.getOwnPropertySymbols?p.concat(Object.getOwnPropertySymbols(g)):p},f.prototype.listeners=function(p){var g=n?n+p:p,x=this._events[g];if(!x)return[];if(x.fn)return[x.fn];for(var b=0,_=x.length,S=new Array(_);b<_;b++)S[b]=x[b].fn;return S},f.prototype.listenerCount=function(p){var g=n?n+p:p,x=this._events[g];return x?x.fn?1:x.length:0},f.prototype.emit=function(p,g,x,b,_,S){var A=n?n+p:p;if(!this._events[A])return!1;var T=this._events[A],w=arguments.length,E,D;if(T.fn){switch(T.once&&this.removeListener(p,T.fn,void 0,!0),w){case 1:return T.fn.call(T.context),!0;case 2:return T.fn.call(T.context,g),!0;case 3:return T.fn.call(T.context,g,x),!0;case 4:return T.fn.call(T.context,g,x,b),!0;case 5:return T.fn.call(T.context,g,x,b,_),!0;case 6:return T.fn.call(T.context,g,x,b,_,S),!0}for(D=1,E=new Array(w-1);D<w;D++)E[D-1]=arguments[D];T.fn.apply(T.context,E)}else{var O=T.length,q;for(D=0;D<O;D++)switch(T[D].once&&this.removeListener(p,T[D].fn,void 0,!0),w){case 1:T[D].fn.call(T[D].context);break;case 2:T[D].fn.call(T[D].context,g);break;case 3:T[D].fn.call(T[D].context,g,x);break;case 4:T[D].fn.call(T[D].context,g,x,b);break;default:if(!E)for(q=1,E=new Array(w-1);q<w;q++)E[q-1]=arguments[q];T[D].fn.apply(T[D].context,E)}}return!0},f.prototype.on=function(p,g,x){return u(this,p,g,x,!1)},f.prototype.once=function(p,g,x){return u(this,p,g,x,!0)},f.prototype.removeListener=function(p,g,x,b){var _=n?n+p:p;if(!this._events[_])return this;if(!g)return c(this,_),this;var S=this._events[_];if(S.fn)S.fn===g&&(!b||S.once)&&(!x||S.context===x)&&c(this,_);else{for(var A=0,T=[],w=S.length;A<w;A++)(S[A].fn!==g||b&&!S[A].once||x&&S[A].context!==x)&&T.push(S[A]);T.length?this._events[_]=T.length===1?T[0]:T:c(this,_)}return this},f.prototype.removeAllListeners=function(p){var g;return p?(g=n?n+p:p,this._events[g]&&c(this,g)):(this._events=new a,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prefixed=n,f.EventEmitter=f,l.exports=f})(Ec)),Ec.exports}var B1=D1();const bi=Th(B1),O1=Math.PI*2,G1=180/Math.PI,U1=Math.PI/180;class ge{constructor(t=0,n=0){this.x=0,this.y=0,this.x=t,this.y=n}clone(){return new ge(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 Rc.x=0,Rc.y=0,Rc}}const Rc=new ge;class vt{constructor(t=1,n=0,a=0,r=1,u=0,c=0){this.array=null,this.a=t,this.b=n,this.c=a,this.d=r,this.tx=u,this.ty=c}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,a,r,u,c){return this.a=t,this.b=n,this.c=a,this.d=r,this.tx=u,this.ty=c,this}toArray(t,n){this.array||(this.array=new Float32Array(9));const a=n||this.array;return t?(a[0]=this.a,a[1]=this.b,a[2]=0,a[3]=this.c,a[4]=this.d,a[5]=0,a[6]=this.tx,a[7]=this.ty,a[8]=1):(a[0]=this.a,a[1]=this.c,a[2]=this.tx,a[3]=this.b,a[4]=this.d,a[5]=this.ty,a[6]=0,a[7]=0,a[8]=1),a}apply(t,n){n=n||new ge;const a=t.x,r=t.y;return n.x=this.a*a+this.c*r+this.tx,n.y=this.b*a+this.d*r+this.ty,n}applyInverse(t,n){n=n||new ge;const a=this.a,r=this.b,u=this.c,c=this.d,f=this.tx,m=this.ty,p=1/(a*c+u*-r),g=t.x,x=t.y;return n.x=c*p*g+-u*p*x+(m*u-f*c)*p,n.y=a*p*x+-r*p*g+(-m*a+f*r)*p,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),a=Math.sin(t),r=this.a,u=this.c,c=this.tx;return this.a=r*n-this.b*a,this.b=r*a+this.b*n,this.c=u*n-this.d*a,this.d=u*a+this.d*n,this.tx=c*n-this.ty*a,this.ty=c*a+this.ty*n,this}append(t){const n=this.a,a=this.b,r=this.c,u=this.d;return this.a=t.a*n+t.b*r,this.b=t.a*a+t.b*u,this.c=t.c*n+t.d*r,this.d=t.c*a+t.d*u,this.tx=t.tx*n+t.ty*r+this.tx,this.ty=t.tx*a+t.ty*u+this.ty,this}appendFrom(t,n){const a=t.a,r=t.b,u=t.c,c=t.d,f=t.tx,m=t.ty,p=n.a,g=n.b,x=n.c,b=n.d;return this.a=a*p+r*x,this.b=a*g+r*b,this.c=u*p+c*x,this.d=u*g+c*b,this.tx=f*p+m*x+n.tx,this.ty=f*g+m*b+n.ty,this}setTransform(t,n,a,r,u,c,f,m,p){return this.a=Math.cos(f+p)*u,this.b=Math.sin(f+p)*u,this.c=-Math.sin(f-m)*c,this.d=Math.cos(f-m)*c,this.tx=t-(a*this.a+r*this.c),this.ty=n-(a*this.b+r*this.d),this}prepend(t){const n=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const a=this.a,r=this.c;this.a=a*t.a+this.b*t.c,this.b=a*t.b+this.b*t.d,this.c=r*t.a+this.d*t.c,this.d=r*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,a=this.b,r=this.c,u=this.d,c=t.pivot,f=-Math.atan2(-r,u),m=Math.atan2(a,n),p=Math.abs(f+m);return p<1e-5||Math.abs(O1-p)<1e-5?(t.rotation=m,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=f,t.skew.y=m),t.scale.x=Math.sqrt(n*n+a*a),t.scale.y=Math.sqrt(r*r+u*u),t.position.x=this.tx+(c.x*n+c.y*r),t.position.y=this.ty+(c.x*a+c.y*u),t}invert(){const t=this.a,n=this.b,a=this.c,r=this.d,u=this.tx,c=t*r-n*a;return this.a=r/c,this.b=-n/c,this.c=-a/c,this.d=t/c,this.tx=(a*this.ty-r*u)/c,this.ty=-(t*this.ty-n*u)/c,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 vt;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 k1.identity()}static get shared(){return N1.identity()}}const N1=new vt,k1=new vt,Yn=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Xn=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],qn=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Vn=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],ih=[],fy=[],Ur=Math.sign;function H1(){for(let l=0;l<16;l++){const t=[];ih.push(t);for(let n=0;n<16;n++){const a=Ur(Yn[l]*Yn[n]+qn[l]*Xn[n]),r=Ur(Xn[l]*Yn[n]+Vn[l]*Xn[n]),u=Ur(Yn[l]*qn[n]+qn[l]*Vn[n]),c=Ur(Xn[l]*qn[n]+Vn[l]*Vn[n]);for(let f=0;f<16;f++)if(Yn[f]===a&&Xn[f]===r&&qn[f]===u&&Vn[f]===c){t.push(f);break}}}for(let l=0;l<16;l++){const t=new vt;t.set(Yn[l],Xn[l],qn[l],Vn[l],0,0),fy.push(t)}}H1();const kt={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:l=>Yn[l],uY:l=>Xn[l],vX:l=>qn[l],vY:l=>Vn[l],inv:l=>l&8?l&15:-l&7,add:(l,t)=>ih[l][t],sub:(l,t)=>ih[l][kt.inv(t)],rotate180:l=>l^4,isVertical:l=>(l&3)===2,byDirection:(l,t)=>Math.abs(l)*2<=Math.abs(t)?t>=0?kt.S:kt.N:Math.abs(t)*2<=Math.abs(l)?l>0?kt.E:kt.W:t>0?l>0?kt.SE:kt.SW:l>0?kt.NE:kt.NW,matrixAppendRotationInv:(l,t,n=0,a=0,r=0,u=0)=>{const c=fy[kt.inv(t)],f=c.a,m=c.b,p=c.c,g=c.d,x=n-Math.min(0,f*r,p*u,f*r+p*u),b=a-Math.min(0,m*r,g*u,m*r+g*u),_=l.a,S=l.b,A=l.c,T=l.d;l.a=f*_+m*A,l.b=f*S+m*T,l.c=p*_+g*A,l.d=p*S+g*T,l.tx=x*_+b*A+l.tx,l.ty=x*S+b*T+l.ty},transformRectCoords:(l,t,n,a)=>{const{x:r,y:u,width:c,height:f}=l,{x:m,y:p,width:g,height:x}=t;return n===kt.E?(a.set(r+m,u+p,c,f),a):n===kt.S?a.set(g-u-f+m,r+p,f,c):n===kt.W?a.set(g-r-c+m,x-u-f+p,c,f):n===kt.N?a.set(u+m,x-r-c+p,f,c):a.set(r+m,u+p,c,f)}},Nr=[new ge,new ge,new ge,new ge];class Kt{constructor(t=0,n=0,a=0,r=0){this.type="rectangle",this.x=Number(t),this.y=Number(n),this.width=Number(a),this.height=Number(r)}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 Kt(0,0,0,0)}clone(){return new Kt(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,a,r=.5){const{width:u,height:c}=this;if(u<=0||c<=0)return!1;const f=this.x,m=this.y,p=a*(1-r),g=a-p,x=f-p,b=f+u+p,_=m-p,S=m+c+p,A=f+g,T=f+u-g,w=m+g,E=m+c-g;return t>=x&&t<=b&&n>=_&&n<=S&&!(t>A&&t<T&&n>w&&n<E)}intersects(t,n){if(!n){const $=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=$)return!1;const W=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>W}const a=this.left,r=this.right,u=this.top,c=this.bottom;if(r<=a||c<=u)return!1;const f=Nr[0].set(t.left,t.top),m=Nr[1].set(t.left,t.bottom),p=Nr[2].set(t.right,t.top),g=Nr[3].set(t.right,t.bottom);if(p.x<=f.x||m.y<=f.y)return!1;const x=Math.sign(n.a*n.d-n.b*n.c);if(x===0||(n.apply(f,f),n.apply(m,m),n.apply(p,p),n.apply(g,g),Math.max(f.x,m.x,p.x,g.x)<=a||Math.min(f.x,m.x,p.x,g.x)>=r||Math.max(f.y,m.y,p.y,g.y)<=u||Math.min(f.y,m.y,p.y,g.y)>=c))return!1;const b=x*(m.y-f.y),_=x*(f.x-m.x),S=b*a+_*u,A=b*r+_*u,T=b*a+_*c,w=b*r+_*c;if(Math.max(S,A,T,w)<=b*f.x+_*f.y||Math.min(S,A,T,w)>=b*g.x+_*g.y)return!1;const E=x*(f.y-p.y),D=x*(p.x-f.x),O=E*a+D*u,q=E*r+D*u,k=E*a+D*c,G=E*r+D*c;return!(Math.max(O,q,k,G)<=E*f.x+D*f.y||Math.min(O,q,k,G)>=E*g.x+D*g.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),a=Math.min(this.x+this.width,t.x+t.width),r=Math.max(this.y,t.y),u=Math.min(this.y+this.height,t.y+t.height);return this.x=n,this.width=Math.max(a-n,0),this.y=r,this.height=Math.max(u-r,0),this}ceil(t=1,n=.001){const a=Math.ceil((this.x+this.width-n)*t)/t,r=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=a-this.x,this.height=r-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),a=Math.max(this.x+this.width,t.x+t.width),r=Math.min(this.y,t.y),u=Math.max(this.y+this.height,t.y+t.height);return this.x=n,this.width=a-n,this.y=r,this.height=u-r,this}getBounds(t){return t||(t=new Kt),t.copyFrom(this),t}containsRect(t){if(this.width<=0||this.height<=0)return!1;const n=t.x,a=t.y,r=t.x+t.width,u=t.y+t.height;return n>=this.x&&n<this.x+this.width&&a>=this.y&&a<this.y+this.height&&r>=this.x&&r<this.x+this.width&&u>=this.y&&u<this.y+this.height}set(t,n,a,r){return this.x=t,this.y=n,this.width=a,this.height=r,this}toString(){return`[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}const zc={default:-1};function Qt(l="default"){return zc[l]===void 0&&(zc[l]=-1),++zc[l]}const eg=new Set,Ft="8.0.0",L1="8.3.4",js={quiet:!1,noColor:!1},At=((l,t,n=3)=>{if(js.quiet||eg.has(t))return;let a=new Error().stack;const r=`${t}
51
+ Deprecated since v${l}`,u=typeof console.groupCollapsed=="function"&&!js.noColor;typeof a>"u"?console.warn("PixiJS Deprecation Warning: ",r):(a=a.split(`
52
+ `).splice(n).join(`
53
+ `),u?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",r),console.warn(a),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",r),console.warn(a))),eg.add(t)});Object.defineProperties(At,{quiet:{get:()=>js.quiet,set:l=>{js.quiet=l},enumerable:!0,configurable:!1},noColor:{get:()=>js.noColor,set:l=>{js.noColor=l},enumerable:!0,configurable:!1}});const dy=()=>{};function qs(l){return l+=l===0?1:0,--l,l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,l|=l>>>16,l+1}function ig(l){return!(l&l-1)&&!!l}function my(l){const t={};for(const n in l)l[n]!==void 0&&(t[n]=l[n]);return t}const ng=Object.create(null);function j1(l){const t=ng[l];return t===void 0&&(ng[l]=Qt("resource")),t}const py=class gy extends bi{constructor(t={}){super(),this._resourceType="textureSampler",this._touched=0,this._maxAnisotropy=1,this.destroyed=!1,t={...gy.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){At(Ft,"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=j1(t),this._resourceId}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this.removeAllListeners()}};py.defaultOptions={addressMode:"clamp-to-edge",scaleMode:"linear"};let Vs=py;const yy=class xy extends bi{constructor(t={}){super(),this.options=t,this._gpuData=Object.create(null),this._gcLastUsed=-1,this.uid=Qt("textureSource"),this._resourceType="textureSource",this._resourceId=Qt("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={...xy.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 Vs(my(t)),this.destroyed=!1,this._refreshPOT()}get source(){return this}get style(){return this._style}set style(t){var n,a;this.style!==t&&((n=this._style)==null||n.off("change",this._onStyleChange,this),this._style=t,(a=this._style)==null||a.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=Qt("resource"),this.emit("change",this),this.emit("unload",this);for(const a in this._gpuData)(n=(t=this._gpuData[a])==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,a){a||(a=this._resolution),t||(t=this.width),n||(n=this.height);const r=Math.round(t*a),u=Math.round(n*a);return this.width=r/a,this.height=u/a,this._resolution=a,this.pixelWidth===r&&this.pixelHeight===u?!1:(this._refreshPOT(),this.pixelWidth=r,this.pixelHeight=u,this.emit("resize",this),this._resourceId=Qt("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=ig(this.pixelWidth)&&ig(this.pixelHeight)}static test(t){throw new Error("Unimplemented")}};yy.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 ai=yy;class wh extends ai{constructor(t){const n=t.resource||new Float32Array(t.width*t.height*4);let a=t.format;a||(n instanceof Float32Array?a="rgba32float":n instanceof Int32Array||n instanceof Uint32Array?a="rgba32uint":n instanceof Int16Array||n instanceof Uint16Array?a="rgba16uint":(n instanceof Int8Array,a="bgra8unorm")),super({...t,resource:n,format:a}),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}}wh.extension=gt.TextureSource;const sg=new vt;class Y1{constructor(t,n){this.mapCoord=new vt,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 a=this.mapCoord;for(let r=0;r<t.length;r+=2){const u=t[r],c=t[r+1];n[r]=u*a.a+c*a.c+a.tx,n[r+1]=u*a.b+c*a.d+a.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 a=t.orig,r=t.trim;r&&(sg.set(a.width/r.width,0,0,a.height/r.height,-r.x/r.width,-r.y/r.height),this.mapCoord.append(sg));const u=t.source,c=this.uClampFrame,f=this.clampMargin/u._resolution,m=this.clampOffset/u._resolution;return c[0]=(t.frame.x+f+m)/u.width,c[1]=(t.frame.y+f+m)/u.height,c[2]=(t.frame.x+t.frame.width-f+m)/u.width,c[3]=(t.frame.y+t.frame.height-f+m)/u.height,this.uClampOffset[0]=this.clampOffset/u.pixelWidth,this.uClampOffset[1]=this.clampOffset/u.pixelHeight,this.isSimple=t.frame.width===u.width&&t.frame.height===u.height&&t.rotate===0,!0}}class Ut extends bi{constructor({source:t,label:n,frame:a,orig:r,trim:u,defaultAnchor:c,defaultBorders:f,rotate:m,dynamic:p}={}){if(super(),this.uid=Qt("texture"),this.uvs={x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},this.frame=new Kt,this.noFrame=!1,this.dynamic=!1,this.isTexture=!0,this.label=n,this.source=(t==null?void 0:t.source)??new ai,this.noFrame=!a,a)this.frame.copyFrom(a);else{const{width:g,height:x}=this._source;this.frame.width=g,this.frame.height=x}this.orig=r||this.frame,this.trim=u,this.rotate=m??0,this.defaultAnchor=c,this.defaultBorders=f,this.destroyed=!1,this.dynamic=p||!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 Y1(this)),this._textureMatrix}get width(){return this.orig.width}get height(){return this.orig.height}updateUvs(){const{uvs:t,frame:n}=this,{width:a,height:r}=this._source,u=n.x/a,c=n.y/r,f=n.width/a,m=n.height/r;let p=this.rotate;if(p){const g=f/2,x=m/2,b=u+g,_=c+x;p=kt.add(p,kt.NW),t.x0=b+g*kt.uX(p),t.y0=_+x*kt.uY(p),p=kt.add(p,2),t.x1=b+g*kt.uX(p),t.y1=_+x*kt.uY(p),p=kt.add(p,2),t.x2=b+g*kt.uX(p),t.y2=_+x*kt.uY(p),p=kt.add(p,2),t.x3=b+g*kt.uX(p),t.y3=_+x*kt.uY(p)}else t.x0=u,t.y0=c,t.x1=u+f,t.y1=c,t.x2=u+f,t.y2=c+m,t.x3=u,t.y3=c+m}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 At(Ft,"Texture.baseTexture is now Texture.source"),this._source}}Ut.EMPTY=new Ut({label:"EMPTY",source:new ai({label:"EMPTY"})});Ut.EMPTY.destroy=dy;Ut.WHITE=new Ut({source:new wh({resource:new Uint8Array([255,255,255,255]),width:1,height:1,alphaMode:"premultiply-alpha-on-upload",label:"WHITE"}),label:"WHITE"});Ut.WHITE.destroy=dy;function _y(l,t,n){const{width:a,height:r}=n.orig,u=n.trim;if(u){const c=u.width,f=u.height;l.minX=u.x-t._x*a,l.maxX=l.minX+c,l.minY=u.y-t._y*r,l.maxY=l.minY+f}else l.minX=-t._x*a,l.maxX=l.minX+a,l.minY=-t._y*r,l.maxY=l.minY+r}const ag=new vt;class ni{constructor(t=1/0,n=1/0,a=-1/0,r=-1/0){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=ag,this.minX=t,this.minY=n,this.maxX=a,this.maxY=r}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}get rectangle(){this._rectangle||(this._rectangle=new Kt);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=ag,this}set(t,n,a,r){this.minX=t,this.minY=n,this.maxX=a,this.maxY=r}addFrame(t,n,a,r,u){u||(u=this.matrix);const c=u.a,f=u.b,m=u.c,p=u.d,g=u.tx,x=u.ty;let b=this.minX,_=this.minY,S=this.maxX,A=this.maxY,T=c*t+m*n+g,w=f*t+p*n+x;T<b&&(b=T),w<_&&(_=w),T>S&&(S=T),w>A&&(A=w),T=c*a+m*n+g,w=f*a+p*n+x,T<b&&(b=T),w<_&&(_=w),T>S&&(S=T),w>A&&(A=w),T=c*t+m*r+g,w=f*t+p*r+x,T<b&&(b=T),w<_&&(_=w),T>S&&(S=T),w>A&&(A=w),T=c*a+m*r+g,w=f*a+p*r+x,T<b&&(b=T),w<_&&(_=w),T>S&&(S=T),w>A&&(A=w),this.minX=b,this.minY=_,this.maxX=S,this.maxY=A}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,a=this.minY,r=this.maxX,u=this.maxY,{a:c,b:f,c:m,d:p,tx:g,ty:x}=t;let b=c*n+m*a+g,_=f*n+p*a+x;this.minX=b,this.minY=_,this.maxX=b,this.maxY=_,b=c*r+m*a+g,_=f*r+p*a+x,this.minX=b<this.minX?b:this.minX,this.minY=_<this.minY?_:this.minY,this.maxX=b>this.maxX?b:this.maxX,this.maxY=_>this.maxY?_:this.maxY,b=c*n+m*u+g,_=f*n+p*u+x,this.minX=b<this.minX?b:this.minX,this.minY=_<this.minY?_:this.minY,this.maxX=b>this.maxX?b:this.maxX,this.maxY=_>this.maxY?_:this.maxY,b=c*r+m*u+g,_=f*r+p*u+x,this.minX=b<this.minX?b:this.minX,this.minY=_<this.minY?_:this.minY,this.maxX=b>this.maxX?b:this.maxX,this.maxY=_>this.maxY?_: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,a,r){return this.minX<t&&(this.minX=t),this.maxX>n&&(this.maxX=n),this.minY<a&&(this.minY=a),this.maxY>r&&(this.maxY=r),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 ni(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,a,r){let u=this.minX,c=this.minY,f=this.maxX,m=this.maxY;r||(r=this.matrix);const p=r.a,g=r.b,x=r.c,b=r.d,_=r.tx,S=r.ty;for(let A=n;A<a;A+=2){const T=t[A],w=t[A+1],E=p*T+x*w+_,D=g*T+b*w+S;u=E<u?E:u,c=D<c?D:c,f=E>f?E:f,m=D>m?D:m}this.minX=u,this.minY=c,this.maxX=f,this.maxY=m}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 X1={grad:.9,turn:360,rad:360/(2*Math.PI)},Li=function(l){return typeof l=="string"?l.length>0:typeof l=="number"},re=function(l,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*l)/n+0},ti=function(l,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),l>n?n:l>t?l:t},by=function(l){return(l=isFinite(l)?l%360:0)>0?l:l+360},lg=function(l){return{r:ti(l.r,0,255),g:ti(l.g,0,255),b:ti(l.b,0,255),a:ti(l.a)}},Dc=function(l){return{r:re(l.r),g:re(l.g),b:re(l.b),a:re(l.a,3)}},q1=/^#([0-9a-f]{3,8})$/i,kr=function(l){var t=l.toString(16);return t.length<2?"0"+t:t},vy=function(l){var t=l.r,n=l.g,a=l.b,r=l.a,u=Math.max(t,n,a),c=u-Math.min(t,n,a),f=c?u===t?(n-a)/c:u===n?2+(a-t)/c:4+(t-n)/c:0;return{h:60*(f<0?f+6:f),s:u?c/u*100:0,v:u/255*100,a:r}},Sy=function(l){var t=l.h,n=l.s,a=l.v,r=l.a;t=t/360*6,n/=100,a/=100;var u=Math.floor(t),c=a*(1-n),f=a*(1-(t-u)*n),m=a*(1-(1-t+u)*n),p=u%6;return{r:255*[a,f,c,c,m,a][p],g:255*[m,a,a,f,c,c][p],b:255*[c,c,m,a,a,f][p],a:r}},rg=function(l){return{h:by(l.h),s:ti(l.s,0,100),l:ti(l.l,0,100),a:ti(l.a)}},og=function(l){return{h:re(l.h),s:re(l.s),l:re(l.l),a:re(l.a,3)}},ug=function(l){return Sy((n=(t=l).s,{h:t.h,s:(n*=((a=t.l)<50?a:100-a)/100)>0?2*n/(a+n)*100:0,v:a+n,a:t.a}));var t,n,a},tl=function(l){return{h:(t=vy(l)).h,s:(r=(200-(n=t.s))*(a=t.v)/100)>0&&r<200?n*a/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,a,r},V1=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,P1=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,F1=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Q1=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,nh={string:[[function(l){var t=q1.exec(l);return t?(l=t[1]).length<=4?{r:parseInt(l[0]+l[0],16),g:parseInt(l[1]+l[1],16),b:parseInt(l[2]+l[2],16),a:l.length===4?re(parseInt(l[3]+l[3],16)/255,2):1}:l.length===6||l.length===8?{r:parseInt(l.substr(0,2),16),g:parseInt(l.substr(2,2),16),b:parseInt(l.substr(4,2),16),a:l.length===8?re(parseInt(l.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(l){var t=F1.exec(l)||Q1.exec(l);return t?t[2]!==t[4]||t[4]!==t[6]?null:lg({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(l){var t=V1.exec(l)||P1.exec(l);if(!t)return null;var n,a,r=rg({h:(n=t[1],a=t[2],a===void 0&&(a="deg"),Number(n)*(X1[a]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return ug(r)},"hsl"]],object:[[function(l){var t=l.r,n=l.g,a=l.b,r=l.a,u=r===void 0?1:r;return Li(t)&&Li(n)&&Li(a)?lg({r:Number(t),g:Number(n),b:Number(a),a:Number(u)}):null},"rgb"],[function(l){var t=l.h,n=l.s,a=l.l,r=l.a,u=r===void 0?1:r;if(!Li(t)||!Li(n)||!Li(a))return null;var c=rg({h:Number(t),s:Number(n),l:Number(a),a:Number(u)});return ug(c)},"hsl"],[function(l){var t=l.h,n=l.s,a=l.v,r=l.a,u=r===void 0?1:r;if(!Li(t)||!Li(n)||!Li(a))return null;var c=(function(f){return{h:by(f.h),s:ti(f.s,0,100),v:ti(f.v,0,100),a:ti(f.a)}})({h:Number(t),s:Number(n),v:Number(a),a:Number(u)});return Sy(c)},"hsv"]]},cg=function(l,t){for(var n=0;n<t.length;n++){var a=t[n][0](l);if(a)return[a,t[n][1]]}return[null,void 0]},W1=function(l){return typeof l=="string"?cg(l.trim(),nh.string):typeof l=="object"&&l!==null?cg(l,nh.object):[null,void 0]},Bc=function(l,t){var n=tl(l);return{h:n.h,s:ti(n.s+100*t,0,100),l:n.l,a:n.a}},Oc=function(l){return(299*l.r+587*l.g+114*l.b)/1e3/255},hg=function(l,t){var n=tl(l);return{h:n.h,s:n.s,l:ti(n.l+100*t,0,100),a:n.a}},sh=(function(){function l(t){this.parsed=W1(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return l.prototype.isValid=function(){return this.parsed!==null},l.prototype.brightness=function(){return re(Oc(this.rgba),2)},l.prototype.isDark=function(){return Oc(this.rgba)<.5},l.prototype.isLight=function(){return Oc(this.rgba)>=.5},l.prototype.toHex=function(){return t=Dc(this.rgba),n=t.r,a=t.g,r=t.b,c=(u=t.a)<1?kr(re(255*u)):"","#"+kr(n)+kr(a)+kr(r)+c;var t,n,a,r,u,c},l.prototype.toRgb=function(){return Dc(this.rgba)},l.prototype.toRgbString=function(){return t=Dc(this.rgba),n=t.r,a=t.g,r=t.b,(u=t.a)<1?"rgba("+n+", "+a+", "+r+", "+u+")":"rgb("+n+", "+a+", "+r+")";var t,n,a,r,u},l.prototype.toHsl=function(){return og(tl(this.rgba))},l.prototype.toHslString=function(){return t=og(tl(this.rgba)),n=t.h,a=t.s,r=t.l,(u=t.a)<1?"hsla("+n+", "+a+"%, "+r+"%, "+u+")":"hsl("+n+", "+a+"%, "+r+"%)";var t,n,a,r,u},l.prototype.toHsv=function(){return t=vy(this.rgba),{h:re(t.h),s:re(t.s),v:re(t.v),a:re(t.a,3)};var t},l.prototype.invert=function(){return xi({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},l.prototype.saturate=function(t){return t===void 0&&(t=.1),xi(Bc(this.rgba,t))},l.prototype.desaturate=function(t){return t===void 0&&(t=.1),xi(Bc(this.rgba,-t))},l.prototype.grayscale=function(){return xi(Bc(this.rgba,-1))},l.prototype.lighten=function(t){return t===void 0&&(t=.1),xi(hg(this.rgba,t))},l.prototype.darken=function(t){return t===void 0&&(t=.1),xi(hg(this.rgba,-t))},l.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},l.prototype.alpha=function(t){return typeof t=="number"?xi({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):re(this.rgba.a,3);var n},l.prototype.hue=function(t){var n=tl(this.rgba);return typeof t=="number"?xi({h:t,s:n.s,l:n.l,a:n.a}):re(n.h)},l.prototype.isEqual=function(t){return this.toHex()===xi(t).toHex()},l})(),xi=function(l){return l instanceof sh?l:new sh(l)},fg=[],Z1=function(l){l.forEach(function(t){fg.indexOf(t)<0&&(t(sh,nh),fg.push(t))})};function K1(l,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"},a={};for(var r in n)a[n[r]]=r;var u={};l.prototype.toName=function(c){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var f,m,p=a[this.toHex()];if(p)return p;if(c!=null&&c.closest){var g=this.toRgb(),x=1/0,b="black";if(!u.length)for(var _ in n)u[_]=new l(n[_]).toRgb();for(var S in n){var A=(f=g,m=u[S],Math.pow(f.r-m.r,2)+Math.pow(f.g-m.g,2)+Math.pow(f.b-m.b,2));A<x&&(x=A,b=S)}return b}},t.string.push([function(c){var f=c.toLowerCase(),m=f==="transparent"?"#0000":n[f];return m?new l(m).toRgb():null},"name"])}Z1([K1]);const Ps=class Ka{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 Ka)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 a=typeof t;if(a!==typeof n)return!1;if(a==="number"||a==="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((u,c)=>u===n[c]);if(t!==null&&n!==null){const u=Object.keys(t),c=Object.keys(n);return u.length!==c.length?!1:u.every(f=>t[f]===n[f])}return t===n}toRgba(){const[t,n,a,r]=this._components;return{r:t,g:n,b:a,a:r}}toRgb(){const[t,n,a]=this._components;return{r:t,g:n,b:a}}toRgbaString(){const[t,n,a]=this.toUint8RgbArray();return`rgba(${t},${n},${a},${this.alpha})`}toUint8RgbArray(t){const[n,a,r]=this._components;return this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb),t[0]=Math.round(n*255),t[1]=Math.round(a*255),t[2]=Math.round(r*255),t}toArray(t){this._arrayRgba||(this._arrayRgba=[]),t||(t=this._arrayRgba);const[n,a,r,u]=this._components;return t[0]=n,t[1]=a,t[2]=r,t[3]=u,t}toRgbArray(t){this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb);const[n,a,r]=this._components;return t[0]=n,t[1]=a,t[2]=r,t}toNumber(){return this._int}toBgrNumber(){const[t,n,a]=this.toUint8RgbArray();return(a<<16)+(n<<8)+t}toLittleEndianNumber(){const t=this._int;return(t>>16)+(t&65280)+((t&255)<<16)}multiply(t){const[n,a,r,u]=Ka._temp.setValue(t)._components;return this._components[0]*=n,this._components[1]*=a,this._components[2]*=r,this._components[3]*=u,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 a=this._int>>16&255,r=this._int>>8&255,u=this._int&255;return n&&(a=a*t+.5|0,r=r*t+.5|0,u=u*t+.5|0),(t*255<<24)+(a<<16)+(r<<8)+u}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,a,r,u;if((typeof t=="number"||t instanceof Number)&&t>=0&&t<=16777215){const c=t;n=(c>>16&255)/255,a=(c>>8&255)/255,r=(c&255)/255,u=1}else if((Array.isArray(t)||t instanceof Float32Array)&&t.length>=3&&t.length<=4)t=this._clamp(t),[n,a,r,u=1]=t;else if((t instanceof Uint8Array||t instanceof Uint8ClampedArray)&&t.length>=3&&t.length<=4)t=this._clamp(t,0,255),[n,a,r,u=255]=t,n/=255,a/=255,r/=255,u/=255;else if(typeof t=="string"||typeof t=="object"){if(typeof t=="string"){const f=Ka.HEX_PATTERN.exec(t);f&&(t=`#${f[2]}`)}const c=xi(t);c.isValid()&&({r:n,g:a,b:r,a:u}=c.rgba,n/=255,a/=255,r/=255)}if(n!==void 0)this._components[0]=n,this._components[1]=a,this._components[2]=r,this._components[3]=u,this._refreshInt();else throw new Error(`Unable to convert color ${t}`)}_refreshInt(){this._clamp(this._components);const[t,n,a]=this._components;this._int=(t*255<<16)+(n*255<<8)+(a*255|0)}_clamp(t,n=0,a=1){return typeof t=="number"?Math.min(Math.max(t,n),a):(t.forEach((r,u)=>{t[u]=Math.min(Math.max(r,n),a)}),t)}static isColorLike(t){return typeof t=="number"||typeof t=="string"||t instanceof Number||t instanceof Ka||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}};Ps.shared=new Ps;Ps._temp=new Ps;Ps.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let ne=Ps;const I1={cullArea:null,cullable:!1,cullableChildren:!0};let Gc=0;const dg=500;function ve(...l){Gc!==dg&&(Gc++,Gc===dg?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...l))}const hl={_registeredResources:new Set,register(l){this._registeredResources.add(l)},unregister(l){this._registeredResources.delete(l)},release(){this._registeredResources.forEach(l=>l.clear())},get registeredCount(){return this._registeredResources.size},isRegistered(l){return this._registeredResources.has(l)},reset(){this._registeredResources.clear()}};class J1{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 a;let n;return this._index>0?n=this._pool[--this._index]:(n=new this._classType,this._count++),(a=n.init)==null||a.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 $1{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 J1(t)),this._poolsByClass.get(t)}stats(){const t={};return this._poolsByClass.forEach(n=>{const a=t[n._classType.name]?n._classType.name+n._classType.ID:n._classType.name;t[a]={free:n.totalFree,used:n.totalUsed,size:n.totalSize}}),t}clear(){this._poolsByClass.forEach(t=>t.clear()),this._poolsByClass.clear()}}const ze=new $1;hl.register(ze);const tb={get isCachedAsTexture(){var l;return!!((l=this.renderGroup)!=null&&l.isCachedAsTexture)},cacheAsTexture(l){typeof l=="boolean"&&l===!1?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(l===!0?{}:l))},updateCacheTexture(){var l;(l=this.renderGroup)==null||l.updateCacheTexture()},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(l){At("v8.6.0","cacheAsBitmap is deprecated, use cacheAsTexture instead."),this.cacheAsTexture(l)}};function eb(l,t,n){const a=l.length;let r;if(t>=a||n===0)return;n=t+n>a?a-t:n;const u=a-n;for(r=t;r<u;++r)l[r]=l[r+n];l.length=u}const ib={allowChildren:!0,removeChildren(l=0,t){var u;const n=t??this.children.length,a=n-l,r=[];if(a>0&&a<=n){for(let f=n-1;f>=l;f--){const m=this.children[f];m&&(r.push(m),m.parent=null)}eb(this.children,l,n);const c=this.renderGroup||this.parentRenderGroup;c&&c.removeChildren(r);for(let f=0;f<r.length;++f){const m=r[f];(u=m.parentRenderLayer)==null||u.detach(m),this.emit("childRemoved",m,this,f),r[f].emit("removed",this)}return r.length>0&&this._didViewChangeTick++,r}else if(a===0&&this.children.length===0)return r;throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},removeChildAt(l){const t=this.getChildAt(l);return this.removeChild(t)},getChildAt(l){if(l<0||l>=this.children.length)throw new Error(`getChildAt: Index (${l}) does not exist.`);return this.children[l]},setChildIndex(l,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);this.getChildIndex(l),this.addChildAt(l,t)},getChildIndex(l){const t=this.children.indexOf(l);if(t===-1)throw new Error("The supplied Container must be a child of the caller");return t},addChildAt(l,t){this.allowChildren||At(Ft,"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(`${l}addChildAt: The index ${t} supplied is out of bounds ${n.length}`);const a=l.parent===this;if(l.parent){const u=l.parent.children.indexOf(l);if(a){if(u===t)return l;l.parent.children.splice(u,1)}else l.removeFromParent()}t===n.length?n.push(l):n.splice(t,0,l),l.parent=this,l.didChange=!0,l._updateFlags=15;const r=this.renderGroup||this.parentRenderGroup;return r&&r.addChild(l),this.sortableChildren&&(this.sortDirty=!0),a||(this.emit("childAdded",l,this,t),l.emit("added",this)),l},swapChildren(l,t){if(l===t)return;const n=this.getChildIndex(l),a=this.getChildIndex(t);this.children[n]=t,this.children[a]=l;const r=this.renderGroup||this.parentRenderGroup;r&&(r.structureDidChange=!0),this._didContainerChangeTick++},removeFromParent(){var l;(l=this.parent)==null||l.removeChild(this)},reparentChild(...l){return l.length===1?this.reparentChildAt(l[0],this.children.length):(l.forEach(t=>this.reparentChildAt(t,this.children.length)),l[0])},reparentChildAt(l,t){if(l.parent===this)return this.setChildIndex(l,t),l;const n=l.worldTransform.clone();l.removeFromParent(),this.addChildAt(l,t);const a=this.worldTransform.clone();return a.invert(),n.prepend(a),l.setFromMatrix(n),l},replaceChild(l,t){l.updateLocalTransform(),this.addChildAt(t,this.getChildIndex(l)),t.setFromMatrix(l.localTransform),t.updateLocalTransform(),this.removeChild(l)}},nb={collectRenderables(l,t,n){this.parentRenderLayer&&this.parentRenderLayer!==n||this.globalDisplayStatus<7||!this.includeInBuild||(this.sortableChildren&&this.sortChildren(),this.isSimple?this.collectRenderablesSimple(l,t,n):this.renderGroup?t.renderPipes.renderGroup.addRenderGroup(this.renderGroup,l):this.collectRenderablesWithEffects(l,t,n))},collectRenderablesSimple(l,t,n){const a=this.children,r=a.length;for(let u=0;u<r;u++)a[u].collectRenderables(l,t,n)},collectRenderablesWithEffects(l,t,n){const{renderPipes:a}=t;for(let r=0;r<this.effects.length;r++){const u=this.effects[r];a[u.pipe].push(u,this,l)}this.collectRenderablesSimple(l,t,n);for(let r=this.effects.length-1;r>=0;r--){const u=this.effects[r];a[u.pipe].pop(u,this,l)}}};class mg{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 sb{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 a=this._tests[n];if(a.test(t))return ze.get(a.maskClass,t)}return t}returnMaskEffect(t){ze.return(t)}}const ah=new sb;It.handleByList(gt.MaskEffect,ah._effectClasses);const ab={_maskEffect:null,_maskOptions:{inverse:!1},_filterEffect:null,effects:[],_markStructureAsChanged(){const l=this.renderGroup||this.parentRenderGroup;l&&(l.structureDidChange=!0)},addEffect(l){this.effects.indexOf(l)===-1&&(this.effects.push(l),this.effects.sort((n,a)=>n.priority-a.priority),this._markStructureAsChanged(),this._updateIsSimple())},removeEffect(l){const t=this.effects.indexOf(l);t!==-1&&(this.effects.splice(t,1),this._markStructureAsChanged(),this._updateIsSimple())},set mask(l){const t=this._maskEffect;(t==null?void 0:t.mask)!==l&&(t&&(this.removeEffect(t),ah.returnMaskEffect(t),this._maskEffect=null),l!=null&&(this._maskEffect=ah.getMaskEffect(l),this.addEffect(this._maskEffect)))},get mask(){var l;return(l=this._maskEffect)==null?void 0:l.mask},setMask(l){this._maskOptions={...this._maskOptions,...l},l.mask&&(this.mask=l.mask),this._markStructureAsChanged()},set filters(l){var u;!Array.isArray(l)&&l&&(l=[l]);const t=this._filterEffect||(this._filterEffect=new mg);l=l;const n=(l==null?void 0:l.length)>0,a=((u=t.filters)==null?void 0:u.length)>0,r=n!==a;l=Array.isArray(l)?l.slice(0):l,t.filters=Object.freeze(l),r&&(n?this.addEffect(t):(this.removeEffect(t),t.filters=l??null))},get filters(){var l;return(l=this._filterEffect)==null?void 0:l.filters},set filterArea(l){this._filterEffect||(this._filterEffect=new mg),this._filterEffect.filterArea=l},get filterArea(){var l;return(l=this._filterEffect)==null?void 0:l.filterArea}},lb={label:null,get name(){return At(Ft,"Container.name property has been removed, use Container.label instead"),this.label},set name(l){At(Ft,"Container.name property has been removed, use Container.label instead"),this.label=l},getChildByName(l,t=!1){return this.getChildByLabel(l,t)},getChildByLabel(l,t=!1){const n=this.children;for(let a=0;a<n.length;a++){const r=n[a];if(r.label===l||l instanceof RegExp&&l.test(r.label))return r}if(t)for(let a=0;a<n.length;a++){const u=n[a].getChildByLabel(l,!0);if(u)return u}return null},getChildrenByLabel(l,t=!1,n=[]){const a=this.children;for(let r=0;r<a.length;r++){const u=a[r];(u.label===l||l instanceof RegExp&&l.test(u.label))&&n.push(u)}if(t)for(let r=0;r<a.length;r++)a[r].getChildrenByLabel(l,!0,n);return n}},be=ze.getPool(vt),Xi=ze.getPool(ni),rb=new vt,ob={getFastGlobalBounds(l,t){t||(t=new ni),t.clear(),this._getGlobalBoundsRecursive(!!l,t,this.parentRenderLayer),t.isValid||t.set(0,0,0,0);const n=this.renderGroup||this.parentRenderGroup;return t.applyMatrix(n.worldTransform),t},_getGlobalBoundsRecursive(l,t,n){let a=t;if(l&&this.parentRenderLayer&&this.parentRenderLayer!==n||this.localDisplayStatus!==7||!this.measurable)return;const r=!!this.effects.length;if((this.renderGroup||r)&&(a=Xi.get().clear()),this.boundsArea)t.addRect(this.boundsArea,this.worldTransform);else{if(this.renderPipeId){const c=this.bounds;a.addFrame(c.minX,c.minY,c.maxX,c.maxY,this.groupTransform)}const u=this.children;for(let c=0;c<u.length;c++)u[c]._getGlobalBoundsRecursive(l,a,n)}if(r){let u=!1;const c=this.renderGroup||this.parentRenderGroup;for(let f=0;f<this.effects.length;f++)this.effects[f].addBounds&&(u||(u=!0,a.applyMatrix(c.worldTransform)),this.effects[f].addBounds(a,!0));u&&a.applyMatrix(c.worldTransform.copyTo(rb).invert()),t.addBounds(a),Xi.return(a)}else this.renderGroup&&(t.addBounds(a,this.relativeGroupTransform),Xi.return(a))}};function Ty(l,t,n){n.clear();let a,r;return l.parent?t?a=l.parent.worldTransform:(r=be.get().identity(),a=Ch(l,r)):a=vt.IDENTITY,Ay(l,n,a,t),r&&be.return(r),n.isValid||n.set(0,0,0,0),n}function Ay(l,t,n,a){var f,m;if(!l.visible||!l.measurable)return;let r;a?r=l.worldTransform:(l.updateLocalTransform(),r=be.get(),r.appendFrom(l.localTransform,n));const u=t,c=!!l.effects.length;if(c&&(t=Xi.get().clear()),l.boundsArea)t.addRect(l.boundsArea,r);else{const p=l.bounds;p&&!p.isEmpty()&&(t.matrix=r,t.addBounds(p));for(let g=0;g<l.children.length;g++)Ay(l.children[g],t,r,a)}if(c){for(let p=0;p<l.effects.length;p++)(m=(f=l.effects[p]).addBounds)==null||m.call(f,t);u.addBounds(t,vt.IDENTITY),Xi.return(t)}a||be.return(r)}function Ch(l,t){const n=l.parent;return n&&(Ch(n,t),n.updateLocalTransform(),t.append(n.localTransform)),t}function wy(l,t){if(l===16777215||!t)return t;if(t===16777215||!l)return l;const n=l>>16&255,a=l>>8&255,r=l&255,u=t>>16&255,c=t>>8&255,f=t&255,m=n*u/255|0,p=a*c/255|0,g=r*f/255|0;return(m<<16)+(p<<8)+g}const pg=16777215;function gg(l,t){return l===pg?t:t===pg?l:wy(l,t)}function Wr(l){return((l&255)<<16)+(l&65280)+(l>>16&255)}const ub={getGlobalAlpha(l){if(l)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(l=new vt,t){if(t)return l.copyFrom(this.worldTransform);this.updateLocalTransform();const n=Ch(this,be.get().identity());return l.appendFrom(this.localTransform,n),be.return(n),l},getGlobalTint(l){if(l)return this.renderGroup?Wr(this.renderGroup.worldColor):this.parentRenderGroup?Wr(gg(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let t=this.localColor,n=this.parent;for(;n;)t=gg(t,n.localColor),n=n.parent;return Wr(t)}};function Cy(l,t,n){return t.clear(),n||(n=vt.IDENTITY),My(l,t,n,l,!0),t.isValid||t.set(0,0,0,0),t}function My(l,t,n,a,r){var m,p;let u;if(r)u=be.get(),u=n.copyTo(u);else{if(!l.visible||!l.measurable)return;l.updateLocalTransform();const g=l.localTransform;u=be.get(),u.appendFrom(g,n)}const c=t,f=!!l.effects.length;if(f&&(t=Xi.get().clear()),l.boundsArea)t.addRect(l.boundsArea,u);else{l.renderPipeId&&(t.matrix=u,t.addBounds(l.bounds));const g=l.children;for(let x=0;x<g.length;x++)My(g[x],t,u,a,!1)}if(f){for(let g=0;g<l.effects.length;g++)(p=(m=l.effects[g]).addLocalBounds)==null||p.call(m,t,a);c.addBounds(t,vt.IDENTITY),Xi.return(t)}be.return(u)}function Ey(l,t){const n=l.children;for(let a=0;a<n.length;a++){const r=n[a],u=r.uid,c=(r._didViewChangeTick&65535)<<16|r._didContainerChangeTick&65535,f=t.index;(t.data[f]!==u||t.data[f+1]!==c)&&(t.data[t.index]=u,t.data[t.index+1]=c,t.didChange=!0),t.index=f+2,r.children.length&&Ey(r,t)}return t.didChange}const cb=new vt,hb={_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(l,t){const n=Math.sign(this.scale.x)||1;t!==0?this.scale.x=l/t*n:this.scale.x=n},_setHeight(l,t){const n=Math.sign(this.scale.y)||1;t!==0?this.scale.y=l/t*n:this.scale.y=n},getLocalBounds(){this._localBoundsCacheData||(this._localBoundsCacheData={data:[],index:1,didChange:!1,localBounds:new ni});const l=this._localBoundsCacheData;return l.index=1,l.didChange=!1,l.data[0]!==this._didViewChangeTick&&(l.didChange=!0,l.data[0]=this._didViewChangeTick),Ey(this,l),l.didChange&&Cy(this,l.localBounds,cb),l.localBounds},getBounds(l,t){return Ty(this,l,t||new ni)}},fb={_onRender:null,set onRender(l){const t=this.renderGroup||this.parentRenderGroup;if(!l){this._onRender&&(t==null||t.removeOnRender(this)),this._onRender=null;return}this._onRender||t==null||t.addOnRender(this),this._onRender=l},get onRender(){return this._onRender}},db={_zIndex:0,sortDirty:!1,sortableChildren:!1,get zIndex(){return this._zIndex},set zIndex(l){this._zIndex!==l&&(this._zIndex=l,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(mb))}};function mb(l,t){return l._zIndex-t._zIndex}const pb={getGlobalPosition(l=new ge,t=!1){return this.parent?this.parent.toGlobal(this._position,l,t):(l.x=this._position.x,l.y=this._position.y),l},toGlobal(l,t,n=!1){const a=this.getGlobalTransform(be.get(),n);return t=a.apply(l,t),be.return(a),t},toLocal(l,t,n,a){t&&(l=t.toGlobal(l,n,a));const r=this.getGlobalTransform(be.get(),a);return n=r.applyInverse(l,n),be.return(r),n}};class Mh{constructor(){this.uid=Qt("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 gb=0;class yb{constructor(t){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this.textureStyle=new Vs(this.textureOptions)}createTexture(t,n,a,r){const u=new ai({...this.textureOptions,width:t,height:n,resolution:1,antialias:a,autoGarbageCollect:!1,autoGenerateMipmaps:r});return new Ut({source:u,label:`texturePool_${gb++}`})}getOptimalTexture(t,n,a=1,r,u=!1){let c=Math.ceil(t*a-1e-6),f=Math.ceil(n*a-1e-6);c=qs(c),f=qs(f);const m=r?1:0,p=u?1:0,g=(c<<17)+(f<<2)+(p<<1)+m;this._texturePool[g]||(this._texturePool[g]=[]);let x=this._texturePool[g].pop();return x||(x=this.createTexture(c,f,r,u)),x.source._resolution=a,x.source.width=c/a,x.source.height=f/a,x.source.pixelWidth=c,x.source.pixelHeight=f,x.frame.x=0,x.frame.y=0,x.frame.width=t,x.frame.height=n,x.updateUvs(),this._poolKeyHash[x.uid]=g,x}getSameSizeTexture(t,n=!1){const a=t.source;return this.getOptimalTexture(t.width,t.height,a._resolution,n)}returnTexture(t,n=!1){const a=this._poolKeyHash[t.uid];n&&(t.source.style=this.textureStyle),this._texturePool[a].push(t)}clear(t){if(t=t!==!1,t)for(const n in this._texturePool){const a=this._texturePool[n];if(a)for(let r=0;r<a.length;r++)a[r].destroy(!0)}this._texturePool={}}}const io=new yb;hl.register(io);class xb{constructor(){this.renderPipeId="renderGroup",this.root=null,this.canBundle=!1,this.renderGroupParent=null,this.renderGroupChildren=[],this.worldTransform=new vt,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 Mh,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 a=0;a<n.length;a++){const r=n[a];r._updateFlags=15,this.addChild(r)}}enableCacheAsTexture(t={}){this.textureOptions=t,this.isCachedAsTexture=!0,this.textureNeedsUpdate=!0}disableCacheAsTexture(){this.isCachedAsTexture=!1,this.texture&&(io.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 a=0;a<n.length;a++)this.addChild(n[a])}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 a=0;a<n.length;a++)this.removeChild(n[a])}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 a=0;a<n.length;a++)this._getChildren(n[a],t);return t}_getChildren(t,n=[]){if(n.push(t),t.renderGroup)return n;const a=t.children;for(let r=0;r<a.length;r++)this._getChildren(a[r],n);return n}invalidateMatrices(){this._matrixDirty=7}get inverseWorldTransform(){return(this._matrixDirty&1)===0?this._inverseWorldTransform:(this._matrixDirty&=-2,this._inverseWorldTransform||(this._inverseWorldTransform=new vt),this._inverseWorldTransform.copyFrom(this.worldTransform).invert())}get textureOffsetInverseTransform(){return(this._matrixDirty&2)===0?this._textureOffsetInverseTransform:(this._matrixDirty&=-3,this._textureOffsetInverseTransform||(this._textureOffsetInverseTransform=new vt),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 vt),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 _b(l,t,n={}){for(const a in t)!n[a]&&t[a]!==void 0&&(l[a]=t[a])}const Uc=new me(null),Hr=new me(null),Nc=new me(null,1,1),Lr=new me(null),yg=1,bb=2,kc=4;class si extends bi{constructor(t={}){var n,a;super(),this.uid=Qt("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 vt,this.relativeGroupTransform=new vt,this.groupTransform=this.relativeGroupTransform,this.destroyed=!1,this._position=new me(this,0,0),this._scale=Nc,this._pivot=Hr,this._origin=Lr,this._skew=Uc,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=[],_b(this,t,{children:!0,parent:!0,effects:!0}),(n=t.children)==null||n.forEach(r=>this.addChild(r)),(a=t.parent)==null||a.addChild(this)}static mixin(t){At("8.8.0","Container.mixin is deprecated, please use extensions.mixin instead."),It.mixin(si,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||At(Ft,"addChild: Only Containers will be allowed to add children in v8.0.0"),t.length>1){for(let r=0;r<t.length;r++)this.addChild(t[r]);return t[0]}const n=t[0],a=this.renderGroup||this.parentRenderGroup;return n.parent===this?(this.children.splice(this.children.indexOf(n),1),this.children.push(n),a&&(a.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,a&&a.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 r=0;r<t.length;r++)this.removeChild(t[r]);return t[0]}const n=t[0],a=this.children.indexOf(n);return a>-1&&(this._didViewChangeTick++,this.children.splice(a,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,a),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=ze.get(xb,this),this.groupTransform=vt.IDENTITY,t==null||t.addChild(this),this._updateIsSimple()}disableRenderGroup(){if(!this.renderGroup)return;const t=this.parentRenderGroup;t==null||t.removeChild(this),ze.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 vt),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*G1}set angle(t){this.rotation=t*U1}get pivot(){return this._pivot===Hr&&(this._pivot=new me(this,0,0)),this._pivot}set pivot(t){this._pivot===Hr&&(this._pivot=new me(this,0,0),this._origin!==Lr&&ve("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===Uc&&(this._skew=new me(this,0,0)),this._skew}set skew(t){this._skew===Uc&&(this._skew=new me(this,0,0)),this._skew.copyFrom(t)}get scale(){return this._scale===Nc&&(this._scale=new me(this,1,1)),this._scale}set scale(t){this._scale===Nc&&(this._scale=new me(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===Lr&&(this._origin=new me(this,0,0)),this._origin}set origin(t){this._origin===Lr&&(this._origin=new me(this,0,0),this._pivot!==Hr&&ve("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 a=this.getLocalBounds();typeof t=="object"?(n=t.height??t.width,t=t.width):n??(n=t),t!==void 0&&this._setWidth(t,a.width),n!==void 0&&this._setHeight(n,a.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,a=this._scale,r=this._pivot,u=this._origin,c=this._position,f=a._x,m=a._y,p=r._x,g=r._y,x=-u._x,b=-u._y;n.a=this._cx*f,n.b=this._sx*f,n.c=this._cy*m,n.d=this._sy*m,n.tx=c._x-(p*n.a+g*n.c)+(x*n.a+b*n.c)-x,n.ty=c._y-(p*n.b+g*n.d)+(x*n.b+b*n.d)-b}set alpha(t){t!==this.localAlpha&&(this.localAlpha=t,this._updateFlags|=yg,this._onUpdate())}get alpha(){return this.localAlpha}set tint(t){const a=ne.shared.setValue(t??16777215).toBgrNumber();a!==this.localColor&&(this.localColor=a,this._updateFlags|=yg,this._onUpdate())}get tint(){return Wr(this.localColor)}set blendMode(t){this.localBlendMode!==t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=bb,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|=kc,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|=kc,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|=kc,this.localDisplayStatus^=1,this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._onUpdate())}get isRenderable(){return this.localDisplayStatus===7&&this.groupAlpha>0}destroy(t=!1){var r;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 u=0;u<n.length;++u)n[u].destroy(t);(r=this.renderGroup)==null||r.destroy(),this.renderGroup=null}}It.mixin(si,ib,ob,pb,fb,hb,ab,lb,db,I1,tb,ub,nb);class Eh extends si{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 ni(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:a,y:r}=t;return a>=n.minX&&a<=n.maxX&&r>=n.minY&&r<=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,a){const{renderPipes:r}=n;r.blendMode.pushBlendMode(this,this.groupBlendMode,t);const c=r[this.renderPipeId];c!=null&&c.addRenderable&&c.addRenderable(this,t),this.didViewUpdate=!1;const f=this.children,m=f.length;for(let p=0;p<m;p++)f[p].collectRenderables(t,n,a);r.blendMode.popBlendMode(t)}}class sl extends Eh{constructor(t=Ut.EMPTY){t instanceof Ut&&(t={texture:t});const{texture:n=Ut.EMPTY,anchor:a,roundPixels:r,width:u,height:c,...f}=t;super({label:"Sprite",...f}),this.renderPipeId="sprite",this.batched=!0,this._visualBounds={minX:0,maxX:1,minY:0,maxY:0},this._anchor=new me({_onUpdate:()=>{this.onViewUpdate()}}),a?this.anchor=a:n.defaultAnchor&&(this.anchor=n.defaultAnchor),this.texture=n,this.allowChildren=!1,this.roundPixels=r??!1,u!==void 0&&(this.width=u),c!==void 0&&(this.height=c)}static from(t,n=!1){return t instanceof Ut?new sl(t):new sl(Ut.from(t,n))}set texture(t){t||(t=Ut.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 _y(this._visualBounds,this._anchor,this._texture),this._visualBounds}get sourceBounds(){return At("8.6.1","Sprite.sourceBounds is deprecated, use visualBounds instead."),this.visualBounds}updateBounds(){const t=this._anchor,n=this._texture,a=this._bounds,{width:r,height:u}=n.orig;a.minX=-t._x*r,a.maxX=a.minX+r,a.minY=-t._y*u,a.maxY=a.minY+u}destroy(t=!1){if(super.destroy(t),typeof t=="boolean"?t:t==null?void 0:t.texture){const a=typeof t=="boolean"?t:t==null?void 0:t.textureSource;this._texture.destroy(a)}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 vb=new ni;function Ry(l,t,n){const a=vb;l.measurable=!0,Ty(l,n,a),t.addBoundsMask(a),l.measurable=!1}function zy(l,t,n){const a=Xi.get();l.measurable=!0;const r=be.get().identity(),u=Dy(l,n,r);Cy(l,a,u),l.measurable=!1,t.addBoundsMask(a),be.return(r),Xi.return(a)}function Dy(l,t,n){return l?(l!==t&&(Dy(l.parent,t,n),l.updateLocalTransform(),n.append(l.localTransform)),n):(ve("Mask bounds, renderable is not inside the root container"),n)}class By{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 sl),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||Ry(this.mask,t,n)}addLocalBounds(t,n){zy(this.mask,t,n)}containsPoint(t,n){const a=this.mask;return n(a,t)}destroy(){this.reset()}static test(t){return t instanceof sl}}By.extension=gt.MaskEffect;class Oy{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"}}Oy.extension=gt.MaskEffect;class Gy{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){Ry(this.mask,t,n)}addLocalBounds(t,n){zy(this.mask,t,n)}containsPoint(t,n){const a=this.mask;return n(a,t)}destroy(){this.reset()}static test(t){return t instanceof si}}Gy.extension=gt.MaskEffect;const Sb={createCanvas:(l,t)=>{const n=document.createElement("canvas");return n.width=l,n.height=t,n},createImage:()=>new Image,getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(l,t)=>fetch(l,t),parseXML:l=>new DOMParser().parseFromString(l,"text/xml")};let xg=Sb;const Xe={get(){return xg},set(l){xg=l}};class Uy extends ai{constructor(t){t.resource||(t.resource=Xe.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,a=this._resolution){const r=super.resize(t,n,a);return r&&this.resizeCanvas(),r}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"))}}Uy.extension=gt.TextureSource;class Ir extends ai{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}}Ir.extension=gt.TextureSource;var Jr=(l=>(l[l.INTERACTION=50]="INTERACTION",l[l.HIGH=25]="HIGH",l[l.NORMAL=0]="NORMAL",l[l.LOW=-25]="LOW",l[l.UTILITY=-50]="UTILITY",l))(Jr||{});class Hc{constructor(t,n=null,a=0,r=!1){this.next=null,this.previous=null,this._destroyed=!1,this._fn=t,this._context=n,this.priority=a,this._once=r}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 Ny=class Ye{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 Hc(null,null,1/0),this.deltaMS=1/Ye.targetFPMS,this.elapsedMS=1/Ye.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,a=Jr.NORMAL){return this._addListener(new Hc(t,n,a))}addOnce(t,n,a=Jr.NORMAL){return this._addListener(new Hc(t,n,a,!0))}_addListener(t){let n=this._head.next,a=this._head;if(!n)t.connect(a);else{for(;n;){if(t.priority>n.priority){t.connect(a);break}a=n,n=n.next}t.previous||t.connect(a)}return this._startIfPossible(),this}remove(t,n){let a=this._head.next;for(;a;)a.match(t,n)?a=a.destroy():a=a.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 u=t-this._lastFrame|0;if(u<this._minElapsedMS)return;this._lastFrame=t-u%this._minElapsedMS}this.deltaMS=n,this.deltaTime=this.deltaMS*Ye.targetFPMS;const a=this._head;let r=a.next;for(;r;)r=r.emit(this);a.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,Ye.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(!Ye._shared){const t=Ye._shared=new Ye;t.autoStart=!0,t._protected=!0}return Ye._shared}static get system(){if(!Ye._system){const t=Ye._system=new Ye;t.autoStart=!0,t._protected=!0}return Ye._system}};Ny.targetFPMS=.06;let Ys=Ny,Lc;async function Tb(){return Lc??(Lc=(async()=>{var c;const t=Xe.get().createCanvas(1,1).getContext("webgl");if(!t)return"premultiply-alpha-on-upload";const n=await new Promise(f=>{const m=document.createElement("video");m.onloadeddata=()=>f(m),m.onerror=()=>f(null),m.autoplay=!1,m.crossOrigin="anonymous",m.preload="auto",m.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",m.load()});if(!n)return"premultiply-alpha-on-upload";const a=t.createTexture();t.bindTexture(t.TEXTURE_2D,a);const r=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,r),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,a,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 u=new Uint8Array(4);return t.readPixels(0,0,1,1,t.RGBA,t.UNSIGNED_BYTE,u),t.deleteFramebuffer(r),t.deleteTexture(a),(c=t.getExtension("WEBGL_lose_context"))==null||c.loseContext(),u[0]<=u[3]?"premultiplied-alpha":"premultiply-alpha-on-upload"})()),Lc}const no=class ky extends ai{constructor(t){super(t),this.isReady=!1,this.uploadMethodId="video",t={...ky.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=Ys.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 Tb(),this._load=new Promise((a,r)=>{this.isValid?a(this):(this._resolve=a,this._reject=r,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&&(Ys.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||(Ys.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(Ys.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(t){return globalThis.HTMLVideoElement&&t instanceof HTMLVideoElement}};no.extension=gt.TextureSource;no.defaultOptions={...ai.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1};no.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let Ab=no;const ks=(l,t,n=!1)=>(Array.isArray(l)||(l=[l]),t?l.map(a=>typeof a=="string"||n?t(a):a):l);class wb{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||ve(`[Assets] Asset id ${t} was not found in the Cache`),n}set(t,n){const a=ks(t);let r;for(let m=0;m<this.parsers.length;m++){const p=this.parsers[m];if(p.test(n)){r=p.getCacheableAssets(a,n);break}}const u=new Map(Object.entries(r||{}));r||a.forEach(m=>{u.set(m,n)});const c=[...u.keys()],f={cacheKeys:c,keys:a};a.forEach(m=>{this._cacheMap.set(m,f)}),c.forEach(m=>{const p=r?r[m]:n;this._cache.has(m)&&this._cache.get(m)!==p&&ve("[Cache] already has key:",m),this._cache.set(m,u.get(m))})}remove(t){if(!this._cacheMap.has(t)){ve(`[Assets] Asset id ${t} was not found in the Cache`);return}const n=this._cacheMap.get(t);n.cacheKeys.forEach(r=>{this._cache.delete(r)}),n.keys.forEach(r=>{this._cacheMap.delete(r)})}get parsers(){return this._parsers}}const Hs=new wb,lh=[];It.handleByList(gt.TextureSource,lh);function Hy(l={}){const t=l&&l.resource,n=t?l.resource:l,a=t?l:{resource:l};for(let r=0;r<lh.length;r++){const u=lh[r];if(u.test(n))return new u(a)}throw new Error(`Could not find a source type for resource: ${a.resource}`)}function Cb(l={},t=!1){const n=l&&l.resource,a=n?l.resource:l,r=n?l:{resource:l};if(!t&&Hs.has(a))return Hs.get(a);const u=new Ut({source:Hy(r)});return u.on("destroy",()=>{Hs.has(a)&&Hs.remove(a)}),t||Hs.set(a,u),u}function Mb(l,t=!1){return typeof l=="string"?Hs.get(l):l instanceof ai?new Ut({source:l}):Cb(l,t)}Ut.from=Mb;ai.from=Hy;It.add(By,Oy,Gy,Ab,Ir,Uy,wh);var Ly=(l=>(l[l.Low=0]="Low",l[l.Normal=1]="Normal",l[l.High=2]="High",l))(Ly||{});function hi(l){if(typeof l!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(l)}`)}function Xa(l){return l.split("?")[0].split("#")[0]}function Eb(l){return l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Rb(l,t,n){return l.replace(new RegExp(Eb(t),"g"),n)}function zb(l,t){let n="",a=0,r=-1,u=0,c=-1;for(let f=0;f<=l.length;++f){if(f<l.length)c=l.charCodeAt(f);else{if(c===47)break;c=47}if(c===47){if(!(r===f-1||u===1))if(r!==f-1&&u===2){if(n.length<2||a!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){const m=n.lastIndexOf("/");if(m!==n.length-1){m===-1?(n="",a=0):(n=n.slice(0,m),a=n.length-1-n.lastIndexOf("/")),r=f,u=0;continue}}else if(n.length===2||n.length===1){n="",a=0,r=f,u=0;continue}}}else n.length>0?n+=`/${l.slice(r+1,f)}`:n=l.slice(r+1,f),a=f-r-1;r=f,u=0}else c===46&&u!==-1?++u:u=-1}return n}const al={toPosix(l){return Rb(l,"\\","/")},isUrl(l){return/^https?:/.test(this.toPosix(l))},isDataUrl(l){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(l)},isBlobUrl(l){return l.startsWith("blob:")},hasProtocol(l){return/^[^/:]+:/.test(this.toPosix(l))},getProtocol(l){hi(l),l=this.toPosix(l);const t=/^file:\/\/\//.exec(l);if(t)return t[0];const n=/^[^/:]+:\/{0,2}/.exec(l);return n?n[0]:""},toAbsolute(l,t,n){if(hi(l),this.isDataUrl(l)||this.isBlobUrl(l))return l;const a=Xa(this.toPosix(t??Xe.get().getBaseUrl())),r=Xa(this.toPosix(n??this.rootname(a)));return l=this.toPosix(l),l.startsWith("/")?al.join(r,l.slice(1)):this.isAbsolute(l)?l:this.join(a,l)},normalize(l){if(hi(l),l.length===0)return".";if(this.isDataUrl(l)||this.isBlobUrl(l))return l;l=this.toPosix(l);let t="";const n=l.startsWith("/");this.hasProtocol(l)&&(t=this.rootname(l),l=l.slice(t.length));const a=l.endsWith("/");return l=zb(l),l.length>0&&a&&(l+="/"),n?`/${l}`:t+l},isAbsolute(l){return hi(l),l=this.toPosix(l),this.hasProtocol(l)?!0:l.startsWith("/")},join(...l){if(l.length===0)return".";let t;for(let n=0;n<l.length;++n){const a=l[n];if(hi(a),a.length>0)if(t===void 0)t=a;else{const r=l[n-1]??"";this.joinExtensions.includes(this.extname(r).toLowerCase())?t+=`/../${a}`:t+=`/${a}`}}return t===void 0?".":this.normalize(t)},dirname(l){if(hi(l),l.length===0)return".";l=this.toPosix(l);let t=l.charCodeAt(0);const n=t===47;let a=-1,r=!0;const u=this.getProtocol(l),c=l;l=l.slice(u.length);for(let f=l.length-1;f>=1;--f)if(t=l.charCodeAt(f),t===47){if(!r){a=f;break}}else r=!1;return a===-1?n?"/":this.isUrl(c)?u+l:u:n&&a===1?"//":u+l.slice(0,a)},rootname(l){hi(l),l=this.toPosix(l);let t="";if(l.startsWith("/")?t="/":t=this.getProtocol(l),this.isUrl(l)){const n=l.indexOf("/",t.length);n!==-1?t=l.slice(0,n):t=l,t.endsWith("/")||(t+="/")}return t},basename(l,t){hi(l),t&&hi(t),l=Xa(this.toPosix(l));let n=0,a=-1,r=!0,u;if(t!==void 0&&t.length>0&&t.length<=l.length){if(t.length===l.length&&t===l)return"";let c=t.length-1,f=-1;for(u=l.length-1;u>=0;--u){const m=l.charCodeAt(u);if(m===47){if(!r){n=u+1;break}}else f===-1&&(r=!1,f=u+1),c>=0&&(m===t.charCodeAt(c)?--c===-1&&(a=u):(c=-1,a=f))}return n===a?a=f:a===-1&&(a=l.length),l.slice(n,a)}for(u=l.length-1;u>=0;--u)if(l.charCodeAt(u)===47){if(!r){n=u+1;break}}else a===-1&&(r=!1,a=u+1);return a===-1?"":l.slice(n,a)},extname(l){hi(l),l=Xa(this.toPosix(l));let t=-1,n=0,a=-1,r=!0,u=0;for(let c=l.length-1;c>=0;--c){const f=l.charCodeAt(c);if(f===47){if(!r){n=c+1;break}continue}a===-1&&(r=!1,a=c+1),f===46?t===-1?t=c:u!==1&&(u=1):t!==-1&&(u=-1)}return t===-1||a===-1||u===0||u===1&&t===a-1&&t===n+1?"":l.slice(t,a)},parse(l){hi(l);const t={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return t;l=Xa(this.toPosix(l));let n=l.charCodeAt(0);const a=this.isAbsolute(l);let r;t.root=this.rootname(l),a||this.hasProtocol(l)?r=1:r=0;let u=-1,c=0,f=-1,m=!0,p=l.length-1,g=0;for(;p>=r;--p){if(n=l.charCodeAt(p),n===47){if(!m){c=p+1;break}continue}f===-1&&(m=!1,f=p+1),n===46?u===-1?u=p:g!==1&&(g=1):u!==-1&&(g=-1)}return u===-1||f===-1||g===0||g===1&&u===f-1&&u===c+1?f!==-1&&(c===0&&a?t.base=t.name=l.slice(1,f):t.base=t.name=l.slice(c,f)):(c===0&&a?(t.name=l.slice(1,u),t.base=l.slice(1,f)):(t.name=l.slice(c,u),t.base=l.slice(c,f)),t.ext=l.slice(u,f)),t.dir=this.dirname(l),t},sep:"/",delimiter:":",joinExtensions:[".html"]};function jy(l,t,n,a,r){const u=t[n];for(let c=0;c<u.length;c++){const f=u[c];n<t.length-1?jy(l.replace(a[n],f),t,n+1,a,r):r.push(l.replace(a[n],f))}}function Db(l){const t=/\{(.*?)\}/g,n=l.match(t),a=[];if(n){const r=[];n.forEach(u=>{const c=u.substring(1,u.length-1).split(",");r.push(c)}),jy(l,r,0,n,a)}else a.push(l);return a}const _g=l=>!Array.isArray(l);class Yy{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(a=>`${encodeURIComponent(a)}=${encodeURIComponent(n[a])}`).join("&")}}getAlias(t){const{alias:n,src:a}=t;return ks(n||a,u=>typeof u=="string"?u:Array.isArray(u)?u.map(c=>(c==null?void 0:c.src)??c):u!=null&&u.src?u.src:u,!0)}removeAlias(t,n){this._assetMap[t]&&(n&&n!==this._resolverHash[t]||(delete this._resolverHash[t],delete this._assetMap[t]))}addManifest(t){this._manifest&&ve("[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 a=[];let r=n;Array.isArray(n)||(r=Object.entries(n).map(([u,c])=>typeof c=="string"||Array.isArray(c)?{alias:u,src:c}:{alias:u,...c})),r.forEach(u=>{const c=u.src,f=u.alias;let m;if(typeof f=="string"){const p=this._createBundleAssetId(t,f);a.push(p),m=[f,p]}else{const p=f.map(g=>this._createBundleAssetId(t,g));a.push(...p),m=[...f,...p]}this.add({...u,alias:m,src:c})}),this._bundles[t]=a}add(t){const n=[];Array.isArray(t)?n.push(...t):n.push(t);let a;a=u=>{this.hasKey(u)&&ve(`[Resolver] already has key: ${u} overwriting`)},ks(n).forEach(u=>{const{src:c}=u;let{data:f,format:m,loadParser:p,parser:g}=u;const x=ks(c).map(A=>typeof A=="string"?Db(A):Array.isArray(A)?A:[A]),b=this.getAlias(u);Array.isArray(b)?b.forEach(a):a(b);const _=[],S=A=>{const T=this._parsers.find(w=>w.test(A));return{src:A,...T==null?void 0:T.parse(A)}};x.forEach(A=>{A.forEach(T=>{let w={};if(typeof T!="object"?w=S(T):(f=T.data??f,m=T.format??m,(T.loadParser||T.parser)&&(p=T.loadParser??p,g=T.parser??g),w={...S(T.src),...T}),!b)throw new Error(`[Resolver] alias is undefined for this asset: ${w.src}`);w=this._buildResolvedAsset(w,{aliases:b,data:f,format:m,loadParser:p,parser:g,progressSize:u.progressSize}),_.push(w)})}),b.forEach(A=>{this._assetMap[A]=_})})}resolveBundle(t){const n=_g(t);t=ks(t);const a={};return t.forEach(r=>{const u=this._bundles[r];if(u){const c=this.resolve(u),f={};for(const m in c){const p=c[m];f[this._extractAssetIdFromBundle(r,m)]=p}a[r]=f}}),n?a[t[0]]:a}resolveUrl(t){const n=this.resolve(t);if(typeof t!="string"){const a={};for(const r in n)a[r]=n[r].src;return a}return n.src}resolve(t){const n=_g(t);t=ks(t);const a={};return t.forEach(r=>{if(!this._resolverHash[r])if(this._assetMap[r]){let u=this._assetMap[r];const c=this._getPreferredOrder(u);c==null||c.priority.forEach(f=>{c.params[f].forEach(m=>{const p=u.filter(g=>g[f]?g[f]===m:!1);p.length&&(u=p)})}),this._resolverHash[r]=u[0]}else this._resolverHash[r]=this._buildResolvedAsset({alias:[r],src:r},{});a[r]=this._resolverHash[r]}),n?a[t[0]]:a}hasKey(t){return!!this._assetMap[t]}hasBundle(t){return!!this._bundles[t]}_getPreferredOrder(t){for(let n=0;n<t.length;n++){const a=t[n],r=this._preferredOrder.find(u=>u.params.format.includes(a.format));if(r)return r}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:a,data:r,loadParser:u,parser:c,format:f,progressSize:m}=n;return(this._basePath||this._rootPath)&&(t.src=al.toAbsolute(t.src,this._basePath,this._rootPath)),t.alias=a??t.alias??[t.src],t.src=this._appendDefaultSearchParams(t.src),t.data={...r||{},...t.data},t.loadParser=u??t.loadParser,t.parser=c??t.parser,t.format=f??t.format??Bb(t.src),m!==void 0&&(t.progressSize=m),t}}Yy.RETINA_PREFIX=/@([0-9\.]+)x/;function Bb(l){return l.split(".").pop().split("?").shift().split("#").shift()}const bg=(l,t)=>{const n=t.split("?")[1];return n&&(l+=`?${n}`),l},Xy=class Ia{constructor(t,n){this.linkedSheets=[];let a=t;(t==null?void 0:t.source)instanceof ai&&(a={texture:t,data:n});const{texture:r,data:u,cachePrefix:c=""}=a;this.cachePrefix=c,this._texture=r instanceof Ut?r:null,this.textureSource=r.source,this.textures={},this.animations={},this.data=u;const f=parseFloat(u.meta.scale);f?(this.resolution=f,r.source.resolution=this.resolution):this.resolution=r.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<=Ia.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 a=t;const r=n?1/0:Ia.BATCH_SIZE;for(;a-t<r&&a<this._frameKeys.length;){const u=this._frameKeys[a],c=this._frames[u],f=c.frame;if(f){let m=null,p=null;const g=c.trimmed!==!1&&c.sourceSize?c.sourceSize:c.frame,x=new Kt(0,0,Math.floor(g.w)/this.resolution,Math.floor(g.h)/this.resolution);c.rotated?m=new Kt(Math.floor(f.x)/this.resolution,Math.floor(f.y)/this.resolution,Math.floor(f.h)/this.resolution,Math.floor(f.w)/this.resolution):m=new Kt(Math.floor(f.x)/this.resolution,Math.floor(f.y)/this.resolution,Math.floor(f.w)/this.resolution,Math.floor(f.h)/this.resolution),c.trimmed!==!1&&c.spriteSourceSize&&(p=new Kt(Math.floor(c.spriteSourceSize.x)/this.resolution,Math.floor(c.spriteSourceSize.y)/this.resolution,Math.floor(f.w)/this.resolution,Math.floor(f.h)/this.resolution)),this.textures[u]=new Ut({source:this.textureSource,frame:m,orig:x,trim:p,rotate:c.rotated?2:0,defaultAnchor:c.anchor,defaultBorders:c.borders,label:u.toString()})}a++}}_processAnimations(){const t=this.data.animations||{};for(const n in t){this.animations[n]=[];for(let a=0;a<t[n].length;a++){const r=t[n][a];this.animations[n].push(this.textures[r])}}}_parseComplete(){const t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*Ia.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*Ia.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(t=!1){var n;for(const a in this.textures)this.textures[a].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=[]}};Xy.BATCH_SIZE=1e3;let vg=Xy;const Ob=["jpg","png","jpeg","avif","webp","basis","etc2","bc7","bc6h","bc5","bc4","bc3","bc2","bc1","eac","astc"];function qy(l,t,n){const a={};if(l.forEach(r=>{a[r]=t}),Object.keys(t.textures).forEach(r=>{a[`${t.cachePrefix}${r}`]=t.textures[r]}),!n){const r=al.dirname(l[0]);t.linkedSheets.forEach((u,c)=>{const f=qy([`${r}/${t.data.meta.related_multi_packs[c]}`],u,!0);Object.assign(a,f)})}return a}const Gb={extension:gt.Asset,cache:{test:l=>l instanceof vg,getCacheableAssets:(l,t)=>qy(l,t,!1)},resolver:{extension:{type:gt.ResolveParser,name:"resolveSpritesheet"},test:l=>{const n=l.split("?")[0].split("."),a=n.pop(),r=n.pop();return a==="json"&&Ob.includes(r)},parse:l=>{var n;const t=l.split(".");return{resolution:parseFloat(((n=Yy.RETINA_PREFIX.exec(l))==null?void 0:n[1])??"1"),format:t[t.length-2],src:l}}},loader:{name:"spritesheetLoader",id:"spritesheet",extension:{type:gt.LoadParser,priority:Ly.Normal,name:"spritesheetLoader"},async testParse(l,t){return al.extname(t.src).toLowerCase()===".json"&&!!l.frames},async parse(l,t,n){var x,b;const{texture:a,imageFilename:r,textureOptions:u,cachePrefix:c}=(t==null?void 0:t.data)??{};let f=al.dirname(t.src);f&&f.lastIndexOf("/")!==f.length-1&&(f+="/");let m;if(a instanceof Ut)m=a;else{const _=bg(f+(r??l.meta.image),t.src);m=(await n.load([{src:_,data:u}]))[_]}const p=new vg({texture:m.source,data:l,cachePrefix:c});await p.parse();const g=(x=l==null?void 0:l.meta)==null?void 0:x.related_multi_packs;if(Array.isArray(g)){const _=[];for(const A of g){if(typeof A!="string")continue;let T=f+A;(b=t.data)!=null&&b.ignoreMultiPack||(T=bg(T,t.src),_.push(n.load({src:T,data:{textureOptions:u,ignoreMultiPack:!0}})))}const S=await Promise.all(_);p.linkedSheets=S,S.forEach(A=>{A.linkedSheets=[p].concat(p.linkedSheets.filter(T=>T!==A))})}return p},async unload(l,t,n){await n.unload(l.textureSource._sourceOrigin),l.destroy(!1)}}};It.add(Gb);const jc=Object.create(null),Sg=Object.create(null);function Rh(l,t){let n=Sg[l];return n===void 0&&(jc[t]===void 0&&(jc[t]=1),Sg[l]=n=jc[t]++),n}let Gs;function Vy(){return(!Gs||Gs!=null&&Gs.isContextLost())&&(Gs=Xe.get().createCanvas().getContext("webgl",{})),Gs}let jr;function Ub(){if(!jr){jr="mediump";const l=Vy();l&&l.getShaderPrecisionFormat&&(jr=l.getShaderPrecisionFormat(l.FRAGMENT_SHADER,l.HIGH_FLOAT).precision?"highp":"mediump")}return jr}function Nb(l,t,n){return t?l:n?(l=l.replace("out vec4 finalColor;",""),`
54
+
55
+ #ifdef GL_ES // This checks if it is WebGL1
56
+ #define in varying
57
+ #define finalColor gl_FragColor
58
+ #define texture texture2D
59
+ #endif
60
+ ${l}
61
+ `):`
62
+
63
+ #ifdef GL_ES // This checks if it is WebGL1
64
+ #define in attribute
65
+ #define out varying
66
+ #endif
67
+ ${l}
68
+ `}function kb(l,t,n){const a=n?t.maxSupportedFragmentPrecision:t.maxSupportedVertexPrecision;if(l.substring(0,9)!=="precision"){let r=n?t.requestedFragmentPrecision:t.requestedVertexPrecision;return r==="highp"&&a!=="highp"&&(r="mediump"),`precision ${r} float;
69
+ ${l}`}else if(a!=="highp"&&l.substring(0,15)==="precision highp")return l.replace("precision highp","precision mediump");return l}function Hb(l,t){return t?`#version 300 es
70
+ ${l}`:l}const Lb={},jb={};function Yb(l,{name:t="pixi-program"},n=!0){t=t.replace(/\s+/g,"-"),t+=n?"-fragment":"-vertex";const a=n?Lb:jb;return a[t]?(a[t]++,t+=`-${a[t]}`):a[t]=1,l.indexOf("#define SHADER_NAME")!==-1?l:`${`#define SHADER_NAME ${t}`}
71
+ ${l}`}function Xb(l,t){return t?l.replace("#version 300 es",""):l}const Yc={stripVersion:Xb,ensurePrecision:kb,addProgramDefines:Nb,setProgramName:Yb,insertVersion:Hb},qa=Object.create(null),Py=class rh{constructor(t){t={...rh.defaultOptions,...t};const n=t.fragment.indexOf("#version 300 es")!==-1,a={stripVersion:n,ensurePrecision:{requestedFragmentPrecision:t.preferredFragmentPrecision,requestedVertexPrecision:t.preferredVertexPrecision,maxSupportedVertexPrecision:"highp",maxSupportedFragmentPrecision:Ub()},setProgramName:{name:t.name},addProgramDefines:n,insertVersion:n};let r=t.fragment,u=t.vertex;Object.keys(Yc).forEach(c=>{const f=a[c];r=Yc[c](r,f,!0),u=Yc[c](u,f,!1)}),this.fragment=r,this.vertex=u,this.transformFeedbackVaryings=t.transformFeedbackVaryings,this._key=Rh(`${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,qa[this._cacheKey]=null}static from(t){const n=`${t.vertex}:${t.fragment}`;return qa[n]||(qa[n]=new rh(t),qa[n]._cacheKey=n),qa[n]}};Py.defaultOptions={preferredVertexPrecision:"highp",preferredFragmentPrecision:"mediump"};let Fy=Py;const Tg={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 qb(l){return Tg[l]??Tg.float32}const Vb={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"},Ag=/@location\((\d+)\)\s+([a-zA-Z0-9_]+)\s*:\s*([a-zA-Z0-9_<>]+)(?:,|\s|\)|$)/g;function wg(l,t){let n;for(;(n=Ag.exec(l))!==null;){const a=Vb[n[3]]??"float32";t[n[2]]={location:parseInt(n[1],10),format:a,stride:qb(a).stride,offset:0,instance:!1,start:0}}Ag.lastIndex=0}function Pb(l){return l.replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"")}function Fb({source:l,entryPoint:t}){const n={},a=Pb(l),r=a.indexOf(`fn ${t}(`);if(r===-1)return n;const u=a.indexOf("->",r);if(u===-1)return n;const c=a.substring(r,u);if(wg(c,n),Object.keys(n).length===0){const f=c.match(/\(\s*\w+\s*:\s*(\w+)/);if(f){const m=f[1],p=new RegExp(`struct\\s+${m}\\s*\\{([^}]+)\\}`,"s"),g=a.match(p);g&&wg(g[1],n)}}return n}function Xc(l){var x,b;const t=/(^|[^/])@(group|binding)\(\d+\)[^;]+;/g,n=/@group\((\d+)\)/,a=/@binding\((\d+)\)/,r=/var(<[^>]+>)? (\w+)/,u=/:\s*([\w<>]+)/,c=/struct\s+(\w+)\s*{([^}]+)}/g,f=/(\w+)\s*:\s*([\w\<\>]+)/g,m=/struct\s+(\w+)/,p=(x=l.match(t))==null?void 0:x.map(_=>({group:parseInt(_.match(n)[1],10),binding:parseInt(_.match(a)[1],10),name:_.match(r)[2],isUniform:_.match(r)[1]==="<uniform>",type:_.match(u)[1]}));if(!p)return{groups:[],structs:[]};const g=((b=l.match(c))==null?void 0:b.map(_=>{const S=_.match(m)[1],A=_.match(f).reduce((T,w)=>{const[E,D]=w.split(":");return T[E.trim()]=D.trim(),T},{});return A?{name:S,members:A}:null}).filter(({name:_})=>p.some(S=>S.type===_||S.type.includes(`<${_}>`))))??[];return{groups:p,structs:g}}var Pn=(l=>(l[l.VERTEX=1]="VERTEX",l[l.FRAGMENT=2]="FRAGMENT",l[l.COMPUTE=4]="COMPUTE",l))(Pn||{});function Qb({groups:l}){const t=[];for(let n=0;n<l.length;n++){const a=l[n];t[a.group]||(t[a.group]=[]),a.isUniform?t[a.group].push({binding:a.binding,visibility:Pn.VERTEX|Pn.FRAGMENT,buffer:{type:"uniform"}}):a.type==="sampler"?t[a.group].push({binding:a.binding,visibility:Pn.FRAGMENT,sampler:{type:"filtering"}}):a.type==="texture_2d"||a.type.startsWith("texture_2d<")?t[a.group].push({binding:a.binding,visibility:Pn.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d",multisampled:!1}}):a.type==="texture_2d_array"||a.type.startsWith("texture_2d_array<")?t[a.group].push({binding:a.binding,visibility:Pn.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d-array",multisampled:!1}}):(a.type==="texture_cube"||a.type.startsWith("texture_cube<"))&&t[a.group].push({binding:a.binding,visibility:Pn.FRAGMENT,texture:{sampleType:"float",viewDimension:"cube",multisampled:!1}})}for(let n=0;n<t.length;n++)t[n]||(t[n]=[]);return t}function Wb({groups:l}){const t=[];for(let n=0;n<l.length;n++){const a=l[n];t[a.group]||(t[a.group]={}),t[a.group][a.name]=a.binding}return t}function Zb(l,t){const n=new Set,a=new Set,r=[...l.structs,...t.structs].filter(c=>n.has(c.name)?!1:(n.add(c.name),!0)),u=[...l.groups,...t.groups].filter(c=>{const f=`${c.name}-${c.binding}`;return a.has(f)?!1:(a.add(f),!0)});return{structs:r,groups:u}}const Va=Object.create(null);class so{constructor(t){var f,m;this._layoutKey=0,this._attributeLocationsKey=0;const{fragment:n,vertex:a,layout:r,gpuLayout:u,name:c}=t;if(this.name=c,this.fragment=n,this.vertex=a,n.source===a.source){const p=Xc(n.source);this.structsAndGroups=p}else{const p=Xc(a.source),g=Xc(n.source);this.structsAndGroups=Zb(p,g)}this.layout=r??Wb(this.structsAndGroups),this.gpuLayout=u??Qb(this.structsAndGroups),this.autoAssignGlobalUniforms=((f=this.layout[0])==null?void 0:f.globalUniforms)!==void 0,this.autoAssignLocalUniforms=((m=this.layout[1])==null?void 0:m.localUniforms)!==void 0,this._generateProgramKey()}_generateProgramKey(){const{vertex:t,fragment:n}=this,a=t.source+n.source+t.entryPoint+n.entryPoint;this._layoutKey=Rh(a,"program")}get attributeData(){return this._attributeData??(this._attributeData=Fb(this.vertex)),this._attributeData}destroy(){this.gpuLayout=null,this.layout=null,this.structsAndGroups=null,this.fragment=null,this.vertex=null,Va[this._cacheKey]=null}static from(t){const n=`${t.vertex.source}:${t.fragment.source}:${t.fragment.entryPoint}:${t.vertex.entryPoint}`;return Va[n]||(Va[n]=new so(t),Va[n]._cacheKey=n),Va[n]}}const Qy=["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>"],Kb=Qy.reduce((l,t)=>(l[t]=!0,l),{});function Ib(l,t){switch(l){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 Wy=class Zy{constructor(t,n){this._touched=0,this.uid=Qt("uniform"),this._resourceType="uniformGroup",this._resourceId=Qt("resource"),this.isUniformGroup=!0,this._dirtyId=0,this.destroyed=!1,n={...Zy.defaultOptions,...n},this.uniformStructures=t;const a={};for(const r in t){const u=t[r];if(u.name=r,u.size=u.size??1,!Kb[u.type]){const c=u.type.match(/^array<(\w+(?:<\w+>)?),\s*(\d+)>$/);if(c){const[,f,m]=c;throw new Error(`Uniform type ${u.type} is not supported. Use type: '${f}', size: ${m} instead.`)}throw new Error(`Uniform type ${u.type} is not supported. Supported uniform types are: ${Qy.join(", ")}`)}u.value??(u.value=Ib(u.type,u.size)),a[r]=u.value}this.uniforms=a,this._dirtyId=1,this.ubo=n.ubo,this.isStatic=n.isStatic,this._signature=Rh(Object.keys(a).map(r=>`${r}-${t[r].type}`).join("-"),"uniform-group")}update(){this._dirtyId++}};Wy.defaultOptions={ubo:!1,isStatic:!1};let Ky=Wy;class Zr{constructor(t){this.resources=Object.create(null),this._dirty=!0;let n=0;for(const a in t){const r=t[a];this.setResource(r,n++)}this._updateKey()}_updateKey(){if(!this._dirty)return;this._dirty=!1;const t=[];let n=0;for(const a in this.resources)t[n++]=this.resources[a]._resourceId;this._key=t.join("|")}setResource(t,n){var r,u;const a=this.resources[n];t!==a&&((r=a==null?void 0:a.off)==null||r.call(a,"change",this.onResourceChange,this),(u=t.on)==null||u.call(t,"change",this.onResourceChange,this),this.resources[n]=t,this._dirty=!0)}getResource(t){return this.resources[t]}_touch(t,n){const a=this.resources;for(const r in a)a[r]._gcLastUsed=t,a[r]._touched=n}destroy(){var n;const t=this.resources;for(const a in t){const r=t[a];(n=r==null?void 0:r.off)==null||n.call(r,"change",this.onResourceChange,this)}this.resources=null}onResourceChange(t){this._dirty=!0,t.destroyed?this.destroy():this._updateKey()}}var oh=(l=>(l[l.WEBGL=1]="WEBGL",l[l.WEBGPU=2]="WEBGPU",l[l.CANVAS=4]="CANVAS",l[l.BOTH=3]="BOTH",l))(oh||{});class zh extends bi{constructor(t){super(),this.uid=Qt("shader"),this._uniformBindMap=Object.create(null),this._ownedBindGroups=[],this._destroyed=!1;let{gpuProgram:n,glProgram:a,groups:r,resources:u,compatibleRenderers:c,groupMap:f}=t;this.gpuProgram=n,this.glProgram=a,c===void 0&&(c=0,n&&(c|=oh.WEBGPU),a&&(c|=oh.WEBGL)),this.compatibleRenderers=c;const m={};if(!u&&!r&&(u={}),u&&r)throw new Error("[Shader] Cannot have both resources and groups");if(!n&&r&&!f)throw new Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");if(!n&&r&&f)for(const p in f)for(const g in f[p]){const x=f[p][g];m[x]={group:p,binding:g,name:x}}else if(n&&r&&!f){const p=n.structsAndGroups.groups;f={},p.forEach(g=>{f[g.group]=f[g.group]||{},f[g.group][g.binding]=g.name,m[g.name]=g})}else if(u){r={},f={},n&&n.structsAndGroups.groups.forEach(x=>{f[x.group]=f[x.group]||{},f[x.group][x.binding]=x.name,m[x.name]=x});let p=0;for(const g in u)m[g]||(r[99]||(r[99]=new Zr,this._ownedBindGroups.push(r[99])),m[g]={group:99,binding:p,name:g},f[99]=f[99]||{},f[99][p]=g,p++);for(const g in u){const x=g;let b=u[g];!b.source&&!b._resourceType&&(b=new Ky(b));const _=m[x];_&&(r[_.group]||(r[_.group]=new Zr,this._ownedBindGroups.push(r[_.group])),r[_.group].setResource(b,_.binding))}}this.groups=r,this._uniformBindMap=f,this.resources=this._buildResourceAccessor(r,m)}addResource(t,n,a){var r,u;(r=this._uniformBindMap)[n]||(r[n]={}),(u=this._uniformBindMap[n])[a]||(u[a]=t),this.groups[n]||(this.groups[n]=new Zr,this._ownedBindGroups.push(this.groups[n]))}_buildResourceAccessor(t,n){const a={};for(const r in n){const u=n[r];Object.defineProperty(a,u.name,{get(){return t[u.group].getResource(u.binding)},set(c){t[u.group].setResource(c,u.binding)}})}return a}destroy(t=!1){var n,a;this._destroyed||(this._destroyed=!0,this.emit("destroy",this),t&&((n=this.gpuProgram)==null||n.destroy(),(a=this.glProgram)==null||a.destroy()),this.gpuProgram=null,this.glProgram=null,this.removeAllListeners(),this._uniformBindMap=null,this._ownedBindGroups.forEach(r=>{r.destroy()}),this._ownedBindGroups=null,this.resources=null,this.groups=null)}static from(t){const{gpu:n,gl:a,...r}=t;let u,c;return n&&(u=so.from(n)),a&&(c=Fy.from(a)),new zh({gpuProgram:u,glProgram:c,...r})}}const Jb={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},qc=0,Vc=1,Pc=2,Fc=3,Qc=4,Wc=5,uh=class Iy{constructor(){this.data=0,this.blendMode="normal",this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<qc)}set blend(t){!!(this.data&1<<qc)!==t&&(this.data^=1<<qc)}get offsets(){return!!(this.data&1<<Vc)}set offsets(t){!!(this.data&1<<Vc)!==t&&(this.data^=1<<Vc)}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<<Pc)}set culling(t){!!(this.data&1<<Pc)!==t&&(this.data^=1<<Pc)}get depthTest(){return!!(this.data&1<<Fc)}set depthTest(t){!!(this.data&1<<Fc)!==t&&(this.data^=1<<Fc)}get depthMask(){return!!(this.data&1<<Wc)}set depthMask(t){!!(this.data&1<<Wc)!==t&&(this.data^=1<<Wc)}get clockwiseFrontFace(){return!!(this.data&1<<Qc)}set clockwiseFrontFace(t){!!(this.data&1<<Qc)!==t&&(this.data^=1<<Qc)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!=="none",this._blendMode=t,this._blendModeId=Jb[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 Iy;return t.depthTest=!1,t.blend=!0,t}};uh.default2d=uh.for2d();let Jy=uh;const ch=[];It.handleByNamedList(gt.Environment,ch);async function $b(l){if(!l)for(let t=0;t<ch.length;t++){const n=ch[t];if(n.value.test()){await n.value.load();return}}}let Pa;function tv(){if(typeof Pa=="boolean")return Pa;try{Pa=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{Pa=!1}return Pa}function Cg(l,t,n=2){const a=t&&t.length,r=a?t[0]*n:l.length;let u=$y(l,0,r,n,!0);const c=[];if(!u||u.next===u.prev)return c;let f,m,p;if(a&&(u=av(l,t,u,n)),l.length>80*n){f=l[0],m=l[1];let g=f,x=m;for(let b=n;b<r;b+=n){const _=l[b],S=l[b+1];_<f&&(f=_),S<m&&(m=S),_>g&&(g=_),S>x&&(x=S)}p=Math.max(g-f,x-m),p=p!==0?32767/p:0}return ll(u,c,n,f,m,p,0),c}function $y(l,t,n,a,r){let u;if(r===gv(l,t,n,a)>0)for(let c=t;c<n;c+=a)u=Mg(c/a|0,l[c],l[c+1],u);else for(let c=n-a;c>=t;c-=a)u=Mg(c/a|0,l[c],l[c+1],u);return u&&Fs(u,u.next)&&(ol(u),u=u.next),u}function Wn(l,t){if(!l)return l;t||(t=l);let n=l,a;do if(a=!1,!n.steiner&&(Fs(n,n.next)||Xt(n.prev,n,n.next)===0)){if(ol(n),n=t=n.prev,n===n.next)break;a=!0}else n=n.next;while(a||n!==t);return t}function ll(l,t,n,a,r,u,c){if(!l)return;!c&&u&&cv(l,a,r,u);let f=l;for(;l.prev!==l.next;){const m=l.prev,p=l.next;if(u?iv(l,a,r,u):ev(l)){t.push(m.i,l.i,p.i),ol(l),l=p.next,f=p.next;continue}if(l=p,l===f){c?c===1?(l=nv(Wn(l),t),ll(l,t,n,a,r,u,2)):c===2&&sv(l,t,n,a,r,u):ll(Wn(l),t,n,a,r,u,1);break}}}function ev(l){const t=l.prev,n=l,a=l.next;if(Xt(t,n,a)>=0)return!1;const r=t.x,u=n.x,c=a.x,f=t.y,m=n.y,p=a.y,g=Math.min(r,u,c),x=Math.min(f,m,p),b=Math.max(r,u,c),_=Math.max(f,m,p);let S=a.next;for(;S!==t;){if(S.x>=g&&S.x<=b&&S.y>=x&&S.y<=_&&Ja(r,f,u,m,c,p,S.x,S.y)&&Xt(S.prev,S,S.next)>=0)return!1;S=S.next}return!0}function iv(l,t,n,a){const r=l.prev,u=l,c=l.next;if(Xt(r,u,c)>=0)return!1;const f=r.x,m=u.x,p=c.x,g=r.y,x=u.y,b=c.y,_=Math.min(f,m,p),S=Math.min(g,x,b),A=Math.max(f,m,p),T=Math.max(g,x,b),w=hh(_,S,t,n,a),E=hh(A,T,t,n,a);let D=l.prevZ,O=l.nextZ;for(;D&&D.z>=w&&O&&O.z<=E;){if(D.x>=_&&D.x<=A&&D.y>=S&&D.y<=T&&D!==r&&D!==c&&Ja(f,g,m,x,p,b,D.x,D.y)&&Xt(D.prev,D,D.next)>=0||(D=D.prevZ,O.x>=_&&O.x<=A&&O.y>=S&&O.y<=T&&O!==r&&O!==c&&Ja(f,g,m,x,p,b,O.x,O.y)&&Xt(O.prev,O,O.next)>=0))return!1;O=O.nextZ}for(;D&&D.z>=w;){if(D.x>=_&&D.x<=A&&D.y>=S&&D.y<=T&&D!==r&&D!==c&&Ja(f,g,m,x,p,b,D.x,D.y)&&Xt(D.prev,D,D.next)>=0)return!1;D=D.prevZ}for(;O&&O.z<=E;){if(O.x>=_&&O.x<=A&&O.y>=S&&O.y<=T&&O!==r&&O!==c&&Ja(f,g,m,x,p,b,O.x,O.y)&&Xt(O.prev,O,O.next)>=0)return!1;O=O.nextZ}return!0}function nv(l,t){let n=l;do{const a=n.prev,r=n.next.next;!Fs(a,r)&&e0(a,n,n.next,r)&&rl(a,r)&&rl(r,a)&&(t.push(a.i,n.i,r.i),ol(n),ol(n.next),n=l=r),n=n.next}while(n!==l);return Wn(n)}function sv(l,t,n,a,r,u){let c=l;do{let f=c.next.next;for(;f!==c.prev;){if(c.i!==f.i&&dv(c,f)){let m=i0(c,f);c=Wn(c,c.next),m=Wn(m,m.next),ll(c,t,n,a,r,u,0),ll(m,t,n,a,r,u,0);return}f=f.next}c=c.next}while(c!==l)}function av(l,t,n,a){const r=[];for(let u=0,c=t.length;u<c;u++){const f=t[u]*a,m=u<c-1?t[u+1]*a:l.length,p=$y(l,f,m,a,!1);p===p.next&&(p.steiner=!0),r.push(fv(p))}r.sort(lv);for(let u=0;u<r.length;u++)n=rv(r[u],n);return n}function lv(l,t){let n=l.x-t.x;if(n===0&&(n=l.y-t.y,n===0)){const a=(l.next.y-l.y)/(l.next.x-l.x),r=(t.next.y-t.y)/(t.next.x-t.x);n=a-r}return n}function rv(l,t){const n=ov(l,t);if(!n)return t;const a=i0(n,l);return Wn(a,a.next),Wn(n,n.next)}function ov(l,t){let n=t;const a=l.x,r=l.y;let u=-1/0,c;if(Fs(l,n))return n;do{if(Fs(l,n.next))return n.next;if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){const x=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(x<=a&&x>u&&(u=x,c=n.x<n.next.x?n:n.next,x===a))return c}n=n.next}while(n!==t);if(!c)return null;const f=c,m=c.x,p=c.y;let g=1/0;n=c;do{if(a>=n.x&&n.x>=m&&a!==n.x&&t0(r<p?a:u,r,m,p,r<p?u:a,r,n.x,n.y)){const x=Math.abs(r-n.y)/(a-n.x);rl(n,l)&&(x<g||x===g&&(n.x>c.x||n.x===c.x&&uv(c,n)))&&(c=n,g=x)}n=n.next}while(n!==f);return c}function uv(l,t){return Xt(l.prev,l,t.prev)<0&&Xt(t.next,l,l.next)<0}function cv(l,t,n,a){let r=l;do r.z===0&&(r.z=hh(r.x,r.y,t,n,a)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==l);r.prevZ.nextZ=null,r.prevZ=null,hv(r)}function hv(l){let t,n=1;do{let a=l,r;l=null;let u=null;for(t=0;a;){t++;let c=a,f=0;for(let p=0;p<n&&(f++,c=c.nextZ,!!c);p++);let m=n;for(;f>0||m>0&&c;)f!==0&&(m===0||!c||a.z<=c.z)?(r=a,a=a.nextZ,f--):(r=c,c=c.nextZ,m--),u?u.nextZ=r:l=r,r.prevZ=u,u=r;a=c}u.nextZ=null,n*=2}while(t>1);return l}function hh(l,t,n,a,r){return l=(l-n)*r|0,t=(t-a)*r|0,l=(l|l<<8)&16711935,l=(l|l<<4)&252645135,l=(l|l<<2)&858993459,l=(l|l<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,l|t<<1}function fv(l){let t=l,n=l;do(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next;while(t!==l);return n}function t0(l,t,n,a,r,u,c,f){return(r-c)*(t-f)>=(l-c)*(u-f)&&(l-c)*(a-f)>=(n-c)*(t-f)&&(n-c)*(u-f)>=(r-c)*(a-f)}function Ja(l,t,n,a,r,u,c,f){return!(l===c&&t===f)&&t0(l,t,n,a,r,u,c,f)}function dv(l,t){return l.next.i!==t.i&&l.prev.i!==t.i&&!mv(l,t)&&(rl(l,t)&&rl(t,l)&&pv(l,t)&&(Xt(l.prev,l,t.prev)||Xt(l,t.prev,t))||Fs(l,t)&&Xt(l.prev,l,l.next)>0&&Xt(t.prev,t,t.next)>0)}function Xt(l,t,n){return(t.y-l.y)*(n.x-t.x)-(t.x-l.x)*(n.y-t.y)}function Fs(l,t){return l.x===t.x&&l.y===t.y}function e0(l,t,n,a){const r=Xr(Xt(l,t,n)),u=Xr(Xt(l,t,a)),c=Xr(Xt(n,a,l)),f=Xr(Xt(n,a,t));return!!(r!==u&&c!==f||r===0&&Yr(l,n,t)||u===0&&Yr(l,a,t)||c===0&&Yr(n,l,a)||f===0&&Yr(n,t,a))}function Yr(l,t,n){return t.x<=Math.max(l.x,n.x)&&t.x>=Math.min(l.x,n.x)&&t.y<=Math.max(l.y,n.y)&&t.y>=Math.min(l.y,n.y)}function Xr(l){return l>0?1:l<0?-1:0}function mv(l,t){let n=l;do{if(n.i!==l.i&&n.next.i!==l.i&&n.i!==t.i&&n.next.i!==t.i&&e0(n,n.next,l,t))return!0;n=n.next}while(n!==l);return!1}function rl(l,t){return Xt(l.prev,l,l.next)<0?Xt(l,t,l.next)>=0&&Xt(l,l.prev,t)>=0:Xt(l,t,l.prev)<0||Xt(l,l.next,t)<0}function pv(l,t){let n=l,a=!1;const r=(l.x+t.x)/2,u=(l.y+t.y)/2;do n.y>u!=n.next.y>u&&n.next.y!==n.y&&r<(n.next.x-n.x)*(u-n.y)/(n.next.y-n.y)+n.x&&(a=!a),n=n.next;while(n!==l);return a}function i0(l,t){const n=fh(l.i,l.x,l.y),a=fh(t.i,t.x,t.y),r=l.next,u=t.prev;return l.next=t,t.prev=l,n.next=r,r.prev=n,a.next=n,n.prev=a,u.next=a,a.prev=u,a}function Mg(l,t,n,a){const r=fh(l,t,n);return a?(r.next=a.next,r.prev=a,a.next.prev=r,a.next=r):(r.prev=r,r.next=r),r}function ol(l){l.next.prev=l.prev,l.prev.next=l.next,l.prevZ&&(l.prevZ.nextZ=l.nextZ),l.nextZ&&(l.nextZ.prevZ=l.prevZ)}function fh(l,t,n){return{i:l,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function gv(l,t,n,a){let r=0;for(let u=t,c=n-a;u<n;u+=a)r+=(l[c]-l[u])*(l[u+1]+l[c+1]),c=u;return r}const yv=Cg.default||Cg;var n0=(l=>(l[l.NONE=0]="NONE",l[l.COLOR=16384]="COLOR",l[l.STENCIL=1024]="STENCIL",l[l.DEPTH=256]="DEPTH",l[l.COLOR_DEPTH=16640]="COLOR_DEPTH",l[l.COLOR_STENCIL=17408]="COLOR_STENCIL",l[l.DEPTH_STENCIL=1280]="DEPTH_STENCIL",l[l.ALL=17664]="ALL",l))(n0||{});class xv{constructor(t){this.items=[],this._name=t}emit(t,n,a,r,u,c,f,m){const{name:p,items:g}=this;for(let x=0,b=g.length;x<b;x++)g[x][p](t,n,a,r,u,c,f,m);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 _v=["init","destroy","contextChange","resolutionChange","resetState","renderEnd","renderStart","render","update","postrender","prerender"],s0=class a0 extends bi{constructor(t){super(),this.tick=0,this.uid=Qt("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=[..._v,...this.config.runners??[]];this._addRunners(...n),this._unsafeEvalCheck()}async init(t={}){const n=t.skipExtensionImports===!0?!0:t.manageImports===!1;await $b(n),this._addSystems(this.config.systems),this._addPipes(this.config.renderPipes,this.config.renderPipeAdaptors);for(const a in this._systemsHash)t={...this._systemsHash[a].constructor.defaultOptions,...t};t={...a0.defaultOptions,...t},this._roundPixels=t.roundPixels?1:0;for(let a=0;a<this.runners.init.items.length;a++)await this.runners.init.items[a].init(t);this._initOptions=t}render(t,n){this.tick++;let a=t;if(a instanceof si&&(a={container:a},n&&(At(Ft,"passing a second argument is deprecated, please use render options instead"),a.target=n.renderTexture)),a.target||(a.target=this.view.renderTarget),a.target===this.view.renderTarget&&(this._lastObjectRendered=a.container,a.clearColor??(a.clearColor=this.background.colorRgba),a.clear??(a.clear=this.background.clearBeforeRender)),a.clearColor){const r=Array.isArray(a.clearColor)&&a.clearColor.length===4;a.clearColor=r?a.clearColor:ne.shared.setValue(a.clearColor).toArray()}a.transform||(a.container.updateLocalTransform(),a.transform=a.container.localTransform),a.container.visible&&(a.container.enableRenderGroup(),this.runners.prerender.emit(a),this.runners.renderStart.emit(a),this.runners.render.emit(a),this.runners.renderEnd.emit(a),this.runners.postrender.emit(a))}resize(t,n,a){const r=this.view.resolution;this.view.resize(t,n,a),this.emit("resize",this.view.screen.width,this.view.screen.height,this.view.resolution),a!==void 0&&a!==r&&this.runners.resolutionChange.emit(a)}clear(t={}){const n=this;t.target||(t.target=n.renderTarget.renderTarget),t.clearColor||(t.clearColor=this.background.colorRgba),t.clear??(t.clear=n0.ALL);const{clear:a,clearColor:r,target:u,mipLevel:c,layer:f}=t;ne.shared.setValue(r??this.background.colorRgba),n.renderTarget.clear(u,a,ne.shared.toArray(),c??0,f??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 xv(n)})}_addSystems(t){let n;for(n in t){const a=t[n];this._addSystem(a.value,a.name)}}_addSystem(t,n){const a=new t(this);if(this[n])throw new Error(`Whoops! The name "${n}" is already in use`);this[n]=a,this._systemsHash[n]=a;for(const r in this.runners)this.runners[r].add(a);return this}_addPipes(t,n){const a=n.reduce((r,u)=>(r[u.name]=u.value,r),{});t.forEach(r=>{const u=r.value,c=r.name,f=a[c];this.renderPipes[c]=new u(this,f?new f:null),this.runners.destroy.add(this.renderPipes[c])})}destroy(t=!1){this.runners.destroy.items.reverse(),this.runners.destroy.emit(t),(t===!0||typeof t=="object"&&t.releaseGlobalResources)&&hl.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(!tv())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()}};s0.defaultOptions={resolution:1,failIfMajorPerformanceCaveat:!1,roundPixels:!1};let l0=s0,qr;function bv(l){return qr!==void 0||(qr=(()=>{var n;const t={stencil:!0,failIfMajorPerformanceCaveat:l??l0.defaultOptions.failIfMajorPerformanceCaveat};try{if(!Xe.get().getWebGLRenderingContext())return!1;let r=Xe.get().createCanvas().getContext("webgl",t);const u=!!((n=r==null?void 0:r.getContextAttributes())!=null&&n.stencil);if(r){const c=r.getExtension("WEBGL_lose_context");c&&c.loseContext()}return r=null,u}catch{return!1}})()),qr}let Vr;async function vv(l={}){return Vr!==void 0||(Vr=await(async()=>{const t=Xe.get().getNavigator().gpu;if(!t)return!1;try{return await(await t.requestAdapter(l)).requestDevice(),!0}catch{return!1}})()),Vr}const Eg=["webgl","webgpu","canvas"];async function Sv(l){let t=[];l.preference?(t.push(l.preference),Eg.forEach(u=>{u!==l.preference&&t.push(u)})):t=Eg.slice();let n,a={};for(let u=0;u<t.length;u++){const c=t[u];if(c==="webgpu"&&await vv()){const{WebGPURenderer:f}=await $a(async()=>{const{WebGPURenderer:m}=await import("./WebGPURenderer-oCb_9bme.js");return{WebGPURenderer:m}},__vite__mapDeps([3,4,5,2]));n=f,a={...l,...l.webgpu};break}else if(c==="webgl"&&bv(l.failIfMajorPerformanceCaveat??l0.defaultOptions.failIfMajorPerformanceCaveat)){const{WebGLRenderer:f}=await $a(async()=>{const{WebGLRenderer:m}=await import("./WebGLRenderer-B2iuXG0A.js");return{WebGLRenderer:m}},__vite__mapDeps([6,4,5,2]));n=f,a={...l,...l.webgl};break}else if(c==="canvas"){const{CanvasRenderer:f}=await $a(async()=>{const{CanvasRenderer:m}=await import("./CanvasRenderer-Cu2-XlW0.js");return{CanvasRenderer:m}},__vite__mapDeps([7,5,2]));n=f,a={...l,...l.canvasOptions};break}}if(delete a.webgpu,delete a.webgl,delete a.canvasOptions,!n)throw new Error("No available renderer for the current environment");const r=new n;return await r.init(a),r}const r0="8.17.1";class o0{static init(){var t;(t=globalThis.__PIXI_APP_INIT__)==null||t.call(globalThis,this,r0)}static destroy(){}}o0.extension=gt.Application;class Tv{constructor(t){this._renderer=t}init(){var t;(t=globalThis.__PIXI_RENDERER_INIT__)==null||t.call(globalThis,this._renderer,r0)}destroy(){this._renderer=null}}Tv.extension={type:[gt.WebGLSystem,gt.WebGPUSystem],name:"initHook",priority:-10};class u0{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,a;if(this._resizeTo===globalThis.window)n=globalThis.innerWidth,a=globalThis.innerHeight;else{const{clientWidth:r,clientHeight:u}=this._resizeTo;n=r,a=u}this.renderer.resize(n,a),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}}u0.extension=gt.Application;class c0{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,Jr.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?Ys.shared:new Ys,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}c0.extension=gt.Application;It.add(u0);It.add(c0);const h0=class dh{constructor(...t){this.stage=new si,t[0]!==void 0&&At(Ft,"Application constructor options are deprecated, please use Application.init() instead.")}async init(t){t={...t},this.stage||(this.stage=new si),this.renderer=await Sv(t),dh._plugins.forEach(n=>{n.init.call(this,t)})}render(){this.renderer.render({container:this.stage})}get canvas(){return this.renderer.canvas}get view(){return At(Ft,"Application.view is deprecated, please use Application.canvas instead."),this.renderer.canvas}get screen(){return this.renderer.screen}destroy(t=!1,n=!1){const a=dh._plugins.slice(0);a.reverse(),a.forEach(r=>{r.destroy.call(this)}),this.stage.destroy(n),this.stage=null,this.renderer.destroy(t),this.renderer=null}};h0._plugins=[];let f0=h0;It.handleByList(gt.Application,f0._plugins);It.add(o0);var Zc,Rg;function Av(){if(Rg)return Zc;Rg=1,Zc=n;var l={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(u){var c=[];return u.replace(t,function(f,m,p){var g=m.toLowerCase();for(p=r(p),g=="m"&&p.length>2&&(c.push([m].concat(p.splice(0,2))),g="l",m=m=="m"?"l":"L");;){if(p.length==l[g])return p.unshift(m),c.push(p);if(p.length<l[g])throw new Error("malformed path data");c.push([m].concat(p.splice(0,l[g])))}}),c}var a=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function r(u){var c=u.match(a);return c?c.map(Number):[]}return Zc}var wv=Av();const Cv=Th(wv);function Mv(l,t){const n=Cv(l),a=[];let r=null,u=0,c=0;for(let f=0;f<n.length;f++){const m=n[f],p=m[0],g=m;switch(p){case"M":u=g[1],c=g[2],t.moveTo(u,c);break;case"m":u+=g[1],c+=g[2],t.moveTo(u,c);break;case"H":u=g[1],t.lineTo(u,c);break;case"h":u+=g[1],t.lineTo(u,c);break;case"V":c=g[1],t.lineTo(u,c);break;case"v":c+=g[1],t.lineTo(u,c);break;case"L":u=g[1],c=g[2],t.lineTo(u,c);break;case"l":u+=g[1],c+=g[2],t.lineTo(u,c);break;case"C":u=g[5],c=g[6],t.bezierCurveTo(g[1],g[2],g[3],g[4],u,c);break;case"c":t.bezierCurveTo(u+g[1],c+g[2],u+g[3],c+g[4],u+g[5],c+g[6]),u+=g[5],c+=g[6];break;case"S":u=g[3],c=g[4],t.bezierCurveToShort(g[1],g[2],u,c);break;case"s":t.bezierCurveToShort(u+g[1],c+g[2],u+g[3],c+g[4]),u+=g[3],c+=g[4];break;case"Q":u=g[3],c=g[4],t.quadraticCurveTo(g[1],g[2],u,c);break;case"q":t.quadraticCurveTo(u+g[1],c+g[2],u+g[3],c+g[4]),u+=g[3],c+=g[4];break;case"T":u=g[1],c=g[2],t.quadraticCurveToShort(u,c);break;case"t":u+=g[1],c+=g[2],t.quadraticCurveToShort(u,c);break;case"A":u=g[6],c=g[7],t.arcToSvg(g[1],g[2],g[3],g[4],g[5],u,c);break;case"a":u+=g[6],c+=g[7],t.arcToSvg(g[1],g[2],g[3],g[4],g[5],u,c);break;case"Z":case"z":t.closePath(),a.length>0&&(r=a.pop(),r?(u=r.startX,c=r.startY):(u=0,c=0)),r=null;break;default:ve(`Unknown SVG path command: ${p}`)}p!=="Z"&&p!=="z"&&r===null&&(r={startX:u,startY:c},a.push(r))}return t}class Dh{constructor(t=0,n=0,a=0){this.type="circle",this.x=t,this.y=n,this.radius=a}clone(){return new Dh(this.x,this.y,this.radius)}contains(t,n){if(this.radius<=0)return!1;const a=this.radius*this.radius;let r=this.x-t,u=this.y-n;return r*=r,u*=u,r+u<=a}strokeContains(t,n,a,r=.5){if(this.radius===0)return!1;const u=this.x-t,c=this.y-n,f=this.radius,m=(1-r)*a,p=Math.sqrt(u*u+c*c);return p<=f+m&&p>f-(a-m)}getBounds(t){return t||(t=new Kt),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 Bh{constructor(t=0,n=0,a=0,r=0){this.type="ellipse",this.x=t,this.y=n,this.halfWidth=a,this.halfHeight=r}clone(){return new Bh(this.x,this.y,this.halfWidth,this.halfHeight)}contains(t,n){if(this.halfWidth<=0||this.halfHeight<=0)return!1;let a=(t-this.x)/this.halfWidth,r=(n-this.y)/this.halfHeight;return a*=a,r*=r,a+r<=1}strokeContains(t,n,a,r=.5){const{halfWidth:u,halfHeight:c}=this;if(u<=0||c<=0)return!1;const f=a*(1-r),m=a-f,p=u-m,g=c-m,x=u+f,b=c+f,_=t-this.x,S=n-this.y,A=_*_/(p*p)+S*S/(g*g),T=_*_/(x*x)+S*S/(b*b);return A>1&&T<=1}getBounds(t){return t||(t=new Kt),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 Ev(l,t,n,a,r,u){const c=l-n,f=t-a,m=r-n,p=u-a,g=c*m+f*p,x=m*m+p*p;let b=-1;x!==0&&(b=g/x);let _,S;b<0?(_=n,S=a):b>1?(_=r,S=u):(_=n+b*m,S=a+b*p);const A=l-_,T=t-S;return A*A+T*T}let Rv,zv;class el{constructor(...t){this.type="polygon";let n=Array.isArray(t[0])?t[0]:t;if(typeof n[0]!="number"){const a=[];for(let r=0,u=n.length;r<u;r++)a.push(n[r].x,n[r].y);n=a}this.points=n,this.closePath=!0}isClockwise(){let t=0;const n=this.points,a=n.length;for(let r=0;r<a;r+=2){const u=n[r],c=n[r+1],f=n[(r+2)%a],m=n[(r+3)%a];t+=(f-u)*(m+c)}return t<0}containsPolygon(t){const n=this.getBounds(Rv),a=t.getBounds(zv);if(!n.containsRect(a))return!1;const r=t.points;for(let u=0;u<r.length;u+=2){const c=r[u],f=r[u+1];if(!this.contains(c,f))return!1}return!0}clone(){const t=this.points.slice(),n=new el(t);return n.closePath=this.closePath,n}contains(t,n){let a=!1;const r=this.points.length/2;for(let u=0,c=r-1;u<r;c=u++){const f=this.points[u*2],m=this.points[u*2+1],p=this.points[c*2],g=this.points[c*2+1];m>n!=g>n&&t<(p-f)*((n-m)/(g-m))+f&&(a=!a)}return a}strokeContains(t,n,a,r=.5){const u=a*a,c=u*(1-r),f=u-c,{points:m}=this,p=m.length-(this.closePath?0:2);for(let g=0;g<p;g+=2){const x=m[g],b=m[g+1],_=m[(g+2)%m.length],S=m[(g+3)%m.length],A=Ev(t,n,x,b,_,S),T=Math.sign((_-x)*(n-b)-(S-b)*(t-x));if(A<=(T<0?f:c))return!0}return!1}getBounds(t){t||(t=new Kt);const n=this.points;let a=1/0,r=-1/0,u=1/0,c=-1/0;for(let f=0,m=n.length;f<m;f+=2){const p=n[f],g=n[f+1];a=p<a?p:a,r=p>r?p:r,u=g<u?g:u,c=g>c?g:c}return t.x=a,t.width=r-a,t.y=u,t.height=c-u,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 At("8.11.0","Polygon.lastX is deprecated, please use Polygon.lastX instead."),this.points[this.points.length-2]}get y(){return At("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 Pr=(l,t,n,a,r,u,c)=>{const f=l-n,m=t-a,p=Math.sqrt(f*f+m*m);return p>=r-u&&p<=r+c};class Oh{constructor(t=0,n=0,a=0,r=0,u=20){this.type="roundedRectangle",this.x=t,this.y=n,this.width=a,this.height=r,this.radius=u}getBounds(t){return t||(t=new Kt),t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}clone(){return new Oh(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 a=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(n>=this.y+a&&n<=this.y+this.height-a||t>=this.x+a&&t<=this.x+this.width-a)return!0;let r=t-(this.x+a),u=n-(this.y+a);const c=a*a;if(r*r+u*u<=c||(r=t-(this.x+this.width-a),r*r+u*u<=c)||(u=n-(this.y+this.height-a),r*r+u*u<=c)||(r=t-(this.x+a),r*r+u*u<=c))return!0}return!1}strokeContains(t,n,a,r=.5){const{x:u,y:c,width:f,height:m,radius:p}=this,g=a*(1-r),x=a-g,b=u+p,_=c+p,S=f-p*2,A=m-p*2,T=u+f,w=c+m;return(t>=u-g&&t<=u+x||t>=T-x&&t<=T+g)&&n>=_&&n<=_+A||(n>=c-g&&n<=c+x||n>=w-x&&n<=w+g)&&t>=b&&t<=b+S?!0:t<b&&n<_&&Pr(t,n,b,_,p,x,g)||t>T-p&&n<_&&Pr(t,n,T-p,_,p,x,g)||t>T-p&&n>w-p&&Pr(t,n,T-p,w-p,p,x,g)||t<b&&n>w-p&&Pr(t,n,b,w-p,p,x,g)}toString(){return`[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}const d0={};function Dv(l,t,n){let a=2166136261;for(let r=0;r<t;r++)a^=l[r].uid,a=Math.imul(a,16777619),a>>>=0;return d0[a]||Bv(l,t,a,n)}function Bv(l,t,n,a){const r={};let u=0;for(let f=0;f<a;f++){const m=f<t?l[f]:Ut.EMPTY.source;r[u++]=m.source,r[u++]=m.style}const c=new Zr(r);return d0[n]=c,c}class zg{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 Dg(l,t,n,a){if(n??(n=0),a??(a=Math.min(l.byteLength-n,t.byteLength)),!(n&7)&&!(a&7)){const r=a/8;new Float64Array(t,0,r).set(new Float64Array(l,n,r))}else if(!(n&3)&&!(a&3)){const r=a/4;new Float32Array(t,0,r).set(new Float32Array(l,n,r))}else new Uint8Array(t).set(new Uint8Array(l,n,a))}const Ov={normal:"normal-npm",add:"add-npm",screen:"screen-npm"};var Gv=(l=>(l[l.DISABLED=0]="DISABLED",l[l.RENDERING_MASK_ADD=1]="RENDERING_MASK_ADD",l[l.MASK_ACTIVE=2]="MASK_ACTIVE",l[l.INVERSE_MASK_ACTIVE=3]="INVERSE_MASK_ACTIVE",l[l.RENDERING_MASK_REMOVE=4]="RENDERING_MASK_REMOVE",l[l.NONE=5]="NONE",l))(Gv||{});function Bg(l,t){return t.alphaMode==="no-premultiply-alpha"&&Ov[l]||l}const Uv=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
72
+ `);function Nv(l){let t="";for(let n=0;n<l;++n)n>0&&(t+=`
73
+ else `),n<l-1&&(t+=`if(test == ${n}.0){}`);return t}function kv(l,t){if(l===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const n=t.createShader(t.FRAGMENT_SHADER);try{for(;;){const a=Uv.replace(/%forloop%/gi,Nv(l));if(t.shaderSource(n,a),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))l=l/2|0;else break}}finally{t.deleteShader(n)}return l}let Us=null;function Hv(){var t;if(Us)return Us;const l=Vy();return Us=l.getParameter(l.MAX_TEXTURE_IMAGE_UNITS),Us=kv(Us,l),(t=l.getExtension("WEBGL_lose_context"))==null||t.loseContext(),Us}class Lv{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 jv{constructor(){this.renderPipeId="batch",this.action="startBatch",this.start=0,this.size=0,this.textures=new Lv,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 il=[];let $r=0;hl.register({clear:()=>{if(il.length>0)for(const l of il)l&&l.destroy();il.length=0,$r=0}});function Og(){return $r>0?il[--$r]:new jv}function Gg(l){l.elements=null,il[$r++]=l}let Fa=0;const m0=class p0{constructor(t){this.uid=Qt("batcher"),this.dirty=!0,this.batchIndex=0,this.batches=[],this._elements=[],t={...p0.defaultOptions,...t},t.maxTextures||(At("v8.8.0","maxTextures is a required option for Batcher now, please pass it in the options"),t.maxTextures=Hv());const{maxTextures:n,attributesInitialSize:a,indicesInitialSize:r}=t;this.attributeBuffer=new zg(a*4),this.indexBuffer=new Uint16Array(r),this.maxTextures=n}begin(){this.elementSize=0,this.elementStart=0,this.indexSize=0,this.attributeSize=0;for(let t=0;t<this.batchIndex;t++)Gg(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 a=t._batch.textures.ids[n._source.uid];return!a&&a!==0?!1:(t._textureId=a,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 a=Og(),r=a.textures;r.clear();const u=n[this.elementStart];let c=Bg(u.blendMode,u.texture._source),f=u.topology;this.attributeSize*4>this.attributeBuffer.size&&this._resizeAttributeBuffer(this.attributeSize*4),this.indexSize>this.indexBuffer.length&&this._resizeIndexBuffer(this.indexSize);const m=this.attributeBuffer.float32View,p=this.attributeBuffer.uint32View,g=this.indexBuffer;let x=this._batchIndexSize,b=this._batchIndexStart,_="startBatch",S=[];const A=this.maxTextures;for(let T=this.elementStart;T<this.elementSize;++T){const w=n[T];n[T]=null;const D=w.texture._source,O=Bg(w.blendMode,D),q=c!==O||f!==w.topology;if(D._batchTick===Fa&&!q){w._textureId=D._textureBindLocation,x+=w.indexSize,w.packAsQuad?(this.packQuadAttributes(w,m,p,w._attributeStart,w._textureId),this.packQuadIndex(g,w._indexStart,w._attributeStart/this.vertexSize)):(this.packAttributes(w,m,p,w._attributeStart,w._textureId),this.packIndex(w,g,w._indexStart,w._attributeStart/this.vertexSize)),w._batch=a,S.push(w);continue}D._batchTick=Fa,(r.count>=A||q)&&(this._finishBatch(a,b,x-b,r,c,f,t,_,S),_="renderBatch",b=x,c=O,f=w.topology,a=Og(),r=a.textures,r.clear(),S=[],++Fa),w._textureId=D._textureBindLocation=r.count,r.ids[D.uid]=r.count,r.textures[r.count++]=D,w._batch=a,S.push(w),x+=w.indexSize,w.packAsQuad?(this.packQuadAttributes(w,m,p,w._attributeStart,w._textureId),this.packQuadIndex(g,w._indexStart,w._attributeStart/this.vertexSize)):(this.packAttributes(w,m,p,w._attributeStart,w._textureId),this.packIndex(w,g,w._indexStart,w._attributeStart/this.vertexSize))}r.count>0&&(this._finishBatch(a,b,x-b,r,c,f,t,_,S),b=x,++Fa),this.elementStart=this.elementSize,this._batchIndexStart=b,this._batchIndexSize=x}_finishBatch(t,n,a,r,u,c,f,m,p){t.gpuBindGroup=null,t.bindGroup=null,t.action=m,t.batcher=this,t.textures=r,t.blendMode=u,t.topology=c,t.start=n,t.size=a,t.elements=p,++Fa,this.batches[this.batchIndex++]=t,f.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),a=new zg(n);Dg(this.attributeBuffer.rawBinaryData,a.rawBinaryData),this.attributeBuffer=a}_resizeIndexBuffer(t){const n=this.indexBuffer;let a=Math.max(t,n.length*1.5);a+=a%2;const r=a>65535?new Uint32Array(a):new Uint16Array(a);if(r.BYTES_PER_ELEMENT!==n.BYTES_PER_ELEMENT)for(let u=0;u<n.length;u++)r[u]=n[u];else Dg(n.buffer,r.buffer);this.indexBuffer=r}packQuadIndex(t,n,a){t[n]=a+0,t[n+1]=a+1,t[n+2]=a+2,t[n+3]=a+0,t[n+4]=a+2,t[n+5]=a+3}packIndex(t,n,a,r){const u=t.indices,c=t.indexSize,f=t.indexOffset,m=t.attributeOffset;for(let p=0;p<c;p++)n[a++]=r+u[p+f]-m}destroy(t={}){var n;if(this.batches!==null){for(let a=0;a<this.batchIndex;a++)Gg(this.batches[a]);this.batches=null,this.geometry.destroy(!0),this.geometry=null,t.shader&&((n=this.shader)==null||n.destroy(),this.shader=null);for(let a=0;a<this._elements.length;a++)this._elements[a]&&(this._elements[a]._batch=null);this._elements=null,this.indexBuffer=null,this.attributeBuffer.destroy(),this.attributeBuffer=null}}};m0.defaultOptions={maxTextures:null,attributesInitialSize:4,indicesInitialSize:6};let Yv=m0;var Re=(l=>(l[l.MAP_READ=1]="MAP_READ",l[l.MAP_WRITE=2]="MAP_WRITE",l[l.COPY_SRC=4]="COPY_SRC",l[l.COPY_DST=8]="COPY_DST",l[l.INDEX=16]="INDEX",l[l.VERTEX=32]="VERTEX",l[l.UNIFORM=64]="UNIFORM",l[l.STORAGE=128]="STORAGE",l[l.INDIRECT=256]="INDIRECT",l[l.QUERY_RESOLVE=512]="QUERY_RESOLVE",l[l.STATIC=1024]="STATIC",l))(Re||{});class ul extends bi{constructor(t){let{data:n,size:a}=t;const{usage:r,label:u,shrinkToFit:c}=t;super(),this._gpuData=Object.create(null),this._gcLastUsed=-1,this.autoGarbageCollect=!0,this.uid=Qt("buffer"),this._resourceType="buffer",this._resourceId=Qt("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,a??(a=n==null?void 0:n.byteLength);const f=!!n;this.descriptor={size:a,usage:r,mappedAtCreation:f,label:u},this.shrinkToFit=c??!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&Re.STATIC)}set static(t){t?this.descriptor.usage|=Re.STATIC:this.descriptor.usage&=~Re.STATIC}setDataWithSize(t,n,a){if(this._updateID++,this._updateSize=n*t.BYTES_PER_ELEMENT,this._data===t){a&&this.emit("update",this);return}const r=this._data;if(this._data=t,this._dataInt32=null,!r||r.length!==t.length){!this.shrinkToFit&&r&&t.byteLength<r.byteLength?a&&this.emit("update",this):(this.descriptor.size=t.byteLength,this._resourceId=Qt("resource"),this.emit("change",this));return}a&&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 g0(l,t){if(!(l instanceof ul)){let n=t?Re.INDEX:Re.VERTEX;l instanceof Array&&(t?(l=new Uint32Array(l),n=Re.INDEX|Re.COPY_DST):(l=new Float32Array(l),n=Re.VERTEX|Re.COPY_DST)),l=new ul({data:l,label:t?"index-mesh-buffer":"vertex-mesh-buffer",usage:n})}return l}function Xv(l,t,n){const a=l.getAttribute(t);if(!a)return n.minX=0,n.minY=0,n.maxX=0,n.maxY=0,n;const r=a.buffer.data;let u=1/0,c=1/0,f=-1/0,m=-1/0;const p=r.BYTES_PER_ELEMENT,g=(a.offset||0)/p,x=(a.stride||8)/p;for(let b=g;b<r.length;b+=x){const _=r[b],S=r[b+1];_>f&&(f=_),S>m&&(m=S),_<u&&(u=_),S<c&&(c=S)}return n.minX=u,n.minY=c,n.maxX=f,n.maxY=m,n}function qv(l){return(l instanceof ul||Array.isArray(l)||l.BYTES_PER_ELEMENT)&&(l={buffer:l}),l.buffer=g0(l.buffer,!1),l}class Vv extends bi{constructor(t={}){super(),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=Qt("geometry"),this._layoutKey=0,this.instanceCount=1,this._bounds=new ni,this._boundsDirty=!0;const{attributes:n,indexBuffer:a,topology:r}=t;if(this.buffers=[],this.attributes={},n)for(const u in n)this.addAttribute(u,n[u]);this.instanceCount=t.instanceCount??1,a&&this.addIndex(a),this.topology=r||"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 a=qv(n);this.buffers.indexOf(a.buffer)===-1&&(this.buffers.push(a.buffer),a.buffer.on("update",this.onBufferUpdate,this),a.buffer.on("change",this.onBufferUpdate,this)),this.attributes[t]=a}addIndex(t){this.indexBuffer=g0(t,!0),this.buffers.push(this.indexBuffer)}get bounds(){return this._boundsDirty?(this._boundsDirty=!1,Xv(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(a=>a.destroy()),this.unload(),(n=this.indexBuffer)==null||n.destroy(),this.attributes=null,this.buffers=null,this.indexBuffer=null,this._bounds=null}}const Pv=new Float32Array(1),Fv=new Uint32Array(1);class Qv extends Vv{constructor(){const n=new ul({data:Pv,label:"attribute-batch-buffer",usage:Re.VERTEX|Re.COPY_DST,shrinkToFit:!1}),a=new ul({data:Fv,label:"index-batch-buffer",usage:Re.INDEX|Re.COPY_DST,shrinkToFit:!1}),r=24;super({attributes:{aPosition:{buffer:n,format:"float32x2",stride:r,offset:0},aUV:{buffer:n,format:"float32x2",stride:r,offset:8},aColor:{buffer:n,format:"unorm8x4",stride:r,offset:16},aTextureIdAndRound:{buffer:n,format:"uint16x2",stride:r,offset:20}},indexBuffer:a})}}function Ug(l,t,n){if(l)for(const a in l){const r=a.toLocaleLowerCase(),u=t[r];if(u){let c=l[a];a==="header"&&(c=c.replace(/@in\s+[^;]+;\s*/g,"").replace(/@out\s+[^;]+;\s*/g,"")),n&&u.push(`//----${n}----//`),u.push(c)}else ve(`${a} placement hook does not exist in shader`)}}const Wv=/\{\{(.*?)\}\}/g;function Ng(l){var a;const t={};return(((a=l.match(Wv))==null?void 0:a.map(r=>r.replace(/[{()}]/g,"")))??[]).forEach(r=>{t[r]=[]}),t}function kg(l,t){let n;const a=/@in\s+([^;]+);/g;for(;(n=a.exec(l))!==null;)t.push(n[1])}function Hg(l,t,n=!1){const a=[];kg(t,a),l.forEach(f=>{f.header&&kg(f.header,a)});const r=a;n&&r.sort();const u=r.map((f,m)=>` @location(${m}) ${f},`).join(`
74
+ `);let c=t.replace(/@in\s+[^;]+;\s*/g,"");return c=c.replace("{{in}}",`
75
+ ${u}
76
+ `),c}function Lg(l,t){let n;const a=/@out\s+([^;]+);/g;for(;(n=a.exec(l))!==null;)t.push(n[1])}function Zv(l){const n=/\b(\w+)\s*:/g.exec(l);return n?n[1]:""}function Kv(l){const t=/@.*?\s+/g;return l.replace(t,"")}function Iv(l,t){const n=[];Lg(t,n),l.forEach(m=>{m.header&&Lg(m.header,n)});let a=0;const r=n.sort().map(m=>m.indexOf("builtin")>-1?m:`@location(${a++}) ${m}`).join(`,
77
+ `),u=n.sort().map(m=>` var ${Kv(m)};`).join(`
78
+ `),c=`return VSOutput(
79
+ ${n.sort().map(m=>` ${Zv(m)}`).join(`,
80
+ `)});`;let f=t.replace(/@out\s+[^;]+;\s*/g,"");return f=f.replace("{{struct}}",`
81
+ ${r}
82
+ `),f=f.replace("{{start}}",`
83
+ ${u}
84
+ `),f=f.replace("{{return}}",`
85
+ ${c}
86
+ `),f}function jg(l,t){let n=l;for(const a in t){const r=t[a];r.join(`
87
+ `).length?n=n.replace(`{{${a}}}`,`//-----${a} START-----//
88
+ ${r.join(`
89
+ `)}
90
+ //----${a} FINISH----//`):n=n.replace(`{{${a}}}`,"")}return n}const bn=Object.create(null),Kc=new Map;let Jv=0;function $v({template:l,bits:t}){const n=y0(l,t);if(bn[n])return bn[n];const{vertex:a,fragment:r}=eS(l,t);return bn[n]=x0(a,r,t),bn[n]}function tS({template:l,bits:t}){const n=y0(l,t);return bn[n]||(bn[n]=x0(l.vertex,l.fragment,t)),bn[n]}function eS(l,t){const n=t.map(c=>c.vertex).filter(c=>!!c),a=t.map(c=>c.fragment).filter(c=>!!c);let r=Hg(n,l.vertex,!0);r=Iv(n,r);const u=Hg(a,l.fragment,!0);return{vertex:r,fragment:u}}function y0(l,t){return t.map(n=>(Kc.has(n)||Kc.set(n,Jv++),Kc.get(n))).sort((n,a)=>n-a).join("-")+l.vertex+l.fragment}function x0(l,t,n){const a=Ng(l),r=Ng(t);return n.forEach(u=>{Ug(u.vertex,a,u.name),Ug(u.fragment,r,u.name)}),{vertex:jg(l,a),fragment:jg(t,r)}}const iS=`
91
+ @in aPosition: vec2<f32>;
92
+ @in aUV: vec2<f32>;
93
+
94
+ @out @builtin(position) vPosition: vec4<f32>;
95
+ @out vUV : vec2<f32>;
96
+ @out vColor : vec4<f32>;
97
+
98
+ {{header}}
99
+
100
+ struct VSOutput {
101
+ {{struct}}
102
+ };
103
+
104
+ @vertex
105
+ fn main( {{in}} ) -> VSOutput {
106
+
107
+ var worldTransformMatrix = globalUniforms.uWorldTransformMatrix;
108
+ var modelMatrix = mat3x3<f32>(
109
+ 1.0, 0.0, 0.0,
110
+ 0.0, 1.0, 0.0,
111
+ 0.0, 0.0, 1.0
112
+ );
113
+ var position = aPosition;
114
+ var uv = aUV;
115
+
116
+ {{start}}
117
+
118
+ vColor = vec4<f32>(1., 1., 1., 1.);
119
+
120
+ {{main}}
121
+
122
+ vUV = uv;
123
+
124
+ var modelViewProjectionMatrix = globalUniforms.uProjectionMatrix * worldTransformMatrix * modelMatrix;
125
+
126
+ vPosition = vec4<f32>((modelViewProjectionMatrix * vec3<f32>(position, 1.0)).xy, 0.0, 1.0);
127
+
128
+ vColor *= globalUniforms.uWorldColorAlpha;
129
+
130
+ {{end}}
131
+
132
+ {{return}}
133
+ };
134
+ `,nS=`
135
+ @in vUV : vec2<f32>;
136
+ @in vColor : vec4<f32>;
137
+
138
+ {{header}}
139
+
140
+ @fragment
141
+ fn main(
142
+ {{in}}
143
+ ) -> @location(0) vec4<f32> {
144
+
145
+ {{start}}
146
+
147
+ var outColor:vec4<f32>;
148
+
149
+ {{main}}
150
+
151
+ var finalColor:vec4<f32> = outColor * vColor;
152
+
153
+ {{end}}
154
+
155
+ return finalColor;
156
+ };
157
+ `,sS=`
158
+ in vec2 aPosition;
159
+ in vec2 aUV;
160
+
161
+ out vec4 vColor;
162
+ out vec2 vUV;
163
+
164
+ {{header}}
165
+
166
+ void main(void){
167
+
168
+ mat3 worldTransformMatrix = uWorldTransformMatrix;
169
+ mat3 modelMatrix = mat3(
170
+ 1.0, 0.0, 0.0,
171
+ 0.0, 1.0, 0.0,
172
+ 0.0, 0.0, 1.0
173
+ );
174
+ vec2 position = aPosition;
175
+ vec2 uv = aUV;
176
+
177
+ {{start}}
178
+
179
+ vColor = vec4(1.);
180
+
181
+ {{main}}
182
+
183
+ vUV = uv;
184
+
185
+ mat3 modelViewProjectionMatrix = uProjectionMatrix * worldTransformMatrix * modelMatrix;
186
+
187
+ gl_Position = vec4((modelViewProjectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
188
+
189
+ vColor *= uWorldColorAlpha;
190
+
191
+ {{end}}
192
+ }
193
+ `,aS=`
194
+
195
+ in vec4 vColor;
196
+ in vec2 vUV;
197
+
198
+ out vec4 finalColor;
199
+
200
+ {{header}}
201
+
202
+ void main(void) {
203
+
204
+ {{start}}
205
+
206
+ vec4 outColor;
207
+
208
+ {{main}}
209
+
210
+ finalColor = outColor * vColor;
211
+
212
+ {{end}}
213
+ }
214
+ `,lS={name:"global-uniforms-bit",vertex:{header:`
215
+ struct GlobalUniforms {
216
+ uProjectionMatrix:mat3x3<f32>,
217
+ uWorldTransformMatrix:mat3x3<f32>,
218
+ uWorldColorAlpha: vec4<f32>,
219
+ uResolution: vec2<f32>,
220
+ }
221
+
222
+ @group(0) @binding(0) var<uniform> globalUniforms : GlobalUniforms;
223
+ `}},rS={name:"global-uniforms-bit",vertex:{header:`
224
+ uniform mat3 uProjectionMatrix;
225
+ uniform mat3 uWorldTransformMatrix;
226
+ uniform vec4 uWorldColorAlpha;
227
+ uniform vec2 uResolution;
228
+ `}};function oS({bits:l,name:t}){const n=$v({template:{fragment:nS,vertex:iS},bits:[lS,...l]});return so.from({name:t,vertex:{source:n.vertex,entryPoint:"main"},fragment:{source:n.fragment,entryPoint:"main"}})}function uS({bits:l,name:t}){return new Fy({name:t,...tS({template:{vertex:sS,fragment:aS},bits:[rS,...l]})})}const cS={name:"color-bit",vertex:{header:`
229
+ @in aColor: vec4<f32>;
230
+ `,main:`
231
+ vColor *= vec4<f32>(aColor.rgb * aColor.a, aColor.a);
232
+ `}},hS={name:"color-bit",vertex:{header:`
233
+ in vec4 aColor;
234
+ `,main:`
235
+ vColor *= vec4(aColor.rgb * aColor.a, aColor.a);
236
+ `}},Ic={};function fS(l){const t=[];if(l===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 a=0;a<l;a++)t.push(`@group(1) @binding(${n++}) var textureSource${a+1}: texture_2d<f32>;`),t.push(`@group(1) @binding(${n++}) var textureSampler${a+1}: sampler;`)}return t.join(`
237
+ `)}function dS(l){const t=[];if(l===1)t.push("outColor = textureSampleGrad(textureSource1, textureSampler1, vUV, uvDx, uvDy);");else{t.push("switch vTextureId {");for(let n=0;n<l;n++)n===l-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(`
238
+ `)}function mS(l){return Ic[l]||(Ic[l]={name:"texture-batch-bit",vertex:{header:`
239
+ @in aTextureIdAndRound: vec2<u32>;
240
+ @out @interpolate(flat) vTextureId : u32;
241
+ `,main:`
242
+ vTextureId = aTextureIdAndRound.y;
243
+ `,end:`
244
+ if(aTextureIdAndRound.x == 1)
245
+ {
246
+ vPosition = vec4<f32>(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
247
+ }
248
+ `},fragment:{header:`
249
+ @in @interpolate(flat) vTextureId: u32;
250
+
251
+ ${fS(l)}
252
+ `,main:`
253
+ var uvDx = dpdx(vUV);
254
+ var uvDy = dpdy(vUV);
255
+
256
+ ${dS(l)}
257
+ `}}),Ic[l]}const Jc={};function pS(l){const t=[];for(let n=0;n<l;n++)n>0&&t.push("else"),n<l-1&&t.push(`if(vTextureId < ${n}.5)`),t.push("{"),t.push(` outColor = texture(uTextures[${n}], vUV);`),t.push("}");return t.join(`
258
+ `)}function gS(l){return Jc[l]||(Jc[l]={name:"texture-batch-bit",vertex:{header:`
259
+ in vec2 aTextureIdAndRound;
260
+ out float vTextureId;
261
+
262
+ `,main:`
263
+ vTextureId = aTextureIdAndRound.y;
264
+ `,end:`
265
+ if(aTextureIdAndRound.x == 1.)
266
+ {
267
+ gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
268
+ }
269
+ `},fragment:{header:`
270
+ in float vTextureId;
271
+
272
+ uniform sampler2D uTextures[${l}];
273
+
274
+ `,main:`
275
+
276
+ ${pS(l)}
277
+ `}}),Jc[l]}const yS={name:"round-pixels-bit",vertex:{header:`
278
+ fn roundPixels(position: vec2<f32>, targetSize: vec2<f32>) -> vec2<f32>
279
+ {
280
+ return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
281
+ }
282
+ `}},xS={name:"round-pixels-bit",vertex:{header:`
283
+ vec2 roundPixels(vec2 position, vec2 targetSize)
284
+ {
285
+ return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
286
+ }
287
+ `}},Yg={};function _S(l){let t=Yg[l];if(t)return t;const n=new Int32Array(l);for(let a=0;a<l;a++)n[a]=a;return t=Yg[l]=new Ky({uTextures:{value:n,type:"i32",size:l}},{isStatic:!0}),t}class Xg extends zh{constructor(t){const n=uS({name:"batch",bits:[hS,gS(t),xS]}),a=oS({name:"batch",bits:[cS,mS(t),yS]});super({glProgram:n,gpuProgram:a,resources:{batchSamplers:_S(t)}}),this.maxTextures=t}}let Qa=null;const _0=class b0 extends Yv{constructor(t){super(t),this.geometry=new Qv,this.name=b0.extension.name,this.vertexSize=6,Qa??(Qa=new Xg(t.maxTextures)),this.shader=Qa}packAttributes(t,n,a,r,u){const c=u<<16|t.roundPixels&65535,f=t.transform,m=f.a,p=f.b,g=f.c,x=f.d,b=f.tx,_=f.ty,{positions:S,uvs:A}=t,T=t.color,w=t.attributeOffset,E=w+t.attributeSize;for(let D=w;D<E;D++){const O=D*2,q=S[O],k=S[O+1];n[r++]=m*q+g*k+b,n[r++]=x*k+p*q+_,n[r++]=A[O],n[r++]=A[O+1],a[r++]=T,a[r++]=c}}packQuadAttributes(t,n,a,r,u){const c=t.texture,f=t.transform,m=f.a,p=f.b,g=f.c,x=f.d,b=f.tx,_=f.ty,S=t.bounds,A=S.maxX,T=S.minX,w=S.maxY,E=S.minY,D=c.uvs,O=t.color,q=u<<16|t.roundPixels&65535;n[r+0]=m*T+g*E+b,n[r+1]=x*E+p*T+_,n[r+2]=D.x0,n[r+3]=D.y0,a[r+4]=O,a[r+5]=q,n[r+6]=m*A+g*E+b,n[r+7]=x*E+p*A+_,n[r+8]=D.x1,n[r+9]=D.y1,a[r+10]=O,a[r+11]=q,n[r+12]=m*A+g*w+b,n[r+13]=x*w+p*A+_,n[r+14]=D.x2,n[r+15]=D.y2,a[r+16]=O,a[r+17]=q,n[r+18]=m*T+g*w+b,n[r+19]=x*w+p*T+_,n[r+20]=D.x3,n[r+21]=D.y3,a[r+22]=O,a[r+23]=q}_updateMaxTextures(t){this.shader.maxTextures!==t&&(Qa=new Xg(t),this.shader=Qa)}destroy(){this.shader=null,super.destroy()}};_0.extension={type:[gt.Batcher],name:"default"};let bS=_0;class fl{constructor(t){this.items=Object.create(null);const{renderer:n,type:a,onUnload:r,priority:u,name:c}=t;this._renderer=n,n.gc.addResourceHash(this,"items",a,u??0),this._onUnload=r,this.name=c}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 r;if(!this.items[t.uid])return;const a=t._gpuData[this._renderer.uid];a&&((r=this._onUnload)==null||r.call(this,t,...n),a.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 vS(l,t,n,a,r,u,c,f=null){let m=0;n*=t,r*=u;const p=f.a,g=f.b,x=f.c,b=f.d,_=f.tx,S=f.ty;for(;m<c;){const A=l[n],T=l[n+1];a[r]=p*A+x*T+_,a[r+1]=g*A+b*T+S,r+=u,n+=t,m++}}function SS(l,t,n,a){let r=0;for(t*=n;r<a;)l[t]=0,l[t+1]=0,t+=n,r++}function v0(l,t,n,a,r){const u=t.a,c=t.b,f=t.c,m=t.d,p=t.tx,g=t.ty;n||(n=0),a||(a=2),r||(r=l.length/a-n);let x=n*a;for(let b=0;b<r;b++){const _=l[x],S=l[x+1];l[x]=u*_+f*S+p,l[x+1]=c*_+m*S+g,x+=a}}const TS=new vt;class Gh{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,a=this.renderable;return a?wy(n,a.groupColor)+(this.alpha*a.groupAlpha*255<<24):n+(this.alpha*255<<24)}get transform(){var t;return((t=this.renderable)==null?void 0:t.groupTransform)||TS}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 cl={extension:{type:gt.ShapeBuilder,name:"circle"},build(l,t){let n,a,r,u,c,f;if(l.type==="circle"){const O=l;if(c=f=O.radius,c<=0)return!1;n=O.x,a=O.y,r=u=0}else if(l.type==="ellipse"){const O=l;if(c=O.halfWidth,f=O.halfHeight,c<=0||f<=0)return!1;n=O.x,a=O.y,r=u=0}else{const O=l,q=O.width/2,k=O.height/2;n=O.x+q,a=O.y+k,c=f=Math.max(0,Math.min(O.radius,Math.min(q,k))),r=q-c,u=k-f}if(r<0||u<0)return!1;const m=Math.ceil(2.3*Math.sqrt(c+f)),p=m*8+(r?4:0)+(u?4:0);if(p===0)return!1;if(m===0)return t[0]=t[6]=n+r,t[1]=t[3]=a+u,t[2]=t[4]=n-r,t[5]=t[7]=a-u,!0;let g=0,x=m*4+(r?2:0)+2,b=x,_=p,S=r+c,A=u,T=n+S,w=n-S,E=a+A;if(t[g++]=T,t[g++]=E,t[--x]=E,t[--x]=w,u){const O=a-A;t[b++]=w,t[b++]=O,t[--_]=O,t[--_]=T}for(let O=1;O<m;O++){const q=Math.PI/2*(O/m),k=r+Math.cos(q)*c,G=u+Math.sin(q)*f,$=n+k,Q=n-k,W=a+G,K=a-G;t[g++]=$,t[g++]=W,t[--x]=W,t[--x]=Q,t[b++]=Q,t[b++]=K,t[--_]=K,t[--_]=$}S=r,A=u+f,T=n+S,w=n-S,E=a+A;const D=a-A;return t[g++]=T,t[g++]=E,t[--_]=D,t[--_]=T,r&&(t[g++]=w,t[g++]=E,t[--_]=D,t[--_]=w),!0},triangulate(l,t,n,a,r,u){if(l.length===0)return;let c=0,f=0;for(let g=0;g<l.length;g+=2)c+=l[g],f+=l[g+1];c/=l.length/2,f/=l.length/2;let m=a;t[m*n]=c,t[m*n+1]=f;const p=m++;for(let g=0;g<l.length;g+=2)t[m*n]=l[g],t[m*n+1]=l[g+1],g>0&&(r[u++]=m,r[u++]=p,r[u++]=m-1),m++;r[u++]=p+1,r[u++]=p,r[u++]=m-1}},AS={...cl,extension:{...cl.extension,name:"ellipse"}},wS={...cl,extension:{...cl.extension,name:"roundedRectangle"}},S0=1e-4,qg=1e-4;function CS(l){const t=l.length;if(t<6)return 1;let n=0;for(let a=0,r=l[t-2],u=l[t-1];a<t;a+=2){const c=l[a],f=l[a+1];n+=(c-r)*(f+u),r=c,u=f}return n<0?-1:1}function Vg(l,t,n,a,r,u,c,f){const m=l-n*r,p=t-a*r,g=l+n*u,x=t+a*u;let b,_;c?(b=a,_=-n):(b=-a,_=n);const S=m+b,A=p+_,T=g+b,w=x+_;return f.push(S,A),f.push(T,w),2}function Ln(l,t,n,a,r,u,c,f){const m=n-l,p=a-t;let g=Math.atan2(m,p),x=Math.atan2(r-l,u-t);f&&g<x?g+=Math.PI*2:!f&&g>x&&(x+=Math.PI*2);let b=g;const _=x-g,S=Math.abs(_),A=Math.sqrt(m*m+p*p),T=(15*S*Math.sqrt(A)/Math.PI>>0)+1,w=_/T;if(b+=w,f){c.push(l,t),c.push(n,a);for(let E=1,D=b;E<T;E++,D+=w)c.push(l,t),c.push(l+Math.sin(D)*A,t+Math.cos(D)*A);c.push(l,t),c.push(r,u)}else{c.push(n,a),c.push(l,t);for(let E=1,D=b;E<T;E++,D+=w)c.push(l+Math.sin(D)*A,t+Math.cos(D)*A),c.push(l,t);c.push(r,u),c.push(l,t)}return T*2}function MS(l,t,n,a,r,u){const c=S0;if(l.length===0)return;const f=t;let m=f.alignment;if(t.alignment!==.5){let Z=CS(l);m=(m-.5)*Z+.5}const p=new ge(l[0],l[1]),g=new ge(l[l.length-2],l[l.length-1]),x=a,b=Math.abs(p.x-g.x)<c&&Math.abs(p.y-g.y)<c;if(x){l=l.slice(),b&&(l.pop(),l.pop(),g.set(l[l.length-2],l[l.length-1]));const Z=(p.x+g.x)*.5,at=(g.y+p.y)*.5;l.unshift(Z,at),l.push(Z,at)}const _=r,S=l.length/2;let A=l.length;const T=_.length/2,w=f.width/2,E=w*w,D=f.miterLimit*f.miterLimit;let O=l[0],q=l[1],k=l[2],G=l[3],$=0,Q=0,W=-(q-G),K=O-k,J=0,it=0,nt=Math.sqrt(W*W+K*K);W/=nt,K/=nt,W*=w,K*=w;const Tt=m,z=(1-Tt)*2,L=Tt*2;x||(f.cap==="round"?A+=Ln(O-W*(z-L)*.5,q-K*(z-L)*.5,O-W*z,q-K*z,O+W*L,q+K*L,_,!0)+2:f.cap==="square"&&(A+=Vg(O,q,W,K,z,L,!0,_))),_.push(O-W*z,q-K*z),_.push(O+W*L,q+K*L);for(let Z=1;Z<S-1;++Z){O=l[(Z-1)*2],q=l[(Z-1)*2+1],k=l[Z*2],G=l[Z*2+1],$=l[(Z+1)*2],Q=l[(Z+1)*2+1],W=-(q-G),K=O-k,nt=Math.sqrt(W*W+K*K),W/=nt,K/=nt,W*=w,K*=w,J=-(G-Q),it=k-$,nt=Math.sqrt(J*J+it*it),J/=nt,it/=nt,J*=w,it*=w;const at=k-O,M=q-G,Y=k-$,F=Q-G,I=at*Y+M*F,rt=M*Y-F*at,ct=rt<0;if(Math.abs(rt)<.001*Math.abs(I)){_.push(k-W*z,G-K*z),_.push(k+W*L,G+K*L),I>=0&&(f.join==="round"?A+=Ln(k,G,k-W*z,G-K*z,k-J*z,G-it*z,_,!1)+4:A+=2,_.push(k-J*L,G-it*L),_.push(k+J*z,G+it*z));continue}const ft=(-W+O)*(-K+G)-(-W+k)*(-K+q),Ht=(-J+$)*(-it+G)-(-J+k)*(-it+Q),Mt=(at*Ht-Y*ft)/rt,qe=(F*ft-M*Ht)/rt,Fi=(Mt-k)*(Mt-k)+(qe-G)*(qe-G),li=k+(Mt-k)*z,di=G+(qe-G)*z,ye=k-(Mt-k)*L,ri=G-(qe-G)*L,Qs=Math.min(at*at+M*M,Y*Y+F*F),dl=ct?z:L,ml=Qs+dl*dl*E;Fi<=ml?f.join==="bevel"||Fi/E>D?(ct?(_.push(li,di),_.push(k+W*L,G+K*L),_.push(li,di),_.push(k+J*L,G+it*L)):(_.push(k-W*z,G-K*z),_.push(ye,ri),_.push(k-J*z,G-it*z),_.push(ye,ri)),A+=2):f.join==="round"?ct?(_.push(li,di),_.push(k+W*L,G+K*L),A+=Ln(k,G,k+W*L,G+K*L,k+J*L,G+it*L,_,!0)+4,_.push(li,di),_.push(k+J*L,G+it*L)):(_.push(k-W*z,G-K*z),_.push(ye,ri),A+=Ln(k,G,k-W*z,G-K*z,k-J*z,G-it*z,_,!1)+4,_.push(k-J*z,G-it*z),_.push(ye,ri)):(_.push(li,di),_.push(ye,ri)):(_.push(k-W*z,G-K*z),_.push(k+W*L,G+K*L),f.join==="round"?ct?A+=Ln(k,G,k+W*L,G+K*L,k+J*L,G+it*L,_,!0)+2:A+=Ln(k,G,k-W*z,G-K*z,k-J*z,G-it*z,_,!1)+2:f.join==="miter"&&Fi/E<=D&&(ct?(_.push(ye,ri),_.push(ye,ri)):(_.push(li,di),_.push(li,di)),A+=2),_.push(k-J*z,G-it*z),_.push(k+J*L,G+it*L),A+=2)}O=l[(S-2)*2],q=l[(S-2)*2+1],k=l[(S-1)*2],G=l[(S-1)*2+1],W=-(q-G),K=O-k,nt=Math.sqrt(W*W+K*K),W/=nt,K/=nt,W*=w,K*=w,_.push(k-W*z,G-K*z),_.push(k+W*L,G+K*L),x||(f.cap==="round"?A+=Ln(k-W*(z-L)*.5,G-K*(z-L)*.5,k-W*z,G-K*z,k+W*L,G+K*L,_,!1)+2:f.cap==="square"&&(A+=Vg(k,G,W,K,z,L,!1,_)));const et=qg*qg;for(let Z=T;Z<A+T-2;++Z)O=_[Z*2],q=_[Z*2+1],k=_[(Z+1)*2],G=_[(Z+1)*2+1],$=_[(Z+2)*2],Q=_[(Z+2)*2+1],!(Math.abs(O*(G-Q)+k*(Q-q)+$*(q-G))<et)&&u.push(Z,Z+1,Z+2)}function ES(l,t,n,a){const r=S0;if(l.length===0)return;const u=l[0],c=l[1],f=l[l.length-2],m=l[l.length-1],p=t||Math.abs(u-f)<r&&Math.abs(c-m)<r,g=n,x=l.length/2,b=g.length/2;for(let _=0;_<x;_++)g.push(l[_*2]),g.push(l[_*2+1]);for(let _=0;_<x-1;_++)a.push(b+_,b+_+1);p&&a.push(b+x-1,b)}function T0(l,t,n,a,r,u,c){const f=yv(l,t,2);if(!f)return;for(let p=0;p<f.length;p+=3)u[c++]=f[p]+r,u[c++]=f[p+1]+r,u[c++]=f[p+2]+r;let m=r*a;for(let p=0;p<l.length;p+=2)n[m]=l[p],n[m+1]=l[p+1],m+=a}const RS=[],zS={extension:{type:gt.ShapeBuilder,name:"polygon"},build(l,t){for(let n=0;n<l.points.length;n++)t[n]=l.points[n];return!0},triangulate(l,t,n,a,r,u){T0(l,RS,t,n,a,r,u)}},DS={extension:{type:gt.ShapeBuilder,name:"rectangle"},build(l,t){const n=l,a=n.x,r=n.y,u=n.width,c=n.height;return u>0&&c>0?(t[0]=a,t[1]=r,t[2]=a+u,t[3]=r,t[4]=a+u,t[5]=r+c,t[6]=a,t[7]=r+c,!0):!1},triangulate(l,t,n,a,r,u){let c=0;a*=n,t[a+c]=l[0],t[a+c+1]=l[1],c+=n,t[a+c]=l[2],t[a+c+1]=l[3],c+=n,t[a+c]=l[6],t[a+c+1]=l[7],c+=n,t[a+c]=l[4],t[a+c+1]=l[5],c+=n;const f=a/n;r[u++]=f,r[u++]=f+1,r[u++]=f+2,r[u++]=f+1,r[u++]=f+3,r[u++]=f+2}},BS={extension:{type:gt.ShapeBuilder,name:"triangle"},build(l,t){return t[0]=l.x,t[1]=l.y,t[2]=l.x2,t[3]=l.y2,t[4]=l.x3,t[5]=l.y3,!0},triangulate(l,t,n,a,r,u){let c=0;a*=n,t[a+c]=l[0],t[a+c+1]=l[1],c+=n,t[a+c]=l[2],t[a+c+1]=l[3],c+=n,t[a+c]=l[4],t[a+c+1]=l[5];const f=a/n;r[u++]=f,r[u++]=f+1,r[u++]=f+2}},Pg=[{offset:0,color:"white"},{offset:1,color:"black"}],Uh=class mh{constructor(...t){this.uid=Qt("fillGradient"),this._tick=0,this.type="linear",this.colorStops=[];let n=OS(t);n={...n.type==="radial"?mh.defaultRadialOptions:mh.defaultLinearOptions,...my(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(r=>{this.addColorStop(r.offset,r.color)})}addColorStop(t,n){return this.colorStops.push({offset:t,color:ne.shared.setValue(n).toHexa()}),this}buildLinearGradient(){if(this.texture)return;let{x:t,y:n}=this.start,{x:a,y:r}=this.end,u=a-t,c=r-n;const f=u<0||c<0;if(this._wrapMode==="clamp-to-edge"){if(u<0){const T=t;t=a,a=T,u*=-1}if(c<0){const T=n;n=r,r=T,c*=-1}}const m=this.colorStops.length?this.colorStops:Pg,p=this._textureSize,{canvas:g,context:x}=Qg(p,1),b=f?x.createLinearGradient(this._textureSize,0,0,0):x.createLinearGradient(0,0,this._textureSize,0);Fg(b,m),x.fillStyle=b,x.fillRect(0,0,p,1),this.texture=new Ut({source:new Ir({resource:g,addressMode:this._wrapMode})});const _=Math.sqrt(u*u+c*c),S=Math.atan2(c,u),A=new vt;A.scale(_/p,1),A.rotate(S),A.translate(t,n),this.textureSpace==="local"&&A.scale(p,p),this.transform=A}buildGradient(){this.texture||this._tick++,this.type==="linear"?this.buildLinearGradient():this.buildRadialGradient()}buildRadialGradient(){if(this.texture)return;const t=this.colorStops.length?this.colorStops:Pg,n=this._textureSize,{canvas:a,context:r}=Qg(n,n),{x:u,y:c}=this.center,{x:f,y:m}=this.outerCenter,p=this.innerRadius,g=this.outerRadius,x=f-g,b=m-g,_=n/(g*2),S=(u-x)*_,A=(c-b)*_,T=r.createRadialGradient(S,A,p*_,(f-x)*_,(m-b)*_,g*_);Fg(T,t),r.fillStyle=t[t.length-1].color,r.fillRect(0,0,n,n),r.fillStyle=T,r.translate(S,A),r.rotate(this.rotation),r.scale(1,this.scale),r.translate(-S,-A),r.fillRect(0,0,n,n),this.texture=new Ut({source:new Ir({resource:a,addressMode:this._wrapMode})});const w=new vt;w.scale(1/_,1/_),w.translate(x,b),this.textureSpace==="local"&&w.scale(n,n),this.transform=w}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}`}};Uh.defaultLinearOptions={start:{x:0,y:0},end:{x:0,y:1},colorStops:[],textureSpace:"local",type:"linear",textureSize:256,wrapMode:"clamp-to-edge"};Uh.defaultRadialOptions={center:{x:.5,y:.5},innerRadius:0,outerRadius:.5,colorStops:[],scale:1,textureSpace:"local",type:"radial",textureSize:256,wrapMode:"clamp-to-edge"};let Vi=Uh;function Fg(l,t){for(let n=0;n<t.length;n++){const a=t[n];l.addColorStop(a.offset,a.color)}}function Qg(l,t){const n=Xe.get().createCanvas(l,t),a=n.getContext("2d");return{canvas:n,context:a}}function OS(l){let t=l[0]??{};return(typeof t=="number"||l[1])&&(At("8.5.2","use options object instead"),t={type:"linear",start:{x:l[0],y:l[1]},end:{x:l[2],y:l[3]},textureSpace:l[4],textureSize:l[5]??Vi.defaultLinearOptions.textureSize}),t}const GS=new vt,US=new Kt;function NS(l,t,n,a){const r=t.matrix?l.copyFrom(t.matrix).invert():l.identity();if(t.textureSpace==="local"){const c=n.getBounds(US);t.width&&c.pad(t.width);const{x:f,y:m}=c,p=1/c.width,g=1/c.height,x=-f*p,b=-m*g,_=r.a,S=r.b,A=r.c,T=r.d;r.a*=p,r.b*=p,r.c*=g,r.d*=g,r.tx=x*_+b*A+r.tx,r.ty=x*S+b*T+r.ty}else r.translate(t.texture.frame.x,t.texture.frame.y),r.scale(1/t.texture.source.width,1/t.texture.source.height);const u=t.texture.source.style;return!(t.fill instanceof Vi)&&u.addressMode==="clamp-to-edge"&&(u.addressMode="repeat",u.update()),a&&r.append(GS.copyFrom(a).invert()),r}const ao={};It.handleByMap(gt.ShapeBuilder,ao);It.add(DS,zS,BS,cl,AS,wS);const kS=new Kt,HS=new vt;function LS(l,t){const{geometryData:n,batches:a}=t;a.length=0,n.indices.length=0,n.vertices.length=0,n.uvs.length=0;for(let r=0;r<l.instructions.length;r++){const u=l.instructions[r];if(u.action==="texture")jS(u.data,a,n);else if(u.action==="fill"||u.action==="stroke"){const c=u.action==="stroke",f=u.data.path.shapePath,m=u.data.style,p=u.data.hole;c&&p&&Wg(p.shapePath,m,!0,a,n),p&&(f.shapePrimitives[f.shapePrimitives.length-1].holes=p.shapePath.shapePrimitives),Wg(f,m,c,a,n)}}}function jS(l,t,n){const a=[],r=ao.rectangle,u=kS;u.x=l.dx,u.y=l.dy,u.width=l.dw,u.height=l.dh;const c=l.transform;if(!r.build(u,a))return;const{vertices:f,uvs:m,indices:p}=n,g=p.length,x=f.length/2;c&&v0(a,c),r.triangulate(a,f,2,x,p,g);const b=l.image,_=b.uvs;m.push(_.x0,_.y0,_.x1,_.y1,_.x3,_.y3,_.x2,_.y2);const S=ze.get(Gh);S.indexOffset=g,S.indexSize=p.length-g,S.attributeOffset=x,S.attributeSize=f.length/2-x,S.baseColor=l.style,S.alpha=l.alpha,S.texture=b,S.geometryData=n,t.push(S)}function Wg(l,t,n,a,r){const{vertices:u,uvs:c,indices:f}=r;l.shapePrimitives.forEach(({shape:m,transform:p,holes:g})=>{const x=[],b=ao[m.type];if(!b.build(m,x))return;const _=f.length,S=u.length/2;let A="triangle-list";if(p&&v0(x,p),n){const D=m.closePath??!0,O=t;O.pixelLine?(ES(x,D,u,f),A="line-list"):MS(x,O,!1,D,u,f)}else if(g){const D=[],O=x.slice();YS(g).forEach(k=>{D.push(O.length/2),O.push(...k)}),T0(O,D,u,2,S,f,_)}else b.triangulate(x,u,2,S,f,_);const T=c.length/2,w=t.texture;if(w!==Ut.WHITE){const D=NS(HS,t,m,p);vS(u,2,S,c,T,2,u.length/2-S,D)}else SS(c,T,2,u.length/2-S);const E=ze.get(Gh);E.indexOffset=_,E.indexSize=f.length-_,E.attributeOffset=S,E.attributeSize=u.length/2-S,E.baseColor=t.color,E.alpha=t.alpha,E.texture=w,E.geometryData=r,E.topology=A,a.push(E)})}function YS(l){const t=[];for(let n=0;n<l.length;n++){const a=l[n].shape,r=[];ao[a.type].build(a,r)&&t.push(r)}return t}class XS{constructor(){this.batches=[],this.geometryData={vertices:[],uvs:[],indices:[]}}reset(){this.batches&&this.batches.forEach(t=>{ze.return(t)}),this.graphicsData&&ze.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 qS{constructor(){this.instructions=new Mh}init(t){const n=t.maxTextures;this.batcher?this.batcher._updateMaxTextures(n):this.batcher=new bS({maxTextures:n}),this.instructions.reset()}get geometry(){return At(L1,"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 Nh=class ph{constructor(t){this._renderer=t,this._managedContexts=new fl({renderer:t,type:"resource",name:"graphicsContext"})}init(t){ph.defaultOptions.bezierSmoothness=(t==null?void 0:t.bezierSmoothness)??ph.defaultOptions.bezierSmoothness}getContextRenderData(t){return t._gpuData[this._renderer.uid].graphicsData||this._initContextRenderData(t)}updateGpuContext(t){const n=!!t._gpuData[this._renderer.uid],a=t._gpuData[this._renderer.uid]||this._initContext(t);if(t.dirty||!n){n&&a.reset(),LS(t,a);const r=t.batchMode;t.customShader||r==="no-batch"?a.isBatchable=!1:r==="auto"?a.isBatchable=a.geometryData.vertices.length<400:a.isBatchable=!0,t.dirty=!1}return a}getGpuContext(t){return t._gpuData[this._renderer.uid]||this._initContext(t)}_initContextRenderData(t){const n=ze.get(qS,{maxTextures:this._renderer.limits.maxBatchableTextures}),a=t._gpuData[this._renderer.uid],{batches:r,geometryData:u}=a;a.graphicsData=n;const c=u.vertices.length,f=u.indices.length;for(let x=0;x<r.length;x++)r[x].applyTransform=!1;const m=n.batcher;m.ensureAttributeBuffer(c),m.ensureIndexBuffer(f),m.begin();for(let x=0;x<r.length;x++){const b=r[x];m.add(b)}m.finish(n.instructions);const p=m.geometry;p.indexBuffer.setDataWithSize(m.indexBuffer,m.indexSize,!0),p.buffers[0].setDataWithSize(m.attributeBuffer.float32View,m.attributeSize,!0);const g=m.batches;for(let x=0;x<g.length;x++){const b=g[x];b.bindGroup=Dv(b.textures.textures,b.textures.count,this._renderer.limits.maxBatchableTextures)}return n}_initContext(t){const n=new XS;return n.context=t,t._gpuData[this._renderer.uid]=n,this._managedContexts.add(t),n}destroy(){this._managedContexts.destroy(),this._renderer=null}};Nh.extension={type:[gt.WebGLSystem,gt.WebGPUSystem],name:"graphicsContext"};Nh.defaultOptions={bezierSmoothness:.5};let kh=Nh;const VS=8,Fr=11920929e-14,PS=1;function A0(l,t,n,a,r,u,c,f,m,p){const x=Math.min(.99,Math.max(0,p??kh.defaultOptions.bezierSmoothness));let b=(PS-x)/1;return b*=b,FS(t,n,a,r,u,c,f,m,l,b),l}function FS(l,t,n,a,r,u,c,f,m,p){gh(l,t,n,a,r,u,c,f,m,p,0),m.push(c,f)}function gh(l,t,n,a,r,u,c,f,m,p,g){if(g>VS)return;const x=(l+n)/2,b=(t+a)/2,_=(n+r)/2,S=(a+u)/2,A=(r+c)/2,T=(u+f)/2,w=(x+_)/2,E=(b+S)/2,D=(_+A)/2,O=(S+T)/2,q=(w+D)/2,k=(E+O)/2;if(g>0){let G=c-l,$=f-t;const Q=Math.abs((n-c)*$-(a-f)*G),W=Math.abs((r-c)*$-(u-f)*G);if(Q>Fr&&W>Fr){if((Q+W)*(Q+W)<=p*(G*G+$*$)){m.push(q,k);return}}else if(Q>Fr){if(Q*Q<=p*(G*G+$*$)){m.push(q,k);return}}else if(W>Fr){if(W*W<=p*(G*G+$*$)){m.push(q,k);return}}else if(G=q-(l+c)/2,$=k-(t+f)/2,G*G+$*$<=p){m.push(q,k);return}}gh(l,t,x,b,w,E,q,k,m,p,g+1),gh(q,k,D,O,A,T,c,f,m,p,g+1)}const QS=8,WS=11920929e-14,ZS=1;function KS(l,t,n,a,r,u,c,f){const p=Math.min(.99,Math.max(0,f??kh.defaultOptions.bezierSmoothness));let g=(ZS-p)/1;return g*=g,IS(t,n,a,r,u,c,l,g),l}function IS(l,t,n,a,r,u,c,f){yh(c,l,t,n,a,r,u,f,0),c.push(r,u)}function yh(l,t,n,a,r,u,c,f,m){if(m>QS)return;const p=(t+a)/2,g=(n+r)/2,x=(a+u)/2,b=(r+c)/2,_=(p+x)/2,S=(g+b)/2;let A=u-t,T=c-n;const w=Math.abs((a-u)*T-(r-c)*A);if(w>WS){if(w*w<=f*(A*A+T*T)){l.push(_,S);return}}else if(A=_-(t+u)/2,T=S-(n+c)/2,A*A+T*T<=f){l.push(_,S);return}yh(l,t,n,p,g,_,S,f,m+1),yh(l,_,S,x,b,u,c,f,m+1)}function w0(l,t,n,a,r,u,c,f){let m=Math.abs(r-u);(!c&&r>u||c&&u>r)&&(m=2*Math.PI-m),f||(f=Math.max(6,Math.floor(6*Math.pow(a,1/3)*(m/Math.PI)))),f=Math.max(f,3);let p=m/f,g=r;p*=c?-1:1;for(let x=0;x<f+1;x++){const b=Math.cos(g),_=Math.sin(g),S=t+b*a,A=n+_*a;l.push(S,A),g+=p}}function JS(l,t,n,a,r,u){const c=l[l.length-2],m=l[l.length-1]-n,p=c-t,g=r-n,x=a-t,b=Math.abs(m*x-p*g);if(b<1e-8||u===0){(l[l.length-2]!==t||l[l.length-1]!==n)&&l.push(t,n);return}const _=m*m+p*p,S=g*g+x*x,A=m*g+p*x,T=u*Math.sqrt(_)/b,w=u*Math.sqrt(S)/b,E=T*A/_,D=w*A/S,O=T*x+w*p,q=T*g+w*m,k=p*(w+E),G=m*(w+E),$=x*(T+D),Q=g*(T+D),W=Math.atan2(G-q,k-O),K=Math.atan2(Q-q,$-O);w0(l,O+t,q+n,u,W,K,p*g>x*m)}const nl=Math.PI*2,$c={centerX:0,centerY:0,ang1:0,ang2:0},th=({x:l,y:t},n,a,r,u,c,f,m)=>{l*=n,t*=a;const p=r*l-u*t,g=u*l+r*t;return m.x=p+c,m.y=g+f,m};function $S(l,t){const n=t===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(t/4),a=t===1.5707963267948966?.551915024494:n,r=Math.cos(l),u=Math.sin(l),c=Math.cos(l+t),f=Math.sin(l+t);return[{x:r-u*a,y:u+r*a},{x:c+f*a,y:f-c*a},{x:c,y:f}]}const Zg=(l,t,n,a)=>{const r=l*a-t*n<0?-1:1;let u=l*n+t*a;return u>1&&(u=1),u<-1&&(u=-1),r*Math.acos(u)},t2=(l,t,n,a,r,u,c,f,m,p,g,x,b)=>{const _=Math.pow(r,2),S=Math.pow(u,2),A=Math.pow(g,2),T=Math.pow(x,2);let w=_*S-_*T-S*A;w<0&&(w=0),w/=_*T+S*A,w=Math.sqrt(w)*(c===f?-1:1);const E=w*r/u*x,D=w*-u/r*g,O=p*E-m*D+(l+n)/2,q=m*E+p*D+(t+a)/2,k=(g-E)/r,G=(x-D)/u,$=(-g-E)/r,Q=(-x-D)/u,W=Zg(1,0,k,G);let K=Zg(k,G,$,Q);f===0&&K>0&&(K-=nl),f===1&&K<0&&(K+=nl),b.centerX=O,b.centerY=q,b.ang1=W,b.ang2=K};function e2(l,t,n,a,r,u,c,f=0,m=0,p=0){if(u===0||c===0)return;const g=Math.sin(f*nl/360),x=Math.cos(f*nl/360),b=x*(t-a)/2+g*(n-r)/2,_=-g*(t-a)/2+x*(n-r)/2;if(b===0&&_===0)return;u=Math.abs(u),c=Math.abs(c);const S=Math.pow(b,2)/Math.pow(u,2)+Math.pow(_,2)/Math.pow(c,2);S>1&&(u*=Math.sqrt(S),c*=Math.sqrt(S)),t2(t,n,a,r,u,c,m,p,g,x,b,_,$c);let{ang1:A,ang2:T}=$c;const{centerX:w,centerY:E}=$c;let D=Math.abs(T)/(nl/4);Math.abs(1-D)<1e-7&&(D=1);const O=Math.max(Math.ceil(D),1);T/=O;let q=l[l.length-2],k=l[l.length-1];const G={x:0,y:0};for(let $=0;$<O;$++){const Q=$S(A,T),{x:W,y:K}=th(Q[0],u,c,x,g,w,E,G),{x:J,y:it}=th(Q[1],u,c,x,g,w,E,G),{x:nt,y:Tt}=th(Q[2],u,c,x,g,w,E,G);A0(l,q,k,W,K,J,it,nt,Tt),q=nt,k=Tt,A+=T}}function i2(l,t,n){const a=(c,f)=>{const m=f.x-c.x,p=f.y-c.y,g=Math.sqrt(m*m+p*p),x=m/g,b=p/g;return{len:g,nx:x,ny:b}},r=(c,f)=>{c===0?l.moveTo(f.x,f.y):l.lineTo(f.x,f.y)};let u=t[t.length-1];for(let c=0;c<t.length;c++){const f=t[c%t.length],m=f.radius??n;if(m<=0){r(c,f),u=f;continue}const p=t[(c+1)%t.length],g=a(f,u),x=a(f,p);if(g.len<1e-4||x.len<1e-4){r(c,f),u=f;continue}let b=Math.asin(g.nx*x.ny-g.ny*x.nx),_=1,S=!1;g.nx*x.nx-g.ny*-x.ny<0?b<0?b=Math.PI+b:(b=Math.PI-b,_=-1,S=!0):b>0&&(_=-1,S=!0);const A=b/2;let T,w=Math.abs(Math.cos(A)*m/Math.sin(A));w>Math.min(g.len/2,x.len/2)?(w=Math.min(g.len/2,x.len/2),T=Math.abs(w*Math.sin(A)/Math.cos(A))):T=m;const E=f.x+x.nx*w+-x.ny*T*_,D=f.y+x.ny*w+x.nx*T*_,O=Math.atan2(g.ny,g.nx)+Math.PI/2*_,q=Math.atan2(x.ny,x.nx)-Math.PI/2*_;c===0&&l.moveTo(E+Math.cos(O)*T,D+Math.sin(O)*T),l.arc(E,D,T,O,q,S),u=f}}function n2(l,t,n,a){const r=(f,m)=>Math.sqrt((f.x-m.x)**2+(f.y-m.y)**2),u=(f,m,p)=>({x:f.x+(m.x-f.x)*p,y:f.y+(m.y-f.y)*p}),c=t.length;for(let f=0;f<c;f++){const m=t[(f+1)%c],p=m.radius??n;if(p<=0){f===0?l.moveTo(m.x,m.y):l.lineTo(m.x,m.y);continue}const g=t[f],x=t[(f+2)%c],b=r(g,m);let _;if(b<1e-4)_=m;else{const T=Math.min(b/2,p);_=u(m,g,T/b)}const S=r(x,m);let A;if(S<1e-4)A=m;else{const T=Math.min(S/2,p);A=u(m,x,T/S)}f===0?l.moveTo(_.x,_.y):l.lineTo(_.x,_.y),l.quadraticCurveTo(m.x,m.y,A.x,A.y,a)}}const s2=new Kt;class a2{constructor(t){this.shapePrimitives=[],this._currentPoly=null,this._bounds=new ni,this._graphicsPath2D=t,this.signed=t.checkForHoles}moveTo(t,n){return this.startPoly(t,n),this}lineTo(t,n){this._ensurePoly();const a=this._currentPoly.points,r=a[a.length-2],u=a[a.length-1];return(r!==t||u!==n)&&a.push(t,n),this}arc(t,n,a,r,u,c){this._ensurePoly(!1);const f=this._currentPoly.points;return w0(f,t,n,a,r,u,c),this}arcTo(t,n,a,r,u){this._ensurePoly();const c=this._currentPoly.points;return JS(c,t,n,a,r,u),this}arcToSvg(t,n,a,r,u,c,f){const m=this._currentPoly.points;return e2(m,this._currentPoly.lastX,this._currentPoly.lastY,c,f,t,n,a,r,u),this}bezierCurveTo(t,n,a,r,u,c,f){this._ensurePoly();const m=this._currentPoly;return A0(this._currentPoly.points,m.lastX,m.lastY,t,n,a,r,u,c,f),this}quadraticCurveTo(t,n,a,r,u){this._ensurePoly();const c=this._currentPoly;return KS(this._currentPoly.points,c.lastX,c.lastY,t,n,a,r,u),this}closePath(){return this.endPoly(!0),this}addPath(t,n){this.endPoly(),n&&!n.isIdentity()&&(t=t.clone(!0),t.transform(n));const a=this.shapePrimitives,r=a.length;for(let u=0;u<t.instructions.length;u++){const c=t.instructions[u];this[c.action](...c.data)}if(t.checkForHoles&&a.length-r>1){let u=null;for(let c=r;c<a.length;c++){const f=a[c];if(f.shape.type==="polygon"){const m=f.shape,p=u==null?void 0:u.shape;p&&p.containsPolygon(m)?(u.holes||(u.holes=[]),u.holes.push(f),a.copyWithin(c,c+1),a.length--,c--):u=f}}}return this}finish(t=!1){this.endPoly(t)}rect(t,n,a,r,u){return this.drawShape(new Kt(t,n,a,r),u),this}circle(t,n,a,r){return this.drawShape(new Dh(t,n,a),r),this}poly(t,n,a){const r=new el(t);return r.closePath=n,this.drawShape(r,a),this}regularPoly(t,n,a,r,u=0,c){r=Math.max(r|0,3);const f=-1*Math.PI/2+u,m=Math.PI*2/r,p=[];for(let g=0;g<r;g++){const x=f-g*m;p.push(t+a*Math.cos(x),n+a*Math.sin(x))}return this.poly(p,!0,c),this}roundPoly(t,n,a,r,u,c=0,f){if(r=Math.max(r|0,3),u<=0)return this.regularPoly(t,n,a,r,c);const m=a*Math.sin(Math.PI/r)-.001;u=Math.min(u,m);const p=-1*Math.PI/2+c,g=Math.PI*2/r,x=(r-2)*Math.PI/r/2;for(let b=0;b<r;b++){const _=b*g+p,S=t+a*Math.cos(_),A=n+a*Math.sin(_),T=_+Math.PI+x,w=_-Math.PI-x,E=S+u*Math.cos(T),D=A+u*Math.sin(T),O=S+u*Math.cos(w),q=A+u*Math.sin(w);b===0?this.moveTo(E,D):this.lineTo(E,D),this.quadraticCurveTo(S,A,O,q,f)}return this.closePath()}roundShape(t,n,a=!1,r){return t.length<3?this:(a?n2(this,t,n,r):i2(this,t,n),this.closePath())}filletRect(t,n,a,r,u){if(u===0)return this.rect(t,n,a,r);const c=Math.min(a,r)/2,f=Math.min(c,Math.max(-c,u)),m=t+a,p=n+r,g=f<0?-f:0,x=Math.abs(f);return this.moveTo(t,n+x).arcTo(t+g,n+g,t+x,n,x).lineTo(m-x,n).arcTo(m-g,n+g,m,n+x,x).lineTo(m,p-x).arcTo(m-g,p-g,t+a-x,p,x).lineTo(t+x,p).arcTo(t+g,p-g,t,p-x,x).closePath()}chamferRect(t,n,a,r,u,c){if(u<=0)return this.rect(t,n,a,r);const f=Math.min(u,Math.min(a,r)/2),m=t+a,p=n+r,g=[t+f,n,m-f,n,m,n+f,m,p-f,m-f,p,t+f,p,t,p-f,t,n+f];for(let x=g.length-1;x>=2;x-=2)g[x]===g[x-2]&&g[x-1]===g[x-3]&&g.splice(x-1,2);return this.poly(g,!0,c)}ellipse(t,n,a,r,u){return this.drawShape(new Bh(t,n,a,r),u),this}roundRect(t,n,a,r,u,c){return this.drawShape(new Oh(t,n,a,r,u),c),this}drawShape(t,n){return this.endPoly(),this.shapePrimitives.push({shape:t,transform:n}),this}startPoly(t,n){let a=this._currentPoly;return a&&this.endPoly(),a=new el,a.points.push(t,n),this._currentPoly=a,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 el,t)){const n=this.shapePrimitives[this.shapePrimitives.length-1];if(n){let a=n.shape.x,r=n.shape.y;if(n.transform&&!n.transform.isIdentity()){const u=n.transform,c=a;a=u.a*a+u.c*r+u.tx,r=u.b*c+u.d*r+u.ty}this._currentPoly.points.push(a,r)}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 a=t.instructions[n];this[a.action](...a.data)}this.finish()}get bounds(){const t=this._bounds;t.clear();const n=this.shapePrimitives;for(let a=0;a<n.length;a++){const r=n[a],u=r.shape.getBounds(s2);r.transform?t.addRect(u,r.transform):t.addRect(u)}return t}}class qi{constructor(t,n=!1){this.instructions=[],this.uid=Qt("graphicsPath"),this._dirty=!0,this.checkForHoles=n,typeof t=="string"?Mv(t,this):this.instructions=(t==null?void 0:t.slice())??[]}get shapePath(){return this._shapePath||(this._shapePath=new a2(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,a,r,u){const c=this.instructions[this.instructions.length-1],f=this.getLastPoint(ge.shared);let m=0,p=0;if(!c||c.action!=="bezierCurveTo")m=f.x,p=f.y;else{m=c.data[2],p=c.data[3];const g=f.x,x=f.y;m=g+(g-m),p=x+(x-p)}return this.instructions.push({action:"bezierCurveTo",data:[m,p,t,n,a,r,u]}),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,a){const r=this.instructions[this.instructions.length-1],u=this.getLastPoint(ge.shared);let c=0,f=0;if(!r||r.action!=="quadraticCurveTo")c=u.x,f=u.y;else{c=r.data[0],f=r.data[1];const m=u.x,p=u.y;c=m+(m-c),f=p+(p-f)}return this.instructions.push({action:"quadraticCurveTo",data:[c,f,t,n,a]}),this._dirty=!0,this}rect(t,n,a,r,u){return this.instructions.push({action:"rect",data:[t,n,a,r,u]}),this._dirty=!0,this}circle(t,n,a,r){return this.instructions.push({action:"circle",data:[t,n,a,r]}),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,a,r,u,c,f){u||(u=r/2);const m=-1*Math.PI/2+c,p=a*2,g=Math.PI*2/p,x=[];for(let b=0;b<p;b++){const _=b%2?u:r,S=b*g+m;x.push(t+_*Math.cos(S),n+_*Math.sin(S))}return this.poly(x,!0,f),this}clone(t=!1){const n=new qi;if(n.checkForHoles=this.checkForHoles,!t)n.instructions=this.instructions.slice();else for(let a=0;a<this.instructions.length;a++){const r=this.instructions[a];n.instructions.push({action:r.action,data:r.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,a=t.b,r=t.c,u=t.d,c=t.tx,f=t.ty;let m=0,p=0,g=0,x=0,b=0,_=0,S=0,A=0;for(let T=0;T<this.instructions.length;T++){const w=this.instructions[T],E=w.data;switch(w.action){case"moveTo":case"lineTo":m=E[0],p=E[1],E[0]=n*m+r*p+c,E[1]=a*m+u*p+f;break;case"bezierCurveTo":g=E[0],x=E[1],b=E[2],_=E[3],m=E[4],p=E[5],E[0]=n*g+r*x+c,E[1]=a*g+u*x+f,E[2]=n*b+r*_+c,E[3]=a*b+u*_+f,E[4]=n*m+r*p+c,E[5]=a*m+u*p+f;break;case"quadraticCurveTo":g=E[0],x=E[1],m=E[2],p=E[3],E[0]=n*g+r*x+c,E[1]=a*g+u*x+f,E[2]=n*m+r*p+c,E[3]=a*m+u*p+f;break;case"arcToSvg":m=E[5],p=E[6],S=E[0],A=E[1],E[0]=n*S+r*A,E[1]=a*S+u*A,E[5]=n*m+r*p+c,E[6]=a*m+u*p+f;break;case"circle":E[4]=Wa(E[3],t);break;case"rect":E[4]=Wa(E[4],t);break;case"ellipse":E[8]=Wa(E[8],t);break;case"roundRect":E[5]=Wa(E[5],t);break;case"addPath":E[0].transform(t);break;case"poly":E[2]=Wa(E[2],t);break;default:ve("unknown transform action",w.action);break}}return this._dirty=!0,this}get bounds(){return this.shapePath.bounds}getLastPoint(t){let n=this.instructions.length-1,a=this.instructions[n];if(!a)return t.x=0,t.y=0,t;for(;a.action==="closePath";){if(n--,n<0)return t.x=0,t.y=0,t;a=this.instructions[n]}switch(a.action){case"moveTo":case"lineTo":t.x=a.data[0],t.y=a.data[1];break;case"quadraticCurveTo":t.x=a.data[2],t.y=a.data[3];break;case"bezierCurveTo":t.x=a.data[4],t.y=a.data[5];break;case"arc":case"arcToSvg":t.x=a.data[5],t.y=a.data[6];break;case"addPath":a.data[0].getLastPoint(t);break}return t}}function Wa(l,t){return l?l.prepend(t):t.clone()}function Pt(l,t,n){const a=l.getAttribute(t);return a?Number(a):n}function l2(l,t){const n=l.querySelectorAll("defs");for(let a=0;a<n.length;a++){const r=n[a];for(let u=0;u<r.children.length;u++){const c=r.children[u];switch(c.nodeName.toLowerCase()){case"lineargradient":t.defs[c.id]=r2(c);break;case"radialgradient":t.defs[c.id]=o2();break}}}}function r2(l){const t=Pt(l,"x1",0),n=Pt(l,"y1",0),a=Pt(l,"x2",1),r=Pt(l,"y2",0),u=l.getAttribute("gradientUnits")||"objectBoundingBox",c=new Vi(t,n,a,r,u==="objectBoundingBox"?"local":"global");for(let f=0;f<l.children.length;f++){const m=l.children[f],p=Pt(m,"offset",0),g=ne.shared.setValue(m.getAttribute("stop-color")).toNumber();c.addColorStop(p,g)}return c}function o2(l){return ve("[SVG Parser] Radial gradients are not yet supported"),new Vi(0,0,1,0)}function Kg(l){const t=l.match(/url\s*\(\s*['"]?\s*#([^'"\s)]+)\s*['"]?\s*\)/i);return t?t[1]:""}const Ig={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 C0(l,t){const n=l.getAttribute("style"),a={},r={},u={strokeStyle:a,fillStyle:r,useFill:!1,useStroke:!1};for(const c in Ig){const f=l.getAttribute(c);f&&Jg(t,u,c,f.trim())}if(n){const c=n.split(";");for(let f=0;f<c.length;f++){const m=c[f].trim(),[p,g]=m.split(":");Ig[p]&&Jg(t,u,p,g.trim())}}return{strokeStyle:u.useStroke?a:null,fillStyle:u.useFill?r:null,useFill:u.useFill,useStroke:u.useStroke}}function Jg(l,t,n,a){switch(n){case"stroke":if(a!=="none"){if(a.startsWith("url(")){const r=Kg(a);t.strokeStyle.fill=l.defs[r]}else t.strokeStyle.color=ne.shared.setValue(a).toNumber();t.useStroke=!0}break;case"stroke-width":t.strokeStyle.width=Number(a);break;case"fill":if(a!=="none"){if(a.startsWith("url(")){const r=Kg(a);t.fillStyle.fill=l.defs[r]}else t.fillStyle.color=ne.shared.setValue(a).toNumber();t.useFill=!0}break;case"fill-opacity":t.fillStyle.alpha=Number(a);break;case"stroke-opacity":t.strokeStyle.alpha=Number(a);break;case"opacity":t.fillStyle.alpha=Number(a),t.strokeStyle.alpha=Number(a);break}}function u2(l){if(l.length<=2)return!0;const t=l.map(f=>f.area).sort((f,m)=>m-f),[n,a]=t,r=t[t.length-1],u=n/a,c=a/r;return!(u>3&&c<2)}function c2(l){return l.split(/(?=[Mm])/).filter(a=>a.trim().length>0)}function h2(l){const t=l.match(/[-+]?[0-9]*\.?[0-9]+/g);if(!t||t.length<4)return 0;const n=t.map(Number),a=[],r=[];for(let g=0;g<n.length;g+=2)g+1<n.length&&(a.push(n[g]),r.push(n[g+1]));if(a.length===0||r.length===0)return 0;const u=Math.min(...a),c=Math.max(...a),f=Math.min(...r),m=Math.max(...r);return(c-u)*(m-f)}function $g(l,t){const n=new qi(l,!1);for(const a of n.instructions)t.instructions.push(a)}function f2(l,t){if(typeof l=="string"){const c=document.createElement("div");c.innerHTML=l.trim(),l=c.querySelector("svg")}const n={context:t,defs:{},path:new qi};l2(l,n);const a=l.children,{fillStyle:r,strokeStyle:u}=C0(l,n);for(let c=0;c<a.length;c++){const f=a[c];f.nodeName.toLowerCase()!=="defs"&&M0(f,n,r,u)}return t}function M0(l,t,n,a){const r=l.children,{fillStyle:u,strokeStyle:c}=C0(l,t);u&&n?n={...n,...u}:u&&(n=u),c&&a?a={...a,...c}:c&&(a=c);const f=!n&&!a;f&&(n={color:0});let m,p,g,x,b,_,S,A,T,w,E,D,O,q,k,G,$;switch(l.nodeName.toLowerCase()){case"path":{q=l.getAttribute("d");const Q=l.getAttribute("fill-rule"),W=c2(q),K=Q==="evenodd",J=W.length>1;if(K&&J){const nt=W.map(z=>({path:z,area:h2(z)}));if(nt.sort((z,L)=>L.area-z.area),W.length>3||!u2(nt))for(let z=0;z<nt.length;z++){const L=nt[z],et=z===0;t.context.beginPath();const Z=new qi(void 0,!0);$g(L.path,Z),t.context.path(Z),et?(n&&t.context.fill(n),a&&t.context.stroke(a)):t.context.cut()}else for(let z=0;z<nt.length;z++){const L=nt[z],et=z%2===1;t.context.beginPath();const Z=new qi(void 0,!0);$g(L.path,Z),t.context.path(Z),et?t.context.cut():(n&&t.context.fill(n),a&&t.context.stroke(a))}}else{const nt=Q?Q==="evenodd":!0;k=new qi(q,nt),t.context.path(k),n&&t.context.fill(n),a&&t.context.stroke(a)}break}case"circle":S=Pt(l,"cx",0),A=Pt(l,"cy",0),T=Pt(l,"r",0),t.context.ellipse(S,A,T,T),n&&t.context.fill(n),a&&t.context.stroke(a);break;case"rect":m=Pt(l,"x",0),p=Pt(l,"y",0),G=Pt(l,"width",0),$=Pt(l,"height",0),w=Pt(l,"rx",0),E=Pt(l,"ry",0),w||E?t.context.roundRect(m,p,G,$,w||E):t.context.rect(m,p,G,$),n&&t.context.fill(n),a&&t.context.stroke(a);break;case"ellipse":S=Pt(l,"cx",0),A=Pt(l,"cy",0),w=Pt(l,"rx",0),E=Pt(l,"ry",0),t.context.beginPath(),t.context.ellipse(S,A,w,E),n&&t.context.fill(n),a&&t.context.stroke(a);break;case"line":g=Pt(l,"x1",0),x=Pt(l,"y1",0),b=Pt(l,"x2",0),_=Pt(l,"y2",0),t.context.beginPath(),t.context.moveTo(g,x),t.context.lineTo(b,_),a&&t.context.stroke(a);break;case"polygon":O=l.getAttribute("points"),D=O.match(/-?\d+/g).map(Q=>parseInt(Q,10)),t.context.poly(D,!0),n&&t.context.fill(n),a&&t.context.stroke(a);break;case"polyline":O=l.getAttribute("points"),D=O.match(/-?\d+/g).map(Q=>parseInt(Q,10)),t.context.poly(D,!1),a&&t.context.stroke(a);break;case"g":case"svg":break;default:{ve(`[SVG parser] <${l.nodeName}> elements unsupported`);break}}f&&(n=null);for(let Q=0;Q<r.length;Q++)M0(r[Q],t,n,a)}const ty={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 lo{constructor(t,n){this.uid=Qt("fillPattern"),this._tick=0,this.transform=new vt,this.texture=t,this.transform.scale(1/t.frame.width,1/t.frame.height),n&&(t.source.style.addressModeU=ty[n].addressModeU,t.source.style.addressModeV=ty[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 d2(l){return ne.isColorLike(l)}function ey(l){return l instanceof lo}function iy(l){return l instanceof Vi}function m2(l){return l instanceof Ut}function p2(l,t,n){const a=ne.shared.setValue(t??0);return l.color=a.toNumber(),l.alpha=a.alpha===1?n.alpha:a.alpha,l.texture=Ut.WHITE,{...n,...l}}function g2(l,t,n){return l.texture=t,{...n,...l}}function ny(l,t,n){return l.fill=t,l.color=16777215,l.texture=t.texture,l.matrix=t.transform,{...n,...l}}function sy(l,t,n){return t.buildGradient(),l.fill=t,l.color=16777215,l.texture=t.texture,l.matrix=t.transform,l.textureSpace=t.textureSpace,{...n,...l}}function y2(l,t){const n={...t,...l},a=ne.shared.setValue(n.color);return n.alpha*=a.alpha,n.color=a.toNumber(),n}function Qn(l,t){if(l==null)return null;const n={},a=l;return d2(l)?p2(n,l,t):m2(l)?g2(n,l,t):ey(l)?ny(n,l,t):iy(l)?sy(n,l,t):a.fill&&ey(a.fill)?ny(a,a.fill,t):a.fill&&iy(a.fill)?sy(a,a.fill,t):y2(a,t)}function to(l,t){const{width:n,alignment:a,miterLimit:r,cap:u,join:c,pixelLine:f,...m}=t,p=Qn(l,m);return p?{width:n,alignment:a,miterLimit:r,cap:u,join:c,pixelLine:f,...p}:null}function x2(l,t){let n=1;const a=l.shapePath.shapePrimitives;for(let r=0;r<a.length;r++){const u=a[r].shape;if(u.type!=="polygon")continue;const c=u.points,f=c.length;if(f<6)continue;const m=u.closePath;for(let p=0;p<f;p+=2){if(!m&&(p===0||p===f-2))continue;const g=(p-2+f)%f,x=(p+2)%f,b=c[g],_=c[g+1],S=c[p],A=c[p+1],T=c[x],w=c[x+1],E=b-S,D=_-A,O=T-S,q=w-A,k=E*E+D*D,G=O*O+q*q;if(k<1e-12||G<1e-12)continue;let W=(E*O+D*q)/Math.sqrt(k*G);W<-1?W=-1:W>1&&(W=1);const K=Math.sqrt((1-W)*.5);if(K<1e-6)continue;const J=Math.min(1/K,t);J>n&&(n=J)}}return n}const _2=new ge,ay=new vt,Hh=class _i extends bi{constructor(){super(...arguments),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=Qt("graphicsContext"),this.dirty=!0,this.batchMode="auto",this.instructions=[],this.destroyed=!1,this._activePath=new qi,this._transform=new vt,this._fillStyle={..._i.defaultFillStyle},this._strokeStyle={..._i.defaultStrokeStyle},this._stateStack=[],this._tick=0,this._bounds=new ni,this._boundsDirty=!0}clone(){const t=new _i;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=Qn(t,_i.defaultFillStyle)}get strokeStyle(){return this._strokeStyle}set strokeStyle(t){this._strokeStyle=to(t,_i.defaultStrokeStyle)}setFillStyle(t){return this._fillStyle=Qn(t,_i.defaultFillStyle),this}setStrokeStyle(t){return this._strokeStyle=Qn(t,_i.defaultStrokeStyle),this}texture(t,n,a,r,u,c){return this.instructions.push({action:"texture",data:{image:t,dx:a||0,dy:r||0,dw:u||t.frame.width,dh:c||t.frame.height,transform:this._transform.clone(),alpha:this._fillStyle.alpha,style:n||n===0?ne.shared.setValue(n).toNumber():16777215}}),this.onUpdate(),this}beginPath(){return this._activePath=new qi,this}fill(t,n){let a;const r=this.instructions[this.instructions.length-1];return this._tick===0&&(r==null?void 0:r.action)==="stroke"?a=r.data.path:a=this._activePath.clone(),a?(t!=null&&(n!==void 0&&typeof t=="number"&&(At(Ft,"GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead"),t={color:t,alpha:n}),this._fillStyle=Qn(t,_i.defaultFillStyle)),this.instructions.push({action:"fill",data:{style:this.fillStyle,path:a}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}_initNextPathLocation(){const{x:t,y:n}=this._activePath.getLastPoint(ge.shared);this._activePath.clear(),this._activePath.moveTo(t,n)}stroke(t){let n;const a=this.instructions[this.instructions.length-1];return this._tick===0&&(a==null?void 0:a.action)==="fill"?n=a.data.path:n=this._activePath.clone(),n?(t!=null&&(this._strokeStyle=to(t,_i.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],a=this._activePath.clone();if(n&&(n.action==="stroke"||n.action==="fill"))if(n.data.hole)n.data.hole.addPath(a);else{n.data.hole=a;break}}return this._initNextPathLocation(),this}arc(t,n,a,r,u,c){this._tick++;const f=this._transform;return this._activePath.arc(f.a*t+f.c*n+f.tx,f.b*t+f.d*n+f.ty,a,r,u,c),this}arcTo(t,n,a,r,u){this._tick++;const c=this._transform;return this._activePath.arcTo(c.a*t+c.c*n+c.tx,c.b*t+c.d*n+c.ty,c.a*a+c.c*r+c.tx,c.b*a+c.d*r+c.ty,u),this}arcToSvg(t,n,a,r,u,c,f){this._tick++;const m=this._transform;return this._activePath.arcToSvg(t,n,a,r,u,m.a*c+m.c*f+m.tx,m.b*c+m.d*f+m.ty),this}bezierCurveTo(t,n,a,r,u,c,f){this._tick++;const m=this._transform;return this._activePath.bezierCurveTo(m.a*t+m.c*n+m.tx,m.b*t+m.d*n+m.ty,m.a*a+m.c*r+m.tx,m.b*a+m.d*r+m.ty,m.a*u+m.c*c+m.tx,m.b*u+m.d*c+m.ty,f),this}closePath(){var t;return this._tick++,(t=this._activePath)==null||t.closePath(),this}ellipse(t,n,a,r){return this._tick++,this._activePath.ellipse(t,n,a,r,this._transform.clone()),this}circle(t,n,a){return this._tick++,this._activePath.circle(t,n,a,this._transform.clone()),this}path(t){return this._tick++,this._activePath.addPath(t,this._transform.clone()),this}lineTo(t,n){this._tick++;const a=this._transform;return this._activePath.lineTo(a.a*t+a.c*n+a.tx,a.b*t+a.d*n+a.ty),this}moveTo(t,n){this._tick++;const a=this._transform,r=this._activePath.instructions,u=a.a*t+a.c*n+a.tx,c=a.b*t+a.d*n+a.ty;return r.length===1&&r[0].action==="moveTo"?(r[0].data[0]=u,r[0].data[1]=c,this):(this._activePath.moveTo(u,c),this)}quadraticCurveTo(t,n,a,r,u){this._tick++;const c=this._transform;return this._activePath.quadraticCurveTo(c.a*t+c.c*n+c.tx,c.b*t+c.d*n+c.ty,c.a*a+c.c*r+c.tx,c.b*a+c.d*r+c.ty,u),this}rect(t,n,a,r){return this._tick++,this._activePath.rect(t,n,a,r,this._transform.clone()),this}roundRect(t,n,a,r,u){return this._tick++,this._activePath.roundRect(t,n,a,r,u,this._transform.clone()),this}poly(t,n){return this._tick++,this._activePath.poly(t,n,this._transform.clone()),this}regularPoly(t,n,a,r,u=0,c){return this._tick++,this._activePath.regularPoly(t,n,a,r,u,c),this}roundPoly(t,n,a,r,u,c){return this._tick++,this._activePath.roundPoly(t,n,a,r,u,c),this}roundShape(t,n,a,r){return this._tick++,this._activePath.roundShape(t,n,a,r),this}filletRect(t,n,a,r,u){return this._tick++,this._activePath.filletRect(t,n,a,r,u),this}chamferRect(t,n,a,r,u,c){return this._tick++,this._activePath.chamferRect(t,n,a,r,u,c),this}star(t,n,a,r,u=0,c=0){return this._tick++,this._activePath.star(t,n,a,r,u,c,this._transform.clone()),this}svg(t){return this._tick++,f2(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,a,r,u,c){return t instanceof vt?(this._transform.set(t.a,t.b,t.c,t.d,t.tx,t.ty),this):(this._transform.set(t,n,a,r,u,c),this)}transform(t,n,a,r,u,c){return t instanceof vt?(this._transform.append(t),this):(ay.set(t,n,a,r,u,c),this._transform.append(ay),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 a=this.instructions[n],r=a.action;if(r==="fill"){const u=a.data;t.addBounds(u.path.bounds)}else if(r==="texture"){const u=a.data;t.addFrame(u.dx,u.dy,u.dx+u.dw,u.dy+u.dh,u.transform)}if(r==="stroke"){const u=a.data,c=u.style.alignment;let f=u.style.width*(1-c);u.style.join==="miter"&&(f*=x2(u.path,u.style.miterLimit));const m=u.path.bounds;t.addFrame(m.minX-f,m.minY-f,m.maxX+f,m.maxY+f)}}return t.isValid||t.set(0,0,0,0),t}containsPoint(t){var r;if(!this.bounds.containsPoint(t.x,t.y))return!1;const n=this.instructions;let a=!1;for(let u=0;u<n.length;u++){const c=n[u],f=c.data,m=f.path;if(!c.action||!m)continue;const p=f.style,g=m.shapePath.shapePrimitives;for(let x=0;x<g.length;x++){const b=g[x].shape;if(!p||!b)continue;const _=g[x].transform,S=_?_.applyInverse(t,_2):t;if(c.action==="fill")a=b.contains(S.x,S.y);else{const T=p;a=b.strokeContains(S.x,S.y,T.width,T.alignment)}const A=f.hole;if(A){const T=(r=A.shapePath)==null?void 0:r.shapePrimitives;if(T)for(let w=0;w<T.length;w++)T[w].shape.contains(S.x,S.y)&&(a=!1)}if(a)return!0}}return a}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 a=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(a)),this._strokeStyle.texture&&(this._strokeStyle.fill&&"uid"in this._strokeStyle.fill?this._strokeStyle.fill.destroy():this._strokeStyle.texture.destroy(a))}this._fillStyle=null,this._strokeStyle=null,this.instructions=null,this._activePath=null,this._bounds=null,this._stateStack=null,this.customShader=null,this._transform=null}};Hh.defaultFillStyle={color:16777215,alpha:1,texture:Ut.WHITE,matrix:null,fill:null,textureSpace:"local"};Hh.defaultStrokeStyle={width:1,color:16777215,alpha:1,alignment:.5,miterLimit:10,cap:"butt",join:"miter",texture:Ut.WHITE,matrix:null,fill:null,textureSpace:"local",pixelLine:!1};let fi=Hh;class b2{constructor(){this.isBatchable=!1}reset(){this.isBatchable=!1,this.context=null,this.graphicsData&&(this.graphicsData.destroy(),this.graphicsData=null)}destroy(){this.reset()}}class v2{constructor(){this.instructions=new Mh}init(){this.instructions.reset()}destroy(){this.instructions.destroy(),this.instructions=null}}const Lh=class xh{constructor(t){this._renderer=t,this._managedContexts=new fl({renderer:t,type:"resource",name:"graphicsContext"})}init(t){xh.defaultOptions.bezierSmoothness=(t==null?void 0:t.bezierSmoothness)??xh.defaultOptions.bezierSmoothness}getContextRenderData(t){return this.getGpuContext(t).graphicsData||this._initContextRenderData(t)}updateGpuContext(t){const n=t._gpuData,a=!!n[this._renderer.uid],r=n[this._renderer.uid]||this._initContext(t);return(t.dirty||!a)&&(a&&r.reset(),r.isBatchable=!1,t.dirty=!1),r}getGpuContext(t){return t._gpuData[this._renderer.uid]||this._initContext(t)}_initContextRenderData(t){const n=new v2,a=this.getGpuContext(t);return a.graphicsData=n,n.init(),n}_initContext(t){const n=new b2;return n.context=t,t._gpuData[this._renderer.uid]=n,this._managedContexts.add(t),n}destroy(){this._managedContexts.destroy(),this._renderer=null}};Lh.extension={type:[gt.CanvasSystem],name:"graphicsContext"};Lh.defaultOptions={bezierSmoothness:.5};let S2=Lh;class E0{constructor(t,n){this.state=Jy.for2d(),this.renderer=t,this._adaptor=n,this.renderer.runners.contextChange.add(this),this._managedGraphics=new fl({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}}E0.extension={type:[gt.CanvasPipes],name:"graphics"};function T2(l,t,n){const a=(l>>24&255)/255;t[n++]=(l&255)/255*a,t[n++]=(l>>8&255)/255*a,t[n++]=(l>>16&255)/255*a,t[n++]=a}class A2{constructor(){this.batches=[],this.batched=!1}destroy(){this.batches.forEach(t=>{ze.return(t)}),this.batches.length=0}}class R0{constructor(t,n){this.state=Jy.for2d(),this.renderer=t,this._adaptor=n,this.renderer.runners.contextChange.add(this),this._managedGraphics=new fl({renderer:t,type:"renderable",priority:-1,name:"graphics"})}contextChange(){this._adaptor.contextChange(this.renderer)}validateRenderable(t){const n=t.context,a=!!t._gpuData,u=this.renderer.graphicsContext.updateGpuContext(n);return!!(u.isBatchable||a!==u.isBatchable)}addRenderable(t,n){const r=this.renderer.graphicsContext.updateGpuContext(t.context);t.didViewUpdate&&this._rebuild(t),r.isBatchable?this._addToBatcher(t,n):(this.renderer.renderPipes.batch.break(n),n.add(t))}updateRenderable(t){const a=this._getGpuDataForRenderable(t).batches;for(let r=0;r<a.length;r++){const u=a[r];u._batcher.updateElement(u)}}execute(t){if(!t.isRenderable)return;const n=this.renderer,a=t.context;if(!n.graphicsContext.getGpuContext(a).batches.length)return;const u=a.customShader||this._adaptor.shader;this.state.blendMode=t.groupBlendMode;const c=u.resources.localUniforms.uniforms;c.uTransformMatrix=t.groupTransform,c.uRound=n._roundPixels|t._roundPixels,T2(t.groupColorAlpha,c.uColor,0),this._adaptor.execute(this,t)}_rebuild(t){const n=this._getGpuDataForRenderable(t),r=this.renderer.graphicsContext.updateGpuContext(t.context);n.destroy(),r.isBatchable&&this._updateBatchesForRenderable(t,n)}_addToBatcher(t,n){const a=this.renderer.renderPipes.batch,r=this._getGpuDataForRenderable(t).batches;for(let u=0;u<r.length;u++){const c=r[u];a.addToBatch(c,n)}}_getGpuDataForRenderable(t){return t._gpuData[this.renderer.uid]||this._initGpuDataForRenderable(t)}_initGpuDataForRenderable(t){const n=new A2;return t._gpuData[this.renderer.uid]=n,this._managedGraphics.add(t),n}_updateBatchesForRenderable(t,n){const a=t.context,u=this.renderer.graphicsContext.getGpuContext(a),c=this.renderer._roundPixels|t._roundPixels;n.batches=u.batches.map(f=>{const m=ze.get(Gh);return f.copyTo(m),m.renderable=t,m.roundPixels=c,m})}destroy(){this._managedGraphics.destroy(),this.renderer=null,this._adaptor.destroy(),this._adaptor=null,this.state=null}}R0.extension={type:[gt.WebGLPipes,gt.WebGPUPipes],name:"graphics"};It.add(E0);It.add(R0);It.add(S2);It.add(kh);class _e extends Eh{constructor(t){t instanceof fi&&(t={context:t});const{context:n,roundPixels:a,...r}=t||{};super({label:"Graphics",...r}),this.renderPipeId="graphics",n?this.context=n:(this.context=this._ownedContext=new fi,this.context.autoGarbageCollect=this.autoGarbageCollect),this.didViewUpdate=!0,this.allowChildren=!1,this.roundPixels=a??!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 _e(this._context.clone()):(this._ownedContext=null,new _e(this._context))}lineStyle(t,n,a){At(Ft,"Graphics#lineStyle is no longer needed. Use Graphics#setStrokeStyle to set the stroke style.");const r={};return t&&(r.width=t),n&&(r.color=n),a&&(r.alpha=a),this.context.strokeStyle=r,this}beginFill(t,n){At(Ft,"Graphics#beginFill is no longer needed. Use Graphics#fill to fill the shape with the desired style.");const a={};return t!==void 0&&(a.color=t),n!==void 0&&(a.alpha=n),this.context.fillStyle=a,this}endFill(){At(Ft,"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!==fi.defaultStrokeStyle.width||t.color!==fi.defaultStrokeStyle.color||t.alpha!==fi.defaultStrokeStyle.alpha)&&this.context.stroke(),this}drawCircle(...t){return At(Ft,"Graphics#drawCircle has been renamed to Graphics#circle"),this._callContextMethod("circle",t)}drawEllipse(...t){return At(Ft,"Graphics#drawEllipse has been renamed to Graphics#ellipse"),this._callContextMethod("ellipse",t)}drawPolygon(...t){return At(Ft,"Graphics#drawPolygon has been renamed to Graphics#poly"),this._callContextMethod("poly",t)}drawRect(...t){return At(Ft,"Graphics#drawRect has been renamed to Graphics#rect"),this._callContextMethod("rect",t)}drawRoundedRect(...t){return At(Ft,"Graphics#drawRoundedRect has been renamed to Graphics#roundRect"),this._callContextMethod("roundRect",t)}drawStar(...t){return At(Ft,"Graphics#drawStar has been renamed to Graphics#star"),this._callContextMethod("star",t)}}class w2 extends Eh{constructor(t,n){const{text:a,resolution:r,style:u,anchor:c,width:f,height:m,roundPixels:p,...g}=t;super({...g}),this.batched=!0,this._resolution=null,this._autoResolution=!0,this._didTextUpdate=!0,this._styleClass=n,this.text=a??"",this.style=u,this.resolution=r??null,this.allowChildren=!1,this._anchor=new me({_onUpdate:()=>{this.onViewUpdate()}}),c&&(this.anchor=c),this.roundPixels=p??!1,f!==void 0&&(this.width=f),m!==void 0&&(this.height=m)}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,a=this.bounds.height,r=-n*this.anchor.x;let u=0;return t.x>=r&&t.x<=r+n&&(u=-a*this.anchor.y,t.y>=u&&t.y<=u+a)}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 C2(l,t){let n=l[0]??{};return(typeof n=="string"||l[1])&&(At(Ft,`use new ${t}({ text: "hi!", style }) instead`),n={text:n,style:l[1]}),n}class M2{constructor(t){this._canvasPool=Object.create(null),this.canvasOptions=t||{},this.enableFullScreen=!1}_createCanvasAndContext(t,n){const a=Xe.get().createCanvas();a.width=t,a.height=n;const r=a.getContext("2d");return{canvas:a,context:r}}getOptimalCanvasAndContext(t,n,a=1){t=Math.ceil(t*a-1e-6),n=Math.ceil(n*a-1e-6),t=qs(t),n=qs(n);const r=(t<<17)+(n<<1);this._canvasPool[r]||(this._canvasPool[r]=[]);let u=this._canvasPool[r].pop();return u||(u=this._createCanvasAndContext(t,n)),u}returnCanvasAndContext(t){const n=t.canvas,{width:a,height:r}=n,u=(a<<17)+(r<<1);t.context.resetTransform(),t.context.clearRect(0,0,a,r),this._canvasPool[u].push(t)}clear(){this._canvasPool={}}}const _h=new M2;hl.register(_h);let jn=null,Yi=null;function E2(l,t){jn||(jn=Xe.get().createCanvas(256,128),Yi=jn.getContext("2d",{willReadFrequently:!0}),Yi.globalCompositeOperation="copy",Yi.globalAlpha=1),(jn.width<l||jn.height<t)&&(jn.width=qs(l),jn.height=qs(t))}function ly(l,t,n){for(let a=0,r=4*n*t;a<t;++a,r+=4)if(l[r+3]!==0)return!1;return!0}function ry(l,t,n,a,r){const u=4*t;for(let c=a,f=a*u+4*n;c<=r;++c,f+=u)if(l[f+3]!==0)return!1;return!0}function R2(...l){let t=l[0];t.canvas||(t={canvas:l[0],resolution:l[1]});const{canvas:n}=t,a=Math.min(t.resolution??1,1),r=t.width??n.width,u=t.height??n.height;let c=t.output;if(E2(r,u),!Yi)throw new TypeError("Failed to get canvas 2D context");Yi.drawImage(n,0,0,r,u,0,0,r*a,u*a);const m=Yi.getImageData(0,0,r,u).data;let p=0,g=0,x=r-1,b=u-1;for(;g<u&&ly(m,r,g);)++g;if(g===u)return Kt.EMPTY;for(;ly(m,r,b);)--b;for(;ry(m,r,p,g,b);)++p;for(;ry(m,r,x,g,b);)--x;return++x,++b,Yi.globalCompositeOperation="source-over",Yi.strokeRect(p,g,x-p,b-g),Yi.globalCompositeOperation="copy",c??(c=new Kt),c.set(p/a,g/a,(x-p)/a,(b-g)/a),c}/**
288
+ * tiny-lru
289
+ *
290
+ * @copyright 2026 Jason Mulligan <jason.mulligan@avoidwork.com>
291
+ * @license BSD-3-Clause
292
+ * @version 11.4.7
293
+ */class z2{constructor(t=0,n=0,a=!1){this.first=null,this.items=Object.create(null),this.last=null,this.max=t,this.resetTtl=a,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 a=0;a<t.length;a++){const r=t[a];n[a]=[r,this.get(r)]}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,a=0;for(;n!==null;)t[a++]=n.key,n=n.next;return t}setWithEvicted(t,n,a=this.resetTtl){let r=null;if(this.has(t))this.set(t,n,!0,a);else{this.max>0&&this.size===this.max&&(r={...this.first},this.evict(!0));let u=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=u:this.last.next=u,this.last=u}return r}set(t,n,a=!1,r=this.resetTtl){let u=this.items[t];return a||u!==void 0?(u.value=n,a===!1&&r&&(u.expiry=this.ttl>0?Date.now()+this.ttl:this.ttl),this.moveToEnd(u)):(this.max>0&&this.size===this.max&&this.evict(!0),u=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=u:this.last.next=u,this.last=u),this}values(t=this.keys()){const n=new Array(t.length);for(let a=0;a<t.length;a++)n[a]=this.get(t[a]);return n}}function D2(l=1e3,t=0,n=!1){if(isNaN(l)||l<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 z2(l,t,n)}function z0(l){return!!l.tagStyles&&Object.keys(l.tagStyles).length>0}function D0(l){return l.includes("<")}function B2(l,t){return l.clone().assign(t)}function O2(l,t){const n=[],a=t.tagStyles;if(!z0(t)||!D0(l))return n.push({text:l,style:t}),n;const r=[t],u=[];let c="",f=0;for(;f<l.length;){const m=l[f];if(m==="<"){const p=l.indexOf(">",f);if(p===-1){c+=m,f++;continue}const g=l.slice(f+1,p);if(g.startsWith("/")){const x=g.slice(1).trim();if(u.length>0&&u[u.length-1]===x){c.length>0&&(n.push({text:c,style:r[r.length-1]}),c=""),r.pop(),u.pop(),f=p+1;continue}else{c+=l.slice(f,p+1),f=p+1;continue}}else{const x=g.trim();if(a[x]){c.length>0&&(n.push({text:c,style:r[r.length-1]}),c="");const b=r[r.length-1],_=B2(b,a[x]);r.push(_),u.push(x),f=p+1;continue}else{c+=l.slice(f,p+1),f=p+1;continue}}}else c+=m,f++}return c.length>0&&n.push({text:c,style:r[r.length-1]}),n}const G2=[10,13],U2=new Set(G2),N2=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288],k2=new Set(N2),H2=[9,32];new Set(H2);const L2=[45,8208,8211,8212,173],j2=new Set(L2),Y2=/(\r\n|\r|\n)/,X2=/(?:\r\n|\r|\n)/;function eo(l){return typeof l!="string"?!1:U2.has(l.charCodeAt(0))}function ei(l,t){return typeof l!="string"?!1:k2.has(l.charCodeAt(0))}function q2(l){return typeof l!="string"?!1:j2.has(l.charCodeAt(0))}function B0(l){return l==="normal"||l==="pre-line"}function O0(l){return l==="normal"}function ji(l){if(typeof l!="string")return"";let t=l.length-1;for(;t>=0&&ei(l[t]);)t--;return t<l.length-1?l.slice(0,t+1):l}function G0(l){const t=[],n=[];if(typeof l!="string")return t;for(let a=0;a<l.length;a++){const r=l[a],u=l[a+1];if(ei(r)||eo(r)){n.length>0&&(t.push(n.join("")),n.length=0),r==="\r"&&u===`
294
+ `?(t.push(`\r
295
+ `),a++):t.push(r);continue}n.push(r),q2(r)&&u&&!ei(u)&&!eo(u)&&(t.push(n.join("")),n.length=0)}return n.length>0&&t.push(n.join("")),t}function U0(l,t,n,a){const r=n(l),u=[];for(let c=0;c<r.length;c++){let f=r[c],m=f,p=1;for(;r[c+p];){const g=r[c+p];if(!a(m,g,l,c,t))f+=g,m=g,p++;else break}c+=p-1,u.push(f)}return u}const V2=/\r\n|\r|\n/g;function P2(l,t,n,a,r,u,c,f){var Tt,z;const m=O2(l,t);if(O0(t.whiteSpace))for(let L=0;L<m.length;L++){const et=m[L];m[L]={text:et.text.replace(V2," "),style:et.style}}const g=[];let x=[];for(const L of m){const et=L.text.split(Y2);for(let Z=0;Z<et.length;Z++){const at=et[Z];at===`\r
296
+ `||at==="\r"||at===`
297
+ `?(g.push(x),x=[]):at.length>0&&x.push({text:at,style:L.style})}}(x.length>0||g.length===0)&&g.push(x);const b=n?F2(g,t,a,r,c,f):g,_=[],S=[],A=[],T=[],w=[];let E=0;const D=t._fontString,O=u(D);O.fontSize===0&&(O.fontSize=t.fontSize,O.ascent=t.fontSize);let q="",k=!!t.dropShadow,G=((Tt=t._stroke)==null?void 0:Tt.width)||0;for(const L of b){let et=0,Z=O.ascent,at=O.descent,M="";for(const F of L){const I=F.style._fontString,rt=u(I);I!==q&&(a.font=I,q=I);const ct=r(F.text,F.style.letterSpacing,a);et+=ct,Z=Math.max(Z,rt.ascent),at=Math.max(at,rt.descent),M+=F.text;const ft=((z=F.style._stroke)==null?void 0:z.width)||0;ft>G&&(G=ft),!k&&F.style.dropShadow&&(k=!0)}L.length===0&&(Z=O.ascent,at=O.descent),_.push(et),S.push(Z),A.push(at),w.push(M);const Y=t.lineHeight||Z+at;T.push(Y+t.leading),E=Math.max(E,et)}const $=G,K=(n&&t.align!=="left"?Math.max(E,t.wordWrapWidth):E)+$+(t.dropShadow?t.dropShadow.distance:0);let J=0;for(let L=0;L<T.length;L++)J+=T[L];J=Math.max(J,T[0]+$);const it=J+(t.dropShadow?t.dropShadow.distance:0),nt=t.lineHeight||O.fontSize;return{width:K,height:it,lines:w,lineWidths:_,lineHeight:nt+t.leading,maxLineWidth:E,fontProperties:O,runsByLine:b,lineAscents:S,lineDescents:A,lineHeights:T,hasDropShadow:k}}function F2(l,t,n,a,r,u){var T;const{letterSpacing:c,whiteSpace:f,wordWrapWidth:m,breakWords:p}=t,g=B0(f),x=m+c,b={};let _="";const S=(w,E)=>{const D=`${w}|${E.styleKey}`;let O=b[D];if(O===void 0){const q=E._fontString;q!==_&&(n.font=q,_=q),O=a(w,E.letterSpacing,n)+E.letterSpacing,b[D]=O}return O},A=[];for(const w of l){const E=Q2(w),D=A.length,O=J=>{let it=0,nt=J;do{const{token:Tt,style:z}=E[nt];it+=S(Tt,z),nt++}while(nt<E.length&&E[nt].continuesFromPrevious);return it},q=J=>{const it=[];let nt=J;do it.push({token:E[nt].token,style:E[nt].style}),nt++;while(nt<E.length&&E[nt].continuesFromPrevious);return it};let k=[],G=0,$=!g,Q=null;const W=()=>{Q&&Q.text.length>0&&k.push(Q),Q=null},K=()=>{if(W(),k.length>0){const J=k[k.length-1];J.text=ji(J.text),J.text.length===0&&k.pop()}A.push(k),k=[],G=0,$=!1};for(let J=0;J<E.length;J++){const{token:it,style:nt,continuesFromPrevious:Tt}=E[J],z=S(it,nt);if(g){const Z=ei(it),at=(Q==null?void 0:Q.text[Q.text.length-1])??((T=k[k.length-1])==null?void 0:T.text.slice(-1))??"",M=at?ei(at):!1;if(Z&&M)continue}const L=!Tt,et=L?O(J):z;if(et>x&&L)if(G>0&&K(),p){const Z=q(J);for(let at=0;at<Z.length;at++){const M=Z[at].token,Y=Z[at].style,F=U0(M,p,u,r);for(const I of F){const rt=S(I,Y);rt+G>x&&K(),!Q||Q.style!==Y?(W(),Q={text:I,style:Y}):Q.text+=I,G+=rt}}J+=Z.length-1}else{const Z=q(J);W(),A.push(Z.map(at=>({text:at.token,style:at.style}))),$=!1,J+=Z.length-1}else if(et+G>x&&L){if(ei(it)){$=!1;continue}K(),Q={text:it,style:nt},G=z}else if(Tt&&!p)!Q||Q.style!==nt?(W(),Q={text:it,style:nt}):Q.text+=it,G+=z;else{const Z=ei(it);if(G===0&&Z&&!$)continue;!Q||Q.style!==nt?(W(),Q={text:it,style:nt}):Q.text+=it,G+=z}}if(W(),k.length>0){const J=k[k.length-1];J.text=ji(J.text),J.text.length===0&&k.pop()}(k.length>0||A.length===D)&&A.push(k)}return A}function Q2(l){const t=[];let n=!1;for(const a of l){const r=G0(a.text);let u=!0;for(const c of r){const f=ei(c)||eo(c),m=u&&n&&!f;t.push({token:c,style:a.style,continuesFromPrevious:m}),n=!f,u=!1}}return t}const W2={willReadFrequently:!0};function oy(l,t,n,a,r){let u=n[l];return typeof u!="number"&&(u=r(l,t,a)+t,n[l]=u),u}function Z2(l,t,n,a,r,u,c){const f=n.getContext("2d",W2);f.font=t._fontString;let m=0,p="";const g=[],x=Object.create(null),{letterSpacing:b,whiteSpace:_}=t,S=B0(_),A=O0(_);let T=!S;const w=t.wordWrapWidth+b,E=G0(l);for(let O=0;O<E.length;O++){let q=E[O];if(eo(q)){if(!A){g.push(ji(p)),T=!S,p="",m=0;continue}q=" "}if(S){const G=ei(q),$=ei(p[p.length-1]);if(G&&$)continue}const k=oy(q,b,x,f,a);if(k>w)if(p!==""&&(g.push(ji(p)),p="",m=0),r(q,t.breakWords)){const G=U0(q,t.breakWords,c,u);for(const $ of G){const Q=oy($,b,x,f,a);Q+m>w&&(g.push(ji(p)),T=!1,p="",m=0),p+=$,m+=Q}}else p.length>0&&(g.push(ji(p)),p="",m=0),g.push(ji(q)),T=!1,p="",m=0;else k+m>w&&(T=!1,g.push(ji(p)),p="",m=0),(p.length>0||!ei(q)||T)&&(p+=q,m+=k)}const D=ji(p);return D.length>0&&g.push(D),g.join(`
298
+ `)}const uy={willReadFrequently:!0},Pi=class ht{static get experimentalLetterSpacingSupported(){let t=ht._experimentalLetterSpacingSupported;if(t===void 0){const n=Xe.get().getCanvasRenderingContext2D().prototype;t=ht._experimentalLetterSpacingSupported="letterSpacing"in n||"textLetterSpacing"in n}return t}constructor(t,n,a,r,u,c,f,m,p,g){this.text=t,this.style=n,this.width=a,this.height=r,this.lines=u,this.lineWidths=c,this.lineHeight=f,this.maxLineWidth=m,this.fontProperties=p,g&&(this.runsByLine=g.runsByLine,this.lineAscents=g.lineAscents,this.lineDescents=g.lineDescents,this.lineHeights=g.lineHeights,this.hasDropShadow=g.hasDropShadow)}static measureText(t=" ",n,a=ht._canvas,r=n.wordWrap){var q;const u=`${t}-${n.styleKey}-wordWrap-${r}`;if(ht._measurementCache.has(u))return ht._measurementCache.get(u);if(z0(n)&&D0(t)){const k=P2(t,n,r,ht._context,ht._measureText,ht.measureFont,ht.canBreakChars,ht.wordWrapSplit),G=new ht(t,n,k.width,k.height,k.lines,k.lineWidths,k.lineHeight,k.maxLineWidth,k.fontProperties,{runsByLine:k.runsByLine,lineAscents:k.lineAscents,lineDescents:k.lineDescents,lineHeights:k.lineHeights,hasDropShadow:k.hasDropShadow});return ht._measurementCache.set(u,G),G}const f=n._fontString,m=ht.measureFont(f);m.fontSize===0&&(m.fontSize=n.fontSize,m.ascent=n.fontSize,m.descent=0);const p=ht._context;p.font=f;const x=(r?ht._wordWrap(t,n,a):t).split(X2),b=new Array(x.length);let _=0;for(let k=0;k<x.length;k++){const G=ht._measureText(x[k],n.letterSpacing,p);b[k]=G,_=Math.max(_,G)}const S=((q=n._stroke)==null?void 0:q.width)??0,A=n.lineHeight||m.fontSize,T=ht._getAlignWidth(_,n,r),w=ht._adjustWidthForStyle(T,n),E=Math.max(A,m.fontSize+S)+(x.length-1)*(A+n.leading),D=ht._adjustHeightForStyle(E,n),O=new ht(t,n,w,D,x,b,A+n.leading,_,m);return ht._measurementCache.set(u,O),O}static _adjustWidthForStyle(t,n){var u;const a=((u=n._stroke)==null?void 0:u.width)||0;let r=t+a;return n.dropShadow&&(r+=n.dropShadow.distance),r}static _adjustHeightForStyle(t,n){let a=t;return n.dropShadow&&(a+=n.dropShadow.distance),a}static _getAlignWidth(t,n,a){return a&&n.align!=="left"?Math.max(t,n.wordWrapWidth):t}static _measureText(t,n,a){let r=!1;ht.experimentalLetterSpacingSupported&&(ht.experimentalLetterSpacing?(a.letterSpacing=`${n}px`,a.textLetterSpacing=`${n}px`,r=!0):(a.letterSpacing="0px",a.textLetterSpacing="0px"));const u=a.measureText(t);let c=u.width;const f=-(u.actualBoundingBoxLeft??0);let p=(u.actualBoundingBoxRight??0)-f;if(c>0)if(r)c-=n,p-=n;else{const g=(ht.graphemeSegmenter(t).length-1)*n;c+=g,p+=g}return Math.max(c,p)}static _wordWrap(t,n,a=ht._canvas){return Z2(t,n,a,ht._measureText,ht.canBreakWords,ht.canBreakChars,ht.wordWrapSplit)}static isBreakingSpace(t,n){return ei(t)}static canBreakWords(t,n){return n}static canBreakChars(t,n,a,r,u){return!0}static wordWrapSplit(t){return ht.graphemeSegmenter(t)}static measureFont(t){if(ht._fonts[t])return ht._fonts[t];const n=ht._context;n.font=t;const a=n.measureText(ht.METRICS_STRING+ht.BASELINE_SYMBOL),r=a.actualBoundingBoxAscent??0,u=a.actualBoundingBoxDescent??0,c={ascent:r,descent:u,fontSize:r+u};return ht._fonts[t]=c,c}static clearMetrics(t=""){t?delete ht._fonts[t]:ht._fonts={}}static get _canvas(){if(!ht.__canvas){let t;try{const n=new OffscreenCanvas(0,0),a=n.getContext("2d",uy);if(a!=null&&a.measureText)return ht.__canvas=n,n;t=Xe.get().createCanvas()}catch{t=Xe.get().createCanvas()}t.width=t.height=10,ht.__canvas=t}return ht.__canvas}static get _context(){return ht.__context||(ht.__context=ht._canvas.getContext("2d",uy)),ht.__context}};Pi.METRICS_STRING="|ÉqÅ";Pi.BASELINE_SYMBOL="M";Pi.BASELINE_MULTIPLIER=1.4;Pi.HEIGHT_MULTIPLIER=2;Pi.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const l=new Intl.Segmenter;return t=>{const n=l.segment(t),a=[];let r=0;for(const u of n)a[r++]=u.segment;return a}}return l=>[...l]})();Pi.experimentalLetterSpacing=!1;Pi._fonts={};Pi._measurementCache=D2(1e3);let _n=Pi;const K2=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function bh(l){const t=typeof l.fontSize=="number"?`${l.fontSize}px`:l.fontSize;let n=l.fontFamily;Array.isArray(l.fontFamily)||(n=l.fontFamily.split(","));for(let a=n.length-1;a>=0;a--){let r=n[a].trim();!/([\"\'])[^\'\"]+\1/.test(r)&&!K2.includes(r)&&(r=`"${r}"`),n[a]=r}return`${l.fontStyle} ${l.fontVariant} ${l.fontWeight} ${t} ${n.join(",")}`}const cy=1e5;function Qr(l,t,n,a=0,r=0,u=0){if(l.texture===Ut.WHITE&&!l.fill)return ne.shared.setValue(l.color).setAlpha(l.alpha??1).toHexa();if(l.fill){if(l.fill instanceof lo){const c=l.fill,f=t.createPattern(c.texture.source.resource,"repeat"),m=c.transform.copyTo(vt.shared);return m.scale(c.texture.source.pixelWidth,c.texture.source.pixelHeight),f.setTransform(m),f}else if(l.fill instanceof Vi){const c=l.fill,f=c.type==="linear",m=c.textureSpace==="local";let p=1,g=1;m&&n&&(p=n.width+a,g=n.height+a);let x,b=!1;if(f){const{start:_,end:S}=c;x=t.createLinearGradient(_.x*p+r,_.y*g+u,S.x*p+r,S.y*g+u),b=Math.abs(S.x-_.x)<Math.abs((S.y-_.y)*.1)}else{const{center:_,innerRadius:S,outerCenter:A,outerRadius:T}=c;x=t.createRadialGradient(_.x*p+r,_.y*g+u,S*p,A.x*p+r,A.y*g+u,T*p)}if(b&&m&&n){const _=n.lineHeight/g;for(let S=0;S<n.lines.length;S++){const A=(S*n.lineHeight+a/2)/g;c.colorStops.forEach(T=>{let w=A+T.offset*_;w=Math.max(0,Math.min(1,w)),x.addColorStop(Math.floor(w*cy)/cy,ne.shared.setValue(T.color).toHex())})}}else c.colorStops.forEach(_=>{x.addColorStop(_.offset,ne.shared.setValue(_.color).toHex())});return x}}else{const c=t.createPattern(l.texture.source.resource,"repeat"),f=l.matrix.copyTo(vt.shared);return f.scale(l.texture.source.pixelWidth,l.texture.source.pixelHeight),c.setTransform(f),c}return ve("FillStyle not recognised",l),"red"}const hy=new Kt;function Ns(l){let t=0;for(let n=0;n<l.length;n++)l.charCodeAt(n)===32&&t++;return t}class I2{getCanvasAndContext(t){const{text:n,style:a,resolution:r=1}=t,u=a._getFinalPadding(),c=_n.measureText(n||" ",a),f=Math.ceil(Math.ceil(Math.max(1,c.width)+u*2)*r),m=Math.ceil(Math.ceil(Math.max(1,c.height)+u*2)*r),p=_h.getOptimalCanvasAndContext(f,m);this._renderTextToCanvas(a,u,r,p,c);const g=a.trim?R2({canvas:p.canvas,width:f,height:m,resolution:1,output:hy}):hy.set(0,0,f,m);return{canvasAndContext:p,frame:g}}returnCanvasAndContext(t){_h.returnCanvasAndContext(t)}_renderTextToCanvas(t,n,a,r,u){var k,G,$;if(u.runsByLine&&u.runsByLine.length>0){this._renderTaggedTextToCanvas(u,t,n,a,r);return}const{canvas:c,context:f}=r,m=bh(t),p=u.lines,g=u.lineHeight,x=u.lineWidths,b=u.maxLineWidth,_=u.fontProperties,S=c.height;if(f.resetTransform(),f.scale(a,a),f.textBaseline=t.textBaseline,(k=t._stroke)!=null&&k.width){const Q=t._stroke;f.lineWidth=Q.width,f.miterLimit=Q.miterLimit,f.lineJoin=Q.join,f.lineCap=Q.cap}f.font=m;let A,T;const w=t.dropShadow?2:1,E=t.wordWrap?Math.max(t.wordWrapWidth,b):b,O=(((G=t._stroke)==null?void 0:G.width)??0)/2;let q=(g-_.fontSize)/2;g-_.fontSize<0&&(q=0);for(let Q=0;Q<w;++Q){const W=t.dropShadow&&Q===0,K=W?Math.ceil(Math.max(1,S)+n*2):0,J=K*a;if(W)this._setupDropShadow(f,t,a,J);else{const it=t._gradientBounds,nt=t._gradientOffset;if(it){const Tt={width:it.width,height:it.height,lineHeight:it.height,lines:u.lines};this._setFillAndStrokeStyles(f,t,Tt,n,O,(nt==null?void 0:nt.x)??0,(nt==null?void 0:nt.y)??0)}else nt?this._setFillAndStrokeStyles(f,t,u,n,O,nt.x,nt.y):this._setFillAndStrokeStyles(f,t,u,n,O);f.shadowColor="rgba(0,0,0,0)"}for(let it=0;it<p.length;it++){A=O,T=O+it*g+_.ascent+q,A+=this._getAlignmentOffset(x[it],E,t.align);let nt=0;if(t.align==="justify"&&t.wordWrap&&it<p.length-1){const Tt=Ns(p[it]);Tt>0&&(nt=(E-x[it])/Tt)}($=t._stroke)!=null&&$.width&&this._drawLetterSpacing(p[it],t,r,A+n,T+n-K,!0,nt),t._fill!==void 0&&this._drawLetterSpacing(p[it],t,r,A+n,T+n-K,!1,nt)}}}_renderTaggedTextToCanvas(t,n,a,r,u){var O,q,k;const{canvas:c,context:f}=u,{runsByLine:m,lineWidths:p,maxLineWidth:g,lineAscents:x,lineHeights:b,hasDropShadow:_}=t,S=c.height;f.resetTransform(),f.scale(r,r),f.textBaseline=n.textBaseline;const A=_?2:1,T=n.wordWrap?Math.max(n.wordWrapWidth,g):g;let w=((O=n._stroke)==null?void 0:O.width)??0;for(const G of m)for(const $ of G){const Q=((q=$.style._stroke)==null?void 0:q.width)??0;Q>w&&(w=Q)}const E=w/2,D=[];for(let G=0;G<m.length;G++){const $=m[G],Q=[];for(const W of $){const K=bh(W.style);f.font=K,Q.push({width:_n._measureText(W.text,W.style.letterSpacing,f),font:K})}D.push(Q)}for(let G=0;G<A;++G){const $=_&&G===0,Q=$?Math.ceil(Math.max(1,S)+a*2):0,W=Q*r;$||(f.shadowColor="rgba(0,0,0,0)");let K=E;for(let J=0;J<m.length;J++){const it=m[J],nt=p[J],Tt=x[J],z=b[J],L=D[J];let et=E;et+=this._getAlignmentOffset(nt,T,n.align);let Z=0;if(n.align==="justify"&&n.wordWrap&&J<m.length-1){let Y=0;for(const F of it)Y+=Ns(F.text);Y>0&&(Z=(T-nt)/Y)}const at=K+Tt;let M=et+a;for(let Y=0;Y<it.length;Y++){const F=it[Y],{width:I,font:rt}=L[Y];if(f.font=rt,f.textBaseline=F.style.textBaseline,(k=F.style._stroke)!=null&&k.width){const ft=F.style._stroke;if(f.lineWidth=ft.width,f.miterLimit=ft.miterLimit,f.lineJoin=ft.join,f.lineCap=ft.cap,$)if(F.style.dropShadow)this._setupDropShadow(f,F.style,r,W);else{const Ht=Ns(F.text);M+=I+Ht*Z;continue}else{const Ht=_n.measureFont(rt),Mt=F.style.lineHeight||Ht.fontSize,qe={width:I,height:Mt,lineHeight:Mt,lines:[F.text]};f.strokeStyle=Qr(ft,f,qe,a*2,M-a,K)}this._drawLetterSpacing(F.text,F.style,u,M,at+a-Q,!0,Z)}const ct=Ns(F.text);M+=I+ct*Z}M=et+a;for(let Y=0;Y<it.length;Y++){const F=it[Y],{width:I,font:rt}=L[Y];if(f.font=rt,f.textBaseline=F.style.textBaseline,F.style._fill!==void 0){if($)if(F.style.dropShadow)this._setupDropShadow(f,F.style,r,W);else{const ft=Ns(F.text);M+=I+ft*Z;continue}else{const ft=_n.measureFont(rt),Ht=F.style.lineHeight||ft.fontSize,Mt={width:I,height:Ht,lineHeight:Ht,lines:[F.text]};f.fillStyle=Qr(F.style._fill,f,Mt,a*2,M-a,K)}this._drawLetterSpacing(F.text,F.style,u,M,at+a-Q,!1,Z)}const ct=Ns(F.text);M+=I+ct*Z}K+=z}}}_setFillAndStrokeStyles(t,n,a,r,u,c=0,f=0){var m;if(t.fillStyle=n._fill?Qr(n._fill,t,a,r*2,c,f):null,(m=n._stroke)!=null&&m.width){const p=u+r*2;t.strokeStyle=Qr(n._stroke,t,a,p,c,f)}}_setupDropShadow(t,n,a,r){t.fillStyle="black",t.strokeStyle="black";const u=n.dropShadow,c=u.color,f=u.alpha;t.shadowColor=ne.shared.setValue(c).setAlpha(f).toRgbaString();const m=u.blur*a,p=u.distance*a;t.shadowBlur=m,t.shadowOffsetX=Math.cos(u.angle)*p,t.shadowOffsetY=Math.sin(u.angle)*p+r}_getAlignmentOffset(t,n,a){return a==="right"?n-t:a==="center"?(n-t)/2:0}_drawLetterSpacing(t,n,a,r,u,c=!1,f=0){const{context:m}=a,p=n.letterSpacing;let g=!1;if(_n.experimentalLetterSpacingSupported&&(_n.experimentalLetterSpacing?(m.letterSpacing=`${p}px`,m.textLetterSpacing=`${p}px`,g=!0):(m.letterSpacing="0px",m.textLetterSpacing="0px")),(p===0||g)&&f===0){c?m.strokeText(t,r,u):m.fillText(t,r,u);return}if(f!==0&&(p===0||g)){const A=t.split(" ");let T=r;const w=m.measureText(" ").width;for(let E=0;E<A.length;E++)c?m.strokeText(A[E],T,u):m.fillText(A[E],T,u),T+=m.measureText(A[E]).width+w+f;return}let x=r;const b=_n.graphemeSegmenter(t);let _=m.measureText(t).width,S=0;for(let A=0;A<b.length;++A){const T=b[A];c?m.strokeText(T,x,u):m.fillText(T,x,u);let w="";for(let E=A+1;E<b.length;++E)w+=b[E];S=m.measureText(w).width,x+=_-S+p,T===" "&&(x+=f),_=S}}}const Xs=new I2,jh=class Fn extends bi{constructor(t={}){super(),this.uid=Qt("textStyle"),this._tick=0,this._cachedFontString=null,J2(t),t instanceof Fn&&(t=t._toObject());const r={...Fn.defaultTextStyle,...t};for(const u in r){const c=u;this[c]=r[u]}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({...Fn.defaultDropShadow,...t}):this._dropShadow=t?this._createProxy({...Fn.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({...fi.defaultFillStyle,...t},()=>{this._fill=Qn({...this._originalFill},fi.defaultFillStyle)})),this._fill=Qn(t===0?"black":t,fi.defaultFillStyle),this.update())}get stroke(){return this._originalStroke}set stroke(t){t!==this._originalStroke&&(this._originalStroke=t,this._isFillStyle(t)&&(this._originalStroke=this._createProxy({...fi.defaultStrokeStyle,...t},()=>{this._stroke=to({...this._originalStroke},fi.defaultStrokeStyle)})),this._stroke=to(t,fi.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=Fn.defaultTextStyle;for(const n in t)this[n]=t[n]}assign(t){for(const n in t){const a=n;this[a]=t[n]}return this}get styleKey(){return`${this.uid}-${this._tick}`}get _fontString(){return this._cachedFontString===null&&(this._cachedFontString=bh(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 Fn(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 a,r,u,c;if(this.removeAllListeners(),typeof t=="boolean"?t:t==null?void 0:t.texture){const f=typeof t=="boolean"?t:t==null?void 0:t.textureSource;(a=this._fill)!=null&&a.texture&&this._fill.texture.destroy(f),(r=this._originalFill)!=null&&r.texture&&this._originalFill.texture.destroy(f),(u=this._stroke)!=null&&u.texture&&this._stroke.texture.destroy(f),(c=this._originalStroke)!=null&&c.texture&&this._originalStroke.texture.destroy(f)}this._fill=null,this._stroke=null,this.dropShadow=null,this._originalStroke=null,this._originalFill=null}_createProxy(t,n){return new Proxy(t,{set:(a,r,u)=>(a[r]===u||(a[r]=u,n==null||n(r,u),this.update()),!0)})}_isFillStyle(t){return(t??null)!==null&&!(ne.isColorLike(t)||t instanceof Vi||t instanceof lo)}};jh.defaultDropShadow={alpha:1,angle:Math.PI/6,blur:0,color:"black",distance:5};jh.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 Zn=jh;function J2(l){const t=l;if(typeof t.dropShadow=="boolean"&&t.dropShadow){const n=Zn.defaultDropShadow;l.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){At(Ft,"strokeThickness is now a part of stroke");const n=t.stroke;let a={};if(ne.isColorLike(n))a.color=n;else if(n instanceof Vi||n instanceof lo)a.fill=n;else if(Object.hasOwnProperty.call(n,"color")||Object.hasOwnProperty.call(n,"fill"))a=n;else throw new Error("Invalid stroke value.");l.stroke={...a,width:t.strokeThickness}}if(Array.isArray(t.fillGradientStops)){if(At(Ft,"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&&ve("The number of fill colors must match the number of fill gradient stops.");const n=new Vi({start:{x:0,y:0},end:{x:0,y:1},textureSpace:"local"}),a=t.fillGradientStops.slice(),r=t.fill.map(u=>ne.shared.setValue(u).toNumber());a.forEach((u,c)=>{n.addColorStop(u,r[c])}),l.fill={fill:n}}}function $2(l,t){const{texture:n,bounds:a}=l,r=t._style._getFinalPadding();_y(a,t._anchor,n);const u=t._anchor._x*r*2,c=t._anchor._y*r*2;a.minX-=r-u,a.minY-=r-c,a.maxX-=r-u,a.maxY-=r-c}class tT{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 eT extends tT{}class N0{constructor(t){this._renderer=t,t.runners.resolutionChange.add(this),this._managedTexts=new fl({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),a=t.styleKey;return n.currentKey!==a?!0:t._didTextUpdate}addRenderable(t,n){const a=this._getGpuText(t);if(t._didTextUpdate){const r=t._autoResolution?this._renderer.resolution:t.resolution;(a.currentKey!==t.styleKey||t._resolution!==r)&&this._updateGpuText(t),t._didTextUpdate=!1,$2(a,t)}this._renderer.renderPipes.batch.addToBatch(a,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 eT;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:a}=this._renderer;a.getReferenceCount(n.currentKey)>0?a.decreaseReferenceCount(n.currentKey):n.texture&&a.returnTexture(n.texture)}destroy(){this._managedTexts.destroy(),this._renderer=null}}N0.extension={type:[gt.WebGLPipes,gt.WebGPUPipes,gt.CanvasPipes],name:"text"};const iT=new ni;function nT(l,t,n,a,r=!1){const u=iT;u.minX=0,u.minY=0,u.maxX=l.width/a|0,u.maxY=l.height/a|0;const c=io.getOptimalTexture(u.width,u.height,a,!1,r);return c.source.uploadMethodId="image",c.source.resource=l,c.source.alphaMode="premultiply-alpha-on-upload",c.frame.width=t/a,c.frame.height=n/a,c.source.emit("update",c.source),c.updateUvs(),c}class k0{constructor(t,n){this._activeTextures={},this._renderer=t,this._retainCanvasContext=n}getTexture(t,n,a,r){typeof t=="string"&&(At("8.0.0","CanvasTextSystem.getTexture: Use object TextOptions instead of separate arguments"),t={text:t,style:a,resolution:n}),t.style instanceof Zn||(t.style=new Zn(t.style)),t.textureStyle instanceof Vs||(t.textureStyle=new Vs(t.textureStyle)),typeof t.text!="string"&&(t.text=t.text.toString());const{text:u,style:c,textureStyle:f,autoGenerateMipmaps:m}=t,p=t.resolution??this._renderer.resolution,{frame:g,canvasAndContext:x}=Xs.getCanvasAndContext({text:u,style:c,resolution:p}),b=nT(x.canvas,g.width,g.height,p,m);if(f&&(b.source.style=f),c.trim&&(g.pad(c.padding),b.frame.copyFrom(g),b.frame.scale(1/p),b.updateUvs()),c.filters){const _=this._applyFilters(b,c.filters);return this.returnTexture(b),Xs.returnCanvasAndContext(x),_}return this._renderer.texture.initSource(b._source),this._retainCanvasContext||Xs.returnCanvasAndContext(x),b}returnTexture(t){const n=t.source,a=n.resource;if(this._retainCanvasContext&&(a!=null&&a.getContext)){const r=a.getContext("2d");r&&Xs.returnCanvasAndContext({canvas:a,context:r})}n.resource=null,n.uploadMethodId="unknown",n.alphaMode="no-premultiply-alpha",io.returnTexture(t,!0)}renderTextToCanvas(){At("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 a=this.getTexture({text:t.text,style:t.style,resolution:t._resolution,textureStyle:t.textureStyle,autoGenerateMipmaps:t.autoGenerateMipmaps});return this._activeTextures[n]={texture:a,usageCount:1},a}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 a=this._renderer.renderTarget.renderTarget,r=this._renderer.filter.generateFilteredTexture({texture:t,filters:n});return this._renderer.renderTarget.bind(a,!1),r}destroy(){this._renderer=null;for(const t in this._activeTextures)this._activeTextures[t]&&this.returnTexture(this._activeTextures[t].texture);this._activeTextures=null}}class H0 extends k0{constructor(t){super(t,!0)}}H0.extension={type:[gt.CanvasSystem],name:"canvasText"};class L0 extends k0{constructor(t){super(t,!1)}}L0.extension={type:[gt.WebGLSystem,gt.WebGPUSystem],name:"canvasText"};It.add(H0);It.add(L0);It.add(N0);class vh extends w2{constructor(...t){const n=C2(t,"Text");super(n,Zn),this.renderPipeId="text",n.textureStyle&&(this.textureStyle=n.textureStyle instanceof Vs?n.textureStyle:new Vs(n.textureStyle)),this.autoGenerateMipmaps=n.autoGenerateMipmaps??ai.defaultOptions.autoGenerateMipmaps}updateBounds(){const t=this._bounds,n=this._anchor;let a=0,r=0;if(this._style.trim){const{frame:u,canvasAndContext:c}=Xs.getCanvasAndContext({text:this.text,style:this._style,resolution:1});Xs.returnCanvasAndContext(c),a=u.width,r=u.height}else{const u=_n.measureText(this._text,this._style);a=u.width,r=u.height}t.minX=-n._x*a,t.maxX=t.minX+a,t.minY=-n._y*r,t.maxY=t.minY+r}}It.add(R1,z1);const Sh=64,Kr=32;function de(l,t){return{x:(l-t)*(Sh/2),y:(l+t)*(Kr/2)}}const Ls=[{id:"ceo-office",label:"CEO Office",col:0,row:0,w:4,h:3,color:"#ffd700",floorColor:"#2a2010",wallColor:"#3d3018",icon:"👑"},{id:"cto-office",label:"CTO Office",col:5,row:0,w:4,h:3,color:"#00bfff",floorColor:"#0f1e28",wallColor:"#183040",icon:"🔬"},{id:"arch-lab",label:"Arch Lab",col:10,row:0,w:4,h:3,color:"#b57edc",floorColor:"#1e1028",wallColor:"#2d1840",icon:"🏛️"},{id:"dev-bullpen",label:"Dev Bullpen",col:0,row:4,w:6,h:4,color:"#50c878",floorColor:"#102a18",wallColor:"#184020",icon:"⚡"},{id:"qa-lab",label:"QA Lab",col:7,row:4,w:4,h:4,color:"#ff8c00",floorColor:"#281a08",wallColor:"#402810",icon:"🔍"},{id:"design-studio",label:"Design Studio",col:12,row:4,w:4,h:4,color:"#8a2be2",floorColor:"#1a1028",wallColor:"#2a1840",icon:"🎨"},{id:"data-lab",label:"Data Lab",col:0,row:9,w:4,h:3,color:"#708090",floorColor:"#181c20",wallColor:"#283038",icon:"📊"},{id:"meeting-room",label:"Meeting Room",col:5,row:9,w:5,h:3,color:"#4169e1",floorColor:"#101828",wallColor:"#182840",icon:"🤝"},{id:"lounge",label:"Lounge",col:11,row:9,w:5,h:3,color:"#00ced1",floorColor:"#0a2028",wallColor:"#103038",icon:"☕"},{id:"crisis-room",label:"Crisis Room",col:5,row:13,w:5,h:3,color:"#dc143c",floorColor:"#280a0a",wallColor:"#401010",icon:"🚨"}],j0=[{room:"ceo-office",seat:0,col:2,row:1},{room:"cto-office",seat:0,col:7,row:1},{room:"arch-lab",seat:0,col:12,row:1},{room:"dev-bullpen",seat:0,col:2,row:5},{room:"dev-bullpen",seat:1,col:4,row:6},{room:"qa-lab",seat:0,col:8,row:5},{room:"qa-lab",seat:1,col:10,row:6},{room:"design-studio",seat:0,col:13,row:5},{room:"design-studio",seat:1,col:15,row:6},{room:"data-lab",seat:0,col:2,row:10},{room:"meeting-room",seat:0,col:7,row:10},{room:"lounge",seat:0,col:13,row:10},{room:"crisis-room",seat:0,col:7,row:14}],sT=[{room:"ceo-office",type:"desk",col:1.5,row:1},{room:"ceo-office",type:"monitor",col:1.8,row:.8},{room:"ceo-office",type:"plant",col:.5,row:.3},{room:"ceo-office",type:"shelf",col:3.2,row:.3},{room:"cto-office",type:"desk",col:6.5,row:1},{room:"cto-office",type:"monitor",col:6.8,row:.8},{room:"cto-office",type:"monitor",col:7.3,row:.8},{room:"cto-office",type:"server",col:8.3,row:.3},{room:"arch-lab",type:"desk",col:11.5,row:1},{room:"arch-lab",type:"monitor",col:11.8,row:.8},{room:"arch-lab",type:"whiteboard",col:13,row:.3},{room:"dev-bullpen",type:"desk",col:1.5,row:5},{room:"dev-bullpen",type:"monitor",col:1.8,row:4.8},{room:"dev-bullpen",type:"desk",col:3.5,row:6},{room:"dev-bullpen",type:"monitor",col:3.8,row:5.8},{room:"dev-bullpen",type:"plant",col:5,row:4.3},{room:"qa-lab",type:"desk",col:7.5,row:5},{room:"qa-lab",type:"monitor",col:7.8,row:4.8},{room:"qa-lab",type:"desk",col:9.5,row:6},{room:"qa-lab",type:"monitor",col:9.8,row:5.8},{room:"qa-lab",type:"server",col:10.5,row:4.3},{room:"design-studio",type:"desk",col:12.5,row:5},{room:"design-studio",type:"monitor",col:12.8,row:4.8},{room:"design-studio",type:"desk",col:14.5,row:6},{room:"design-studio",type:"whiteboard",col:15,row:4.3},{room:"data-lab",type:"desk",col:1.5,row:10},{room:"data-lab",type:"monitor",col:1.8,row:9.8},{room:"data-lab",type:"server",col:3,row:9.3},{room:"data-lab",type:"server",col:3.5,row:9.3},{room:"meeting-room",type:"table",col:7,row:10},{room:"meeting-room",type:"whiteboard",col:5.5,row:9.3},{room:"meeting-room",type:"plant",col:9.2,row:9.3},{room:"lounge",type:"couch",col:12,row:10},{room:"lounge",type:"couch",col:14,row:10},{room:"lounge",type:"coffee",col:13,row:10.5},{room:"lounge",type:"plant",col:15,row:9.3},{room:"lounge",type:"plant",col:11.3,row:9.3},{room:"crisis-room",type:"table",col:7,row:14},{room:"crisis-room",type:"monitor",col:5.5,row:13.3},{room:"crisis-room",type:"monitor",col:6.5,row:13.3},{room:"crisis-room",type:"monitor",col:7.5,row:13.3}];function Y0(l,t){return j0.find(n=>n.room===l&&n.seat===t)}const aT={sage:16766720,nova:49151,aria:11894492,dex:5294200,flux:4286945,quinn:16747520,gage:2142890,morgan:16738740,uma:9055202,river:52945,atlas:7372944},lT={sage:"👑",nova:"🔬",aria:"🏛️",dex:"⚡",flux:"🌊",quinn:"🔍",gage:"🚀",morgan:"📋",uma:"🎨",river:"🌀",atlas:"📊"},rT={coding:65416,reviewing:49151,testing:10181046,planning:16766720,blocked:16729156,deploying:16739125,thinking:13421772};class oT{constructor(t){le(this,"container");le(this,"body");le(this,"glow");le(this,"statusRing");le(this,"label");le(this,"emojiLabel");le(this,"bobOffset",Math.random()*Math.PI*2);le(this,"targetX",0);le(this,"targetY",0);le(this,"currentX",0);le(this,"currentY",0);this.container=new si,this.container.sortableChildren=!0;const n=aT[t.id]||13421772,a=new _e;a.ellipse(0,6,8,3),a.fill({color:0,alpha:.3}),a.zIndex=0,this.container.addChild(a),this.glow=new _e,this.glow.circle(0,-4,16),this.glow.fill({color:65416,alpha:.15}),this.glow.zIndex=1,this.glow.visible=!1,this.container.addChild(this.glow),this.body=new _e,this.drawPerson(this.body,n),this.body.zIndex=2,this.container.addChild(this.body),this.statusRing=new _e,this.statusRing.zIndex=3,this.statusRing.visible=!1,this.container.addChild(this.statusRing),this.emojiLabel=new vh({text:lT[t.id]||"●",style:new Zn({fontSize:12,fontFamily:"Apple Color Emoji, Segoe UI Emoji, sans-serif"})}),this.emojiLabel.anchor.set(.5,.5),this.emojiLabel.y=-24,this.emojiLabel.zIndex=4,this.container.addChild(this.emojiLabel),this.label=new vh({text:t.name,style:new Zn({fontSize:9,fill:n,fontFamily:"'Segoe UI', Arial, sans-serif",fontWeight:"bold",dropShadow:{color:"#000000",blur:3,distance:0}})}),this.label.anchor.set(.5,0),this.label.y=10,this.label.zIndex=5,this.container.addChild(this.label),this.setPositionFromRoom(t.position_room,t.position_seat),this.currentX=this.targetX,this.currentY=this.targetY,this.container.x=this.currentX,this.container.y=this.currentY}drawPerson(t,n){t.circle(0,-12,5),t.fill({color:15782048}),t.stroke({color:13676672,width:.5,alpha:.5}),t.poly([{x:-6,y:-7},{x:6,y:-7},{x:5,y:2},{x:-5,y:2}]),t.fill({color:n}),t.stroke({color:16777215,width:.3,alpha:.2}),t.poly([{x:-5,y:2},{x:-3,y:2},{x:-2,y:8},{x:-5,y:8}]),t.fill({color:2763322,alpha:.9}),t.poly([{x:3,y:2},{x:5,y:2},{x:5,y:8},{x:2,y:8}]),t.fill({color:2763322,alpha:.9})}setPositionFromRoom(t,n){const a=Y0(t,n);if(a){const r=de(a.col,a.row);this.targetX=r.x,this.targetY=r.y}}update(t){this.setPositionFromRoom(t.position_room,t.position_seat);const n=this.targetX-this.currentX,a=this.targetY-this.currentY,r=Math.sqrt(n*n+a*a);if(r>1){const p=Math.min(r*.08,3);this.currentX+=n/r*p,this.currentY+=a/r*p}else this.currentX=this.targetX,this.currentY=this.targetY;this.bobOffset+=.03;const u=t.status!=="idle",c=u?0:Math.sin(this.bobOffset)*1.2,f=u?Math.sin(this.bobOffset*3)*.8:0;this.container.x=this.currentX,this.container.y=this.currentY+c+f,this.container.zIndex=this.currentY+100;const m=rT[t.status];m&&u?(this.glow.visible=!0,this.glow.clear(),this.glow.circle(0,-4,14+Math.sin(this.bobOffset*2)*2),this.glow.fill({color:m,alpha:.12+Math.sin(this.bobOffset*2)*.06}),this.statusRing.visible=!0,this.statusRing.clear(),this.statusRing.ellipse(0,6,8,3),this.statusRing.stroke({color:m,width:1.5,alpha:.4+Math.sin(this.bobOffset*2)*.2})):(this.glow.visible=!1,this.statusRing.visible=!1)}}const Za=18;class uT{constructor(){le(this,"app");le(this,"world");le(this,"agentSprites",new Map);le(this,"initialized",!1);this.app=new f0,this.world=new si}async init(t){this.initialized||(this.initialized=!0,await this.app.init({canvas:t,resizeTo:t.parentElement,background:526352,antialias:!0,autoDensity:!0,resolution:window.devicePixelRatio||1}),this.app.stage.addChild(this.world),this.world.sortableChildren=!0,this.centerCamera(),this.drawRooms(),window.addEventListener("resize",()=>this.centerCamera()))}centerCamera(){const t=this.app.screen.width,n=this.app.screen.height,a=de(8,8);this.world.x=t/2-a.x,this.world.y=n/3.5-a.y}drawRooms(){for(const t of Ls)this.drawRoom(t)}drawRoom(t){const n=new si;n.sortableChildren=!0;const a=de(t.col,t.row);n.zIndex=a.y;const r=parseInt(t.floorColor.slice(1),16),u=parseInt(t.wallColor.slice(1),16),c=parseInt(t.color.slice(1),16);for(let E=0;E<t.w;E++)for(let D=0;D<t.h;D++){const O=de(t.col+E,t.row+D),q=new _e,k=(E+D)%2===0?1:.85;q.poly([{x:0,y:0},{x:Sh/2,y:Kr/2},{x:0,y:Kr},{x:-Sh/2,y:Kr/2}]),q.fill({color:r,alpha:k}),q.stroke({color:c,width:.5,alpha:.08}),q.x=O.x,q.y=O.y,n.addChild(q)}const f=de(t.col,t.row+t.h),m=de(t.col,t.row),p=new _e;p.poly([{x:m.x,y:m.y},{x:m.x,y:m.y-Za},{x:f.x,y:f.y-Za},{x:f.x,y:f.y}]),p.fill({color:u,alpha:.7}),p.stroke({color:c,width:1,alpha:.3}),n.addChild(p);const g=de(t.col+t.w,t.row),x=new _e;x.poly([{x:m.x,y:m.y},{x:m.x,y:m.y-Za},{x:g.x,y:g.y-Za},{x:g.x,y:g.y}]),x.fill({color:u,alpha:.5}),x.stroke({color:c,width:1,alpha:.3}),n.addChild(x);const b=de(t.col+t.w,t.row+t.h),_=new _e;_.poly([{x:m.x,y:m.y},{x:g.x,y:g.y},{x:b.x,y:b.y},{x:f.x,y:f.y}]),_.stroke({color:c,width:1.5,alpha:.35}),n.addChild(_);for(const E of[m,g,b,f]){const D=new _e;D.circle(E.x,E.y,2),D.fill({color:c,alpha:.6}),n.addChild(D)}const S=de(t.col+t.w/2,t.row+.5),A=new vh({text:`${t.icon} ${t.label}`,style:new Zn({fontSize:11,fill:t.color,fontFamily:"'Segoe UI', 'Helvetica Neue', Arial, sans-serif",fontWeight:"bold",align:"center",dropShadow:{color:"#000000",blur:4,distance:0}})});A.anchor.set(.5,.5),A.x=S.x,A.y=S.y-Za-4,A.alpha=.85,n.addChild(A);const T=sT.filter(E=>E.room===t.id);for(const E of T)this.drawFurniture(n,E,c);const w=j0.filter(E=>E.room===t.id);for(const E of w){const D=de(E.col,E.row),O=new _e;O.circle(D.x,D.y+2,5),O.fill({color:c,alpha:.08}),n.addChild(O)}this.world.addChild(n)}drawFurniture(t,n,a){const r=de(n.col,n.row),u=new _e;switch(n.type){case"desk":{u.poly([{x:r.x,y:r.y-6},{x:r.x+20,y:r.y+4},{x:r.x,y:r.y+14},{x:r.x-20,y:r.y+4}]),u.fill({color:3813412,alpha:.9}),u.stroke({color:5917236,width:1,alpha:.5}),u.moveTo(r.x+18,r.y+4),u.lineTo(r.x+18,r.y+10),u.moveTo(r.x-18,r.y+4),u.lineTo(r.x-18,r.y+10),u.stroke({color:2760728,width:2,alpha:.6});break}case"monitor":{u.rect(r.x-5,r.y-12,10,8),u.fill({color:1714746,alpha:.9}),u.stroke({color:a,width:.8,alpha:.6}),u.rect(r.x-4,r.y-11,8,6),u.fill({color:a,alpha:.15}),u.rect(r.x-1,r.y-4,2,4),u.fill({color:3355443,alpha:.8});break}case"chair":{u.circle(r.x,r.y,4),u.fill({color:2763322,alpha:.6});break}case"table":{u.poly([{x:r.x,y:r.y-6},{x:r.x+28,y:r.y+8},{x:r.x,y:r.y+22},{x:r.x-28,y:r.y+8}]),u.fill({color:2762784,alpha:.85}),u.stroke({color:4866096,width:1,alpha:.4});break}case"plant":{u.poly([{x:r.x-4,y:r.y+2},{x:r.x+4,y:r.y+2},{x:r.x+3,y:r.y+8},{x:r.x-3,y:r.y+8}]),u.fill({color:7029286,alpha:.8}),u.circle(r.x,r.y-2,6),u.fill({color:2984526,alpha:.8}),u.circle(r.x-3,r.y,4),u.fill({color:1993530,alpha:.7}),u.circle(r.x+3,r.y-1,4),u.fill({color:3908957,alpha:.7});break}case"shelf":{u.rect(r.x-10,r.y-8,20,3),u.fill({color:3813412,alpha:.8}),u.rect(r.x-10,r.y-2,20,3),u.fill({color:3813412,alpha:.8});for(let c=0;c<4;c++){const f=r.x-8+c*5;u.rect(f,r.y-12,3,4),u.fill({color:[4878245,12865106,9419919,13935988][c],alpha:.7})}break}case"server":{u.rect(r.x-5,r.y-14,10,18),u.fill({color:1710638,alpha:.9}),u.stroke({color:3355477,width:1,alpha:.5});for(let c=0;c<4;c++)u.circle(r.x-2,r.y-10+c*4,1),u.fill({color:c%2===0?65416:49151,alpha:.8});break}case"whiteboard":{u.rect(r.x-12,r.y-10,24,16),u.fill({color:15263976,alpha:.15}),u.stroke({color:8947848,width:1,alpha:.3}),u.moveTo(r.x-8,r.y-5),u.lineTo(r.x+6,r.y-3),u.moveTo(r.x-6,r.y),u.lineTo(r.x+8,r.y+1),u.moveTo(r.x-4,r.y+4),u.lineTo(r.x+4,r.y+3),u.stroke({color:a,width:.8,alpha:.3});break}case"couch":{u.poly([{x:r.x-12,y:r.y},{x:r.x+12,y:r.y},{x:r.x+10,y:r.y+8},{x:r.x-10,y:r.y+8}]),u.fill({color:2767434,alpha:.8}),u.rect(r.x-12,r.y-4,24,5),u.fill({color:1714746,alpha:.8});break}case"coffee":{u.poly([{x:r.x,y:r.y-2},{x:r.x+10,y:r.y+3},{x:r.x,y:r.y+8},{x:r.x-10,y:r.y+3}]),u.fill({color:3813412,alpha:.7}),u.circle(r.x,r.y+2,2.5),u.fill({color:14329120,alpha:.5});break}}t.addChild(u)}updateAgents(t){for(const n of t){let a=this.agentSprites.get(n.id);a||(a=new oT(n),this.agentSprites.set(n.id,a),this.world.addChild(a.container)),a.update(n)}}destroy(){window.removeEventListener("resize",()=>this.centerCamera()),this.app.destroy(!0)}}class cT{constructor(){le(this,"container");le(this,"particles",[]);this.container=new si}confetti(t,n){const a=[16766720,65416,49151,16738740,16739125];for(let r=0;r<30;r++){const u=Math.random()*Math.PI*2,c=1+Math.random()*3;this.addParticle(t,n,Math.cos(u)*c,Math.sin(u)*c-2,60+Math.random()*40,a[Math.floor(Math.random()*a.length)],2+Math.random()*3)}}redPulse(t,n){for(let a=0;a<12;a++){const r=a/12*Math.PI*2;this.addParticle(t,n,Math.cos(r)*1.5,Math.sin(r)*1.5,50,16729156,4)}}greenFlash(t,n){for(let a=0;a<8;a++){const r=a/8*Math.PI*2;this.addParticle(t,n,Math.cos(r)*2,Math.sin(r)*2-1,40,65416,3)}}addParticle(t,n,a,r,u,c,f){const m=new _e;m.rect(-f/2,-f/2,f,f),m.fill({color:c}),m.x=t,m.y=n,this.container.addChild(m),this.particles.push({x:t,y:n,vx:a,vy:r,life:u,maxLife:u,color:c,size:f,gfx:m})}tick(){for(let t=this.particles.length-1;t>=0;t--){const n=this.particles[t];n.x+=n.vx,n.y+=n.vy,n.vy+=.05,n.life--,n.gfx.x=n.x,n.gfx.y=n.y,n.gfx.alpha=n.life/n.maxLife,n.life<=0&&(this.container.removeChild(n.gfx),n.gfx.destroy(),this.particles.splice(t,1))}}}function hT(l){const t=ii.useRef(null),n=ii.useRef(null);return ii.useEffect(()=>{const a=document.getElementById(l);if(!a)return;const r=new uT,u=new cT;return t.current=r,n.current=u,r.init(a).then(()=>{r.world.addChild(u.container),r.app.ticker.add(()=>{const c=Rt.getState();r.updateAgents(c.agents.map(m=>({id:m.id,name:m.name,status:m.status,position_room:m.position_room,position_seat:m.position_seat})));let f=c.popWow();for(;f;)fT(f,u),f=c.popWow();u.tick()})}),()=>{r.destroy()}},[l]),{officeRef:t,effectsRef:n}}function fT(l,t){if(l)switch(l.type){case"pr:merged":{const n=Ls.find(a=>a.id==="dev-bullpen");if(n){const a=de(n.col+n.w/2,n.row+n.h/2);t.confetti(a.x,a.y)}break}case"crisis:start":{const n=Ls.find(a=>a.id==="crisis-room");if(n){const a=de(n.col+n.w/2,n.row+n.h/2);t.redPulse(a.x,a.y)}break}case"crisis:resolved":{const n=Ls.find(a=>a.id==="crisis-room");if(n){const a=de(n.col+n.w/2,n.row+n.h/2);t.greenFlash(a.x,a.y)}break}case"deploy:success":{const n=Y0("qa-lab",1);if(n){const a=de(n.col,n.row);t.confetti(a.x,a.y),t.greenFlash(a.x,a.y)}break}case"sprint:complete":{const n=Ls.find(a=>a.id==="lounge");if(n){const a=de(n.col+n.w/2,n.row+n.h/2);t.confetti(a.x,a.y),t.confetti(a.x+30,a.y-10),t.confetti(a.x-30,a.y+10)}break}case"meeting:start":{const n=Ls.find(a=>a.id==="meeting-room");if(n){const a=de(n.col+n.w/2,n.row+n.h/2);t.greenFlash(a.x,a.y)}break}}}const dT={sage:"👑",nova:"🔮",aria:"🏛️",dex:"⚡",flux:"🌊",quinn:"🔍",gage:"⚙️",morgan:"📋",uma:"🎨",river:"🌀",atlas:"📊"},mT={sage:"#FFD700",nova:"#00BFFF",aria:"#FF69B4",dex:"#00FF88",flux:"#FF6B35",quinn:"#9B59B6",gage:"#34495E",morgan:"#E74C3C",uma:"#1ABC9C",river:"#3498DB",atlas:"#F39C12"},pT={idle:"#555",coding:"#00ff88",reviewing:"#00bfff",testing:"#9b59b6",planning:"#ffd700",meeting:"#ff69b4",blocked:"#ff4444",deploying:"#ff6b35"};function gT(){const l=Rt(t=>t.agents);return tt.jsxs("div",{className:"agent-bar",children:[tt.jsx("div",{className:"agent-bar-logo",children:"SAGE TEAM"}),tt.jsx("div",{className:"agent-bar-list",children:l.map(t=>tt.jsxs("div",{className:"agent-bar-item",title:`${t.name} — ${t.role} (${t.status})`,children:[tt.jsx("span",{className:"agent-emoji",children:dT[t.id]||"🤖"}),tt.jsx("span",{className:"agent-name",style:{color:mT[t.id]||"#aaa"},children:t.name}),tt.jsx("span",{className:"status-dot",style:{background:pT[t.status]||"#555"}})]},t.id))})]})}const yT={sage:"#FFD700",nova:"#00BFFF",aria:"#FF69B4",dex:"#00FF88",flux:"#FF6B35",quinn:"#9B59B6",gage:"#34495E",morgan:"#E74C3C",uma:"#1ABC9C",river:"#3498DB",atlas:"#F39C12"};function xT(){const l=Rt(n=>n.messages),t=ii.useRef(null);return ii.useEffect(()=>{var n;(n=t.current)==null||n.scrollIntoView({behavior:"smooth"})},[l.length]),tt.jsxs("div",{className:"chat-panel",children:[tt.jsx("div",{className:"chat-header",children:"Activity"}),tt.jsxs("div",{className:"chat-messages",children:[l.length===0&&tt.jsx("div",{className:"chat-empty",children:"Waiting for activity..."}),l.map(n=>tt.jsxs("div",{className:"chat-msg",children:[tt.jsx("span",{className:"chat-author",style:{color:yT[n.from_agent]||"#888"},children:n.from_agent}),tt.jsx("span",{className:"chat-content",children:n.content})]},n.id)),tt.jsx("div",{ref:t})]})]})}function _T(){const l=Rt(m=>m.agents),t=Rt(m=>m.tasks),n=Rt(m=>m.sprint),a=l.filter(m=>m.status!=="idle"),r=t.filter(m=>m.status==="done").length,u=t.length,c=u>0?r/u:0,f=l.reduce((m,p)=>{const g=p.position_room;return m[g]||(m[g]=[]),m[g].push(p),m},{});return{agents:l,activeAgents:a,agentsByRoom:f,completedTasks:r,totalTasks:u,progress:c,sprint:n}}const bT={pending:"⏳",in_progress:"🔨",done:"✅",blocked:"🚫",review:"👀"};function vT(){const l=Rt(u=>u.tasks),{sprint:t,progress:n}=_T(),[a,r]=ii.useState(!1);return a?tt.jsx("div",{className:"task-board collapsed",onClick:()=>r(!1),children:tt.jsx("span",{className:"collapse-icon",children:"▶"})}):tt.jsxs("div",{className:"task-board",children:[tt.jsxs("div",{className:"task-board-header",onClick:()=>r(!0),children:[tt.jsx("span",{className:"collapse-icon",children:"◀"}),tt.jsx("span",{className:"task-board-title",children:"Sprint"})]}),t&&tt.jsxs("div",{className:"sprint-info",children:[tt.jsx("div",{className:"sprint-name",children:t.name}),tt.jsx("div",{className:"sprint-progress-bar",children:tt.jsx("div",{className:"sprint-progress-fill",style:{width:`${n*100}%`}})}),tt.jsxs("div",{className:"sprint-progress-text",children:[Math.round(n*100),"% complete"]})]}),tt.jsxs("div",{className:"task-list",children:[l.length===0&&tt.jsx("div",{className:"task-empty",children:"No tasks yet. Submit a goal to start."}),l.map(u=>tt.jsxs("div",{className:`task-item status-${u.status}`,children:[tt.jsx("span",{className:"task-status-icon",children:bT[u.status]||"📦"}),tt.jsxs("div",{className:"task-info",children:[tt.jsx("div",{className:"task-title",children:u.title}),u.assigned_to&&tt.jsx("div",{className:"task-assignee",children:u.assigned_to})]})]},u.id))]})]})}function ST(){const l=Rt(u=>u.prs),t=Rt(u=>u.selectedPR),n=Rt(u=>u.setSelectedPR),a=l.find(u=>u.id===t);if(!a)return null;async function r(u){try{await fetch(`/api/pr/${a.id}/${u}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({feedback:""})}),n(null)}catch{}}return tt.jsx("div",{className:"pr-overlay",onClick:()=>n(null),children:tt.jsxs("div",{className:"pr-modal",onClick:u=>u.stopPropagation(),children:[tt.jsxs("div",{className:"pr-modal-header",children:[tt.jsx("h3",{children:"Pull Request Review"}),tt.jsx("button",{className:"pr-close",onClick:()=>n(null),children:"×"})]}),tt.jsxs("div",{className:"pr-modal-body",children:[tt.jsxs("div",{className:"pr-field",children:[tt.jsx("span",{className:"pr-label",children:"Title:"})," ",a.title]}),tt.jsxs("div",{className:"pr-field",children:[tt.jsx("span",{className:"pr-label",children:"Branch:"})," ",tt.jsx("code",{children:a.branch})]}),tt.jsxs("div",{className:"pr-field",children:[tt.jsx("span",{className:"pr-label",children:"Author:"})," ",a.author_agent]}),tt.jsxs("div",{className:"pr-field",children:[tt.jsx("span",{className:"pr-label",children:"Status:"})," ",a.status]}),a.review_notes&&tt.jsxs("div",{className:"pr-review-notes",children:[tt.jsx("div",{className:"pr-label",children:"Review Notes:"}),tt.jsx("pre",{children:a.review_notes})]})]}),tt.jsxs("div",{className:"pr-modal-actions",children:[tt.jsx("button",{className:"pr-btn approve",onClick:()=>r("approve"),children:"Approve & Merge"}),tt.jsx("button",{className:"pr-btn reject",onClick:()=>r("reject"),children:"Request Changes"})]})]})})}function TT(){const[l,t]=ii.useState(""),[n,a]=ii.useState(!1),r=Rt(p=>p.connected),u=Rt(p=>p.prs),c=Rt(p=>p.setSelectedPR),f=u.filter(p=>p.status==="pending_review"||p.status==="agent_reviewed");async function m(p){if(p.preventDefault(),!(!l.trim()||n)){a(!0);try{await fetch("/api/goal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({goal:l.trim()})}),t("")}catch{}finally{a(!1)}}}return tt.jsxs("div",{className:"goal-bar",children:[f.length>0&&tt.jsx("div",{className:"pr-badges",children:f.map(p=>tt.jsxs("button",{className:"pr-badge",onClick:()=>c(p.id),children:["PR: ",p.title]},p.id))}),tt.jsxs("form",{className:"goal-form",onSubmit:m,children:[tt.jsx("input",{className:"goal-input",type:"text",placeholder:r?"Enter a goal for your team...":"Connecting...",value:l,onChange:p=>t(p.target.value),disabled:!r||n}),tt.jsx("button",{className:"goal-submit",type:"submit",disabled:!r||n||!l.trim(),children:n?"...":"Go"})]})]})}function AT(){const l=Rt(t=>t.connected);return C1(),hT("office-canvas"),tt.jsxs("div",{className:"app",children:[tt.jsx(gT,{}),tt.jsxs("div",{className:"main-area",children:[tt.jsx(vT,{}),tt.jsxs("div",{className:"canvas-container",children:[tt.jsx("canvas",{id:"office-canvas"}),!l&&tt.jsx("div",{className:"connection-overlay",children:tt.jsx("span",{children:"Connecting to Sage Team..."})})]}),tt.jsx(xT,{})]}),tt.jsx(TT,{}),tt.jsx(ST,{})]})}v1.createRoot(document.getElementById("root")).render(tt.jsx(ii.StrictMode,{children:tt.jsx(AT,{})}));export{io as $,l0 as A,ul as B,ne as C,Xe as D,bi as E,Vi as F,so as G,Rh as H,n0 as I,ai as J,Ky as K,_h as L,vt as M,oS as N,cS as O,ge as P,yS as Q,oh as R,zh as S,Ut as T,Jr as U,mS as V,Y1 as W,bS as X,ze as Y,Ty as Z,ni as _,Jy as a,mg as a0,sl as a1,tT as a2,xb as a3,gg as a4,kc as a5,yg as a6,bb as a7,Vs as a8,Kt as a9,Cy as aa,T2 as ab,r0 as ac,At as ad,hl as ae,Ft as af,Tv as ag,xv as ah,Vv as ai,kv as aj,uS as ak,hS as al,xS as am,gS as an,_S as ao,Fy as b,Gv as c,Re as d,Qt as e,kt as f,qb as g,Wr as h,gt as i,_e as j,NS as k,MS as l,wy as m,lo as n,Uy as o,It as p,Ys as q,eb as r,ao as s,si as t,tv as u,Dv as v,ve as w,fl as x,Dg as y,Zr as z};