opencode-pixel-office 1.0.10 → 1.1.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.
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var rh=Symbol.for("react.element"),H2=Symbol.for("react.portal"),j2=Symbol.for("react.fragment"),$2=Symbol.for("react.strict_mode"),W2=Symbol.for("react.profiler"),V2=Symbol.for("react.provider"),X2=Symbol.for("react.context"),Y2=Symbol.for("react.forward_ref"),Q2=Symbol.for("react.suspense"),K2=Symbol.for("react.memo"),q2=Symbol.for("react.lazy"),ex=Symbol.iterator;function Z2(t){return t===null||typeof t!="object"?null:(t=ex&&t[ex]||t["@@iterator"],typeof t=="function"?t:null)}var AS={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},CS=Object.assign,PS={};function fl(t,e,r){this.props=t,this.context=e,this.refs=PS,this.updater=r||AS}fl.prototype.isReactComponent={};fl.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};fl.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function IS(){}IS.prototype=fl.prototype;function e0(t,e,r){this.props=t,this.context=e,this.refs=PS,this.updater=r||AS}var t0=e0.prototype=new IS;t0.constructor=e0;CS(t0,fl.prototype);t0.isPureReactComponent=!0;var tx=Array.isArray,RS=Object.prototype.hasOwnProperty,r0={current:null},MS={key:!0,ref:!0,__self:!0,__source:!0};function kS(t,e,r){var n,i={},s=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)RS.call(e,n)&&!MS.hasOwnProperty(n)&&(i[n]=e[n]);var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){for(var h=Array(l),c=0;c<l;c++)h[c]=arguments[c+2];i.children=h}if(t&&t.defaultProps)for(n in l=t.defaultProps,l)i[n]===void 0&&(i[n]=l[n]);return{$$typeof:rh,type:t,key:s,ref:o,props:i,_owner:r0.current}}function J2(t,e){return{$$typeof:rh,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function n0(t){return typeof t=="object"&&t!==null&&t.$$typeof===rh}function eP(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var rx=/\/+/g;function Rm(t,e){return typeof t=="object"&&t!==null&&t.key!=null?eP(""+t.key):e.toString(36)}function dd(t,e,r,n,i){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case rh:case H2:o=!0}}if(o)return o=t,i=i(o),t=n===""?"."+Rm(o,0):n,tx(i)?(r="",t!=null&&(r=t.replace(rx,"$&/")+"/"),dd(i,e,r,"",function(c){return c})):i!=null&&(n0(i)&&(i=J2(i,r+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(rx,"$&/")+"/")+t)),e.push(i)),1;if(o=0,n=n===""?".":n+":",tx(t))for(var l=0;l<t.length;l++){s=t[l];var h=n+Rm(s,l);o+=dd(s,e,r,h,i)}else if(h=Z2(t),typeof h=="function")for(t=h.call(t),l=0;!(s=t.next()).done;)s=s.value,h=n+Rm(s,l++),o+=dd(s,e,r,h,i);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function mc(t,e,r){if(t==null)return t;var n=[],i=0;return dd(t,n,"","",function(s){return e.call(r,s,i++)}),n}function tP(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r)},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Ar={current:null},fd={transition:null},rP={ReactCurrentDispatcher:Ar,ReactCurrentBatchConfig:fd,ReactCurrentOwner:r0};function NS(){throw Error("act(...) is not supported in production builds of React.")}ze.Children={map:mc,forEach:function(t,e,r){mc(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return mc(t,function(){e++}),e},toArray:function(t){return mc(t,function(e){return e})||[]},only:function(t){if(!n0(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};ze.Component=fl;ze.Fragment=j2;ze.Profiler=W2;ze.PureComponent=e0;ze.StrictMode=$2;ze.Suspense=Q2;ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rP;ze.act=NS;ze.cloneElement=function(t,e,r){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var n=CS({},t.props),i=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=r0.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(h in e)RS.call(e,h)&&!MS.hasOwnProperty(h)&&(n[h]=e[h]===void 0&&l!==void 0?l[h]:e[h])}var h=arguments.length-2;if(h===1)n.children=r;else if(1<h){l=Array(h);for(var c=0;c<h;c++)l[c]=arguments[c+2];n.children=l}return{$$typeof:rh,type:t.type,key:i,ref:s,props:n,_owner:o}};ze.createContext=function(t){return t={$$typeof:X2,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:V2,_context:t},t.Consumer=t};ze.createElement=kS;ze.createFactory=function(t){var e=kS.bind(null,t);return e.type=t,e};ze.createRef=function(){return{current:null}};ze.forwardRef=function(t){return{$$typeof:Y2,render:t}};ze.isValidElement=n0;ze.lazy=function(t){return{$$typeof:q2,_payload:{_status:-1,_result:t},_init:tP}};ze.memo=function(t,e){return{$$typeof:K2,type:t,compare:e===void 0?null:e}};ze.startTransition=function(t){var e=fd.transition;fd.transition={};try{t()}finally{fd.transition=e}};ze.unstable_act=NS;ze.useCallback=function(t,e){return Ar.current.useCallback(t,e)};ze.useContext=function(t){return Ar.current.useContext(t)};ze.useDebugValue=function(){};ze.useDeferredValue=function(t){return Ar.current.useDeferredValue(t)};ze.useEffect=function(t,e){return Ar.current.useEffect(t,e)};ze.useId=function(){return Ar.current.useId()};ze.useImperativeHandle=function(t,e,r){return Ar.current.useImperativeHandle(t,e,r)};ze.useInsertionEffect=function(t,e){return Ar.current.useInsertionEffect(t,e)};ze.useLayoutEffect=function(t,e){return Ar.current.useLayoutEffect(t,e)};ze.useMemo=function(t,e){return Ar.current.useMemo(t,e)};ze.useReducer=function(t,e,r){return Ar.current.useReducer(t,e,r)};ze.useRef=function(t){return Ar.current.useRef(t)};ze.useState=function(t){return Ar.current.useState(t)};ze.useSyncExternalStore=function(t,e,r){return Ar.current.useSyncExternalStore(t,e,r)};ze.useTransition=function(){return Ar.current.useTransition()};ze.version="18.3.1";TS.exports=ze;var ke=TS.exports;const Si=Mf(ke);/**
9
+ */var rh=Symbol.for("react.element"),H2=Symbol.for("react.portal"),j2=Symbol.for("react.fragment"),$2=Symbol.for("react.strict_mode"),W2=Symbol.for("react.profiler"),V2=Symbol.for("react.provider"),X2=Symbol.for("react.context"),Y2=Symbol.for("react.forward_ref"),Q2=Symbol.for("react.suspense"),K2=Symbol.for("react.memo"),q2=Symbol.for("react.lazy"),ex=Symbol.iterator;function Z2(t){return t===null||typeof t!="object"?null:(t=ex&&t[ex]||t["@@iterator"],typeof t=="function"?t:null)}var AS={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},CS=Object.assign,PS={};function fl(t,e,r){this.props=t,this.context=e,this.refs=PS,this.updater=r||AS}fl.prototype.isReactComponent={};fl.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};fl.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function IS(){}IS.prototype=fl.prototype;function e0(t,e,r){this.props=t,this.context=e,this.refs=PS,this.updater=r||AS}var t0=e0.prototype=new IS;t0.constructor=e0;CS(t0,fl.prototype);t0.isPureReactComponent=!0;var tx=Array.isArray,RS=Object.prototype.hasOwnProperty,r0={current:null},MS={key:!0,ref:!0,__self:!0,__source:!0};function kS(t,e,r){var n,i={},s=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)RS.call(e,n)&&!MS.hasOwnProperty(n)&&(i[n]=e[n]);var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){for(var h=Array(l),c=0;c<l;c++)h[c]=arguments[c+2];i.children=h}if(t&&t.defaultProps)for(n in l=t.defaultProps,l)i[n]===void 0&&(i[n]=l[n]);return{$$typeof:rh,type:t,key:s,ref:o,props:i,_owner:r0.current}}function J2(t,e){return{$$typeof:rh,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function n0(t){return typeof t=="object"&&t!==null&&t.$$typeof===rh}function eP(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var rx=/\/+/g;function Rm(t,e){return typeof t=="object"&&t!==null&&t.key!=null?eP(""+t.key):e.toString(36)}function dd(t,e,r,n,i){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case rh:case H2:o=!0}}if(o)return o=t,i=i(o),t=n===""?"."+Rm(o,0):n,tx(i)?(r="",t!=null&&(r=t.replace(rx,"$&/")+"/"),dd(i,e,r,"",function(c){return c})):i!=null&&(n0(i)&&(i=J2(i,r+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(rx,"$&/")+"/")+t)),e.push(i)),1;if(o=0,n=n===""?".":n+":",tx(t))for(var l=0;l<t.length;l++){s=t[l];var h=n+Rm(s,l);o+=dd(s,e,r,h,i)}else if(h=Z2(t),typeof h=="function")for(t=h.call(t),l=0;!(s=t.next()).done;)s=s.value,h=n+Rm(s,l++),o+=dd(s,e,r,h,i);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function mc(t,e,r){if(t==null)return t;var n=[],i=0;return dd(t,n,"","",function(s){return e.call(r,s,i++)}),n}function tP(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r)},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Ar={current:null},fd={transition:null},rP={ReactCurrentDispatcher:Ar,ReactCurrentBatchConfig:fd,ReactCurrentOwner:r0};function NS(){throw Error("act(...) is not supported in production builds of React.")}ze.Children={map:mc,forEach:function(t,e,r){mc(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return mc(t,function(){e++}),e},toArray:function(t){return mc(t,function(e){return e})||[]},only:function(t){if(!n0(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};ze.Component=fl;ze.Fragment=j2;ze.Profiler=W2;ze.PureComponent=e0;ze.StrictMode=$2;ze.Suspense=Q2;ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rP;ze.act=NS;ze.cloneElement=function(t,e,r){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var n=CS({},t.props),i=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=r0.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(h in e)RS.call(e,h)&&!MS.hasOwnProperty(h)&&(n[h]=e[h]===void 0&&l!==void 0?l[h]:e[h])}var h=arguments.length-2;if(h===1)n.children=r;else if(1<h){l=Array(h);for(var c=0;c<h;c++)l[c]=arguments[c+2];n.children=l}return{$$typeof:rh,type:t.type,key:i,ref:s,props:n,_owner:o}};ze.createContext=function(t){return t={$$typeof:X2,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:V2,_context:t},t.Consumer=t};ze.createElement=kS;ze.createFactory=function(t){var e=kS.bind(null,t);return e.type=t,e};ze.createRef=function(){return{current:null}};ze.forwardRef=function(t){return{$$typeof:Y2,render:t}};ze.isValidElement=n0;ze.lazy=function(t){return{$$typeof:q2,_payload:{_status:-1,_result:t},_init:tP}};ze.memo=function(t,e){return{$$typeof:K2,type:t,compare:e===void 0?null:e}};ze.startTransition=function(t){var e=fd.transition;fd.transition={};try{t()}finally{fd.transition=e}};ze.unstable_act=NS;ze.useCallback=function(t,e){return Ar.current.useCallback(t,e)};ze.useContext=function(t){return Ar.current.useContext(t)};ze.useDebugValue=function(){};ze.useDeferredValue=function(t){return Ar.current.useDeferredValue(t)};ze.useEffect=function(t,e){return Ar.current.useEffect(t,e)};ze.useId=function(){return Ar.current.useId()};ze.useImperativeHandle=function(t,e,r){return Ar.current.useImperativeHandle(t,e,r)};ze.useInsertionEffect=function(t,e){return Ar.current.useInsertionEffect(t,e)};ze.useLayoutEffect=function(t,e){return Ar.current.useLayoutEffect(t,e)};ze.useMemo=function(t,e){return Ar.current.useMemo(t,e)};ze.useReducer=function(t,e,r){return Ar.current.useReducer(t,e,r)};ze.useRef=function(t){return Ar.current.useRef(t)};ze.useState=function(t){return Ar.current.useState(t)};ze.useSyncExternalStore=function(t,e,r){return Ar.current.useSyncExternalStore(t,e,r)};ze.useTransition=function(){return Ar.current.useTransition()};ze.version="18.3.1";TS.exports=ze;var Ce=TS.exports;const Si=Mf(Ce);/**
10
10
  * @license React
11
11
  * react-jsx-runtime.production.min.js
12
12
  *
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var nP=ke,iP=Symbol.for("react.element"),sP=Symbol.for("react.fragment"),oP=Object.prototype.hasOwnProperty,aP=nP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,lP={key:!0,ref:!0,__self:!0,__source:!0};function DS(t,e,r){var n,i={},s=null,o=null;r!==void 0&&(s=""+r),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(n in e)oP.call(e,n)&&!lP.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)i[n]===void 0&&(i[n]=e[n]);return{$$typeof:iP,type:t,key:s,ref:o,props:i,_owner:aP.current}}kf.Fragment=sP;kf.jsx=DS;kf.jsxs=DS;bS.exports=kf;var U=bS.exports,sy={},OS={exports:{}},tn={},FS={exports:{}},BS={};/**
17
+ */var nP=Ce,iP=Symbol.for("react.element"),sP=Symbol.for("react.fragment"),oP=Object.prototype.hasOwnProperty,aP=nP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,lP={key:!0,ref:!0,__self:!0,__source:!0};function DS(t,e,r){var n,i={},s=null,o=null;r!==void 0&&(s=""+r),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(n in e)oP.call(e,n)&&!lP.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)i[n]===void 0&&(i[n]=e[n]);return{$$typeof:iP,type:t,key:s,ref:o,props:i,_owner:aP.current}}kf.Fragment=sP;kf.jsx=DS;kf.jsxs=DS;bS.exports=kf;var U=bS.exports,sy={},OS={exports:{}},tn={},FS={exports:{}},BS={};/**
18
18
  * @license React
19
19
  * scheduler.production.min.js
20
20
  *
@@ -22,7 +22,7 @@
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */(function(t){function e(M,W){var O=M.length;M.push(W);e:for(;0<O;){var H=O-1>>>1,z=M[H];if(0<i(z,W))M[H]=W,M[O]=z,O=H;else break e}}function r(M){return M.length===0?null:M[0]}function n(M){if(M.length===0)return null;var W=M[0],O=M.pop();if(O!==W){M[0]=O;e:for(var H=0,z=M.length,X=z>>>1;H<X;){var J=2*(H+1)-1,ve=M[J],le=J+1,Te=M[le];if(0>i(ve,O))le<z&&0>i(Te,ve)?(M[H]=Te,M[le]=O,H=le):(M[H]=ve,M[J]=O,H=J);else if(le<z&&0>i(Te,O))M[H]=Te,M[le]=O,H=le;else break e}}return W}function i(M,W){var O=M.sortIndex-W.sortIndex;return O!==0?O:M.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var h=[],c=[],f=1,m=null,p=3,v=!1,_=!1,E=!1,T=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(M){for(var W=r(c);W!==null;){if(W.callback===null)n(c);else if(W.startTime<=M)n(c),W.sortIndex=W.expirationTime,e(h,W);else break;W=r(c)}}function A(M){if(E=!1,x(M),!_)if(r(h)!==null)_=!0,_e(R);else{var W=r(c);W!==null&&fe(A,W.startTime-M)}}function R(M,W){_=!1,E&&(E=!1,S(D),D=-1),v=!0;var O=p;try{for(x(W),m=r(h);m!==null&&(!(m.expirationTime>W)||M&&!me());){var H=m.callback;if(typeof H=="function"){m.callback=null,p=m.priorityLevel;var z=H(m.expirationTime<=W);W=t.unstable_now(),typeof z=="function"?m.callback=z:m===r(h)&&n(h),x(W)}else n(h);m=r(h)}if(m!==null)var X=!0;else{var J=r(c);J!==null&&fe(A,J.startTime-W),X=!1}return X}finally{m=null,p=O,v=!1}}var L=!1,N=null,D=-1,q=5,$=-1;function me(){return!(t.unstable_now()-$<q)}function ne(){if(N!==null){var M=t.unstable_now();$=M;var W=!0;try{W=N(!0,M)}finally{W?B():(L=!1,N=null)}}else L=!1}var B;if(typeof b=="function")B=function(){b(ne)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,ie=K.port2;K.port1.onmessage=ne,B=function(){ie.postMessage(null)}}else B=function(){T(ne,0)};function _e(M){N=M,L||(L=!0,B())}function fe(M,W){D=T(function(){M(t.unstable_now())},W)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(M){M.callback=null},t.unstable_continueExecution=function(){_||v||(_=!0,_e(R))},t.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<M?Math.floor(1e3/M):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(h)},t.unstable_next=function(M){switch(p){case 1:case 2:case 3:var W=3;break;default:W=p}var O=p;p=W;try{return M()}finally{p=O}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(M,W){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var O=p;p=M;try{return W()}finally{p=O}},t.unstable_scheduleCallback=function(M,W,O){var H=t.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?H+O:H):O=H,M){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=O+z,M={id:f++,callback:W,priorityLevel:M,startTime:O,expirationTime:z,sortIndex:-1},O>H?(M.sortIndex=O,e(c,M),r(h)===null&&M===r(c)&&(E?(S(D),D=-1):E=!0,fe(A,O-H))):(M.sortIndex=z,e(h,M),_||v||(_=!0,_e(R))),M},t.unstable_shouldYield=me,t.unstable_wrapCallback=function(M){var W=p;return function(){var O=p;p=W;try{return M.apply(this,arguments)}finally{p=O}}}})(BS);FS.exports=BS;var uP=FS.exports;/**
25
+ */(function(t){function e(M,W){var F=M.length;M.push(W);e:for(;0<F;){var H=F-1>>>1,z=M[H];if(0<i(z,W))M[H]=W,M[F]=z,F=H;else break e}}function r(M){return M.length===0?null:M[0]}function n(M){if(M.length===0)return null;var W=M[0],F=M.pop();if(F!==W){M[0]=F;e:for(var H=0,z=M.length,Y=z>>>1;H<Y;){var J=2*(H+1)-1,ve=M[J],le=J+1,Te=M[le];if(0>i(ve,F))le<z&&0>i(Te,ve)?(M[H]=Te,M[le]=F,H=le):(M[H]=ve,M[J]=F,H=J);else if(le<z&&0>i(Te,F))M[H]=Te,M[le]=F,H=le;else break e}}return W}function i(M,W){var F=M.sortIndex-W.sortIndex;return F!==0?F:M.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var h=[],c=[],f=1,m=null,p=3,v=!1,_=!1,E=!1,T=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(M){for(var W=r(c);W!==null;){if(W.callback===null)n(c);else if(W.startTime<=M)n(c),W.sortIndex=W.expirationTime,e(h,W);else break;W=r(c)}}function A(M){if(E=!1,x(M),!_)if(r(h)!==null)_=!0,_e(R);else{var W=r(c);W!==null&&fe(A,W.startTime-M)}}function R(M,W){_=!1,E&&(E=!1,S(D),D=-1),v=!0;var F=p;try{for(x(W),m=r(h);m!==null&&(!(m.expirationTime>W)||M&&!me());){var H=m.callback;if(typeof H=="function"){m.callback=null,p=m.priorityLevel;var z=H(m.expirationTime<=W);W=t.unstable_now(),typeof z=="function"?m.callback=z:m===r(h)&&n(h),x(W)}else n(h);m=r(h)}if(m!==null)var Y=!0;else{var J=r(c);J!==null&&fe(A,J.startTime-W),Y=!1}return Y}finally{m=null,p=F,v=!1}}var L=!1,k=null,D=-1,Q=5,$=-1;function me(){return!(t.unstable_now()-$<Q)}function te(){if(k!==null){var M=t.unstable_now();$=M;var W=!0;try{W=k(!0,M)}finally{W?O():(L=!1,k=null)}}else L=!1}var O;if(typeof b=="function")O=function(){b(te)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,ie=V.port2;V.port1.onmessage=te,O=function(){ie.postMessage(null)}}else O=function(){T(te,0)};function _e(M){k=M,L||(L=!0,O())}function fe(M,W){D=T(function(){M(t.unstable_now())},W)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(M){M.callback=null},t.unstable_continueExecution=function(){_||v||(_=!0,_e(R))},t.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<M?Math.floor(1e3/M):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(h)},t.unstable_next=function(M){switch(p){case 1:case 2:case 3:var W=3;break;default:W=p}var F=p;p=W;try{return M()}finally{p=F}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(M,W){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var F=p;p=M;try{return W()}finally{p=F}},t.unstable_scheduleCallback=function(M,W,F){var H=t.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?H+F:H):F=H,M){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=F+z,M={id:f++,callback:W,priorityLevel:M,startTime:F,expirationTime:z,sortIndex:-1},F>H?(M.sortIndex=F,e(c,M),r(h)===null&&M===r(c)&&(E?(S(D),D=-1):E=!0,fe(A,F-H))):(M.sortIndex=z,e(h,M),_||v||(_=!0,_e(R))),M},t.unstable_shouldYield=me,t.unstable_wrapCallback=function(M){var W=p;return function(){var F=p;p=W;try{return M.apply(this,arguments)}finally{p=F}}}})(BS);FS.exports=BS;var uP=FS.exports;/**
26
26
  * @license React
27
27
  * react-dom.production.min.js
28
28
  *
@@ -30,25 +30,25 @@
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var hP=ke,en=uP;function ee(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var LS=new Set,Ru={};function Wo(t,e){nl(t,e),nl(t+"Capture",e)}function nl(t,e){for(Ru[t]=e,t=0;t<e.length;t++)LS.add(e[t])}var Ji=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),oy=Object.prototype.hasOwnProperty,cP=/^[: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]*$/,nx={},ix={};function dP(t){return oy.call(ix,t)?!0:oy.call(nx,t)?!1:cP.test(t)?ix[t]=!0:(nx[t]=!0,!1)}function fP(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function pP(t,e,r,n){if(e===null||typeof e>"u"||fP(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Cr(t,e,r,n,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var ar={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){ar[t]=new Cr(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];ar[e]=new Cr(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){ar[t]=new Cr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){ar[t]=new Cr(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){ar[t]=new Cr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){ar[t]=new Cr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){ar[t]=new Cr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){ar[t]=new Cr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){ar[t]=new Cr(t,5,!1,t.toLowerCase(),null,!1,!1)});var i0=/[\-:]([a-z])/g;function s0(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(i0,s0);ar[e]=new Cr(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(i0,s0);ar[e]=new Cr(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(i0,s0);ar[e]=new Cr(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){ar[t]=new Cr(t,1,!1,t.toLowerCase(),null,!1,!1)});ar.xlinkHref=new Cr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){ar[t]=new Cr(t,1,!1,t.toLowerCase(),null,!0,!0)});function o0(t,e,r,n){var i=ar.hasOwnProperty(e)?ar[e]:null;(i!==null?i.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(pP(e,r,i,n)&&(r=null),n||i===null?dP(e)&&(r===null?t.removeAttribute(e):t.setAttribute(e,""+r)):i.mustUseProperty?t[i.propertyName]=r===null?i.type===3?!1:"":r:(e=i.attributeName,n=i.attributeNamespace,r===null?t.removeAttribute(e):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?t.setAttributeNS(n,e,r):t.setAttribute(e,r))))}var os=hP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,gc=Symbol.for("react.element"),Ca=Symbol.for("react.portal"),Pa=Symbol.for("react.fragment"),a0=Symbol.for("react.strict_mode"),ay=Symbol.for("react.profiler"),US=Symbol.for("react.provider"),zS=Symbol.for("react.context"),l0=Symbol.for("react.forward_ref"),ly=Symbol.for("react.suspense"),uy=Symbol.for("react.suspense_list"),u0=Symbol.for("react.memo"),As=Symbol.for("react.lazy"),GS=Symbol.for("react.offscreen"),sx=Symbol.iterator;function Hl(t){return t===null||typeof t!="object"?null:(t=sx&&t[sx]||t["@@iterator"],typeof t=="function"?t:null)}var yt=Object.assign,Mm;function ru(t){if(Mm===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);Mm=e&&e[1]||""}return`
33
+ */var hP=Ce,en=uP;function ee(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var LS=new Set,Ru={};function Wo(t,e){nl(t,e),nl(t+"Capture",e)}function nl(t,e){for(Ru[t]=e,t=0;t<e.length;t++)LS.add(e[t])}var Ji=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),oy=Object.prototype.hasOwnProperty,cP=/^[: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]*$/,nx={},ix={};function dP(t){return oy.call(ix,t)?!0:oy.call(nx,t)?!1:cP.test(t)?ix[t]=!0:(nx[t]=!0,!1)}function fP(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function pP(t,e,r,n){if(e===null||typeof e>"u"||fP(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Cr(t,e,r,n,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var ar={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){ar[t]=new Cr(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];ar[e]=new Cr(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){ar[t]=new Cr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){ar[t]=new Cr(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){ar[t]=new Cr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){ar[t]=new Cr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){ar[t]=new Cr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){ar[t]=new Cr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){ar[t]=new Cr(t,5,!1,t.toLowerCase(),null,!1,!1)});var i0=/[\-:]([a-z])/g;function s0(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(i0,s0);ar[e]=new Cr(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(i0,s0);ar[e]=new Cr(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(i0,s0);ar[e]=new Cr(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){ar[t]=new Cr(t,1,!1,t.toLowerCase(),null,!1,!1)});ar.xlinkHref=new Cr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){ar[t]=new Cr(t,1,!1,t.toLowerCase(),null,!0,!0)});function o0(t,e,r,n){var i=ar.hasOwnProperty(e)?ar[e]:null;(i!==null?i.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(pP(e,r,i,n)&&(r=null),n||i===null?dP(e)&&(r===null?t.removeAttribute(e):t.setAttribute(e,""+r)):i.mustUseProperty?t[i.propertyName]=r===null?i.type===3?!1:"":r:(e=i.attributeName,n=i.attributeNamespace,r===null?t.removeAttribute(e):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?t.setAttributeNS(n,e,r):t.setAttribute(e,r))))}var os=hP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,gc=Symbol.for("react.element"),Ca=Symbol.for("react.portal"),Pa=Symbol.for("react.fragment"),a0=Symbol.for("react.strict_mode"),ay=Symbol.for("react.profiler"),US=Symbol.for("react.provider"),zS=Symbol.for("react.context"),l0=Symbol.for("react.forward_ref"),ly=Symbol.for("react.suspense"),uy=Symbol.for("react.suspense_list"),u0=Symbol.for("react.memo"),As=Symbol.for("react.lazy"),GS=Symbol.for("react.offscreen"),sx=Symbol.iterator;function Hl(t){return t===null||typeof t!="object"?null:(t=sx&&t[sx]||t["@@iterator"],typeof t=="function"?t:null)}var yt=Object.assign,Mm;function ru(t){if(Mm===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);Mm=e&&e[1]||""}return`
34
34
  `+Mm+t}var km=!1;function Nm(t,e){if(!t||km)return"";km=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var n=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){n=c}t.call(e.prototype)}else{try{throw Error()}catch(c){n=c}t()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var i=c.stack.split(`
35
35
  `),s=n.stack.split(`
36
36
  `),o=i.length-1,l=s.length-1;1<=o&&0<=l&&i[o]!==s[l];)l--;for(;1<=o&&0<=l;o--,l--)if(i[o]!==s[l]){if(o!==1||l!==1)do if(o--,l--,0>l||i[o]!==s[l]){var h=`
37
- `+i[o].replace(" at new "," at ");return t.displayName&&h.includes("<anonymous>")&&(h=h.replace("<anonymous>",t.displayName)),h}while(1<=o&&0<=l);break}}}finally{km=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?ru(t):""}function mP(t){switch(t.tag){case 5:return ru(t.type);case 16:return ru("Lazy");case 13:return ru("Suspense");case 19:return ru("SuspenseList");case 0:case 2:case 15:return t=Nm(t.type,!1),t;case 11:return t=Nm(t.type.render,!1),t;case 1:return t=Nm(t.type,!0),t;default:return""}}function hy(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Pa:return"Fragment";case Ca:return"Portal";case ay:return"Profiler";case a0:return"StrictMode";case ly:return"Suspense";case uy:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case zS:return(t.displayName||"Context")+".Consumer";case US:return(t._context.displayName||"Context")+".Provider";case l0:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case u0:return e=t.displayName||null,e!==null?e:hy(t.type)||"Memo";case As:e=t._payload,t=t._init;try{return hy(t(e))}catch{}}return null}function gP(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return hy(e);case 8:return e===a0?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Ws(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function HS(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function yP(t){var e=HS(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function yc(t){t._valueTracker||(t._valueTracker=yP(t))}function jS(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=HS(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Bd(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function cy(t,e){var r=e.checked;return yt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function ox(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=Ws(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function $S(t,e){e=e.checked,e!=null&&o0(t,"checked",e,!1)}function dy(t,e){$S(t,e);var r=Ws(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?fy(t,e.type,r):e.hasOwnProperty("defaultValue")&&fy(t,e.type,Ws(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function ax(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function fy(t,e,r){(e!=="number"||Bd(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var nu=Array.isArray;function ja(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i<r.length;i++)e["$"+r[i]]=!0;for(r=0;r<t.length;r++)i=e.hasOwnProperty("$"+t[r].value),t[r].selected!==i&&(t[r].selected=i),i&&n&&(t[r].defaultSelected=!0)}else{for(r=""+Ws(r),e=null,i=0;i<t.length;i++){if(t[i].value===r){t[i].selected=!0,n&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function py(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(ee(91));return yt({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function lx(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error(ee(92));if(nu(r)){if(1<r.length)throw Error(ee(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:Ws(r)}}function WS(t,e){var r=Ws(e.value),n=Ws(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function ux(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function VS(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function my(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?VS(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var vc,XS=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,i){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(vc=vc||document.createElement("div"),vc.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=vc.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Mu(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var mu={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},vP=["Webkit","ms","Moz","O"];Object.keys(mu).forEach(function(t){vP.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),mu[e]=mu[t]})});function YS(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||mu.hasOwnProperty(t)&&mu[t]?(""+e).trim():e+"px"}function QS(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=YS(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var _P=yt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function gy(t,e){if(e){if(_P[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ee(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ee(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ee(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ee(62))}}function yy(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 vy=null;function h0(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var _y=null,$a=null,Wa=null;function hx(t){if(t=sh(t)){if(typeof _y!="function")throw Error(ee(280));var e=t.stateNode;e&&(e=Bf(e),_y(t.stateNode,t.type,e))}}function KS(t){$a?Wa?Wa.push(t):Wa=[t]:$a=t}function qS(){if($a){var t=$a,e=Wa;if(Wa=$a=null,hx(t),e)for(t=0;t<e.length;t++)hx(e[t])}}function ZS(t,e){return t(e)}function JS(){}var Dm=!1;function eb(t,e,r){if(Dm)return t(e,r);Dm=!0;try{return ZS(t,e,r)}finally{Dm=!1,($a!==null||Wa!==null)&&(JS(),qS())}}function ku(t,e){var r=t.stateNode;if(r===null)return null;var n=Bf(r);if(n===null)return null;r=n[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(ee(231,e,typeof r));return r}var xy=!1;if(Ji)try{var jl={};Object.defineProperty(jl,"passive",{get:function(){xy=!0}}),window.addEventListener("test",jl,jl),window.removeEventListener("test",jl,jl)}catch{xy=!1}function xP(t,e,r,n,i,s,o,l,h){var c=Array.prototype.slice.call(arguments,3);try{e.apply(r,c)}catch(f){this.onError(f)}}var gu=!1,Ld=null,Ud=!1,wy=null,wP={onError:function(t){gu=!0,Ld=t}};function EP(t,e,r,n,i,s,o,l,h){gu=!1,Ld=null,xP.apply(wP,arguments)}function SP(t,e,r,n,i,s,o,l,h){if(EP.apply(this,arguments),gu){if(gu){var c=Ld;gu=!1,Ld=null}else throw Error(ee(198));Ud||(Ud=!0,wy=c)}}function Vo(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(r=e.return),t=e.return;while(t)}return e.tag===3?r:null}function tb(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function cx(t){if(Vo(t)!==t)throw Error(ee(188))}function bP(t){var e=t.alternate;if(!e){if(e=Vo(t),e===null)throw Error(ee(188));return e!==t?null:t}for(var r=t,n=e;;){var i=r.return;if(i===null)break;var s=i.alternate;if(s===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===r)return cx(i),t;if(s===n)return cx(i),e;s=s.sibling}throw Error(ee(188))}if(r.return!==n.return)r=i,n=s;else{for(var o=!1,l=i.child;l;){if(l===r){o=!0,r=i,n=s;break}if(l===n){o=!0,n=i,r=s;break}l=l.sibling}if(!o){for(l=s.child;l;){if(l===r){o=!0,r=s,n=i;break}if(l===n){o=!0,n=s,r=i;break}l=l.sibling}if(!o)throw Error(ee(189))}}if(r.alternate!==n)throw Error(ee(190))}if(r.tag!==3)throw Error(ee(188));return r.stateNode.current===r?t:e}function rb(t){return t=bP(t),t!==null?nb(t):null}function nb(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=nb(t);if(e!==null)return e;t=t.sibling}return null}var ib=en.unstable_scheduleCallback,dx=en.unstable_cancelCallback,TP=en.unstable_shouldYield,AP=en.unstable_requestPaint,Rt=en.unstable_now,CP=en.unstable_getCurrentPriorityLevel,c0=en.unstable_ImmediatePriority,sb=en.unstable_UserBlockingPriority,zd=en.unstable_NormalPriority,PP=en.unstable_LowPriority,ob=en.unstable_IdlePriority,Nf=null,bi=null;function IP(t){if(bi&&typeof bi.onCommitFiberRoot=="function")try{bi.onCommitFiberRoot(Nf,t,void 0,(t.current.flags&128)===128)}catch{}}var Vn=Math.clz32?Math.clz32:kP,RP=Math.log,MP=Math.LN2;function kP(t){return t>>>=0,t===0?32:31-(RP(t)/MP|0)|0}var _c=64,xc=4194304;function iu(t){switch(t&-t){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Gd(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,s=t.pingedLanes,o=r&268435455;if(o!==0){var l=o&~i;l!==0?n=iu(l):(s&=o,s!==0&&(n=iu(s)))}else o=r&~i,o!==0?n=iu(o):s!==0&&(n=iu(s));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0<e;)r=31-Vn(e),i=1<<r,n|=t[r],e&=~i;return n}function NP(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function DP(t,e){for(var r=t.suspendedLanes,n=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-Vn(s),l=1<<o,h=i[o];h===-1?(!(l&r)||l&n)&&(i[o]=NP(l,e)):h<=e&&(t.expiredLanes|=l),s&=~l}}function Ey(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function ab(){var t=_c;return _c<<=1,!(_c&4194240)&&(_c=64),t}function Om(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function nh(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Vn(e),t[e]=r}function OP(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0<r;){var i=31-Vn(r),s=1<<i;e[i]=0,n[i]=-1,t[i]=-1,r&=~s}}function d0(t,e){var r=t.entangledLanes|=e;for(t=t.entanglements;r;){var n=31-Vn(r),i=1<<n;i&e|t[n]&e&&(t[n]|=e),r&=~i}}var Ze=0;function lb(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var ub,f0,hb,cb,db,Sy=!1,wc=[],Fs=null,Bs=null,Ls=null,Nu=new Map,Du=new Map,Ps=[],FP="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 submit".split(" ");function fx(t,e){switch(t){case"focusin":case"focusout":Fs=null;break;case"dragenter":case"dragleave":Bs=null;break;case"mouseover":case"mouseout":Ls=null;break;case"pointerover":case"pointerout":Nu.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Du.delete(e.pointerId)}}function $l(t,e,r,n,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:r,eventSystemFlags:n,nativeEvent:s,targetContainers:[i]},e!==null&&(e=sh(e),e!==null&&f0(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function BP(t,e,r,n,i){switch(e){case"focusin":return Fs=$l(Fs,t,e,r,n,i),!0;case"dragenter":return Bs=$l(Bs,t,e,r,n,i),!0;case"mouseover":return Ls=$l(Ls,t,e,r,n,i),!0;case"pointerover":var s=i.pointerId;return Nu.set(s,$l(Nu.get(s)||null,t,e,r,n,i)),!0;case"gotpointercapture":return s=i.pointerId,Du.set(s,$l(Du.get(s)||null,t,e,r,n,i)),!0}return!1}function fb(t){var e=Ro(t.target);if(e!==null){var r=Vo(e);if(r!==null){if(e=r.tag,e===13){if(e=tb(r),e!==null){t.blockedOn=e,db(t.priority,function(){hb(r)});return}}else if(e===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function pd(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=by(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r===null){r=t.nativeEvent;var n=new r.constructor(r.type,r);vy=n,r.target.dispatchEvent(n),vy=null}else return e=sh(r),e!==null&&f0(e),t.blockedOn=r,!1;e.shift()}return!0}function px(t,e,r){pd(t)&&r.delete(e)}function LP(){Sy=!1,Fs!==null&&pd(Fs)&&(Fs=null),Bs!==null&&pd(Bs)&&(Bs=null),Ls!==null&&pd(Ls)&&(Ls=null),Nu.forEach(px),Du.forEach(px)}function Wl(t,e){t.blockedOn===e&&(t.blockedOn=null,Sy||(Sy=!0,en.unstable_scheduleCallback(en.unstable_NormalPriority,LP)))}function Ou(t){function e(i){return Wl(i,t)}if(0<wc.length){Wl(wc[0],t);for(var r=1;r<wc.length;r++){var n=wc[r];n.blockedOn===t&&(n.blockedOn=null)}}for(Fs!==null&&Wl(Fs,t),Bs!==null&&Wl(Bs,t),Ls!==null&&Wl(Ls,t),Nu.forEach(e),Du.forEach(e),r=0;r<Ps.length;r++)n=Ps[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<Ps.length&&(r=Ps[0],r.blockedOn===null);)fb(r),r.blockedOn===null&&Ps.shift()}var Va=os.ReactCurrentBatchConfig,Hd=!0;function UP(t,e,r,n){var i=Ze,s=Va.transition;Va.transition=null;try{Ze=1,p0(t,e,r,n)}finally{Ze=i,Va.transition=s}}function zP(t,e,r,n){var i=Ze,s=Va.transition;Va.transition=null;try{Ze=4,p0(t,e,r,n)}finally{Ze=i,Va.transition=s}}function p0(t,e,r,n){if(Hd){var i=by(t,e,r,n);if(i===null)Wm(t,e,n,jd,r),fx(t,n);else if(BP(i,t,e,r,n))n.stopPropagation();else if(fx(t,n),e&4&&-1<FP.indexOf(t)){for(;i!==null;){var s=sh(i);if(s!==null&&ub(s),s=by(t,e,r,n),s===null&&Wm(t,e,n,jd,r),s===i)break;i=s}i!==null&&n.stopPropagation()}else Wm(t,e,n,null,r)}}var jd=null;function by(t,e,r,n){if(jd=null,t=h0(n),t=Ro(t),t!==null)if(e=Vo(t),e===null)t=null;else if(r=e.tag,r===13){if(t=tb(e),t!==null)return t;t=null}else if(r===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return jd=t,null}function pb(t){switch(t){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(CP()){case c0:return 1;case sb:return 4;case zd:case PP:return 16;case ob:return 536870912;default:return 16}default:return 16}}var Ms=null,m0=null,md=null;function mb(){if(md)return md;var t,e=m0,r=e.length,n,i="value"in Ms?Ms.value:Ms.textContent,s=i.length;for(t=0;t<r&&e[t]===i[t];t++);var o=r-t;for(n=1;n<=o&&e[r-n]===i[s-n];n++);return md=i.slice(t,1<n?1-n:void 0)}function gd(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Ec(){return!0}function mx(){return!1}function rn(t){function e(r,n,i,s,o){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var l in t)t.hasOwnProperty(l)&&(r=t[l],this[l]=r?r(s):s[l]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Ec:mx,this.isPropagationStopped=mx,this}return yt(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Ec)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ec)},persist:function(){},isPersistent:Ec}),e}var pl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},g0=rn(pl),ih=yt({},pl,{view:0,detail:0}),GP=rn(ih),Fm,Bm,Vl,Df=yt({},ih,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:y0,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Vl&&(Vl&&t.type==="mousemove"?(Fm=t.screenX-Vl.screenX,Bm=t.screenY-Vl.screenY):Bm=Fm=0,Vl=t),Fm)},movementY:function(t){return"movementY"in t?t.movementY:Bm}}),gx=rn(Df),HP=yt({},Df,{dataTransfer:0}),jP=rn(HP),$P=yt({},ih,{relatedTarget:0}),Lm=rn($P),WP=yt({},pl,{animationName:0,elapsedTime:0,pseudoElement:0}),VP=rn(WP),XP=yt({},pl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),YP=rn(XP),QP=yt({},pl,{data:0}),yx=rn(QP),KP={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qP={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"},ZP={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function JP(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=ZP[t])?!!e[t]:!1}function y0(){return JP}var eI=yt({},ih,{key:function(t){if(t.key){var e=KP[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=gd(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?qP[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:y0,charCode:function(t){return t.type==="keypress"?gd(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?gd(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),tI=rn(eI),rI=yt({},Df,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vx=rn(rI),nI=yt({},ih,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:y0}),iI=rn(nI),sI=yt({},pl,{propertyName:0,elapsedTime:0,pseudoElement:0}),oI=rn(sI),aI=yt({},Df,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),lI=rn(aI),uI=[9,13,27,32],v0=Ji&&"CompositionEvent"in window,yu=null;Ji&&"documentMode"in document&&(yu=document.documentMode);var hI=Ji&&"TextEvent"in window&&!yu,gb=Ji&&(!v0||yu&&8<yu&&11>=yu),_x=" ",xx=!1;function yb(t,e){switch(t){case"keyup":return uI.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vb(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ia=!1;function cI(t,e){switch(t){case"compositionend":return vb(e);case"keypress":return e.which!==32?null:(xx=!0,_x);case"textInput":return t=e.data,t===_x&&xx?null:t;default:return null}}function dI(t,e){if(Ia)return t==="compositionend"||!v0&&yb(t,e)?(t=mb(),md=m0=Ms=null,Ia=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return gb&&e.locale!=="ko"?null:e.data;default:return null}}var fI={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 wx(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!fI[t.type]:e==="textarea"}function _b(t,e,r,n){KS(n),e=$d(e,"onChange"),0<e.length&&(r=new g0("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var vu=null,Fu=null;function pI(t){Rb(t,0)}function Of(t){var e=ka(t);if(jS(e))return t}function mI(t,e){if(t==="change")return e}var xb=!1;if(Ji){var Um;if(Ji){var zm="oninput"in document;if(!zm){var Ex=document.createElement("div");Ex.setAttribute("oninput","return;"),zm=typeof Ex.oninput=="function"}Um=zm}else Um=!1;xb=Um&&(!document.documentMode||9<document.documentMode)}function Sx(){vu&&(vu.detachEvent("onpropertychange",wb),Fu=vu=null)}function wb(t){if(t.propertyName==="value"&&Of(Fu)){var e=[];_b(e,Fu,t,h0(t)),eb(pI,e)}}function gI(t,e,r){t==="focusin"?(Sx(),vu=e,Fu=r,vu.attachEvent("onpropertychange",wb)):t==="focusout"&&Sx()}function yI(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Of(Fu)}function vI(t,e){if(t==="click")return Of(e)}function _I(t,e){if(t==="input"||t==="change")return Of(e)}function xI(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Kn=typeof Object.is=="function"?Object.is:xI;function Bu(t,e){if(Kn(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!oy.call(e,i)||!Kn(t[i],e[i]))return!1}return!0}function bx(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Tx(t,e){var r=bx(t);t=0;for(var n;r;){if(r.nodeType===3){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=bx(r)}}function Eb(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Eb(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Sb(){for(var t=window,e=Bd();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Bd(t.document)}return e}function _0(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function wI(t){var e=Sb(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&Eb(r.ownerDocument.documentElement,r)){if(n!==null&&_0(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!t.extend&&s>n&&(i=n,n=s,s=i),i=Tx(r,s);var o=Tx(r,n);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<e.length;r++)t=e[r],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var EI=Ji&&"documentMode"in document&&11>=document.documentMode,Ra=null,Ty=null,_u=null,Ay=!1;function Ax(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ay||Ra==null||Ra!==Bd(n)||(n=Ra,"selectionStart"in n&&_0(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),_u&&Bu(_u,n)||(_u=n,n=$d(Ty,"onSelect"),0<n.length&&(e=new g0("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=Ra)))}function Sc(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var Ma={animationend:Sc("Animation","AnimationEnd"),animationiteration:Sc("Animation","AnimationIteration"),animationstart:Sc("Animation","AnimationStart"),transitionend:Sc("Transition","TransitionEnd")},Gm={},bb={};Ji&&(bb=document.createElement("div").style,"AnimationEvent"in window||(delete Ma.animationend.animation,delete Ma.animationiteration.animation,delete Ma.animationstart.animation),"TransitionEvent"in window||delete Ma.transitionend.transition);function Ff(t){if(Gm[t])return Gm[t];if(!Ma[t])return t;var e=Ma[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in bb)return Gm[t]=e[r];return t}var Tb=Ff("animationend"),Ab=Ff("animationiteration"),Cb=Ff("animationstart"),Pb=Ff("transitionend"),Ib=new Map,Cx="abort auxClick 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(" ");function Ks(t,e){Ib.set(t,e),Wo(e,[t])}for(var Hm=0;Hm<Cx.length;Hm++){var jm=Cx[Hm],SI=jm.toLowerCase(),bI=jm[0].toUpperCase()+jm.slice(1);Ks(SI,"on"+bI)}Ks(Tb,"onAnimationEnd");Ks(Ab,"onAnimationIteration");Ks(Cb,"onAnimationStart");Ks("dblclick","onDoubleClick");Ks("focusin","onFocus");Ks("focusout","onBlur");Ks(Pb,"onTransitionEnd");nl("onMouseEnter",["mouseout","mouseover"]);nl("onMouseLeave",["mouseout","mouseover"]);nl("onPointerEnter",["pointerout","pointerover"]);nl("onPointerLeave",["pointerout","pointerover"]);Wo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Wo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Wo("onBeforeInput",["compositionend","keypress","textInput","paste"]);Wo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Wo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Wo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var su="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(" "),TI=new Set("cancel close invalid load scroll toggle".split(" ").concat(su));function Px(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,SP(n,e,void 0,t),t.currentTarget=null}function Rb(t,e){e=(e&4)!==0;for(var r=0;r<t.length;r++){var n=t[r],i=n.event;n=n.listeners;e:{var s=void 0;if(e)for(var o=n.length-1;0<=o;o--){var l=n[o],h=l.instance,c=l.currentTarget;if(l=l.listener,h!==s&&i.isPropagationStopped())break e;Px(i,l,c),s=h}else for(o=0;o<n.length;o++){if(l=n[o],h=l.instance,c=l.currentTarget,l=l.listener,h!==s&&i.isPropagationStopped())break e;Px(i,l,c),s=h}}}if(Ud)throw t=wy,Ud=!1,wy=null,t}function nt(t,e){var r=e[My];r===void 0&&(r=e[My]=new Set);var n=t+"__bubble";r.has(n)||(Mb(e,t,2,!1),r.add(n))}function $m(t,e,r){var n=0;e&&(n|=4),Mb(r,t,n,e)}var bc="_reactListening"+Math.random().toString(36).slice(2);function Lu(t){if(!t[bc]){t[bc]=!0,LS.forEach(function(r){r!=="selectionchange"&&(TI.has(r)||$m(r,!1,t),$m(r,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[bc]||(e[bc]=!0,$m("selectionchange",!1,e))}}function Mb(t,e,r,n){switch(pb(e)){case 1:var i=UP;break;case 4:i=zP;break;default:i=p0}r=i.bind(null,e,r,t),i=void 0,!xy||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),n?i!==void 0?t.addEventListener(e,r,{capture:!0,passive:i}):t.addEventListener(e,r,!0):i!==void 0?t.addEventListener(e,r,{passive:i}):t.addEventListener(e,r,!1)}function Wm(t,e,r,n,i){var s=n;if(!(e&1)&&!(e&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var l=n.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(o===4)for(o=n.return;o!==null;){var h=o.tag;if((h===3||h===4)&&(h=o.stateNode.containerInfo,h===i||h.nodeType===8&&h.parentNode===i))return;o=o.return}for(;l!==null;){if(o=Ro(l),o===null)return;if(h=o.tag,h===5||h===6){n=s=o;continue e}l=l.parentNode}}n=n.return}eb(function(){var c=s,f=h0(r),m=[];e:{var p=Ib.get(t);if(p!==void 0){var v=g0,_=t;switch(t){case"keypress":if(gd(r)===0)break e;case"keydown":case"keyup":v=tI;break;case"focusin":_="focus",v=Lm;break;case"focusout":_="blur",v=Lm;break;case"beforeblur":case"afterblur":v=Lm;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":v=gx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=jP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=iI;break;case Tb:case Ab:case Cb:v=VP;break;case Pb:v=oI;break;case"scroll":v=GP;break;case"wheel":v=lI;break;case"copy":case"cut":case"paste":v=YP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=vx}var E=(e&4)!==0,T=!E&&t==="scroll",S=E?p!==null?p+"Capture":null:p;E=[];for(var b=c,x;b!==null;){x=b;var A=x.stateNode;if(x.tag===5&&A!==null&&(x=A,S!==null&&(A=ku(b,S),A!=null&&E.push(Uu(b,A,x)))),T)break;b=b.return}0<E.length&&(p=new v(p,_,null,r,f),m.push({event:p,listeners:E}))}}if(!(e&7)){e:{if(p=t==="mouseover"||t==="pointerover",v=t==="mouseout"||t==="pointerout",p&&r!==vy&&(_=r.relatedTarget||r.fromElement)&&(Ro(_)||_[es]))break e;if((v||p)&&(p=f.window===f?f:(p=f.ownerDocument)?p.defaultView||p.parentWindow:window,v?(_=r.relatedTarget||r.toElement,v=c,_=_?Ro(_):null,_!==null&&(T=Vo(_),_!==T||_.tag!==5&&_.tag!==6)&&(_=null)):(v=null,_=c),v!==_)){if(E=gx,A="onMouseLeave",S="onMouseEnter",b="mouse",(t==="pointerout"||t==="pointerover")&&(E=vx,A="onPointerLeave",S="onPointerEnter",b="pointer"),T=v==null?p:ka(v),x=_==null?p:ka(_),p=new E(A,b+"leave",v,r,f),p.target=T,p.relatedTarget=x,A=null,Ro(f)===c&&(E=new E(S,b+"enter",_,r,f),E.target=x,E.relatedTarget=T,A=E),T=A,v&&_)t:{for(E=v,S=_,b=0,x=E;x;x=fa(x))b++;for(x=0,A=S;A;A=fa(A))x++;for(;0<b-x;)E=fa(E),b--;for(;0<x-b;)S=fa(S),x--;for(;b--;){if(E===S||S!==null&&E===S.alternate)break t;E=fa(E),S=fa(S)}E=null}else E=null;v!==null&&Ix(m,p,v,E,!1),_!==null&&T!==null&&Ix(m,T,_,E,!0)}}e:{if(p=c?ka(c):window,v=p.nodeName&&p.nodeName.toLowerCase(),v==="select"||v==="input"&&p.type==="file")var R=mI;else if(wx(p))if(xb)R=_I;else{R=yI;var L=gI}else(v=p.nodeName)&&v.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(R=vI);if(R&&(R=R(t,c))){_b(m,R,r,f);break e}L&&L(t,p,c),t==="focusout"&&(L=p._wrapperState)&&L.controlled&&p.type==="number"&&fy(p,"number",p.value)}switch(L=c?ka(c):window,t){case"focusin":(wx(L)||L.contentEditable==="true")&&(Ra=L,Ty=c,_u=null);break;case"focusout":_u=Ty=Ra=null;break;case"mousedown":Ay=!0;break;case"contextmenu":case"mouseup":case"dragend":Ay=!1,Ax(m,r,f);break;case"selectionchange":if(EI)break;case"keydown":case"keyup":Ax(m,r,f)}var N;if(v0)e:{switch(t){case"compositionstart":var D="onCompositionStart";break e;case"compositionend":D="onCompositionEnd";break e;case"compositionupdate":D="onCompositionUpdate";break e}D=void 0}else Ia?yb(t,r)&&(D="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(D="onCompositionStart");D&&(gb&&r.locale!=="ko"&&(Ia||D!=="onCompositionStart"?D==="onCompositionEnd"&&Ia&&(N=mb()):(Ms=f,m0="value"in Ms?Ms.value:Ms.textContent,Ia=!0)),L=$d(c,D),0<L.length&&(D=new yx(D,t,null,r,f),m.push({event:D,listeners:L}),N?D.data=N:(N=vb(r),N!==null&&(D.data=N)))),(N=hI?cI(t,r):dI(t,r))&&(c=$d(c,"onBeforeInput"),0<c.length&&(f=new yx("onBeforeInput","beforeinput",null,r,f),m.push({event:f,listeners:c}),f.data=N))}Rb(m,e)})}function Uu(t,e,r){return{instance:t,listener:e,currentTarget:r}}function $d(t,e){for(var r=e+"Capture",n=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=ku(t,r),s!=null&&n.unshift(Uu(t,s,i)),s=ku(t,e),s!=null&&n.push(Uu(t,s,i))),t=t.return}return n}function fa(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Ix(t,e,r,n,i){for(var s=e._reactName,o=[];r!==null&&r!==n;){var l=r,h=l.alternate,c=l.stateNode;if(h!==null&&h===n)break;l.tag===5&&c!==null&&(l=c,i?(h=ku(r,s),h!=null&&o.unshift(Uu(r,h,l))):i||(h=ku(r,s),h!=null&&o.push(Uu(r,h,l)))),r=r.return}o.length!==0&&t.push({event:e,listeners:o})}var AI=/\r\n?/g,CI=/\u0000|\uFFFD/g;function Rx(t){return(typeof t=="string"?t:""+t).replace(AI,`
38
- `).replace(CI,"")}function Tc(t,e,r){if(e=Rx(e),Rx(t)!==e&&r)throw Error(ee(425))}function Wd(){}var Cy=null,Py=null;function Iy(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Ry=typeof setTimeout=="function"?setTimeout:void 0,PI=typeof clearTimeout=="function"?clearTimeout:void 0,Mx=typeof Promise=="function"?Promise:void 0,II=typeof queueMicrotask=="function"?queueMicrotask:typeof Mx<"u"?function(t){return Mx.resolve(null).then(t).catch(RI)}:Ry;function RI(t){setTimeout(function(){throw t})}function Vm(t,e){var r=e,n=0;do{var i=r.nextSibling;if(t.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){t.removeChild(i),Ou(e);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);Ou(e)}function Us(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function kx(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"){if(e===0)return t;e--}else r==="/$"&&e++}t=t.previousSibling}return null}var ml=Math.random().toString(36).slice(2),_i="__reactFiber$"+ml,zu="__reactProps$"+ml,es="__reactContainer$"+ml,My="__reactEvents$"+ml,MI="__reactListeners$"+ml,kI="__reactHandles$"+ml;function Ro(t){var e=t[_i];if(e)return e;for(var r=t.parentNode;r;){if(e=r[es]||r[_i]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=kx(t);t!==null;){if(r=t[_i])return r;t=kx(t)}return e}t=r,r=t.parentNode}return null}function sh(t){return t=t[_i]||t[es],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function ka(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(ee(33))}function Bf(t){return t[zu]||null}var ky=[],Na=-1;function qs(t){return{current:t}}function st(t){0>Na||(t.current=ky[Na],ky[Na]=null,Na--)}function et(t,e){Na++,ky[Na]=t.current,t.current=e}var Vs={},gr=qs(Vs),Lr=qs(!1),Lo=Vs;function il(t,e){var r=t.type.contextTypes;if(!r)return Vs;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=e[s];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Ur(t){return t=t.childContextTypes,t!=null}function Vd(){st(Lr),st(gr)}function Nx(t,e,r){if(gr.current!==Vs)throw Error(ee(168));et(gr,e),et(Lr,r)}function kb(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(ee(108,gP(t)||"Unknown",i));return yt({},r,n)}function Xd(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Vs,Lo=gr.current,et(gr,t),et(Lr,Lr.current),!0}function Dx(t,e,r){var n=t.stateNode;if(!n)throw Error(ee(169));r?(t=kb(t,e,Lo),n.__reactInternalMemoizedMergedChildContext=t,st(Lr),st(gr),et(gr,t)):st(Lr),et(Lr,r)}var Wi=null,Lf=!1,Xm=!1;function Nb(t){Wi===null?Wi=[t]:Wi.push(t)}function NI(t){Lf=!0,Nb(t)}function Zs(){if(!Xm&&Wi!==null){Xm=!0;var t=0,e=Ze;try{var r=Wi;for(Ze=1;t<r.length;t++){var n=r[t];do n=n(!0);while(n!==null)}Wi=null,Lf=!1}catch(i){throw Wi!==null&&(Wi=Wi.slice(t+1)),ib(c0,Zs),i}finally{Ze=e,Xm=!1}}return null}var Da=[],Oa=0,Yd=null,Qd=0,yn=[],vn=0,Uo=null,Vi=1,Xi="";function xo(t,e){Da[Oa++]=Qd,Da[Oa++]=Yd,Yd=t,Qd=e}function Db(t,e,r){yn[vn++]=Vi,yn[vn++]=Xi,yn[vn++]=Uo,Uo=t;var n=Vi;t=Xi;var i=32-Vn(n)-1;n&=~(1<<i),r+=1;var s=32-Vn(e)+i;if(30<s){var o=i-i%5;s=(n&(1<<o)-1).toString(32),n>>=o,i-=o,Vi=1<<32-Vn(e)+i|r<<i|n,Xi=s+t}else Vi=1<<s|r<<i|n,Xi=t}function x0(t){t.return!==null&&(xo(t,1),Db(t,1,0))}function w0(t){for(;t===Yd;)Yd=Da[--Oa],Da[Oa]=null,Qd=Da[--Oa],Da[Oa]=null;for(;t===Uo;)Uo=yn[--vn],yn[vn]=null,Xi=yn[--vn],yn[vn]=null,Vi=yn[--vn],yn[vn]=null}var Zr=null,qr=null,ht=!1,Gn=null;function Ob(t,e){var r=xn(5,null,null,0);r.elementType="DELETED",r.stateNode=e,r.return=t,e=t.deletions,e===null?(t.deletions=[r],t.flags|=16):e.push(r)}function Ox(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Zr=t,qr=Us(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Zr=t,qr=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(r=Uo!==null?{id:Vi,overflow:Xi}:null,t.memoizedState={dehydrated:e,treeContext:r,retryLane:1073741824},r=xn(18,null,null,0),r.stateNode=e,r.return=t,t.child=r,Zr=t,qr=null,!0):!1;default:return!1}}function Ny(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Dy(t){if(ht){var e=qr;if(e){var r=e;if(!Ox(t,e)){if(Ny(t))throw Error(ee(418));e=Us(r.nextSibling);var n=Zr;e&&Ox(t,e)?Ob(n,r):(t.flags=t.flags&-4097|2,ht=!1,Zr=t)}}else{if(Ny(t))throw Error(ee(418));t.flags=t.flags&-4097|2,ht=!1,Zr=t}}}function Fx(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Zr=t}function Ac(t){if(t!==Zr)return!1;if(!ht)return Fx(t),ht=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Iy(t.type,t.memoizedProps)),e&&(e=qr)){if(Ny(t))throw Fb(),Error(ee(418));for(;e;)Ob(t,e),e=Us(e.nextSibling)}if(Fx(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(ee(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){qr=Us(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}qr=null}}else qr=Zr?Us(t.stateNode.nextSibling):null;return!0}function Fb(){for(var t=qr;t;)t=Us(t.nextSibling)}function sl(){qr=Zr=null,ht=!1}function E0(t){Gn===null?Gn=[t]:Gn.push(t)}var DI=os.ReactCurrentBatchConfig;function Xl(t,e,r){if(t=r.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(ee(309));var n=r.stateNode}if(!n)throw Error(ee(147,t));var i=n,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var l=i.refs;o===null?delete l[s]:l[s]=o},e._stringRef=s,e)}if(typeof t!="string")throw Error(ee(284));if(!r._owner)throw Error(ee(290,t))}return t}function Cc(t,e){throw t=Object.prototype.toString.call(e),Error(ee(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Bx(t){var e=t._init;return e(t._payload)}function Bb(t){function e(S,b){if(t){var x=S.deletions;x===null?(S.deletions=[b],S.flags|=16):x.push(b)}}function r(S,b){if(!t)return null;for(;b!==null;)e(S,b),b=b.sibling;return null}function n(S,b){for(S=new Map;b!==null;)b.key!==null?S.set(b.key,b):S.set(b.index,b),b=b.sibling;return S}function i(S,b){return S=js(S,b),S.index=0,S.sibling=null,S}function s(S,b,x){return S.index=x,t?(x=S.alternate,x!==null?(x=x.index,x<b?(S.flags|=2,b):x):(S.flags|=2,b)):(S.flags|=1048576,b)}function o(S){return t&&S.alternate===null&&(S.flags|=2),S}function l(S,b,x,A){return b===null||b.tag!==6?(b=eg(x,S.mode,A),b.return=S,b):(b=i(b,x),b.return=S,b)}function h(S,b,x,A){var R=x.type;return R===Pa?f(S,b,x.props.children,A,x.key):b!==null&&(b.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===As&&Bx(R)===b.type)?(A=i(b,x.props),A.ref=Xl(S,b,x),A.return=S,A):(A=Sd(x.type,x.key,x.props,null,S.mode,A),A.ref=Xl(S,b,x),A.return=S,A)}function c(S,b,x,A){return b===null||b.tag!==4||b.stateNode.containerInfo!==x.containerInfo||b.stateNode.implementation!==x.implementation?(b=tg(x,S.mode,A),b.return=S,b):(b=i(b,x.children||[]),b.return=S,b)}function f(S,b,x,A,R){return b===null||b.tag!==7?(b=Do(x,S.mode,A,R),b.return=S,b):(b=i(b,x),b.return=S,b)}function m(S,b,x){if(typeof b=="string"&&b!==""||typeof b=="number")return b=eg(""+b,S.mode,x),b.return=S,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case gc:return x=Sd(b.type,b.key,b.props,null,S.mode,x),x.ref=Xl(S,null,b),x.return=S,x;case Ca:return b=tg(b,S.mode,x),b.return=S,b;case As:var A=b._init;return m(S,A(b._payload),x)}if(nu(b)||Hl(b))return b=Do(b,S.mode,x,null),b.return=S,b;Cc(S,b)}return null}function p(S,b,x,A){var R=b!==null?b.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return R!==null?null:l(S,b,""+x,A);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case gc:return x.key===R?h(S,b,x,A):null;case Ca:return x.key===R?c(S,b,x,A):null;case As:return R=x._init,p(S,b,R(x._payload),A)}if(nu(x)||Hl(x))return R!==null?null:f(S,b,x,A,null);Cc(S,x)}return null}function v(S,b,x,A,R){if(typeof A=="string"&&A!==""||typeof A=="number")return S=S.get(x)||null,l(b,S,""+A,R);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case gc:return S=S.get(A.key===null?x:A.key)||null,h(b,S,A,R);case Ca:return S=S.get(A.key===null?x:A.key)||null,c(b,S,A,R);case As:var L=A._init;return v(S,b,x,L(A._payload),R)}if(nu(A)||Hl(A))return S=S.get(x)||null,f(b,S,A,R,null);Cc(b,A)}return null}function _(S,b,x,A){for(var R=null,L=null,N=b,D=b=0,q=null;N!==null&&D<x.length;D++){N.index>D?(q=N,N=null):q=N.sibling;var $=p(S,N,x[D],A);if($===null){N===null&&(N=q);break}t&&N&&$.alternate===null&&e(S,N),b=s($,b,D),L===null?R=$:L.sibling=$,L=$,N=q}if(D===x.length)return r(S,N),ht&&xo(S,D),R;if(N===null){for(;D<x.length;D++)N=m(S,x[D],A),N!==null&&(b=s(N,b,D),L===null?R=N:L.sibling=N,L=N);return ht&&xo(S,D),R}for(N=n(S,N);D<x.length;D++)q=v(N,S,D,x[D],A),q!==null&&(t&&q.alternate!==null&&N.delete(q.key===null?D:q.key),b=s(q,b,D),L===null?R=q:L.sibling=q,L=q);return t&&N.forEach(function(me){return e(S,me)}),ht&&xo(S,D),R}function E(S,b,x,A){var R=Hl(x);if(typeof R!="function")throw Error(ee(150));if(x=R.call(x),x==null)throw Error(ee(151));for(var L=R=null,N=b,D=b=0,q=null,$=x.next();N!==null&&!$.done;D++,$=x.next()){N.index>D?(q=N,N=null):q=N.sibling;var me=p(S,N,$.value,A);if(me===null){N===null&&(N=q);break}t&&N&&me.alternate===null&&e(S,N),b=s(me,b,D),L===null?R=me:L.sibling=me,L=me,N=q}if($.done)return r(S,N),ht&&xo(S,D),R;if(N===null){for(;!$.done;D++,$=x.next())$=m(S,$.value,A),$!==null&&(b=s($,b,D),L===null?R=$:L.sibling=$,L=$);return ht&&xo(S,D),R}for(N=n(S,N);!$.done;D++,$=x.next())$=v(N,S,D,$.value,A),$!==null&&(t&&$.alternate!==null&&N.delete($.key===null?D:$.key),b=s($,b,D),L===null?R=$:L.sibling=$,L=$);return t&&N.forEach(function(ne){return e(S,ne)}),ht&&xo(S,D),R}function T(S,b,x,A){if(typeof x=="object"&&x!==null&&x.type===Pa&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case gc:e:{for(var R=x.key,L=b;L!==null;){if(L.key===R){if(R=x.type,R===Pa){if(L.tag===7){r(S,L.sibling),b=i(L,x.props.children),b.return=S,S=b;break e}}else if(L.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===As&&Bx(R)===L.type){r(S,L.sibling),b=i(L,x.props),b.ref=Xl(S,L,x),b.return=S,S=b;break e}r(S,L);break}else e(S,L);L=L.sibling}x.type===Pa?(b=Do(x.props.children,S.mode,A,x.key),b.return=S,S=b):(A=Sd(x.type,x.key,x.props,null,S.mode,A),A.ref=Xl(S,b,x),A.return=S,S=A)}return o(S);case Ca:e:{for(L=x.key;b!==null;){if(b.key===L)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){r(S,b.sibling),b=i(b,x.children||[]),b.return=S,S=b;break e}else{r(S,b);break}else e(S,b);b=b.sibling}b=tg(x,S.mode,A),b.return=S,S=b}return o(S);case As:return L=x._init,T(S,b,L(x._payload),A)}if(nu(x))return _(S,b,x,A);if(Hl(x))return E(S,b,x,A);Cc(S,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(r(S,b.sibling),b=i(b,x),b.return=S,S=b):(r(S,b),b=eg(x,S.mode,A),b.return=S,S=b),o(S)):r(S,b)}return T}var ol=Bb(!0),Lb=Bb(!1),Kd=qs(null),qd=null,Fa=null,S0=null;function b0(){S0=Fa=qd=null}function T0(t){var e=Kd.current;st(Kd),t._currentValue=e}function Oy(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function Xa(t,e){qd=t,S0=Fa=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Fr=!0),t.firstContext=null)}function Tn(t){var e=t._currentValue;if(S0!==t)if(t={context:t,memoizedValue:e,next:null},Fa===null){if(qd===null)throw Error(ee(308));Fa=t,qd.dependencies={lanes:0,firstContext:t}}else Fa=Fa.next=t;return e}var Mo=null;function A0(t){Mo===null?Mo=[t]:Mo.push(t)}function Ub(t,e,r,n){var i=e.interleaved;return i===null?(r.next=r,A0(e)):(r.next=i.next,i.next=r),e.interleaved=r,ts(t,n)}function ts(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var Cs=!1;function C0(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zb(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Ki(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function zs(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,$e&2){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,ts(t,r)}return i=n.interleaved,i===null?(e.next=e,A0(n)):(e.next=i.next,i.next=e),n.interleaved=e,ts(t,r)}function yd(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,d0(t,r)}}function Lx(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?i=s=o:s=s.next=o,r=r.next}while(r!==null);s===null?i=s=e:s=s.next=e}else i=s=e;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function Zd(t,e,r,n){var i=t.updateQueue;Cs=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var h=l,c=h.next;h.next=null,o===null?s=c:o.next=c,o=h;var f=t.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==o&&(l===null?f.firstBaseUpdate=c:l.next=c,f.lastBaseUpdate=h))}if(s!==null){var m=i.baseState;o=0,f=c=h=null,l=s;do{var p=l.lane,v=l.eventTime;if((n&p)===p){f!==null&&(f=f.next={eventTime:v,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var _=t,E=l;switch(p=e,v=r,E.tag){case 1:if(_=E.payload,typeof _=="function"){m=_.call(v,m,p);break e}m=_;break e;case 3:_.flags=_.flags&-65537|128;case 0:if(_=E.payload,p=typeof _=="function"?_.call(v,m,p):_,p==null)break e;m=yt({},m,p);break e;case 2:Cs=!0}}l.callback!==null&&l.lane!==0&&(t.flags|=64,p=i.effects,p===null?i.effects=[l]:p.push(l))}else v={eventTime:v,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(c=f=v,h=m):f=f.next=v,o|=p;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;p=l,l=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(f===null&&(h=m),i.baseState=h,i.firstBaseUpdate=c,i.lastBaseUpdate=f,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);Go|=o,t.lanes=o,t.memoizedState=m}}function Ux(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var n=t[e],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(ee(191,i));i.call(n)}}}var oh={},Ti=qs(oh),Gu=qs(oh),Hu=qs(oh);function ko(t){if(t===oh)throw Error(ee(174));return t}function P0(t,e){switch(et(Hu,e),et(Gu,t),et(Ti,oh),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:my(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=my(e,t)}st(Ti),et(Ti,e)}function al(){st(Ti),st(Gu),st(Hu)}function Gb(t){ko(Hu.current);var e=ko(Ti.current),r=my(e,t.type);e!==r&&(et(Gu,t),et(Ti,r))}function I0(t){Gu.current===t&&(st(Ti),st(Gu))}var pt=qs(0);function Jd(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Ym=[];function R0(){for(var t=0;t<Ym.length;t++)Ym[t]._workInProgressVersionPrimary=null;Ym.length=0}var vd=os.ReactCurrentDispatcher,Qm=os.ReactCurrentBatchConfig,zo=0,gt=null,Lt=null,Vt=null,ef=!1,xu=!1,ju=0,OI=0;function fr(){throw Error(ee(321))}function M0(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!Kn(t[r],e[r]))return!1;return!0}function k0(t,e,r,n,i,s){if(zo=s,gt=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,vd.current=t===null||t.memoizedState===null?UI:zI,t=r(n,i),xu){s=0;do{if(xu=!1,ju=0,25<=s)throw Error(ee(301));s+=1,Vt=Lt=null,e.updateQueue=null,vd.current=GI,t=r(n,i)}while(xu)}if(vd.current=tf,e=Lt!==null&&Lt.next!==null,zo=0,Vt=Lt=gt=null,ef=!1,e)throw Error(ee(300));return t}function N0(){var t=ju!==0;return ju=0,t}function mi(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vt===null?gt.memoizedState=Vt=t:Vt=Vt.next=t,Vt}function An(){if(Lt===null){var t=gt.alternate;t=t!==null?t.memoizedState:null}else t=Lt.next;var e=Vt===null?gt.memoizedState:Vt.next;if(e!==null)Vt=e,Lt=t;else{if(t===null)throw Error(ee(310));Lt=t,t={memoizedState:Lt.memoizedState,baseState:Lt.baseState,baseQueue:Lt.baseQueue,queue:Lt.queue,next:null},Vt===null?gt.memoizedState=Vt=t:Vt=Vt.next=t}return Vt}function $u(t,e){return typeof e=="function"?e(t):e}function Km(t){var e=An(),r=e.queue;if(r===null)throw Error(ee(311));r.lastRenderedReducer=t;var n=Lt,i=n.baseQueue,s=r.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}n.baseQueue=i=s,r.pending=null}if(i!==null){s=i.next,n=n.baseState;var l=o=null,h=null,c=s;do{var f=c.lane;if((zo&f)===f)h!==null&&(h=h.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:t(n,c.action);else{var m={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};h===null?(l=h=m,o=n):h=h.next=m,gt.lanes|=f,Go|=f}c=c.next}while(c!==null&&c!==s);h===null?o=n:h.next=l,Kn(n,e.memoizedState)||(Fr=!0),e.memoizedState=n,e.baseState=o,e.baseQueue=h,r.lastRenderedState=n}if(t=r.interleaved,t!==null){i=t;do s=i.lane,gt.lanes|=s,Go|=s,i=i.next;while(i!==t)}else i===null&&(r.lanes=0);return[e.memoizedState,r.dispatch]}function qm(t){var e=An(),r=e.queue;if(r===null)throw Error(ee(311));r.lastRenderedReducer=t;var n=r.dispatch,i=r.pending,s=e.memoizedState;if(i!==null){r.pending=null;var o=i=i.next;do s=t(s,o.action),o=o.next;while(o!==i);Kn(s,e.memoizedState)||(Fr=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),r.lastRenderedState=s}return[s,n]}function Hb(){}function jb(t,e){var r=gt,n=An(),i=e(),s=!Kn(n.memoizedState,i);if(s&&(n.memoizedState=i,Fr=!0),n=n.queue,D0(Vb.bind(null,r,n,t),[t]),n.getSnapshot!==e||s||Vt!==null&&Vt.memoizedState.tag&1){if(r.flags|=2048,Wu(9,Wb.bind(null,r,n,i,e),void 0,null),Qt===null)throw Error(ee(349));zo&30||$b(r,e,i)}return i}function $b(t,e,r){t.flags|=16384,t={getSnapshot:e,value:r},e=gt.updateQueue,e===null?(e={lastEffect:null,stores:null},gt.updateQueue=e,e.stores=[t]):(r=e.stores,r===null?e.stores=[t]:r.push(t))}function Wb(t,e,r,n){e.value=r,e.getSnapshot=n,Xb(e)&&Yb(t)}function Vb(t,e,r){return r(function(){Xb(e)&&Yb(t)})}function Xb(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!Kn(t,r)}catch{return!0}}function Yb(t){var e=ts(t,1);e!==null&&Xn(e,t,1,-1)}function zx(t){var e=mi();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:$u,lastRenderedState:t},e.queue=t,t=t.dispatch=LI.bind(null,gt,t),[e.memoizedState,t]}function Wu(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=gt.updateQueue,e===null?(e={lastEffect:null,stores:null},gt.updateQueue=e,e.lastEffect=t.next=t):(r=e.lastEffect,r===null?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t)),t}function Qb(){return An().memoizedState}function _d(t,e,r,n){var i=mi();gt.flags|=t,i.memoizedState=Wu(1|e,r,void 0,n===void 0?null:n)}function Uf(t,e,r,n){var i=An();n=n===void 0?null:n;var s=void 0;if(Lt!==null){var o=Lt.memoizedState;if(s=o.destroy,n!==null&&M0(n,o.deps)){i.memoizedState=Wu(e,r,s,n);return}}gt.flags|=t,i.memoizedState=Wu(1|e,r,s,n)}function Gx(t,e){return _d(8390656,8,t,e)}function D0(t,e){return Uf(2048,8,t,e)}function Kb(t,e){return Uf(4,2,t,e)}function qb(t,e){return Uf(4,4,t,e)}function Zb(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Jb(t,e,r){return r=r!=null?r.concat([t]):null,Uf(4,4,Zb.bind(null,e,t),r)}function O0(){}function eT(t,e){var r=An();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&M0(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function tT(t,e){var r=An();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&M0(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function rT(t,e,r){return zo&21?(Kn(r,e)||(r=ab(),gt.lanes|=r,Go|=r,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,Fr=!0),t.memoizedState=r)}function FI(t,e){var r=Ze;Ze=r!==0&&4>r?r:4,t(!0);var n=Qm.transition;Qm.transition={};try{t(!1),e()}finally{Ze=r,Qm.transition=n}}function nT(){return An().memoizedState}function BI(t,e,r){var n=Hs(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},iT(t))sT(e,r);else if(r=Ub(t,e,r,n),r!==null){var i=br();Xn(r,t,n,i),oT(r,e,n)}}function LI(t,e,r){var n=Hs(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(iT(t))sT(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,l=s(o,r);if(i.hasEagerState=!0,i.eagerState=l,Kn(l,o)){var h=e.interleaved;h===null?(i.next=i,A0(e)):(i.next=h.next,h.next=i),e.interleaved=i;return}}catch{}finally{}r=Ub(t,e,i,n),r!==null&&(i=br(),Xn(r,t,n,i),oT(r,e,n))}}function iT(t){var e=t.alternate;return t===gt||e!==null&&e===gt}function sT(t,e){xu=ef=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function oT(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,d0(t,r)}}var tf={readContext:Tn,useCallback:fr,useContext:fr,useEffect:fr,useImperativeHandle:fr,useInsertionEffect:fr,useLayoutEffect:fr,useMemo:fr,useReducer:fr,useRef:fr,useState:fr,useDebugValue:fr,useDeferredValue:fr,useTransition:fr,useMutableSource:fr,useSyncExternalStore:fr,useId:fr,unstable_isNewReconciler:!1},UI={readContext:Tn,useCallback:function(t,e){return mi().memoizedState=[t,e===void 0?null:e],t},useContext:Tn,useEffect:Gx,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,_d(4194308,4,Zb.bind(null,e,t),r)},useLayoutEffect:function(t,e){return _d(4194308,4,t,e)},useInsertionEffect:function(t,e){return _d(4,2,t,e)},useMemo:function(t,e){var r=mi();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=mi();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=BI.bind(null,gt,t),[n.memoizedState,t]},useRef:function(t){var e=mi();return t={current:t},e.memoizedState=t},useState:zx,useDebugValue:O0,useDeferredValue:function(t){return mi().memoizedState=t},useTransition:function(){var t=zx(!1),e=t[0];return t=FI.bind(null,t[1]),mi().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=gt,i=mi();if(ht){if(r===void 0)throw Error(ee(407));r=r()}else{if(r=e(),Qt===null)throw Error(ee(349));zo&30||$b(n,e,r)}i.memoizedState=r;var s={value:r,getSnapshot:e};return i.queue=s,Gx(Vb.bind(null,n,s,t),[t]),n.flags|=2048,Wu(9,Wb.bind(null,n,s,r,e),void 0,null),r},useId:function(){var t=mi(),e=Qt.identifierPrefix;if(ht){var r=Xi,n=Vi;r=(n&~(1<<32-Vn(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=ju++,0<r&&(e+="H"+r.toString(32)),e+=":"}else r=OI++,e=":"+e+"r"+r.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},zI={readContext:Tn,useCallback:eT,useContext:Tn,useEffect:D0,useImperativeHandle:Jb,useInsertionEffect:Kb,useLayoutEffect:qb,useMemo:tT,useReducer:Km,useRef:Qb,useState:function(){return Km($u)},useDebugValue:O0,useDeferredValue:function(t){var e=An();return rT(e,Lt.memoizedState,t)},useTransition:function(){var t=Km($u)[0],e=An().memoizedState;return[t,e]},useMutableSource:Hb,useSyncExternalStore:jb,useId:nT,unstable_isNewReconciler:!1},GI={readContext:Tn,useCallback:eT,useContext:Tn,useEffect:D0,useImperativeHandle:Jb,useInsertionEffect:Kb,useLayoutEffect:qb,useMemo:tT,useReducer:qm,useRef:Qb,useState:function(){return qm($u)},useDebugValue:O0,useDeferredValue:function(t){var e=An();return Lt===null?e.memoizedState=t:rT(e,Lt.memoizedState,t)},useTransition:function(){var t=qm($u)[0],e=An().memoizedState;return[t,e]},useMutableSource:Hb,useSyncExternalStore:jb,useId:nT,unstable_isNewReconciler:!1};function Un(t,e){if(t&&t.defaultProps){e=yt({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}function Fy(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:yt({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var zf={isMounted:function(t){return(t=t._reactInternals)?Vo(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=br(),i=Hs(t),s=Ki(n,i);s.payload=e,r!=null&&(s.callback=r),e=zs(t,s,i),e!==null&&(Xn(e,t,i,n),yd(e,t,i))},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=br(),i=Hs(t),s=Ki(n,i);s.tag=1,s.payload=e,r!=null&&(s.callback=r),e=zs(t,s,i),e!==null&&(Xn(e,t,i,n),yd(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=br(),n=Hs(t),i=Ki(r,n);i.tag=2,e!=null&&(i.callback=e),e=zs(t,i,n),e!==null&&(Xn(e,t,n,r),yd(e,t,n))}};function Hx(t,e,r,n,i,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,s,o):e.prototype&&e.prototype.isPureReactComponent?!Bu(r,n)||!Bu(i,s):!0}function aT(t,e,r){var n=!1,i=Vs,s=e.contextType;return typeof s=="object"&&s!==null?s=Tn(s):(i=Ur(e)?Lo:gr.current,n=e.contextTypes,s=(n=n!=null)?il(t,i):Vs),e=new e(r,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=zf,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function jx(t,e,r,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(r,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&zf.enqueueReplaceState(e,e.state,null)}function By(t,e,r,n){var i=t.stateNode;i.props=r,i.state=t.memoizedState,i.refs={},C0(t);var s=e.contextType;typeof s=="object"&&s!==null?i.context=Tn(s):(s=Ur(e)?Lo:gr.current,i.context=il(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(Fy(t,e,s,r),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&zf.enqueueReplaceState(i,i.state,null),Zd(t,r,i,n),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function ll(t,e){try{var r="",n=e;do r+=mP(n),n=n.return;while(n);var i=r}catch(s){i=`
37
+ `+i[o].replace(" at new "," at ");return t.displayName&&h.includes("<anonymous>")&&(h=h.replace("<anonymous>",t.displayName)),h}while(1<=o&&0<=l);break}}}finally{km=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?ru(t):""}function mP(t){switch(t.tag){case 5:return ru(t.type);case 16:return ru("Lazy");case 13:return ru("Suspense");case 19:return ru("SuspenseList");case 0:case 2:case 15:return t=Nm(t.type,!1),t;case 11:return t=Nm(t.type.render,!1),t;case 1:return t=Nm(t.type,!0),t;default:return""}}function hy(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Pa:return"Fragment";case Ca:return"Portal";case ay:return"Profiler";case a0:return"StrictMode";case ly:return"Suspense";case uy:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case zS:return(t.displayName||"Context")+".Consumer";case US:return(t._context.displayName||"Context")+".Provider";case l0:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case u0:return e=t.displayName||null,e!==null?e:hy(t.type)||"Memo";case As:e=t._payload,t=t._init;try{return hy(t(e))}catch{}}return null}function gP(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return hy(e);case 8:return e===a0?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Ws(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function HS(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function yP(t){var e=HS(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function yc(t){t._valueTracker||(t._valueTracker=yP(t))}function jS(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=HS(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Bd(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function cy(t,e){var r=e.checked;return yt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function ox(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=Ws(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function $S(t,e){e=e.checked,e!=null&&o0(t,"checked",e,!1)}function dy(t,e){$S(t,e);var r=Ws(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?fy(t,e.type,r):e.hasOwnProperty("defaultValue")&&fy(t,e.type,Ws(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function ax(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function fy(t,e,r){(e!=="number"||Bd(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var nu=Array.isArray;function ja(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i<r.length;i++)e["$"+r[i]]=!0;for(r=0;r<t.length;r++)i=e.hasOwnProperty("$"+t[r].value),t[r].selected!==i&&(t[r].selected=i),i&&n&&(t[r].defaultSelected=!0)}else{for(r=""+Ws(r),e=null,i=0;i<t.length;i++){if(t[i].value===r){t[i].selected=!0,n&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function py(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(ee(91));return yt({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function lx(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error(ee(92));if(nu(r)){if(1<r.length)throw Error(ee(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:Ws(r)}}function WS(t,e){var r=Ws(e.value),n=Ws(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function ux(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function VS(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function my(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?VS(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var vc,XS=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,i){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(vc=vc||document.createElement("div"),vc.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=vc.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Mu(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var mu={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},vP=["Webkit","ms","Moz","O"];Object.keys(mu).forEach(function(t){vP.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),mu[e]=mu[t]})});function YS(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||mu.hasOwnProperty(t)&&mu[t]?(""+e).trim():e+"px"}function QS(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=YS(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var _P=yt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function gy(t,e){if(e){if(_P[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ee(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ee(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ee(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ee(62))}}function yy(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 vy=null;function h0(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var _y=null,$a=null,Wa=null;function hx(t){if(t=sh(t)){if(typeof _y!="function")throw Error(ee(280));var e=t.stateNode;e&&(e=Bf(e),_y(t.stateNode,t.type,e))}}function KS(t){$a?Wa?Wa.push(t):Wa=[t]:$a=t}function qS(){if($a){var t=$a,e=Wa;if(Wa=$a=null,hx(t),e)for(t=0;t<e.length;t++)hx(e[t])}}function ZS(t,e){return t(e)}function JS(){}var Dm=!1;function eb(t,e,r){if(Dm)return t(e,r);Dm=!0;try{return ZS(t,e,r)}finally{Dm=!1,($a!==null||Wa!==null)&&(JS(),qS())}}function ku(t,e){var r=t.stateNode;if(r===null)return null;var n=Bf(r);if(n===null)return null;r=n[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(ee(231,e,typeof r));return r}var xy=!1;if(Ji)try{var jl={};Object.defineProperty(jl,"passive",{get:function(){xy=!0}}),window.addEventListener("test",jl,jl),window.removeEventListener("test",jl,jl)}catch{xy=!1}function xP(t,e,r,n,i,s,o,l,h){var c=Array.prototype.slice.call(arguments,3);try{e.apply(r,c)}catch(f){this.onError(f)}}var gu=!1,Ld=null,Ud=!1,wy=null,wP={onError:function(t){gu=!0,Ld=t}};function EP(t,e,r,n,i,s,o,l,h){gu=!1,Ld=null,xP.apply(wP,arguments)}function SP(t,e,r,n,i,s,o,l,h){if(EP.apply(this,arguments),gu){if(gu){var c=Ld;gu=!1,Ld=null}else throw Error(ee(198));Ud||(Ud=!0,wy=c)}}function Vo(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(r=e.return),t=e.return;while(t)}return e.tag===3?r:null}function tb(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function cx(t){if(Vo(t)!==t)throw Error(ee(188))}function bP(t){var e=t.alternate;if(!e){if(e=Vo(t),e===null)throw Error(ee(188));return e!==t?null:t}for(var r=t,n=e;;){var i=r.return;if(i===null)break;var s=i.alternate;if(s===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===r)return cx(i),t;if(s===n)return cx(i),e;s=s.sibling}throw Error(ee(188))}if(r.return!==n.return)r=i,n=s;else{for(var o=!1,l=i.child;l;){if(l===r){o=!0,r=i,n=s;break}if(l===n){o=!0,n=i,r=s;break}l=l.sibling}if(!o){for(l=s.child;l;){if(l===r){o=!0,r=s,n=i;break}if(l===n){o=!0,n=s,r=i;break}l=l.sibling}if(!o)throw Error(ee(189))}}if(r.alternate!==n)throw Error(ee(190))}if(r.tag!==3)throw Error(ee(188));return r.stateNode.current===r?t:e}function rb(t){return t=bP(t),t!==null?nb(t):null}function nb(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=nb(t);if(e!==null)return e;t=t.sibling}return null}var ib=en.unstable_scheduleCallback,dx=en.unstable_cancelCallback,TP=en.unstable_shouldYield,AP=en.unstable_requestPaint,Rt=en.unstable_now,CP=en.unstable_getCurrentPriorityLevel,c0=en.unstable_ImmediatePriority,sb=en.unstable_UserBlockingPriority,zd=en.unstable_NormalPriority,PP=en.unstable_LowPriority,ob=en.unstable_IdlePriority,Nf=null,bi=null;function IP(t){if(bi&&typeof bi.onCommitFiberRoot=="function")try{bi.onCommitFiberRoot(Nf,t,void 0,(t.current.flags&128)===128)}catch{}}var Vn=Math.clz32?Math.clz32:kP,RP=Math.log,MP=Math.LN2;function kP(t){return t>>>=0,t===0?32:31-(RP(t)/MP|0)|0}var _c=64,xc=4194304;function iu(t){switch(t&-t){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Gd(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,s=t.pingedLanes,o=r&268435455;if(o!==0){var l=o&~i;l!==0?n=iu(l):(s&=o,s!==0&&(n=iu(s)))}else o=r&~i,o!==0?n=iu(o):s!==0&&(n=iu(s));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0<e;)r=31-Vn(e),i=1<<r,n|=t[r],e&=~i;return n}function NP(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function DP(t,e){for(var r=t.suspendedLanes,n=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-Vn(s),l=1<<o,h=i[o];h===-1?(!(l&r)||l&n)&&(i[o]=NP(l,e)):h<=e&&(t.expiredLanes|=l),s&=~l}}function Ey(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function ab(){var t=_c;return _c<<=1,!(_c&4194240)&&(_c=64),t}function Om(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function nh(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Vn(e),t[e]=r}function OP(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0<r;){var i=31-Vn(r),s=1<<i;e[i]=0,n[i]=-1,t[i]=-1,r&=~s}}function d0(t,e){var r=t.entangledLanes|=e;for(t=t.entanglements;r;){var n=31-Vn(r),i=1<<n;i&e|t[n]&e&&(t[n]|=e),r&=~i}}var Ze=0;function lb(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var ub,f0,hb,cb,db,Sy=!1,wc=[],Fs=null,Bs=null,Ls=null,Nu=new Map,Du=new Map,Ps=[],FP="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 submit".split(" ");function fx(t,e){switch(t){case"focusin":case"focusout":Fs=null;break;case"dragenter":case"dragleave":Bs=null;break;case"mouseover":case"mouseout":Ls=null;break;case"pointerover":case"pointerout":Nu.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Du.delete(e.pointerId)}}function $l(t,e,r,n,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:r,eventSystemFlags:n,nativeEvent:s,targetContainers:[i]},e!==null&&(e=sh(e),e!==null&&f0(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function BP(t,e,r,n,i){switch(e){case"focusin":return Fs=$l(Fs,t,e,r,n,i),!0;case"dragenter":return Bs=$l(Bs,t,e,r,n,i),!0;case"mouseover":return Ls=$l(Ls,t,e,r,n,i),!0;case"pointerover":var s=i.pointerId;return Nu.set(s,$l(Nu.get(s)||null,t,e,r,n,i)),!0;case"gotpointercapture":return s=i.pointerId,Du.set(s,$l(Du.get(s)||null,t,e,r,n,i)),!0}return!1}function fb(t){var e=Ro(t.target);if(e!==null){var r=Vo(e);if(r!==null){if(e=r.tag,e===13){if(e=tb(r),e!==null){t.blockedOn=e,db(t.priority,function(){hb(r)});return}}else if(e===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function pd(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=by(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r===null){r=t.nativeEvent;var n=new r.constructor(r.type,r);vy=n,r.target.dispatchEvent(n),vy=null}else return e=sh(r),e!==null&&f0(e),t.blockedOn=r,!1;e.shift()}return!0}function px(t,e,r){pd(t)&&r.delete(e)}function LP(){Sy=!1,Fs!==null&&pd(Fs)&&(Fs=null),Bs!==null&&pd(Bs)&&(Bs=null),Ls!==null&&pd(Ls)&&(Ls=null),Nu.forEach(px),Du.forEach(px)}function Wl(t,e){t.blockedOn===e&&(t.blockedOn=null,Sy||(Sy=!0,en.unstable_scheduleCallback(en.unstable_NormalPriority,LP)))}function Ou(t){function e(i){return Wl(i,t)}if(0<wc.length){Wl(wc[0],t);for(var r=1;r<wc.length;r++){var n=wc[r];n.blockedOn===t&&(n.blockedOn=null)}}for(Fs!==null&&Wl(Fs,t),Bs!==null&&Wl(Bs,t),Ls!==null&&Wl(Ls,t),Nu.forEach(e),Du.forEach(e),r=0;r<Ps.length;r++)n=Ps[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<Ps.length&&(r=Ps[0],r.blockedOn===null);)fb(r),r.blockedOn===null&&Ps.shift()}var Va=os.ReactCurrentBatchConfig,Hd=!0;function UP(t,e,r,n){var i=Ze,s=Va.transition;Va.transition=null;try{Ze=1,p0(t,e,r,n)}finally{Ze=i,Va.transition=s}}function zP(t,e,r,n){var i=Ze,s=Va.transition;Va.transition=null;try{Ze=4,p0(t,e,r,n)}finally{Ze=i,Va.transition=s}}function p0(t,e,r,n){if(Hd){var i=by(t,e,r,n);if(i===null)Wm(t,e,n,jd,r),fx(t,n);else if(BP(i,t,e,r,n))n.stopPropagation();else if(fx(t,n),e&4&&-1<FP.indexOf(t)){for(;i!==null;){var s=sh(i);if(s!==null&&ub(s),s=by(t,e,r,n),s===null&&Wm(t,e,n,jd,r),s===i)break;i=s}i!==null&&n.stopPropagation()}else Wm(t,e,n,null,r)}}var jd=null;function by(t,e,r,n){if(jd=null,t=h0(n),t=Ro(t),t!==null)if(e=Vo(t),e===null)t=null;else if(r=e.tag,r===13){if(t=tb(e),t!==null)return t;t=null}else if(r===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return jd=t,null}function pb(t){switch(t){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(CP()){case c0:return 1;case sb:return 4;case zd:case PP:return 16;case ob:return 536870912;default:return 16}default:return 16}}var Ms=null,m0=null,md=null;function mb(){if(md)return md;var t,e=m0,r=e.length,n,i="value"in Ms?Ms.value:Ms.textContent,s=i.length;for(t=0;t<r&&e[t]===i[t];t++);var o=r-t;for(n=1;n<=o&&e[r-n]===i[s-n];n++);return md=i.slice(t,1<n?1-n:void 0)}function gd(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Ec(){return!0}function mx(){return!1}function rn(t){function e(r,n,i,s,o){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var l in t)t.hasOwnProperty(l)&&(r=t[l],this[l]=r?r(s):s[l]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Ec:mx,this.isPropagationStopped=mx,this}return yt(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Ec)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ec)},persist:function(){},isPersistent:Ec}),e}var pl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},g0=rn(pl),ih=yt({},pl,{view:0,detail:0}),GP=rn(ih),Fm,Bm,Vl,Df=yt({},ih,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:y0,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Vl&&(Vl&&t.type==="mousemove"?(Fm=t.screenX-Vl.screenX,Bm=t.screenY-Vl.screenY):Bm=Fm=0,Vl=t),Fm)},movementY:function(t){return"movementY"in t?t.movementY:Bm}}),gx=rn(Df),HP=yt({},Df,{dataTransfer:0}),jP=rn(HP),$P=yt({},ih,{relatedTarget:0}),Lm=rn($P),WP=yt({},pl,{animationName:0,elapsedTime:0,pseudoElement:0}),VP=rn(WP),XP=yt({},pl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),YP=rn(XP),QP=yt({},pl,{data:0}),yx=rn(QP),KP={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qP={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"},ZP={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function JP(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=ZP[t])?!!e[t]:!1}function y0(){return JP}var eI=yt({},ih,{key:function(t){if(t.key){var e=KP[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=gd(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?qP[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:y0,charCode:function(t){return t.type==="keypress"?gd(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?gd(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),tI=rn(eI),rI=yt({},Df,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vx=rn(rI),nI=yt({},ih,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:y0}),iI=rn(nI),sI=yt({},pl,{propertyName:0,elapsedTime:0,pseudoElement:0}),oI=rn(sI),aI=yt({},Df,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),lI=rn(aI),uI=[9,13,27,32],v0=Ji&&"CompositionEvent"in window,yu=null;Ji&&"documentMode"in document&&(yu=document.documentMode);var hI=Ji&&"TextEvent"in window&&!yu,gb=Ji&&(!v0||yu&&8<yu&&11>=yu),_x=" ",xx=!1;function yb(t,e){switch(t){case"keyup":return uI.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vb(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ia=!1;function cI(t,e){switch(t){case"compositionend":return vb(e);case"keypress":return e.which!==32?null:(xx=!0,_x);case"textInput":return t=e.data,t===_x&&xx?null:t;default:return null}}function dI(t,e){if(Ia)return t==="compositionend"||!v0&&yb(t,e)?(t=mb(),md=m0=Ms=null,Ia=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return gb&&e.locale!=="ko"?null:e.data;default:return null}}var fI={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 wx(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!fI[t.type]:e==="textarea"}function _b(t,e,r,n){KS(n),e=$d(e,"onChange"),0<e.length&&(r=new g0("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var vu=null,Fu=null;function pI(t){Rb(t,0)}function Of(t){var e=ka(t);if(jS(e))return t}function mI(t,e){if(t==="change")return e}var xb=!1;if(Ji){var Um;if(Ji){var zm="oninput"in document;if(!zm){var Ex=document.createElement("div");Ex.setAttribute("oninput","return;"),zm=typeof Ex.oninput=="function"}Um=zm}else Um=!1;xb=Um&&(!document.documentMode||9<document.documentMode)}function Sx(){vu&&(vu.detachEvent("onpropertychange",wb),Fu=vu=null)}function wb(t){if(t.propertyName==="value"&&Of(Fu)){var e=[];_b(e,Fu,t,h0(t)),eb(pI,e)}}function gI(t,e,r){t==="focusin"?(Sx(),vu=e,Fu=r,vu.attachEvent("onpropertychange",wb)):t==="focusout"&&Sx()}function yI(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Of(Fu)}function vI(t,e){if(t==="click")return Of(e)}function _I(t,e){if(t==="input"||t==="change")return Of(e)}function xI(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Kn=typeof Object.is=="function"?Object.is:xI;function Bu(t,e){if(Kn(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!oy.call(e,i)||!Kn(t[i],e[i]))return!1}return!0}function bx(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Tx(t,e){var r=bx(t);t=0;for(var n;r;){if(r.nodeType===3){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=bx(r)}}function Eb(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Eb(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Sb(){for(var t=window,e=Bd();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Bd(t.document)}return e}function _0(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function wI(t){var e=Sb(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&Eb(r.ownerDocument.documentElement,r)){if(n!==null&&_0(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!t.extend&&s>n&&(i=n,n=s,s=i),i=Tx(r,s);var o=Tx(r,n);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<e.length;r++)t=e[r],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var EI=Ji&&"documentMode"in document&&11>=document.documentMode,Ra=null,Ty=null,_u=null,Ay=!1;function Ax(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ay||Ra==null||Ra!==Bd(n)||(n=Ra,"selectionStart"in n&&_0(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),_u&&Bu(_u,n)||(_u=n,n=$d(Ty,"onSelect"),0<n.length&&(e=new g0("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=Ra)))}function Sc(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var Ma={animationend:Sc("Animation","AnimationEnd"),animationiteration:Sc("Animation","AnimationIteration"),animationstart:Sc("Animation","AnimationStart"),transitionend:Sc("Transition","TransitionEnd")},Gm={},bb={};Ji&&(bb=document.createElement("div").style,"AnimationEvent"in window||(delete Ma.animationend.animation,delete Ma.animationiteration.animation,delete Ma.animationstart.animation),"TransitionEvent"in window||delete Ma.transitionend.transition);function Ff(t){if(Gm[t])return Gm[t];if(!Ma[t])return t;var e=Ma[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in bb)return Gm[t]=e[r];return t}var Tb=Ff("animationend"),Ab=Ff("animationiteration"),Cb=Ff("animationstart"),Pb=Ff("transitionend"),Ib=new Map,Cx="abort auxClick 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(" ");function Ks(t,e){Ib.set(t,e),Wo(e,[t])}for(var Hm=0;Hm<Cx.length;Hm++){var jm=Cx[Hm],SI=jm.toLowerCase(),bI=jm[0].toUpperCase()+jm.slice(1);Ks(SI,"on"+bI)}Ks(Tb,"onAnimationEnd");Ks(Ab,"onAnimationIteration");Ks(Cb,"onAnimationStart");Ks("dblclick","onDoubleClick");Ks("focusin","onFocus");Ks("focusout","onBlur");Ks(Pb,"onTransitionEnd");nl("onMouseEnter",["mouseout","mouseover"]);nl("onMouseLeave",["mouseout","mouseover"]);nl("onPointerEnter",["pointerout","pointerover"]);nl("onPointerLeave",["pointerout","pointerover"]);Wo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Wo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Wo("onBeforeInput",["compositionend","keypress","textInput","paste"]);Wo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Wo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Wo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var su="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(" "),TI=new Set("cancel close invalid load scroll toggle".split(" ").concat(su));function Px(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,SP(n,e,void 0,t),t.currentTarget=null}function Rb(t,e){e=(e&4)!==0;for(var r=0;r<t.length;r++){var n=t[r],i=n.event;n=n.listeners;e:{var s=void 0;if(e)for(var o=n.length-1;0<=o;o--){var l=n[o],h=l.instance,c=l.currentTarget;if(l=l.listener,h!==s&&i.isPropagationStopped())break e;Px(i,l,c),s=h}else for(o=0;o<n.length;o++){if(l=n[o],h=l.instance,c=l.currentTarget,l=l.listener,h!==s&&i.isPropagationStopped())break e;Px(i,l,c),s=h}}}if(Ud)throw t=wy,Ud=!1,wy=null,t}function nt(t,e){var r=e[My];r===void 0&&(r=e[My]=new Set);var n=t+"__bubble";r.has(n)||(Mb(e,t,2,!1),r.add(n))}function $m(t,e,r){var n=0;e&&(n|=4),Mb(r,t,n,e)}var bc="_reactListening"+Math.random().toString(36).slice(2);function Lu(t){if(!t[bc]){t[bc]=!0,LS.forEach(function(r){r!=="selectionchange"&&(TI.has(r)||$m(r,!1,t),$m(r,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[bc]||(e[bc]=!0,$m("selectionchange",!1,e))}}function Mb(t,e,r,n){switch(pb(e)){case 1:var i=UP;break;case 4:i=zP;break;default:i=p0}r=i.bind(null,e,r,t),i=void 0,!xy||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),n?i!==void 0?t.addEventListener(e,r,{capture:!0,passive:i}):t.addEventListener(e,r,!0):i!==void 0?t.addEventListener(e,r,{passive:i}):t.addEventListener(e,r,!1)}function Wm(t,e,r,n,i){var s=n;if(!(e&1)&&!(e&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var l=n.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(o===4)for(o=n.return;o!==null;){var h=o.tag;if((h===3||h===4)&&(h=o.stateNode.containerInfo,h===i||h.nodeType===8&&h.parentNode===i))return;o=o.return}for(;l!==null;){if(o=Ro(l),o===null)return;if(h=o.tag,h===5||h===6){n=s=o;continue e}l=l.parentNode}}n=n.return}eb(function(){var c=s,f=h0(r),m=[];e:{var p=Ib.get(t);if(p!==void 0){var v=g0,_=t;switch(t){case"keypress":if(gd(r)===0)break e;case"keydown":case"keyup":v=tI;break;case"focusin":_="focus",v=Lm;break;case"focusout":_="blur",v=Lm;break;case"beforeblur":case"afterblur":v=Lm;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":v=gx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=jP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=iI;break;case Tb:case Ab:case Cb:v=VP;break;case Pb:v=oI;break;case"scroll":v=GP;break;case"wheel":v=lI;break;case"copy":case"cut":case"paste":v=YP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=vx}var E=(e&4)!==0,T=!E&&t==="scroll",S=E?p!==null?p+"Capture":null:p;E=[];for(var b=c,x;b!==null;){x=b;var A=x.stateNode;if(x.tag===5&&A!==null&&(x=A,S!==null&&(A=ku(b,S),A!=null&&E.push(Uu(b,A,x)))),T)break;b=b.return}0<E.length&&(p=new v(p,_,null,r,f),m.push({event:p,listeners:E}))}}if(!(e&7)){e:{if(p=t==="mouseover"||t==="pointerover",v=t==="mouseout"||t==="pointerout",p&&r!==vy&&(_=r.relatedTarget||r.fromElement)&&(Ro(_)||_[es]))break e;if((v||p)&&(p=f.window===f?f:(p=f.ownerDocument)?p.defaultView||p.parentWindow:window,v?(_=r.relatedTarget||r.toElement,v=c,_=_?Ro(_):null,_!==null&&(T=Vo(_),_!==T||_.tag!==5&&_.tag!==6)&&(_=null)):(v=null,_=c),v!==_)){if(E=gx,A="onMouseLeave",S="onMouseEnter",b="mouse",(t==="pointerout"||t==="pointerover")&&(E=vx,A="onPointerLeave",S="onPointerEnter",b="pointer"),T=v==null?p:ka(v),x=_==null?p:ka(_),p=new E(A,b+"leave",v,r,f),p.target=T,p.relatedTarget=x,A=null,Ro(f)===c&&(E=new E(S,b+"enter",_,r,f),E.target=x,E.relatedTarget=T,A=E),T=A,v&&_)t:{for(E=v,S=_,b=0,x=E;x;x=fa(x))b++;for(x=0,A=S;A;A=fa(A))x++;for(;0<b-x;)E=fa(E),b--;for(;0<x-b;)S=fa(S),x--;for(;b--;){if(E===S||S!==null&&E===S.alternate)break t;E=fa(E),S=fa(S)}E=null}else E=null;v!==null&&Ix(m,p,v,E,!1),_!==null&&T!==null&&Ix(m,T,_,E,!0)}}e:{if(p=c?ka(c):window,v=p.nodeName&&p.nodeName.toLowerCase(),v==="select"||v==="input"&&p.type==="file")var R=mI;else if(wx(p))if(xb)R=_I;else{R=yI;var L=gI}else(v=p.nodeName)&&v.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(R=vI);if(R&&(R=R(t,c))){_b(m,R,r,f);break e}L&&L(t,p,c),t==="focusout"&&(L=p._wrapperState)&&L.controlled&&p.type==="number"&&fy(p,"number",p.value)}switch(L=c?ka(c):window,t){case"focusin":(wx(L)||L.contentEditable==="true")&&(Ra=L,Ty=c,_u=null);break;case"focusout":_u=Ty=Ra=null;break;case"mousedown":Ay=!0;break;case"contextmenu":case"mouseup":case"dragend":Ay=!1,Ax(m,r,f);break;case"selectionchange":if(EI)break;case"keydown":case"keyup":Ax(m,r,f)}var k;if(v0)e:{switch(t){case"compositionstart":var D="onCompositionStart";break e;case"compositionend":D="onCompositionEnd";break e;case"compositionupdate":D="onCompositionUpdate";break e}D=void 0}else Ia?yb(t,r)&&(D="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(D="onCompositionStart");D&&(gb&&r.locale!=="ko"&&(Ia||D!=="onCompositionStart"?D==="onCompositionEnd"&&Ia&&(k=mb()):(Ms=f,m0="value"in Ms?Ms.value:Ms.textContent,Ia=!0)),L=$d(c,D),0<L.length&&(D=new yx(D,t,null,r,f),m.push({event:D,listeners:L}),k?D.data=k:(k=vb(r),k!==null&&(D.data=k)))),(k=hI?cI(t,r):dI(t,r))&&(c=$d(c,"onBeforeInput"),0<c.length&&(f=new yx("onBeforeInput","beforeinput",null,r,f),m.push({event:f,listeners:c}),f.data=k))}Rb(m,e)})}function Uu(t,e,r){return{instance:t,listener:e,currentTarget:r}}function $d(t,e){for(var r=e+"Capture",n=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=ku(t,r),s!=null&&n.unshift(Uu(t,s,i)),s=ku(t,e),s!=null&&n.push(Uu(t,s,i))),t=t.return}return n}function fa(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Ix(t,e,r,n,i){for(var s=e._reactName,o=[];r!==null&&r!==n;){var l=r,h=l.alternate,c=l.stateNode;if(h!==null&&h===n)break;l.tag===5&&c!==null&&(l=c,i?(h=ku(r,s),h!=null&&o.unshift(Uu(r,h,l))):i||(h=ku(r,s),h!=null&&o.push(Uu(r,h,l)))),r=r.return}o.length!==0&&t.push({event:e,listeners:o})}var AI=/\r\n?/g,CI=/\u0000|\uFFFD/g;function Rx(t){return(typeof t=="string"?t:""+t).replace(AI,`
38
+ `).replace(CI,"")}function Tc(t,e,r){if(e=Rx(e),Rx(t)!==e&&r)throw Error(ee(425))}function Wd(){}var Cy=null,Py=null;function Iy(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Ry=typeof setTimeout=="function"?setTimeout:void 0,PI=typeof clearTimeout=="function"?clearTimeout:void 0,Mx=typeof Promise=="function"?Promise:void 0,II=typeof queueMicrotask=="function"?queueMicrotask:typeof Mx<"u"?function(t){return Mx.resolve(null).then(t).catch(RI)}:Ry;function RI(t){setTimeout(function(){throw t})}function Vm(t,e){var r=e,n=0;do{var i=r.nextSibling;if(t.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){t.removeChild(i),Ou(e);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);Ou(e)}function Us(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function kx(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"){if(e===0)return t;e--}else r==="/$"&&e++}t=t.previousSibling}return null}var ml=Math.random().toString(36).slice(2),_i="__reactFiber$"+ml,zu="__reactProps$"+ml,es="__reactContainer$"+ml,My="__reactEvents$"+ml,MI="__reactListeners$"+ml,kI="__reactHandles$"+ml;function Ro(t){var e=t[_i];if(e)return e;for(var r=t.parentNode;r;){if(e=r[es]||r[_i]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=kx(t);t!==null;){if(r=t[_i])return r;t=kx(t)}return e}t=r,r=t.parentNode}return null}function sh(t){return t=t[_i]||t[es],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function ka(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(ee(33))}function Bf(t){return t[zu]||null}var ky=[],Na=-1;function qs(t){return{current:t}}function st(t){0>Na||(t.current=ky[Na],ky[Na]=null,Na--)}function et(t,e){Na++,ky[Na]=t.current,t.current=e}var Vs={},gr=qs(Vs),Lr=qs(!1),Lo=Vs;function il(t,e){var r=t.type.contextTypes;if(!r)return Vs;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=e[s];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Ur(t){return t=t.childContextTypes,t!=null}function Vd(){st(Lr),st(gr)}function Nx(t,e,r){if(gr.current!==Vs)throw Error(ee(168));et(gr,e),et(Lr,r)}function kb(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(ee(108,gP(t)||"Unknown",i));return yt({},r,n)}function Xd(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Vs,Lo=gr.current,et(gr,t),et(Lr,Lr.current),!0}function Dx(t,e,r){var n=t.stateNode;if(!n)throw Error(ee(169));r?(t=kb(t,e,Lo),n.__reactInternalMemoizedMergedChildContext=t,st(Lr),st(gr),et(gr,t)):st(Lr),et(Lr,r)}var Wi=null,Lf=!1,Xm=!1;function Nb(t){Wi===null?Wi=[t]:Wi.push(t)}function NI(t){Lf=!0,Nb(t)}function Zs(){if(!Xm&&Wi!==null){Xm=!0;var t=0,e=Ze;try{var r=Wi;for(Ze=1;t<r.length;t++){var n=r[t];do n=n(!0);while(n!==null)}Wi=null,Lf=!1}catch(i){throw Wi!==null&&(Wi=Wi.slice(t+1)),ib(c0,Zs),i}finally{Ze=e,Xm=!1}}return null}var Da=[],Oa=0,Yd=null,Qd=0,yn=[],vn=0,Uo=null,Vi=1,Xi="";function xo(t,e){Da[Oa++]=Qd,Da[Oa++]=Yd,Yd=t,Qd=e}function Db(t,e,r){yn[vn++]=Vi,yn[vn++]=Xi,yn[vn++]=Uo,Uo=t;var n=Vi;t=Xi;var i=32-Vn(n)-1;n&=~(1<<i),r+=1;var s=32-Vn(e)+i;if(30<s){var o=i-i%5;s=(n&(1<<o)-1).toString(32),n>>=o,i-=o,Vi=1<<32-Vn(e)+i|r<<i|n,Xi=s+t}else Vi=1<<s|r<<i|n,Xi=t}function x0(t){t.return!==null&&(xo(t,1),Db(t,1,0))}function w0(t){for(;t===Yd;)Yd=Da[--Oa],Da[Oa]=null,Qd=Da[--Oa],Da[Oa]=null;for(;t===Uo;)Uo=yn[--vn],yn[vn]=null,Xi=yn[--vn],yn[vn]=null,Vi=yn[--vn],yn[vn]=null}var Zr=null,qr=null,ht=!1,Gn=null;function Ob(t,e){var r=xn(5,null,null,0);r.elementType="DELETED",r.stateNode=e,r.return=t,e=t.deletions,e===null?(t.deletions=[r],t.flags|=16):e.push(r)}function Ox(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Zr=t,qr=Us(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Zr=t,qr=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(r=Uo!==null?{id:Vi,overflow:Xi}:null,t.memoizedState={dehydrated:e,treeContext:r,retryLane:1073741824},r=xn(18,null,null,0),r.stateNode=e,r.return=t,t.child=r,Zr=t,qr=null,!0):!1;default:return!1}}function Ny(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Dy(t){if(ht){var e=qr;if(e){var r=e;if(!Ox(t,e)){if(Ny(t))throw Error(ee(418));e=Us(r.nextSibling);var n=Zr;e&&Ox(t,e)?Ob(n,r):(t.flags=t.flags&-4097|2,ht=!1,Zr=t)}}else{if(Ny(t))throw Error(ee(418));t.flags=t.flags&-4097|2,ht=!1,Zr=t}}}function Fx(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Zr=t}function Ac(t){if(t!==Zr)return!1;if(!ht)return Fx(t),ht=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Iy(t.type,t.memoizedProps)),e&&(e=qr)){if(Ny(t))throw Fb(),Error(ee(418));for(;e;)Ob(t,e),e=Us(e.nextSibling)}if(Fx(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(ee(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){qr=Us(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}qr=null}}else qr=Zr?Us(t.stateNode.nextSibling):null;return!0}function Fb(){for(var t=qr;t;)t=Us(t.nextSibling)}function sl(){qr=Zr=null,ht=!1}function E0(t){Gn===null?Gn=[t]:Gn.push(t)}var DI=os.ReactCurrentBatchConfig;function Xl(t,e,r){if(t=r.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(ee(309));var n=r.stateNode}if(!n)throw Error(ee(147,t));var i=n,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var l=i.refs;o===null?delete l[s]:l[s]=o},e._stringRef=s,e)}if(typeof t!="string")throw Error(ee(284));if(!r._owner)throw Error(ee(290,t))}return t}function Cc(t,e){throw t=Object.prototype.toString.call(e),Error(ee(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Bx(t){var e=t._init;return e(t._payload)}function Bb(t){function e(S,b){if(t){var x=S.deletions;x===null?(S.deletions=[b],S.flags|=16):x.push(b)}}function r(S,b){if(!t)return null;for(;b!==null;)e(S,b),b=b.sibling;return null}function n(S,b){for(S=new Map;b!==null;)b.key!==null?S.set(b.key,b):S.set(b.index,b),b=b.sibling;return S}function i(S,b){return S=js(S,b),S.index=0,S.sibling=null,S}function s(S,b,x){return S.index=x,t?(x=S.alternate,x!==null?(x=x.index,x<b?(S.flags|=2,b):x):(S.flags|=2,b)):(S.flags|=1048576,b)}function o(S){return t&&S.alternate===null&&(S.flags|=2),S}function l(S,b,x,A){return b===null||b.tag!==6?(b=eg(x,S.mode,A),b.return=S,b):(b=i(b,x),b.return=S,b)}function h(S,b,x,A){var R=x.type;return R===Pa?f(S,b,x.props.children,A,x.key):b!==null&&(b.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===As&&Bx(R)===b.type)?(A=i(b,x.props),A.ref=Xl(S,b,x),A.return=S,A):(A=Sd(x.type,x.key,x.props,null,S.mode,A),A.ref=Xl(S,b,x),A.return=S,A)}function c(S,b,x,A){return b===null||b.tag!==4||b.stateNode.containerInfo!==x.containerInfo||b.stateNode.implementation!==x.implementation?(b=tg(x,S.mode,A),b.return=S,b):(b=i(b,x.children||[]),b.return=S,b)}function f(S,b,x,A,R){return b===null||b.tag!==7?(b=Do(x,S.mode,A,R),b.return=S,b):(b=i(b,x),b.return=S,b)}function m(S,b,x){if(typeof b=="string"&&b!==""||typeof b=="number")return b=eg(""+b,S.mode,x),b.return=S,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case gc:return x=Sd(b.type,b.key,b.props,null,S.mode,x),x.ref=Xl(S,null,b),x.return=S,x;case Ca:return b=tg(b,S.mode,x),b.return=S,b;case As:var A=b._init;return m(S,A(b._payload),x)}if(nu(b)||Hl(b))return b=Do(b,S.mode,x,null),b.return=S,b;Cc(S,b)}return null}function p(S,b,x,A){var R=b!==null?b.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return R!==null?null:l(S,b,""+x,A);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case gc:return x.key===R?h(S,b,x,A):null;case Ca:return x.key===R?c(S,b,x,A):null;case As:return R=x._init,p(S,b,R(x._payload),A)}if(nu(x)||Hl(x))return R!==null?null:f(S,b,x,A,null);Cc(S,x)}return null}function v(S,b,x,A,R){if(typeof A=="string"&&A!==""||typeof A=="number")return S=S.get(x)||null,l(b,S,""+A,R);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case gc:return S=S.get(A.key===null?x:A.key)||null,h(b,S,A,R);case Ca:return S=S.get(A.key===null?x:A.key)||null,c(b,S,A,R);case As:var L=A._init;return v(S,b,x,L(A._payload),R)}if(nu(A)||Hl(A))return S=S.get(x)||null,f(b,S,A,R,null);Cc(b,A)}return null}function _(S,b,x,A){for(var R=null,L=null,k=b,D=b=0,Q=null;k!==null&&D<x.length;D++){k.index>D?(Q=k,k=null):Q=k.sibling;var $=p(S,k,x[D],A);if($===null){k===null&&(k=Q);break}t&&k&&$.alternate===null&&e(S,k),b=s($,b,D),L===null?R=$:L.sibling=$,L=$,k=Q}if(D===x.length)return r(S,k),ht&&xo(S,D),R;if(k===null){for(;D<x.length;D++)k=m(S,x[D],A),k!==null&&(b=s(k,b,D),L===null?R=k:L.sibling=k,L=k);return ht&&xo(S,D),R}for(k=n(S,k);D<x.length;D++)Q=v(k,S,D,x[D],A),Q!==null&&(t&&Q.alternate!==null&&k.delete(Q.key===null?D:Q.key),b=s(Q,b,D),L===null?R=Q:L.sibling=Q,L=Q);return t&&k.forEach(function(me){return e(S,me)}),ht&&xo(S,D),R}function E(S,b,x,A){var R=Hl(x);if(typeof R!="function")throw Error(ee(150));if(x=R.call(x),x==null)throw Error(ee(151));for(var L=R=null,k=b,D=b=0,Q=null,$=x.next();k!==null&&!$.done;D++,$=x.next()){k.index>D?(Q=k,k=null):Q=k.sibling;var me=p(S,k,$.value,A);if(me===null){k===null&&(k=Q);break}t&&k&&me.alternate===null&&e(S,k),b=s(me,b,D),L===null?R=me:L.sibling=me,L=me,k=Q}if($.done)return r(S,k),ht&&xo(S,D),R;if(k===null){for(;!$.done;D++,$=x.next())$=m(S,$.value,A),$!==null&&(b=s($,b,D),L===null?R=$:L.sibling=$,L=$);return ht&&xo(S,D),R}for(k=n(S,k);!$.done;D++,$=x.next())$=v(k,S,D,$.value,A),$!==null&&(t&&$.alternate!==null&&k.delete($.key===null?D:$.key),b=s($,b,D),L===null?R=$:L.sibling=$,L=$);return t&&k.forEach(function(te){return e(S,te)}),ht&&xo(S,D),R}function T(S,b,x,A){if(typeof x=="object"&&x!==null&&x.type===Pa&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case gc:e:{for(var R=x.key,L=b;L!==null;){if(L.key===R){if(R=x.type,R===Pa){if(L.tag===7){r(S,L.sibling),b=i(L,x.props.children),b.return=S,S=b;break e}}else if(L.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===As&&Bx(R)===L.type){r(S,L.sibling),b=i(L,x.props),b.ref=Xl(S,L,x),b.return=S,S=b;break e}r(S,L);break}else e(S,L);L=L.sibling}x.type===Pa?(b=Do(x.props.children,S.mode,A,x.key),b.return=S,S=b):(A=Sd(x.type,x.key,x.props,null,S.mode,A),A.ref=Xl(S,b,x),A.return=S,S=A)}return o(S);case Ca:e:{for(L=x.key;b!==null;){if(b.key===L)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){r(S,b.sibling),b=i(b,x.children||[]),b.return=S,S=b;break e}else{r(S,b);break}else e(S,b);b=b.sibling}b=tg(x,S.mode,A),b.return=S,S=b}return o(S);case As:return L=x._init,T(S,b,L(x._payload),A)}if(nu(x))return _(S,b,x,A);if(Hl(x))return E(S,b,x,A);Cc(S,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(r(S,b.sibling),b=i(b,x),b.return=S,S=b):(r(S,b),b=eg(x,S.mode,A),b.return=S,S=b),o(S)):r(S,b)}return T}var ol=Bb(!0),Lb=Bb(!1),Kd=qs(null),qd=null,Fa=null,S0=null;function b0(){S0=Fa=qd=null}function T0(t){var e=Kd.current;st(Kd),t._currentValue=e}function Oy(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function Xa(t,e){qd=t,S0=Fa=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Fr=!0),t.firstContext=null)}function Tn(t){var e=t._currentValue;if(S0!==t)if(t={context:t,memoizedValue:e,next:null},Fa===null){if(qd===null)throw Error(ee(308));Fa=t,qd.dependencies={lanes:0,firstContext:t}}else Fa=Fa.next=t;return e}var Mo=null;function A0(t){Mo===null?Mo=[t]:Mo.push(t)}function Ub(t,e,r,n){var i=e.interleaved;return i===null?(r.next=r,A0(e)):(r.next=i.next,i.next=r),e.interleaved=r,ts(t,n)}function ts(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var Cs=!1;function C0(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zb(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Ki(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function zs(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,$e&2){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,ts(t,r)}return i=n.interleaved,i===null?(e.next=e,A0(n)):(e.next=i.next,i.next=e),n.interleaved=e,ts(t,r)}function yd(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,d0(t,r)}}function Lx(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?i=s=o:s=s.next=o,r=r.next}while(r!==null);s===null?i=s=e:s=s.next=e}else i=s=e;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function Zd(t,e,r,n){var i=t.updateQueue;Cs=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var h=l,c=h.next;h.next=null,o===null?s=c:o.next=c,o=h;var f=t.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==o&&(l===null?f.firstBaseUpdate=c:l.next=c,f.lastBaseUpdate=h))}if(s!==null){var m=i.baseState;o=0,f=c=h=null,l=s;do{var p=l.lane,v=l.eventTime;if((n&p)===p){f!==null&&(f=f.next={eventTime:v,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var _=t,E=l;switch(p=e,v=r,E.tag){case 1:if(_=E.payload,typeof _=="function"){m=_.call(v,m,p);break e}m=_;break e;case 3:_.flags=_.flags&-65537|128;case 0:if(_=E.payload,p=typeof _=="function"?_.call(v,m,p):_,p==null)break e;m=yt({},m,p);break e;case 2:Cs=!0}}l.callback!==null&&l.lane!==0&&(t.flags|=64,p=i.effects,p===null?i.effects=[l]:p.push(l))}else v={eventTime:v,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(c=f=v,h=m):f=f.next=v,o|=p;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;p=l,l=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(f===null&&(h=m),i.baseState=h,i.firstBaseUpdate=c,i.lastBaseUpdate=f,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);Go|=o,t.lanes=o,t.memoizedState=m}}function Ux(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var n=t[e],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(ee(191,i));i.call(n)}}}var oh={},Ti=qs(oh),Gu=qs(oh),Hu=qs(oh);function ko(t){if(t===oh)throw Error(ee(174));return t}function P0(t,e){switch(et(Hu,e),et(Gu,t),et(Ti,oh),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:my(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=my(e,t)}st(Ti),et(Ti,e)}function al(){st(Ti),st(Gu),st(Hu)}function Gb(t){ko(Hu.current);var e=ko(Ti.current),r=my(e,t.type);e!==r&&(et(Gu,t),et(Ti,r))}function I0(t){Gu.current===t&&(st(Ti),st(Gu))}var pt=qs(0);function Jd(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Ym=[];function R0(){for(var t=0;t<Ym.length;t++)Ym[t]._workInProgressVersionPrimary=null;Ym.length=0}var vd=os.ReactCurrentDispatcher,Qm=os.ReactCurrentBatchConfig,zo=0,gt=null,Lt=null,Vt=null,ef=!1,xu=!1,ju=0,OI=0;function fr(){throw Error(ee(321))}function M0(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!Kn(t[r],e[r]))return!1;return!0}function k0(t,e,r,n,i,s){if(zo=s,gt=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,vd.current=t===null||t.memoizedState===null?UI:zI,t=r(n,i),xu){s=0;do{if(xu=!1,ju=0,25<=s)throw Error(ee(301));s+=1,Vt=Lt=null,e.updateQueue=null,vd.current=GI,t=r(n,i)}while(xu)}if(vd.current=tf,e=Lt!==null&&Lt.next!==null,zo=0,Vt=Lt=gt=null,ef=!1,e)throw Error(ee(300));return t}function N0(){var t=ju!==0;return ju=0,t}function mi(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vt===null?gt.memoizedState=Vt=t:Vt=Vt.next=t,Vt}function An(){if(Lt===null){var t=gt.alternate;t=t!==null?t.memoizedState:null}else t=Lt.next;var e=Vt===null?gt.memoizedState:Vt.next;if(e!==null)Vt=e,Lt=t;else{if(t===null)throw Error(ee(310));Lt=t,t={memoizedState:Lt.memoizedState,baseState:Lt.baseState,baseQueue:Lt.baseQueue,queue:Lt.queue,next:null},Vt===null?gt.memoizedState=Vt=t:Vt=Vt.next=t}return Vt}function $u(t,e){return typeof e=="function"?e(t):e}function Km(t){var e=An(),r=e.queue;if(r===null)throw Error(ee(311));r.lastRenderedReducer=t;var n=Lt,i=n.baseQueue,s=r.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}n.baseQueue=i=s,r.pending=null}if(i!==null){s=i.next,n=n.baseState;var l=o=null,h=null,c=s;do{var f=c.lane;if((zo&f)===f)h!==null&&(h=h.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:t(n,c.action);else{var m={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};h===null?(l=h=m,o=n):h=h.next=m,gt.lanes|=f,Go|=f}c=c.next}while(c!==null&&c!==s);h===null?o=n:h.next=l,Kn(n,e.memoizedState)||(Fr=!0),e.memoizedState=n,e.baseState=o,e.baseQueue=h,r.lastRenderedState=n}if(t=r.interleaved,t!==null){i=t;do s=i.lane,gt.lanes|=s,Go|=s,i=i.next;while(i!==t)}else i===null&&(r.lanes=0);return[e.memoizedState,r.dispatch]}function qm(t){var e=An(),r=e.queue;if(r===null)throw Error(ee(311));r.lastRenderedReducer=t;var n=r.dispatch,i=r.pending,s=e.memoizedState;if(i!==null){r.pending=null;var o=i=i.next;do s=t(s,o.action),o=o.next;while(o!==i);Kn(s,e.memoizedState)||(Fr=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),r.lastRenderedState=s}return[s,n]}function Hb(){}function jb(t,e){var r=gt,n=An(),i=e(),s=!Kn(n.memoizedState,i);if(s&&(n.memoizedState=i,Fr=!0),n=n.queue,D0(Vb.bind(null,r,n,t),[t]),n.getSnapshot!==e||s||Vt!==null&&Vt.memoizedState.tag&1){if(r.flags|=2048,Wu(9,Wb.bind(null,r,n,i,e),void 0,null),Qt===null)throw Error(ee(349));zo&30||$b(r,e,i)}return i}function $b(t,e,r){t.flags|=16384,t={getSnapshot:e,value:r},e=gt.updateQueue,e===null?(e={lastEffect:null,stores:null},gt.updateQueue=e,e.stores=[t]):(r=e.stores,r===null?e.stores=[t]:r.push(t))}function Wb(t,e,r,n){e.value=r,e.getSnapshot=n,Xb(e)&&Yb(t)}function Vb(t,e,r){return r(function(){Xb(e)&&Yb(t)})}function Xb(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!Kn(t,r)}catch{return!0}}function Yb(t){var e=ts(t,1);e!==null&&Xn(e,t,1,-1)}function zx(t){var e=mi();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:$u,lastRenderedState:t},e.queue=t,t=t.dispatch=LI.bind(null,gt,t),[e.memoizedState,t]}function Wu(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=gt.updateQueue,e===null?(e={lastEffect:null,stores:null},gt.updateQueue=e,e.lastEffect=t.next=t):(r=e.lastEffect,r===null?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t)),t}function Qb(){return An().memoizedState}function _d(t,e,r,n){var i=mi();gt.flags|=t,i.memoizedState=Wu(1|e,r,void 0,n===void 0?null:n)}function Uf(t,e,r,n){var i=An();n=n===void 0?null:n;var s=void 0;if(Lt!==null){var o=Lt.memoizedState;if(s=o.destroy,n!==null&&M0(n,o.deps)){i.memoizedState=Wu(e,r,s,n);return}}gt.flags|=t,i.memoizedState=Wu(1|e,r,s,n)}function Gx(t,e){return _d(8390656,8,t,e)}function D0(t,e){return Uf(2048,8,t,e)}function Kb(t,e){return Uf(4,2,t,e)}function qb(t,e){return Uf(4,4,t,e)}function Zb(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Jb(t,e,r){return r=r!=null?r.concat([t]):null,Uf(4,4,Zb.bind(null,e,t),r)}function O0(){}function eT(t,e){var r=An();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&M0(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function tT(t,e){var r=An();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&M0(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function rT(t,e,r){return zo&21?(Kn(r,e)||(r=ab(),gt.lanes|=r,Go|=r,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,Fr=!0),t.memoizedState=r)}function FI(t,e){var r=Ze;Ze=r!==0&&4>r?r:4,t(!0);var n=Qm.transition;Qm.transition={};try{t(!1),e()}finally{Ze=r,Qm.transition=n}}function nT(){return An().memoizedState}function BI(t,e,r){var n=Hs(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},iT(t))sT(e,r);else if(r=Ub(t,e,r,n),r!==null){var i=br();Xn(r,t,n,i),oT(r,e,n)}}function LI(t,e,r){var n=Hs(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(iT(t))sT(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,l=s(o,r);if(i.hasEagerState=!0,i.eagerState=l,Kn(l,o)){var h=e.interleaved;h===null?(i.next=i,A0(e)):(i.next=h.next,h.next=i),e.interleaved=i;return}}catch{}finally{}r=Ub(t,e,i,n),r!==null&&(i=br(),Xn(r,t,n,i),oT(r,e,n))}}function iT(t){var e=t.alternate;return t===gt||e!==null&&e===gt}function sT(t,e){xu=ef=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function oT(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,d0(t,r)}}var tf={readContext:Tn,useCallback:fr,useContext:fr,useEffect:fr,useImperativeHandle:fr,useInsertionEffect:fr,useLayoutEffect:fr,useMemo:fr,useReducer:fr,useRef:fr,useState:fr,useDebugValue:fr,useDeferredValue:fr,useTransition:fr,useMutableSource:fr,useSyncExternalStore:fr,useId:fr,unstable_isNewReconciler:!1},UI={readContext:Tn,useCallback:function(t,e){return mi().memoizedState=[t,e===void 0?null:e],t},useContext:Tn,useEffect:Gx,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,_d(4194308,4,Zb.bind(null,e,t),r)},useLayoutEffect:function(t,e){return _d(4194308,4,t,e)},useInsertionEffect:function(t,e){return _d(4,2,t,e)},useMemo:function(t,e){var r=mi();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=mi();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=BI.bind(null,gt,t),[n.memoizedState,t]},useRef:function(t){var e=mi();return t={current:t},e.memoizedState=t},useState:zx,useDebugValue:O0,useDeferredValue:function(t){return mi().memoizedState=t},useTransition:function(){var t=zx(!1),e=t[0];return t=FI.bind(null,t[1]),mi().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=gt,i=mi();if(ht){if(r===void 0)throw Error(ee(407));r=r()}else{if(r=e(),Qt===null)throw Error(ee(349));zo&30||$b(n,e,r)}i.memoizedState=r;var s={value:r,getSnapshot:e};return i.queue=s,Gx(Vb.bind(null,n,s,t),[t]),n.flags|=2048,Wu(9,Wb.bind(null,n,s,r,e),void 0,null),r},useId:function(){var t=mi(),e=Qt.identifierPrefix;if(ht){var r=Xi,n=Vi;r=(n&~(1<<32-Vn(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=ju++,0<r&&(e+="H"+r.toString(32)),e+=":"}else r=OI++,e=":"+e+"r"+r.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},zI={readContext:Tn,useCallback:eT,useContext:Tn,useEffect:D0,useImperativeHandle:Jb,useInsertionEffect:Kb,useLayoutEffect:qb,useMemo:tT,useReducer:Km,useRef:Qb,useState:function(){return Km($u)},useDebugValue:O0,useDeferredValue:function(t){var e=An();return rT(e,Lt.memoizedState,t)},useTransition:function(){var t=Km($u)[0],e=An().memoizedState;return[t,e]},useMutableSource:Hb,useSyncExternalStore:jb,useId:nT,unstable_isNewReconciler:!1},GI={readContext:Tn,useCallback:eT,useContext:Tn,useEffect:D0,useImperativeHandle:Jb,useInsertionEffect:Kb,useLayoutEffect:qb,useMemo:tT,useReducer:qm,useRef:Qb,useState:function(){return qm($u)},useDebugValue:O0,useDeferredValue:function(t){var e=An();return Lt===null?e.memoizedState=t:rT(e,Lt.memoizedState,t)},useTransition:function(){var t=qm($u)[0],e=An().memoizedState;return[t,e]},useMutableSource:Hb,useSyncExternalStore:jb,useId:nT,unstable_isNewReconciler:!1};function Un(t,e){if(t&&t.defaultProps){e=yt({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}function Fy(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:yt({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var zf={isMounted:function(t){return(t=t._reactInternals)?Vo(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=br(),i=Hs(t),s=Ki(n,i);s.payload=e,r!=null&&(s.callback=r),e=zs(t,s,i),e!==null&&(Xn(e,t,i,n),yd(e,t,i))},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=br(),i=Hs(t),s=Ki(n,i);s.tag=1,s.payload=e,r!=null&&(s.callback=r),e=zs(t,s,i),e!==null&&(Xn(e,t,i,n),yd(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=br(),n=Hs(t),i=Ki(r,n);i.tag=2,e!=null&&(i.callback=e),e=zs(t,i,n),e!==null&&(Xn(e,t,n,r),yd(e,t,n))}};function Hx(t,e,r,n,i,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,s,o):e.prototype&&e.prototype.isPureReactComponent?!Bu(r,n)||!Bu(i,s):!0}function aT(t,e,r){var n=!1,i=Vs,s=e.contextType;return typeof s=="object"&&s!==null?s=Tn(s):(i=Ur(e)?Lo:gr.current,n=e.contextTypes,s=(n=n!=null)?il(t,i):Vs),e=new e(r,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=zf,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function jx(t,e,r,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(r,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&zf.enqueueReplaceState(e,e.state,null)}function By(t,e,r,n){var i=t.stateNode;i.props=r,i.state=t.memoizedState,i.refs={},C0(t);var s=e.contextType;typeof s=="object"&&s!==null?i.context=Tn(s):(s=Ur(e)?Lo:gr.current,i.context=il(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(Fy(t,e,s,r),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&zf.enqueueReplaceState(i,i.state,null),Zd(t,r,i,n),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function ll(t,e){try{var r="",n=e;do r+=mP(n),n=n.return;while(n);var i=r}catch(s){i=`
39
39
  Error generating stack: `+s.message+`
40
- `+s.stack}return{value:t,source:e,stack:i,digest:null}}function Zm(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function Ly(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var HI=typeof WeakMap=="function"?WeakMap:Map;function lT(t,e,r){r=Ki(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){nf||(nf=!0,Yy=n),Ly(t,e)},r}function uT(t,e,r){r=Ki(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return n(i)},r.callback=function(){Ly(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){Ly(t,e),typeof n!="function"&&(Gs===null?Gs=new Set([this]):Gs.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function $x(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new HI;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(r)||(i.add(r),t=rR.bind(null,t,e,r),e.then(t,t))}function Wx(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Vx(t,e,r,n,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=Ki(-1,1),e.tag=2,zs(r,e,1))),r.lanes|=1),t)}var jI=os.ReactCurrentOwner,Fr=!1;function Er(t,e,r,n){e.child=t===null?Lb(e,null,r,n):ol(e,t.child,r,n)}function Xx(t,e,r,n,i){r=r.render;var s=e.ref;return Xa(e,i),n=k0(t,e,r,n,s,i),r=N0(),t!==null&&!Fr?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,rs(t,e,i)):(ht&&r&&x0(e),e.flags|=1,Er(t,e,n,i),e.child)}function Yx(t,e,r,n,i){if(t===null){var s=r.type;return typeof s=="function"&&!j0(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=s,hT(t,e,s,n,i)):(t=Sd(r.type,null,n,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var o=s.memoizedProps;if(r=r.compare,r=r!==null?r:Bu,r(o,n)&&t.ref===e.ref)return rs(t,e,i)}return e.flags|=1,t=js(s,n),t.ref=e.ref,t.return=e,e.child=t}function hT(t,e,r,n,i){if(t!==null){var s=t.memoizedProps;if(Bu(s,n)&&t.ref===e.ref)if(Fr=!1,e.pendingProps=n=s,(t.lanes&i)!==0)t.flags&131072&&(Fr=!0);else return e.lanes=t.lanes,rs(t,e,i)}return Uy(t,e,r,n,i)}function cT(t,e,r){var n=e.pendingProps,i=n.children,s=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},et(La,Kr),Kr|=r;else{if(!(r&1073741824))return t=s!==null?s.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,et(La,Kr),Kr|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:r,et(La,Kr),Kr|=n}else s!==null?(n=s.baseLanes|r,e.memoizedState=null):n=r,et(La,Kr),Kr|=n;return Er(t,e,i,r),e.child}function dT(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function Uy(t,e,r,n,i){var s=Ur(r)?Lo:gr.current;return s=il(e,s),Xa(e,i),r=k0(t,e,r,n,s,i),n=N0(),t!==null&&!Fr?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,rs(t,e,i)):(ht&&n&&x0(e),e.flags|=1,Er(t,e,r,i),e.child)}function Qx(t,e,r,n,i){if(Ur(r)){var s=!0;Xd(e)}else s=!1;if(Xa(e,i),e.stateNode===null)xd(t,e),aT(e,r,n),By(e,r,n,i),n=!0;else if(t===null){var o=e.stateNode,l=e.memoizedProps;o.props=l;var h=o.context,c=r.contextType;typeof c=="object"&&c!==null?c=Tn(c):(c=Ur(r)?Lo:gr.current,c=il(e,c));var f=r.getDerivedStateFromProps,m=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";m||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==n||h!==c)&&jx(e,o,n,c),Cs=!1;var p=e.memoizedState;o.state=p,Zd(e,n,o,i),h=e.memoizedState,l!==n||p!==h||Lr.current||Cs?(typeof f=="function"&&(Fy(e,r,f,n),h=e.memoizedState),(l=Cs||Hx(e,r,l,n,p,h,c))?(m||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=h),o.props=n,o.state=h,o.context=c,n=l):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,zb(t,e),l=e.memoizedProps,c=e.type===e.elementType?l:Un(e.type,l),o.props=c,m=e.pendingProps,p=o.context,h=r.contextType,typeof h=="object"&&h!==null?h=Tn(h):(h=Ur(r)?Lo:gr.current,h=il(e,h));var v=r.getDerivedStateFromProps;(f=typeof v=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==m||p!==h)&&jx(e,o,n,h),Cs=!1,p=e.memoizedState,o.state=p,Zd(e,n,o,i);var _=e.memoizedState;l!==m||p!==_||Lr.current||Cs?(typeof v=="function"&&(Fy(e,r,v,n),_=e.memoizedState),(c=Cs||Hx(e,r,c,n,p,_,h)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,_,h),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,_,h)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=_),o.props=n,o.state=_,o.context=h,n=c):(typeof o.componentDidUpdate!="function"||l===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),n=!1)}return zy(t,e,r,n,s,i)}function zy(t,e,r,n,i,s){dT(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return i&&Dx(e,r,!1),rs(t,e,s);n=e.stateNode,jI.current=e;var l=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=ol(e,t.child,null,s),e.child=ol(e,null,l,s)):Er(t,e,l,s),e.memoizedState=n.state,i&&Dx(e,r,!0),e.child}function fT(t){var e=t.stateNode;e.pendingContext?Nx(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Nx(t,e.context,!1),P0(t,e.containerInfo)}function Kx(t,e,r,n,i){return sl(),E0(i),e.flags|=256,Er(t,e,r,n),e.child}var Gy={dehydrated:null,treeContext:null,retryLane:0};function Hy(t){return{baseLanes:t,cachePool:null,transitions:null}}function pT(t,e,r){var n=e.pendingProps,i=pt.current,s=!1,o=(e.flags&128)!==0,l;if((l=o)||(l=t!==null&&t.memoizedState===null?!1:(i&2)!==0),l?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),et(pt,i&1),t===null)return Dy(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=n.children,t=n.fallback,s?(n=e.mode,s=e.child,o={mode:"hidden",children:o},!(n&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=jf(o,n,0,null),t=Do(t,n,r,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=Hy(r),e.memoizedState=Gy,t):F0(e,o));if(i=t.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return $I(t,e,o,n,l,i,r);if(s){s=n.fallback,o=e.mode,i=t.child,l=i.sibling;var h={mode:"hidden",children:n.children};return!(o&1)&&e.child!==i?(n=e.child,n.childLanes=0,n.pendingProps=h,e.deletions=null):(n=js(i,h),n.subtreeFlags=i.subtreeFlags&14680064),l!==null?s=js(l,s):(s=Do(s,o,r,null),s.flags|=2),s.return=e,n.return=e,n.sibling=s,e.child=n,n=s,s=e.child,o=t.child.memoizedState,o=o===null?Hy(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~r,e.memoizedState=Gy,n}return s=t.child,t=s.sibling,n=js(s,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function F0(t,e){return e=jf({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Pc(t,e,r,n){return n!==null&&E0(n),ol(e,t.child,null,r),t=F0(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function $I(t,e,r,n,i,s,o){if(r)return e.flags&256?(e.flags&=-257,n=Zm(Error(ee(422))),Pc(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=n.fallback,i=e.mode,n=jf({mode:"visible",children:n.children},i,0,null),s=Do(s,i,o,null),s.flags|=2,n.return=e,s.return=e,n.sibling=s,e.child=n,e.mode&1&&ol(e,t.child,null,o),e.child.memoizedState=Hy(o),e.memoizedState=Gy,s);if(!(e.mode&1))return Pc(t,e,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var l=n.dgst;return n=l,s=Error(ee(419)),n=Zm(s,n,void 0),Pc(t,e,o,n)}if(l=(o&t.childLanes)!==0,Fr||l){if(n=Qt,n!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,ts(t,i),Xn(n,t,i,-1))}return H0(),n=Zm(Error(ee(421))),Pc(t,e,o,n)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=nR.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,qr=Us(i.nextSibling),Zr=e,ht=!0,Gn=null,t!==null&&(yn[vn++]=Vi,yn[vn++]=Xi,yn[vn++]=Uo,Vi=t.id,Xi=t.overflow,Uo=e),e=F0(e,n.children),e.flags|=4096,e)}function qx(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Oy(t.return,e,r)}function Jm(t,e,r,n,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=r,s.tailMode=i)}function mT(t,e,r){var n=e.pendingProps,i=n.revealOrder,s=n.tail;if(Er(t,e,n.children,r),n=pt.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&qx(t,r,e);else if(t.tag===19)qx(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(et(pt,n),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&Jd(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),Jm(e,!1,i,r,s);break;case"backwards":for(r=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&Jd(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}Jm(e,!0,r,null,s);break;case"together":Jm(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function xd(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function rs(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),Go|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(ee(153));if(e.child!==null){for(t=e.child,r=js(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=js(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function WI(t,e,r){switch(e.tag){case 3:fT(e),sl();break;case 5:Gb(e);break;case 1:Ur(e.type)&&Xd(e);break;case 4:P0(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;et(Kd,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(et(pt,pt.current&1),e.flags|=128,null):r&e.child.childLanes?pT(t,e,r):(et(pt,pt.current&1),t=rs(t,e,r),t!==null?t.sibling:null);et(pt,pt.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return mT(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),et(pt,pt.current),n)break;return null;case 22:case 23:return e.lanes=0,cT(t,e,r)}return rs(t,e,r)}var gT,jy,yT,vT;gT=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};jy=function(){};yT=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,ko(Ti.current);var s=null;switch(r){case"input":i=cy(t,i),n=cy(t,n),s=[];break;case"select":i=yt({},i,{value:void 0}),n=yt({},n,{value:void 0}),s=[];break;case"textarea":i=py(t,i),n=py(t,n),s=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=Wd)}gy(r,n);var o;r=null;for(c in i)if(!n.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var l=i[c];for(o in l)l.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ru.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in n){var h=n[c];if(l=i!=null?i[c]:void 0,n.hasOwnProperty(c)&&h!==l&&(h!=null||l!=null))if(c==="style")if(l){for(o in l)!l.hasOwnProperty(o)||h&&h.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in h)h.hasOwnProperty(o)&&l[o]!==h[o]&&(r||(r={}),r[o]=h[o])}else r||(s||(s=[]),s.push(c,r)),r=h;else c==="dangerouslySetInnerHTML"?(h=h?h.__html:void 0,l=l?l.__html:void 0,h!=null&&l!==h&&(s=s||[]).push(c,h)):c==="children"?typeof h!="string"&&typeof h!="number"||(s=s||[]).push(c,""+h):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ru.hasOwnProperty(c)?(h!=null&&c==="onScroll"&&nt("scroll",t),s||l===h||(s=[])):(s=s||[]).push(c,h))}r&&(s=s||[]).push("style",r);var c=s;(e.updateQueue=c)&&(e.flags|=4)}};vT=function(t,e,r,n){r!==n&&(e.flags|=4)};function Yl(t,e){if(!ht)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function pr(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function VI(t,e,r){var n=e.pendingProps;switch(w0(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pr(e),null;case 1:return Ur(e.type)&&Vd(),pr(e),null;case 3:return n=e.stateNode,al(),st(Lr),st(gr),R0(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Ac(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Gn!==null&&(qy(Gn),Gn=null))),jy(t,e),pr(e),null;case 5:I0(e);var i=ko(Hu.current);if(r=e.type,t!==null&&e.stateNode!=null)yT(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(ee(166));return pr(e),null}if(t=ko(Ti.current),Ac(e)){n=e.stateNode,r=e.type;var s=e.memoizedProps;switch(n[_i]=e,n[zu]=s,t=(e.mode&1)!==0,r){case"dialog":nt("cancel",n),nt("close",n);break;case"iframe":case"object":case"embed":nt("load",n);break;case"video":case"audio":for(i=0;i<su.length;i++)nt(su[i],n);break;case"source":nt("error",n);break;case"img":case"image":case"link":nt("error",n),nt("load",n);break;case"details":nt("toggle",n);break;case"input":ox(n,s),nt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!s.multiple},nt("invalid",n);break;case"textarea":lx(n,s),nt("invalid",n)}gy(r,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="children"?typeof l=="string"?n.textContent!==l&&(s.suppressHydrationWarning!==!0&&Tc(n.textContent,l,t),i=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&Tc(n.textContent,l,t),i=["children",""+l]):Ru.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&nt("scroll",n)}switch(r){case"input":yc(n),ax(n,s,!0);break;case"textarea":yc(n),ux(n);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(n.onclick=Wd)}n=i,e.updateQueue=n,n!==null&&(e.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=VS(r)),t==="http://www.w3.org/1999/xhtml"?r==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[_i]=e,t[zu]=n,gT(t,e,!1,!1),e.stateNode=t;e:{switch(o=yy(r,n),r){case"dialog":nt("cancel",t),nt("close",t),i=n;break;case"iframe":case"object":case"embed":nt("load",t),i=n;break;case"video":case"audio":for(i=0;i<su.length;i++)nt(su[i],t);i=n;break;case"source":nt("error",t),i=n;break;case"img":case"image":case"link":nt("error",t),nt("load",t),i=n;break;case"details":nt("toggle",t),i=n;break;case"input":ox(t,n),i=cy(t,n),nt("invalid",t);break;case"option":i=n;break;case"select":t._wrapperState={wasMultiple:!!n.multiple},i=yt({},n,{value:void 0}),nt("invalid",t);break;case"textarea":lx(t,n),i=py(t,n),nt("invalid",t);break;default:i=n}gy(r,i),l=i;for(s in l)if(l.hasOwnProperty(s)){var h=l[s];s==="style"?QS(t,h):s==="dangerouslySetInnerHTML"?(h=h?h.__html:void 0,h!=null&&XS(t,h)):s==="children"?typeof h=="string"?(r!=="textarea"||h!=="")&&Mu(t,h):typeof h=="number"&&Mu(t,""+h):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Ru.hasOwnProperty(s)?h!=null&&s==="onScroll"&&nt("scroll",t):h!=null&&o0(t,s,h,o))}switch(r){case"input":yc(t),ax(t,n,!1);break;case"textarea":yc(t),ux(t);break;case"option":n.value!=null&&t.setAttribute("value",""+Ws(n.value));break;case"select":t.multiple=!!n.multiple,s=n.value,s!=null?ja(t,!!n.multiple,s,!1):n.defaultValue!=null&&ja(t,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=Wd)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return pr(e),null;case 6:if(t&&e.stateNode!=null)vT(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(ee(166));if(r=ko(Hu.current),ko(Ti.current),Ac(e)){if(n=e.stateNode,r=e.memoizedProps,n[_i]=e,(s=n.nodeValue!==r)&&(t=Zr,t!==null))switch(t.tag){case 3:Tc(n.nodeValue,r,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Tc(n.nodeValue,r,(t.mode&1)!==0)}s&&(e.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[_i]=e,e.stateNode=n}return pr(e),null;case 13:if(st(pt),n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(ht&&qr!==null&&e.mode&1&&!(e.flags&128))Fb(),sl(),e.flags|=98560,s=!1;else if(s=Ac(e),n!==null&&n.dehydrated!==null){if(t===null){if(!s)throw Error(ee(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(ee(317));s[_i]=e}else sl(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;pr(e),s=!1}else Gn!==null&&(qy(Gn),Gn=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=r,e):(n=n!==null,n!==(t!==null&&t.memoizedState!==null)&&n&&(e.child.flags|=8192,e.mode&1&&(t===null||pt.current&1?Ut===0&&(Ut=3):H0())),e.updateQueue!==null&&(e.flags|=4),pr(e),null);case 4:return al(),jy(t,e),t===null&&Lu(e.stateNode.containerInfo),pr(e),null;case 10:return T0(e.type._context),pr(e),null;case 17:return Ur(e.type)&&Vd(),pr(e),null;case 19:if(st(pt),s=e.memoizedState,s===null)return pr(e),null;if(n=(e.flags&128)!==0,o=s.rendering,o===null)if(n)Yl(s,!1);else{if(Ut!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=Jd(t),o!==null){for(e.flags|=128,Yl(s,!1),n=o.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=r,r=e.child;r!==null;)s=r,t=n,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,t=o.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return et(pt,pt.current&1|2),e.child}t=t.sibling}s.tail!==null&&Rt()>ul&&(e.flags|=128,n=!0,Yl(s,!1),e.lanes=4194304)}else{if(!n)if(t=Jd(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Yl(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ht)return pr(e),null}else 2*Rt()-s.renderingStartTime>ul&&r!==1073741824&&(e.flags|=128,n=!0,Yl(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(r=s.last,r!==null?r.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Rt(),e.sibling=null,r=pt.current,et(pt,n?r&1|2:r&1),e):(pr(e),null);case 22:case 23:return G0(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?Kr&1073741824&&(pr(e),e.subtreeFlags&6&&(e.flags|=8192)):pr(e),null;case 24:return null;case 25:return null}throw Error(ee(156,e.tag))}function XI(t,e){switch(w0(e),e.tag){case 1:return Ur(e.type)&&Vd(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return al(),st(Lr),st(gr),R0(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return I0(e),null;case 13:if(st(pt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ee(340));sl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return st(pt),null;case 4:return al(),null;case 10:return T0(e.type._context),null;case 22:case 23:return G0(),null;case 24:return null;default:return null}}var Ic=!1,mr=!1,YI=typeof WeakSet=="function"?WeakSet:Set,ye=null;function Ba(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){wt(t,e,n)}else r.current=null}function $y(t,e,r){try{r()}catch(n){wt(t,e,n)}}var Zx=!1;function QI(t,e){if(Cy=Hd,t=Sb(),_0(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var o=0,l=-1,h=-1,c=0,f=0,m=t,p=null;t:for(;;){for(var v;m!==r||i!==0&&m.nodeType!==3||(l=o+i),m!==s||n!==0&&m.nodeType!==3||(h=o+n),m.nodeType===3&&(o+=m.nodeValue.length),(v=m.firstChild)!==null;)p=m,m=v;for(;;){if(m===t)break t;if(p===r&&++c===i&&(l=o),p===s&&++f===n&&(h=o),(v=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=v}r=l===-1||h===-1?null:{start:l,end:h}}else r=null}r=r||{start:0,end:0}}else r=null;for(Py={focusedElem:t,selectionRange:r},Hd=!1,ye=e;ye!==null;)if(e=ye,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ye=t;else for(;ye!==null;){e=ye;try{var _=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(_!==null){var E=_.memoizedProps,T=_.memoizedState,S=e.stateNode,b=S.getSnapshotBeforeUpdate(e.elementType===e.type?E:Un(e.type,E),T);S.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=e.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ee(163))}}catch(A){wt(e,e.return,A)}if(t=e.sibling,t!==null){t.return=e.return,ye=t;break}ye=e.return}return _=Zx,Zx=!1,_}function wu(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&$y(e,r,s)}i=i.next}while(i!==n)}}function Gf(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Wy(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function _T(t){var e=t.alternate;e!==null&&(t.alternate=null,_T(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[_i],delete e[zu],delete e[My],delete e[MI],delete e[kI])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function xT(t){return t.tag===5||t.tag===3||t.tag===4}function Jx(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||xT(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Vy(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Wd));else if(n!==4&&(t=t.child,t!==null))for(Vy(t,e,r),t=t.sibling;t!==null;)Vy(t,e,r),t=t.sibling}function Xy(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(Xy(t,e,r),t=t.sibling;t!==null;)Xy(t,e,r),t=t.sibling}var rr=null,zn=!1;function xs(t,e,r){for(r=r.child;r!==null;)wT(t,e,r),r=r.sibling}function wT(t,e,r){if(bi&&typeof bi.onCommitFiberUnmount=="function")try{bi.onCommitFiberUnmount(Nf,r)}catch{}switch(r.tag){case 5:mr||Ba(r,e);case 6:var n=rr,i=zn;rr=null,xs(t,e,r),rr=n,zn=i,rr!==null&&(zn?(t=rr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):rr.removeChild(r.stateNode));break;case 18:rr!==null&&(zn?(t=rr,r=r.stateNode,t.nodeType===8?Vm(t.parentNode,r):t.nodeType===1&&Vm(t,r),Ou(t)):Vm(rr,r.stateNode));break;case 4:n=rr,i=zn,rr=r.stateNode.containerInfo,zn=!0,xs(t,e,r),rr=n,zn=i;break;case 0:case 11:case 14:case 15:if(!mr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&$y(r,e,o),i=i.next}while(i!==n)}xs(t,e,r);break;case 1:if(!mr&&(Ba(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){wt(r,e,l)}xs(t,e,r);break;case 21:xs(t,e,r);break;case 22:r.mode&1?(mr=(n=mr)||r.memoizedState!==null,xs(t,e,r),mr=n):xs(t,e,r);break;default:xs(t,e,r)}}function ew(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new YI),e.forEach(function(n){var i=iR.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Dn(t,e){var r=e.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var s=t,o=e,l=o;e:for(;l!==null;){switch(l.tag){case 5:rr=l.stateNode,zn=!1;break e;case 3:rr=l.stateNode.containerInfo,zn=!0;break e;case 4:rr=l.stateNode.containerInfo,zn=!0;break e}l=l.return}if(rr===null)throw Error(ee(160));wT(s,o,i),rr=null,zn=!1;var h=i.alternate;h!==null&&(h.return=null),i.return=null}catch(c){wt(i,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)ET(e,t),e=e.sibling}function ET(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Dn(e,t),li(t),n&4){try{wu(3,t,t.return),Gf(3,t)}catch(E){wt(t,t.return,E)}try{wu(5,t,t.return)}catch(E){wt(t,t.return,E)}}break;case 1:Dn(e,t),li(t),n&512&&r!==null&&Ba(r,r.return);break;case 5:if(Dn(e,t),li(t),n&512&&r!==null&&Ba(r,r.return),t.flags&32){var i=t.stateNode;try{Mu(i,"")}catch(E){wt(t,t.return,E)}}if(n&4&&(i=t.stateNode,i!=null)){var s=t.memoizedProps,o=r!==null?r.memoizedProps:s,l=t.type,h=t.updateQueue;if(t.updateQueue=null,h!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&$S(i,s),yy(l,o);var c=yy(l,s);for(o=0;o<h.length;o+=2){var f=h[o],m=h[o+1];f==="style"?QS(i,m):f==="dangerouslySetInnerHTML"?XS(i,m):f==="children"?Mu(i,m):o0(i,f,m,c)}switch(l){case"input":dy(i,s);break;case"textarea":WS(i,s);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var v=s.value;v!=null?ja(i,!!s.multiple,v,!1):p!==!!s.multiple&&(s.defaultValue!=null?ja(i,!!s.multiple,s.defaultValue,!0):ja(i,!!s.multiple,s.multiple?[]:"",!1))}i[zu]=s}catch(E){wt(t,t.return,E)}}break;case 6:if(Dn(e,t),li(t),n&4){if(t.stateNode===null)throw Error(ee(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(E){wt(t,t.return,E)}}break;case 3:if(Dn(e,t),li(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Ou(e.containerInfo)}catch(E){wt(t,t.return,E)}break;case 4:Dn(e,t),li(t);break;case 13:Dn(e,t),li(t),i=t.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(U0=Rt())),n&4&&ew(t);break;case 22:if(f=r!==null&&r.memoizedState!==null,t.mode&1?(mr=(c=mr)||f,Dn(e,t),mr=c):Dn(e,t),li(t),n&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!f&&t.mode&1)for(ye=t,f=t.child;f!==null;){for(m=ye=f;ye!==null;){switch(p=ye,v=p.child,p.tag){case 0:case 11:case 14:case 15:wu(4,p,p.return);break;case 1:Ba(p,p.return);var _=p.stateNode;if(typeof _.componentWillUnmount=="function"){n=p,r=p.return;try{e=n,_.props=e.memoizedProps,_.state=e.memoizedState,_.componentWillUnmount()}catch(E){wt(n,r,E)}}break;case 5:Ba(p,p.return);break;case 22:if(p.memoizedState!==null){rw(m);continue}}v!==null?(v.return=p,ye=v):rw(m)}f=f.sibling}e:for(f=null,m=t;;){if(m.tag===5){if(f===null){f=m;try{i=m.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=m.stateNode,h=m.memoizedProps.style,o=h!=null&&h.hasOwnProperty("display")?h.display:null,l.style.display=YS("display",o))}catch(E){wt(t,t.return,E)}}}else if(m.tag===6){if(f===null)try{m.stateNode.nodeValue=c?"":m.memoizedProps}catch(E){wt(t,t.return,E)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===t)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===t)break e;for(;m.sibling===null;){if(m.return===null||m.return===t)break e;f===m&&(f=null),m=m.return}f===m&&(f=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:Dn(e,t),li(t),n&4&&ew(t);break;case 21:break;default:Dn(e,t),li(t)}}function li(t){var e=t.flags;if(e&2){try{e:{for(var r=t.return;r!==null;){if(xT(r)){var n=r;break e}r=r.return}throw Error(ee(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(Mu(i,""),n.flags&=-33);var s=Jx(t);Xy(t,s,i);break;case 3:case 4:var o=n.stateNode.containerInfo,l=Jx(t);Vy(t,l,o);break;default:throw Error(ee(161))}}catch(h){wt(t,t.return,h)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function KI(t,e,r){ye=t,ST(t)}function ST(t,e,r){for(var n=(t.mode&1)!==0;ye!==null;){var i=ye,s=i.child;if(i.tag===22&&n){var o=i.memoizedState!==null||Ic;if(!o){var l=i.alternate,h=l!==null&&l.memoizedState!==null||mr;l=Ic;var c=mr;if(Ic=o,(mr=h)&&!c)for(ye=i;ye!==null;)o=ye,h=o.child,o.tag===22&&o.memoizedState!==null?nw(i):h!==null?(h.return=o,ye=h):nw(i);for(;s!==null;)ye=s,ST(s),s=s.sibling;ye=i,Ic=l,mr=c}tw(t)}else i.subtreeFlags&8772&&s!==null?(s.return=i,ye=s):tw(t)}}function tw(t){for(;ye!==null;){var e=ye;if(e.flags&8772){var r=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:mr||Gf(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!mr)if(r===null)n.componentDidMount();else{var i=e.elementType===e.type?r.memoizedProps:Un(e.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&Ux(e,s,n);break;case 3:var o=e.updateQueue;if(o!==null){if(r=null,e.child!==null)switch(e.child.tag){case 5:r=e.child.stateNode;break;case 1:r=e.child.stateNode}Ux(e,o,r)}break;case 5:var l=e.stateNode;if(r===null&&e.flags&4){r=l;var h=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":h.autoFocus&&r.focus();break;case"img":h.src&&(r.src=h.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var f=c.memoizedState;if(f!==null){var m=f.dehydrated;m!==null&&Ou(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ee(163))}mr||e.flags&512&&Wy(e)}catch(p){wt(e,e.return,p)}}if(e===t){ye=null;break}if(r=e.sibling,r!==null){r.return=e.return,ye=r;break}ye=e.return}}function rw(t){for(;ye!==null;){var e=ye;if(e===t){ye=null;break}var r=e.sibling;if(r!==null){r.return=e.return,ye=r;break}ye=e.return}}function nw(t){for(;ye!==null;){var e=ye;try{switch(e.tag){case 0:case 11:case 15:var r=e.return;try{Gf(4,e)}catch(h){wt(e,r,h)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var i=e.return;try{n.componentDidMount()}catch(h){wt(e,i,h)}}var s=e.return;try{Wy(e)}catch(h){wt(e,s,h)}break;case 5:var o=e.return;try{Wy(e)}catch(h){wt(e,o,h)}}}catch(h){wt(e,e.return,h)}if(e===t){ye=null;break}var l=e.sibling;if(l!==null){l.return=e.return,ye=l;break}ye=e.return}}var qI=Math.ceil,rf=os.ReactCurrentDispatcher,B0=os.ReactCurrentOwner,bn=os.ReactCurrentBatchConfig,$e=0,Qt=null,Nt=null,or=0,Kr=0,La=qs(0),Ut=0,Vu=null,Go=0,Hf=0,L0=0,Eu=null,Dr=null,U0=0,ul=1/0,ji=null,nf=!1,Yy=null,Gs=null,Rc=!1,ks=null,sf=0,Su=0,Qy=null,wd=-1,Ed=0;function br(){return $e&6?Rt():wd!==-1?wd:wd=Rt()}function Hs(t){return t.mode&1?$e&2&&or!==0?or&-or:DI.transition!==null?(Ed===0&&(Ed=ab()),Ed):(t=Ze,t!==0||(t=window.event,t=t===void 0?16:pb(t.type)),t):1}function Xn(t,e,r,n){if(50<Su)throw Su=0,Qy=null,Error(ee(185));nh(t,r,n),(!($e&2)||t!==Qt)&&(t===Qt&&(!($e&2)&&(Hf|=r),Ut===4&&Is(t,or)),zr(t,n),r===1&&$e===0&&!(e.mode&1)&&(ul=Rt()+500,Lf&&Zs()))}function zr(t,e){var r=t.callbackNode;DP(t,e);var n=Gd(t,t===Qt?or:0);if(n===0)r!==null&&dx(r),t.callbackNode=null,t.callbackPriority=0;else if(e=n&-n,t.callbackPriority!==e){if(r!=null&&dx(r),e===1)t.tag===0?NI(iw.bind(null,t)):Nb(iw.bind(null,t)),II(function(){!($e&6)&&Zs()}),r=null;else{switch(lb(n)){case 1:r=c0;break;case 4:r=sb;break;case 16:r=zd;break;case 536870912:r=ob;break;default:r=zd}r=MT(r,bT.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function bT(t,e){if(wd=-1,Ed=0,$e&6)throw Error(ee(327));var r=t.callbackNode;if(Ya()&&t.callbackNode!==r)return null;var n=Gd(t,t===Qt?or:0);if(n===0)return null;if(n&30||n&t.expiredLanes||e)e=of(t,n);else{e=n;var i=$e;$e|=2;var s=AT();(Qt!==t||or!==e)&&(ji=null,ul=Rt()+500,No(t,e));do try{eR();break}catch(l){TT(t,l)}while(!0);b0(),rf.current=s,$e=i,Nt!==null?e=0:(Qt=null,or=0,e=Ut)}if(e!==0){if(e===2&&(i=Ey(t),i!==0&&(n=i,e=Ky(t,i))),e===1)throw r=Vu,No(t,0),Is(t,n),zr(t,Rt()),r;if(e===6)Is(t,n);else{if(i=t.current.alternate,!(n&30)&&!ZI(i)&&(e=of(t,n),e===2&&(s=Ey(t),s!==0&&(n=s,e=Ky(t,s))),e===1))throw r=Vu,No(t,0),Is(t,n),zr(t,Rt()),r;switch(t.finishedWork=i,t.finishedLanes=n,e){case 0:case 1:throw Error(ee(345));case 2:wo(t,Dr,ji);break;case 3:if(Is(t,n),(n&130023424)===n&&(e=U0+500-Rt(),10<e)){if(Gd(t,0)!==0)break;if(i=t.suspendedLanes,(i&n)!==n){br(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=Ry(wo.bind(null,t,Dr,ji),e);break}wo(t,Dr,ji);break;case 4:if(Is(t,n),(n&4194240)===n)break;for(e=t.eventTimes,i=-1;0<n;){var o=31-Vn(n);s=1<<o,o=e[o],o>i&&(i=o),n&=~s}if(n=i,n=Rt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*qI(n/1960))-n,10<n){t.timeoutHandle=Ry(wo.bind(null,t,Dr,ji),n);break}wo(t,Dr,ji);break;case 5:wo(t,Dr,ji);break;default:throw Error(ee(329))}}}return zr(t,Rt()),t.callbackNode===r?bT.bind(null,t):null}function Ky(t,e){var r=Eu;return t.current.memoizedState.isDehydrated&&(No(t,e).flags|=256),t=of(t,e),t!==2&&(e=Dr,Dr=r,e!==null&&qy(e)),t}function qy(t){Dr===null?Dr=t:Dr.push.apply(Dr,t)}function ZI(t){for(var e=t;;){if(e.flags&16384){var r=e.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],s=i.getSnapshot;i=i.value;try{if(!Kn(s(),i))return!1}catch{return!1}}}if(r=e.child,e.subtreeFlags&16384&&r!==null)r.return=e,e=r;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Is(t,e){for(e&=~L0,e&=~Hf,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-Vn(e),n=1<<r;t[r]=-1,e&=~n}}function iw(t){if($e&6)throw Error(ee(327));Ya();var e=Gd(t,0);if(!(e&1))return zr(t,Rt()),null;var r=of(t,e);if(t.tag!==0&&r===2){var n=Ey(t);n!==0&&(e=n,r=Ky(t,n))}if(r===1)throw r=Vu,No(t,0),Is(t,e),zr(t,Rt()),r;if(r===6)throw Error(ee(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,wo(t,Dr,ji),zr(t,Rt()),null}function z0(t,e){var r=$e;$e|=1;try{return t(e)}finally{$e=r,$e===0&&(ul=Rt()+500,Lf&&Zs())}}function Ho(t){ks!==null&&ks.tag===0&&!($e&6)&&Ya();var e=$e;$e|=1;var r=bn.transition,n=Ze;try{if(bn.transition=null,Ze=1,t)return t()}finally{Ze=n,bn.transition=r,$e=e,!($e&6)&&Zs()}}function G0(){Kr=La.current,st(La)}function No(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,PI(r)),Nt!==null)for(r=Nt.return;r!==null;){var n=r;switch(w0(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Vd();break;case 3:al(),st(Lr),st(gr),R0();break;case 5:I0(n);break;case 4:al();break;case 13:st(pt);break;case 19:st(pt);break;case 10:T0(n.type._context);break;case 22:case 23:G0()}r=r.return}if(Qt=t,Nt=t=js(t.current,null),or=Kr=e,Ut=0,Vu=null,L0=Hf=Go=0,Dr=Eu=null,Mo!==null){for(e=0;e<Mo.length;e++)if(r=Mo[e],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,s=r.pending;if(s!==null){var o=s.next;s.next=i,n.next=o}r.pending=n}Mo=null}return t}function TT(t,e){do{var r=Nt;try{if(b0(),vd.current=tf,ef){for(var n=gt.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}ef=!1}if(zo=0,Vt=Lt=gt=null,xu=!1,ju=0,B0.current=null,r===null||r.return===null){Ut=1,Vu=e,Nt=null;break}e:{var s=t,o=r.return,l=r,h=e;if(e=or,l.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){var c=h,f=l,m=f.tag;if(!(f.mode&1)&&(m===0||m===11||m===15)){var p=f.alternate;p?(f.updateQueue=p.updateQueue,f.memoizedState=p.memoizedState,f.lanes=p.lanes):(f.updateQueue=null,f.memoizedState=null)}var v=Wx(o);if(v!==null){v.flags&=-257,Vx(v,o,l,s,e),v.mode&1&&$x(s,c,e),e=v,h=c;var _=e.updateQueue;if(_===null){var E=new Set;E.add(h),e.updateQueue=E}else _.add(h);break e}else{if(!(e&1)){$x(s,c,e),H0();break e}h=Error(ee(426))}}else if(ht&&l.mode&1){var T=Wx(o);if(T!==null){!(T.flags&65536)&&(T.flags|=256),Vx(T,o,l,s,e),E0(ll(h,l));break e}}s=h=ll(h,l),Ut!==4&&(Ut=2),Eu===null?Eu=[s]:Eu.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var S=lT(s,h,e);Lx(s,S);break e;case 1:l=h;var b=s.type,x=s.stateNode;if(!(s.flags&128)&&(typeof b.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Gs===null||!Gs.has(x)))){s.flags|=65536,e&=-e,s.lanes|=e;var A=uT(s,l,e);Lx(s,A);break e}}s=s.return}while(s!==null)}PT(r)}catch(R){e=R,Nt===r&&r!==null&&(Nt=r=r.return);continue}break}while(!0)}function AT(){var t=rf.current;return rf.current=tf,t===null?tf:t}function H0(){(Ut===0||Ut===3||Ut===2)&&(Ut=4),Qt===null||!(Go&268435455)&&!(Hf&268435455)||Is(Qt,or)}function of(t,e){var r=$e;$e|=2;var n=AT();(Qt!==t||or!==e)&&(ji=null,No(t,e));do try{JI();break}catch(i){TT(t,i)}while(!0);if(b0(),$e=r,rf.current=n,Nt!==null)throw Error(ee(261));return Qt=null,or=0,Ut}function JI(){for(;Nt!==null;)CT(Nt)}function eR(){for(;Nt!==null&&!TP();)CT(Nt)}function CT(t){var e=RT(t.alternate,t,Kr);t.memoizedProps=t.pendingProps,e===null?PT(t):Nt=e,B0.current=null}function PT(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&32768){if(r=XI(r,e),r!==null){r.flags&=32767,Nt=r;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Ut=6,Nt=null;return}}else if(r=VI(r,e,Kr),r!==null){Nt=r;return}if(e=e.sibling,e!==null){Nt=e;return}Nt=e=t}while(e!==null);Ut===0&&(Ut=5)}function wo(t,e,r){var n=Ze,i=bn.transition;try{bn.transition=null,Ze=1,tR(t,e,r,n)}finally{bn.transition=i,Ze=n}return null}function tR(t,e,r,n){do Ya();while(ks!==null);if($e&6)throw Error(ee(327));r=t.finishedWork;var i=t.finishedLanes;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(ee(177));t.callbackNode=null,t.callbackPriority=0;var s=r.lanes|r.childLanes;if(OP(t,s),t===Qt&&(Nt=Qt=null,or=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Rc||(Rc=!0,MT(zd,function(){return Ya(),null})),s=(r.flags&15990)!==0,r.subtreeFlags&15990||s){s=bn.transition,bn.transition=null;var o=Ze;Ze=1;var l=$e;$e|=4,B0.current=null,QI(t,r),ET(r,t),wI(Py),Hd=!!Cy,Py=Cy=null,t.current=r,KI(r),AP(),$e=l,Ze=o,bn.transition=s}else t.current=r;if(Rc&&(Rc=!1,ks=t,sf=i),s=t.pendingLanes,s===0&&(Gs=null),IP(r.stateNode),zr(t,Rt()),e!==null)for(n=t.onRecoverableError,r=0;r<e.length;r++)i=e[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(nf)throw nf=!1,t=Yy,Yy=null,t;return sf&1&&t.tag!==0&&Ya(),s=t.pendingLanes,s&1?t===Qy?Su++:(Su=0,Qy=t):Su=0,Zs(),null}function Ya(){if(ks!==null){var t=lb(sf),e=bn.transition,r=Ze;try{if(bn.transition=null,Ze=16>t?16:t,ks===null)var n=!1;else{if(t=ks,ks=null,sf=0,$e&6)throw Error(ee(331));var i=$e;for($e|=4,ye=t.current;ye!==null;){var s=ye,o=s.child;if(ye.flags&16){var l=s.deletions;if(l!==null){for(var h=0;h<l.length;h++){var c=l[h];for(ye=c;ye!==null;){var f=ye;switch(f.tag){case 0:case 11:case 15:wu(8,f,s)}var m=f.child;if(m!==null)m.return=f,ye=m;else for(;ye!==null;){f=ye;var p=f.sibling,v=f.return;if(_T(f),f===c){ye=null;break}if(p!==null){p.return=v,ye=p;break}ye=v}}}var _=s.alternate;if(_!==null){var E=_.child;if(E!==null){_.child=null;do{var T=E.sibling;E.sibling=null,E=T}while(E!==null)}}ye=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,ye=o;else e:for(;ye!==null;){if(s=ye,s.flags&2048)switch(s.tag){case 0:case 11:case 15:wu(9,s,s.return)}var S=s.sibling;if(S!==null){S.return=s.return,ye=S;break e}ye=s.return}}var b=t.current;for(ye=b;ye!==null;){o=ye;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,ye=x;else e:for(o=b;ye!==null;){if(l=ye,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Gf(9,l)}}catch(R){wt(l,l.return,R)}if(l===o){ye=null;break e}var A=l.sibling;if(A!==null){A.return=l.return,ye=A;break e}ye=l.return}}if($e=i,Zs(),bi&&typeof bi.onPostCommitFiberRoot=="function")try{bi.onPostCommitFiberRoot(Nf,t)}catch{}n=!0}return n}finally{Ze=r,bn.transition=e}}return!1}function sw(t,e,r){e=ll(r,e),e=lT(t,e,1),t=zs(t,e,1),e=br(),t!==null&&(nh(t,1,e),zr(t,e))}function wt(t,e,r){if(t.tag===3)sw(t,t,r);else for(;e!==null;){if(e.tag===3){sw(e,t,r);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Gs===null||!Gs.has(n))){t=ll(r,t),t=uT(e,t,1),e=zs(e,t,1),t=br(),e!==null&&(nh(e,1,t),zr(e,t));break}}e=e.return}}function rR(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=br(),t.pingedLanes|=t.suspendedLanes&r,Qt===t&&(or&r)===r&&(Ut===4||Ut===3&&(or&130023424)===or&&500>Rt()-U0?No(t,0):L0|=r),zr(t,e)}function IT(t,e){e===0&&(t.mode&1?(e=xc,xc<<=1,!(xc&130023424)&&(xc=4194304)):e=1);var r=br();t=ts(t,e),t!==null&&(nh(t,e,r),zr(t,r))}function nR(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),IT(t,r)}function iR(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(ee(314))}n!==null&&n.delete(e),IT(t,r)}var RT;RT=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||Lr.current)Fr=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Fr=!1,WI(t,e,r);Fr=!!(t.flags&131072)}else Fr=!1,ht&&e.flags&1048576&&Db(e,Qd,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;xd(t,e),t=e.pendingProps;var i=il(e,gr.current);Xa(e,r),i=k0(null,e,n,t,i,r);var s=N0();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Ur(n)?(s=!0,Xd(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,C0(e),i.updater=zf,e.stateNode=i,i._reactInternals=e,By(e,n,t,r),e=zy(null,e,n,!0,s,r)):(e.tag=0,ht&&s&&x0(e),Er(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(xd(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=oR(n),t=Un(n,t),i){case 0:e=Uy(null,e,n,t,r);break e;case 1:e=Qx(null,e,n,t,r);break e;case 11:e=Xx(null,e,n,t,r);break e;case 14:e=Yx(null,e,n,Un(n.type,t),r);break e}throw Error(ee(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Un(n,i),Uy(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Un(n,i),Qx(t,e,n,i,r);case 3:e:{if(fT(e),t===null)throw Error(ee(387));n=e.pendingProps,s=e.memoizedState,i=s.element,zb(t,e),Zd(e,n,null,r);var o=e.memoizedState;if(n=o.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=ll(Error(ee(423)),e),e=Kx(t,e,n,r,i);break e}else if(n!==i){i=ll(Error(ee(424)),e),e=Kx(t,e,n,r,i);break e}else for(qr=Us(e.stateNode.containerInfo.firstChild),Zr=e,ht=!0,Gn=null,r=Lb(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(sl(),n===i){e=rs(t,e,r);break e}Er(t,e,n,r)}e=e.child}return e;case 5:return Gb(e),t===null&&Dy(e),n=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,Iy(n,i)?o=null:s!==null&&Iy(n,s)&&(e.flags|=32),dT(t,e),Er(t,e,o,r),e.child;case 6:return t===null&&Dy(e),null;case 13:return pT(t,e,r);case 4:return P0(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=ol(e,null,n,r):Er(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Un(n,i),Xx(t,e,n,i,r);case 7:return Er(t,e,e.pendingProps,r),e.child;case 8:return Er(t,e,e.pendingProps.children,r),e.child;case 12:return Er(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,et(Kd,n._currentValue),n._currentValue=o,s!==null)if(Kn(s.value,o)){if(s.children===i.children&&!Lr.current){e=rs(t,e,r);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var h=l.firstContext;h!==null;){if(h.context===n){if(s.tag===1){h=Ki(-1,r&-r),h.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?h.next=h:(h.next=f.next,f.next=h),c.pending=h}}s.lanes|=r,h=s.alternate,h!==null&&(h.lanes|=r),Oy(s.return,r,e),l.lanes|=r;break}h=h.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(ee(341));o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),Oy(o,r,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Er(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,Xa(e,r),i=Tn(i),n=n(i),e.flags|=1,Er(t,e,n,r),e.child;case 14:return n=e.type,i=Un(n,e.pendingProps),i=Un(n.type,i),Yx(t,e,n,i,r);case 15:return hT(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Un(n,i),xd(t,e),e.tag=1,Ur(n)?(t=!0,Xd(e)):t=!1,Xa(e,r),aT(e,n,i),By(e,n,i,r),zy(null,e,n,!0,t,r);case 19:return mT(t,e,r);case 22:return cT(t,e,r)}throw Error(ee(156,e.tag))};function MT(t,e){return ib(t,e)}function sR(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xn(t,e,r,n){return new sR(t,e,r,n)}function j0(t){return t=t.prototype,!(!t||!t.isReactComponent)}function oR(t){if(typeof t=="function")return j0(t)?1:0;if(t!=null){if(t=t.$$typeof,t===l0)return 11;if(t===u0)return 14}return 2}function js(t,e){var r=t.alternate;return r===null?(r=xn(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Sd(t,e,r,n,i,s){var o=2;if(n=t,typeof t=="function")j0(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Pa:return Do(r.children,i,s,e);case a0:o=8,i|=8;break;case ay:return t=xn(12,r,e,i|2),t.elementType=ay,t.lanes=s,t;case ly:return t=xn(13,r,e,i),t.elementType=ly,t.lanes=s,t;case uy:return t=xn(19,r,e,i),t.elementType=uy,t.lanes=s,t;case GS:return jf(r,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case US:o=10;break e;case zS:o=9;break e;case l0:o=11;break e;case u0:o=14;break e;case As:o=16,n=null;break e}throw Error(ee(130,t==null?t:typeof t,""))}return e=xn(o,r,e,i),e.elementType=t,e.type=n,e.lanes=s,e}function Do(t,e,r,n){return t=xn(7,t,n,e),t.lanes=r,t}function jf(t,e,r,n){return t=xn(22,t,n,e),t.elementType=GS,t.lanes=r,t.stateNode={isHidden:!1},t}function eg(t,e,r){return t=xn(6,t,null,e),t.lanes=r,t}function tg(t,e,r){return e=xn(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function aR(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Om(0),this.expirationTimes=Om(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Om(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function $0(t,e,r,n,i,s,o,l,h){return t=new aR(t,e,r,l,h),e===1?(e=1,s===!0&&(e|=8)):e=0,s=xn(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},C0(s),t}function lR(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ca,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function kT(t){if(!t)return Vs;t=t._reactInternals;e:{if(Vo(t)!==t||t.tag!==1)throw Error(ee(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Ur(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(ee(171))}if(t.tag===1){var r=t.type;if(Ur(r))return kb(t,r,e)}return e}function NT(t,e,r,n,i,s,o,l,h){return t=$0(r,n,!0,t,i,s,o,l,h),t.context=kT(null),r=t.current,n=br(),i=Hs(r),s=Ki(n,i),s.callback=e??null,zs(r,s,i),t.current.lanes=i,nh(t,i,n),zr(t,n),t}function $f(t,e,r,n){var i=e.current,s=br(),o=Hs(i);return r=kT(r),e.context===null?e.context=r:e.pendingContext=r,e=Ki(s,o),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),t=zs(i,e,o),t!==null&&(Xn(t,i,o,s),yd(t,i,o)),o}function af(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function ow(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function W0(t,e){ow(t,e),(t=t.alternate)&&ow(t,e)}function uR(){return null}var DT=typeof reportError=="function"?reportError:function(t){console.error(t)};function V0(t){this._internalRoot=t}Wf.prototype.render=V0.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(ee(409));$f(t,e,null,null)};Wf.prototype.unmount=V0.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Ho(function(){$f(null,t,null,null)}),e[es]=null}};function Wf(t){this._internalRoot=t}Wf.prototype.unstable_scheduleHydration=function(t){if(t){var e=cb();t={blockedOn:null,target:t,priority:e};for(var r=0;r<Ps.length&&e!==0&&e<Ps[r].priority;r++);Ps.splice(r,0,t),r===0&&fb(t)}};function X0(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Vf(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function aw(){}function hR(t,e,r,n,i){if(i){if(typeof n=="function"){var s=n;n=function(){var c=af(o);s.call(c)}}var o=NT(e,n,t,0,null,!1,!1,"",aw);return t._reactRootContainer=o,t[es]=o.current,Lu(t.nodeType===8?t.parentNode:t),Ho(),o}for(;i=t.lastChild;)t.removeChild(i);if(typeof n=="function"){var l=n;n=function(){var c=af(h);l.call(c)}}var h=$0(t,0,!1,null,null,!1,!1,"",aw);return t._reactRootContainer=h,t[es]=h.current,Lu(t.nodeType===8?t.parentNode:t),Ho(function(){$f(e,h,r,n)}),h}function Xf(t,e,r,n,i){var s=r._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var l=i;i=function(){var h=af(o);l.call(h)}}$f(e,o,t,i)}else o=hR(r,e,t,i,n);return af(o)}ub=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var r=iu(e.pendingLanes);r!==0&&(d0(e,r|1),zr(e,Rt()),!($e&6)&&(ul=Rt()+500,Zs()))}break;case 13:Ho(function(){var n=ts(t,1);if(n!==null){var i=br();Xn(n,t,1,i)}}),W0(t,1)}};f0=function(t){if(t.tag===13){var e=ts(t,134217728);if(e!==null){var r=br();Xn(e,t,134217728,r)}W0(t,134217728)}};hb=function(t){if(t.tag===13){var e=Hs(t),r=ts(t,e);if(r!==null){var n=br();Xn(r,t,e,n)}W0(t,e)}};cb=function(){return Ze};db=function(t,e){var r=Ze;try{return Ze=t,e()}finally{Ze=r}};_y=function(t,e,r){switch(e){case"input":if(dy(t,r),e=r.name,r.type==="radio"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var i=Bf(n);if(!i)throw Error(ee(90));jS(n),dy(n,i)}}}break;case"textarea":WS(t,r);break;case"select":e=r.value,e!=null&&ja(t,!!r.multiple,e,!1)}};ZS=z0;JS=Ho;var cR={usingClientEntryPoint:!1,Events:[sh,ka,Bf,KS,qS,z0]},Ql={findFiberByHostInstance:Ro,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},dR={bundleType:Ql.bundleType,version:Ql.version,rendererPackageName:Ql.rendererPackageName,rendererConfig:Ql.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:os.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=rb(t),t===null?null:t.stateNode},findFiberByHostInstance:Ql.findFiberByHostInstance||uR,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Mc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Mc.isDisabled&&Mc.supportsFiber)try{Nf=Mc.inject(dR),bi=Mc}catch{}}tn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cR;tn.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!X0(e))throw Error(ee(200));return lR(t,e,null,r)};tn.createRoot=function(t,e){if(!X0(t))throw Error(ee(299));var r=!1,n="",i=DT;return e!=null&&(e.unstable_strictMode===!0&&(r=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=$0(t,1,!1,null,null,r,!1,n,i),t[es]=e.current,Lu(t.nodeType===8?t.parentNode:t),new V0(e)};tn.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(ee(188)):(t=Object.keys(t).join(","),Error(ee(268,t)));return t=rb(e),t=t===null?null:t.stateNode,t};tn.flushSync=function(t){return Ho(t)};tn.hydrate=function(t,e,r){if(!Vf(e))throw Error(ee(200));return Xf(null,t,e,!0,r)};tn.hydrateRoot=function(t,e,r){if(!X0(t))throw Error(ee(405));var n=r!=null&&r.hydratedSources||null,i=!1,s="",o=DT;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(s=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),e=NT(e,null,t,1,r??null,i,!1,s,o),t[es]=e.current,Lu(t),n)for(t=0;t<n.length;t++)r=n[t],i=r._getVersion,i=i(r._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[r,i]:e.mutableSourceEagerHydrationData.push(r,i);return new Wf(e)};tn.render=function(t,e,r){if(!Vf(e))throw Error(ee(200));return Xf(null,t,e,!1,r)};tn.unmountComponentAtNode=function(t){if(!Vf(t))throw Error(ee(40));return t._reactRootContainer?(Ho(function(){Xf(null,null,t,!1,function(){t._reactRootContainer=null,t[es]=null})}),!0):!1};tn.unstable_batchedUpdates=z0;tn.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!Vf(r))throw Error(ee(200));if(t==null||t._reactInternals===void 0)throw Error(ee(38));return Xf(t,e,r,!1,n)};tn.version="18.3.1-next-f1338f8080-20240426";function OT(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(OT)}catch(t){console.error(t)}}OT(),OS.exports=tn;var fR=OS.exports,lw=fR;sy.createRoot=lw.createRoot,sy.hydrateRoot=lw.hydrateRoot;var Yf={},FT={exports:{}},pR="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",mR=pR,gR=mR;function BT(){}function LT(){}LT.resetWarningCache=BT;var yR=function(){function t(n,i,s,o,l,h){if(h!==gR){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:LT,resetWarningCache:BT};return r.PropTypes=r,r};FT.exports=yR();var Y0=FT.exports;const it=Mf(Y0);var UT={L:1,M:0,Q:3,H:2},zT={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},vR=zT;function GT(t){this.mode=vR.MODE_8BIT_BYTE,this.data=t}GT.prototype={getLength:function(t){return this.data.length},write:function(t){for(var e=0;e<this.data.length;e++)t.put(this.data.charCodeAt(e),8)}};var _R=GT,kc=UT;function xi(t,e){this.totalCount=t,this.dataCount=e}xi.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];xi.getRSBlocks=function(t,e){var r=xi.getRsBlockTable(t,e);if(r==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var n=r.length/3,i=new Array,s=0;s<n;s++)for(var o=r[s*3+0],l=r[s*3+1],h=r[s*3+2],c=0;c<o;c++)i.push(new xi(l,h));return i};xi.getRsBlockTable=function(t,e){switch(e){case kc.L:return xi.RS_BLOCK_TABLE[(t-1)*4+0];case kc.M:return xi.RS_BLOCK_TABLE[(t-1)*4+1];case kc.Q:return xi.RS_BLOCK_TABLE[(t-1)*4+2];case kc.H:return xi.RS_BLOCK_TABLE[(t-1)*4+3];default:return}};var xR=xi;function HT(){this.buffer=new Array,this.length=0}HT.prototype={get:function(t){var e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)==1},put:function(t,e){for(var r=0;r<e;r++)this.putBit((t>>>e-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var wR=HT,Hn={glog:function(t){if(t<1)throw new Error("glog("+t+")");return Hn.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return Hn.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(var ir=0;ir<8;ir++)Hn.EXP_TABLE[ir]=1<<ir;for(var ir=8;ir<256;ir++)Hn.EXP_TABLE[ir]=Hn.EXP_TABLE[ir-4]^Hn.EXP_TABLE[ir-5]^Hn.EXP_TABLE[ir-6]^Hn.EXP_TABLE[ir-8];for(var ir=0;ir<255;ir++)Hn.LOG_TABLE[Hn.EXP_TABLE[ir]]=ir;var jT=Hn,go=jT;function bd(t,e){if(t.length==null)throw new Error(t.length+"/"+e);for(var r=0;r<t.length&&t[r]==0;)r++;this.num=new Array(t.length-r+e);for(var n=0;n<t.length-r;n++)this.num[n]=t[n+r]}bd.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),r=0;r<this.getLength();r++)for(var n=0;n<t.getLength();n++)e[r+n]^=go.gexp(go.glog(this.get(r))+go.glog(t.get(n)));return new bd(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=go.glog(this.get(0))-go.glog(t.get(0)),r=new Array(this.getLength()),n=0;n<this.getLength();n++)r[n]=this.get(n);for(var n=0;n<t.getLength();n++)r[n]^=go.gexp(go.glog(t.get(n))+e);return new bd(r,0).mod(t)}};var $T=bd,pn=zT,uw=$T,ER=jT,ws={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},er={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;er.getBCHDigit(e)-er.getBCHDigit(er.G15)>=0;)e^=er.G15<<er.getBCHDigit(e)-er.getBCHDigit(er.G15);return(t<<10|e)^er.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;er.getBCHDigit(e)-er.getBCHDigit(er.G18)>=0;)e^=er.G18<<er.getBCHDigit(e)-er.getBCHDigit(er.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;t!=0;)e++,t>>>=1;return e},getPatternPosition:function(t){return er.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case ws.PATTERN000:return(e+r)%2==0;case ws.PATTERN001:return e%2==0;case ws.PATTERN010:return r%3==0;case ws.PATTERN011:return(e+r)%3==0;case ws.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case ws.PATTERN101:return e*r%2+e*r%3==0;case ws.PATTERN110:return(e*r%2+e*r%3)%2==0;case ws.PATTERN111:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new uw([1],0),r=0;r<t;r++)e=e.multiply(new uw([1,ER.gexp(r)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case pn.MODE_NUMBER:return 10;case pn.MODE_ALPHA_NUM:return 9;case pn.MODE_8BIT_BYTE:return 8;case pn.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case pn.MODE_NUMBER:return 12;case pn.MODE_ALPHA_NUM:return 11;case pn.MODE_8BIT_BYTE:return 16;case pn.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else if(e<41)switch(t){case pn.MODE_NUMBER:return 14;case pn.MODE_ALPHA_NUM:return 13;case pn.MODE_8BIT_BYTE:return 16;case pn.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}else throw new Error("type:"+e)},getLostPoint:function(t){for(var e=t.getModuleCount(),r=0,n=0;n<e;n++)for(var i=0;i<e;i++){for(var s=0,o=t.isDark(n,i),l=-1;l<=1;l++)if(!(n+l<0||e<=n+l))for(var h=-1;h<=1;h++)i+h<0||e<=i+h||l==0&&h==0||o==t.isDark(n+l,i+h)&&s++;s>5&&(r+=3+s-5)}for(var n=0;n<e-1;n++)for(var i=0;i<e-1;i++){var c=0;t.isDark(n,i)&&c++,t.isDark(n+1,i)&&c++,t.isDark(n,i+1)&&c++,t.isDark(n+1,i+1)&&c++,(c==0||c==4)&&(r+=3)}for(var n=0;n<e;n++)for(var i=0;i<e-6;i++)t.isDark(n,i)&&!t.isDark(n,i+1)&&t.isDark(n,i+2)&&t.isDark(n,i+3)&&t.isDark(n,i+4)&&!t.isDark(n,i+5)&&t.isDark(n,i+6)&&(r+=40);for(var i=0;i<e;i++)for(var n=0;n<e-6;n++)t.isDark(n,i)&&!t.isDark(n+1,i)&&t.isDark(n+2,i)&&t.isDark(n+3,i)&&t.isDark(n+4,i)&&!t.isDark(n+5,i)&&t.isDark(n+6,i)&&(r+=40);for(var f=0,i=0;i<e;i++)for(var n=0;n<e;n++)t.isDark(n,i)&&f++;var m=Math.abs(100*f/e/e-50)/5;return r+=m*10,r}},SR=er,bR=_R,WT=xR,VT=wR,Js=SR,TR=$T;function wi(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var nn=wi.prototype;nn.addData=function(t){var e=new bR(t);this.dataList.push(e),this.dataCache=null};nn.isDark=function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]};nn.getModuleCount=function(){return this.moduleCount};nn.make=function(){if(this.typeNumber<1){var t=1;for(t=1;t<40;t++){for(var e=WT.getRSBlocks(t,this.errorCorrectLevel),r=new VT,n=0,i=0;i<e.length;i++)n+=e[i].dataCount;for(var i=0;i<this.dataList.length;i++){var s=this.dataList[i];r.put(s.mode,4),r.put(s.getLength(),Js.getLengthInBits(s.mode,t)),s.write(r)}if(r.getLengthInBits()<=n*8)break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())};nn.makeImpl=function(t,e){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++)this.modules[r][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),this.dataCache==null&&(this.dataCache=wi.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)};nn.setupPositionProbePattern=function(t,e){for(var r=-1;r<=7;r++)if(!(t+r<=-1||this.moduleCount<=t+r))for(var n=-1;n<=7;n++)e+n<=-1||this.moduleCount<=e+n||(0<=r&&r<=6&&(n==0||n==6)||0<=n&&n<=6&&(r==0||r==6)||2<=r&&r<=4&&2<=n&&n<=4?this.modules[t+r][e+n]=!0:this.modules[t+r][e+n]=!1)};nn.getBestMaskPattern=function(){for(var t=0,e=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=Js.getLostPoint(this);(r==0||t>n)&&(t=n,e=r)}return e};nn.createMovieClip=function(t,e,r){var n=t.createEmptyMovieClip(e,r),i=1;this.make();for(var s=0;s<this.modules.length;s++)for(var o=s*i,l=0;l<this.modules[s].length;l++){var h=l*i,c=this.modules[s][l];c&&(n.beginFill(0,100),n.moveTo(h,o),n.lineTo(h+i,o),n.lineTo(h+i,o+i),n.lineTo(h,o+i),n.endFill())}return n};nn.setupTimingPattern=function(){for(var t=8;t<this.moduleCount-8;t++)this.modules[t][6]==null&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)this.modules[6][e]==null&&(this.modules[6][e]=e%2==0)};nn.setupPositionAdjustPattern=function(){for(var t=Js.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var r=0;r<t.length;r++){var n=t[e],i=t[r];if(this.modules[n][i]==null)for(var s=-2;s<=2;s++)for(var o=-2;o<=2;o++)s==-2||s==2||o==-2||o==2||s==0&&o==0?this.modules[n+s][i+o]=!0:this.modules[n+s][i+o]=!1}};nn.setupTypeNumber=function(t){for(var e=Js.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var n=!t&&(e>>r&1)==1;this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(var r=0;r<18;r++){var n=!t&&(e>>r&1)==1;this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}};nn.setupTypeInfo=function(t,e){for(var r=this.errorCorrectLevel<<3|e,n=Js.getBCHTypeInfo(r),i=0;i<15;i++){var s=!t&&(n>>i&1)==1;i<6?this.modules[i][8]=s:i<8?this.modules[i+1][8]=s:this.modules[this.moduleCount-15+i][8]=s}for(var i=0;i<15;i++){var s=!t&&(n>>i&1)==1;i<8?this.modules[8][this.moduleCount-i-1]=s:i<9?this.modules[8][15-i-1+1]=s:this.modules[8][15-i-1]=s}this.modules[this.moduleCount-8][8]=!t};nn.mapData=function(t,e){for(var r=-1,n=this.moduleCount-1,i=7,s=0,o=this.moduleCount-1;o>0;o-=2)for(o==6&&o--;;){for(var l=0;l<2;l++)if(this.modules[n][o-l]==null){var h=!1;s<t.length&&(h=(t[s]>>>i&1)==1);var c=Js.getMask(e,n,o-l);c&&(h=!h),this.modules[n][o-l]=h,i--,i==-1&&(s++,i=7)}if(n+=r,n<0||this.moduleCount<=n){n-=r,r=-r;break}}};wi.PAD0=236;wi.PAD1=17;wi.createData=function(t,e,r){for(var n=WT.getRSBlocks(t,e),i=new VT,s=0;s<r.length;s++){var o=r[s];i.put(o.mode,4),i.put(o.getLength(),Js.getLengthInBits(o.mode,t)),o.write(i)}for(var l=0,s=0;s<n.length;s++)l+=n[s].dataCount;if(i.getLengthInBits()>l*8)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+l*8+")");for(i.getLengthInBits()+4<=l*8&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=l*8||(i.put(wi.PAD0,8),i.getLengthInBits()>=l*8));)i.put(wi.PAD1,8);return wi.createBytes(i,n)};wi.createBytes=function(t,e){for(var r=0,n=0,i=0,s=new Array(e.length),o=new Array(e.length),l=0;l<e.length;l++){var h=e[l].dataCount,c=e[l].totalCount-h;n=Math.max(n,h),i=Math.max(i,c),s[l]=new Array(h);for(var f=0;f<s[l].length;f++)s[l][f]=255&t.buffer[f+r];r+=h;var m=Js.getErrorCorrectPolynomial(c),p=new TR(s[l],m.getLength()-1),v=p.mod(m);o[l]=new Array(m.getLength()-1);for(var f=0;f<o[l].length;f++){var _=f+v.getLength()-o[l].length;o[l][f]=_>=0?v.get(_):0}}for(var E=0,f=0;f<e.length;f++)E+=e[f].totalCount;for(var T=new Array(E),S=0,f=0;f<n;f++)for(var l=0;l<e.length;l++)f<s[l].length&&(T[S++]=s[l][f]);for(var f=0;f<i;f++)for(var l=0;l<e.length;l++)f<o[l].length&&(T[S++]=o[l][f]);return T};var AR=wi,Q0={};Object.defineProperty(Q0,"__esModule",{value:!0});var CR=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},PR=Y0,mn=YT(PR),XT=ke,Nc=YT(XT);function YT(t){return t&&t.__esModule?t:{default:t}}function IR(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}var RR={bgColor:mn.default.oneOfType([mn.default.object,mn.default.string]).isRequired,bgD:mn.default.string.isRequired,fgColor:mn.default.oneOfType([mn.default.object,mn.default.string]).isRequired,fgD:mn.default.string.isRequired,size:mn.default.number.isRequired,title:mn.default.string,viewBoxSize:mn.default.number.isRequired,xmlns:mn.default.string},K0=(0,XT.forwardRef)(function(t,e){var r=t.bgColor,n=t.bgD,i=t.fgD,s=t.fgColor,o=t.size,l=t.title,h=t.viewBoxSize,c=t.xmlns,f=c===void 0?"http://www.w3.org/2000/svg":c,m=IR(t,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return Nc.default.createElement("svg",CR({},m,{height:o,ref:e,viewBox:"0 0 "+h+" "+h,width:o,xmlns:f}),l?Nc.default.createElement("title",null,l):null,Nc.default.createElement("path",{d:n,fill:r}),Nc.default.createElement("path",{d:i,fill:s}))});K0.displayName="QRCodeSvg";K0.propTypes=RR;Q0.default=K0;Object.defineProperty(Yf,"__esModule",{value:!0});Yf.QRCode=void 0;var MR=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},kR=Y0,Li=ah(kR),NR=UT,DR=ah(NR),OR=AR,FR=ah(OR),QT=ke,BR=ah(QT),LR=Q0,UR=ah(LR);function ah(t){return t&&t.__esModule?t:{default:t}}function zR(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}var GR={bgColor:Li.default.oneOfType([Li.default.object,Li.default.string]),fgColor:Li.default.oneOfType([Li.default.object,Li.default.string]),level:Li.default.string,size:Li.default.number,value:Li.default.string.isRequired},Qf=(0,QT.forwardRef)(function(t,e){var r=t.bgColor,n=r===void 0?"#FFFFFF":r,i=t.fgColor,s=i===void 0?"#000000":i,o=t.level,l=o===void 0?"L":o,h=t.size,c=h===void 0?256:h,f=t.value,m=zR(t,["bgColor","fgColor","level","size","value"]),p=new FR.default(-1,DR.default[l]);p.addData(f),p.make();var v=p.modules;return BR.default.createElement(UR.default,MR({},m,{bgColor:n,bgD:v.map(function(_,E){return _.map(function(T,S){return T?"":"M "+S+" "+E+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:s,fgD:v.map(function(_,E){return _.map(function(T,S){return T?"M "+S+" "+E+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:e,size:c,viewBoxSize:v.length}))});Yf.QRCode=Qf;Qf.displayName="QRCode";Qf.propTypes=GR;var HR=Yf.default=Qf;const jR=({selectedAgent:t})=>U.jsxs("div",{className:"data-panel",children:[U.jsx("div",{className:"gamish-panel-title",children:U.jsx("span",{children:"AGENT PROFILE"})}),t?U.jsxs("div",{className:"flex flex-col gap-4",children:[U.jsxs("div",{className:"flex gap-3 items-center",children:[U.jsx("div",{className:"w-10 h-10 bg-slate-900 border-2 border-slate-600 rounded flex items-center justify-center",children:U.jsx("span",{className:"text-xl",children:"👾"})}),U.jsxs("div",{className:"flex flex-col",children:[U.jsx("span",{className:"text-primary font-bold text-xs uppercase tracking-wider",children:t.alias||t.name||"Unknown Agent"}),U.jsx("span",{className:"text-[9px] text-slate-400 uppercase",children:t.role||"Operative"})]})]}),U.jsxs("div",{className:"agent-stats",children:[U.jsxs("div",{className:"stat-box",children:[U.jsx("span",{className:"stat-label",children:"Model"}),U.jsx("span",{className:"stat-value truncate block",children:t.model||"N/A"})]}),U.jsxs("div",{className:"stat-box",children:[U.jsx("span",{className:"stat-label",children:"Status"}),U.jsx("span",{className:`stat-value uppercase ${t.status==="working"?"text-amber-400":"text-slate-400"}`,children:t.status||"IDLE"})]}),U.jsxs("div",{className:"stat-box col-span-2",children:[U.jsx("span",{className:"stat-label",children:"Provider"}),U.jsx("span",{className:"stat-value",children:t.provider||"Unknown"})]})]}),t.sessionId&&U.jsxs("div",{className:"border-t border-slate-700 pt-2",children:[U.jsx("span",{className:"stat-label mb-1",children:"Assigned Session"}),U.jsx("div",{className:"text-[9px] font-mono text-emerald-400/80 bg-emerald-950/30 p-1.5 rounded border border-emerald-900/50 truncate",children:t.sessionId})]}),t.lastMessageSnippet&&U.jsxs("div",{className:"bg-slate-900/50 p-2 rounded border border-slate-700/50",children:[U.jsx("span",{className:"stat-label mb-1 text-slate-500",children:"Last Transmission"}),U.jsxs("p",{className:"text-[9px] text-slate-300 italic",children:['"',t.lastMessageSnippet.slice(0,100),t.lastMessageSnippet.length>100?"...":"",'"']})]})]}):U.jsxs("div",{className:"flex flex-col items-center justify-center py-6 text-slate-600 gap-2",children:[U.jsx("span",{className:"text-2xl opacity-20",children:"?"}),U.jsx("span",{className:"text-[9px] uppercase",children:"Select an agent"})]})]});var KT={exports:{}},Xo=(t=>(t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2",t))(Xo||{}),qT=(t=>(t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS",t))(qT||{}),Zy=(t=>(t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL",t))(Zy||{}),Ie=(t=>(t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR",t))(Ie||{}),$n=(t=>(t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN",t))($n||{}),re=(t=>(t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL",t))(re||{}),Qa=(t=>(t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",t))(Qa||{}),Ae=(t=>(t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT",t))(Ae||{}),de=(t=>(t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT",t))(de||{}),wn=(t=>(t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR",t))(wn||{}),qi=(t=>(t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",t))(qi||{}),Pi=(t=>(t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL",t))(Pi||{}),Br=(t=>(t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",t))(Br||{}),yi=(t=>(t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT",t))(yi||{}),q0=(t=>(t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL",t))(q0||{}),En=(t=>(t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp",t))(En||{}),Bt=(t=>(t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE",t[t.COLOR=4]="COLOR",t))(Bt||{}),kt=(t=>(t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH",t))(kt||{}),Ai=(t=>(t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",t))(Ai||{});const $R={createCanvas:(t,e)=>{const r=document.createElement("canvas");return r.width=t,r.height=e,r},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(t,e)=>fetch(t,e),parseXML:t=>new DOMParser().parseFromString(t,"text/xml")},he={ADAPTER:$R,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var rg=/iPhone/i,hw=/iPod/i,cw=/iPad/i,dw=/\biOS-universal(?:.+)Mac\b/i,ng=/\bAndroid(?:.+)Mobile\b/i,fw=/Android/i,pa=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Dc=/Silk/i,Ui=/Windows Phone/i,pw=/\bWindows(?:.+)ARM\b/i,mw=/BlackBerry/i,gw=/BB10/i,yw=/Opera Mini/i,vw=/\b(CriOS|Chrome)(?:.+)Mobile/i,_w=/Mobile(?:.+)Firefox\b/i,xw=function(t){return typeof t<"u"&&t.platform==="MacIntel"&&typeof t.maxTouchPoints=="number"&&t.maxTouchPoints>1&&typeof MSStream>"u"};function WR(t){return function(e){return e.test(t)}}function ww(t){var e={userAgent:"",platform:"",maxTouchPoints:0};!t&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof t=="string"?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0});var r=e.userAgent,n=r.split("[FBAN");typeof n[1]<"u"&&(r=n[0]),n=r.split("Twitter"),typeof n[1]<"u"&&(r=n[0]);var i=WR(r),s={apple:{phone:i(rg)&&!i(Ui),ipod:i(hw),tablet:!i(rg)&&(i(cw)||xw(e))&&!i(Ui),universal:i(dw),device:(i(rg)||i(hw)||i(cw)||i(dw)||xw(e))&&!i(Ui)},amazon:{phone:i(pa),tablet:!i(pa)&&i(Dc),device:i(pa)||i(Dc)},android:{phone:!i(Ui)&&i(pa)||!i(Ui)&&i(ng),tablet:!i(Ui)&&!i(pa)&&!i(ng)&&(i(Dc)||i(fw)),device:!i(Ui)&&(i(pa)||i(Dc)||i(ng)||i(fw))||i(/\bokhttp\b/i)},windows:{phone:i(Ui),tablet:i(pw),device:i(Ui)||i(pw)},other:{blackberry:i(mw),blackberry10:i(gw),opera:i(yw),firefox:i(_w),chrome:i(vw),device:i(mw)||i(gw)||i(yw)||i(_w)||i(vw)},any:!1,phone:!1,tablet:!1};return s.any=s.apple.device||s.android.device||s.windows.device||s.other.device,s.phone=s.apple.phone||s.android.phone||s.windows.phone,s.tablet=s.apple.tablet||s.android.tablet||s.windows.tablet,s}const VR=ww.default??ww,Yi=VR(globalThis.navigator);he.RETINA_PREFIX=/@([0-9\.]+)x/;he.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var ZT={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(h,c,f){this.fn=h,this.context=c,this.once=f||!1}function s(h,c,f,m,p){if(typeof f!="function")throw new TypeError("The listener must be a function");var v=new i(f,m||h,p),_=r?r+c:c;return h._events[_]?h._events[_].fn?h._events[_]=[h._events[_],v]:h._events[_].push(v):(h._events[_]=v,h._eventsCount++),h}function o(h,c){--h._eventsCount===0?h._events=new n:delete h._events[c]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var c=[],f,m;if(this._eventsCount===0)return c;for(m in f=this._events)e.call(f,m)&&c.push(r?m.slice(1):m);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(f)):c},l.prototype.listeners=function(c){var f=r?r+c:c,m=this._events[f];if(!m)return[];if(m.fn)return[m.fn];for(var p=0,v=m.length,_=new Array(v);p<v;p++)_[p]=m[p].fn;return _},l.prototype.listenerCount=function(c){var f=r?r+c:c,m=this._events[f];return m?m.fn?1:m.length:0},l.prototype.emit=function(c,f,m,p,v,_){var E=r?r+c:c;if(!this._events[E])return!1;var T=this._events[E],S=arguments.length,b,x;if(T.fn){switch(T.once&&this.removeListener(c,T.fn,void 0,!0),S){case 1:return T.fn.call(T.context),!0;case 2:return T.fn.call(T.context,f),!0;case 3:return T.fn.call(T.context,f,m),!0;case 4:return T.fn.call(T.context,f,m,p),!0;case 5:return T.fn.call(T.context,f,m,p,v),!0;case 6:return T.fn.call(T.context,f,m,p,v,_),!0}for(x=1,b=new Array(S-1);x<S;x++)b[x-1]=arguments[x];T.fn.apply(T.context,b)}else{var A=T.length,R;for(x=0;x<A;x++)switch(T[x].once&&this.removeListener(c,T[x].fn,void 0,!0),S){case 1:T[x].fn.call(T[x].context);break;case 2:T[x].fn.call(T[x].context,f);break;case 3:T[x].fn.call(T[x].context,f,m);break;case 4:T[x].fn.call(T[x].context,f,m,p);break;default:if(!b)for(R=1,b=new Array(S-1);R<S;R++)b[R-1]=arguments[R];T[x].fn.apply(T[x].context,b)}}return!0},l.prototype.on=function(c,f,m){return s(this,c,f,m,!1)},l.prototype.once=function(c,f,m){return s(this,c,f,m,!0)},l.prototype.removeListener=function(c,f,m,p){var v=r?r+c:c;if(!this._events[v])return this;if(!f)return o(this,v),this;var _=this._events[v];if(_.fn)_.fn===f&&(!p||_.once)&&(!m||_.context===m)&&o(this,v);else{for(var E=0,T=[],S=_.length;E<S;E++)(_[E].fn!==f||p&&!_[E].once||m&&_[E].context!==m)&&T.push(_[E]);T.length?this._events[v]=T.length===1?T[0]:T:o(this,v)}return this},l.prototype.removeAllListeners=function(c){var f;return c?(f=r?r+c:c,this._events[f]&&o(this,f)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,t.exports=l})(ZT);var XR=ZT.exports;const lh=Mf(XR);var Z0={exports:{}};Z0.exports=Kf;Z0.exports.default=Kf;function Kf(t,e,r){r=r||2;var n=e&&e.length,i=n?e[0]*r:t.length,s=JT(t,0,i,r,!0),o=[];if(!s||s.next===s.prev)return o;var l,h,c,f,m,p,v;if(n&&(s=ZR(t,e,s,r)),t.length>80*r){l=c=t[0],h=f=t[1];for(var _=r;_<i;_+=r)m=t[_],p=t[_+1],m<l&&(l=m),p<h&&(h=p),m>c&&(c=m),p>f&&(f=p);v=Math.max(c-l,f-h),v=v!==0?32767/v:0}return Xu(s,o,r,l,h,v,0),o}function JT(t,e,r,n,i){var s,o;if(i===tv(t,e,r,n)>0)for(s=e;s<r;s+=n)o=Ew(s,t[s],t[s+1],o);else for(s=r-n;s>=e;s-=n)o=Ew(s,t[s],t[s+1],o);return o&&qf(o,o.next)&&(Qu(o),o=o.next),o}function jo(t,e){if(!t)return t;e||(e=t);var r=t,n;do if(n=!1,!r.steiner&&(qf(r,r.next)||mt(r.prev,r,r.next)===0)){if(Qu(r),r=e=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==e);return e}function Xu(t,e,r,n,i,s,o){if(t){!o&&s&&nM(t,n,i,s);for(var l=t,h,c;t.prev!==t.next;){if(h=t.prev,c=t.next,s?QR(t,n,i,s):YR(t)){e.push(h.i/r|0),e.push(t.i/r|0),e.push(c.i/r|0),Qu(t),t=c.next,l=c.next;continue}if(t=c,t===l){o?o===1?(t=KR(jo(t),e,r),Xu(t,e,r,n,i,s,2)):o===2&&qR(t,e,r,n,i,s):Xu(jo(t),e,r,n,i,s,1);break}}}}function YR(t){var e=t.prev,r=t,n=t.next;if(mt(e,r,n)>=0)return!1;for(var i=e.x,s=r.x,o=n.x,l=e.y,h=r.y,c=n.y,f=i<s?i<o?i:o:s<o?s:o,m=l<h?l<c?l:c:h<c?h:c,p=i>s?i>o?i:o:s>o?s:o,v=l>h?l>c?l:c:h>c?h:c,_=n.next;_!==e;){if(_.x>=f&&_.x<=p&&_.y>=m&&_.y<=v&&Ua(i,l,s,h,o,c,_.x,_.y)&&mt(_.prev,_,_.next)>=0)return!1;_=_.next}return!0}function QR(t,e,r,n){var i=t.prev,s=t,o=t.next;if(mt(i,s,o)>=0)return!1;for(var l=i.x,h=s.x,c=o.x,f=i.y,m=s.y,p=o.y,v=l<h?l<c?l:c:h<c?h:c,_=f<m?f<p?f:p:m<p?m:p,E=l>h?l>c?l:c:h>c?h:c,T=f>m?f>p?f:p:m>p?m:p,S=Jy(v,_,e,r,n),b=Jy(E,T,e,r,n),x=t.prevZ,A=t.nextZ;x&&x.z>=S&&A&&A.z<=b;){if(x.x>=v&&x.x<=E&&x.y>=_&&x.y<=T&&x!==i&&x!==o&&Ua(l,f,h,m,c,p,x.x,x.y)&&mt(x.prev,x,x.next)>=0||(x=x.prevZ,A.x>=v&&A.x<=E&&A.y>=_&&A.y<=T&&A!==i&&A!==o&&Ua(l,f,h,m,c,p,A.x,A.y)&&mt(A.prev,A,A.next)>=0))return!1;A=A.nextZ}for(;x&&x.z>=S;){if(x.x>=v&&x.x<=E&&x.y>=_&&x.y<=T&&x!==i&&x!==o&&Ua(l,f,h,m,c,p,x.x,x.y)&&mt(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;A&&A.z<=b;){if(A.x>=v&&A.x<=E&&A.y>=_&&A.y<=T&&A!==i&&A!==o&&Ua(l,f,h,m,c,p,A.x,A.y)&&mt(A.prev,A,A.next)>=0)return!1;A=A.nextZ}return!0}function KR(t,e,r){var n=t;do{var i=n.prev,s=n.next.next;!qf(i,s)&&eA(i,n,n.next,s)&&Yu(i,s)&&Yu(s,i)&&(e.push(i.i/r|0),e.push(n.i/r|0),e.push(s.i/r|0),Qu(n),Qu(n.next),n=t=s),n=n.next}while(n!==t);return jo(n)}function qR(t,e,r,n,i,s){var o=t;do{for(var l=o.next.next;l!==o.prev;){if(o.i!==l.i&&oM(o,l)){var h=tA(o,l);o=jo(o,o.next),h=jo(h,h.next),Xu(o,e,r,n,i,s,0),Xu(h,e,r,n,i,s,0);return}l=l.next}o=o.next}while(o!==t)}function ZR(t,e,r,n){var i=[],s,o,l,h,c;for(s=0,o=e.length;s<o;s++)l=e[s]*n,h=s<o-1?e[s+1]*n:t.length,c=JT(t,l,h,n,!1),c===c.next&&(c.steiner=!0),i.push(sM(c));for(i.sort(JR),s=0;s<i.length;s++)r=eM(i[s],r);return r}function JR(t,e){return t.x-e.x}function eM(t,e){var r=tM(t,e);if(!r)return e;var n=tA(r,t);return jo(n,n.next),jo(r,r.next)}function tM(t,e){var r=e,n=t.x,i=t.y,s=-1/0,o;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var l=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(l<=n&&l>s&&(s=l,o=r.x<r.next.x?r:r.next,l===n))return o}r=r.next}while(r!==e);if(!o)return null;var h=o,c=o.x,f=o.y,m=1/0,p;r=o;do n>=r.x&&r.x>=c&&n!==r.x&&Ua(i<f?n:s,i,c,f,i<f?s:n,i,r.x,r.y)&&(p=Math.abs(i-r.y)/(n-r.x),Yu(r,t)&&(p<m||p===m&&(r.x>o.x||r.x===o.x&&rM(o,r)))&&(o=r,m=p)),r=r.next;while(r!==h);return o}function rM(t,e){return mt(t.prev,t,e.prev)<0&&mt(e.next,t,t.next)<0}function nM(t,e,r,n){var i=t;do i.z===0&&(i.z=Jy(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,iM(i)}function iM(t){var e,r,n,i,s,o,l,h,c=1;do{for(r=t,t=null,s=null,o=0;r;){for(o++,n=r,l=0,e=0;e<c&&(l++,n=n.nextZ,!!n);e++);for(h=c;l>0||h>0&&n;)l!==0&&(h===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,l--):(i=n,n=n.nextZ,h--),s?s.nextZ=i:t=i,i.prevZ=s,s=i;r=n}s.nextZ=null,c*=2}while(o>1);return t}function Jy(t,e,r,n,i){return t=(t-r)*i|0,e=(e-n)*i|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function sM(t){var e=t,r=t;do(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next;while(e!==t);return r}function Ua(t,e,r,n,i,s,o,l){return(i-o)*(e-l)>=(t-o)*(s-l)&&(t-o)*(n-l)>=(r-o)*(e-l)&&(r-o)*(s-l)>=(i-o)*(n-l)}function oM(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!aM(t,e)&&(Yu(t,e)&&Yu(e,t)&&lM(t,e)&&(mt(t.prev,t,e.prev)||mt(t,e.prev,e))||qf(t,e)&&mt(t.prev,t,t.next)>0&&mt(e.prev,e,e.next)>0)}function mt(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function qf(t,e){return t.x===e.x&&t.y===e.y}function eA(t,e,r,n){var i=Fc(mt(t,e,r)),s=Fc(mt(t,e,n)),o=Fc(mt(r,n,t)),l=Fc(mt(r,n,e));return!!(i!==s&&o!==l||i===0&&Oc(t,r,e)||s===0&&Oc(t,n,e)||o===0&&Oc(r,t,n)||l===0&&Oc(r,e,n))}function Oc(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function Fc(t){return t>0?1:t<0?-1:0}function aM(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&eA(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function Yu(t,e){return mt(t.prev,t,t.next)<0?mt(t,e,t.next)>=0&&mt(t,t.prev,e)>=0:mt(t,e,t.prev)<0||mt(t,t.next,e)<0}function lM(t,e){var r=t,n=!1,i=(t.x+e.x)/2,s=(t.y+e.y)/2;do r.y>s!=r.next.y>s&&r.next.y!==r.y&&i<(r.next.x-r.x)*(s-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==t);return n}function tA(t,e){var r=new ev(t.i,t.x,t.y),n=new ev(e.i,e.x,e.y),i=t.next,s=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,s.next=n,n.prev=s,n}function Ew(t,e,r,n){var i=new ev(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Qu(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function ev(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Kf.deviation=function(t,e,r,n){var i=e&&e.length,s=i?e[0]*r:t.length,o=Math.abs(tv(t,0,s,r));if(i)for(var l=0,h=e.length;l<h;l++){var c=e[l]*r,f=l<h-1?e[l+1]*r:t.length;o-=Math.abs(tv(t,c,f,r))}var m=0;for(l=0;l<n.length;l+=3){var p=n[l]*r,v=n[l+1]*r,_=n[l+2]*r;m+=Math.abs((t[p]-t[_])*(t[v+1]-t[p+1])-(t[p]-t[v])*(t[_+1]-t[p+1]))}return o===0&&m===0?0:Math.abs((m-o)/o)};function tv(t,e,r,n){for(var i=0,s=e,o=r-n;s<r;s+=n)i+=(t[o]-t[s])*(t[s+1]+t[o+1]),o=s;return i}Kf.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var s=0;s<t[i].length;s++)for(var o=0;o<e;o++)r.vertices.push(t[i][s][o]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r};var uM=Z0.exports;const hM=Mf(uM);var lf={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */lf.exports;(function(t,e){(function(r){var n=e&&!e.nodeType&&e,i=t&&!t.nodeType&&t,s=typeof pu=="object"&&pu;(s.global===s||s.window===s||s.self===s)&&(r=s);var o,l=2147483647,h=36,c=1,f=26,m=38,p=700,v=72,_=128,E="-",T=/^xn--/,S=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=h-c,R=Math.floor,L=String.fromCharCode,N;function D(O){throw new RangeError(x[O])}function q(O,H){for(var z=O.length,X=[];z--;)X[z]=H(O[z]);return X}function $(O,H){var z=O.split("@"),X="";z.length>1&&(X=z[0]+"@",O=z[1]),O=O.replace(b,".");var J=O.split("."),ve=q(J,H).join(".");return X+ve}function me(O){for(var H=[],z=0,X=O.length,J,ve;z<X;)J=O.charCodeAt(z++),J>=55296&&J<=56319&&z<X?(ve=O.charCodeAt(z++),(ve&64512)==56320?H.push(((J&1023)<<10)+(ve&1023)+65536):(H.push(J),z--)):H.push(J);return H}function ne(O){return q(O,function(H){var z="";return H>65535&&(H-=65536,z+=L(H>>>10&1023|55296),H=56320|H&1023),z+=L(H),z}).join("")}function B(O){return O-48<10?O-22:O-65<26?O-65:O-97<26?O-97:h}function K(O,H){return O+22+75*(O<26)-((H!=0)<<5)}function ie(O,H,z){var X=0;for(O=z?R(O/p):O>>1,O+=R(O/H);O>A*f>>1;X+=h)O=R(O/A);return R(X+(A+1)*O/(O+m))}function _e(O){var H=[],z=O.length,X,J=0,ve=_,le=v,Te,Ce,pe,P,ue,Ee,Re,Ke,je;for(Te=O.lastIndexOf(E),Te<0&&(Te=0),Ce=0;Ce<Te;++Ce)O.charCodeAt(Ce)>=128&&D("not-basic"),H.push(O.charCodeAt(Ce));for(pe=Te>0?Te+1:0;pe<z;){for(P=J,ue=1,Ee=h;pe>=z&&D("invalid-input"),Re=B(O.charCodeAt(pe++)),(Re>=h||Re>R((l-J)/ue))&&D("overflow"),J+=Re*ue,Ke=Ee<=le?c:Ee>=le+f?f:Ee-le,!(Re<Ke);Ee+=h)je=h-Ke,ue>R(l/je)&&D("overflow"),ue*=je;X=H.length+1,le=ie(J-P,X,P==0),R(J/X)>l-ve&&D("overflow"),ve+=R(J/X),J%=X,H.splice(J++,0,ve)}return ne(H)}function fe(O){var H,z,X,J,ve,le,Te,Ce,pe,P,ue,Ee=[],Re,Ke,je,vt;for(O=me(O),Re=O.length,H=_,z=0,ve=v,le=0;le<Re;++le)ue=O[le],ue<128&&Ee.push(L(ue));for(X=J=Ee.length,J&&Ee.push(E);X<Re;){for(Te=l,le=0;le<Re;++le)ue=O[le],ue>=H&&ue<Te&&(Te=ue);for(Ke=X+1,Te-H>R((l-z)/Ke)&&D("overflow"),z+=(Te-H)*Ke,H=Te,le=0;le<Re;++le)if(ue=O[le],ue<H&&++z>l&&D("overflow"),ue==H){for(Ce=z,pe=h;P=pe<=ve?c:pe>=ve+f?f:pe-ve,!(Ce<P);pe+=h)vt=Ce-P,je=h-P,Ee.push(L(K(P+vt%je,0))),Ce=R(vt/je);Ee.push(L(K(Ce,0))),ve=ie(z,Ke,X==J),z=0,++X}++z,++H}return Ee.join("")}function M(O){return $(O,function(H){return T.test(H)?_e(H.slice(4).toLowerCase()):H})}function W(O){return $(O,function(H){return S.test(H)?"xn--"+fe(H):H})}if(o={version:"1.4.1",ucs2:{decode:me,encode:ne},decode:_e,encode:fe,toASCII:W,toUnicode:M},n&&i)if(t.exports==n)i.exports=o;else for(N in o)o.hasOwnProperty(N)&&(n[N]=o[N]);else r.punycode=o})(pu)})(lf,lf.exports);var cM=lf.exports,gl=TypeError;const dM={},fM=Object.freeze(Object.defineProperty({__proto__:null,default:dM},Symbol.toStringTag,{value:"Module"})),pM=SS(fM);var J0=typeof Map=="function"&&Map.prototype,ig=Object.getOwnPropertyDescriptor&&J0?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,uf=J0&&ig&&typeof ig.get=="function"?ig.get:null,Sw=J0&&Map.prototype.forEach,e_=typeof Set=="function"&&Set.prototype,sg=Object.getOwnPropertyDescriptor&&e_?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,hf=e_&&sg&&typeof sg.get=="function"?sg.get:null,bw=e_&&Set.prototype.forEach,mM=typeof WeakMap=="function"&&WeakMap.prototype,bu=mM?WeakMap.prototype.has:null,gM=typeof WeakSet=="function"&&WeakSet.prototype,Tu=gM?WeakSet.prototype.has:null,yM=typeof WeakRef=="function"&&WeakRef.prototype,Tw=yM?WeakRef.prototype.deref:null,vM=Boolean.prototype.valueOf,_M=Object.prototype.toString,xM=Function.prototype.toString,wM=String.prototype.match,t_=String.prototype.slice,Ns=String.prototype.replace,EM=String.prototype.toUpperCase,Aw=String.prototype.toLowerCase,rA=RegExp.prototype.test,Cw=Array.prototype.concat,vi=Array.prototype.join,SM=Array.prototype.slice,Pw=Math.floor,rv=typeof BigInt=="function"?BigInt.prototype.valueOf:null,og=Object.getOwnPropertySymbols,nv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,hl=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Au=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hl||!0)?Symbol.toStringTag:null,nA=Object.prototype.propertyIsEnumerable,Iw=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Rw(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||rA.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-Pw(-t):Pw(t);if(n!==t){var i=String(n),s=t_.call(e,i.length+1);return Ns.call(i,r,"$&_")+"."+Ns.call(Ns.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ns.call(e,r,"$&_")}var iv=pM,Mw=iv.custom,kw=oA(Mw)?Mw:null,iA={__proto__:null,double:'"',single:"'"},bM={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},Zf=function t(e,r,n,i){var s=r||{};if($i(s,"quoteStyle")&&!$i(iA,s.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if($i(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=$i(s,"customInspect")?s.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if($i(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if($i(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=s.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return lA(e,s);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var h=String(e);return l?Rw(e,h):h}if(typeof e=="bigint"){var c=String(e)+"n";return l?Rw(e,c):c}var f=typeof s.depth>"u"?5:s.depth;if(typeof n>"u"&&(n=0),n>=f&&f>0&&typeof e=="object")return sv(e)?"[Array]":"[Object]";var m=HM(s,n);if(typeof i>"u")i=[];else if(aA(i,e)>=0)return"[Circular]";function p(B,K,ie){if(K&&(i=SM.call(i),i.push(K)),ie){var _e={depth:s.depth};return $i(s,"quoteStyle")&&(_e.quoteStyle=s.quoteStyle),t(B,_e,n+1,i)}return t(B,s,n+1,i)}if(typeof e=="function"&&!Nw(e)){var v=NM(e),_=Bc(e,p);return"[Function"+(v?": "+v:" (anonymous)")+"]"+(_.length>0?" { "+vi.call(_,", ")+" }":"")}if(oA(e)){var E=hl?Ns.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):nv.call(e);return typeof e=="object"&&!hl?Kl(E):E}if(UM(e)){for(var T="<"+Aw.call(String(e.nodeName)),S=e.attributes||[],b=0;b<S.length;b++)T+=" "+S[b].name+"="+sA(TM(S[b].value),"double",s);return T+=">",e.childNodes&&e.childNodes.length&&(T+="..."),T+="</"+Aw.call(String(e.nodeName))+">",T}if(sv(e)){if(e.length===0)return"[]";var x=Bc(e,p);return m&&!GM(x)?"["+ov(x,m)+"]":"[ "+vi.call(x,", ")+" ]"}if(CM(e)){var A=Bc(e,p);return!("cause"in Error.prototype)&&"cause"in e&&!nA.call(e,"cause")?"{ ["+String(e)+"] "+vi.call(Cw.call("[cause]: "+p(e.cause),A),", ")+" }":A.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+vi.call(A,", ")+" }"}if(typeof e=="object"&&o){if(kw&&typeof e[kw]=="function"&&iv)return iv(e,{depth:f-n});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(DM(e)){var R=[];return Sw&&Sw.call(e,function(B,K){R.push(p(K,e,!0)+" => "+p(B,e))}),Dw("Map",uf.call(e),R,m)}if(BM(e)){var L=[];return bw&&bw.call(e,function(B){L.push(p(B,e))}),Dw("Set",hf.call(e),L,m)}if(OM(e))return ag("WeakMap");if(LM(e))return ag("WeakSet");if(FM(e))return ag("WeakRef");if(IM(e))return Kl(p(Number(e)));if(MM(e))return Kl(p(rv.call(e)));if(RM(e))return Kl(vM.call(e));if(PM(e))return Kl(p(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof pu<"u"&&e===pu)return"{ [object globalThis] }";if(!AM(e)&&!Nw(e)){var N=Bc(e,p),D=Iw?Iw(e)===Object.prototype:e instanceof Object||e.constructor===Object,q=e instanceof Object?"":"null prototype",$=!D&&Au&&Object(e)===e&&Au in e?t_.call(eo(e),8,-1):q?"Object":"",me=D||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",ne=me+($||q?"["+vi.call(Cw.call([],$||[],q||[]),": ")+"] ":"");return N.length===0?ne+"{}":m?ne+"{"+ov(N,m)+"}":ne+"{ "+vi.call(N,", ")+" }"}return String(e)};function sA(t,e,r){var n=r.quoteStyle||e,i=iA[n];return i+t+i}function TM(t){return Ns.call(String(t),/"/g,"&quot;")}function Yo(t){return!Au||!(typeof t=="object"&&(Au in t||typeof t[Au]<"u"))}function sv(t){return eo(t)==="[object Array]"&&Yo(t)}function AM(t){return eo(t)==="[object Date]"&&Yo(t)}function Nw(t){return eo(t)==="[object RegExp]"&&Yo(t)}function CM(t){return eo(t)==="[object Error]"&&Yo(t)}function PM(t){return eo(t)==="[object String]"&&Yo(t)}function IM(t){return eo(t)==="[object Number]"&&Yo(t)}function RM(t){return eo(t)==="[object Boolean]"&&Yo(t)}function oA(t){if(hl)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!nv)return!1;try{return nv.call(t),!0}catch{}return!1}function MM(t){if(!t||typeof t!="object"||!rv)return!1;try{return rv.call(t),!0}catch{}return!1}var kM=Object.prototype.hasOwnProperty||function(t){return t in this};function $i(t,e){return kM.call(t,e)}function eo(t){return _M.call(t)}function NM(t){if(t.name)return t.name;var e=wM.call(xM.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function aA(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function DM(t){if(!uf||!t||typeof t!="object")return!1;try{uf.call(t);try{hf.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function OM(t){if(!bu||!t||typeof t!="object")return!1;try{bu.call(t,bu);try{Tu.call(t,Tu)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function FM(t){if(!Tw||!t||typeof t!="object")return!1;try{return Tw.call(t),!0}catch{}return!1}function BM(t){if(!hf||!t||typeof t!="object")return!1;try{hf.call(t);try{uf.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function LM(t){if(!Tu||!t||typeof t!="object")return!1;try{Tu.call(t,Tu);try{bu.call(t,bu)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function UM(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function lA(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return lA(t_.call(t,0,e.maxStringLength),e)+n}var i=bM[e.quoteStyle||"single"];i.lastIndex=0;var s=Ns.call(Ns.call(t,i,"\\$1"),/[\x00-\x1f]/g,zM);return sA(s,"single",e)}function zM(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+EM.call(e.toString(16))}function Kl(t){return"Object("+t+")"}function ag(t){return t+" { ? }"}function Dw(t,e,r,n){var i=n?ov(r,n):vi.call(r,", ");return t+" ("+e+") {"+i+"}"}function GM(t){for(var e=0;e<t.length;e++)if(aA(t[e],`
40
+ `+s.stack}return{value:t,source:e,stack:i,digest:null}}function Zm(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function Ly(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var HI=typeof WeakMap=="function"?WeakMap:Map;function lT(t,e,r){r=Ki(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){nf||(nf=!0,Yy=n),Ly(t,e)},r}function uT(t,e,r){r=Ki(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return n(i)},r.callback=function(){Ly(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){Ly(t,e),typeof n!="function"&&(Gs===null?Gs=new Set([this]):Gs.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function $x(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new HI;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(r)||(i.add(r),t=rR.bind(null,t,e,r),e.then(t,t))}function Wx(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Vx(t,e,r,n,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=Ki(-1,1),e.tag=2,zs(r,e,1))),r.lanes|=1),t)}var jI=os.ReactCurrentOwner,Fr=!1;function Er(t,e,r,n){e.child=t===null?Lb(e,null,r,n):ol(e,t.child,r,n)}function Xx(t,e,r,n,i){r=r.render;var s=e.ref;return Xa(e,i),n=k0(t,e,r,n,s,i),r=N0(),t!==null&&!Fr?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,rs(t,e,i)):(ht&&r&&x0(e),e.flags|=1,Er(t,e,n,i),e.child)}function Yx(t,e,r,n,i){if(t===null){var s=r.type;return typeof s=="function"&&!j0(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=s,hT(t,e,s,n,i)):(t=Sd(r.type,null,n,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var o=s.memoizedProps;if(r=r.compare,r=r!==null?r:Bu,r(o,n)&&t.ref===e.ref)return rs(t,e,i)}return e.flags|=1,t=js(s,n),t.ref=e.ref,t.return=e,e.child=t}function hT(t,e,r,n,i){if(t!==null){var s=t.memoizedProps;if(Bu(s,n)&&t.ref===e.ref)if(Fr=!1,e.pendingProps=n=s,(t.lanes&i)!==0)t.flags&131072&&(Fr=!0);else return e.lanes=t.lanes,rs(t,e,i)}return Uy(t,e,r,n,i)}function cT(t,e,r){var n=e.pendingProps,i=n.children,s=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},et(La,Kr),Kr|=r;else{if(!(r&1073741824))return t=s!==null?s.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,et(La,Kr),Kr|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:r,et(La,Kr),Kr|=n}else s!==null?(n=s.baseLanes|r,e.memoizedState=null):n=r,et(La,Kr),Kr|=n;return Er(t,e,i,r),e.child}function dT(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function Uy(t,e,r,n,i){var s=Ur(r)?Lo:gr.current;return s=il(e,s),Xa(e,i),r=k0(t,e,r,n,s,i),n=N0(),t!==null&&!Fr?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,rs(t,e,i)):(ht&&n&&x0(e),e.flags|=1,Er(t,e,r,i),e.child)}function Qx(t,e,r,n,i){if(Ur(r)){var s=!0;Xd(e)}else s=!1;if(Xa(e,i),e.stateNode===null)xd(t,e),aT(e,r,n),By(e,r,n,i),n=!0;else if(t===null){var o=e.stateNode,l=e.memoizedProps;o.props=l;var h=o.context,c=r.contextType;typeof c=="object"&&c!==null?c=Tn(c):(c=Ur(r)?Lo:gr.current,c=il(e,c));var f=r.getDerivedStateFromProps,m=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";m||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==n||h!==c)&&jx(e,o,n,c),Cs=!1;var p=e.memoizedState;o.state=p,Zd(e,n,o,i),h=e.memoizedState,l!==n||p!==h||Lr.current||Cs?(typeof f=="function"&&(Fy(e,r,f,n),h=e.memoizedState),(l=Cs||Hx(e,r,l,n,p,h,c))?(m||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=h),o.props=n,o.state=h,o.context=c,n=l):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,zb(t,e),l=e.memoizedProps,c=e.type===e.elementType?l:Un(e.type,l),o.props=c,m=e.pendingProps,p=o.context,h=r.contextType,typeof h=="object"&&h!==null?h=Tn(h):(h=Ur(r)?Lo:gr.current,h=il(e,h));var v=r.getDerivedStateFromProps;(f=typeof v=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==m||p!==h)&&jx(e,o,n,h),Cs=!1,p=e.memoizedState,o.state=p,Zd(e,n,o,i);var _=e.memoizedState;l!==m||p!==_||Lr.current||Cs?(typeof v=="function"&&(Fy(e,r,v,n),_=e.memoizedState),(c=Cs||Hx(e,r,c,n,p,_,h)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,_,h),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,_,h)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=_),o.props=n,o.state=_,o.context=h,n=c):(typeof o.componentDidUpdate!="function"||l===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),n=!1)}return zy(t,e,r,n,s,i)}function zy(t,e,r,n,i,s){dT(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return i&&Dx(e,r,!1),rs(t,e,s);n=e.stateNode,jI.current=e;var l=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=ol(e,t.child,null,s),e.child=ol(e,null,l,s)):Er(t,e,l,s),e.memoizedState=n.state,i&&Dx(e,r,!0),e.child}function fT(t){var e=t.stateNode;e.pendingContext?Nx(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Nx(t,e.context,!1),P0(t,e.containerInfo)}function Kx(t,e,r,n,i){return sl(),E0(i),e.flags|=256,Er(t,e,r,n),e.child}var Gy={dehydrated:null,treeContext:null,retryLane:0};function Hy(t){return{baseLanes:t,cachePool:null,transitions:null}}function pT(t,e,r){var n=e.pendingProps,i=pt.current,s=!1,o=(e.flags&128)!==0,l;if((l=o)||(l=t!==null&&t.memoizedState===null?!1:(i&2)!==0),l?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),et(pt,i&1),t===null)return Dy(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=n.children,t=n.fallback,s?(n=e.mode,s=e.child,o={mode:"hidden",children:o},!(n&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=jf(o,n,0,null),t=Do(t,n,r,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=Hy(r),e.memoizedState=Gy,t):F0(e,o));if(i=t.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return $I(t,e,o,n,l,i,r);if(s){s=n.fallback,o=e.mode,i=t.child,l=i.sibling;var h={mode:"hidden",children:n.children};return!(o&1)&&e.child!==i?(n=e.child,n.childLanes=0,n.pendingProps=h,e.deletions=null):(n=js(i,h),n.subtreeFlags=i.subtreeFlags&14680064),l!==null?s=js(l,s):(s=Do(s,o,r,null),s.flags|=2),s.return=e,n.return=e,n.sibling=s,e.child=n,n=s,s=e.child,o=t.child.memoizedState,o=o===null?Hy(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~r,e.memoizedState=Gy,n}return s=t.child,t=s.sibling,n=js(s,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function F0(t,e){return e=jf({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Pc(t,e,r,n){return n!==null&&E0(n),ol(e,t.child,null,r),t=F0(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function $I(t,e,r,n,i,s,o){if(r)return e.flags&256?(e.flags&=-257,n=Zm(Error(ee(422))),Pc(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=n.fallback,i=e.mode,n=jf({mode:"visible",children:n.children},i,0,null),s=Do(s,i,o,null),s.flags|=2,n.return=e,s.return=e,n.sibling=s,e.child=n,e.mode&1&&ol(e,t.child,null,o),e.child.memoizedState=Hy(o),e.memoizedState=Gy,s);if(!(e.mode&1))return Pc(t,e,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var l=n.dgst;return n=l,s=Error(ee(419)),n=Zm(s,n,void 0),Pc(t,e,o,n)}if(l=(o&t.childLanes)!==0,Fr||l){if(n=Qt,n!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,ts(t,i),Xn(n,t,i,-1))}return H0(),n=Zm(Error(ee(421))),Pc(t,e,o,n)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=nR.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,qr=Us(i.nextSibling),Zr=e,ht=!0,Gn=null,t!==null&&(yn[vn++]=Vi,yn[vn++]=Xi,yn[vn++]=Uo,Vi=t.id,Xi=t.overflow,Uo=e),e=F0(e,n.children),e.flags|=4096,e)}function qx(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Oy(t.return,e,r)}function Jm(t,e,r,n,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=r,s.tailMode=i)}function mT(t,e,r){var n=e.pendingProps,i=n.revealOrder,s=n.tail;if(Er(t,e,n.children,r),n=pt.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&qx(t,r,e);else if(t.tag===19)qx(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(et(pt,n),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&Jd(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),Jm(e,!1,i,r,s);break;case"backwards":for(r=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&Jd(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}Jm(e,!0,r,null,s);break;case"together":Jm(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function xd(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function rs(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),Go|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(ee(153));if(e.child!==null){for(t=e.child,r=js(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=js(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function WI(t,e,r){switch(e.tag){case 3:fT(e),sl();break;case 5:Gb(e);break;case 1:Ur(e.type)&&Xd(e);break;case 4:P0(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;et(Kd,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(et(pt,pt.current&1),e.flags|=128,null):r&e.child.childLanes?pT(t,e,r):(et(pt,pt.current&1),t=rs(t,e,r),t!==null?t.sibling:null);et(pt,pt.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return mT(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),et(pt,pt.current),n)break;return null;case 22:case 23:return e.lanes=0,cT(t,e,r)}return rs(t,e,r)}var gT,jy,yT,vT;gT=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};jy=function(){};yT=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,ko(Ti.current);var s=null;switch(r){case"input":i=cy(t,i),n=cy(t,n),s=[];break;case"select":i=yt({},i,{value:void 0}),n=yt({},n,{value:void 0}),s=[];break;case"textarea":i=py(t,i),n=py(t,n),s=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=Wd)}gy(r,n);var o;r=null;for(c in i)if(!n.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var l=i[c];for(o in l)l.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ru.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in n){var h=n[c];if(l=i!=null?i[c]:void 0,n.hasOwnProperty(c)&&h!==l&&(h!=null||l!=null))if(c==="style")if(l){for(o in l)!l.hasOwnProperty(o)||h&&h.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in h)h.hasOwnProperty(o)&&l[o]!==h[o]&&(r||(r={}),r[o]=h[o])}else r||(s||(s=[]),s.push(c,r)),r=h;else c==="dangerouslySetInnerHTML"?(h=h?h.__html:void 0,l=l?l.__html:void 0,h!=null&&l!==h&&(s=s||[]).push(c,h)):c==="children"?typeof h!="string"&&typeof h!="number"||(s=s||[]).push(c,""+h):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ru.hasOwnProperty(c)?(h!=null&&c==="onScroll"&&nt("scroll",t),s||l===h||(s=[])):(s=s||[]).push(c,h))}r&&(s=s||[]).push("style",r);var c=s;(e.updateQueue=c)&&(e.flags|=4)}};vT=function(t,e,r,n){r!==n&&(e.flags|=4)};function Yl(t,e){if(!ht)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function pr(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function VI(t,e,r){var n=e.pendingProps;switch(w0(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pr(e),null;case 1:return Ur(e.type)&&Vd(),pr(e),null;case 3:return n=e.stateNode,al(),st(Lr),st(gr),R0(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Ac(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Gn!==null&&(qy(Gn),Gn=null))),jy(t,e),pr(e),null;case 5:I0(e);var i=ko(Hu.current);if(r=e.type,t!==null&&e.stateNode!=null)yT(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(ee(166));return pr(e),null}if(t=ko(Ti.current),Ac(e)){n=e.stateNode,r=e.type;var s=e.memoizedProps;switch(n[_i]=e,n[zu]=s,t=(e.mode&1)!==0,r){case"dialog":nt("cancel",n),nt("close",n);break;case"iframe":case"object":case"embed":nt("load",n);break;case"video":case"audio":for(i=0;i<su.length;i++)nt(su[i],n);break;case"source":nt("error",n);break;case"img":case"image":case"link":nt("error",n),nt("load",n);break;case"details":nt("toggle",n);break;case"input":ox(n,s),nt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!s.multiple},nt("invalid",n);break;case"textarea":lx(n,s),nt("invalid",n)}gy(r,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="children"?typeof l=="string"?n.textContent!==l&&(s.suppressHydrationWarning!==!0&&Tc(n.textContent,l,t),i=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&Tc(n.textContent,l,t),i=["children",""+l]):Ru.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&nt("scroll",n)}switch(r){case"input":yc(n),ax(n,s,!0);break;case"textarea":yc(n),ux(n);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(n.onclick=Wd)}n=i,e.updateQueue=n,n!==null&&(e.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=VS(r)),t==="http://www.w3.org/1999/xhtml"?r==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[_i]=e,t[zu]=n,gT(t,e,!1,!1),e.stateNode=t;e:{switch(o=yy(r,n),r){case"dialog":nt("cancel",t),nt("close",t),i=n;break;case"iframe":case"object":case"embed":nt("load",t),i=n;break;case"video":case"audio":for(i=0;i<su.length;i++)nt(su[i],t);i=n;break;case"source":nt("error",t),i=n;break;case"img":case"image":case"link":nt("error",t),nt("load",t),i=n;break;case"details":nt("toggle",t),i=n;break;case"input":ox(t,n),i=cy(t,n),nt("invalid",t);break;case"option":i=n;break;case"select":t._wrapperState={wasMultiple:!!n.multiple},i=yt({},n,{value:void 0}),nt("invalid",t);break;case"textarea":lx(t,n),i=py(t,n),nt("invalid",t);break;default:i=n}gy(r,i),l=i;for(s in l)if(l.hasOwnProperty(s)){var h=l[s];s==="style"?QS(t,h):s==="dangerouslySetInnerHTML"?(h=h?h.__html:void 0,h!=null&&XS(t,h)):s==="children"?typeof h=="string"?(r!=="textarea"||h!=="")&&Mu(t,h):typeof h=="number"&&Mu(t,""+h):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Ru.hasOwnProperty(s)?h!=null&&s==="onScroll"&&nt("scroll",t):h!=null&&o0(t,s,h,o))}switch(r){case"input":yc(t),ax(t,n,!1);break;case"textarea":yc(t),ux(t);break;case"option":n.value!=null&&t.setAttribute("value",""+Ws(n.value));break;case"select":t.multiple=!!n.multiple,s=n.value,s!=null?ja(t,!!n.multiple,s,!1):n.defaultValue!=null&&ja(t,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=Wd)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return pr(e),null;case 6:if(t&&e.stateNode!=null)vT(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(ee(166));if(r=ko(Hu.current),ko(Ti.current),Ac(e)){if(n=e.stateNode,r=e.memoizedProps,n[_i]=e,(s=n.nodeValue!==r)&&(t=Zr,t!==null))switch(t.tag){case 3:Tc(n.nodeValue,r,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Tc(n.nodeValue,r,(t.mode&1)!==0)}s&&(e.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[_i]=e,e.stateNode=n}return pr(e),null;case 13:if(st(pt),n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(ht&&qr!==null&&e.mode&1&&!(e.flags&128))Fb(),sl(),e.flags|=98560,s=!1;else if(s=Ac(e),n!==null&&n.dehydrated!==null){if(t===null){if(!s)throw Error(ee(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(ee(317));s[_i]=e}else sl(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;pr(e),s=!1}else Gn!==null&&(qy(Gn),Gn=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=r,e):(n=n!==null,n!==(t!==null&&t.memoizedState!==null)&&n&&(e.child.flags|=8192,e.mode&1&&(t===null||pt.current&1?Ut===0&&(Ut=3):H0())),e.updateQueue!==null&&(e.flags|=4),pr(e),null);case 4:return al(),jy(t,e),t===null&&Lu(e.stateNode.containerInfo),pr(e),null;case 10:return T0(e.type._context),pr(e),null;case 17:return Ur(e.type)&&Vd(),pr(e),null;case 19:if(st(pt),s=e.memoizedState,s===null)return pr(e),null;if(n=(e.flags&128)!==0,o=s.rendering,o===null)if(n)Yl(s,!1);else{if(Ut!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=Jd(t),o!==null){for(e.flags|=128,Yl(s,!1),n=o.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=r,r=e.child;r!==null;)s=r,t=n,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,t=o.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return et(pt,pt.current&1|2),e.child}t=t.sibling}s.tail!==null&&Rt()>ul&&(e.flags|=128,n=!0,Yl(s,!1),e.lanes=4194304)}else{if(!n)if(t=Jd(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Yl(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ht)return pr(e),null}else 2*Rt()-s.renderingStartTime>ul&&r!==1073741824&&(e.flags|=128,n=!0,Yl(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(r=s.last,r!==null?r.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Rt(),e.sibling=null,r=pt.current,et(pt,n?r&1|2:r&1),e):(pr(e),null);case 22:case 23:return G0(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?Kr&1073741824&&(pr(e),e.subtreeFlags&6&&(e.flags|=8192)):pr(e),null;case 24:return null;case 25:return null}throw Error(ee(156,e.tag))}function XI(t,e){switch(w0(e),e.tag){case 1:return Ur(e.type)&&Vd(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return al(),st(Lr),st(gr),R0(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return I0(e),null;case 13:if(st(pt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ee(340));sl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return st(pt),null;case 4:return al(),null;case 10:return T0(e.type._context),null;case 22:case 23:return G0(),null;case 24:return null;default:return null}}var Ic=!1,mr=!1,YI=typeof WeakSet=="function"?WeakSet:Set,ye=null;function Ba(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){wt(t,e,n)}else r.current=null}function $y(t,e,r){try{r()}catch(n){wt(t,e,n)}}var Zx=!1;function QI(t,e){if(Cy=Hd,t=Sb(),_0(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var o=0,l=-1,h=-1,c=0,f=0,m=t,p=null;t:for(;;){for(var v;m!==r||i!==0&&m.nodeType!==3||(l=o+i),m!==s||n!==0&&m.nodeType!==3||(h=o+n),m.nodeType===3&&(o+=m.nodeValue.length),(v=m.firstChild)!==null;)p=m,m=v;for(;;){if(m===t)break t;if(p===r&&++c===i&&(l=o),p===s&&++f===n&&(h=o),(v=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=v}r=l===-1||h===-1?null:{start:l,end:h}}else r=null}r=r||{start:0,end:0}}else r=null;for(Py={focusedElem:t,selectionRange:r},Hd=!1,ye=e;ye!==null;)if(e=ye,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ye=t;else for(;ye!==null;){e=ye;try{var _=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(_!==null){var E=_.memoizedProps,T=_.memoizedState,S=e.stateNode,b=S.getSnapshotBeforeUpdate(e.elementType===e.type?E:Un(e.type,E),T);S.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=e.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ee(163))}}catch(A){wt(e,e.return,A)}if(t=e.sibling,t!==null){t.return=e.return,ye=t;break}ye=e.return}return _=Zx,Zx=!1,_}function wu(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&$y(e,r,s)}i=i.next}while(i!==n)}}function Gf(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Wy(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function _T(t){var e=t.alternate;e!==null&&(t.alternate=null,_T(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[_i],delete e[zu],delete e[My],delete e[MI],delete e[kI])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function xT(t){return t.tag===5||t.tag===3||t.tag===4}function Jx(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||xT(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Vy(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Wd));else if(n!==4&&(t=t.child,t!==null))for(Vy(t,e,r),t=t.sibling;t!==null;)Vy(t,e,r),t=t.sibling}function Xy(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(Xy(t,e,r),t=t.sibling;t!==null;)Xy(t,e,r),t=t.sibling}var rr=null,zn=!1;function xs(t,e,r){for(r=r.child;r!==null;)wT(t,e,r),r=r.sibling}function wT(t,e,r){if(bi&&typeof bi.onCommitFiberUnmount=="function")try{bi.onCommitFiberUnmount(Nf,r)}catch{}switch(r.tag){case 5:mr||Ba(r,e);case 6:var n=rr,i=zn;rr=null,xs(t,e,r),rr=n,zn=i,rr!==null&&(zn?(t=rr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):rr.removeChild(r.stateNode));break;case 18:rr!==null&&(zn?(t=rr,r=r.stateNode,t.nodeType===8?Vm(t.parentNode,r):t.nodeType===1&&Vm(t,r),Ou(t)):Vm(rr,r.stateNode));break;case 4:n=rr,i=zn,rr=r.stateNode.containerInfo,zn=!0,xs(t,e,r),rr=n,zn=i;break;case 0:case 11:case 14:case 15:if(!mr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&$y(r,e,o),i=i.next}while(i!==n)}xs(t,e,r);break;case 1:if(!mr&&(Ba(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){wt(r,e,l)}xs(t,e,r);break;case 21:xs(t,e,r);break;case 22:r.mode&1?(mr=(n=mr)||r.memoizedState!==null,xs(t,e,r),mr=n):xs(t,e,r);break;default:xs(t,e,r)}}function ew(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new YI),e.forEach(function(n){var i=iR.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Dn(t,e){var r=e.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var s=t,o=e,l=o;e:for(;l!==null;){switch(l.tag){case 5:rr=l.stateNode,zn=!1;break e;case 3:rr=l.stateNode.containerInfo,zn=!0;break e;case 4:rr=l.stateNode.containerInfo,zn=!0;break e}l=l.return}if(rr===null)throw Error(ee(160));wT(s,o,i),rr=null,zn=!1;var h=i.alternate;h!==null&&(h.return=null),i.return=null}catch(c){wt(i,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)ET(e,t),e=e.sibling}function ET(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Dn(e,t),li(t),n&4){try{wu(3,t,t.return),Gf(3,t)}catch(E){wt(t,t.return,E)}try{wu(5,t,t.return)}catch(E){wt(t,t.return,E)}}break;case 1:Dn(e,t),li(t),n&512&&r!==null&&Ba(r,r.return);break;case 5:if(Dn(e,t),li(t),n&512&&r!==null&&Ba(r,r.return),t.flags&32){var i=t.stateNode;try{Mu(i,"")}catch(E){wt(t,t.return,E)}}if(n&4&&(i=t.stateNode,i!=null)){var s=t.memoizedProps,o=r!==null?r.memoizedProps:s,l=t.type,h=t.updateQueue;if(t.updateQueue=null,h!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&$S(i,s),yy(l,o);var c=yy(l,s);for(o=0;o<h.length;o+=2){var f=h[o],m=h[o+1];f==="style"?QS(i,m):f==="dangerouslySetInnerHTML"?XS(i,m):f==="children"?Mu(i,m):o0(i,f,m,c)}switch(l){case"input":dy(i,s);break;case"textarea":WS(i,s);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var v=s.value;v!=null?ja(i,!!s.multiple,v,!1):p!==!!s.multiple&&(s.defaultValue!=null?ja(i,!!s.multiple,s.defaultValue,!0):ja(i,!!s.multiple,s.multiple?[]:"",!1))}i[zu]=s}catch(E){wt(t,t.return,E)}}break;case 6:if(Dn(e,t),li(t),n&4){if(t.stateNode===null)throw Error(ee(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(E){wt(t,t.return,E)}}break;case 3:if(Dn(e,t),li(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Ou(e.containerInfo)}catch(E){wt(t,t.return,E)}break;case 4:Dn(e,t),li(t);break;case 13:Dn(e,t),li(t),i=t.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(U0=Rt())),n&4&&ew(t);break;case 22:if(f=r!==null&&r.memoizedState!==null,t.mode&1?(mr=(c=mr)||f,Dn(e,t),mr=c):Dn(e,t),li(t),n&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!f&&t.mode&1)for(ye=t,f=t.child;f!==null;){for(m=ye=f;ye!==null;){switch(p=ye,v=p.child,p.tag){case 0:case 11:case 14:case 15:wu(4,p,p.return);break;case 1:Ba(p,p.return);var _=p.stateNode;if(typeof _.componentWillUnmount=="function"){n=p,r=p.return;try{e=n,_.props=e.memoizedProps,_.state=e.memoizedState,_.componentWillUnmount()}catch(E){wt(n,r,E)}}break;case 5:Ba(p,p.return);break;case 22:if(p.memoizedState!==null){rw(m);continue}}v!==null?(v.return=p,ye=v):rw(m)}f=f.sibling}e:for(f=null,m=t;;){if(m.tag===5){if(f===null){f=m;try{i=m.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=m.stateNode,h=m.memoizedProps.style,o=h!=null&&h.hasOwnProperty("display")?h.display:null,l.style.display=YS("display",o))}catch(E){wt(t,t.return,E)}}}else if(m.tag===6){if(f===null)try{m.stateNode.nodeValue=c?"":m.memoizedProps}catch(E){wt(t,t.return,E)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===t)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===t)break e;for(;m.sibling===null;){if(m.return===null||m.return===t)break e;f===m&&(f=null),m=m.return}f===m&&(f=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:Dn(e,t),li(t),n&4&&ew(t);break;case 21:break;default:Dn(e,t),li(t)}}function li(t){var e=t.flags;if(e&2){try{e:{for(var r=t.return;r!==null;){if(xT(r)){var n=r;break e}r=r.return}throw Error(ee(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(Mu(i,""),n.flags&=-33);var s=Jx(t);Xy(t,s,i);break;case 3:case 4:var o=n.stateNode.containerInfo,l=Jx(t);Vy(t,l,o);break;default:throw Error(ee(161))}}catch(h){wt(t,t.return,h)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function KI(t,e,r){ye=t,ST(t)}function ST(t,e,r){for(var n=(t.mode&1)!==0;ye!==null;){var i=ye,s=i.child;if(i.tag===22&&n){var o=i.memoizedState!==null||Ic;if(!o){var l=i.alternate,h=l!==null&&l.memoizedState!==null||mr;l=Ic;var c=mr;if(Ic=o,(mr=h)&&!c)for(ye=i;ye!==null;)o=ye,h=o.child,o.tag===22&&o.memoizedState!==null?nw(i):h!==null?(h.return=o,ye=h):nw(i);for(;s!==null;)ye=s,ST(s),s=s.sibling;ye=i,Ic=l,mr=c}tw(t)}else i.subtreeFlags&8772&&s!==null?(s.return=i,ye=s):tw(t)}}function tw(t){for(;ye!==null;){var e=ye;if(e.flags&8772){var r=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:mr||Gf(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!mr)if(r===null)n.componentDidMount();else{var i=e.elementType===e.type?r.memoizedProps:Un(e.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&Ux(e,s,n);break;case 3:var o=e.updateQueue;if(o!==null){if(r=null,e.child!==null)switch(e.child.tag){case 5:r=e.child.stateNode;break;case 1:r=e.child.stateNode}Ux(e,o,r)}break;case 5:var l=e.stateNode;if(r===null&&e.flags&4){r=l;var h=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":h.autoFocus&&r.focus();break;case"img":h.src&&(r.src=h.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var f=c.memoizedState;if(f!==null){var m=f.dehydrated;m!==null&&Ou(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ee(163))}mr||e.flags&512&&Wy(e)}catch(p){wt(e,e.return,p)}}if(e===t){ye=null;break}if(r=e.sibling,r!==null){r.return=e.return,ye=r;break}ye=e.return}}function rw(t){for(;ye!==null;){var e=ye;if(e===t){ye=null;break}var r=e.sibling;if(r!==null){r.return=e.return,ye=r;break}ye=e.return}}function nw(t){for(;ye!==null;){var e=ye;try{switch(e.tag){case 0:case 11:case 15:var r=e.return;try{Gf(4,e)}catch(h){wt(e,r,h)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var i=e.return;try{n.componentDidMount()}catch(h){wt(e,i,h)}}var s=e.return;try{Wy(e)}catch(h){wt(e,s,h)}break;case 5:var o=e.return;try{Wy(e)}catch(h){wt(e,o,h)}}}catch(h){wt(e,e.return,h)}if(e===t){ye=null;break}var l=e.sibling;if(l!==null){l.return=e.return,ye=l;break}ye=e.return}}var qI=Math.ceil,rf=os.ReactCurrentDispatcher,B0=os.ReactCurrentOwner,bn=os.ReactCurrentBatchConfig,$e=0,Qt=null,Nt=null,or=0,Kr=0,La=qs(0),Ut=0,Vu=null,Go=0,Hf=0,L0=0,Eu=null,Dr=null,U0=0,ul=1/0,ji=null,nf=!1,Yy=null,Gs=null,Rc=!1,ks=null,sf=0,Su=0,Qy=null,wd=-1,Ed=0;function br(){return $e&6?Rt():wd!==-1?wd:wd=Rt()}function Hs(t){return t.mode&1?$e&2&&or!==0?or&-or:DI.transition!==null?(Ed===0&&(Ed=ab()),Ed):(t=Ze,t!==0||(t=window.event,t=t===void 0?16:pb(t.type)),t):1}function Xn(t,e,r,n){if(50<Su)throw Su=0,Qy=null,Error(ee(185));nh(t,r,n),(!($e&2)||t!==Qt)&&(t===Qt&&(!($e&2)&&(Hf|=r),Ut===4&&Is(t,or)),zr(t,n),r===1&&$e===0&&!(e.mode&1)&&(ul=Rt()+500,Lf&&Zs()))}function zr(t,e){var r=t.callbackNode;DP(t,e);var n=Gd(t,t===Qt?or:0);if(n===0)r!==null&&dx(r),t.callbackNode=null,t.callbackPriority=0;else if(e=n&-n,t.callbackPriority!==e){if(r!=null&&dx(r),e===1)t.tag===0?NI(iw.bind(null,t)):Nb(iw.bind(null,t)),II(function(){!($e&6)&&Zs()}),r=null;else{switch(lb(n)){case 1:r=c0;break;case 4:r=sb;break;case 16:r=zd;break;case 536870912:r=ob;break;default:r=zd}r=MT(r,bT.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function bT(t,e){if(wd=-1,Ed=0,$e&6)throw Error(ee(327));var r=t.callbackNode;if(Ya()&&t.callbackNode!==r)return null;var n=Gd(t,t===Qt?or:0);if(n===0)return null;if(n&30||n&t.expiredLanes||e)e=of(t,n);else{e=n;var i=$e;$e|=2;var s=AT();(Qt!==t||or!==e)&&(ji=null,ul=Rt()+500,No(t,e));do try{eR();break}catch(l){TT(t,l)}while(!0);b0(),rf.current=s,$e=i,Nt!==null?e=0:(Qt=null,or=0,e=Ut)}if(e!==0){if(e===2&&(i=Ey(t),i!==0&&(n=i,e=Ky(t,i))),e===1)throw r=Vu,No(t,0),Is(t,n),zr(t,Rt()),r;if(e===6)Is(t,n);else{if(i=t.current.alternate,!(n&30)&&!ZI(i)&&(e=of(t,n),e===2&&(s=Ey(t),s!==0&&(n=s,e=Ky(t,s))),e===1))throw r=Vu,No(t,0),Is(t,n),zr(t,Rt()),r;switch(t.finishedWork=i,t.finishedLanes=n,e){case 0:case 1:throw Error(ee(345));case 2:wo(t,Dr,ji);break;case 3:if(Is(t,n),(n&130023424)===n&&(e=U0+500-Rt(),10<e)){if(Gd(t,0)!==0)break;if(i=t.suspendedLanes,(i&n)!==n){br(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=Ry(wo.bind(null,t,Dr,ji),e);break}wo(t,Dr,ji);break;case 4:if(Is(t,n),(n&4194240)===n)break;for(e=t.eventTimes,i=-1;0<n;){var o=31-Vn(n);s=1<<o,o=e[o],o>i&&(i=o),n&=~s}if(n=i,n=Rt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*qI(n/1960))-n,10<n){t.timeoutHandle=Ry(wo.bind(null,t,Dr,ji),n);break}wo(t,Dr,ji);break;case 5:wo(t,Dr,ji);break;default:throw Error(ee(329))}}}return zr(t,Rt()),t.callbackNode===r?bT.bind(null,t):null}function Ky(t,e){var r=Eu;return t.current.memoizedState.isDehydrated&&(No(t,e).flags|=256),t=of(t,e),t!==2&&(e=Dr,Dr=r,e!==null&&qy(e)),t}function qy(t){Dr===null?Dr=t:Dr.push.apply(Dr,t)}function ZI(t){for(var e=t;;){if(e.flags&16384){var r=e.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],s=i.getSnapshot;i=i.value;try{if(!Kn(s(),i))return!1}catch{return!1}}}if(r=e.child,e.subtreeFlags&16384&&r!==null)r.return=e,e=r;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Is(t,e){for(e&=~L0,e&=~Hf,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-Vn(e),n=1<<r;t[r]=-1,e&=~n}}function iw(t){if($e&6)throw Error(ee(327));Ya();var e=Gd(t,0);if(!(e&1))return zr(t,Rt()),null;var r=of(t,e);if(t.tag!==0&&r===2){var n=Ey(t);n!==0&&(e=n,r=Ky(t,n))}if(r===1)throw r=Vu,No(t,0),Is(t,e),zr(t,Rt()),r;if(r===6)throw Error(ee(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,wo(t,Dr,ji),zr(t,Rt()),null}function z0(t,e){var r=$e;$e|=1;try{return t(e)}finally{$e=r,$e===0&&(ul=Rt()+500,Lf&&Zs())}}function Ho(t){ks!==null&&ks.tag===0&&!($e&6)&&Ya();var e=$e;$e|=1;var r=bn.transition,n=Ze;try{if(bn.transition=null,Ze=1,t)return t()}finally{Ze=n,bn.transition=r,$e=e,!($e&6)&&Zs()}}function G0(){Kr=La.current,st(La)}function No(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,PI(r)),Nt!==null)for(r=Nt.return;r!==null;){var n=r;switch(w0(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Vd();break;case 3:al(),st(Lr),st(gr),R0();break;case 5:I0(n);break;case 4:al();break;case 13:st(pt);break;case 19:st(pt);break;case 10:T0(n.type._context);break;case 22:case 23:G0()}r=r.return}if(Qt=t,Nt=t=js(t.current,null),or=Kr=e,Ut=0,Vu=null,L0=Hf=Go=0,Dr=Eu=null,Mo!==null){for(e=0;e<Mo.length;e++)if(r=Mo[e],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,s=r.pending;if(s!==null){var o=s.next;s.next=i,n.next=o}r.pending=n}Mo=null}return t}function TT(t,e){do{var r=Nt;try{if(b0(),vd.current=tf,ef){for(var n=gt.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}ef=!1}if(zo=0,Vt=Lt=gt=null,xu=!1,ju=0,B0.current=null,r===null||r.return===null){Ut=1,Vu=e,Nt=null;break}e:{var s=t,o=r.return,l=r,h=e;if(e=or,l.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){var c=h,f=l,m=f.tag;if(!(f.mode&1)&&(m===0||m===11||m===15)){var p=f.alternate;p?(f.updateQueue=p.updateQueue,f.memoizedState=p.memoizedState,f.lanes=p.lanes):(f.updateQueue=null,f.memoizedState=null)}var v=Wx(o);if(v!==null){v.flags&=-257,Vx(v,o,l,s,e),v.mode&1&&$x(s,c,e),e=v,h=c;var _=e.updateQueue;if(_===null){var E=new Set;E.add(h),e.updateQueue=E}else _.add(h);break e}else{if(!(e&1)){$x(s,c,e),H0();break e}h=Error(ee(426))}}else if(ht&&l.mode&1){var T=Wx(o);if(T!==null){!(T.flags&65536)&&(T.flags|=256),Vx(T,o,l,s,e),E0(ll(h,l));break e}}s=h=ll(h,l),Ut!==4&&(Ut=2),Eu===null?Eu=[s]:Eu.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var S=lT(s,h,e);Lx(s,S);break e;case 1:l=h;var b=s.type,x=s.stateNode;if(!(s.flags&128)&&(typeof b.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Gs===null||!Gs.has(x)))){s.flags|=65536,e&=-e,s.lanes|=e;var A=uT(s,l,e);Lx(s,A);break e}}s=s.return}while(s!==null)}PT(r)}catch(R){e=R,Nt===r&&r!==null&&(Nt=r=r.return);continue}break}while(!0)}function AT(){var t=rf.current;return rf.current=tf,t===null?tf:t}function H0(){(Ut===0||Ut===3||Ut===2)&&(Ut=4),Qt===null||!(Go&268435455)&&!(Hf&268435455)||Is(Qt,or)}function of(t,e){var r=$e;$e|=2;var n=AT();(Qt!==t||or!==e)&&(ji=null,No(t,e));do try{JI();break}catch(i){TT(t,i)}while(!0);if(b0(),$e=r,rf.current=n,Nt!==null)throw Error(ee(261));return Qt=null,or=0,Ut}function JI(){for(;Nt!==null;)CT(Nt)}function eR(){for(;Nt!==null&&!TP();)CT(Nt)}function CT(t){var e=RT(t.alternate,t,Kr);t.memoizedProps=t.pendingProps,e===null?PT(t):Nt=e,B0.current=null}function PT(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&32768){if(r=XI(r,e),r!==null){r.flags&=32767,Nt=r;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Ut=6,Nt=null;return}}else if(r=VI(r,e,Kr),r!==null){Nt=r;return}if(e=e.sibling,e!==null){Nt=e;return}Nt=e=t}while(e!==null);Ut===0&&(Ut=5)}function wo(t,e,r){var n=Ze,i=bn.transition;try{bn.transition=null,Ze=1,tR(t,e,r,n)}finally{bn.transition=i,Ze=n}return null}function tR(t,e,r,n){do Ya();while(ks!==null);if($e&6)throw Error(ee(327));r=t.finishedWork;var i=t.finishedLanes;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(ee(177));t.callbackNode=null,t.callbackPriority=0;var s=r.lanes|r.childLanes;if(OP(t,s),t===Qt&&(Nt=Qt=null,or=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Rc||(Rc=!0,MT(zd,function(){return Ya(),null})),s=(r.flags&15990)!==0,r.subtreeFlags&15990||s){s=bn.transition,bn.transition=null;var o=Ze;Ze=1;var l=$e;$e|=4,B0.current=null,QI(t,r),ET(r,t),wI(Py),Hd=!!Cy,Py=Cy=null,t.current=r,KI(r),AP(),$e=l,Ze=o,bn.transition=s}else t.current=r;if(Rc&&(Rc=!1,ks=t,sf=i),s=t.pendingLanes,s===0&&(Gs=null),IP(r.stateNode),zr(t,Rt()),e!==null)for(n=t.onRecoverableError,r=0;r<e.length;r++)i=e[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(nf)throw nf=!1,t=Yy,Yy=null,t;return sf&1&&t.tag!==0&&Ya(),s=t.pendingLanes,s&1?t===Qy?Su++:(Su=0,Qy=t):Su=0,Zs(),null}function Ya(){if(ks!==null){var t=lb(sf),e=bn.transition,r=Ze;try{if(bn.transition=null,Ze=16>t?16:t,ks===null)var n=!1;else{if(t=ks,ks=null,sf=0,$e&6)throw Error(ee(331));var i=$e;for($e|=4,ye=t.current;ye!==null;){var s=ye,o=s.child;if(ye.flags&16){var l=s.deletions;if(l!==null){for(var h=0;h<l.length;h++){var c=l[h];for(ye=c;ye!==null;){var f=ye;switch(f.tag){case 0:case 11:case 15:wu(8,f,s)}var m=f.child;if(m!==null)m.return=f,ye=m;else for(;ye!==null;){f=ye;var p=f.sibling,v=f.return;if(_T(f),f===c){ye=null;break}if(p!==null){p.return=v,ye=p;break}ye=v}}}var _=s.alternate;if(_!==null){var E=_.child;if(E!==null){_.child=null;do{var T=E.sibling;E.sibling=null,E=T}while(E!==null)}}ye=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,ye=o;else e:for(;ye!==null;){if(s=ye,s.flags&2048)switch(s.tag){case 0:case 11:case 15:wu(9,s,s.return)}var S=s.sibling;if(S!==null){S.return=s.return,ye=S;break e}ye=s.return}}var b=t.current;for(ye=b;ye!==null;){o=ye;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,ye=x;else e:for(o=b;ye!==null;){if(l=ye,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Gf(9,l)}}catch(R){wt(l,l.return,R)}if(l===o){ye=null;break e}var A=l.sibling;if(A!==null){A.return=l.return,ye=A;break e}ye=l.return}}if($e=i,Zs(),bi&&typeof bi.onPostCommitFiberRoot=="function")try{bi.onPostCommitFiberRoot(Nf,t)}catch{}n=!0}return n}finally{Ze=r,bn.transition=e}}return!1}function sw(t,e,r){e=ll(r,e),e=lT(t,e,1),t=zs(t,e,1),e=br(),t!==null&&(nh(t,1,e),zr(t,e))}function wt(t,e,r){if(t.tag===3)sw(t,t,r);else for(;e!==null;){if(e.tag===3){sw(e,t,r);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Gs===null||!Gs.has(n))){t=ll(r,t),t=uT(e,t,1),e=zs(e,t,1),t=br(),e!==null&&(nh(e,1,t),zr(e,t));break}}e=e.return}}function rR(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=br(),t.pingedLanes|=t.suspendedLanes&r,Qt===t&&(or&r)===r&&(Ut===4||Ut===3&&(or&130023424)===or&&500>Rt()-U0?No(t,0):L0|=r),zr(t,e)}function IT(t,e){e===0&&(t.mode&1?(e=xc,xc<<=1,!(xc&130023424)&&(xc=4194304)):e=1);var r=br();t=ts(t,e),t!==null&&(nh(t,e,r),zr(t,r))}function nR(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),IT(t,r)}function iR(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(ee(314))}n!==null&&n.delete(e),IT(t,r)}var RT;RT=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||Lr.current)Fr=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Fr=!1,WI(t,e,r);Fr=!!(t.flags&131072)}else Fr=!1,ht&&e.flags&1048576&&Db(e,Qd,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;xd(t,e),t=e.pendingProps;var i=il(e,gr.current);Xa(e,r),i=k0(null,e,n,t,i,r);var s=N0();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Ur(n)?(s=!0,Xd(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,C0(e),i.updater=zf,e.stateNode=i,i._reactInternals=e,By(e,n,t,r),e=zy(null,e,n,!0,s,r)):(e.tag=0,ht&&s&&x0(e),Er(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(xd(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=oR(n),t=Un(n,t),i){case 0:e=Uy(null,e,n,t,r);break e;case 1:e=Qx(null,e,n,t,r);break e;case 11:e=Xx(null,e,n,t,r);break e;case 14:e=Yx(null,e,n,Un(n.type,t),r);break e}throw Error(ee(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Un(n,i),Uy(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Un(n,i),Qx(t,e,n,i,r);case 3:e:{if(fT(e),t===null)throw Error(ee(387));n=e.pendingProps,s=e.memoizedState,i=s.element,zb(t,e),Zd(e,n,null,r);var o=e.memoizedState;if(n=o.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=ll(Error(ee(423)),e),e=Kx(t,e,n,r,i);break e}else if(n!==i){i=ll(Error(ee(424)),e),e=Kx(t,e,n,r,i);break e}else for(qr=Us(e.stateNode.containerInfo.firstChild),Zr=e,ht=!0,Gn=null,r=Lb(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(sl(),n===i){e=rs(t,e,r);break e}Er(t,e,n,r)}e=e.child}return e;case 5:return Gb(e),t===null&&Dy(e),n=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,Iy(n,i)?o=null:s!==null&&Iy(n,s)&&(e.flags|=32),dT(t,e),Er(t,e,o,r),e.child;case 6:return t===null&&Dy(e),null;case 13:return pT(t,e,r);case 4:return P0(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=ol(e,null,n,r):Er(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Un(n,i),Xx(t,e,n,i,r);case 7:return Er(t,e,e.pendingProps,r),e.child;case 8:return Er(t,e,e.pendingProps.children,r),e.child;case 12:return Er(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,et(Kd,n._currentValue),n._currentValue=o,s!==null)if(Kn(s.value,o)){if(s.children===i.children&&!Lr.current){e=rs(t,e,r);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var h=l.firstContext;h!==null;){if(h.context===n){if(s.tag===1){h=Ki(-1,r&-r),h.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?h.next=h:(h.next=f.next,f.next=h),c.pending=h}}s.lanes|=r,h=s.alternate,h!==null&&(h.lanes|=r),Oy(s.return,r,e),l.lanes|=r;break}h=h.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(ee(341));o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),Oy(o,r,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Er(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,Xa(e,r),i=Tn(i),n=n(i),e.flags|=1,Er(t,e,n,r),e.child;case 14:return n=e.type,i=Un(n,e.pendingProps),i=Un(n.type,i),Yx(t,e,n,i,r);case 15:return hT(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Un(n,i),xd(t,e),e.tag=1,Ur(n)?(t=!0,Xd(e)):t=!1,Xa(e,r),aT(e,n,i),By(e,n,i,r),zy(null,e,n,!0,t,r);case 19:return mT(t,e,r);case 22:return cT(t,e,r)}throw Error(ee(156,e.tag))};function MT(t,e){return ib(t,e)}function sR(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xn(t,e,r,n){return new sR(t,e,r,n)}function j0(t){return t=t.prototype,!(!t||!t.isReactComponent)}function oR(t){if(typeof t=="function")return j0(t)?1:0;if(t!=null){if(t=t.$$typeof,t===l0)return 11;if(t===u0)return 14}return 2}function js(t,e){var r=t.alternate;return r===null?(r=xn(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Sd(t,e,r,n,i,s){var o=2;if(n=t,typeof t=="function")j0(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Pa:return Do(r.children,i,s,e);case a0:o=8,i|=8;break;case ay:return t=xn(12,r,e,i|2),t.elementType=ay,t.lanes=s,t;case ly:return t=xn(13,r,e,i),t.elementType=ly,t.lanes=s,t;case uy:return t=xn(19,r,e,i),t.elementType=uy,t.lanes=s,t;case GS:return jf(r,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case US:o=10;break e;case zS:o=9;break e;case l0:o=11;break e;case u0:o=14;break e;case As:o=16,n=null;break e}throw Error(ee(130,t==null?t:typeof t,""))}return e=xn(o,r,e,i),e.elementType=t,e.type=n,e.lanes=s,e}function Do(t,e,r,n){return t=xn(7,t,n,e),t.lanes=r,t}function jf(t,e,r,n){return t=xn(22,t,n,e),t.elementType=GS,t.lanes=r,t.stateNode={isHidden:!1},t}function eg(t,e,r){return t=xn(6,t,null,e),t.lanes=r,t}function tg(t,e,r){return e=xn(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function aR(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Om(0),this.expirationTimes=Om(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Om(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function $0(t,e,r,n,i,s,o,l,h){return t=new aR(t,e,r,l,h),e===1?(e=1,s===!0&&(e|=8)):e=0,s=xn(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},C0(s),t}function lR(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ca,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function kT(t){if(!t)return Vs;t=t._reactInternals;e:{if(Vo(t)!==t||t.tag!==1)throw Error(ee(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Ur(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(ee(171))}if(t.tag===1){var r=t.type;if(Ur(r))return kb(t,r,e)}return e}function NT(t,e,r,n,i,s,o,l,h){return t=$0(r,n,!0,t,i,s,o,l,h),t.context=kT(null),r=t.current,n=br(),i=Hs(r),s=Ki(n,i),s.callback=e??null,zs(r,s,i),t.current.lanes=i,nh(t,i,n),zr(t,n),t}function $f(t,e,r,n){var i=e.current,s=br(),o=Hs(i);return r=kT(r),e.context===null?e.context=r:e.pendingContext=r,e=Ki(s,o),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),t=zs(i,e,o),t!==null&&(Xn(t,i,o,s),yd(t,i,o)),o}function af(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function ow(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function W0(t,e){ow(t,e),(t=t.alternate)&&ow(t,e)}function uR(){return null}var DT=typeof reportError=="function"?reportError:function(t){console.error(t)};function V0(t){this._internalRoot=t}Wf.prototype.render=V0.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(ee(409));$f(t,e,null,null)};Wf.prototype.unmount=V0.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Ho(function(){$f(null,t,null,null)}),e[es]=null}};function Wf(t){this._internalRoot=t}Wf.prototype.unstable_scheduleHydration=function(t){if(t){var e=cb();t={blockedOn:null,target:t,priority:e};for(var r=0;r<Ps.length&&e!==0&&e<Ps[r].priority;r++);Ps.splice(r,0,t),r===0&&fb(t)}};function X0(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Vf(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function aw(){}function hR(t,e,r,n,i){if(i){if(typeof n=="function"){var s=n;n=function(){var c=af(o);s.call(c)}}var o=NT(e,n,t,0,null,!1,!1,"",aw);return t._reactRootContainer=o,t[es]=o.current,Lu(t.nodeType===8?t.parentNode:t),Ho(),o}for(;i=t.lastChild;)t.removeChild(i);if(typeof n=="function"){var l=n;n=function(){var c=af(h);l.call(c)}}var h=$0(t,0,!1,null,null,!1,!1,"",aw);return t._reactRootContainer=h,t[es]=h.current,Lu(t.nodeType===8?t.parentNode:t),Ho(function(){$f(e,h,r,n)}),h}function Xf(t,e,r,n,i){var s=r._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var l=i;i=function(){var h=af(o);l.call(h)}}$f(e,o,t,i)}else o=hR(r,e,t,i,n);return af(o)}ub=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var r=iu(e.pendingLanes);r!==0&&(d0(e,r|1),zr(e,Rt()),!($e&6)&&(ul=Rt()+500,Zs()))}break;case 13:Ho(function(){var n=ts(t,1);if(n!==null){var i=br();Xn(n,t,1,i)}}),W0(t,1)}};f0=function(t){if(t.tag===13){var e=ts(t,134217728);if(e!==null){var r=br();Xn(e,t,134217728,r)}W0(t,134217728)}};hb=function(t){if(t.tag===13){var e=Hs(t),r=ts(t,e);if(r!==null){var n=br();Xn(r,t,e,n)}W0(t,e)}};cb=function(){return Ze};db=function(t,e){var r=Ze;try{return Ze=t,e()}finally{Ze=r}};_y=function(t,e,r){switch(e){case"input":if(dy(t,r),e=r.name,r.type==="radio"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var i=Bf(n);if(!i)throw Error(ee(90));jS(n),dy(n,i)}}}break;case"textarea":WS(t,r);break;case"select":e=r.value,e!=null&&ja(t,!!r.multiple,e,!1)}};ZS=z0;JS=Ho;var cR={usingClientEntryPoint:!1,Events:[sh,ka,Bf,KS,qS,z0]},Ql={findFiberByHostInstance:Ro,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},dR={bundleType:Ql.bundleType,version:Ql.version,rendererPackageName:Ql.rendererPackageName,rendererConfig:Ql.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:os.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=rb(t),t===null?null:t.stateNode},findFiberByHostInstance:Ql.findFiberByHostInstance||uR,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Mc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Mc.isDisabled&&Mc.supportsFiber)try{Nf=Mc.inject(dR),bi=Mc}catch{}}tn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cR;tn.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!X0(e))throw Error(ee(200));return lR(t,e,null,r)};tn.createRoot=function(t,e){if(!X0(t))throw Error(ee(299));var r=!1,n="",i=DT;return e!=null&&(e.unstable_strictMode===!0&&(r=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=$0(t,1,!1,null,null,r,!1,n,i),t[es]=e.current,Lu(t.nodeType===8?t.parentNode:t),new V0(e)};tn.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(ee(188)):(t=Object.keys(t).join(","),Error(ee(268,t)));return t=rb(e),t=t===null?null:t.stateNode,t};tn.flushSync=function(t){return Ho(t)};tn.hydrate=function(t,e,r){if(!Vf(e))throw Error(ee(200));return Xf(null,t,e,!0,r)};tn.hydrateRoot=function(t,e,r){if(!X0(t))throw Error(ee(405));var n=r!=null&&r.hydratedSources||null,i=!1,s="",o=DT;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(s=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),e=NT(e,null,t,1,r??null,i,!1,s,o),t[es]=e.current,Lu(t),n)for(t=0;t<n.length;t++)r=n[t],i=r._getVersion,i=i(r._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[r,i]:e.mutableSourceEagerHydrationData.push(r,i);return new Wf(e)};tn.render=function(t,e,r){if(!Vf(e))throw Error(ee(200));return Xf(null,t,e,!1,r)};tn.unmountComponentAtNode=function(t){if(!Vf(t))throw Error(ee(40));return t._reactRootContainer?(Ho(function(){Xf(null,null,t,!1,function(){t._reactRootContainer=null,t[es]=null})}),!0):!1};tn.unstable_batchedUpdates=z0;tn.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!Vf(r))throw Error(ee(200));if(t==null||t._reactInternals===void 0)throw Error(ee(38));return Xf(t,e,r,!1,n)};tn.version="18.3.1-next-f1338f8080-20240426";function OT(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(OT)}catch(t){console.error(t)}}OT(),OS.exports=tn;var fR=OS.exports,lw=fR;sy.createRoot=lw.createRoot,sy.hydrateRoot=lw.hydrateRoot;var Yf={},FT={exports:{}},pR="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",mR=pR,gR=mR;function BT(){}function LT(){}LT.resetWarningCache=BT;var yR=function(){function t(n,i,s,o,l,h){if(h!==gR){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:LT,resetWarningCache:BT};return r.PropTypes=r,r};FT.exports=yR();var Y0=FT.exports;const it=Mf(Y0);var UT={L:1,M:0,Q:3,H:2},zT={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},vR=zT;function GT(t){this.mode=vR.MODE_8BIT_BYTE,this.data=t}GT.prototype={getLength:function(t){return this.data.length},write:function(t){for(var e=0;e<this.data.length;e++)t.put(this.data.charCodeAt(e),8)}};var _R=GT,kc=UT;function xi(t,e){this.totalCount=t,this.dataCount=e}xi.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];xi.getRSBlocks=function(t,e){var r=xi.getRsBlockTable(t,e);if(r==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var n=r.length/3,i=new Array,s=0;s<n;s++)for(var o=r[s*3+0],l=r[s*3+1],h=r[s*3+2],c=0;c<o;c++)i.push(new xi(l,h));return i};xi.getRsBlockTable=function(t,e){switch(e){case kc.L:return xi.RS_BLOCK_TABLE[(t-1)*4+0];case kc.M:return xi.RS_BLOCK_TABLE[(t-1)*4+1];case kc.Q:return xi.RS_BLOCK_TABLE[(t-1)*4+2];case kc.H:return xi.RS_BLOCK_TABLE[(t-1)*4+3];default:return}};var xR=xi;function HT(){this.buffer=new Array,this.length=0}HT.prototype={get:function(t){var e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)==1},put:function(t,e){for(var r=0;r<e;r++)this.putBit((t>>>e-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var wR=HT,Hn={glog:function(t){if(t<1)throw new Error("glog("+t+")");return Hn.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return Hn.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(var ir=0;ir<8;ir++)Hn.EXP_TABLE[ir]=1<<ir;for(var ir=8;ir<256;ir++)Hn.EXP_TABLE[ir]=Hn.EXP_TABLE[ir-4]^Hn.EXP_TABLE[ir-5]^Hn.EXP_TABLE[ir-6]^Hn.EXP_TABLE[ir-8];for(var ir=0;ir<255;ir++)Hn.LOG_TABLE[Hn.EXP_TABLE[ir]]=ir;var jT=Hn,go=jT;function bd(t,e){if(t.length==null)throw new Error(t.length+"/"+e);for(var r=0;r<t.length&&t[r]==0;)r++;this.num=new Array(t.length-r+e);for(var n=0;n<t.length-r;n++)this.num[n]=t[n+r]}bd.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),r=0;r<this.getLength();r++)for(var n=0;n<t.getLength();n++)e[r+n]^=go.gexp(go.glog(this.get(r))+go.glog(t.get(n)));return new bd(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=go.glog(this.get(0))-go.glog(t.get(0)),r=new Array(this.getLength()),n=0;n<this.getLength();n++)r[n]=this.get(n);for(var n=0;n<t.getLength();n++)r[n]^=go.gexp(go.glog(t.get(n))+e);return new bd(r,0).mod(t)}};var $T=bd,pn=zT,uw=$T,ER=jT,ws={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},er={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;er.getBCHDigit(e)-er.getBCHDigit(er.G15)>=0;)e^=er.G15<<er.getBCHDigit(e)-er.getBCHDigit(er.G15);return(t<<10|e)^er.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;er.getBCHDigit(e)-er.getBCHDigit(er.G18)>=0;)e^=er.G18<<er.getBCHDigit(e)-er.getBCHDigit(er.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;t!=0;)e++,t>>>=1;return e},getPatternPosition:function(t){return er.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case ws.PATTERN000:return(e+r)%2==0;case ws.PATTERN001:return e%2==0;case ws.PATTERN010:return r%3==0;case ws.PATTERN011:return(e+r)%3==0;case ws.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case ws.PATTERN101:return e*r%2+e*r%3==0;case ws.PATTERN110:return(e*r%2+e*r%3)%2==0;case ws.PATTERN111:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new uw([1],0),r=0;r<t;r++)e=e.multiply(new uw([1,ER.gexp(r)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case pn.MODE_NUMBER:return 10;case pn.MODE_ALPHA_NUM:return 9;case pn.MODE_8BIT_BYTE:return 8;case pn.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case pn.MODE_NUMBER:return 12;case pn.MODE_ALPHA_NUM:return 11;case pn.MODE_8BIT_BYTE:return 16;case pn.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else if(e<41)switch(t){case pn.MODE_NUMBER:return 14;case pn.MODE_ALPHA_NUM:return 13;case pn.MODE_8BIT_BYTE:return 16;case pn.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}else throw new Error("type:"+e)},getLostPoint:function(t){for(var e=t.getModuleCount(),r=0,n=0;n<e;n++)for(var i=0;i<e;i++){for(var s=0,o=t.isDark(n,i),l=-1;l<=1;l++)if(!(n+l<0||e<=n+l))for(var h=-1;h<=1;h++)i+h<0||e<=i+h||l==0&&h==0||o==t.isDark(n+l,i+h)&&s++;s>5&&(r+=3+s-5)}for(var n=0;n<e-1;n++)for(var i=0;i<e-1;i++){var c=0;t.isDark(n,i)&&c++,t.isDark(n+1,i)&&c++,t.isDark(n,i+1)&&c++,t.isDark(n+1,i+1)&&c++,(c==0||c==4)&&(r+=3)}for(var n=0;n<e;n++)for(var i=0;i<e-6;i++)t.isDark(n,i)&&!t.isDark(n,i+1)&&t.isDark(n,i+2)&&t.isDark(n,i+3)&&t.isDark(n,i+4)&&!t.isDark(n,i+5)&&t.isDark(n,i+6)&&(r+=40);for(var i=0;i<e;i++)for(var n=0;n<e-6;n++)t.isDark(n,i)&&!t.isDark(n+1,i)&&t.isDark(n+2,i)&&t.isDark(n+3,i)&&t.isDark(n+4,i)&&!t.isDark(n+5,i)&&t.isDark(n+6,i)&&(r+=40);for(var f=0,i=0;i<e;i++)for(var n=0;n<e;n++)t.isDark(n,i)&&f++;var m=Math.abs(100*f/e/e-50)/5;return r+=m*10,r}},SR=er,bR=_R,WT=xR,VT=wR,Js=SR,TR=$T;function wi(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var nn=wi.prototype;nn.addData=function(t){var e=new bR(t);this.dataList.push(e),this.dataCache=null};nn.isDark=function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]};nn.getModuleCount=function(){return this.moduleCount};nn.make=function(){if(this.typeNumber<1){var t=1;for(t=1;t<40;t++){for(var e=WT.getRSBlocks(t,this.errorCorrectLevel),r=new VT,n=0,i=0;i<e.length;i++)n+=e[i].dataCount;for(var i=0;i<this.dataList.length;i++){var s=this.dataList[i];r.put(s.mode,4),r.put(s.getLength(),Js.getLengthInBits(s.mode,t)),s.write(r)}if(r.getLengthInBits()<=n*8)break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())};nn.makeImpl=function(t,e){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++)this.modules[r][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),this.dataCache==null&&(this.dataCache=wi.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)};nn.setupPositionProbePattern=function(t,e){for(var r=-1;r<=7;r++)if(!(t+r<=-1||this.moduleCount<=t+r))for(var n=-1;n<=7;n++)e+n<=-1||this.moduleCount<=e+n||(0<=r&&r<=6&&(n==0||n==6)||0<=n&&n<=6&&(r==0||r==6)||2<=r&&r<=4&&2<=n&&n<=4?this.modules[t+r][e+n]=!0:this.modules[t+r][e+n]=!1)};nn.getBestMaskPattern=function(){for(var t=0,e=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=Js.getLostPoint(this);(r==0||t>n)&&(t=n,e=r)}return e};nn.createMovieClip=function(t,e,r){var n=t.createEmptyMovieClip(e,r),i=1;this.make();for(var s=0;s<this.modules.length;s++)for(var o=s*i,l=0;l<this.modules[s].length;l++){var h=l*i,c=this.modules[s][l];c&&(n.beginFill(0,100),n.moveTo(h,o),n.lineTo(h+i,o),n.lineTo(h+i,o+i),n.lineTo(h,o+i),n.endFill())}return n};nn.setupTimingPattern=function(){for(var t=8;t<this.moduleCount-8;t++)this.modules[t][6]==null&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)this.modules[6][e]==null&&(this.modules[6][e]=e%2==0)};nn.setupPositionAdjustPattern=function(){for(var t=Js.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var r=0;r<t.length;r++){var n=t[e],i=t[r];if(this.modules[n][i]==null)for(var s=-2;s<=2;s++)for(var o=-2;o<=2;o++)s==-2||s==2||o==-2||o==2||s==0&&o==0?this.modules[n+s][i+o]=!0:this.modules[n+s][i+o]=!1}};nn.setupTypeNumber=function(t){for(var e=Js.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var n=!t&&(e>>r&1)==1;this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(var r=0;r<18;r++){var n=!t&&(e>>r&1)==1;this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}};nn.setupTypeInfo=function(t,e){for(var r=this.errorCorrectLevel<<3|e,n=Js.getBCHTypeInfo(r),i=0;i<15;i++){var s=!t&&(n>>i&1)==1;i<6?this.modules[i][8]=s:i<8?this.modules[i+1][8]=s:this.modules[this.moduleCount-15+i][8]=s}for(var i=0;i<15;i++){var s=!t&&(n>>i&1)==1;i<8?this.modules[8][this.moduleCount-i-1]=s:i<9?this.modules[8][15-i-1+1]=s:this.modules[8][15-i-1]=s}this.modules[this.moduleCount-8][8]=!t};nn.mapData=function(t,e){for(var r=-1,n=this.moduleCount-1,i=7,s=0,o=this.moduleCount-1;o>0;o-=2)for(o==6&&o--;;){for(var l=0;l<2;l++)if(this.modules[n][o-l]==null){var h=!1;s<t.length&&(h=(t[s]>>>i&1)==1);var c=Js.getMask(e,n,o-l);c&&(h=!h),this.modules[n][o-l]=h,i--,i==-1&&(s++,i=7)}if(n+=r,n<0||this.moduleCount<=n){n-=r,r=-r;break}}};wi.PAD0=236;wi.PAD1=17;wi.createData=function(t,e,r){for(var n=WT.getRSBlocks(t,e),i=new VT,s=0;s<r.length;s++){var o=r[s];i.put(o.mode,4),i.put(o.getLength(),Js.getLengthInBits(o.mode,t)),o.write(i)}for(var l=0,s=0;s<n.length;s++)l+=n[s].dataCount;if(i.getLengthInBits()>l*8)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+l*8+")");for(i.getLengthInBits()+4<=l*8&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=l*8||(i.put(wi.PAD0,8),i.getLengthInBits()>=l*8));)i.put(wi.PAD1,8);return wi.createBytes(i,n)};wi.createBytes=function(t,e){for(var r=0,n=0,i=0,s=new Array(e.length),o=new Array(e.length),l=0;l<e.length;l++){var h=e[l].dataCount,c=e[l].totalCount-h;n=Math.max(n,h),i=Math.max(i,c),s[l]=new Array(h);for(var f=0;f<s[l].length;f++)s[l][f]=255&t.buffer[f+r];r+=h;var m=Js.getErrorCorrectPolynomial(c),p=new TR(s[l],m.getLength()-1),v=p.mod(m);o[l]=new Array(m.getLength()-1);for(var f=0;f<o[l].length;f++){var _=f+v.getLength()-o[l].length;o[l][f]=_>=0?v.get(_):0}}for(var E=0,f=0;f<e.length;f++)E+=e[f].totalCount;for(var T=new Array(E),S=0,f=0;f<n;f++)for(var l=0;l<e.length;l++)f<s[l].length&&(T[S++]=s[l][f]);for(var f=0;f<i;f++)for(var l=0;l<e.length;l++)f<o[l].length&&(T[S++]=o[l][f]);return T};var AR=wi,Q0={};Object.defineProperty(Q0,"__esModule",{value:!0});var CR=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},PR=Y0,mn=YT(PR),XT=Ce,Nc=YT(XT);function YT(t){return t&&t.__esModule?t:{default:t}}function IR(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}var RR={bgColor:mn.default.oneOfType([mn.default.object,mn.default.string]).isRequired,bgD:mn.default.string.isRequired,fgColor:mn.default.oneOfType([mn.default.object,mn.default.string]).isRequired,fgD:mn.default.string.isRequired,size:mn.default.number.isRequired,title:mn.default.string,viewBoxSize:mn.default.number.isRequired,xmlns:mn.default.string},K0=(0,XT.forwardRef)(function(t,e){var r=t.bgColor,n=t.bgD,i=t.fgD,s=t.fgColor,o=t.size,l=t.title,h=t.viewBoxSize,c=t.xmlns,f=c===void 0?"http://www.w3.org/2000/svg":c,m=IR(t,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return Nc.default.createElement("svg",CR({},m,{height:o,ref:e,viewBox:"0 0 "+h+" "+h,width:o,xmlns:f}),l?Nc.default.createElement("title",null,l):null,Nc.default.createElement("path",{d:n,fill:r}),Nc.default.createElement("path",{d:i,fill:s}))});K0.displayName="QRCodeSvg";K0.propTypes=RR;Q0.default=K0;Object.defineProperty(Yf,"__esModule",{value:!0});Yf.QRCode=void 0;var MR=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},kR=Y0,Li=ah(kR),NR=UT,DR=ah(NR),OR=AR,FR=ah(OR),QT=Ce,BR=ah(QT),LR=Q0,UR=ah(LR);function ah(t){return t&&t.__esModule?t:{default:t}}function zR(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}var GR={bgColor:Li.default.oneOfType([Li.default.object,Li.default.string]),fgColor:Li.default.oneOfType([Li.default.object,Li.default.string]),level:Li.default.string,size:Li.default.number,value:Li.default.string.isRequired},Qf=(0,QT.forwardRef)(function(t,e){var r=t.bgColor,n=r===void 0?"#FFFFFF":r,i=t.fgColor,s=i===void 0?"#000000":i,o=t.level,l=o===void 0?"L":o,h=t.size,c=h===void 0?256:h,f=t.value,m=zR(t,["bgColor","fgColor","level","size","value"]),p=new FR.default(-1,DR.default[l]);p.addData(f),p.make();var v=p.modules;return BR.default.createElement(UR.default,MR({},m,{bgColor:n,bgD:v.map(function(_,E){return _.map(function(T,S){return T?"":"M "+S+" "+E+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:s,fgD:v.map(function(_,E){return _.map(function(T,S){return T?"M "+S+" "+E+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:e,size:c,viewBoxSize:v.length}))});Yf.QRCode=Qf;Qf.displayName="QRCode";Qf.propTypes=GR;var HR=Yf.default=Qf;const jR=({selectedAgent:t})=>U.jsxs("div",{className:"data-panel",children:[U.jsx("div",{className:"gamish-panel-title",children:U.jsx("span",{children:"AGENT PROFILE"})}),t?U.jsxs("div",{className:"flex flex-col gap-4",children:[U.jsxs("div",{className:"flex gap-3 items-center",children:[U.jsx("div",{className:"w-10 h-10 bg-slate-900 border-2 border-slate-600 rounded flex items-center justify-center",children:U.jsx("span",{className:"text-xl",children:"👾"})}),U.jsxs("div",{className:"flex flex-col",children:[U.jsx("span",{className:"text-primary font-bold text-xs uppercase tracking-wider",children:t.alias||t.name||"Unknown Agent"}),U.jsx("span",{className:"text-[9px] text-slate-400 uppercase",children:t.role||"Operative"})]})]}),U.jsxs("div",{className:"agent-stats",children:[U.jsxs("div",{className:"stat-box",children:[U.jsx("span",{className:"stat-label",children:"Model"}),U.jsx("span",{className:"stat-value truncate block",children:t.model||"N/A"})]}),U.jsxs("div",{className:"stat-box",children:[U.jsx("span",{className:"stat-label",children:"Status"}),U.jsx("span",{className:`stat-value uppercase ${t.status==="working"?"text-amber-400":"text-slate-400"}`,children:t.status||"IDLE"})]}),U.jsxs("div",{className:"stat-box col-span-2",children:[U.jsx("span",{className:"stat-label",children:"Provider"}),U.jsx("span",{className:"stat-value",children:t.provider||"Unknown"})]})]}),t.sessionId&&U.jsxs("div",{className:"border-t border-slate-700 pt-2",children:[U.jsx("span",{className:"stat-label mb-1",children:"Assigned Session"}),U.jsx("div",{className:"text-[9px] font-mono text-emerald-400/80 bg-emerald-950/30 p-1.5 rounded border border-emerald-900/50 truncate",children:t.sessionId})]}),t.lastMessageSnippet&&U.jsxs("div",{className:"bg-slate-900/50 p-2 rounded border border-slate-700/50",children:[U.jsx("span",{className:"stat-label mb-1 text-slate-500",children:"Last Transmission"}),U.jsxs("p",{className:"text-[9px] text-slate-300 italic",children:['"',t.lastMessageSnippet.slice(0,100),t.lastMessageSnippet.length>100?"...":"",'"']})]})]}):U.jsxs("div",{className:"flex flex-col items-center justify-center py-6 text-slate-600 gap-2",children:[U.jsx("span",{className:"text-2xl opacity-20",children:"?"}),U.jsx("span",{className:"text-[9px] uppercase",children:"Select an agent"})]})]});var KT={exports:{}},Xo=(t=>(t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2",t))(Xo||{}),qT=(t=>(t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS",t))(qT||{}),Zy=(t=>(t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL",t))(Zy||{}),Re=(t=>(t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR",t))(Re||{}),$n=(t=>(t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN",t))($n||{}),ne=(t=>(t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL",t))(ne||{}),Qa=(t=>(t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",t))(Qa||{}),Ae=(t=>(t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT",t))(Ae||{}),de=(t=>(t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT",t))(de||{}),wn=(t=>(t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR",t))(wn||{}),qi=(t=>(t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",t))(qi||{}),Pi=(t=>(t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL",t))(Pi||{}),Br=(t=>(t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",t))(Br||{}),yi=(t=>(t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT",t))(yi||{}),q0=(t=>(t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL",t))(q0||{}),En=(t=>(t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp",t))(En||{}),Bt=(t=>(t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE",t[t.COLOR=4]="COLOR",t))(Bt||{}),kt=(t=>(t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH",t))(kt||{}),Ai=(t=>(t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",t))(Ai||{});const $R={createCanvas:(t,e)=>{const r=document.createElement("canvas");return r.width=t,r.height=e,r},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(t,e)=>fetch(t,e),parseXML:t=>new DOMParser().parseFromString(t,"text/xml")},he={ADAPTER:$R,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var rg=/iPhone/i,hw=/iPod/i,cw=/iPad/i,dw=/\biOS-universal(?:.+)Mac\b/i,ng=/\bAndroid(?:.+)Mobile\b/i,fw=/Android/i,pa=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Dc=/Silk/i,Ui=/Windows Phone/i,pw=/\bWindows(?:.+)ARM\b/i,mw=/BlackBerry/i,gw=/BB10/i,yw=/Opera Mini/i,vw=/\b(CriOS|Chrome)(?:.+)Mobile/i,_w=/Mobile(?:.+)Firefox\b/i,xw=function(t){return typeof t<"u"&&t.platform==="MacIntel"&&typeof t.maxTouchPoints=="number"&&t.maxTouchPoints>1&&typeof MSStream>"u"};function WR(t){return function(e){return e.test(t)}}function ww(t){var e={userAgent:"",platform:"",maxTouchPoints:0};!t&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof t=="string"?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0});var r=e.userAgent,n=r.split("[FBAN");typeof n[1]<"u"&&(r=n[0]),n=r.split("Twitter"),typeof n[1]<"u"&&(r=n[0]);var i=WR(r),s={apple:{phone:i(rg)&&!i(Ui),ipod:i(hw),tablet:!i(rg)&&(i(cw)||xw(e))&&!i(Ui),universal:i(dw),device:(i(rg)||i(hw)||i(cw)||i(dw)||xw(e))&&!i(Ui)},amazon:{phone:i(pa),tablet:!i(pa)&&i(Dc),device:i(pa)||i(Dc)},android:{phone:!i(Ui)&&i(pa)||!i(Ui)&&i(ng),tablet:!i(Ui)&&!i(pa)&&!i(ng)&&(i(Dc)||i(fw)),device:!i(Ui)&&(i(pa)||i(Dc)||i(ng)||i(fw))||i(/\bokhttp\b/i)},windows:{phone:i(Ui),tablet:i(pw),device:i(Ui)||i(pw)},other:{blackberry:i(mw),blackberry10:i(gw),opera:i(yw),firefox:i(_w),chrome:i(vw),device:i(mw)||i(gw)||i(yw)||i(_w)||i(vw)},any:!1,phone:!1,tablet:!1};return s.any=s.apple.device||s.android.device||s.windows.device||s.other.device,s.phone=s.apple.phone||s.android.phone||s.windows.phone,s.tablet=s.apple.tablet||s.android.tablet||s.windows.tablet,s}const VR=ww.default??ww,Yi=VR(globalThis.navigator);he.RETINA_PREFIX=/@([0-9\.]+)x/;he.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var ZT={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(h,c,f){this.fn=h,this.context=c,this.once=f||!1}function s(h,c,f,m,p){if(typeof f!="function")throw new TypeError("The listener must be a function");var v=new i(f,m||h,p),_=r?r+c:c;return h._events[_]?h._events[_].fn?h._events[_]=[h._events[_],v]:h._events[_].push(v):(h._events[_]=v,h._eventsCount++),h}function o(h,c){--h._eventsCount===0?h._events=new n:delete h._events[c]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var c=[],f,m;if(this._eventsCount===0)return c;for(m in f=this._events)e.call(f,m)&&c.push(r?m.slice(1):m);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(f)):c},l.prototype.listeners=function(c){var f=r?r+c:c,m=this._events[f];if(!m)return[];if(m.fn)return[m.fn];for(var p=0,v=m.length,_=new Array(v);p<v;p++)_[p]=m[p].fn;return _},l.prototype.listenerCount=function(c){var f=r?r+c:c,m=this._events[f];return m?m.fn?1:m.length:0},l.prototype.emit=function(c,f,m,p,v,_){var E=r?r+c:c;if(!this._events[E])return!1;var T=this._events[E],S=arguments.length,b,x;if(T.fn){switch(T.once&&this.removeListener(c,T.fn,void 0,!0),S){case 1:return T.fn.call(T.context),!0;case 2:return T.fn.call(T.context,f),!0;case 3:return T.fn.call(T.context,f,m),!0;case 4:return T.fn.call(T.context,f,m,p),!0;case 5:return T.fn.call(T.context,f,m,p,v),!0;case 6:return T.fn.call(T.context,f,m,p,v,_),!0}for(x=1,b=new Array(S-1);x<S;x++)b[x-1]=arguments[x];T.fn.apply(T.context,b)}else{var A=T.length,R;for(x=0;x<A;x++)switch(T[x].once&&this.removeListener(c,T[x].fn,void 0,!0),S){case 1:T[x].fn.call(T[x].context);break;case 2:T[x].fn.call(T[x].context,f);break;case 3:T[x].fn.call(T[x].context,f,m);break;case 4:T[x].fn.call(T[x].context,f,m,p);break;default:if(!b)for(R=1,b=new Array(S-1);R<S;R++)b[R-1]=arguments[R];T[x].fn.apply(T[x].context,b)}}return!0},l.prototype.on=function(c,f,m){return s(this,c,f,m,!1)},l.prototype.once=function(c,f,m){return s(this,c,f,m,!0)},l.prototype.removeListener=function(c,f,m,p){var v=r?r+c:c;if(!this._events[v])return this;if(!f)return o(this,v),this;var _=this._events[v];if(_.fn)_.fn===f&&(!p||_.once)&&(!m||_.context===m)&&o(this,v);else{for(var E=0,T=[],S=_.length;E<S;E++)(_[E].fn!==f||p&&!_[E].once||m&&_[E].context!==m)&&T.push(_[E]);T.length?this._events[v]=T.length===1?T[0]:T:o(this,v)}return this},l.prototype.removeAllListeners=function(c){var f;return c?(f=r?r+c:c,this._events[f]&&o(this,f)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,t.exports=l})(ZT);var XR=ZT.exports;const lh=Mf(XR);var Z0={exports:{}};Z0.exports=Kf;Z0.exports.default=Kf;function Kf(t,e,r){r=r||2;var n=e&&e.length,i=n?e[0]*r:t.length,s=JT(t,0,i,r,!0),o=[];if(!s||s.next===s.prev)return o;var l,h,c,f,m,p,v;if(n&&(s=ZR(t,e,s,r)),t.length>80*r){l=c=t[0],h=f=t[1];for(var _=r;_<i;_+=r)m=t[_],p=t[_+1],m<l&&(l=m),p<h&&(h=p),m>c&&(c=m),p>f&&(f=p);v=Math.max(c-l,f-h),v=v!==0?32767/v:0}return Xu(s,o,r,l,h,v,0),o}function JT(t,e,r,n,i){var s,o;if(i===tv(t,e,r,n)>0)for(s=e;s<r;s+=n)o=Ew(s,t[s],t[s+1],o);else for(s=r-n;s>=e;s-=n)o=Ew(s,t[s],t[s+1],o);return o&&qf(o,o.next)&&(Qu(o),o=o.next),o}function jo(t,e){if(!t)return t;e||(e=t);var r=t,n;do if(n=!1,!r.steiner&&(qf(r,r.next)||mt(r.prev,r,r.next)===0)){if(Qu(r),r=e=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==e);return e}function Xu(t,e,r,n,i,s,o){if(t){!o&&s&&nM(t,n,i,s);for(var l=t,h,c;t.prev!==t.next;){if(h=t.prev,c=t.next,s?QR(t,n,i,s):YR(t)){e.push(h.i/r|0),e.push(t.i/r|0),e.push(c.i/r|0),Qu(t),t=c.next,l=c.next;continue}if(t=c,t===l){o?o===1?(t=KR(jo(t),e,r),Xu(t,e,r,n,i,s,2)):o===2&&qR(t,e,r,n,i,s):Xu(jo(t),e,r,n,i,s,1);break}}}}function YR(t){var e=t.prev,r=t,n=t.next;if(mt(e,r,n)>=0)return!1;for(var i=e.x,s=r.x,o=n.x,l=e.y,h=r.y,c=n.y,f=i<s?i<o?i:o:s<o?s:o,m=l<h?l<c?l:c:h<c?h:c,p=i>s?i>o?i:o:s>o?s:o,v=l>h?l>c?l:c:h>c?h:c,_=n.next;_!==e;){if(_.x>=f&&_.x<=p&&_.y>=m&&_.y<=v&&Ua(i,l,s,h,o,c,_.x,_.y)&&mt(_.prev,_,_.next)>=0)return!1;_=_.next}return!0}function QR(t,e,r,n){var i=t.prev,s=t,o=t.next;if(mt(i,s,o)>=0)return!1;for(var l=i.x,h=s.x,c=o.x,f=i.y,m=s.y,p=o.y,v=l<h?l<c?l:c:h<c?h:c,_=f<m?f<p?f:p:m<p?m:p,E=l>h?l>c?l:c:h>c?h:c,T=f>m?f>p?f:p:m>p?m:p,S=Jy(v,_,e,r,n),b=Jy(E,T,e,r,n),x=t.prevZ,A=t.nextZ;x&&x.z>=S&&A&&A.z<=b;){if(x.x>=v&&x.x<=E&&x.y>=_&&x.y<=T&&x!==i&&x!==o&&Ua(l,f,h,m,c,p,x.x,x.y)&&mt(x.prev,x,x.next)>=0||(x=x.prevZ,A.x>=v&&A.x<=E&&A.y>=_&&A.y<=T&&A!==i&&A!==o&&Ua(l,f,h,m,c,p,A.x,A.y)&&mt(A.prev,A,A.next)>=0))return!1;A=A.nextZ}for(;x&&x.z>=S;){if(x.x>=v&&x.x<=E&&x.y>=_&&x.y<=T&&x!==i&&x!==o&&Ua(l,f,h,m,c,p,x.x,x.y)&&mt(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;A&&A.z<=b;){if(A.x>=v&&A.x<=E&&A.y>=_&&A.y<=T&&A!==i&&A!==o&&Ua(l,f,h,m,c,p,A.x,A.y)&&mt(A.prev,A,A.next)>=0)return!1;A=A.nextZ}return!0}function KR(t,e,r){var n=t;do{var i=n.prev,s=n.next.next;!qf(i,s)&&eA(i,n,n.next,s)&&Yu(i,s)&&Yu(s,i)&&(e.push(i.i/r|0),e.push(n.i/r|0),e.push(s.i/r|0),Qu(n),Qu(n.next),n=t=s),n=n.next}while(n!==t);return jo(n)}function qR(t,e,r,n,i,s){var o=t;do{for(var l=o.next.next;l!==o.prev;){if(o.i!==l.i&&oM(o,l)){var h=tA(o,l);o=jo(o,o.next),h=jo(h,h.next),Xu(o,e,r,n,i,s,0),Xu(h,e,r,n,i,s,0);return}l=l.next}o=o.next}while(o!==t)}function ZR(t,e,r,n){var i=[],s,o,l,h,c;for(s=0,o=e.length;s<o;s++)l=e[s]*n,h=s<o-1?e[s+1]*n:t.length,c=JT(t,l,h,n,!1),c===c.next&&(c.steiner=!0),i.push(sM(c));for(i.sort(JR),s=0;s<i.length;s++)r=eM(i[s],r);return r}function JR(t,e){return t.x-e.x}function eM(t,e){var r=tM(t,e);if(!r)return e;var n=tA(r,t);return jo(n,n.next),jo(r,r.next)}function tM(t,e){var r=e,n=t.x,i=t.y,s=-1/0,o;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var l=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(l<=n&&l>s&&(s=l,o=r.x<r.next.x?r:r.next,l===n))return o}r=r.next}while(r!==e);if(!o)return null;var h=o,c=o.x,f=o.y,m=1/0,p;r=o;do n>=r.x&&r.x>=c&&n!==r.x&&Ua(i<f?n:s,i,c,f,i<f?s:n,i,r.x,r.y)&&(p=Math.abs(i-r.y)/(n-r.x),Yu(r,t)&&(p<m||p===m&&(r.x>o.x||r.x===o.x&&rM(o,r)))&&(o=r,m=p)),r=r.next;while(r!==h);return o}function rM(t,e){return mt(t.prev,t,e.prev)<0&&mt(e.next,t,t.next)<0}function nM(t,e,r,n){var i=t;do i.z===0&&(i.z=Jy(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,iM(i)}function iM(t){var e,r,n,i,s,o,l,h,c=1;do{for(r=t,t=null,s=null,o=0;r;){for(o++,n=r,l=0,e=0;e<c&&(l++,n=n.nextZ,!!n);e++);for(h=c;l>0||h>0&&n;)l!==0&&(h===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,l--):(i=n,n=n.nextZ,h--),s?s.nextZ=i:t=i,i.prevZ=s,s=i;r=n}s.nextZ=null,c*=2}while(o>1);return t}function Jy(t,e,r,n,i){return t=(t-r)*i|0,e=(e-n)*i|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function sM(t){var e=t,r=t;do(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next;while(e!==t);return r}function Ua(t,e,r,n,i,s,o,l){return(i-o)*(e-l)>=(t-o)*(s-l)&&(t-o)*(n-l)>=(r-o)*(e-l)&&(r-o)*(s-l)>=(i-o)*(n-l)}function oM(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!aM(t,e)&&(Yu(t,e)&&Yu(e,t)&&lM(t,e)&&(mt(t.prev,t,e.prev)||mt(t,e.prev,e))||qf(t,e)&&mt(t.prev,t,t.next)>0&&mt(e.prev,e,e.next)>0)}function mt(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function qf(t,e){return t.x===e.x&&t.y===e.y}function eA(t,e,r,n){var i=Fc(mt(t,e,r)),s=Fc(mt(t,e,n)),o=Fc(mt(r,n,t)),l=Fc(mt(r,n,e));return!!(i!==s&&o!==l||i===0&&Oc(t,r,e)||s===0&&Oc(t,n,e)||o===0&&Oc(r,t,n)||l===0&&Oc(r,e,n))}function Oc(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function Fc(t){return t>0?1:t<0?-1:0}function aM(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&eA(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function Yu(t,e){return mt(t.prev,t,t.next)<0?mt(t,e,t.next)>=0&&mt(t,t.prev,e)>=0:mt(t,e,t.prev)<0||mt(t,t.next,e)<0}function lM(t,e){var r=t,n=!1,i=(t.x+e.x)/2,s=(t.y+e.y)/2;do r.y>s!=r.next.y>s&&r.next.y!==r.y&&i<(r.next.x-r.x)*(s-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==t);return n}function tA(t,e){var r=new ev(t.i,t.x,t.y),n=new ev(e.i,e.x,e.y),i=t.next,s=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,s.next=n,n.prev=s,n}function Ew(t,e,r,n){var i=new ev(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Qu(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function ev(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Kf.deviation=function(t,e,r,n){var i=e&&e.length,s=i?e[0]*r:t.length,o=Math.abs(tv(t,0,s,r));if(i)for(var l=0,h=e.length;l<h;l++){var c=e[l]*r,f=l<h-1?e[l+1]*r:t.length;o-=Math.abs(tv(t,c,f,r))}var m=0;for(l=0;l<n.length;l+=3){var p=n[l]*r,v=n[l+1]*r,_=n[l+2]*r;m+=Math.abs((t[p]-t[_])*(t[v+1]-t[p+1])-(t[p]-t[v])*(t[_+1]-t[p+1]))}return o===0&&m===0?0:Math.abs((m-o)/o)};function tv(t,e,r,n){for(var i=0,s=e,o=r-n;s<r;s+=n)i+=(t[o]-t[s])*(t[s+1]+t[o+1]),o=s;return i}Kf.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var s=0;s<t[i].length;s++)for(var o=0;o<e;o++)r.vertices.push(t[i][s][o]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r};var uM=Z0.exports;const hM=Mf(uM);var lf={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */lf.exports;(function(t,e){(function(r){var n=e&&!e.nodeType&&e,i=t&&!t.nodeType&&t,s=typeof pu=="object"&&pu;(s.global===s||s.window===s||s.self===s)&&(r=s);var o,l=2147483647,h=36,c=1,f=26,m=38,p=700,v=72,_=128,E="-",T=/^xn--/,S=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=h-c,R=Math.floor,L=String.fromCharCode,k;function D(F){throw new RangeError(x[F])}function Q(F,H){for(var z=F.length,Y=[];z--;)Y[z]=H(F[z]);return Y}function $(F,H){var z=F.split("@"),Y="";z.length>1&&(Y=z[0]+"@",F=z[1]),F=F.replace(b,".");var J=F.split("."),ve=Q(J,H).join(".");return Y+ve}function me(F){for(var H=[],z=0,Y=F.length,J,ve;z<Y;)J=F.charCodeAt(z++),J>=55296&&J<=56319&&z<Y?(ve=F.charCodeAt(z++),(ve&64512)==56320?H.push(((J&1023)<<10)+(ve&1023)+65536):(H.push(J),z--)):H.push(J);return H}function te(F){return Q(F,function(H){var z="";return H>65535&&(H-=65536,z+=L(H>>>10&1023|55296),H=56320|H&1023),z+=L(H),z}).join("")}function O(F){return F-48<10?F-22:F-65<26?F-65:F-97<26?F-97:h}function V(F,H){return F+22+75*(F<26)-((H!=0)<<5)}function ie(F,H,z){var Y=0;for(F=z?R(F/p):F>>1,F+=R(F/H);F>A*f>>1;Y+=h)F=R(F/A);return R(Y+(A+1)*F/(F+m))}function _e(F){var H=[],z=F.length,Y,J=0,ve=_,le=v,Te,Pe,pe,P,ue,Ee,Me,Ke,je;for(Te=F.lastIndexOf(E),Te<0&&(Te=0),Pe=0;Pe<Te;++Pe)F.charCodeAt(Pe)>=128&&D("not-basic"),H.push(F.charCodeAt(Pe));for(pe=Te>0?Te+1:0;pe<z;){for(P=J,ue=1,Ee=h;pe>=z&&D("invalid-input"),Me=O(F.charCodeAt(pe++)),(Me>=h||Me>R((l-J)/ue))&&D("overflow"),J+=Me*ue,Ke=Ee<=le?c:Ee>=le+f?f:Ee-le,!(Me<Ke);Ee+=h)je=h-Ke,ue>R(l/je)&&D("overflow"),ue*=je;Y=H.length+1,le=ie(J-P,Y,P==0),R(J/Y)>l-ve&&D("overflow"),ve+=R(J/Y),J%=Y,H.splice(J++,0,ve)}return te(H)}function fe(F){var H,z,Y,J,ve,le,Te,Pe,pe,P,ue,Ee=[],Me,Ke,je,vt;for(F=me(F),Me=F.length,H=_,z=0,ve=v,le=0;le<Me;++le)ue=F[le],ue<128&&Ee.push(L(ue));for(Y=J=Ee.length,J&&Ee.push(E);Y<Me;){for(Te=l,le=0;le<Me;++le)ue=F[le],ue>=H&&ue<Te&&(Te=ue);for(Ke=Y+1,Te-H>R((l-z)/Ke)&&D("overflow"),z+=(Te-H)*Ke,H=Te,le=0;le<Me;++le)if(ue=F[le],ue<H&&++z>l&&D("overflow"),ue==H){for(Pe=z,pe=h;P=pe<=ve?c:pe>=ve+f?f:pe-ve,!(Pe<P);pe+=h)vt=Pe-P,je=h-P,Ee.push(L(V(P+vt%je,0))),Pe=R(vt/je);Ee.push(L(V(Pe,0))),ve=ie(z,Ke,Y==J),z=0,++Y}++z,++H}return Ee.join("")}function M(F){return $(F,function(H){return T.test(H)?_e(H.slice(4).toLowerCase()):H})}function W(F){return $(F,function(H){return S.test(H)?"xn--"+fe(H):H})}if(o={version:"1.4.1",ucs2:{decode:me,encode:te},decode:_e,encode:fe,toASCII:W,toUnicode:M},n&&i)if(t.exports==n)i.exports=o;else for(k in o)o.hasOwnProperty(k)&&(n[k]=o[k]);else r.punycode=o})(pu)})(lf,lf.exports);var cM=lf.exports,gl=TypeError;const dM={},fM=Object.freeze(Object.defineProperty({__proto__:null,default:dM},Symbol.toStringTag,{value:"Module"})),pM=SS(fM);var J0=typeof Map=="function"&&Map.prototype,ig=Object.getOwnPropertyDescriptor&&J0?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,uf=J0&&ig&&typeof ig.get=="function"?ig.get:null,Sw=J0&&Map.prototype.forEach,e_=typeof Set=="function"&&Set.prototype,sg=Object.getOwnPropertyDescriptor&&e_?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,hf=e_&&sg&&typeof sg.get=="function"?sg.get:null,bw=e_&&Set.prototype.forEach,mM=typeof WeakMap=="function"&&WeakMap.prototype,bu=mM?WeakMap.prototype.has:null,gM=typeof WeakSet=="function"&&WeakSet.prototype,Tu=gM?WeakSet.prototype.has:null,yM=typeof WeakRef=="function"&&WeakRef.prototype,Tw=yM?WeakRef.prototype.deref:null,vM=Boolean.prototype.valueOf,_M=Object.prototype.toString,xM=Function.prototype.toString,wM=String.prototype.match,t_=String.prototype.slice,Ns=String.prototype.replace,EM=String.prototype.toUpperCase,Aw=String.prototype.toLowerCase,rA=RegExp.prototype.test,Cw=Array.prototype.concat,vi=Array.prototype.join,SM=Array.prototype.slice,Pw=Math.floor,rv=typeof BigInt=="function"?BigInt.prototype.valueOf:null,og=Object.getOwnPropertySymbols,nv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,hl=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Au=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hl||!0)?Symbol.toStringTag:null,nA=Object.prototype.propertyIsEnumerable,Iw=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Rw(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||rA.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-Pw(-t):Pw(t);if(n!==t){var i=String(n),s=t_.call(e,i.length+1);return Ns.call(i,r,"$&_")+"."+Ns.call(Ns.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ns.call(e,r,"$&_")}var iv=pM,Mw=iv.custom,kw=oA(Mw)?Mw:null,iA={__proto__:null,double:'"',single:"'"},bM={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},Zf=function t(e,r,n,i){var s=r||{};if($i(s,"quoteStyle")&&!$i(iA,s.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if($i(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=$i(s,"customInspect")?s.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if($i(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if($i(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=s.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return lA(e,s);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var h=String(e);return l?Rw(e,h):h}if(typeof e=="bigint"){var c=String(e)+"n";return l?Rw(e,c):c}var f=typeof s.depth>"u"?5:s.depth;if(typeof n>"u"&&(n=0),n>=f&&f>0&&typeof e=="object")return sv(e)?"[Array]":"[Object]";var m=HM(s,n);if(typeof i>"u")i=[];else if(aA(i,e)>=0)return"[Circular]";function p(O,V,ie){if(V&&(i=SM.call(i),i.push(V)),ie){var _e={depth:s.depth};return $i(s,"quoteStyle")&&(_e.quoteStyle=s.quoteStyle),t(O,_e,n+1,i)}return t(O,s,n+1,i)}if(typeof e=="function"&&!Nw(e)){var v=NM(e),_=Bc(e,p);return"[Function"+(v?": "+v:" (anonymous)")+"]"+(_.length>0?" { "+vi.call(_,", ")+" }":"")}if(oA(e)){var E=hl?Ns.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):nv.call(e);return typeof e=="object"&&!hl?Kl(E):E}if(UM(e)){for(var T="<"+Aw.call(String(e.nodeName)),S=e.attributes||[],b=0;b<S.length;b++)T+=" "+S[b].name+"="+sA(TM(S[b].value),"double",s);return T+=">",e.childNodes&&e.childNodes.length&&(T+="..."),T+="</"+Aw.call(String(e.nodeName))+">",T}if(sv(e)){if(e.length===0)return"[]";var x=Bc(e,p);return m&&!GM(x)?"["+ov(x,m)+"]":"[ "+vi.call(x,", ")+" ]"}if(CM(e)){var A=Bc(e,p);return!("cause"in Error.prototype)&&"cause"in e&&!nA.call(e,"cause")?"{ ["+String(e)+"] "+vi.call(Cw.call("[cause]: "+p(e.cause),A),", ")+" }":A.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+vi.call(A,", ")+" }"}if(typeof e=="object"&&o){if(kw&&typeof e[kw]=="function"&&iv)return iv(e,{depth:f-n});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(DM(e)){var R=[];return Sw&&Sw.call(e,function(O,V){R.push(p(V,e,!0)+" => "+p(O,e))}),Dw("Map",uf.call(e),R,m)}if(BM(e)){var L=[];return bw&&bw.call(e,function(O){L.push(p(O,e))}),Dw("Set",hf.call(e),L,m)}if(OM(e))return ag("WeakMap");if(LM(e))return ag("WeakSet");if(FM(e))return ag("WeakRef");if(IM(e))return Kl(p(Number(e)));if(MM(e))return Kl(p(rv.call(e)));if(RM(e))return Kl(vM.call(e));if(PM(e))return Kl(p(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof pu<"u"&&e===pu)return"{ [object globalThis] }";if(!AM(e)&&!Nw(e)){var k=Bc(e,p),D=Iw?Iw(e)===Object.prototype:e instanceof Object||e.constructor===Object,Q=e instanceof Object?"":"null prototype",$=!D&&Au&&Object(e)===e&&Au in e?t_.call(eo(e),8,-1):Q?"Object":"",me=D||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",te=me+($||Q?"["+vi.call(Cw.call([],$||[],Q||[]),": ")+"] ":"");return k.length===0?te+"{}":m?te+"{"+ov(k,m)+"}":te+"{ "+vi.call(k,", ")+" }"}return String(e)};function sA(t,e,r){var n=r.quoteStyle||e,i=iA[n];return i+t+i}function TM(t){return Ns.call(String(t),/"/g,"&quot;")}function Yo(t){return!Au||!(typeof t=="object"&&(Au in t||typeof t[Au]<"u"))}function sv(t){return eo(t)==="[object Array]"&&Yo(t)}function AM(t){return eo(t)==="[object Date]"&&Yo(t)}function Nw(t){return eo(t)==="[object RegExp]"&&Yo(t)}function CM(t){return eo(t)==="[object Error]"&&Yo(t)}function PM(t){return eo(t)==="[object String]"&&Yo(t)}function IM(t){return eo(t)==="[object Number]"&&Yo(t)}function RM(t){return eo(t)==="[object Boolean]"&&Yo(t)}function oA(t){if(hl)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!nv)return!1;try{return nv.call(t),!0}catch{}return!1}function MM(t){if(!t||typeof t!="object"||!rv)return!1;try{return rv.call(t),!0}catch{}return!1}var kM=Object.prototype.hasOwnProperty||function(t){return t in this};function $i(t,e){return kM.call(t,e)}function eo(t){return _M.call(t)}function NM(t){if(t.name)return t.name;var e=wM.call(xM.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function aA(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function DM(t){if(!uf||!t||typeof t!="object")return!1;try{uf.call(t);try{hf.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function OM(t){if(!bu||!t||typeof t!="object")return!1;try{bu.call(t,bu);try{Tu.call(t,Tu)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function FM(t){if(!Tw||!t||typeof t!="object")return!1;try{return Tw.call(t),!0}catch{}return!1}function BM(t){if(!hf||!t||typeof t!="object")return!1;try{hf.call(t);try{uf.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function LM(t){if(!Tu||!t||typeof t!="object")return!1;try{Tu.call(t,Tu);try{bu.call(t,bu)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function UM(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function lA(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return lA(t_.call(t,0,e.maxStringLength),e)+n}var i=bM[e.quoteStyle||"single"];i.lastIndex=0;var s=Ns.call(Ns.call(t,i,"\\$1"),/[\x00-\x1f]/g,zM);return sA(s,"single",e)}function zM(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+EM.call(e.toString(16))}function Kl(t){return"Object("+t+")"}function ag(t){return t+" { ? }"}function Dw(t,e,r,n){var i=n?ov(r,n):vi.call(r,", ");return t+" ("+e+") {"+i+"}"}function GM(t){for(var e=0;e<t.length;e++)if(aA(t[e],`
41
41
  `)>=0)return!1;return!0}function HM(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=vi.call(Array(t.indent+1)," ");else return null;return{base:r,prev:vi.call(Array(e+1),r)}}function ov(t,e){if(t.length===0)return"";var r=`
42
42
  `+e.prev+e.base;return r+vi.call(t,","+r)+`
43
- `+e.prev}function Bc(t,e){var r=sv(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=$i(t,i)?e(t[i],t):""}var s=typeof og=="function"?og(t):[],o;if(hl){o={};for(var l=0;l<s.length;l++)o["$"+s[l]]=s[l]}for(var h in t)$i(t,h)&&(r&&String(Number(h))===h&&h<t.length||hl&&o["$"+h]instanceof Symbol||(rA.call(/[^\w$]/,h)?n.push(e(h,t)+": "+e(t[h],t)):n.push(h+": "+e(t[h],t))));if(typeof og=="function")for(var c=0;c<s.length;c++)nA.call(t,s[c])&&n.push("["+e(s[c])+"]: "+e(t[s[c]],t));return n}var jM=Zf,$M=gl,Jf=function(t,e,r){for(var n=t,i;(i=n.next)!=null;n=i)if(i.key===e)return n.next=i.next,r||(i.next=t.next,t.next=i),i},WM=function(t,e){if(t){var r=Jf(t,e);return r&&r.value}},VM=function(t,e,r){var n=Jf(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},XM=function(t,e){return t?!!Jf(t,e):!1},YM=function(t,e){if(t)return Jf(t,e,!0)},QM=function(){var e,r={assert:function(n){if(!r.has(n))throw new $M("Side channel does not contain "+jM(n))},delete:function(n){var i=e&&e.next,s=YM(e,n);return s&&i&&i===s&&(e=void 0),!!s},get:function(n){return WM(e,n)},has:function(n){return XM(e,n)},set:function(n,i){e||(e={next:void 0}),VM(e,n,i)}};return r},uA=Object,KM=Error,qM=EvalError,ZM=RangeError,JM=ReferenceError,ek=SyntaxError,tk=URIError,rk=Math.abs,nk=Math.floor,ik=Math.max,sk=Math.min,ok=Math.pow,ak=Math.round,lk=Number.isNaN||function(e){return e!==e},uk=lk,hk=function(e){return uk(e)||e===0?e:e<0?-1:1},ck=Object.getOwnPropertyDescriptor,Td=ck;if(Td)try{Td([],"length")}catch{Td=null}var hA=Td,Ad=Object.defineProperty||!1;if(Ad)try{Ad({},"a",{value:1})}catch{Ad=!1}var dk=Ad,lg,Ow;function fk(){return Ow||(Ow=1,lg=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(var s in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,r);if(l.value!==i||l.enumerable!==!0)return!1}return!0}),lg}var ug,Fw;function pk(){if(Fw)return ug;Fw=1;var t=typeof Symbol<"u"&&Symbol,e=fk();return ug=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},ug}var hg,Bw;function cA(){return Bw||(Bw=1,hg=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),hg}var cg,Lw;function dA(){if(Lw)return cg;Lw=1;var t=uA;return cg=t.getPrototypeOf||null,cg}var dg,Uw;function mk(){if(Uw)return dg;Uw=1;var t="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,r=Math.max,n="[object Function]",i=function(h,c){for(var f=[],m=0;m<h.length;m+=1)f[m]=h[m];for(var p=0;p<c.length;p+=1)f[p+h.length]=c[p];return f},s=function(h,c){for(var f=[],m=c,p=0;m<h.length;m+=1,p+=1)f[p]=h[m];return f},o=function(l,h){for(var c="",f=0;f<l.length;f+=1)c+=l[f],f+1<l.length&&(c+=h);return c};return dg=function(h){var c=this;if(typeof c!="function"||e.apply(c)!==n)throw new TypeError(t+c);for(var f=s(arguments,1),m,p=function(){if(this instanceof m){var S=c.apply(this,i(f,arguments));return Object(S)===S?S:this}return c.apply(h,i(f,arguments))},v=r(0,c.length-f.length),_=[],E=0;E<v;E++)_[E]="$"+E;if(m=Function("binder","return function ("+o(_,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var T=function(){};T.prototype=c.prototype,m.prototype=new T,T.prototype=null}return m},dg}var fg,zw;function ep(){if(zw)return fg;zw=1;var t=mk();return fg=Function.prototype.bind||t,fg}var pg,Gw;function r_(){return Gw||(Gw=1,pg=Function.prototype.call),pg}var mg,Hw;function fA(){return Hw||(Hw=1,mg=Function.prototype.apply),mg}var gk=typeof Reflect<"u"&&Reflect&&Reflect.apply,yk=ep(),vk=fA(),_k=r_(),xk=gk,wk=xk||yk.call(_k,vk),Ek=ep(),Sk=gl,bk=r_(),Tk=wk,pA=function(e){if(e.length<1||typeof e[0]!="function")throw new Sk("a function is required");return Tk(Ek,bk,e)},gg,jw;function Ak(){if(jw)return gg;jw=1;var t=pA,e=hA,r;try{r=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var n=!!r&&e&&e(Object.prototype,"__proto__"),i=Object,s=i.getPrototypeOf;return gg=n&&typeof n.get=="function"?t([n.get]):typeof s=="function"?function(l){return s(l==null?l:i(l))}:!1,gg}var yg,$w;function Ck(){if($w)return yg;$w=1;var t=cA(),e=dA(),r=Ak();return yg=t?function(i){return t(i)}:e?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return e(i)}:r?function(i){return r(i)}:null,yg}var vg,Ww;function Pk(){if(Ww)return vg;Ww=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=ep();return vg=r.call(t,e),vg}var Le,Ik=uA,Rk=KM,Mk=qM,kk=ZM,Nk=JM,cl=ek,Ka=gl,Dk=tk,Ok=rk,Fk=nk,Bk=ik,Lk=sk,Uk=ok,zk=ak,Gk=hk,mA=Function,_g=function(t){try{return mA('"use strict"; return ('+t+").constructor;")()}catch{}},Ku=hA,Hk=dk,xg=function(){throw new Ka},jk=Ku?function(){try{return arguments.callee,xg}catch{try{return Ku(arguments,"callee").get}catch{return xg}}}():xg,ma=pk()(),Wt=Ck(),$k=dA(),Wk=cA(),gA=fA(),uh=r_(),xa={},Vk=typeof Uint8Array>"u"||!Wt?Le:Wt(Uint8Array),Oo={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Le:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Le:ArrayBuffer,"%ArrayIteratorPrototype%":ma&&Wt?Wt([][Symbol.iterator]()):Le,"%AsyncFromSyncIteratorPrototype%":Le,"%AsyncFunction%":xa,"%AsyncGenerator%":xa,"%AsyncGeneratorFunction%":xa,"%AsyncIteratorPrototype%":xa,"%Atomics%":typeof Atomics>"u"?Le:Atomics,"%BigInt%":typeof BigInt>"u"?Le:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Le:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Le:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Le:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Rk,"%eval%":eval,"%EvalError%":Mk,"%Float16Array%":typeof Float16Array>"u"?Le:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Le:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Le:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Le:FinalizationRegistry,"%Function%":mA,"%GeneratorFunction%":xa,"%Int8Array%":typeof Int8Array>"u"?Le:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Le:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Le:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ma&&Wt?Wt(Wt([][Symbol.iterator]())):Le,"%JSON%":typeof JSON=="object"?JSON:Le,"%Map%":typeof Map>"u"?Le:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ma||!Wt?Le:Wt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Ik,"%Object.getOwnPropertyDescriptor%":Ku,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Le:Promise,"%Proxy%":typeof Proxy>"u"?Le:Proxy,"%RangeError%":kk,"%ReferenceError%":Nk,"%Reflect%":typeof Reflect>"u"?Le:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Le:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ma||!Wt?Le:Wt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Le:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ma&&Wt?Wt(""[Symbol.iterator]()):Le,"%Symbol%":ma?Symbol:Le,"%SyntaxError%":cl,"%ThrowTypeError%":jk,"%TypedArray%":Vk,"%TypeError%":Ka,"%Uint8Array%":typeof Uint8Array>"u"?Le:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Le:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Le:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Le:Uint32Array,"%URIError%":Dk,"%WeakMap%":typeof WeakMap>"u"?Le:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Le:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Le:WeakSet,"%Function.prototype.call%":uh,"%Function.prototype.apply%":gA,"%Object.defineProperty%":Hk,"%Object.getPrototypeOf%":$k,"%Math.abs%":Ok,"%Math.floor%":Fk,"%Math.max%":Bk,"%Math.min%":Lk,"%Math.pow%":Uk,"%Math.round%":zk,"%Math.sign%":Gk,"%Reflect.getPrototypeOf%":Wk};if(Wt)try{null.error}catch(t){var Xk=Wt(Wt(t));Oo["%Error.prototype%"]=Xk}var Yk=function t(e){var r;if(e==="%AsyncFunction%")r=_g("async function () {}");else if(e==="%GeneratorFunction%")r=_g("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=_g("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&Wt&&(r=Wt(i.prototype))}return Oo[e]=r,r},Vw={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},hh=ep(),cf=Pk(),Qk=hh.call(uh,Array.prototype.concat),Kk=hh.call(gA,Array.prototype.splice),Xw=hh.call(uh,String.prototype.replace),df=hh.call(uh,String.prototype.slice),qk=hh.call(uh,RegExp.prototype.exec),Zk=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Jk=/\\(\\)?/g,e3=function(e){var r=df(e,0,1),n=df(e,-1);if(r==="%"&&n!=="%")throw new cl("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new cl("invalid intrinsic syntax, expected opening `%`");var i=[];return Xw(e,Zk,function(s,o,l,h){i[i.length]=l?Xw(h,Jk,"$1"):o||s}),i},t3=function(e,r){var n=e,i;if(cf(Vw,n)&&(i=Vw[n],n="%"+i[0]+"%"),cf(Oo,n)){var s=Oo[n];if(s===xa&&(s=Yk(n)),typeof s>"u"&&!r)throw new Ka("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:s}}throw new cl("intrinsic "+e+" does not exist!")},n_=function(e,r){if(typeof e!="string"||e.length===0)throw new Ka("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ka('"allowMissing" argument must be a boolean');if(qk(/^%?[^%]*%?$/,e)===null)throw new cl("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=e3(e),i=n.length>0?n[0]:"",s=t3("%"+i+"%",r),o=s.name,l=s.value,h=!1,c=s.alias;c&&(i=c[0],Kk(n,Qk([0,1],c)));for(var f=1,m=!0;f<n.length;f+=1){var p=n[f],v=df(p,0,1),_=df(p,-1);if((v==='"'||v==="'"||v==="`"||_==='"'||_==="'"||_==="`")&&v!==_)throw new cl("property names with quotes must have matching quotes");if((p==="constructor"||!m)&&(h=!0),i+="."+p,o="%"+i+"%",cf(Oo,o))l=Oo[o];else if(l!=null){if(!(p in l)){if(!r)throw new Ka("base intrinsic for "+e+" exists, but the property is not available.");return}if(Ku&&f+1>=n.length){var E=Ku(l,p);m=!!E,m&&"get"in E&&!("originalValue"in E.get)?l=E.get:l=l[p]}else m=cf(l,p),l=l[p];m&&!h&&(Oo[o]=l)}}return l},yA=n_,vA=pA,r3=vA([yA("%String.prototype.indexOf%")]),_A=function(e,r){var n=yA(e,!!r);return typeof n=="function"&&r3(e,".prototype.")>-1?vA([n]):n},n3=n_,ch=_A,i3=Zf,s3=gl,Yw=n3("%Map%",!0),o3=ch("Map.prototype.get",!0),a3=ch("Map.prototype.set",!0),l3=ch("Map.prototype.has",!0),u3=ch("Map.prototype.delete",!0),h3=ch("Map.prototype.size",!0),xA=!!Yw&&function(){var e,r={assert:function(n){if(!r.has(n))throw new s3("Side channel does not contain "+i3(n))},delete:function(n){if(e){var i=u3(e,n);return h3(e)===0&&(e=void 0),i}return!1},get:function(n){if(e)return o3(e,n)},has:function(n){return e?l3(e,n):!1},set:function(n,i){e||(e=new Yw),a3(e,n,i)}};return r},c3=n_,tp=_A,d3=Zf,Lc=xA,f3=gl,ga=c3("%WeakMap%",!0),p3=tp("WeakMap.prototype.get",!0),m3=tp("WeakMap.prototype.set",!0),g3=tp("WeakMap.prototype.has",!0),y3=tp("WeakMap.prototype.delete",!0),v3=ga?function(){var e,r,n={assert:function(i){if(!n.has(i))throw new f3("Side channel does not contain "+d3(i))},delete:function(i){if(ga&&i&&(typeof i=="object"||typeof i=="function")){if(e)return y3(e,i)}else if(Lc&&r)return r.delete(i);return!1},get:function(i){return ga&&i&&(typeof i=="object"||typeof i=="function")&&e?p3(e,i):r&&r.get(i)},has:function(i){return ga&&i&&(typeof i=="object"||typeof i=="function")&&e?g3(e,i):!!r&&r.has(i)},set:function(i,s){ga&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new ga),m3(e,i,s)):Lc&&(r||(r=Lc()),r.set(i,s))}};return n}:Lc,_3=gl,x3=Zf,w3=QM,E3=xA,S3=v3,b3=S3||E3||w3,wA=function(){var e,r={assert:function(n){if(!r.has(n))throw new _3("Side channel does not contain "+x3(n))},delete:function(n){return!!e&&e.delete(n)},get:function(n){return e&&e.get(n)},has:function(n){return!!e&&e.has(n)},set:function(n,i){e||(e=b3()),e.set(n,i)}};return r},T3=String.prototype.replace,A3=/%20/g,wg={RFC1738:"RFC1738",RFC3986:"RFC3986"},i_={default:wg.RFC3986,formatters:{RFC1738:function(t){return T3.call(t,A3,"+")},RFC3986:function(t){return String(t)}},RFC1738:wg.RFC1738,RFC3986:wg.RFC3986},C3=i_,P3=wA,Eg=Object.prototype.hasOwnProperty,Po=Array.isArray,rp=P3(),EA=function(e,r){return rp.set(e,r),e},ff=function(e){return rp.has(e)},av=function(e){return rp.get(e)},SA=function(e,r){rp.set(e,r)},ui=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),I3=function(e){for(;e.length>1;){var r=e.pop(),n=r.obj[r.prop];if(Po(n)){for(var i=[],s=0;s<n.length;++s)typeof n[s]<"u"&&i.push(n[s]);r.obj[r.prop]=i}}},s_=function(e,r){for(var n=r&&r.plainObjects?{__proto__:null}:{},i=0;i<e.length;++i)typeof e[i]<"u"&&(n[i]=e[i]);return n},R3=function t(e,r,n){if(!r)return e;if(typeof r!="object"&&typeof r!="function"){if(Po(e))e.push(r);else if(e&&typeof e=="object")if(ff(e)){var i=av(e)+1;e[i]=r,SA(e,i)}else(n&&(n.plainObjects||n.allowPrototypes)||!Eg.call(Object.prototype,r))&&(e[r]=!0);else return[e,r];return e}if(!e||typeof e!="object"){if(ff(r)){for(var s=Object.keys(r),o=n&&n.plainObjects?{__proto__:null,0:e}:{0:e},l=0;l<s.length;l++){var h=parseInt(s[l],10);o[h+1]=r[s[l]]}return EA(o,av(r)+1)}return[e].concat(r)}var c=e;return Po(e)&&!Po(r)&&(c=s_(e,n)),Po(e)&&Po(r)?(r.forEach(function(f,m){if(Eg.call(e,m)){var p=e[m];p&&typeof p=="object"&&f&&typeof f=="object"?e[m]=t(p,f,n):e.push(f)}else e[m]=f}),e):Object.keys(r).reduce(function(f,m){var p=r[m];return Eg.call(f,m)?f[m]=t(f[m],p,n):f[m]=p,f},c)},M3=function(e,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},e)},k3=function(t,e,r){var n=t.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},Sg=1024,N3=function(e,r,n,i,s){if(e.length===0)return e;var o=e;if(typeof e=="symbol"?o=Symbol.prototype.toString.call(e):typeof e!="string"&&(o=String(e)),n==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(v){return"%26%23"+parseInt(v.slice(2),16)+"%3B"});for(var l="",h=0;h<o.length;h+=Sg){for(var c=o.length>=Sg?o.slice(h,h+Sg):o,f=[],m=0;m<c.length;++m){var p=c.charCodeAt(m);if(p===45||p===46||p===95||p===126||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||s===C3.RFC1738&&(p===40||p===41)){f[f.length]=c.charAt(m);continue}if(p<128){f[f.length]=ui[p];continue}if(p<2048){f[f.length]=ui[192|p>>6]+ui[128|p&63];continue}if(p<55296||p>=57344){f[f.length]=ui[224|p>>12]+ui[128|p>>6&63]+ui[128|p&63];continue}m+=1,p=65536+((p&1023)<<10|c.charCodeAt(m)&1023),f[f.length]=ui[240|p>>18]+ui[128|p>>12&63]+ui[128|p>>6&63]+ui[128|p&63]}l+=f.join("")}return l},D3=function(e){for(var r=[{obj:{o:e},prop:"o"}],n=[],i=0;i<r.length;++i)for(var s=r[i],o=s.obj[s.prop],l=Object.keys(o),h=0;h<l.length;++h){var c=l[h],f=o[c];typeof f=="object"&&f!==null&&n.indexOf(f)===-1&&(r.push({obj:o,prop:c}),n.push(f))}return I3(r),e},O3=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},F3=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},B3=function(e,r,n,i){if(ff(e)){var s=av(e)+1;return e[s]=r,SA(e,s),e}var o=[].concat(e,r);return o.length>n?EA(s_(o,{plainObjects:i}),o.length-1):o},L3=function(e,r){if(Po(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(r(e[i]));return n}return r(e)},bA={arrayToObject:s_,assign:M3,combine:B3,compact:D3,decode:k3,encode:N3,isBuffer:F3,isOverflow:ff,isRegExp:O3,maybeMap:L3,merge:R3},TA=wA,Cd=bA,Cu=i_,U3=Object.prototype.hasOwnProperty,AA={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},gi=Array.isArray,z3=Array.prototype.push,CA=function(t,e){z3.apply(t,gi(e)?e:[e])},G3=Date.prototype.toISOString,Qw=Cu.default,Ft={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Cd.encode,encodeValuesOnly:!1,filter:void 0,format:Qw,formatter:Cu.formatters[Qw],indices:!1,serializeDate:function(e){return G3.call(e)},skipNulls:!1,strictNullHandling:!1},H3=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},bg={},j3=function t(e,r,n,i,s,o,l,h,c,f,m,p,v,_,E,T,S,b){for(var x=e,A=b,R=0,L=!1;(A=A.get(bg))!==void 0&&!L;){var N=A.get(e);if(R+=1,typeof N<"u"){if(N===R)throw new RangeError("Cyclic object value");L=!0}typeof A.get(bg)>"u"&&(R=0)}if(typeof f=="function"?x=f(r,x):x instanceof Date?x=v(x):n==="comma"&&gi(x)&&(x=Cd.maybeMap(x,function(O){return O instanceof Date?v(O):O})),x===null){if(o)return c&&!T?c(r,Ft.encoder,S,"key",_):r;x=""}if(H3(x)||Cd.isBuffer(x)){if(c){var D=T?r:c(r,Ft.encoder,S,"key",_);return[E(D)+"="+E(c(x,Ft.encoder,S,"value",_))]}return[E(r)+"="+E(String(x))]}var q=[];if(typeof x>"u")return q;var $;if(n==="comma"&&gi(x))T&&c&&(x=Cd.maybeMap(x,c)),$=[{value:x.length>0?x.join(",")||null:void 0}];else if(gi(f))$=f;else{var me=Object.keys(x);$=m?me.sort(m):me}var ne=h?String(r).replace(/\./g,"%2E"):String(r),B=i&&gi(x)&&x.length===1?ne+"[]":ne;if(s&&gi(x)&&x.length===0)return B+"[]";for(var K=0;K<$.length;++K){var ie=$[K],_e=typeof ie=="object"&&ie&&typeof ie.value<"u"?ie.value:x[ie];if(!(l&&_e===null)){var fe=p&&h?String(ie).replace(/\./g,"%2E"):String(ie),M=gi(x)?typeof n=="function"?n(B,fe):B:B+(p?"."+fe:"["+fe+"]");b.set(e,R);var W=TA();W.set(bg,b),CA(q,t(_e,M,n,i,s,o,l,h,n==="comma"&&T&&gi(x)?null:c,f,m,p,v,_,E,T,S,W))}}return q},$3=function(e){if(!e)return Ft;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=e.charset||Ft.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Cu.default;if(typeof e.format<"u"){if(!U3.call(Cu.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=Cu.formatters[n],s=Ft.filter;(typeof e.filter=="function"||gi(e.filter))&&(s=e.filter);var o;if(e.arrayFormat in AA?o=e.arrayFormat:"indices"in e?o=e.indices?"indices":"repeat":o=Ft.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:Ft.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:Ft.addQueryPrefix,allowDots:l,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:Ft.allowEmptyArrays,arrayFormat:o,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Ft.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?Ft.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Ft.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:Ft.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:Ft.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Ft.encodeValuesOnly,filter:s,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Ft.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Ft.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Ft.strictNullHandling}},W3=function(t,e){var r=t,n=$3(e),i,s;typeof n.filter=="function"?(s=n.filter,r=s("",r)):gi(n.filter)&&(s=n.filter,i=s);var o=[];if(typeof r!="object"||r===null)return"";var l=AA[n.arrayFormat],h=l==="comma"&&n.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var c=TA(),f=0;f<i.length;++f){var m=i[f],p=r[m];n.skipNulls&&p===null||CA(o,j3(p,m,l,h,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,c))}var v=o.join(n.delimiter),_=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),v.length>0?_+v:""},Xs=bA,Pd=Object.prototype.hasOwnProperty,Kw=Array.isArray,xt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Xs.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},V3=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},PA=function(t,e,r){if(t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1)return t.split(",");if(e.throwOnLimitExceeded&&r>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(e.arrayLimit===1?"":"s")+" allowed in an array.");return t},X3="utf8=%26%2310003%3B",Y3="utf8=%E2%9C%93",Q3=function(e,r){var n={__proto__:null},i=r.ignoreQueryPrefix?e.replace(/^\?/,""):e;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=r.parameterLimit===1/0?void 0:r.parameterLimit,o=i.split(r.delimiter,r.throwOnLimitExceeded?s+1:s);if(r.throwOnLimitExceeded&&o.length>s)throw new RangeError("Parameter limit exceeded. Only "+s+" parameter"+(s===1?"":"s")+" allowed.");var l=-1,h,c=r.charset;if(r.charsetSentinel)for(h=0;h<o.length;++h)o[h].indexOf("utf8=")===0&&(o[h]===Y3?c="utf-8":o[h]===X3&&(c="iso-8859-1"),l=h,h=o.length);for(h=0;h<o.length;++h)if(h!==l){var f=o[h],m=f.indexOf("]="),p=m===-1?f.indexOf("="):m+1,v,_;if(p===-1?(v=r.decoder(f,xt.decoder,c,"key"),_=r.strictNullHandling?null:""):(v=r.decoder(f.slice(0,p),xt.decoder,c,"key"),v!==null&&(_=Xs.maybeMap(PA(f.slice(p+1),r,Kw(n[v])?n[v].length:0),function(T){return r.decoder(T,xt.decoder,c,"value")}))),_&&r.interpretNumericEntities&&c==="iso-8859-1"&&(_=V3(String(_))),f.indexOf("[]=")>-1&&(_=Kw(_)?[_]:_),v!==null){var E=Pd.call(n,v);E&&r.duplicates==="combine"?n[v]=Xs.combine(n[v],_,r.arrayLimit,r.plainObjects):(!E||r.duplicates==="last")&&(n[v]=_)}}return n},K3=function(t,e,r,n){var i=0;if(t.length>0&&t[t.length-1]==="[]"){var s=t.slice(0,-1).join("");i=Array.isArray(e)&&e[s]?e[s].length:0}for(var o=n?e:PA(e,r,i),l=t.length-1;l>=0;--l){var h,c=t[l];if(c==="[]"&&r.parseArrays)Xs.isOverflow(o)?h=o:h=r.allowEmptyArrays&&(o===""||r.strictNullHandling&&o===null)?[]:Xs.combine([],o,r.arrayLimit,r.plainObjects);else{h=r.plainObjects?{__proto__:null}:{};var f=c.charAt(0)==="["&&c.charAt(c.length-1)==="]"?c.slice(1,-1):c,m=r.decodeDotInKeys?f.replace(/%2E/g,"."):f,p=parseInt(m,10);!r.parseArrays&&m===""?h={0:o}:!isNaN(p)&&c!==m&&String(p)===m&&p>=0&&r.parseArrays&&p<=r.arrayLimit?(h=[],h[p]=o):m!=="__proto__"&&(h[m]=o)}o=h}return o},q3=function(e,r){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(r.depth<=0)return!r.plainObjects&&Pd.call(Object.prototype,n)&&!r.allowPrototypes?void 0:[n];var i=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,o=i.exec(n),l=o?n.slice(0,o.index):n,h=[];if(l){if(!r.plainObjects&&Pd.call(Object.prototype,l)&&!r.allowPrototypes)return;h.push(l)}for(var c=0;(o=s.exec(n))!==null&&c<r.depth;){c+=1;var f=o[1].slice(1,-1);if(!r.plainObjects&&Pd.call(Object.prototype,f)&&!r.allowPrototypes)return;h.push(o[1])}if(o){if(r.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");h.push("["+n.slice(o.index)+"]")}return h},Z3=function(e,r,n,i){if(e){var s=q3(e,n);if(s)return K3(s,r,n,i)}},J3=function(e){if(!e)return xt;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof e.throwOnLimitExceeded<"u"&&typeof e.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var r=typeof e.charset>"u"?xt.charset:e.charset,n=typeof e.duplicates>"u"?xt.duplicates:e.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:xt.allowDots:!!e.allowDots;return{allowDots:i,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:xt.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:xt.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:xt.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:xt.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:xt.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:xt.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:xt.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:xt.decoder,delimiter:typeof e.delimiter=="string"||Xs.isRegExp(e.delimiter)?e.delimiter:xt.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:xt.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:xt.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:xt.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:xt.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:xt.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:xt.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded=="boolean"?e.throwOnLimitExceeded:!1}},e4=function(t,e){var r=J3(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?{__proto__:null}:{};for(var n=typeof t=="string"?Q3(t,r):t,i=r.plainObjects?{__proto__:null}:{},s=Object.keys(n),o=0;o<s.length;++o){var l=s[o],h=Z3(l,n[l],r,typeof t=="string");i=Xs.merge(i,h,r)}return r.allowSparse===!0?i:Xs.compact(i)},t4=W3,r4=e4,n4=i_,i4={formats:n4,parse:r4,stringify:t4},s4=cM;function Zi(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var o4=/^([a-z0-9.+-]+:)/i,a4=/:[0-9]*$/,l4=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,u4=["<",">",'"',"`"," ","\r",`
44
- `," "],h4=["{","}","|","\\","^","`"].concat(u4),lv=["'"].concat(h4),qw=["%","/","?",";","#"].concat(lv),Zw=["/","?","#"],c4=255,Jw=/^[+a-z0-9A-Z_-]{0,63}$/,d4=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f4={javascript:!0,"javascript:":!0},uv={javascript:!0,"javascript:":!0},qa={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},hv=i4;function p4(t,e,r){if(t&&typeof t=="object"&&t instanceof Zi)return t;var n=new Zi;return n.parse(t,e,r),n}Zi.prototype.parse=function(t,e,r){if(typeof t!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),i=n!==-1&&n<t.indexOf("#")?"?":"#",s=t.split(i),o=/\\/g;s[0]=s[0].replace(o,"/"),t=s.join(i);var l=t;if(l=l.trim(),!r&&t.split("#").length===1){var h=l4.exec(l);if(h)return this.path=l,this.href=l,this.pathname=h[1],h[2]?(this.search=h[2],e?this.query=hv.parse(this.search.substr(1)):this.query=this.search.substr(1)):e&&(this.search="",this.query={}),this}var c=o4.exec(l);if(c){c=c[0];var f=c.toLowerCase();this.protocol=f,l=l.substr(c.length)}if(r||c||l.match(/^\/\/[^@/]+@[^@/]+/)){var m=l.substr(0,2)==="//";m&&!(c&&uv[c])&&(l=l.substr(2),this.slashes=!0)}if(!uv[c]&&(m||c&&!qa[c])){for(var p=-1,v=0;v<Zw.length;v++){var _=l.indexOf(Zw[v]);_!==-1&&(p===-1||_<p)&&(p=_)}var E,T;p===-1?T=l.lastIndexOf("@"):T=l.lastIndexOf("@",p),T!==-1&&(E=l.slice(0,T),l=l.slice(T+1),this.auth=decodeURIComponent(E)),p=-1;for(var v=0;v<qw.length;v++){var _=l.indexOf(qw[v]);_!==-1&&(p===-1||_<p)&&(p=_)}p===-1&&(p=l.length),this.host=l.slice(0,p),l=l.slice(p),this.parseHost(),this.hostname=this.hostname||"";var S=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!S)for(var b=this.hostname.split(/\./),v=0,x=b.length;v<x;v++){var A=b[v];if(A&&!A.match(Jw)){for(var R="",L=0,N=A.length;L<N;L++)A.charCodeAt(L)>127?R+="x":R+=A[L];if(!R.match(Jw)){var D=b.slice(0,v),q=b.slice(v+1),$=A.match(d4);$&&(D.push($[1]),q.unshift($[2])),q.length&&(l="/"+q.join(".")+l),this.hostname=D.join(".");break}}}this.hostname.length>c4?this.hostname="":this.hostname=this.hostname.toLowerCase(),S||(this.hostname=s4.toASCII(this.hostname));var me=this.port?":"+this.port:"",ne=this.hostname||"";this.host=ne+me,this.href+=this.host,S&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),l[0]!=="/"&&(l="/"+l))}if(!f4[f])for(var v=0,x=lv.length;v<x;v++){var B=lv[v];if(l.indexOf(B)!==-1){var K=encodeURIComponent(B);K===B&&(K=escape(B)),l=l.split(B).join(K)}}var ie=l.indexOf("#");ie!==-1&&(this.hash=l.substr(ie),l=l.slice(0,ie));var _e=l.indexOf("?");if(_e!==-1?(this.search=l.substr(_e),this.query=l.substr(_e+1),e&&(this.query=hv.parse(this.query)),l=l.slice(0,_e)):e&&(this.search="",this.query={}),l&&(this.pathname=l),qa[f]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var me=this.pathname||"",fe=this.search||"";this.path=me+fe}return this.href=this.format(),this};Zi.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,s="";this.host?i=t+this.host:this.hostname&&(i=t+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(s=hv.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var o=this.search||s&&"?"+s||"";return e&&e.substr(-1)!==":"&&(e+=":"),this.slashes||(!e||qa[e])&&i!==!1?(i="//"+(i||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):i||(i=""),n&&n.charAt(0)!=="#"&&(n="#"+n),o&&o.charAt(0)!=="?"&&(o="?"+o),r=r.replace(/[?#]/g,function(l){return encodeURIComponent(l)}),o=o.replace("#","%23"),e+i+r+o+n};Zi.prototype.resolve=function(t){return this.resolveObject(p4(t,!1,!0)).format()};Zi.prototype.resolveObject=function(t){if(typeof t=="string"){var e=new Zi;e.parse(t,!1,!0),t=e}for(var r=new Zi,n=Object.keys(this),i=0;i<n.length;i++){var s=n[i];r[s]=this[s]}if(r.hash=t.hash,t.href==="")return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var o=Object.keys(t),l=0;l<o.length;l++){var h=o[l];h!=="protocol"&&(r[h]=t[h])}return qa[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!qa[t.protocol]){for(var c=Object.keys(t),f=0;f<c.length;f++){var m=c[f];r[m]=t[m]}return r.href=r.format(),r}if(r.protocol=t.protocol,!t.host&&!uv[t.protocol]){for(var x=(t.pathname||"").split("/");x.length&&!(t.host=x.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),x[0]!==""&&x.unshift(""),x.length<2&&x.unshift(""),r.pathname=x.join("/")}else r.pathname=t.pathname;if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var p=r.pathname||"",v=r.search||"";r.path=p+v}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var _=r.pathname&&r.pathname.charAt(0)==="/",E=t.host||t.pathname&&t.pathname.charAt(0)==="/",T=E||_||r.host&&t.pathname,S=T,b=r.pathname&&r.pathname.split("/")||[],x=t.pathname&&t.pathname.split("/")||[],A=r.protocol&&!qa[r.protocol];if(A&&(r.hostname="",r.port=null,r.host&&(b[0]===""?b[0]=r.host:b.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(x[0]===""?x[0]=t.host:x.unshift(t.host)),t.host=null),T=T&&(x[0]===""||b[0]==="")),E)r.host=t.host||t.host===""?t.host:r.host,r.hostname=t.hostname||t.hostname===""?t.hostname:r.hostname,r.search=t.search,r.query=t.query,b=x;else if(x.length)b||(b=[]),b.pop(),b=b.concat(x),r.search=t.search,r.query=t.query;else if(t.search!=null){if(A){r.host=b.shift(),r.hostname=r.host;var R=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;R&&(r.auth=R.shift(),r.hostname=R.shift(),r.host=r.hostname)}return r.search=t.search,r.query=t.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!b.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var L=b.slice(-1)[0],N=(r.host||t.host||b.length>1)&&(L==="."||L==="..")||L==="",D=0,q=b.length;q>=0;q--)L=b[q],L==="."?b.splice(q,1):L===".."?(b.splice(q,1),D++):D&&(b.splice(q,1),D--);if(!T&&!S)for(;D--;D)b.unshift("..");T&&b[0]!==""&&(!b[0]||b[0].charAt(0)!=="/")&&b.unshift(""),N&&b.join("/").substr(-1)!=="/"&&b.push("");var $=b[0]===""||b[0]&&b[0].charAt(0)==="/";if(A){r.hostname=$?"":b.length?b.shift():"",r.host=r.hostname;var R=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;R&&(r.auth=R.shift(),r.hostname=R.shift(),r.host=r.hostname)}return T=T||r.host&&b.length,T&&!$&&b.unshift(""),b.length>0?r.pathname=b.join("/"):(r.pathname=null,r.path=null),(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r};Zi.prototype.parseHost=function(){var t=this.host,e=a4.exec(t);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};const eE={};function Ue(t,e,r=3){if(eE[e])return;let n=new Error().stack;typeof n>"u"?console.warn("PixiJS Deprecation Warning: ",`${e}
43
+ `+e.prev}function Bc(t,e){var r=sv(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=$i(t,i)?e(t[i],t):""}var s=typeof og=="function"?og(t):[],o;if(hl){o={};for(var l=0;l<s.length;l++)o["$"+s[l]]=s[l]}for(var h in t)$i(t,h)&&(r&&String(Number(h))===h&&h<t.length||hl&&o["$"+h]instanceof Symbol||(rA.call(/[^\w$]/,h)?n.push(e(h,t)+": "+e(t[h],t)):n.push(h+": "+e(t[h],t))));if(typeof og=="function")for(var c=0;c<s.length;c++)nA.call(t,s[c])&&n.push("["+e(s[c])+"]: "+e(t[s[c]],t));return n}var jM=Zf,$M=gl,Jf=function(t,e,r){for(var n=t,i;(i=n.next)!=null;n=i)if(i.key===e)return n.next=i.next,r||(i.next=t.next,t.next=i),i},WM=function(t,e){if(t){var r=Jf(t,e);return r&&r.value}},VM=function(t,e,r){var n=Jf(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},XM=function(t,e){return t?!!Jf(t,e):!1},YM=function(t,e){if(t)return Jf(t,e,!0)},QM=function(){var e,r={assert:function(n){if(!r.has(n))throw new $M("Side channel does not contain "+jM(n))},delete:function(n){var i=e&&e.next,s=YM(e,n);return s&&i&&i===s&&(e=void 0),!!s},get:function(n){return WM(e,n)},has:function(n){return XM(e,n)},set:function(n,i){e||(e={next:void 0}),VM(e,n,i)}};return r},uA=Object,KM=Error,qM=EvalError,ZM=RangeError,JM=ReferenceError,ek=SyntaxError,tk=URIError,rk=Math.abs,nk=Math.floor,ik=Math.max,sk=Math.min,ok=Math.pow,ak=Math.round,lk=Number.isNaN||function(e){return e!==e},uk=lk,hk=function(e){return uk(e)||e===0?e:e<0?-1:1},ck=Object.getOwnPropertyDescriptor,Td=ck;if(Td)try{Td([],"length")}catch{Td=null}var hA=Td,Ad=Object.defineProperty||!1;if(Ad)try{Ad({},"a",{value:1})}catch{Ad=!1}var dk=Ad,lg,Ow;function fk(){return Ow||(Ow=1,lg=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(var s in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,r);if(l.value!==i||l.enumerable!==!0)return!1}return!0}),lg}var ug,Fw;function pk(){if(Fw)return ug;Fw=1;var t=typeof Symbol<"u"&&Symbol,e=fk();return ug=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},ug}var hg,Bw;function cA(){return Bw||(Bw=1,hg=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),hg}var cg,Lw;function dA(){if(Lw)return cg;Lw=1;var t=uA;return cg=t.getPrototypeOf||null,cg}var dg,Uw;function mk(){if(Uw)return dg;Uw=1;var t="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,r=Math.max,n="[object Function]",i=function(h,c){for(var f=[],m=0;m<h.length;m+=1)f[m]=h[m];for(var p=0;p<c.length;p+=1)f[p+h.length]=c[p];return f},s=function(h,c){for(var f=[],m=c,p=0;m<h.length;m+=1,p+=1)f[p]=h[m];return f},o=function(l,h){for(var c="",f=0;f<l.length;f+=1)c+=l[f],f+1<l.length&&(c+=h);return c};return dg=function(h){var c=this;if(typeof c!="function"||e.apply(c)!==n)throw new TypeError(t+c);for(var f=s(arguments,1),m,p=function(){if(this instanceof m){var S=c.apply(this,i(f,arguments));return Object(S)===S?S:this}return c.apply(h,i(f,arguments))},v=r(0,c.length-f.length),_=[],E=0;E<v;E++)_[E]="$"+E;if(m=Function("binder","return function ("+o(_,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var T=function(){};T.prototype=c.prototype,m.prototype=new T,T.prototype=null}return m},dg}var fg,zw;function ep(){if(zw)return fg;zw=1;var t=mk();return fg=Function.prototype.bind||t,fg}var pg,Gw;function r_(){return Gw||(Gw=1,pg=Function.prototype.call),pg}var mg,Hw;function fA(){return Hw||(Hw=1,mg=Function.prototype.apply),mg}var gk=typeof Reflect<"u"&&Reflect&&Reflect.apply,yk=ep(),vk=fA(),_k=r_(),xk=gk,wk=xk||yk.call(_k,vk),Ek=ep(),Sk=gl,bk=r_(),Tk=wk,pA=function(e){if(e.length<1||typeof e[0]!="function")throw new Sk("a function is required");return Tk(Ek,bk,e)},gg,jw;function Ak(){if(jw)return gg;jw=1;var t=pA,e=hA,r;try{r=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var n=!!r&&e&&e(Object.prototype,"__proto__"),i=Object,s=i.getPrototypeOf;return gg=n&&typeof n.get=="function"?t([n.get]):typeof s=="function"?function(l){return s(l==null?l:i(l))}:!1,gg}var yg,$w;function Ck(){if($w)return yg;$w=1;var t=cA(),e=dA(),r=Ak();return yg=t?function(i){return t(i)}:e?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return e(i)}:r?function(i){return r(i)}:null,yg}var vg,Ww;function Pk(){if(Ww)return vg;Ww=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=ep();return vg=r.call(t,e),vg}var Le,Ik=uA,Rk=KM,Mk=qM,kk=ZM,Nk=JM,cl=ek,Ka=gl,Dk=tk,Ok=rk,Fk=nk,Bk=ik,Lk=sk,Uk=ok,zk=ak,Gk=hk,mA=Function,_g=function(t){try{return mA('"use strict"; return ('+t+").constructor;")()}catch{}},Ku=hA,Hk=dk,xg=function(){throw new Ka},jk=Ku?function(){try{return arguments.callee,xg}catch{try{return Ku(arguments,"callee").get}catch{return xg}}}():xg,ma=pk()(),Wt=Ck(),$k=dA(),Wk=cA(),gA=fA(),uh=r_(),xa={},Vk=typeof Uint8Array>"u"||!Wt?Le:Wt(Uint8Array),Oo={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Le:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Le:ArrayBuffer,"%ArrayIteratorPrototype%":ma&&Wt?Wt([][Symbol.iterator]()):Le,"%AsyncFromSyncIteratorPrototype%":Le,"%AsyncFunction%":xa,"%AsyncGenerator%":xa,"%AsyncGeneratorFunction%":xa,"%AsyncIteratorPrototype%":xa,"%Atomics%":typeof Atomics>"u"?Le:Atomics,"%BigInt%":typeof BigInt>"u"?Le:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Le:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Le:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Le:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Rk,"%eval%":eval,"%EvalError%":Mk,"%Float16Array%":typeof Float16Array>"u"?Le:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Le:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Le:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Le:FinalizationRegistry,"%Function%":mA,"%GeneratorFunction%":xa,"%Int8Array%":typeof Int8Array>"u"?Le:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Le:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Le:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ma&&Wt?Wt(Wt([][Symbol.iterator]())):Le,"%JSON%":typeof JSON=="object"?JSON:Le,"%Map%":typeof Map>"u"?Le:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ma||!Wt?Le:Wt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Ik,"%Object.getOwnPropertyDescriptor%":Ku,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Le:Promise,"%Proxy%":typeof Proxy>"u"?Le:Proxy,"%RangeError%":kk,"%ReferenceError%":Nk,"%Reflect%":typeof Reflect>"u"?Le:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Le:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ma||!Wt?Le:Wt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Le:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ma&&Wt?Wt(""[Symbol.iterator]()):Le,"%Symbol%":ma?Symbol:Le,"%SyntaxError%":cl,"%ThrowTypeError%":jk,"%TypedArray%":Vk,"%TypeError%":Ka,"%Uint8Array%":typeof Uint8Array>"u"?Le:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Le:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Le:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Le:Uint32Array,"%URIError%":Dk,"%WeakMap%":typeof WeakMap>"u"?Le:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Le:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Le:WeakSet,"%Function.prototype.call%":uh,"%Function.prototype.apply%":gA,"%Object.defineProperty%":Hk,"%Object.getPrototypeOf%":$k,"%Math.abs%":Ok,"%Math.floor%":Fk,"%Math.max%":Bk,"%Math.min%":Lk,"%Math.pow%":Uk,"%Math.round%":zk,"%Math.sign%":Gk,"%Reflect.getPrototypeOf%":Wk};if(Wt)try{null.error}catch(t){var Xk=Wt(Wt(t));Oo["%Error.prototype%"]=Xk}var Yk=function t(e){var r;if(e==="%AsyncFunction%")r=_g("async function () {}");else if(e==="%GeneratorFunction%")r=_g("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=_g("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&Wt&&(r=Wt(i.prototype))}return Oo[e]=r,r},Vw={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},hh=ep(),cf=Pk(),Qk=hh.call(uh,Array.prototype.concat),Kk=hh.call(gA,Array.prototype.splice),Xw=hh.call(uh,String.prototype.replace),df=hh.call(uh,String.prototype.slice),qk=hh.call(uh,RegExp.prototype.exec),Zk=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Jk=/\\(\\)?/g,e3=function(e){var r=df(e,0,1),n=df(e,-1);if(r==="%"&&n!=="%")throw new cl("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new cl("invalid intrinsic syntax, expected opening `%`");var i=[];return Xw(e,Zk,function(s,o,l,h){i[i.length]=l?Xw(h,Jk,"$1"):o||s}),i},t3=function(e,r){var n=e,i;if(cf(Vw,n)&&(i=Vw[n],n="%"+i[0]+"%"),cf(Oo,n)){var s=Oo[n];if(s===xa&&(s=Yk(n)),typeof s>"u"&&!r)throw new Ka("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:s}}throw new cl("intrinsic "+e+" does not exist!")},n_=function(e,r){if(typeof e!="string"||e.length===0)throw new Ka("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ka('"allowMissing" argument must be a boolean');if(qk(/^%?[^%]*%?$/,e)===null)throw new cl("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=e3(e),i=n.length>0?n[0]:"",s=t3("%"+i+"%",r),o=s.name,l=s.value,h=!1,c=s.alias;c&&(i=c[0],Kk(n,Qk([0,1],c)));for(var f=1,m=!0;f<n.length;f+=1){var p=n[f],v=df(p,0,1),_=df(p,-1);if((v==='"'||v==="'"||v==="`"||_==='"'||_==="'"||_==="`")&&v!==_)throw new cl("property names with quotes must have matching quotes");if((p==="constructor"||!m)&&(h=!0),i+="."+p,o="%"+i+"%",cf(Oo,o))l=Oo[o];else if(l!=null){if(!(p in l)){if(!r)throw new Ka("base intrinsic for "+e+" exists, but the property is not available.");return}if(Ku&&f+1>=n.length){var E=Ku(l,p);m=!!E,m&&"get"in E&&!("originalValue"in E.get)?l=E.get:l=l[p]}else m=cf(l,p),l=l[p];m&&!h&&(Oo[o]=l)}}return l},yA=n_,vA=pA,r3=vA([yA("%String.prototype.indexOf%")]),_A=function(e,r){var n=yA(e,!!r);return typeof n=="function"&&r3(e,".prototype.")>-1?vA([n]):n},n3=n_,ch=_A,i3=Zf,s3=gl,Yw=n3("%Map%",!0),o3=ch("Map.prototype.get",!0),a3=ch("Map.prototype.set",!0),l3=ch("Map.prototype.has",!0),u3=ch("Map.prototype.delete",!0),h3=ch("Map.prototype.size",!0),xA=!!Yw&&function(){var e,r={assert:function(n){if(!r.has(n))throw new s3("Side channel does not contain "+i3(n))},delete:function(n){if(e){var i=u3(e,n);return h3(e)===0&&(e=void 0),i}return!1},get:function(n){if(e)return o3(e,n)},has:function(n){return e?l3(e,n):!1},set:function(n,i){e||(e=new Yw),a3(e,n,i)}};return r},c3=n_,tp=_A,d3=Zf,Lc=xA,f3=gl,ga=c3("%WeakMap%",!0),p3=tp("WeakMap.prototype.get",!0),m3=tp("WeakMap.prototype.set",!0),g3=tp("WeakMap.prototype.has",!0),y3=tp("WeakMap.prototype.delete",!0),v3=ga?function(){var e,r,n={assert:function(i){if(!n.has(i))throw new f3("Side channel does not contain "+d3(i))},delete:function(i){if(ga&&i&&(typeof i=="object"||typeof i=="function")){if(e)return y3(e,i)}else if(Lc&&r)return r.delete(i);return!1},get:function(i){return ga&&i&&(typeof i=="object"||typeof i=="function")&&e?p3(e,i):r&&r.get(i)},has:function(i){return ga&&i&&(typeof i=="object"||typeof i=="function")&&e?g3(e,i):!!r&&r.has(i)},set:function(i,s){ga&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new ga),m3(e,i,s)):Lc&&(r||(r=Lc()),r.set(i,s))}};return n}:Lc,_3=gl,x3=Zf,w3=QM,E3=xA,S3=v3,b3=S3||E3||w3,wA=function(){var e,r={assert:function(n){if(!r.has(n))throw new _3("Side channel does not contain "+x3(n))},delete:function(n){return!!e&&e.delete(n)},get:function(n){return e&&e.get(n)},has:function(n){return!!e&&e.has(n)},set:function(n,i){e||(e=b3()),e.set(n,i)}};return r},T3=String.prototype.replace,A3=/%20/g,wg={RFC1738:"RFC1738",RFC3986:"RFC3986"},i_={default:wg.RFC3986,formatters:{RFC1738:function(t){return T3.call(t,A3,"+")},RFC3986:function(t){return String(t)}},RFC1738:wg.RFC1738,RFC3986:wg.RFC3986},C3=i_,P3=wA,Eg=Object.prototype.hasOwnProperty,Po=Array.isArray,rp=P3(),EA=function(e,r){return rp.set(e,r),e},ff=function(e){return rp.has(e)},av=function(e){return rp.get(e)},SA=function(e,r){rp.set(e,r)},ui=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),I3=function(e){for(;e.length>1;){var r=e.pop(),n=r.obj[r.prop];if(Po(n)){for(var i=[],s=0;s<n.length;++s)typeof n[s]<"u"&&i.push(n[s]);r.obj[r.prop]=i}}},s_=function(e,r){for(var n=r&&r.plainObjects?{__proto__:null}:{},i=0;i<e.length;++i)typeof e[i]<"u"&&(n[i]=e[i]);return n},R3=function t(e,r,n){if(!r)return e;if(typeof r!="object"&&typeof r!="function"){if(Po(e))e.push(r);else if(e&&typeof e=="object")if(ff(e)){var i=av(e)+1;e[i]=r,SA(e,i)}else(n&&(n.plainObjects||n.allowPrototypes)||!Eg.call(Object.prototype,r))&&(e[r]=!0);else return[e,r];return e}if(!e||typeof e!="object"){if(ff(r)){for(var s=Object.keys(r),o=n&&n.plainObjects?{__proto__:null,0:e}:{0:e},l=0;l<s.length;l++){var h=parseInt(s[l],10);o[h+1]=r[s[l]]}return EA(o,av(r)+1)}return[e].concat(r)}var c=e;return Po(e)&&!Po(r)&&(c=s_(e,n)),Po(e)&&Po(r)?(r.forEach(function(f,m){if(Eg.call(e,m)){var p=e[m];p&&typeof p=="object"&&f&&typeof f=="object"?e[m]=t(p,f,n):e.push(f)}else e[m]=f}),e):Object.keys(r).reduce(function(f,m){var p=r[m];return Eg.call(f,m)?f[m]=t(f[m],p,n):f[m]=p,f},c)},M3=function(e,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},e)},k3=function(t,e,r){var n=t.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},Sg=1024,N3=function(e,r,n,i,s){if(e.length===0)return e;var o=e;if(typeof e=="symbol"?o=Symbol.prototype.toString.call(e):typeof e!="string"&&(o=String(e)),n==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(v){return"%26%23"+parseInt(v.slice(2),16)+"%3B"});for(var l="",h=0;h<o.length;h+=Sg){for(var c=o.length>=Sg?o.slice(h,h+Sg):o,f=[],m=0;m<c.length;++m){var p=c.charCodeAt(m);if(p===45||p===46||p===95||p===126||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||s===C3.RFC1738&&(p===40||p===41)){f[f.length]=c.charAt(m);continue}if(p<128){f[f.length]=ui[p];continue}if(p<2048){f[f.length]=ui[192|p>>6]+ui[128|p&63];continue}if(p<55296||p>=57344){f[f.length]=ui[224|p>>12]+ui[128|p>>6&63]+ui[128|p&63];continue}m+=1,p=65536+((p&1023)<<10|c.charCodeAt(m)&1023),f[f.length]=ui[240|p>>18]+ui[128|p>>12&63]+ui[128|p>>6&63]+ui[128|p&63]}l+=f.join("")}return l},D3=function(e){for(var r=[{obj:{o:e},prop:"o"}],n=[],i=0;i<r.length;++i)for(var s=r[i],o=s.obj[s.prop],l=Object.keys(o),h=0;h<l.length;++h){var c=l[h],f=o[c];typeof f=="object"&&f!==null&&n.indexOf(f)===-1&&(r.push({obj:o,prop:c}),n.push(f))}return I3(r),e},O3=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},F3=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},B3=function(e,r,n,i){if(ff(e)){var s=av(e)+1;return e[s]=r,SA(e,s),e}var o=[].concat(e,r);return o.length>n?EA(s_(o,{plainObjects:i}),o.length-1):o},L3=function(e,r){if(Po(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(r(e[i]));return n}return r(e)},bA={arrayToObject:s_,assign:M3,combine:B3,compact:D3,decode:k3,encode:N3,isBuffer:F3,isOverflow:ff,isRegExp:O3,maybeMap:L3,merge:R3},TA=wA,Cd=bA,Cu=i_,U3=Object.prototype.hasOwnProperty,AA={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},gi=Array.isArray,z3=Array.prototype.push,CA=function(t,e){z3.apply(t,gi(e)?e:[e])},G3=Date.prototype.toISOString,Qw=Cu.default,Ft={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Cd.encode,encodeValuesOnly:!1,filter:void 0,format:Qw,formatter:Cu.formatters[Qw],indices:!1,serializeDate:function(e){return G3.call(e)},skipNulls:!1,strictNullHandling:!1},H3=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},bg={},j3=function t(e,r,n,i,s,o,l,h,c,f,m,p,v,_,E,T,S,b){for(var x=e,A=b,R=0,L=!1;(A=A.get(bg))!==void 0&&!L;){var k=A.get(e);if(R+=1,typeof k<"u"){if(k===R)throw new RangeError("Cyclic object value");L=!0}typeof A.get(bg)>"u"&&(R=0)}if(typeof f=="function"?x=f(r,x):x instanceof Date?x=v(x):n==="comma"&&gi(x)&&(x=Cd.maybeMap(x,function(F){return F instanceof Date?v(F):F})),x===null){if(o)return c&&!T?c(r,Ft.encoder,S,"key",_):r;x=""}if(H3(x)||Cd.isBuffer(x)){if(c){var D=T?r:c(r,Ft.encoder,S,"key",_);return[E(D)+"="+E(c(x,Ft.encoder,S,"value",_))]}return[E(r)+"="+E(String(x))]}var Q=[];if(typeof x>"u")return Q;var $;if(n==="comma"&&gi(x))T&&c&&(x=Cd.maybeMap(x,c)),$=[{value:x.length>0?x.join(",")||null:void 0}];else if(gi(f))$=f;else{var me=Object.keys(x);$=m?me.sort(m):me}var te=h?String(r).replace(/\./g,"%2E"):String(r),O=i&&gi(x)&&x.length===1?te+"[]":te;if(s&&gi(x)&&x.length===0)return O+"[]";for(var V=0;V<$.length;++V){var ie=$[V],_e=typeof ie=="object"&&ie&&typeof ie.value<"u"?ie.value:x[ie];if(!(l&&_e===null)){var fe=p&&h?String(ie).replace(/\./g,"%2E"):String(ie),M=gi(x)?typeof n=="function"?n(O,fe):O:O+(p?"."+fe:"["+fe+"]");b.set(e,R);var W=TA();W.set(bg,b),CA(Q,t(_e,M,n,i,s,o,l,h,n==="comma"&&T&&gi(x)?null:c,f,m,p,v,_,E,T,S,W))}}return Q},$3=function(e){if(!e)return Ft;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=e.charset||Ft.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Cu.default;if(typeof e.format<"u"){if(!U3.call(Cu.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=Cu.formatters[n],s=Ft.filter;(typeof e.filter=="function"||gi(e.filter))&&(s=e.filter);var o;if(e.arrayFormat in AA?o=e.arrayFormat:"indices"in e?o=e.indices?"indices":"repeat":o=Ft.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:Ft.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:Ft.addQueryPrefix,allowDots:l,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:Ft.allowEmptyArrays,arrayFormat:o,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Ft.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?Ft.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Ft.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:Ft.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:Ft.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Ft.encodeValuesOnly,filter:s,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Ft.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Ft.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Ft.strictNullHandling}},W3=function(t,e){var r=t,n=$3(e),i,s;typeof n.filter=="function"?(s=n.filter,r=s("",r)):gi(n.filter)&&(s=n.filter,i=s);var o=[];if(typeof r!="object"||r===null)return"";var l=AA[n.arrayFormat],h=l==="comma"&&n.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var c=TA(),f=0;f<i.length;++f){var m=i[f],p=r[m];n.skipNulls&&p===null||CA(o,j3(p,m,l,h,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,c))}var v=o.join(n.delimiter),_=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),v.length>0?_+v:""},Xs=bA,Pd=Object.prototype.hasOwnProperty,Kw=Array.isArray,xt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Xs.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},V3=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},PA=function(t,e,r){if(t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1)return t.split(",");if(e.throwOnLimitExceeded&&r>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(e.arrayLimit===1?"":"s")+" allowed in an array.");return t},X3="utf8=%26%2310003%3B",Y3="utf8=%E2%9C%93",Q3=function(e,r){var n={__proto__:null},i=r.ignoreQueryPrefix?e.replace(/^\?/,""):e;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=r.parameterLimit===1/0?void 0:r.parameterLimit,o=i.split(r.delimiter,r.throwOnLimitExceeded?s+1:s);if(r.throwOnLimitExceeded&&o.length>s)throw new RangeError("Parameter limit exceeded. Only "+s+" parameter"+(s===1?"":"s")+" allowed.");var l=-1,h,c=r.charset;if(r.charsetSentinel)for(h=0;h<o.length;++h)o[h].indexOf("utf8=")===0&&(o[h]===Y3?c="utf-8":o[h]===X3&&(c="iso-8859-1"),l=h,h=o.length);for(h=0;h<o.length;++h)if(h!==l){var f=o[h],m=f.indexOf("]="),p=m===-1?f.indexOf("="):m+1,v,_;if(p===-1?(v=r.decoder(f,xt.decoder,c,"key"),_=r.strictNullHandling?null:""):(v=r.decoder(f.slice(0,p),xt.decoder,c,"key"),v!==null&&(_=Xs.maybeMap(PA(f.slice(p+1),r,Kw(n[v])?n[v].length:0),function(T){return r.decoder(T,xt.decoder,c,"value")}))),_&&r.interpretNumericEntities&&c==="iso-8859-1"&&(_=V3(String(_))),f.indexOf("[]=")>-1&&(_=Kw(_)?[_]:_),v!==null){var E=Pd.call(n,v);E&&r.duplicates==="combine"?n[v]=Xs.combine(n[v],_,r.arrayLimit,r.plainObjects):(!E||r.duplicates==="last")&&(n[v]=_)}}return n},K3=function(t,e,r,n){var i=0;if(t.length>0&&t[t.length-1]==="[]"){var s=t.slice(0,-1).join("");i=Array.isArray(e)&&e[s]?e[s].length:0}for(var o=n?e:PA(e,r,i),l=t.length-1;l>=0;--l){var h,c=t[l];if(c==="[]"&&r.parseArrays)Xs.isOverflow(o)?h=o:h=r.allowEmptyArrays&&(o===""||r.strictNullHandling&&o===null)?[]:Xs.combine([],o,r.arrayLimit,r.plainObjects);else{h=r.plainObjects?{__proto__:null}:{};var f=c.charAt(0)==="["&&c.charAt(c.length-1)==="]"?c.slice(1,-1):c,m=r.decodeDotInKeys?f.replace(/%2E/g,"."):f,p=parseInt(m,10);!r.parseArrays&&m===""?h={0:o}:!isNaN(p)&&c!==m&&String(p)===m&&p>=0&&r.parseArrays&&p<=r.arrayLimit?(h=[],h[p]=o):m!=="__proto__"&&(h[m]=o)}o=h}return o},q3=function(e,r){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(r.depth<=0)return!r.plainObjects&&Pd.call(Object.prototype,n)&&!r.allowPrototypes?void 0:[n];var i=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,o=i.exec(n),l=o?n.slice(0,o.index):n,h=[];if(l){if(!r.plainObjects&&Pd.call(Object.prototype,l)&&!r.allowPrototypes)return;h.push(l)}for(var c=0;(o=s.exec(n))!==null&&c<r.depth;){c+=1;var f=o[1].slice(1,-1);if(!r.plainObjects&&Pd.call(Object.prototype,f)&&!r.allowPrototypes)return;h.push(o[1])}if(o){if(r.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");h.push("["+n.slice(o.index)+"]")}return h},Z3=function(e,r,n,i){if(e){var s=q3(e,n);if(s)return K3(s,r,n,i)}},J3=function(e){if(!e)return xt;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof e.throwOnLimitExceeded<"u"&&typeof e.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var r=typeof e.charset>"u"?xt.charset:e.charset,n=typeof e.duplicates>"u"?xt.duplicates:e.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:xt.allowDots:!!e.allowDots;return{allowDots:i,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:xt.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:xt.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:xt.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:xt.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:xt.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:xt.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:xt.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:xt.decoder,delimiter:typeof e.delimiter=="string"||Xs.isRegExp(e.delimiter)?e.delimiter:xt.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:xt.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:xt.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:xt.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:xt.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:xt.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:xt.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded=="boolean"?e.throwOnLimitExceeded:!1}},e4=function(t,e){var r=J3(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?{__proto__:null}:{};for(var n=typeof t=="string"?Q3(t,r):t,i=r.plainObjects?{__proto__:null}:{},s=Object.keys(n),o=0;o<s.length;++o){var l=s[o],h=Z3(l,n[l],r,typeof t=="string");i=Xs.merge(i,h,r)}return r.allowSparse===!0?i:Xs.compact(i)},t4=W3,r4=e4,n4=i_,i4={formats:n4,parse:r4,stringify:t4},s4=cM;function Zi(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var o4=/^([a-z0-9.+-]+:)/i,a4=/:[0-9]*$/,l4=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,u4=["<",">",'"',"`"," ","\r",`
44
+ `," "],h4=["{","}","|","\\","^","`"].concat(u4),lv=["'"].concat(h4),qw=["%","/","?",";","#"].concat(lv),Zw=["/","?","#"],c4=255,Jw=/^[+a-z0-9A-Z_-]{0,63}$/,d4=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f4={javascript:!0,"javascript:":!0},uv={javascript:!0,"javascript:":!0},qa={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},hv=i4;function p4(t,e,r){if(t&&typeof t=="object"&&t instanceof Zi)return t;var n=new Zi;return n.parse(t,e,r),n}Zi.prototype.parse=function(t,e,r){if(typeof t!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),i=n!==-1&&n<t.indexOf("#")?"?":"#",s=t.split(i),o=/\\/g;s[0]=s[0].replace(o,"/"),t=s.join(i);var l=t;if(l=l.trim(),!r&&t.split("#").length===1){var h=l4.exec(l);if(h)return this.path=l,this.href=l,this.pathname=h[1],h[2]?(this.search=h[2],e?this.query=hv.parse(this.search.substr(1)):this.query=this.search.substr(1)):e&&(this.search="",this.query={}),this}var c=o4.exec(l);if(c){c=c[0];var f=c.toLowerCase();this.protocol=f,l=l.substr(c.length)}if(r||c||l.match(/^\/\/[^@/]+@[^@/]+/)){var m=l.substr(0,2)==="//";m&&!(c&&uv[c])&&(l=l.substr(2),this.slashes=!0)}if(!uv[c]&&(m||c&&!qa[c])){for(var p=-1,v=0;v<Zw.length;v++){var _=l.indexOf(Zw[v]);_!==-1&&(p===-1||_<p)&&(p=_)}var E,T;p===-1?T=l.lastIndexOf("@"):T=l.lastIndexOf("@",p),T!==-1&&(E=l.slice(0,T),l=l.slice(T+1),this.auth=decodeURIComponent(E)),p=-1;for(var v=0;v<qw.length;v++){var _=l.indexOf(qw[v]);_!==-1&&(p===-1||_<p)&&(p=_)}p===-1&&(p=l.length),this.host=l.slice(0,p),l=l.slice(p),this.parseHost(),this.hostname=this.hostname||"";var S=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!S)for(var b=this.hostname.split(/\./),v=0,x=b.length;v<x;v++){var A=b[v];if(A&&!A.match(Jw)){for(var R="",L=0,k=A.length;L<k;L++)A.charCodeAt(L)>127?R+="x":R+=A[L];if(!R.match(Jw)){var D=b.slice(0,v),Q=b.slice(v+1),$=A.match(d4);$&&(D.push($[1]),Q.unshift($[2])),Q.length&&(l="/"+Q.join(".")+l),this.hostname=D.join(".");break}}}this.hostname.length>c4?this.hostname="":this.hostname=this.hostname.toLowerCase(),S||(this.hostname=s4.toASCII(this.hostname));var me=this.port?":"+this.port:"",te=this.hostname||"";this.host=te+me,this.href+=this.host,S&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),l[0]!=="/"&&(l="/"+l))}if(!f4[f])for(var v=0,x=lv.length;v<x;v++){var O=lv[v];if(l.indexOf(O)!==-1){var V=encodeURIComponent(O);V===O&&(V=escape(O)),l=l.split(O).join(V)}}var ie=l.indexOf("#");ie!==-1&&(this.hash=l.substr(ie),l=l.slice(0,ie));var _e=l.indexOf("?");if(_e!==-1?(this.search=l.substr(_e),this.query=l.substr(_e+1),e&&(this.query=hv.parse(this.query)),l=l.slice(0,_e)):e&&(this.search="",this.query={}),l&&(this.pathname=l),qa[f]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var me=this.pathname||"",fe=this.search||"";this.path=me+fe}return this.href=this.format(),this};Zi.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,s="";this.host?i=t+this.host:this.hostname&&(i=t+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(s=hv.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var o=this.search||s&&"?"+s||"";return e&&e.substr(-1)!==":"&&(e+=":"),this.slashes||(!e||qa[e])&&i!==!1?(i="//"+(i||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):i||(i=""),n&&n.charAt(0)!=="#"&&(n="#"+n),o&&o.charAt(0)!=="?"&&(o="?"+o),r=r.replace(/[?#]/g,function(l){return encodeURIComponent(l)}),o=o.replace("#","%23"),e+i+r+o+n};Zi.prototype.resolve=function(t){return this.resolveObject(p4(t,!1,!0)).format()};Zi.prototype.resolveObject=function(t){if(typeof t=="string"){var e=new Zi;e.parse(t,!1,!0),t=e}for(var r=new Zi,n=Object.keys(this),i=0;i<n.length;i++){var s=n[i];r[s]=this[s]}if(r.hash=t.hash,t.href==="")return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var o=Object.keys(t),l=0;l<o.length;l++){var h=o[l];h!=="protocol"&&(r[h]=t[h])}return qa[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!qa[t.protocol]){for(var c=Object.keys(t),f=0;f<c.length;f++){var m=c[f];r[m]=t[m]}return r.href=r.format(),r}if(r.protocol=t.protocol,!t.host&&!uv[t.protocol]){for(var x=(t.pathname||"").split("/");x.length&&!(t.host=x.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),x[0]!==""&&x.unshift(""),x.length<2&&x.unshift(""),r.pathname=x.join("/")}else r.pathname=t.pathname;if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var p=r.pathname||"",v=r.search||"";r.path=p+v}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var _=r.pathname&&r.pathname.charAt(0)==="/",E=t.host||t.pathname&&t.pathname.charAt(0)==="/",T=E||_||r.host&&t.pathname,S=T,b=r.pathname&&r.pathname.split("/")||[],x=t.pathname&&t.pathname.split("/")||[],A=r.protocol&&!qa[r.protocol];if(A&&(r.hostname="",r.port=null,r.host&&(b[0]===""?b[0]=r.host:b.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(x[0]===""?x[0]=t.host:x.unshift(t.host)),t.host=null),T=T&&(x[0]===""||b[0]==="")),E)r.host=t.host||t.host===""?t.host:r.host,r.hostname=t.hostname||t.hostname===""?t.hostname:r.hostname,r.search=t.search,r.query=t.query,b=x;else if(x.length)b||(b=[]),b.pop(),b=b.concat(x),r.search=t.search,r.query=t.query;else if(t.search!=null){if(A){r.host=b.shift(),r.hostname=r.host;var R=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;R&&(r.auth=R.shift(),r.hostname=R.shift(),r.host=r.hostname)}return r.search=t.search,r.query=t.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!b.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var L=b.slice(-1)[0],k=(r.host||t.host||b.length>1)&&(L==="."||L==="..")||L==="",D=0,Q=b.length;Q>=0;Q--)L=b[Q],L==="."?b.splice(Q,1):L===".."?(b.splice(Q,1),D++):D&&(b.splice(Q,1),D--);if(!T&&!S)for(;D--;D)b.unshift("..");T&&b[0]!==""&&(!b[0]||b[0].charAt(0)!=="/")&&b.unshift(""),k&&b.join("/").substr(-1)!=="/"&&b.push("");var $=b[0]===""||b[0]&&b[0].charAt(0)==="/";if(A){r.hostname=$?"":b.length?b.shift():"",r.host=r.hostname;var R=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;R&&(r.auth=R.shift(),r.hostname=R.shift(),r.host=r.hostname)}return T=T||r.host&&b.length,T&&!$&&b.unshift(""),b.length>0?r.pathname=b.join("/"):(r.pathname=null,r.path=null),(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r};Zi.prototype.parseHost=function(){var t=this.host,e=a4.exec(t);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};const eE={};function Ue(t,e,r=3){if(eE[e])return;let n=new Error().stack;typeof n>"u"?console.warn("PixiJS Deprecation Warning: ",`${e}
45
45
  Deprecated since v${t}`):(n=n.split(`
46
46
  `).splice(r).join(`
47
47
  `),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${e}
48
48
  Deprecated since v${t}`),console.warn(n),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${e}
49
- Deprecated since v${t}`),console.warn(n))),eE[e]=!0}function On(t){if(typeof t!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(t)}`)}function ql(t){return t.split("?")[0].split("#")[0]}function m4(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function g4(t,e,r){return t.replace(new RegExp(m4(e),"g"),r)}function y4(t,e){let r="",n=0,i=-1,s=0,o=-1;for(let l=0;l<=t.length;++l){if(l<t.length)o=t.charCodeAt(l);else{if(o===47)break;o=47}if(o===47){if(!(i===l-1||s===1))if(i!==l-1&&s===2){if(r.length<2||n!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){const h=r.lastIndexOf("/");if(h!==r.length-1){h===-1?(r="",n=0):(r=r.slice(0,h),n=r.length-1-r.lastIndexOf("/")),i=l,s=0;continue}}else if(r.length===2||r.length===1){r="",n=0,i=l,s=0;continue}}}else r.length>0?r+=`/${t.slice(i+1,l)}`:r=t.slice(i+1,l),n=l-i-1;i=l,s=0}else o===46&&s!==-1?++s:s=-1}return r}const Kt={toPosix(t){return g4(t,"\\","/")},isUrl(t){return/^https?:/.test(this.toPosix(t))},isDataUrl(t){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(t)},isBlobUrl(t){return t.startsWith("blob:")},hasProtocol(t){return/^[^/:]+:/.test(this.toPosix(t))},getProtocol(t){On(t),t=this.toPosix(t);const e=/^file:\/\/\//.exec(t);if(e)return e[0];const r=/^[^/:]+:\/{0,2}/.exec(t);return r?r[0]:""},toAbsolute(t,e,r){if(On(t),this.isDataUrl(t)||this.isBlobUrl(t))return t;const n=ql(this.toPosix(e??he.ADAPTER.getBaseUrl())),i=ql(this.toPosix(r??this.rootname(n)));return t=this.toPosix(t),t.startsWith("/")?Kt.join(i,t.slice(1)):this.isAbsolute(t)?t:this.join(n,t)},normalize(t){if(On(t),t.length===0)return".";if(this.isDataUrl(t)||this.isBlobUrl(t))return t;t=this.toPosix(t);let e="";const r=t.startsWith("/");this.hasProtocol(t)&&(e=this.rootname(t),t=t.slice(e.length));const n=t.endsWith("/");return t=y4(t),t.length>0&&n&&(t+="/"),r?`/${t}`:e+t},isAbsolute(t){return On(t),t=this.toPosix(t),this.hasProtocol(t)?!0:t.startsWith("/")},join(...t){if(t.length===0)return".";let e;for(let r=0;r<t.length;++r){const n=t[r];if(On(n),n.length>0)if(e===void 0)e=n;else{const i=t[r-1]??"";this.joinExtensions.includes(this.extname(i).toLowerCase())?e+=`/../${n}`:e+=`/${n}`}}return e===void 0?".":this.normalize(e)},dirname(t){if(On(t),t.length===0)return".";t=this.toPosix(t);let e=t.charCodeAt(0);const r=e===47;let n=-1,i=!0;const s=this.getProtocol(t),o=t;t=t.slice(s.length);for(let l=t.length-1;l>=1;--l)if(e=t.charCodeAt(l),e===47){if(!i){n=l;break}}else i=!1;return n===-1?r?"/":this.isUrl(o)?s+t:s:r&&n===1?"//":s+t.slice(0,n)},rootname(t){On(t),t=this.toPosix(t);let e="";if(t.startsWith("/")?e="/":e=this.getProtocol(t),this.isUrl(t)){const r=t.indexOf("/",e.length);r!==-1?e=t.slice(0,r):e=t,e.endsWith("/")||(e+="/")}return e},basename(t,e){On(t),e&&On(e),t=ql(this.toPosix(t));let r=0,n=-1,i=!0,s;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";let o=e.length-1,l=-1;for(s=t.length-1;s>=0;--s){const h=t.charCodeAt(s);if(h===47){if(!i){r=s+1;break}}else l===-1&&(i=!1,l=s+1),o>=0&&(h===e.charCodeAt(o)?--o===-1&&(n=s):(o=-1,n=l))}return r===n?n=l:n===-1&&(n=t.length),t.slice(r,n)}for(s=t.length-1;s>=0;--s)if(t.charCodeAt(s)===47){if(!i){r=s+1;break}}else n===-1&&(i=!1,n=s+1);return n===-1?"":t.slice(r,n)},extname(t){On(t),t=ql(this.toPosix(t));let e=-1,r=0,n=-1,i=!0,s=0;for(let o=t.length-1;o>=0;--o){const l=t.charCodeAt(o);if(l===47){if(!i){r=o+1;break}continue}n===-1&&(i=!1,n=o+1),l===46?e===-1?e=o:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||n===-1||s===0||s===1&&e===n-1&&e===r+1?"":t.slice(e,n)},parse(t){On(t);const e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;t=ql(this.toPosix(t));let r=t.charCodeAt(0);const n=this.isAbsolute(t);let i;e.root=this.rootname(t),n||this.hasProtocol(t)?i=1:i=0;let s=-1,o=0,l=-1,h=!0,c=t.length-1,f=0;for(;c>=i;--c){if(r=t.charCodeAt(c),r===47){if(!h){o=c+1;break}continue}l===-1&&(h=!1,l=c+1),r===46?s===-1?s=c:f!==1&&(f=1):s!==-1&&(f=-1)}return s===-1||l===-1||f===0||f===1&&s===l-1&&s===o+1?l!==-1&&(o===0&&n?e.base=e.name=t.slice(1,l):e.base=e.name=t.slice(o,l)):(o===0&&n?(e.name=t.slice(1,s),e.base=t.slice(1,l)):(e.name=t.slice(o,s),e.base=t.slice(o,l)),e.ext=t.slice(s,l)),e.dir=this.dirname(t),e},sep:"/",delimiter:":",joinExtensions:[".html"]};let Tg;async function v4(){return Tg??(Tg=(async()=>{var s;const t=document.createElement("canvas").getContext("webgl");if(!t)return Br.UNPACK;const e=await new Promise(o=>{const l=document.createElement("video");l.onloadeddata=()=>o(l),l.onerror=()=>o(null),l.autoplay=!1,l.crossOrigin="anonymous",l.preload="auto",l.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",l.load()});if(!e)return Br.UNPACK;const r=t.createTexture();t.bindTexture(t.TEXTURE_2D,r);const n=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,n),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,r,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,e);const i=new Uint8Array(4);return t.readPixels(0,0,1,1,t.RGBA,t.UNSIGNED_BYTE,i),t.deleteFramebuffer(n),t.deleteTexture(r),(s=t.getExtension("WEBGL_lose_context"))==null||s.loseContext(),i[0]<=i[3]?Br.PMA:Br.UNPACK})()),Tg}let Ag;function _4(){return typeof Ag>"u"&&(Ag=function(){var e;const t={stencil:!0,failIfMajorPerformanceCaveat:he.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!he.ADAPTER.getWebGLRenderingContext())return!1;const r=he.ADAPTER.createCanvas();let n=r.getContext("webgl",t)||r.getContext("experimental-webgl",t);const i=!!((e=n==null?void 0:n.getContextAttributes())!=null&&e.stencil);if(n){const s=n.getExtension("WEBGL_lose_context");s&&s.loseContext()}return n=null,i}catch{return!1}}()),Ag}var x4={grad:.9,turn:360,rad:360/(2*Math.PI)},zi=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},Xt=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=Math.pow(10,e)),Math.round(r*t)/r+0},Sn=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=1),t>r?r:t>e?t:e},IA=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},tE=function(t){return{r:Sn(t.r,0,255),g:Sn(t.g,0,255),b:Sn(t.b,0,255),a:Sn(t.a)}},Cg=function(t){return{r:Xt(t.r),g:Xt(t.g),b:Xt(t.b),a:Xt(t.a,3)}},w4=/^#([0-9a-f]{3,8})$/i,Uc=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},RA=function(t){var e=t.r,r=t.g,n=t.b,i=t.a,s=Math.max(e,r,n),o=s-Math.min(e,r,n),l=o?s===e?(r-n)/o:s===r?2+(n-e)/o:4+(e-r)/o:0;return{h:60*(l<0?l+6:l),s:s?o/s*100:0,v:s/255*100,a:i}},MA=function(t){var e=t.h,r=t.s,n=t.v,i=t.a;e=e/360*6,r/=100,n/=100;var s=Math.floor(e),o=n*(1-r),l=n*(1-(e-s)*r),h=n*(1-(1-e+s)*r),c=s%6;return{r:255*[n,l,o,o,h,n][c],g:255*[h,n,n,l,o,o][c],b:255*[o,o,h,n,n,l][c],a:i}},rE=function(t){return{h:IA(t.h),s:Sn(t.s,0,100),l:Sn(t.l,0,100),a:Sn(t.a)}},nE=function(t){return{h:Xt(t.h),s:Xt(t.s),l:Xt(t.l),a:Xt(t.a,3)}},iE=function(t){return MA((r=(e=t).s,{h:e.h,s:(r*=((n=e.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:e.a}));var e,r,n},Pu=function(t){return{h:(e=RA(t)).h,s:(i=(200-(r=e.s))*(n=e.v)/100)>0&&i<200?r*n/100/(i<=100?i:200-i)*100:0,l:i/2,a:e.a};var e,r,n,i},E4=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,S4=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,b4=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,T4=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,cv={string:[[function(t){var e=w4.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?Xt(parseInt(t[3]+t[3],16)/255,2):1}:t.length===6||t.length===8?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:t.length===8?Xt(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=b4.exec(t)||T4.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:tE({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(t){var e=E4.exec(t)||S4.exec(t);if(!e)return null;var r,n,i=rE({h:(r=e[1],n=e[2],n===void 0&&(n="deg"),Number(r)*(x4[n]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return iE(i)},"hsl"]],object:[[function(t){var e=t.r,r=t.g,n=t.b,i=t.a,s=i===void 0?1:i;return zi(e)&&zi(r)&&zi(n)?tE({r:Number(e),g:Number(r),b:Number(n),a:Number(s)}):null},"rgb"],[function(t){var e=t.h,r=t.s,n=t.l,i=t.a,s=i===void 0?1:i;if(!zi(e)||!zi(r)||!zi(n))return null;var o=rE({h:Number(e),s:Number(r),l:Number(n),a:Number(s)});return iE(o)},"hsl"],[function(t){var e=t.h,r=t.s,n=t.v,i=t.a,s=i===void 0?1:i;if(!zi(e)||!zi(r)||!zi(n))return null;var o=function(l){return{h:IA(l.h),s:Sn(l.s,0,100),v:Sn(l.v,0,100),a:Sn(l.a)}}({h:Number(e),s:Number(r),v:Number(n),a:Number(s)});return MA(o)},"hsv"]]},sE=function(t,e){for(var r=0;r<e.length;r++){var n=e[r][0](t);if(n)return[n,e[r][1]]}return[null,void 0]},A4=function(t){return typeof t=="string"?sE(t.trim(),cv.string):typeof t=="object"&&t!==null?sE(t,cv.object):[null,void 0]},Pg=function(t,e){var r=Pu(t);return{h:r.h,s:Sn(r.s+100*e,0,100),l:r.l,a:r.a}},Ig=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},oE=function(t,e){var r=Pu(t);return{h:r.h,s:r.s,l:Sn(r.l+100*e,0,100),a:r.a}},dv=function(){function t(e){this.parsed=A4(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return t.prototype.isValid=function(){return this.parsed!==null},t.prototype.brightness=function(){return Xt(Ig(this.rgba),2)},t.prototype.isDark=function(){return Ig(this.rgba)<.5},t.prototype.isLight=function(){return Ig(this.rgba)>=.5},t.prototype.toHex=function(){return e=Cg(this.rgba),r=e.r,n=e.g,i=e.b,o=(s=e.a)<1?Uc(Xt(255*s)):"","#"+Uc(r)+Uc(n)+Uc(i)+o;var e,r,n,i,s,o},t.prototype.toRgb=function(){return Cg(this.rgba)},t.prototype.toRgbString=function(){return e=Cg(this.rgba),r=e.r,n=e.g,i=e.b,(s=e.a)<1?"rgba("+r+", "+n+", "+i+", "+s+")":"rgb("+r+", "+n+", "+i+")";var e,r,n,i,s},t.prototype.toHsl=function(){return nE(Pu(this.rgba))},t.prototype.toHslString=function(){return e=nE(Pu(this.rgba)),r=e.h,n=e.s,i=e.l,(s=e.a)<1?"hsla("+r+", "+n+"%, "+i+"%, "+s+")":"hsl("+r+", "+n+"%, "+i+"%)";var e,r,n,i,s},t.prototype.toHsv=function(){return e=RA(this.rgba),{h:Xt(e.h),s:Xt(e.s),v:Xt(e.v),a:Xt(e.a,3)};var e},t.prototype.invert=function(){return hi({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},t.prototype.saturate=function(e){return e===void 0&&(e=.1),hi(Pg(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),hi(Pg(this.rgba,-e))},t.prototype.grayscale=function(){return hi(Pg(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),hi(oE(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),hi(oE(this.rgba,-e))},t.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},t.prototype.alpha=function(e){return typeof e=="number"?hi({r:(r=this.rgba).r,g:r.g,b:r.b,a:e}):Xt(this.rgba.a,3);var r},t.prototype.hue=function(e){var r=Pu(this.rgba);return typeof e=="number"?hi({h:e,s:r.s,l:r.l,a:r.a}):Xt(r.h)},t.prototype.isEqual=function(e){return this.toHex()===hi(e).toHex()},t}(),hi=function(t){return t instanceof dv?t:new dv(t)},aE=[],C4=function(t){t.forEach(function(e){aE.indexOf(e)<0&&(e(dv,cv),aE.push(e))})};function P4(t,e){var r={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"},n={};for(var i in r)n[r[i]]=i;var s={};t.prototype.toName=function(o){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var l,h,c=n[this.toHex()];if(c)return c;if(o!=null&&o.closest){var f=this.toRgb(),m=1/0,p="black";if(!s.length)for(var v in r)s[v]=new t(r[v]).toRgb();for(var _ in r){var E=(l=f,h=s[_],Math.pow(l.r-h.r,2)+Math.pow(l.g-h.g,2)+Math.pow(l.b-h.b,2));E<m&&(m=E,p=_)}return p}},e.string.push([function(o){var l=o.toLowerCase(),h=l==="transparent"?"#0000":r[l];return h?new t(h).toRgb():null},"name"])}C4([P4]);const wa=class Id{constructor(e=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=e}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(e){return this.value=e,this}set value(e){if(e instanceof Id)this._value=this.cloneSource(e._value),this._int=e._int,this._components.set(e._components);else{if(e===null)throw new Error("Cannot set PIXI.Color#value to null");(this._value===null||!this.isSourceEqual(this._value,e))&&(this.normalize(e),this._value=this.cloneSource(e))}}get value(){return this._value}cloneSource(e){return typeof e=="string"||typeof e=="number"||e instanceof Number||e===null?e:Array.isArray(e)||ArrayBuffer.isView(e)?e.slice(0):typeof e=="object"&&e!==null?{...e}:e}isSourceEqual(e,r){const n=typeof e;if(n!==typeof r)return!1;if(n==="number"||n==="string"||e instanceof Number)return e===r;if(Array.isArray(e)&&Array.isArray(r)||ArrayBuffer.isView(e)&&ArrayBuffer.isView(r))return e.length!==r.length?!1:e.every((i,s)=>i===r[s]);if(e!==null&&r!==null){const i=Object.keys(e),s=Object.keys(r);return i.length!==s.length?!1:i.every(o=>e[o]===r[o])}return e===r}toRgba(){const[e,r,n,i]=this._components;return{r:e,g:r,b:n,a:i}}toRgb(){const[e,r,n]=this._components;return{r:e,g:r,b:n}}toRgbaString(){const[e,r,n]=this.toUint8RgbArray();return`rgba(${e},${r},${n},${this.alpha})`}toUint8RgbArray(e){const[r,n,i]=this._components;return e=e??[],e[0]=Math.round(r*255),e[1]=Math.round(n*255),e[2]=Math.round(i*255),e}toRgbArray(e){e=e??[];const[r,n,i]=this._components;return e[0]=r,e[1]=n,e[2]=i,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[r,n,i,s]=Id.temp.setValue(e)._components;return this._components[0]*=r,this._components[1]*=n,this._components[2]*=i,this._components[3]*=s,this.refreshInt(),this._value=null,this}premultiply(e,r=!0){return r&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e,r=!0){if(e===1)return(255<<24)+this._int;if(e===0)return r?0:this._int;let n=this._int>>16&255,i=this._int>>8&255,s=this._int&255;return r&&(n=n*e+.5|0,i=i*e+.5|0,s=s*e+.5|0),(e*255<<24)+(n<<16)+(i<<8)+s}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const e=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-e.length)+e}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[r,n,i]=this._components;return this._components[0]=Math.round(r*e)/e,this._components[1]=Math.round(n*e)/e,this._components[2]=Math.round(i*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[r,n,i,s]=this._components;return e[0]=r,e[1]=n,e[2]=i,e[3]=s,e}normalize(e){let r,n,i,s;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const o=e;r=(o>>16&255)/255,n=(o>>8&255)/255,i=(o&255)/255,s=1}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4)e=this._clamp(e),[r,n,i,s=1]=e;else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4)e=this._clamp(e,0,255),[r,n,i,s=255]=e,r/=255,n/=255,i/=255,s/=255;else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const l=Id.HEX_PATTERN.exec(e);l&&(e=`#${l[2]}`)}const o=hi(e);o.isValid()&&({r,g:n,b:i,a:s}=o.rgba,r/=255,n/=255,i/=255)}if(r!==void 0)this._components[0]=r,this._components[1]=n,this._components[2]=i,this._components[3]=s,this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,r,n]=this._components;this._int=(e*255<<16)+(r*255<<8)+(n*255|0)}_clamp(e,r=0,n=1){return typeof e=="number"?Math.min(Math.max(e,r),n):(e.forEach((i,s)=>{e[s]=Math.min(Math.max(i,r),n)}),e)}};wa.shared=new wa,wa.temp=new wa,wa.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let tt=wa;function I4(t){return Ue("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),tt.shared.setValue(t).toHex()}function R4(t){return Ue("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),tt.shared.setValue(t).toNumber()}function M4(){const t=[],e=[];for(let n=0;n<32;n++)t[n]=n,e[n]=n;t[Ie.NORMAL_NPM]=Ie.NORMAL,t[Ie.ADD_NPM]=Ie.ADD,t[Ie.SCREEN_NPM]=Ie.SCREEN,e[Ie.NORMAL]=Ie.NORMAL_NPM,e[Ie.ADD]=Ie.ADD_NPM,e[Ie.SCREEN]=Ie.SCREEN_NPM;const r=[];return r.push(e),r.push(t),r}const kA=M4();function NA(t,e){return kA[e?1:0][t]}function k4(t,e=null){const r=t*6;if(e=e||new Uint16Array(r),e.length!==r)throw new Error(`Out buffer length is incorrect, got ${e.length} and expected ${r}`);for(let n=0,i=0;n<r;n+=6,i+=4)e[n+0]=i+0,e[n+1]=i+1,e[n+2]=i+2,e[n+3]=i+0,e[n+4]=i+2,e[n+5]=i+3;return e}function DA(t){if(t.BYTES_PER_ELEMENT===4)return t instanceof Float32Array?"Float32Array":t instanceof Uint32Array?"Uint32Array":"Int32Array";if(t.BYTES_PER_ELEMENT===2){if(t instanceof Uint16Array)return"Uint16Array"}else if(t.BYTES_PER_ELEMENT===1&&t instanceof Uint8Array)return"Uint8Array";return null}function pf(t){return t+=t===0?1:0,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t+1}function lE(t){return!(t&t-1)&&!!t}function uE(t){let e=(t>65535?1:0)<<4;t>>>=e;let r=(t>255?1:0)<<3;return t>>>=r,e|=r,r=(t>15?1:0)<<2,t>>>=r,e|=r,r=(t>3?1:0)<<1,t>>>=r,e|=r,e|t>>1}function Za(t,e,r){const n=t.length;let i;if(e>=n||r===0)return;r=e+r>n?n-e:r;const s=n-r;for(i=e;i<s;++i)t[i]=t[i+r];t.length=s}function Ds(t){return t===0?0:t<0?-1:1}let N4=0;function $o(){return++N4}const fv=class{constructor(t,e,r,n){this.left=t,this.top=e,this.right=r,this.bottom=n}get width(){return this.right-this.left}get height(){return this.bottom-this.top}isEmpty(){return this.left===this.right||this.top===this.bottom}};fv.EMPTY=new fv(0,0,0,0);let hE=fv;const cE={},ci=Object.create(null),Es=Object.create(null);class D4{constructor(e,r,n){this._canvas=he.ADAPTER.createCanvas(),this._context=this._canvas.getContext("2d"),this.resolution=n||he.RESOLUTION,this.resize(e,r)}clear(){this._checkDestroyed(),this._context.setTransform(1,0,0,1,0,0),this._context.clearRect(0,0,this._canvas.width,this._canvas.height)}resize(e,r){this._checkDestroyed(),this._canvas.width=Math.round(e*this.resolution),this._canvas.height=Math.round(r*this.resolution)}destroy(){this._context=null,this._canvas=null}get width(){return this._checkDestroyed(),this._canvas.width}set width(e){this._checkDestroyed(),this._canvas.width=Math.round(e)}get height(){return this._checkDestroyed(),this._canvas.height}set height(e){this._checkDestroyed(),this._canvas.height=Math.round(e)}get canvas(){return this._checkDestroyed(),this._canvas}get context(){return this._checkDestroyed(),this._context}_checkDestroyed(){if(this._canvas===null)throw new TypeError("The CanvasRenderTarget has already been destroyed")}}function dE(t,e,r){for(let n=0,i=4*r*e;n<e;++n,i+=4)if(t[i+3]!==0)return!1;return!0}function fE(t,e,r,n,i){const s=4*e;for(let o=n,l=n*s+4*r;o<=i;++o,l+=s)if(t[l+3]!==0)return!1;return!0}function O4(t){const{width:e,height:r}=t,n=t.getContext("2d",{willReadFrequently:!0});if(n===null)throw new TypeError("Failed to get canvas 2D context");const i=n.getImageData(0,0,e,r).data;let s=0,o=0,l=e-1,h=r-1;for(;o<r&&dE(i,e,o);)++o;if(o===r)return hE.EMPTY;for(;dE(i,e,h);)--h;for(;fE(i,e,s,o,h);)++s;for(;fE(i,e,l,o,h);)--l;return++l,++h,new hE(s,o,l,h)}function F4(t){const e=O4(t),{width:r,height:n}=e;let i=null;if(!e.isEmpty()){const s=t.getContext("2d");if(s===null)throw new TypeError("Failed to get canvas 2D context");i=s.getImageData(e.left,e.top,r,n)}return{width:r,height:n,data:i}}function B4(t,e=globalThis.location){if(t.startsWith("data:"))return"";e=e||globalThis.location;const r=new URL(t,document.baseURI);return r.hostname!==e.hostname||r.port!==e.port||r.protocol!==e.protocol?"anonymous":""}function ns(t,e=1){var n;const r=(n=he.RETINA_PREFIX)==null?void 0:n.exec(t);return r?parseFloat(r[1]):e}var ae=(t=>(t.Renderer="renderer",t.Application="application",t.RendererSystem="renderer-webgl-system",t.RendererPlugin="renderer-webgl-plugin",t.CanvasRendererSystem="renderer-canvas-system",t.CanvasRendererPlugin="renderer-canvas-plugin",t.Asset="asset",t.LoadParser="load-parser",t.ResolveParser="resolve-parser",t.CacheParser="cache-parser",t.DetectionParser="detection-parser",t))(ae||{});const pv=t=>{if(typeof t=="function"||typeof t=="object"&&t.extension){if(!t.extension)throw new Error("Extension class must have an extension object");t={...typeof t.extension!="object"?{type:t.extension}:t.extension,ref:t}}if(typeof t=="object")t={...t};else throw new Error("Invalid extension type");return typeof t.type=="string"&&(t.type=[t.type]),t},pE=(t,e)=>pv(t).priority??e,we={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...t){return t.map(pv).forEach(e=>{e.type.forEach(r=>{var n,i;return(i=(n=this._removeHandlers)[r])==null?void 0:i.call(n,e)})}),this},add(...t){return t.map(pv).forEach(e=>{e.type.forEach(r=>{var s,o;const n=this._addHandlers,i=this._queue;n[r]?(s=n[r])==null||s.call(n,e):(i[r]=i[r]||[],(o=i[r])==null||o.push(e))})}),this},handle(t,e,r){var o;const n=this._addHandlers,i=this._removeHandlers;if(n[t]||i[t])throw new Error(`Extension type ${t} already has a handler`);n[t]=e,i[t]=r;const s=this._queue;return s[t]&&((o=s[t])==null||o.forEach(l=>e(l)),delete s[t]),this},handleByMap(t,e){return this.handle(t,r=>{r.name&&(e[r.name]=r.ref)},r=>{r.name&&delete e[r.name]})},handleByList(t,e,r=-1){return this.handle(t,n=>{e.includes(n.ref)||(e.push(n.ref),e.sort((i,s)=>pE(s,r)-pE(i,r)))},n=>{const i=e.indexOf(n.ref);i!==-1&&e.splice(i,1)})}};class mv{constructor(e){typeof e=="number"?this.rawBinaryData=new ArrayBuffer(e):e instanceof Uint8Array?this.rawBinaryData=e.buffer:this.rawBinaryData=e,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}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 uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(e){return this[`${e}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(e){switch(e){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${e} isn't a valid view type`)}}}const L4=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
49
+ Deprecated since v${t}`),console.warn(n))),eE[e]=!0}function On(t){if(typeof t!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(t)}`)}function ql(t){return t.split("?")[0].split("#")[0]}function m4(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function g4(t,e,r){return t.replace(new RegExp(m4(e),"g"),r)}function y4(t,e){let r="",n=0,i=-1,s=0,o=-1;for(let l=0;l<=t.length;++l){if(l<t.length)o=t.charCodeAt(l);else{if(o===47)break;o=47}if(o===47){if(!(i===l-1||s===1))if(i!==l-1&&s===2){if(r.length<2||n!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){const h=r.lastIndexOf("/");if(h!==r.length-1){h===-1?(r="",n=0):(r=r.slice(0,h),n=r.length-1-r.lastIndexOf("/")),i=l,s=0;continue}}else if(r.length===2||r.length===1){r="",n=0,i=l,s=0;continue}}}else r.length>0?r+=`/${t.slice(i+1,l)}`:r=t.slice(i+1,l),n=l-i-1;i=l,s=0}else o===46&&s!==-1?++s:s=-1}return r}const Kt={toPosix(t){return g4(t,"\\","/")},isUrl(t){return/^https?:/.test(this.toPosix(t))},isDataUrl(t){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(t)},isBlobUrl(t){return t.startsWith("blob:")},hasProtocol(t){return/^[^/:]+:/.test(this.toPosix(t))},getProtocol(t){On(t),t=this.toPosix(t);const e=/^file:\/\/\//.exec(t);if(e)return e[0];const r=/^[^/:]+:\/{0,2}/.exec(t);return r?r[0]:""},toAbsolute(t,e,r){if(On(t),this.isDataUrl(t)||this.isBlobUrl(t))return t;const n=ql(this.toPosix(e??he.ADAPTER.getBaseUrl())),i=ql(this.toPosix(r??this.rootname(n)));return t=this.toPosix(t),t.startsWith("/")?Kt.join(i,t.slice(1)):this.isAbsolute(t)?t:this.join(n,t)},normalize(t){if(On(t),t.length===0)return".";if(this.isDataUrl(t)||this.isBlobUrl(t))return t;t=this.toPosix(t);let e="";const r=t.startsWith("/");this.hasProtocol(t)&&(e=this.rootname(t),t=t.slice(e.length));const n=t.endsWith("/");return t=y4(t),t.length>0&&n&&(t+="/"),r?`/${t}`:e+t},isAbsolute(t){return On(t),t=this.toPosix(t),this.hasProtocol(t)?!0:t.startsWith("/")},join(...t){if(t.length===0)return".";let e;for(let r=0;r<t.length;++r){const n=t[r];if(On(n),n.length>0)if(e===void 0)e=n;else{const i=t[r-1]??"";this.joinExtensions.includes(this.extname(i).toLowerCase())?e+=`/../${n}`:e+=`/${n}`}}return e===void 0?".":this.normalize(e)},dirname(t){if(On(t),t.length===0)return".";t=this.toPosix(t);let e=t.charCodeAt(0);const r=e===47;let n=-1,i=!0;const s=this.getProtocol(t),o=t;t=t.slice(s.length);for(let l=t.length-1;l>=1;--l)if(e=t.charCodeAt(l),e===47){if(!i){n=l;break}}else i=!1;return n===-1?r?"/":this.isUrl(o)?s+t:s:r&&n===1?"//":s+t.slice(0,n)},rootname(t){On(t),t=this.toPosix(t);let e="";if(t.startsWith("/")?e="/":e=this.getProtocol(t),this.isUrl(t)){const r=t.indexOf("/",e.length);r!==-1?e=t.slice(0,r):e=t,e.endsWith("/")||(e+="/")}return e},basename(t,e){On(t),e&&On(e),t=ql(this.toPosix(t));let r=0,n=-1,i=!0,s;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";let o=e.length-1,l=-1;for(s=t.length-1;s>=0;--s){const h=t.charCodeAt(s);if(h===47){if(!i){r=s+1;break}}else l===-1&&(i=!1,l=s+1),o>=0&&(h===e.charCodeAt(o)?--o===-1&&(n=s):(o=-1,n=l))}return r===n?n=l:n===-1&&(n=t.length),t.slice(r,n)}for(s=t.length-1;s>=0;--s)if(t.charCodeAt(s)===47){if(!i){r=s+1;break}}else n===-1&&(i=!1,n=s+1);return n===-1?"":t.slice(r,n)},extname(t){On(t),t=ql(this.toPosix(t));let e=-1,r=0,n=-1,i=!0,s=0;for(let o=t.length-1;o>=0;--o){const l=t.charCodeAt(o);if(l===47){if(!i){r=o+1;break}continue}n===-1&&(i=!1,n=o+1),l===46?e===-1?e=o:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||n===-1||s===0||s===1&&e===n-1&&e===r+1?"":t.slice(e,n)},parse(t){On(t);const e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;t=ql(this.toPosix(t));let r=t.charCodeAt(0);const n=this.isAbsolute(t);let i;e.root=this.rootname(t),n||this.hasProtocol(t)?i=1:i=0;let s=-1,o=0,l=-1,h=!0,c=t.length-1,f=0;for(;c>=i;--c){if(r=t.charCodeAt(c),r===47){if(!h){o=c+1;break}continue}l===-1&&(h=!1,l=c+1),r===46?s===-1?s=c:f!==1&&(f=1):s!==-1&&(f=-1)}return s===-1||l===-1||f===0||f===1&&s===l-1&&s===o+1?l!==-1&&(o===0&&n?e.base=e.name=t.slice(1,l):e.base=e.name=t.slice(o,l)):(o===0&&n?(e.name=t.slice(1,s),e.base=t.slice(1,l)):(e.name=t.slice(o,s),e.base=t.slice(o,l)),e.ext=t.slice(s,l)),e.dir=this.dirname(t),e},sep:"/",delimiter:":",joinExtensions:[".html"]};let Tg;async function v4(){return Tg??(Tg=(async()=>{var s;const t=document.createElement("canvas").getContext("webgl");if(!t)return Br.UNPACK;const e=await new Promise(o=>{const l=document.createElement("video");l.onloadeddata=()=>o(l),l.onerror=()=>o(null),l.autoplay=!1,l.crossOrigin="anonymous",l.preload="auto",l.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",l.load()});if(!e)return Br.UNPACK;const r=t.createTexture();t.bindTexture(t.TEXTURE_2D,r);const n=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,n),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,r,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,e);const i=new Uint8Array(4);return t.readPixels(0,0,1,1,t.RGBA,t.UNSIGNED_BYTE,i),t.deleteFramebuffer(n),t.deleteTexture(r),(s=t.getExtension("WEBGL_lose_context"))==null||s.loseContext(),i[0]<=i[3]?Br.PMA:Br.UNPACK})()),Tg}let Ag;function _4(){return typeof Ag>"u"&&(Ag=function(){var e;const t={stencil:!0,failIfMajorPerformanceCaveat:he.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!he.ADAPTER.getWebGLRenderingContext())return!1;const r=he.ADAPTER.createCanvas();let n=r.getContext("webgl",t)||r.getContext("experimental-webgl",t);const i=!!((e=n==null?void 0:n.getContextAttributes())!=null&&e.stencil);if(n){const s=n.getExtension("WEBGL_lose_context");s&&s.loseContext()}return n=null,i}catch{return!1}}()),Ag}var x4={grad:.9,turn:360,rad:360/(2*Math.PI)},zi=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},Xt=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=Math.pow(10,e)),Math.round(r*t)/r+0},Sn=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=1),t>r?r:t>e?t:e},IA=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},tE=function(t){return{r:Sn(t.r,0,255),g:Sn(t.g,0,255),b:Sn(t.b,0,255),a:Sn(t.a)}},Cg=function(t){return{r:Xt(t.r),g:Xt(t.g),b:Xt(t.b),a:Xt(t.a,3)}},w4=/^#([0-9a-f]{3,8})$/i,Uc=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},RA=function(t){var e=t.r,r=t.g,n=t.b,i=t.a,s=Math.max(e,r,n),o=s-Math.min(e,r,n),l=o?s===e?(r-n)/o:s===r?2+(n-e)/o:4+(e-r)/o:0;return{h:60*(l<0?l+6:l),s:s?o/s*100:0,v:s/255*100,a:i}},MA=function(t){var e=t.h,r=t.s,n=t.v,i=t.a;e=e/360*6,r/=100,n/=100;var s=Math.floor(e),o=n*(1-r),l=n*(1-(e-s)*r),h=n*(1-(1-e+s)*r),c=s%6;return{r:255*[n,l,o,o,h,n][c],g:255*[h,n,n,l,o,o][c],b:255*[o,o,h,n,n,l][c],a:i}},rE=function(t){return{h:IA(t.h),s:Sn(t.s,0,100),l:Sn(t.l,0,100),a:Sn(t.a)}},nE=function(t){return{h:Xt(t.h),s:Xt(t.s),l:Xt(t.l),a:Xt(t.a,3)}},iE=function(t){return MA((r=(e=t).s,{h:e.h,s:(r*=((n=e.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:e.a}));var e,r,n},Pu=function(t){return{h:(e=RA(t)).h,s:(i=(200-(r=e.s))*(n=e.v)/100)>0&&i<200?r*n/100/(i<=100?i:200-i)*100:0,l:i/2,a:e.a};var e,r,n,i},E4=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,S4=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,b4=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,T4=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,cv={string:[[function(t){var e=w4.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?Xt(parseInt(t[3]+t[3],16)/255,2):1}:t.length===6||t.length===8?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:t.length===8?Xt(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=b4.exec(t)||T4.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:tE({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(t){var e=E4.exec(t)||S4.exec(t);if(!e)return null;var r,n,i=rE({h:(r=e[1],n=e[2],n===void 0&&(n="deg"),Number(r)*(x4[n]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return iE(i)},"hsl"]],object:[[function(t){var e=t.r,r=t.g,n=t.b,i=t.a,s=i===void 0?1:i;return zi(e)&&zi(r)&&zi(n)?tE({r:Number(e),g:Number(r),b:Number(n),a:Number(s)}):null},"rgb"],[function(t){var e=t.h,r=t.s,n=t.l,i=t.a,s=i===void 0?1:i;if(!zi(e)||!zi(r)||!zi(n))return null;var o=rE({h:Number(e),s:Number(r),l:Number(n),a:Number(s)});return iE(o)},"hsl"],[function(t){var e=t.h,r=t.s,n=t.v,i=t.a,s=i===void 0?1:i;if(!zi(e)||!zi(r)||!zi(n))return null;var o=function(l){return{h:IA(l.h),s:Sn(l.s,0,100),v:Sn(l.v,0,100),a:Sn(l.a)}}({h:Number(e),s:Number(r),v:Number(n),a:Number(s)});return MA(o)},"hsv"]]},sE=function(t,e){for(var r=0;r<e.length;r++){var n=e[r][0](t);if(n)return[n,e[r][1]]}return[null,void 0]},A4=function(t){return typeof t=="string"?sE(t.trim(),cv.string):typeof t=="object"&&t!==null?sE(t,cv.object):[null,void 0]},Pg=function(t,e){var r=Pu(t);return{h:r.h,s:Sn(r.s+100*e,0,100),l:r.l,a:r.a}},Ig=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},oE=function(t,e){var r=Pu(t);return{h:r.h,s:r.s,l:Sn(r.l+100*e,0,100),a:r.a}},dv=function(){function t(e){this.parsed=A4(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return t.prototype.isValid=function(){return this.parsed!==null},t.prototype.brightness=function(){return Xt(Ig(this.rgba),2)},t.prototype.isDark=function(){return Ig(this.rgba)<.5},t.prototype.isLight=function(){return Ig(this.rgba)>=.5},t.prototype.toHex=function(){return e=Cg(this.rgba),r=e.r,n=e.g,i=e.b,o=(s=e.a)<1?Uc(Xt(255*s)):"","#"+Uc(r)+Uc(n)+Uc(i)+o;var e,r,n,i,s,o},t.prototype.toRgb=function(){return Cg(this.rgba)},t.prototype.toRgbString=function(){return e=Cg(this.rgba),r=e.r,n=e.g,i=e.b,(s=e.a)<1?"rgba("+r+", "+n+", "+i+", "+s+")":"rgb("+r+", "+n+", "+i+")";var e,r,n,i,s},t.prototype.toHsl=function(){return nE(Pu(this.rgba))},t.prototype.toHslString=function(){return e=nE(Pu(this.rgba)),r=e.h,n=e.s,i=e.l,(s=e.a)<1?"hsla("+r+", "+n+"%, "+i+"%, "+s+")":"hsl("+r+", "+n+"%, "+i+"%)";var e,r,n,i,s},t.prototype.toHsv=function(){return e=RA(this.rgba),{h:Xt(e.h),s:Xt(e.s),v:Xt(e.v),a:Xt(e.a,3)};var e},t.prototype.invert=function(){return hi({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},t.prototype.saturate=function(e){return e===void 0&&(e=.1),hi(Pg(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),hi(Pg(this.rgba,-e))},t.prototype.grayscale=function(){return hi(Pg(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),hi(oE(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),hi(oE(this.rgba,-e))},t.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},t.prototype.alpha=function(e){return typeof e=="number"?hi({r:(r=this.rgba).r,g:r.g,b:r.b,a:e}):Xt(this.rgba.a,3);var r},t.prototype.hue=function(e){var r=Pu(this.rgba);return typeof e=="number"?hi({h:e,s:r.s,l:r.l,a:r.a}):Xt(r.h)},t.prototype.isEqual=function(e){return this.toHex()===hi(e).toHex()},t}(),hi=function(t){return t instanceof dv?t:new dv(t)},aE=[],C4=function(t){t.forEach(function(e){aE.indexOf(e)<0&&(e(dv,cv),aE.push(e))})};function P4(t,e){var r={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"},n={};for(var i in r)n[r[i]]=i;var s={};t.prototype.toName=function(o){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var l,h,c=n[this.toHex()];if(c)return c;if(o!=null&&o.closest){var f=this.toRgb(),m=1/0,p="black";if(!s.length)for(var v in r)s[v]=new t(r[v]).toRgb();for(var _ in r){var E=(l=f,h=s[_],Math.pow(l.r-h.r,2)+Math.pow(l.g-h.g,2)+Math.pow(l.b-h.b,2));E<m&&(m=E,p=_)}return p}},e.string.push([function(o){var l=o.toLowerCase(),h=l==="transparent"?"#0000":r[l];return h?new t(h).toRgb():null},"name"])}C4([P4]);const wa=class Id{constructor(e=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=e}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(e){return this.value=e,this}set value(e){if(e instanceof Id)this._value=this.cloneSource(e._value),this._int=e._int,this._components.set(e._components);else{if(e===null)throw new Error("Cannot set PIXI.Color#value to null");(this._value===null||!this.isSourceEqual(this._value,e))&&(this.normalize(e),this._value=this.cloneSource(e))}}get value(){return this._value}cloneSource(e){return typeof e=="string"||typeof e=="number"||e instanceof Number||e===null?e:Array.isArray(e)||ArrayBuffer.isView(e)?e.slice(0):typeof e=="object"&&e!==null?{...e}:e}isSourceEqual(e,r){const n=typeof e;if(n!==typeof r)return!1;if(n==="number"||n==="string"||e instanceof Number)return e===r;if(Array.isArray(e)&&Array.isArray(r)||ArrayBuffer.isView(e)&&ArrayBuffer.isView(r))return e.length!==r.length?!1:e.every((i,s)=>i===r[s]);if(e!==null&&r!==null){const i=Object.keys(e),s=Object.keys(r);return i.length!==s.length?!1:i.every(o=>e[o]===r[o])}return e===r}toRgba(){const[e,r,n,i]=this._components;return{r:e,g:r,b:n,a:i}}toRgb(){const[e,r,n]=this._components;return{r:e,g:r,b:n}}toRgbaString(){const[e,r,n]=this.toUint8RgbArray();return`rgba(${e},${r},${n},${this.alpha})`}toUint8RgbArray(e){const[r,n,i]=this._components;return e=e??[],e[0]=Math.round(r*255),e[1]=Math.round(n*255),e[2]=Math.round(i*255),e}toRgbArray(e){e=e??[];const[r,n,i]=this._components;return e[0]=r,e[1]=n,e[2]=i,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[r,n,i,s]=Id.temp.setValue(e)._components;return this._components[0]*=r,this._components[1]*=n,this._components[2]*=i,this._components[3]*=s,this.refreshInt(),this._value=null,this}premultiply(e,r=!0){return r&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e,r=!0){if(e===1)return(255<<24)+this._int;if(e===0)return r?0:this._int;let n=this._int>>16&255,i=this._int>>8&255,s=this._int&255;return r&&(n=n*e+.5|0,i=i*e+.5|0,s=s*e+.5|0),(e*255<<24)+(n<<16)+(i<<8)+s}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const e=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-e.length)+e}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[r,n,i]=this._components;return this._components[0]=Math.round(r*e)/e,this._components[1]=Math.round(n*e)/e,this._components[2]=Math.round(i*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[r,n,i,s]=this._components;return e[0]=r,e[1]=n,e[2]=i,e[3]=s,e}normalize(e){let r,n,i,s;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const o=e;r=(o>>16&255)/255,n=(o>>8&255)/255,i=(o&255)/255,s=1}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4)e=this._clamp(e),[r,n,i,s=1]=e;else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4)e=this._clamp(e,0,255),[r,n,i,s=255]=e,r/=255,n/=255,i/=255,s/=255;else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const l=Id.HEX_PATTERN.exec(e);l&&(e=`#${l[2]}`)}const o=hi(e);o.isValid()&&({r,g:n,b:i,a:s}=o.rgba,r/=255,n/=255,i/=255)}if(r!==void 0)this._components[0]=r,this._components[1]=n,this._components[2]=i,this._components[3]=s,this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,r,n]=this._components;this._int=(e*255<<16)+(r*255<<8)+(n*255|0)}_clamp(e,r=0,n=1){return typeof e=="number"?Math.min(Math.max(e,r),n):(e.forEach((i,s)=>{e[s]=Math.min(Math.max(i,r),n)}),e)}};wa.shared=new wa,wa.temp=new wa,wa.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let tt=wa;function I4(t){return Ue("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),tt.shared.setValue(t).toHex()}function R4(t){return Ue("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),tt.shared.setValue(t).toNumber()}function M4(){const t=[],e=[];for(let n=0;n<32;n++)t[n]=n,e[n]=n;t[Re.NORMAL_NPM]=Re.NORMAL,t[Re.ADD_NPM]=Re.ADD,t[Re.SCREEN_NPM]=Re.SCREEN,e[Re.NORMAL]=Re.NORMAL_NPM,e[Re.ADD]=Re.ADD_NPM,e[Re.SCREEN]=Re.SCREEN_NPM;const r=[];return r.push(e),r.push(t),r}const kA=M4();function NA(t,e){return kA[e?1:0][t]}function k4(t,e=null){const r=t*6;if(e=e||new Uint16Array(r),e.length!==r)throw new Error(`Out buffer length is incorrect, got ${e.length} and expected ${r}`);for(let n=0,i=0;n<r;n+=6,i+=4)e[n+0]=i+0,e[n+1]=i+1,e[n+2]=i+2,e[n+3]=i+0,e[n+4]=i+2,e[n+5]=i+3;return e}function DA(t){if(t.BYTES_PER_ELEMENT===4)return t instanceof Float32Array?"Float32Array":t instanceof Uint32Array?"Uint32Array":"Int32Array";if(t.BYTES_PER_ELEMENT===2){if(t instanceof Uint16Array)return"Uint16Array"}else if(t.BYTES_PER_ELEMENT===1&&t instanceof Uint8Array)return"Uint8Array";return null}function pf(t){return t+=t===0?1:0,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t+1}function lE(t){return!(t&t-1)&&!!t}function uE(t){let e=(t>65535?1:0)<<4;t>>>=e;let r=(t>255?1:0)<<3;return t>>>=r,e|=r,r=(t>15?1:0)<<2,t>>>=r,e|=r,r=(t>3?1:0)<<1,t>>>=r,e|=r,e|t>>1}function Za(t,e,r){const n=t.length;let i;if(e>=n||r===0)return;r=e+r>n?n-e:r;const s=n-r;for(i=e;i<s;++i)t[i]=t[i+r];t.length=s}function Ds(t){return t===0?0:t<0?-1:1}let N4=0;function $o(){return++N4}const fv=class{constructor(t,e,r,n){this.left=t,this.top=e,this.right=r,this.bottom=n}get width(){return this.right-this.left}get height(){return this.bottom-this.top}isEmpty(){return this.left===this.right||this.top===this.bottom}};fv.EMPTY=new fv(0,0,0,0);let hE=fv;const cE={},ci=Object.create(null),Es=Object.create(null);class D4{constructor(e,r,n){this._canvas=he.ADAPTER.createCanvas(),this._context=this._canvas.getContext("2d"),this.resolution=n||he.RESOLUTION,this.resize(e,r)}clear(){this._checkDestroyed(),this._context.setTransform(1,0,0,1,0,0),this._context.clearRect(0,0,this._canvas.width,this._canvas.height)}resize(e,r){this._checkDestroyed(),this._canvas.width=Math.round(e*this.resolution),this._canvas.height=Math.round(r*this.resolution)}destroy(){this._context=null,this._canvas=null}get width(){return this._checkDestroyed(),this._canvas.width}set width(e){this._checkDestroyed(),this._canvas.width=Math.round(e)}get height(){return this._checkDestroyed(),this._canvas.height}set height(e){this._checkDestroyed(),this._canvas.height=Math.round(e)}get canvas(){return this._checkDestroyed(),this._canvas}get context(){return this._checkDestroyed(),this._context}_checkDestroyed(){if(this._canvas===null)throw new TypeError("The CanvasRenderTarget has already been destroyed")}}function dE(t,e,r){for(let n=0,i=4*r*e;n<e;++n,i+=4)if(t[i+3]!==0)return!1;return!0}function fE(t,e,r,n,i){const s=4*e;for(let o=n,l=n*s+4*r;o<=i;++o,l+=s)if(t[l+3]!==0)return!1;return!0}function O4(t){const{width:e,height:r}=t,n=t.getContext("2d",{willReadFrequently:!0});if(n===null)throw new TypeError("Failed to get canvas 2D context");const i=n.getImageData(0,0,e,r).data;let s=0,o=0,l=e-1,h=r-1;for(;o<r&&dE(i,e,o);)++o;if(o===r)return hE.EMPTY;for(;dE(i,e,h);)--h;for(;fE(i,e,s,o,h);)++s;for(;fE(i,e,l,o,h);)--l;return++l,++h,new hE(s,o,l,h)}function F4(t){const e=O4(t),{width:r,height:n}=e;let i=null;if(!e.isEmpty()){const s=t.getContext("2d");if(s===null)throw new TypeError("Failed to get canvas 2D context");i=s.getImageData(e.left,e.top,r,n)}return{width:r,height:n,data:i}}function B4(t,e=globalThis.location){if(t.startsWith("data:"))return"";e=e||globalThis.location;const r=new URL(t,document.baseURI);return r.hostname!==e.hostname||r.port!==e.port||r.protocol!==e.protocol?"anonymous":""}function ns(t,e=1){var n;const r=(n=he.RETINA_PREFIX)==null?void 0:n.exec(t);return r?parseFloat(r[1]):e}var ae=(t=>(t.Renderer="renderer",t.Application="application",t.RendererSystem="renderer-webgl-system",t.RendererPlugin="renderer-webgl-plugin",t.CanvasRendererSystem="renderer-canvas-system",t.CanvasRendererPlugin="renderer-canvas-plugin",t.Asset="asset",t.LoadParser="load-parser",t.ResolveParser="resolve-parser",t.CacheParser="cache-parser",t.DetectionParser="detection-parser",t))(ae||{});const pv=t=>{if(typeof t=="function"||typeof t=="object"&&t.extension){if(!t.extension)throw new Error("Extension class must have an extension object");t={...typeof t.extension!="object"?{type:t.extension}:t.extension,ref:t}}if(typeof t=="object")t={...t};else throw new Error("Invalid extension type");return typeof t.type=="string"&&(t.type=[t.type]),t},pE=(t,e)=>pv(t).priority??e,we={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...t){return t.map(pv).forEach(e=>{e.type.forEach(r=>{var n,i;return(i=(n=this._removeHandlers)[r])==null?void 0:i.call(n,e)})}),this},add(...t){return t.map(pv).forEach(e=>{e.type.forEach(r=>{var s,o;const n=this._addHandlers,i=this._queue;n[r]?(s=n[r])==null||s.call(n,e):(i[r]=i[r]||[],(o=i[r])==null||o.push(e))})}),this},handle(t,e,r){var o;const n=this._addHandlers,i=this._removeHandlers;if(n[t]||i[t])throw new Error(`Extension type ${t} already has a handler`);n[t]=e,i[t]=r;const s=this._queue;return s[t]&&((o=s[t])==null||o.forEach(l=>e(l)),delete s[t]),this},handleByMap(t,e){return this.handle(t,r=>{r.name&&(e[r.name]=r.ref)},r=>{r.name&&delete e[r.name]})},handleByList(t,e,r=-1){return this.handle(t,n=>{e.includes(n.ref)||(e.push(n.ref),e.sort((i,s)=>pE(s,r)-pE(i,r)))},n=>{const i=e.indexOf(n.ref);i!==-1&&e.splice(i,1)})}};class mv{constructor(e){typeof e=="number"?this.rawBinaryData=new ArrayBuffer(e):e instanceof Uint8Array?this.rawBinaryData=e.buffer:this.rawBinaryData=e,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}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 uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(e){return this[`${e}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(e){switch(e){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${e} isn't a valid view type`)}}}const L4=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
50
50
  `);function U4(t){let e="";for(let r=0;r<t;++r)r>0&&(e+=`
51
- else `),r<t-1&&(e+=`if(test == ${r}.0){}`);return e}function z4(t,e){if(t===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const r=e.createShader(e.FRAGMENT_SHADER);for(;;){const n=L4.replace(/%forloop%/gi,U4(t));if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))t=t/2|0;else break}return t}const Rg=0,Mg=1,kg=2,Ng=3,Dg=4,Og=5;class Mi{constructor(){this.data=0,this.blendMode=Ie.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Rg)}set blend(e){!!(this.data&1<<Rg)!==e&&(this.data^=1<<Rg)}get offsets(){return!!(this.data&1<<Mg)}set offsets(e){!!(this.data&1<<Mg)!==e&&(this.data^=1<<Mg)}get culling(){return!!(this.data&1<<kg)}set culling(e){!!(this.data&1<<kg)!==e&&(this.data^=1<<kg)}get depthTest(){return!!(this.data&1<<Ng)}set depthTest(e){!!(this.data&1<<Ng)!==e&&(this.data^=1<<Ng)}get depthMask(){return!!(this.data&1<<Og)}set depthMask(e){!!(this.data&1<<Og)!==e&&(this.data^=1<<Og)}get clockwiseFrontFace(){return!!(this.data&1<<Dg)}set clockwiseFrontFace(e){!!(this.data&1<<Dg)!==e&&(this.data^=1<<Dg)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!==Ie.NONE,this._blendMode=e}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}static for2d(){const e=new Mi;return e.depthTest=!1,e.blend=!0,e}}Mi.prototype.toString=function(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`};const gv=[];function OA(t,e){if(!t)return null;let r="";if(typeof t=="string"){const n=/\.(\w{3,4})(?:$|\?|#)/i.exec(t);n&&(r=n[1].toLowerCase())}for(let n=gv.length-1;n>=0;--n){const i=gv[n];if(i.test&&i.test(t,r))return new i(t,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class Yn{constructor(e){this.items=[],this._name=e,this._aliasCount=0}emit(e,r,n,i,s,o,l,h){if(arguments.length>8)throw new Error("max arguments reached");const{name:c,items:f}=this;this._aliasCount++;for(let m=0,p=f.length;m<p;m++)f[m][c](e,r,n,i,s,o,l,h);return f===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this}remove(e){const r=this.items.indexOf(e);return r!==-1&&(this.ensureNonAliasedItems(),this.items.splice(r,1)),this}contains(e){return this.items.includes(e)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items.length=0,this._name=""}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(Yn.prototype,{dispatch:{value:Yn.prototype.emit},run:{value:Yn.prototype.emit}});class qu{constructor(e=0,r=0){this._width=e,this._height=r,this.destroyed=!1,this.internal=!1,this.onResize=new Yn("setRealSize"),this.onUpdate=new Yn("update"),this.onError=new Yn("onError")}bind(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)}resize(e,r){(e!==this._width||r!==this._height)&&(this._width=e,this._height=r,this.onResize.emit(e,r))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(e,r,n){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(e,r){return!1}}class np extends qu{constructor(e,r){const{width:n,height:i}=r||{};if(!n||!i)throw new Error("BufferResource width or height invalid");super(n,i),this.data=e,this.unpackAlignment=r.unpackAlignment??4}upload(e,r,n){const i=e.gl;i.pixelStorei(i.UNPACK_ALIGNMENT,this.unpackAlignment),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===Br.UNPACK);const s=r.realWidth,o=r.realHeight;return n.width===s&&n.height===o?i.texSubImage2D(r.target,0,0,0,s,o,r.format,n.type,this.data):(n.width=s,n.height=o,i.texImage2D(r.target,0,n.internalFormat,s,o,0,r.format,n.type,this.data)),!0}dispose(){this.data=null}static test(e){return e===null||e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array}}const G4={scaleMode:wn.NEAREST,alphaMode:Br.NPM},yv=class Ea extends lh{constructor(e=null,r=null){super(),r=Object.assign({},Ea.defaultOptions,r);const{alphaMode:n,mipmap:i,anisotropicLevel:s,scaleMode:o,width:l,height:h,wrapMode:c,format:f,type:m,target:p,resolution:v,resourceOptions:_}=r;e&&!(e instanceof qu)&&(e=OA(e,_),e.internal=!0),this.resolution=v||he.RESOLUTION,this.width=Math.round((l||0)*this.resolution)/this.resolution,this.height=Math.round((h||0)*this.resolution)/this.resolution,this._mipmap=i,this.anisotropicLevel=s,this._wrapMode=c,this._scaleMode=o,this.format=f,this.type=m,this.target=p,this.alphaMode=n,this.uid=$o(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=l>0&&h>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,r){let n;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,n=!0),r!==void 0&&r!==this.mipmap&&(this.mipmap=r,n=!0),n&&this.dirtyStyleId++,this}setSize(e,r,n){return n=n||this.resolution,this.setRealSize(e*n,r*n,n)}setRealSize(e,r,n){return this.resolution=n||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(r)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=lE(this.realWidth)&&lE(this.realHeight)}setResolution(e){const r=this.resolution;return r===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*r)/e,this.height=Math.round(this.height*r)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Es[this.cacheId],delete ci[this.cacheId],this.cacheId=null),this.valid=!1,this.dispose(),Ea.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,r,n=he.STRICT_TEXTURE_CACHE){const i=typeof e=="string";let s=null;if(i)s=e;else{if(!e._pixiId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";e._pixiId=`${l}_${$o()}`}s=e._pixiId}let o=Es[s];if(i&&n&&!o)throw new Error(`The cacheId "${s}" does not exist in BaseTextureCache.`);return o||(o=new Ea(e,r),o.cacheId=s,Ea.addToCache(o,s)),o}static fromBuffer(e,r,n,i){e=e||new Float32Array(r*n*4);const s=new np(e,{width:r,height:n,...i==null?void 0:i.resourceOptions});let o,l;return e instanceof Float32Array?(o=re.RGBA,l=Ae.FLOAT):e instanceof Int32Array?(o=re.RGBA_INTEGER,l=Ae.INT):e instanceof Uint32Array?(o=re.RGBA_INTEGER,l=Ae.UNSIGNED_INT):e instanceof Int16Array?(o=re.RGBA_INTEGER,l=Ae.SHORT):e instanceof Uint16Array?(o=re.RGBA_INTEGER,l=Ae.UNSIGNED_SHORT):e instanceof Int8Array?(o=re.RGBA,l=Ae.BYTE):(o=re.RGBA,l=Ae.UNSIGNED_BYTE),s.internal=!0,new Ea(s,Object.assign({},G4,{type:l,format:o},i))}static addToCache(e,r){r&&(e.textureCacheIds.includes(r)||e.textureCacheIds.push(r),Es[r]&&Es[r]!==e&&console.warn(`BaseTexture added to the cache with an id [${r}] that already had an entry`),Es[r]=e)}static removeFromCache(e){if(typeof e=="string"){const r=Es[e];if(r){const n=r.textureCacheIds.indexOf(e);return n>-1&&r.textureCacheIds.splice(n,1),delete Es[e],r}}else if(e!=null&&e.textureCacheIds){for(let r=0;r<e.textureCacheIds.length;++r)delete Es[e.textureCacheIds[r]];return e.textureCacheIds.length=0,e}return null}};yv.defaultOptions={mipmap:Pi.POW2,anisotropicLevel:0,scaleMode:wn.LINEAR,wrapMode:qi.CLAMP,alphaMode:Br.UNPACK,target:Qa.TEXTURE_2D,format:re.RGBA,type:Ae.UNSIGNED_BYTE},yv._globalBatch=0;let Ne=yv;class vv{constructor(){this.texArray=null,this.blend=0,this.type=$n.TRIANGLES,this.start=0,this.size=0,this.data=null}}let H4=0;class It{constructor(e,r=!0,n=!1){this.data=e||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=n,this.static=r,this.id=H4++,this.disposeRunner=new Yn("disposeBuffer")}update(e){e instanceof Array&&(e=new Float32Array(e)),this.data=e||this.data,this._updateID++}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.data=null}set index(e){this.type=e?Ai.ELEMENT_ARRAY_BUFFER:Ai.ARRAY_BUFFER}get index(){return this.type===Ai.ELEMENT_ARRAY_BUFFER}static from(e){return e instanceof Array&&(e=new Float32Array(e)),new It(e)}}class mf{constructor(e,r=0,n=!1,i=Ae.FLOAT,s,o,l,h=1){this.buffer=e,this.size=r,this.normalized=n,this.type=i,this.stride=s,this.start=o,this.instance=l,this.divisor=h}destroy(){this.buffer=null}static from(e,r,n,i,s){return new mf(e,r,n,i,s)}}const j4={Float32Array,Uint32Array,Int32Array,Uint8Array};function $4(t,e){let r=0,n=0;const i={};for(let h=0;h<t.length;h++)n+=e[h],r+=t[h].length;const s=new ArrayBuffer(r*4);let o=null,l=0;for(let h=0;h<t.length;h++){const c=e[h],f=t[h],m=DA(f);i[m]||(i[m]=new j4[m](s)),o=i[m];for(let p=0;p<f.length;p++){const v=(p/c|0)*n+l,_=p%c;o[v+_]=f[p]}l+=c}return new Float32Array(s)}const mE={5126:4,5123:2,5121:1};let W4=0;const V4={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class Ys{constructor(e=[],r={}){this.buffers=e,this.indexBuffer=null,this.attributes=r,this.glVertexArrayObjects={},this.id=W4++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new Yn("disposeGeometry"),this.refCount=0}addAttribute(e,r,n=0,i=!1,s,o,l,h=!1){if(!r)throw new Error("You must pass a buffer when creating an attribute");r instanceof It||(r instanceof Array&&(r=new Float32Array(r)),r=new It(r));const c=e.split("|");if(c.length>1){for(let m=0;m<c.length;m++)this.addAttribute(c[m],r,n,i,s);return this}let f=this.buffers.indexOf(r);return f===-1&&(this.buffers.push(r),f=this.buffers.length-1),this.attributes[e]=new mf(f,n,i,s,o,l,h),this.instanced=this.instanced||h,this}getAttribute(e){return this.attributes[e]}getBuffer(e){return this.buffers[this.getAttribute(e).buffer]}addIndex(e){return e instanceof It||(e instanceof Array&&(e=new Uint16Array(e)),e=new It(e)),e.type=Ai.ELEMENT_ARRAY_BUFFER,this.indexBuffer=e,this.buffers.includes(e)||this.buffers.push(e),this}getIndex(){return this.indexBuffer}interleave(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;const e=[],r=[],n=new It;let i;for(i in this.attributes){const s=this.attributes[i],o=this.buffers[s.buffer];e.push(o.data),r.push(s.size*mE[s.type]/4),s.buffer=0}for(n.data=$4(e,r),i=0;i<this.buffers.length;i++)this.buffers[i]!==this.indexBuffer&&this.buffers[i].destroy();return this.buffers=[n],this.indexBuffer&&this.buffers.push(this.indexBuffer),this}getSize(){for(const e in this.attributes){const r=this.attributes[e];return this.buffers[r.buffer].data.length/(r.stride/4||r.size)}return 0}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null}clone(){const e=new Ys;for(let r=0;r<this.buffers.length;r++)e.buffers[r]=new It(this.buffers[r].data.slice(0));for(const r in this.attributes){const n=this.attributes[r];e.attributes[r]=new mf(n.buffer,n.size,n.normalized,n.type,n.stride,n.start,n.instance)}return this.indexBuffer&&(e.indexBuffer=e.buffers[this.buffers.indexOf(this.indexBuffer)],e.indexBuffer.type=Ai.ELEMENT_ARRAY_BUFFER),e}static merge(e){const r=new Ys,n=[],i=[],s=[];let o;for(let l=0;l<e.length;l++){o=e[l];for(let h=0;h<o.buffers.length;h++)i[h]=i[h]||0,i[h]+=o.buffers[h].data.length,s[h]=0}for(let l=0;l<o.buffers.length;l++)n[l]=new V4[DA(o.buffers[l].data)](i[l]),r.buffers[l]=new It(n[l]);for(let l=0;l<e.length;l++){o=e[l];for(let h=0;h<o.buffers.length;h++)n[h].set(o.buffers[h].data,s[h]),s[h]+=o.buffers[h].data.length}if(r.attributes=o.attributes,o.indexBuffer){r.indexBuffer=r.buffers[o.buffers.indexOf(o.indexBuffer)],r.indexBuffer.type=Ai.ELEMENT_ARRAY_BUFFER;let l=0,h=0,c=0,f=0;for(let m=0;m<o.buffers.length;m++)if(o.buffers[m]!==o.indexBuffer){f=m;break}for(const m in o.attributes){const p=o.attributes[m];(p.buffer|0)===f&&(h+=p.size*mE[p.type]/4)}for(let m=0;m<e.length;m++){const p=e[m].indexBuffer.data;for(let v=0;v<p.length;v++)r.indexBuffer.data[v+c]+=l;l+=e[m].buffers[f].data.length/h,c+=p.length}}return r}}class FA extends Ys{constructor(e=!1){super(),this._buffer=new It(null,e,!1),this._indexBuffer=new It(null,e,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,Ae.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,Ae.FLOAT).addAttribute("aColor",this._buffer,4,!0,Ae.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,Ae.FLOAT).addIndex(this._indexBuffer)}}const gf=Math.PI*2,X4=180/Math.PI,Y4=Math.PI/180;var sr=(t=>(t[t.POLY=0]="POLY",t[t.RECT=1]="RECT",t[t.CIRC=2]="CIRC",t[t.ELIP=3]="ELIP",t[t.RREC=4]="RREC",t))(sr||{});class Ge{constructor(e=0,r=0){this.x=0,this.y=0,this.x=e,this.y=r}clone(){return new Ge(this.x,this.y)}copyFrom(e){return this.set(e.x,e.y),this}copyTo(e){return e.set(this.x,this.y),e}equals(e){return e.x===this.x&&e.y===this.y}set(e=0,r=e){return this.x=e,this.y=r,this}}Ge.prototype.toString=function(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`};const zc=[new Ge,new Ge,new Ge,new Ge];class De{constructor(e=0,r=0,n=0,i=0){this.x=Number(e),this.y=Number(r),this.width=Number(n),this.height=Number(i),this.type=sr.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new De(0,0,0,0)}clone(){return new De(this.x,this.y,this.width,this.height)}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e}contains(e,r){return this.width<=0||this.height<=0?!1:e>=this.x&&e<this.x+this.width&&r>=this.y&&r<this.y+this.height}intersects(e,r){if(!r){const D=this.x<e.x?e.x:this.x;if((this.right>e.right?e.right:this.right)<=D)return!1;const q=this.y<e.y?e.y:this.y;return(this.bottom>e.bottom?e.bottom:this.bottom)>q}const n=this.left,i=this.right,s=this.top,o=this.bottom;if(i<=n||o<=s)return!1;const l=zc[0].set(e.left,e.top),h=zc[1].set(e.left,e.bottom),c=zc[2].set(e.right,e.top),f=zc[3].set(e.right,e.bottom);if(c.x<=l.x||h.y<=l.y)return!1;const m=Math.sign(r.a*r.d-r.b*r.c);if(m===0||(r.apply(l,l),r.apply(h,h),r.apply(c,c),r.apply(f,f),Math.max(l.x,h.x,c.x,f.x)<=n||Math.min(l.x,h.x,c.x,f.x)>=i||Math.max(l.y,h.y,c.y,f.y)<=s||Math.min(l.y,h.y,c.y,f.y)>=o))return!1;const p=m*(h.y-l.y),v=m*(l.x-h.x),_=p*n+v*s,E=p*i+v*s,T=p*n+v*o,S=p*i+v*o;if(Math.max(_,E,T,S)<=p*l.x+v*l.y||Math.min(_,E,T,S)>=p*f.x+v*f.y)return!1;const b=m*(l.y-c.y),x=m*(c.x-l.x),A=b*n+x*s,R=b*i+x*s,L=b*n+x*o,N=b*i+x*o;return!(Math.max(A,R,L,N)<=b*l.x+x*l.y||Math.min(A,R,L,N)>=b*f.x+x*f.y)}pad(e=0,r=e){return this.x-=e,this.y-=r,this.width+=e*2,this.height+=r*2,this}fit(e){const r=Math.max(this.x,e.x),n=Math.min(this.x+this.width,e.x+e.width),i=Math.max(this.y,e.y),s=Math.min(this.y+this.height,e.y+e.height);return this.x=r,this.width=Math.max(n-r,0),this.y=i,this.height=Math.max(s-i,0),this}ceil(e=1,r=.001){const n=Math.ceil((this.x+this.width-r)*e)/e,i=Math.ceil((this.y+this.height-r)*e)/e;return this.x=Math.floor((this.x+r)*e)/e,this.y=Math.floor((this.y+r)*e)/e,this.width=n-this.x,this.height=i-this.y,this}enlarge(e){const r=Math.min(this.x,e.x),n=Math.max(this.x+this.width,e.x+e.width),i=Math.min(this.y,e.y),s=Math.max(this.y+this.height,e.y+e.height);return this.x=r,this.width=n-r,this.y=i,this.height=s-i,this}}De.prototype.toString=function(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class ip{constructor(e=0,r=0,n=0){this.x=e,this.y=r,this.radius=n,this.type=sr.CIRC}clone(){return new ip(this.x,this.y,this.radius)}contains(e,r){if(this.radius<=0)return!1;const n=this.radius*this.radius;let i=this.x-e,s=this.y-r;return i*=i,s*=s,i+s<=n}getBounds(){return new De(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}}ip.prototype.toString=function(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`};class sp{constructor(e=0,r=0,n=0,i=0){this.x=e,this.y=r,this.width=n,this.height=i,this.type=sr.ELIP}clone(){return new sp(this.x,this.y,this.width,this.height)}contains(e,r){if(this.width<=0||this.height<=0)return!1;let n=(e-this.x)/this.width,i=(r-this.y)/this.height;return n*=n,i*=i,n+i<=1}getBounds(){return new De(this.x-this.width,this.y-this.height,this.width,this.height)}}sp.prototype.toString=function(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class Fo{constructor(...e){let r=Array.isArray(e[0])?e[0]:e;if(typeof r[0]!="number"){const n=[];for(let i=0,s=r.length;i<s;i++)n.push(r[i].x,r[i].y);r=n}this.points=r,this.type=sr.POLY,this.closeStroke=!0}clone(){const e=this.points.slice(),r=new Fo(e);return r.closeStroke=this.closeStroke,r}contains(e,r){let n=!1;const i=this.points.length/2;for(let s=0,o=i-1;s<i;o=s++){const l=this.points[s*2],h=this.points[s*2+1],c=this.points[o*2],f=this.points[o*2+1];h>r!=f>r&&e<(c-l)*((r-h)/(f-h))+l&&(n=!n)}return n}}Fo.prototype.toString=function(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,e)=>`${t}, ${e}`,"")}]`};class op{constructor(e=0,r=0,n=0,i=0,s=20){this.x=e,this.y=r,this.width=n,this.height=i,this.radius=s,this.type=sr.RREC}clone(){return new op(this.x,this.y,this.width,this.height,this.radius)}contains(e,r){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&r>=this.y&&r<=this.y+this.height){const n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(r>=this.y+n&&r<=this.y+this.height-n||e>=this.x+n&&e<=this.x+this.width-n)return!0;let i=e-(this.x+n),s=r-(this.y+n);const o=n*n;if(i*i+s*s<=o||(i=e-(this.x+this.width-n),i*i+s*s<=o)||(s=r-(this.y+this.height-n),i*i+s*s<=o)||(i=e-(this.x+n),i*i+s*s<=o))return!0}return!1}}op.prototype.toString=function(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`};class ot{constructor(e=1,r=0,n=0,i=1,s=0,o=0){this.array=null,this.a=e,this.b=r,this.c=n,this.d=i,this.tx=s,this.ty=o}fromArray(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]}set(e,r,n,i,s,o){return this.a=e,this.b=r,this.c=n,this.d=i,this.tx=s,this.ty=o,this}toArray(e,r){this.array||(this.array=new Float32Array(9));const n=r||this.array;return e?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n}apply(e,r){r=r||new Ge;const n=e.x,i=e.y;return r.x=this.a*n+this.c*i+this.tx,r.y=this.b*n+this.d*i+this.ty,r}applyInverse(e,r){r=r||new Ge;const n=1/(this.a*this.d+this.c*-this.b),i=e.x,s=e.y;return r.x=this.d*n*i+-this.c*n*s+(this.ty*this.c-this.tx*this.d)*n,r.y=this.a*n*s+-this.b*n*i+(-this.ty*this.a+this.tx*this.b)*n,r}translate(e,r){return this.tx+=e,this.ty+=r,this}scale(e,r){return this.a*=e,this.d*=r,this.c*=e,this.b*=r,this.tx*=e,this.ty*=r,this}rotate(e){const r=Math.cos(e),n=Math.sin(e),i=this.a,s=this.c,o=this.tx;return this.a=i*r-this.b*n,this.b=i*n+this.b*r,this.c=s*r-this.d*n,this.d=s*n+this.d*r,this.tx=o*r-this.ty*n,this.ty=o*n+this.ty*r,this}append(e){const r=this.a,n=this.b,i=this.c,s=this.d;return this.a=e.a*r+e.b*i,this.b=e.a*n+e.b*s,this.c=e.c*r+e.d*i,this.d=e.c*n+e.d*s,this.tx=e.tx*r+e.ty*i+this.tx,this.ty=e.tx*n+e.ty*s+this.ty,this}setTransform(e,r,n,i,s,o,l,h,c){return this.a=Math.cos(l+c)*s,this.b=Math.sin(l+c)*s,this.c=-Math.sin(l-h)*o,this.d=Math.cos(l-h)*o,this.tx=e-(n*this.a+i*this.c),this.ty=r-(n*this.b+i*this.d),this}prepend(e){const r=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){const n=this.a,i=this.c;this.a=n*e.a+this.b*e.c,this.b=n*e.b+this.b*e.d,this.c=i*e.a+this.d*e.c,this.d=i*e.b+this.d*e.d}return this.tx=r*e.a+this.ty*e.c+e.tx,this.ty=r*e.b+this.ty*e.d+e.ty,this}decompose(e){const r=this.a,n=this.b,i=this.c,s=this.d,o=e.pivot,l=-Math.atan2(-i,s),h=Math.atan2(n,r),c=Math.abs(l+h);return c<1e-5||Math.abs(gf-c)<1e-5?(e.rotation=h,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=l,e.skew.y=h),e.scale.x=Math.sqrt(r*r+n*n),e.scale.y=Math.sqrt(i*i+s*s),e.position.x=this.tx+(o.x*r+o.y*i),e.position.y=this.ty+(o.x*n+o.y*s),e}invert(){const e=this.a,r=this.b,n=this.c,i=this.d,s=this.tx,o=e*i-r*n;return this.a=i/o,this.b=-r/o,this.c=-n/o,this.d=e/o,this.tx=(n*this.ty-i*s)/o,this.ty=-(e*this.ty-r*s)/o,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const e=new ot;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyTo(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyFrom(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this}static get IDENTITY(){return new ot}static get TEMP_MATRIX(){return new ot}}ot.prototype.toString=function(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`};const Eo=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],So=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],bo=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],To=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],_v=[],BA=[],Gc=Math.sign;function Q4(){for(let t=0;t<16;t++){const e=[];_v.push(e);for(let r=0;r<16;r++){const n=Gc(Eo[t]*Eo[r]+bo[t]*So[r]),i=Gc(So[t]*Eo[r]+To[t]*So[r]),s=Gc(Eo[t]*bo[r]+bo[t]*To[r]),o=Gc(So[t]*bo[r]+To[t]*To[r]);for(let l=0;l<16;l++)if(Eo[l]===n&&So[l]===i&&bo[l]===s&&To[l]===o){e.push(l);break}}}for(let t=0;t<16;t++){const e=new ot;e.set(Eo[t],So[t],bo[t],To[t],0,0),BA.push(e)}}Q4();const ft={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:t=>Eo[t],uY:t=>So[t],vX:t=>bo[t],vY:t=>To[t],inv:t=>t&8?t&15:-t&7,add:(t,e)=>_v[t][e],sub:(t,e)=>_v[t][ft.inv(e)],rotate180:t=>t^4,isVertical:t=>(t&3)===2,byDirection:(t,e)=>Math.abs(t)*2<=Math.abs(e)?e>=0?ft.S:ft.N:Math.abs(e)*2<=Math.abs(t)?t>0?ft.E:ft.W:e>0?t>0?ft.SE:ft.SW:t>0?ft.NE:ft.NW,matrixAppendRotationInv:(t,e,r=0,n=0)=>{const i=BA[ft.inv(e)];i.tx=r,i.ty=n,t.append(i)}};class Ei{constructor(e,r,n=0,i=0){this._x=n,this._y=i,this.cb=e,this.scope=r}clone(e=this.cb,r=this.scope){return new Ei(e,r,this._x,this._y)}set(e=0,r=e){return(this._x!==e||this._y!==r)&&(this._x=e,this._y=r,this.cb.call(this.scope)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))}}Ei.prototype.toString=function(){return`[@pixi/math:ObservablePoint x=${this.x} y=${this.y} scope=${this.scope}]`};const xv=class{constructor(){this.worldTransform=new ot,this.localTransform=new ot,this.position=new Ei(this.onChange,this,0,0),this.scale=new Ei(this.onChange,this,1,1),this.pivot=new Ei(this.onChange,this,0,0),this.skew=new Ei(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}updateLocalTransform(){const t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(t){const e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){const r=t.worldTransform,n=this.worldTransform;n.a=e.a*r.a+e.b*r.c,n.b=e.a*r.b+e.b*r.d,n.c=e.c*r.a+e.d*r.c,n.d=e.c*r.b+e.d*r.d,n.tx=e.tx*r.a+e.ty*r.c+r.tx,n.ty=e.tx*r.b+e.ty*r.d+r.ty,this._parentID=t._worldID,this._worldID++}}setFromMatrix(t){t.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())}};xv.IDENTITY=new xv;let ap=xv;ap.prototype.toString=function(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`};var K4=`varying vec2 vTextureCoord;
51
+ else `),r<t-1&&(e+=`if(test == ${r}.0){}`);return e}function z4(t,e){if(t===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const r=e.createShader(e.FRAGMENT_SHADER);for(;;){const n=L4.replace(/%forloop%/gi,U4(t));if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))t=t/2|0;else break}return t}const Rg=0,Mg=1,kg=2,Ng=3,Dg=4,Og=5;class Mi{constructor(){this.data=0,this.blendMode=Re.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Rg)}set blend(e){!!(this.data&1<<Rg)!==e&&(this.data^=1<<Rg)}get offsets(){return!!(this.data&1<<Mg)}set offsets(e){!!(this.data&1<<Mg)!==e&&(this.data^=1<<Mg)}get culling(){return!!(this.data&1<<kg)}set culling(e){!!(this.data&1<<kg)!==e&&(this.data^=1<<kg)}get depthTest(){return!!(this.data&1<<Ng)}set depthTest(e){!!(this.data&1<<Ng)!==e&&(this.data^=1<<Ng)}get depthMask(){return!!(this.data&1<<Og)}set depthMask(e){!!(this.data&1<<Og)!==e&&(this.data^=1<<Og)}get clockwiseFrontFace(){return!!(this.data&1<<Dg)}set clockwiseFrontFace(e){!!(this.data&1<<Dg)!==e&&(this.data^=1<<Dg)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!==Re.NONE,this._blendMode=e}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}static for2d(){const e=new Mi;return e.depthTest=!1,e.blend=!0,e}}Mi.prototype.toString=function(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`};const gv=[];function OA(t,e){if(!t)return null;let r="";if(typeof t=="string"){const n=/\.(\w{3,4})(?:$|\?|#)/i.exec(t);n&&(r=n[1].toLowerCase())}for(let n=gv.length-1;n>=0;--n){const i=gv[n];if(i.test&&i.test(t,r))return new i(t,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class Yn{constructor(e){this.items=[],this._name=e,this._aliasCount=0}emit(e,r,n,i,s,o,l,h){if(arguments.length>8)throw new Error("max arguments reached");const{name:c,items:f}=this;this._aliasCount++;for(let m=0,p=f.length;m<p;m++)f[m][c](e,r,n,i,s,o,l,h);return f===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this}remove(e){const r=this.items.indexOf(e);return r!==-1&&(this.ensureNonAliasedItems(),this.items.splice(r,1)),this}contains(e){return this.items.includes(e)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items.length=0,this._name=""}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(Yn.prototype,{dispatch:{value:Yn.prototype.emit},run:{value:Yn.prototype.emit}});class qu{constructor(e=0,r=0){this._width=e,this._height=r,this.destroyed=!1,this.internal=!1,this.onResize=new Yn("setRealSize"),this.onUpdate=new Yn("update"),this.onError=new Yn("onError")}bind(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)}resize(e,r){(e!==this._width||r!==this._height)&&(this._width=e,this._height=r,this.onResize.emit(e,r))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(e,r,n){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(e,r){return!1}}class np extends qu{constructor(e,r){const{width:n,height:i}=r||{};if(!n||!i)throw new Error("BufferResource width or height invalid");super(n,i),this.data=e,this.unpackAlignment=r.unpackAlignment??4}upload(e,r,n){const i=e.gl;i.pixelStorei(i.UNPACK_ALIGNMENT,this.unpackAlignment),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===Br.UNPACK);const s=r.realWidth,o=r.realHeight;return n.width===s&&n.height===o?i.texSubImage2D(r.target,0,0,0,s,o,r.format,n.type,this.data):(n.width=s,n.height=o,i.texImage2D(r.target,0,n.internalFormat,s,o,0,r.format,n.type,this.data)),!0}dispose(){this.data=null}static test(e){return e===null||e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array}}const G4={scaleMode:wn.NEAREST,alphaMode:Br.NPM},yv=class Ea extends lh{constructor(e=null,r=null){super(),r=Object.assign({},Ea.defaultOptions,r);const{alphaMode:n,mipmap:i,anisotropicLevel:s,scaleMode:o,width:l,height:h,wrapMode:c,format:f,type:m,target:p,resolution:v,resourceOptions:_}=r;e&&!(e instanceof qu)&&(e=OA(e,_),e.internal=!0),this.resolution=v||he.RESOLUTION,this.width=Math.round((l||0)*this.resolution)/this.resolution,this.height=Math.round((h||0)*this.resolution)/this.resolution,this._mipmap=i,this.anisotropicLevel=s,this._wrapMode=c,this._scaleMode=o,this.format=f,this.type=m,this.target=p,this.alphaMode=n,this.uid=$o(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=l>0&&h>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,r){let n;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,n=!0),r!==void 0&&r!==this.mipmap&&(this.mipmap=r,n=!0),n&&this.dirtyStyleId++,this}setSize(e,r,n){return n=n||this.resolution,this.setRealSize(e*n,r*n,n)}setRealSize(e,r,n){return this.resolution=n||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(r)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=lE(this.realWidth)&&lE(this.realHeight)}setResolution(e){const r=this.resolution;return r===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*r)/e,this.height=Math.round(this.height*r)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Es[this.cacheId],delete ci[this.cacheId],this.cacheId=null),this.valid=!1,this.dispose(),Ea.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,r,n=he.STRICT_TEXTURE_CACHE){const i=typeof e=="string";let s=null;if(i)s=e;else{if(!e._pixiId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";e._pixiId=`${l}_${$o()}`}s=e._pixiId}let o=Es[s];if(i&&n&&!o)throw new Error(`The cacheId "${s}" does not exist in BaseTextureCache.`);return o||(o=new Ea(e,r),o.cacheId=s,Ea.addToCache(o,s)),o}static fromBuffer(e,r,n,i){e=e||new Float32Array(r*n*4);const s=new np(e,{width:r,height:n,...i==null?void 0:i.resourceOptions});let o,l;return e instanceof Float32Array?(o=ne.RGBA,l=Ae.FLOAT):e instanceof Int32Array?(o=ne.RGBA_INTEGER,l=Ae.INT):e instanceof Uint32Array?(o=ne.RGBA_INTEGER,l=Ae.UNSIGNED_INT):e instanceof Int16Array?(o=ne.RGBA_INTEGER,l=Ae.SHORT):e instanceof Uint16Array?(o=ne.RGBA_INTEGER,l=Ae.UNSIGNED_SHORT):e instanceof Int8Array?(o=ne.RGBA,l=Ae.BYTE):(o=ne.RGBA,l=Ae.UNSIGNED_BYTE),s.internal=!0,new Ea(s,Object.assign({},G4,{type:l,format:o},i))}static addToCache(e,r){r&&(e.textureCacheIds.includes(r)||e.textureCacheIds.push(r),Es[r]&&Es[r]!==e&&console.warn(`BaseTexture added to the cache with an id [${r}] that already had an entry`),Es[r]=e)}static removeFromCache(e){if(typeof e=="string"){const r=Es[e];if(r){const n=r.textureCacheIds.indexOf(e);return n>-1&&r.textureCacheIds.splice(n,1),delete Es[e],r}}else if(e!=null&&e.textureCacheIds){for(let r=0;r<e.textureCacheIds.length;++r)delete Es[e.textureCacheIds[r]];return e.textureCacheIds.length=0,e}return null}};yv.defaultOptions={mipmap:Pi.POW2,anisotropicLevel:0,scaleMode:wn.LINEAR,wrapMode:qi.CLAMP,alphaMode:Br.UNPACK,target:Qa.TEXTURE_2D,format:ne.RGBA,type:Ae.UNSIGNED_BYTE},yv._globalBatch=0;let Ne=yv;class vv{constructor(){this.texArray=null,this.blend=0,this.type=$n.TRIANGLES,this.start=0,this.size=0,this.data=null}}let H4=0;class It{constructor(e,r=!0,n=!1){this.data=e||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=n,this.static=r,this.id=H4++,this.disposeRunner=new Yn("disposeBuffer")}update(e){e instanceof Array&&(e=new Float32Array(e)),this.data=e||this.data,this._updateID++}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.data=null}set index(e){this.type=e?Ai.ELEMENT_ARRAY_BUFFER:Ai.ARRAY_BUFFER}get index(){return this.type===Ai.ELEMENT_ARRAY_BUFFER}static from(e){return e instanceof Array&&(e=new Float32Array(e)),new It(e)}}class mf{constructor(e,r=0,n=!1,i=Ae.FLOAT,s,o,l,h=1){this.buffer=e,this.size=r,this.normalized=n,this.type=i,this.stride=s,this.start=o,this.instance=l,this.divisor=h}destroy(){this.buffer=null}static from(e,r,n,i,s){return new mf(e,r,n,i,s)}}const j4={Float32Array,Uint32Array,Int32Array,Uint8Array};function $4(t,e){let r=0,n=0;const i={};for(let h=0;h<t.length;h++)n+=e[h],r+=t[h].length;const s=new ArrayBuffer(r*4);let o=null,l=0;for(let h=0;h<t.length;h++){const c=e[h],f=t[h],m=DA(f);i[m]||(i[m]=new j4[m](s)),o=i[m];for(let p=0;p<f.length;p++){const v=(p/c|0)*n+l,_=p%c;o[v+_]=f[p]}l+=c}return new Float32Array(s)}const mE={5126:4,5123:2,5121:1};let W4=0;const V4={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class Ys{constructor(e=[],r={}){this.buffers=e,this.indexBuffer=null,this.attributes=r,this.glVertexArrayObjects={},this.id=W4++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new Yn("disposeGeometry"),this.refCount=0}addAttribute(e,r,n=0,i=!1,s,o,l,h=!1){if(!r)throw new Error("You must pass a buffer when creating an attribute");r instanceof It||(r instanceof Array&&(r=new Float32Array(r)),r=new It(r));const c=e.split("|");if(c.length>1){for(let m=0;m<c.length;m++)this.addAttribute(c[m],r,n,i,s);return this}let f=this.buffers.indexOf(r);return f===-1&&(this.buffers.push(r),f=this.buffers.length-1),this.attributes[e]=new mf(f,n,i,s,o,l,h),this.instanced=this.instanced||h,this}getAttribute(e){return this.attributes[e]}getBuffer(e){return this.buffers[this.getAttribute(e).buffer]}addIndex(e){return e instanceof It||(e instanceof Array&&(e=new Uint16Array(e)),e=new It(e)),e.type=Ai.ELEMENT_ARRAY_BUFFER,this.indexBuffer=e,this.buffers.includes(e)||this.buffers.push(e),this}getIndex(){return this.indexBuffer}interleave(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;const e=[],r=[],n=new It;let i;for(i in this.attributes){const s=this.attributes[i],o=this.buffers[s.buffer];e.push(o.data),r.push(s.size*mE[s.type]/4),s.buffer=0}for(n.data=$4(e,r),i=0;i<this.buffers.length;i++)this.buffers[i]!==this.indexBuffer&&this.buffers[i].destroy();return this.buffers=[n],this.indexBuffer&&this.buffers.push(this.indexBuffer),this}getSize(){for(const e in this.attributes){const r=this.attributes[e];return this.buffers[r.buffer].data.length/(r.stride/4||r.size)}return 0}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null}clone(){const e=new Ys;for(let r=0;r<this.buffers.length;r++)e.buffers[r]=new It(this.buffers[r].data.slice(0));for(const r in this.attributes){const n=this.attributes[r];e.attributes[r]=new mf(n.buffer,n.size,n.normalized,n.type,n.stride,n.start,n.instance)}return this.indexBuffer&&(e.indexBuffer=e.buffers[this.buffers.indexOf(this.indexBuffer)],e.indexBuffer.type=Ai.ELEMENT_ARRAY_BUFFER),e}static merge(e){const r=new Ys,n=[],i=[],s=[];let o;for(let l=0;l<e.length;l++){o=e[l];for(let h=0;h<o.buffers.length;h++)i[h]=i[h]||0,i[h]+=o.buffers[h].data.length,s[h]=0}for(let l=0;l<o.buffers.length;l++)n[l]=new V4[DA(o.buffers[l].data)](i[l]),r.buffers[l]=new It(n[l]);for(let l=0;l<e.length;l++){o=e[l];for(let h=0;h<o.buffers.length;h++)n[h].set(o.buffers[h].data,s[h]),s[h]+=o.buffers[h].data.length}if(r.attributes=o.attributes,o.indexBuffer){r.indexBuffer=r.buffers[o.buffers.indexOf(o.indexBuffer)],r.indexBuffer.type=Ai.ELEMENT_ARRAY_BUFFER;let l=0,h=0,c=0,f=0;for(let m=0;m<o.buffers.length;m++)if(o.buffers[m]!==o.indexBuffer){f=m;break}for(const m in o.attributes){const p=o.attributes[m];(p.buffer|0)===f&&(h+=p.size*mE[p.type]/4)}for(let m=0;m<e.length;m++){const p=e[m].indexBuffer.data;for(let v=0;v<p.length;v++)r.indexBuffer.data[v+c]+=l;l+=e[m].buffers[f].data.length/h,c+=p.length}}return r}}class FA extends Ys{constructor(e=!1){super(),this._buffer=new It(null,e,!1),this._indexBuffer=new It(null,e,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,Ae.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,Ae.FLOAT).addAttribute("aColor",this._buffer,4,!0,Ae.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,Ae.FLOAT).addIndex(this._indexBuffer)}}const gf=Math.PI*2,X4=180/Math.PI,Y4=Math.PI/180;var sr=(t=>(t[t.POLY=0]="POLY",t[t.RECT=1]="RECT",t[t.CIRC=2]="CIRC",t[t.ELIP=3]="ELIP",t[t.RREC=4]="RREC",t))(sr||{});class Ge{constructor(e=0,r=0){this.x=0,this.y=0,this.x=e,this.y=r}clone(){return new Ge(this.x,this.y)}copyFrom(e){return this.set(e.x,e.y),this}copyTo(e){return e.set(this.x,this.y),e}equals(e){return e.x===this.x&&e.y===this.y}set(e=0,r=e){return this.x=e,this.y=r,this}}Ge.prototype.toString=function(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`};const zc=[new Ge,new Ge,new Ge,new Ge];class De{constructor(e=0,r=0,n=0,i=0){this.x=Number(e),this.y=Number(r),this.width=Number(n),this.height=Number(i),this.type=sr.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new De(0,0,0,0)}clone(){return new De(this.x,this.y,this.width,this.height)}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e}contains(e,r){return this.width<=0||this.height<=0?!1:e>=this.x&&e<this.x+this.width&&r>=this.y&&r<this.y+this.height}intersects(e,r){if(!r){const D=this.x<e.x?e.x:this.x;if((this.right>e.right?e.right:this.right)<=D)return!1;const Q=this.y<e.y?e.y:this.y;return(this.bottom>e.bottom?e.bottom:this.bottom)>Q}const n=this.left,i=this.right,s=this.top,o=this.bottom;if(i<=n||o<=s)return!1;const l=zc[0].set(e.left,e.top),h=zc[1].set(e.left,e.bottom),c=zc[2].set(e.right,e.top),f=zc[3].set(e.right,e.bottom);if(c.x<=l.x||h.y<=l.y)return!1;const m=Math.sign(r.a*r.d-r.b*r.c);if(m===0||(r.apply(l,l),r.apply(h,h),r.apply(c,c),r.apply(f,f),Math.max(l.x,h.x,c.x,f.x)<=n||Math.min(l.x,h.x,c.x,f.x)>=i||Math.max(l.y,h.y,c.y,f.y)<=s||Math.min(l.y,h.y,c.y,f.y)>=o))return!1;const p=m*(h.y-l.y),v=m*(l.x-h.x),_=p*n+v*s,E=p*i+v*s,T=p*n+v*o,S=p*i+v*o;if(Math.max(_,E,T,S)<=p*l.x+v*l.y||Math.min(_,E,T,S)>=p*f.x+v*f.y)return!1;const b=m*(l.y-c.y),x=m*(c.x-l.x),A=b*n+x*s,R=b*i+x*s,L=b*n+x*o,k=b*i+x*o;return!(Math.max(A,R,L,k)<=b*l.x+x*l.y||Math.min(A,R,L,k)>=b*f.x+x*f.y)}pad(e=0,r=e){return this.x-=e,this.y-=r,this.width+=e*2,this.height+=r*2,this}fit(e){const r=Math.max(this.x,e.x),n=Math.min(this.x+this.width,e.x+e.width),i=Math.max(this.y,e.y),s=Math.min(this.y+this.height,e.y+e.height);return this.x=r,this.width=Math.max(n-r,0),this.y=i,this.height=Math.max(s-i,0),this}ceil(e=1,r=.001){const n=Math.ceil((this.x+this.width-r)*e)/e,i=Math.ceil((this.y+this.height-r)*e)/e;return this.x=Math.floor((this.x+r)*e)/e,this.y=Math.floor((this.y+r)*e)/e,this.width=n-this.x,this.height=i-this.y,this}enlarge(e){const r=Math.min(this.x,e.x),n=Math.max(this.x+this.width,e.x+e.width),i=Math.min(this.y,e.y),s=Math.max(this.y+this.height,e.y+e.height);return this.x=r,this.width=n-r,this.y=i,this.height=s-i,this}}De.prototype.toString=function(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class ip{constructor(e=0,r=0,n=0){this.x=e,this.y=r,this.radius=n,this.type=sr.CIRC}clone(){return new ip(this.x,this.y,this.radius)}contains(e,r){if(this.radius<=0)return!1;const n=this.radius*this.radius;let i=this.x-e,s=this.y-r;return i*=i,s*=s,i+s<=n}getBounds(){return new De(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}}ip.prototype.toString=function(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`};class sp{constructor(e=0,r=0,n=0,i=0){this.x=e,this.y=r,this.width=n,this.height=i,this.type=sr.ELIP}clone(){return new sp(this.x,this.y,this.width,this.height)}contains(e,r){if(this.width<=0||this.height<=0)return!1;let n=(e-this.x)/this.width,i=(r-this.y)/this.height;return n*=n,i*=i,n+i<=1}getBounds(){return new De(this.x-this.width,this.y-this.height,this.width,this.height)}}sp.prototype.toString=function(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class Fo{constructor(...e){let r=Array.isArray(e[0])?e[0]:e;if(typeof r[0]!="number"){const n=[];for(let i=0,s=r.length;i<s;i++)n.push(r[i].x,r[i].y);r=n}this.points=r,this.type=sr.POLY,this.closeStroke=!0}clone(){const e=this.points.slice(),r=new Fo(e);return r.closeStroke=this.closeStroke,r}contains(e,r){let n=!1;const i=this.points.length/2;for(let s=0,o=i-1;s<i;o=s++){const l=this.points[s*2],h=this.points[s*2+1],c=this.points[o*2],f=this.points[o*2+1];h>r!=f>r&&e<(c-l)*((r-h)/(f-h))+l&&(n=!n)}return n}}Fo.prototype.toString=function(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,e)=>`${t}, ${e}`,"")}]`};class op{constructor(e=0,r=0,n=0,i=0,s=20){this.x=e,this.y=r,this.width=n,this.height=i,this.radius=s,this.type=sr.RREC}clone(){return new op(this.x,this.y,this.width,this.height,this.radius)}contains(e,r){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&r>=this.y&&r<=this.y+this.height){const n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(r>=this.y+n&&r<=this.y+this.height-n||e>=this.x+n&&e<=this.x+this.width-n)return!0;let i=e-(this.x+n),s=r-(this.y+n);const o=n*n;if(i*i+s*s<=o||(i=e-(this.x+this.width-n),i*i+s*s<=o)||(s=r-(this.y+this.height-n),i*i+s*s<=o)||(i=e-(this.x+n),i*i+s*s<=o))return!0}return!1}}op.prototype.toString=function(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`};class ot{constructor(e=1,r=0,n=0,i=1,s=0,o=0){this.array=null,this.a=e,this.b=r,this.c=n,this.d=i,this.tx=s,this.ty=o}fromArray(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]}set(e,r,n,i,s,o){return this.a=e,this.b=r,this.c=n,this.d=i,this.tx=s,this.ty=o,this}toArray(e,r){this.array||(this.array=new Float32Array(9));const n=r||this.array;return e?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n}apply(e,r){r=r||new Ge;const n=e.x,i=e.y;return r.x=this.a*n+this.c*i+this.tx,r.y=this.b*n+this.d*i+this.ty,r}applyInverse(e,r){r=r||new Ge;const n=1/(this.a*this.d+this.c*-this.b),i=e.x,s=e.y;return r.x=this.d*n*i+-this.c*n*s+(this.ty*this.c-this.tx*this.d)*n,r.y=this.a*n*s+-this.b*n*i+(-this.ty*this.a+this.tx*this.b)*n,r}translate(e,r){return this.tx+=e,this.ty+=r,this}scale(e,r){return this.a*=e,this.d*=r,this.c*=e,this.b*=r,this.tx*=e,this.ty*=r,this}rotate(e){const r=Math.cos(e),n=Math.sin(e),i=this.a,s=this.c,o=this.tx;return this.a=i*r-this.b*n,this.b=i*n+this.b*r,this.c=s*r-this.d*n,this.d=s*n+this.d*r,this.tx=o*r-this.ty*n,this.ty=o*n+this.ty*r,this}append(e){const r=this.a,n=this.b,i=this.c,s=this.d;return this.a=e.a*r+e.b*i,this.b=e.a*n+e.b*s,this.c=e.c*r+e.d*i,this.d=e.c*n+e.d*s,this.tx=e.tx*r+e.ty*i+this.tx,this.ty=e.tx*n+e.ty*s+this.ty,this}setTransform(e,r,n,i,s,o,l,h,c){return this.a=Math.cos(l+c)*s,this.b=Math.sin(l+c)*s,this.c=-Math.sin(l-h)*o,this.d=Math.cos(l-h)*o,this.tx=e-(n*this.a+i*this.c),this.ty=r-(n*this.b+i*this.d),this}prepend(e){const r=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){const n=this.a,i=this.c;this.a=n*e.a+this.b*e.c,this.b=n*e.b+this.b*e.d,this.c=i*e.a+this.d*e.c,this.d=i*e.b+this.d*e.d}return this.tx=r*e.a+this.ty*e.c+e.tx,this.ty=r*e.b+this.ty*e.d+e.ty,this}decompose(e){const r=this.a,n=this.b,i=this.c,s=this.d,o=e.pivot,l=-Math.atan2(-i,s),h=Math.atan2(n,r),c=Math.abs(l+h);return c<1e-5||Math.abs(gf-c)<1e-5?(e.rotation=h,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=l,e.skew.y=h),e.scale.x=Math.sqrt(r*r+n*n),e.scale.y=Math.sqrt(i*i+s*s),e.position.x=this.tx+(o.x*r+o.y*i),e.position.y=this.ty+(o.x*n+o.y*s),e}invert(){const e=this.a,r=this.b,n=this.c,i=this.d,s=this.tx,o=e*i-r*n;return this.a=i/o,this.b=-r/o,this.c=-n/o,this.d=e/o,this.tx=(n*this.ty-i*s)/o,this.ty=-(e*this.ty-r*s)/o,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const e=new ot;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyTo(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyFrom(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this}static get IDENTITY(){return new ot}static get TEMP_MATRIX(){return new ot}}ot.prototype.toString=function(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`};const Eo=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],So=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],bo=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],To=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],_v=[],BA=[],Gc=Math.sign;function Q4(){for(let t=0;t<16;t++){const e=[];_v.push(e);for(let r=0;r<16;r++){const n=Gc(Eo[t]*Eo[r]+bo[t]*So[r]),i=Gc(So[t]*Eo[r]+To[t]*So[r]),s=Gc(Eo[t]*bo[r]+bo[t]*To[r]),o=Gc(So[t]*bo[r]+To[t]*To[r]);for(let l=0;l<16;l++)if(Eo[l]===n&&So[l]===i&&bo[l]===s&&To[l]===o){e.push(l);break}}}for(let t=0;t<16;t++){const e=new ot;e.set(Eo[t],So[t],bo[t],To[t],0,0),BA.push(e)}}Q4();const ft={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:t=>Eo[t],uY:t=>So[t],vX:t=>bo[t],vY:t=>To[t],inv:t=>t&8?t&15:-t&7,add:(t,e)=>_v[t][e],sub:(t,e)=>_v[t][ft.inv(e)],rotate180:t=>t^4,isVertical:t=>(t&3)===2,byDirection:(t,e)=>Math.abs(t)*2<=Math.abs(e)?e>=0?ft.S:ft.N:Math.abs(e)*2<=Math.abs(t)?t>0?ft.E:ft.W:e>0?t>0?ft.SE:ft.SW:t>0?ft.NE:ft.NW,matrixAppendRotationInv:(t,e,r=0,n=0)=>{const i=BA[ft.inv(e)];i.tx=r,i.ty=n,t.append(i)}};class Ei{constructor(e,r,n=0,i=0){this._x=n,this._y=i,this.cb=e,this.scope=r}clone(e=this.cb,r=this.scope){return new Ei(e,r,this._x,this._y)}set(e=0,r=e){return(this._x!==e||this._y!==r)&&(this._x=e,this._y=r,this.cb.call(this.scope)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))}}Ei.prototype.toString=function(){return`[@pixi/math:ObservablePoint x=${this.x} y=${this.y} scope=${this.scope}]`};const xv=class{constructor(){this.worldTransform=new ot,this.localTransform=new ot,this.position=new Ei(this.onChange,this,0,0),this.scale=new Ei(this.onChange,this,1,1),this.pivot=new Ei(this.onChange,this,0,0),this.skew=new Ei(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}updateLocalTransform(){const t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(t){const e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){const r=t.worldTransform,n=this.worldTransform;n.a=e.a*r.a+e.b*r.c,n.b=e.a*r.b+e.b*r.d,n.c=e.c*r.a+e.d*r.c,n.d=e.c*r.b+e.d*r.d,n.tx=e.tx*r.a+e.ty*r.c+r.tx,n.ty=e.tx*r.b+e.ty*r.d+r.ty,this._parentID=t._worldID,this._worldID++}}setFromMatrix(t){t.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())}};xv.IDENTITY=new xv;let ap=xv;ap.prototype.toString=function(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`};var K4=`varying vec2 vTextureCoord;
52
52
 
53
53
  uniform sampler2D uSampler;
54
54
 
@@ -414,7 +414,7 @@ void main(void)
414
414
  gl_Position = filterVertexPosition();
415
415
  vTextureCoord = filterTextureCoord();
416
416
  }
417
- `;const Sv=class au extends Ci{constructor(e,r,n){const i=Qi.from(e||au.defaultVertexSrc,r||au.defaultFragmentSrc);super(i,n),this.padding=0,this.resolution=au.defaultResolution,this.multisample=au.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new Mi}apply(e,r,n,i,s){e.applyFilter(this,r,n,i)}get blendMode(){return this.state.blendMode}set blendMode(e){this.state.blendMode=e}get resolution(){return this._resolution}set resolution(e){this._resolution=e}static get defaultVertexSrc(){return pN}static get defaultFragmentSrc(){return fN}};Sv.defaultResolution=1,Sv.defaultMultisample=kt.NONE;let Sr=Sv;class yf{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new tt(0),this.alpha=1}init(e){this.clearBeforeRender=e.clearBeforeRender;const{backgroundColor:r,background:n,backgroundAlpha:i}=e,s=n??r;s!==void 0&&(this.color=s),this.alpha=i}get color(){return this._backgroundColor.value}set color(e){this._backgroundColor.setValue(e)}get alpha(){return this._backgroundColor.alpha}set alpha(e){this._backgroundColor.setAlpha(e)}get backgroundColor(){return this._backgroundColor}destroy(){}}yf.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},yf.extension={type:[ae.RendererSystem,ae.CanvasRendererSystem],name:"background"};we.add(yf);class HA{constructor(e){this.renderer=e,this.emptyRenderer=new lp(e),this.currentRenderer=this.emptyRenderer}setObjectRenderer(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(e,r){const{boundTextures:n}=this.renderer.texture;for(let i=r-1;i>=0;--i)e[i]=n[i]||null,e[i]&&(e[i]._batchLocation=i)}boundArray(e,r,n,i){const{elements:s,ids:o,count:l}=e;let h=0;for(let c=0;c<l;c++){const f=s[c],m=f._batchLocation;if(m>=0&&m<i&&r[m]===f){o[c]=m;continue}for(;h<i;){const p=r[h];if(p&&p._batchEnabled===n&&p._batchLocation===h){h++;continue}o[c]=h,f._batchLocation=h,r[h]=f;break}}}destroy(){this.renderer=null}}HA.extension={type:ae.RendererSystem,name:"batch"};we.add(HA);let xE=0;class vf{constructor(e){this.renderer=e,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(e){this.gl=e,this.renderer.gl=e,this.renderer.CONTEXT_UID=xE++}init(e){if(e.context)this.initFromContext(e.context);else{const r=this.renderer.background.alpha<1,n=e.premultipliedAlpha;this.preserveDrawingBuffer=e.preserveDrawingBuffer,this.useContextAlpha=e.useContextAlpha,this.powerPreference=e.powerPreference,this.initFromOptions({alpha:r,premultipliedAlpha:n,antialias:e.antialias,stencil:!0,preserveDrawingBuffer:e.preserveDrawingBuffer,powerPreference:e.powerPreference})}}initFromContext(e){this.gl=e,this.validateContext(e),this.renderer.gl=e,this.renderer.CONTEXT_UID=xE++,this.renderer.runners.contextChange.emit(e);const r=this.renderer.view;r.addEventListener!==void 0&&(r.addEventListener("webglcontextlost",this.handleContextLost,!1),r.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(e){const r=this.createContext(this.renderer.view,e);this.initFromContext(r)}createContext(e,r){let n;if(he.PREFER_ENV>=Xo.WEBGL2&&(n=e.getContext("webgl2",r)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=e.getContext("webgl",r)||e.getContext("experimental-webgl",r),!n)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl}getExtensions(){const{gl:e}=this,r={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc"),bptc:e.getExtension("EXT_texture_compression_bptc")};this.webGLVersion===1?Object.assign(this.extensions,r,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,r,{colorBufferFloat:e.getExtension("EXT_color_buffer_float")})}handleContextLost(e){e.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const e=this.renderer.view;this.renderer=null,e.removeEventListener!==void 0&&(e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(e){const r=e.getContextAttributes(),n="WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),r&&!r.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const i=n||!!e.getExtension("OES_element_index_uint");this.supports.uint32Indices=i,i||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}vf.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},vf.extension={type:ae.RendererSystem,name:"context"};we.add(vf);class bv{constructor(e,r){if(this.width=Math.round(e),this.height=Math.round(r),!this.width||!this.height)throw new Error("Framebuffer width or height is zero");this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new Yn("disposeFramebuffer"),this.multisample=kt.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(e=0,r){return this.colorTextures[e]=r||new Ne(null,{scaleMode:wn.NEAREST,resolution:1,mipmap:Pi.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(e){return this.depthTexture=e||new Ne(null,{scaleMode:wn.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Pi.OFF,format:re.DEPTH_COMPONENT,type:Ae.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(e,r){if(e=Math.round(e),r=Math.round(r),!e||!r)throw new Error("Framebuffer width and height must not be zero");if(!(e===this.width&&r===this.height)){this.width=e,this.height=r,this.dirtyId++,this.dirtySize++;for(let n=0;n<this.colorTextures.length;n++){const i=this.colorTextures[n],s=i.resolution;i.setSize(e/s,r/s)}if(this.depthTexture){const n=this.depthTexture.resolution;this.depthTexture.setSize(e/n,r/n)}}}dispose(){this.disposeRunner.emit(this,!1)}destroyDepthTexture(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)}}class jA extends Ne{constructor(e={}){if(typeof e=="number"){const r=arguments[0],n=arguments[1],i=arguments[2],s=arguments[3];e={width:r,height:n,scaleMode:i,resolution:s}}e.width=e.width??100,e.height=e.height??100,e.multisample??(e.multisample=kt.NONE),super(null,e),this.mipmap=Pi.OFF,this.valid=!0,this._clear=new tt([0,0,0,0]),this.framebuffer=new bv(this.realWidth,this.realHeight).addColorTexture(0,this),this.framebuffer.multisample=e.multisample,this.maskStack=[],this.filterStack=[{}]}set clearColor(e){this._clear.setValue(e)}get clearColor(){return this._clear.value}get clear(){return this._clear}get multisample(){return this.framebuffer.multisample}set multisample(e){this.framebuffer.multisample=e}resize(e,r){this.framebuffer.resize(e*this.resolution,r*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)}dispose(){this.framebuffer.dispose(),super.dispose()}destroy(){super.destroy(),this.framebuffer.destroyDepthTexture(),this.framebuffer=null}}class is extends qu{constructor(e){const r=e,n=r.naturalWidth||r.videoWidth||r.displayWidth||r.width,i=r.naturalHeight||r.videoHeight||r.displayHeight||r.height;super(n,i),this.source=e,this.noSubImage=!1}static crossOrigin(e,r,n){n===void 0&&!r.startsWith("data:")?e.crossOrigin=B4(r):n!==!1&&(e.crossOrigin=typeof n=="string"?n:"anonymous")}upload(e,r,n,i){const s=e.gl,o=r.realWidth,l=r.realHeight;if(i=i||this.source,typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement){if(!i.complete||i.naturalWidth===0)return!1}else if(typeof HTMLVideoElement<"u"&&i instanceof HTMLVideoElement&&i.readyState<=1)return!1;return s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===Br.UNPACK),!this.noSubImage&&r.target===s.TEXTURE_2D&&n.width===o&&n.height===l?s.texSubImage2D(s.TEXTURE_2D,0,0,0,r.format,n.type,i):(n.width=o,n.height=l,s.texImage2D(r.target,0,n.internalFormat,r.format,n.type,i)),!0}update(){if(this.destroyed)return;const e=this.source,r=e.naturalWidth||e.videoWidth||e.width,n=e.naturalHeight||e.videoHeight||e.height;this.resize(r,n),super.update()}dispose(){this.source=null}}class $A extends is{constructor(e,r){if(r=r||{},typeof e=="string"){const n=new Image;is.crossOrigin(n,e,r.crossorigin),n.src=e,e=n}super(e),!e.complete&&this._width&&this._height&&(this._width=0,this._height=0),this.url=e.src,this._process=null,this.preserveBitmap=!1,this.createBitmap=(r.createBitmap??he.CREATE_IMAGE_BITMAP)&&!!globalThis.createImageBitmap,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this.bitmap=null,this._load=null,r.autoLoad!==!1&&this.load()}load(e){return this._load?this._load:(e!==void 0&&(this.createBitmap=e),this._load=new Promise((r,n)=>{const i=this.source;this.url=i.src;const s=()=>{this.destroyed||(i.onload=null,i.onerror=null,this.update(),this._load=null,this.createBitmap?r(this.process()):r(this))};i.complete&&i.src?s():(i.onload=s,i.onerror=o=>{n(o),this.onError.emit(o)})}),this._load)}process(){const e=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const r=globalThis.createImageBitmap,n=!e.crossOrigin||e.crossOrigin==="anonymous";return this._process=fetch(e.src,{mode:n?"cors":"no-cors"}).then(i=>i.blob()).then(i=>r(i,0,0,e.width,e.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Br.UNPACK?"premultiply":"none"})).then(i=>this.destroyed?Promise.reject():(this.bitmap=i,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(e,r,n){if(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(e,r,n);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(e,r,n,this.bitmap),!this.preserveBitmap){let i=!0;const s=r._glTextures;for(const o in s){const l=s[o];if(l!==n&&l.dirtyId!==r.dirtyId){i=!1;break}}i&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(e){return typeof HTMLImageElement<"u"&&(typeof e=="string"||e instanceof HTMLImageElement)}}class o_{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(e,r,n){const i=r.width,s=r.height;if(n){const o=e.width/2/i,l=e.height/2/s,h=e.x/i+o,c=e.y/s+l;n=ft.add(n,ft.NW),this.x0=h+o*ft.uX(n),this.y0=c+l*ft.uY(n),n=ft.add(n,2),this.x1=h+o*ft.uX(n),this.y1=c+l*ft.uY(n),n=ft.add(n,2),this.x2=h+o*ft.uX(n),this.y2=c+l*ft.uY(n),n=ft.add(n,2),this.x3=h+o*ft.uX(n),this.y3=c+l*ft.uY(n)}else this.x0=e.x/i,this.y0=e.y/s,this.x1=(e.x+e.width)/i,this.y1=e.y/s,this.x2=(e.x+e.width)/i,this.y2=(e.y+e.height)/s,this.x3=e.x/i,this.y3=(e.y+e.height)/s;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}}o_.prototype.toString=function(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`};const wE=new o_;function Wc(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}class se extends lh{constructor(e,r,n,i,s,o,l){if(super(),this.noFrame=!1,r||(this.noFrame=!0,r=new De(0,0,1,1)),e instanceof se&&(e=e.baseTexture),this.baseTexture=e,this._frame=r,this.trim=i,this.valid=!1,this.destroyed=!1,this._uvs=wE,this.uvMatrix=null,this.orig=n||r,this._rotate=Number(s||0),s===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=o?new Ge(o.x,o.y):new Ge(0,0),this.defaultBorders=l,this._updateID=0,this.textureCacheIds=[],e.valid?this.noFrame?e.valid&&this.onBaseTextureUpdated(e):this.frame=r:e.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&e.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(e){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=e.width,this._frame.height=e.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(e){if(this.baseTexture){if(e){const{resource:r}=this.baseTexture;r!=null&&r.url&&ci[r.url]&&se.removeFromCache(r.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,se.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}clone(){var i;const e=this._frame.clone(),r=this._frame===this.orig?e:this.orig.clone(),n=new se(this.baseTexture,!this.noFrame&&e,r,(i=this.trim)==null?void 0:i.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(n._frame=e),n}updateUvs(){this._uvs===wE&&(this._uvs=new o_),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(e,r={},n=he.STRICT_TEXTURE_CACHE){const i=typeof e=="string";let s=null;if(i)s=e;else if(e instanceof Ne){if(!e.cacheId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";e.cacheId=`${l}-${$o()}`,Ne.addToCache(e,e.cacheId)}s=e.cacheId}else{if(!e._pixiId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";e._pixiId=`${l}_${$o()}`}s=e._pixiId}let o=ci[s];if(i&&n&&!o)throw new Error(`The cacheId "${s}" does not exist in TextureCache.`);return!o&&!(e instanceof Ne)?(r.resolution||(r.resolution=ns(e)),o=new se(new Ne(e,r)),o.baseTexture.cacheId=s,Ne.addToCache(o.baseTexture,s),se.addToCache(o,s)):!o&&e instanceof Ne&&(o=new se(e),se.addToCache(o,s)),o}static fromURL(e,r){const n=Object.assign({autoLoad:!1},r==null?void 0:r.resourceOptions),i=se.from(e,Object.assign({resourceOptions:n},r),!1),s=i.baseTexture.resource;return i.baseTexture.valid?Promise.resolve(i):s.load().then(()=>Promise.resolve(i))}static fromBuffer(e,r,n,i){return new se(Ne.fromBuffer(e,r,n,i))}static fromLoader(e,r,n,i){const s=new Ne(e,Object.assign({scaleMode:Ne.defaultOptions.scaleMode,resolution:ns(r)},i)),{resource:o}=s;o instanceof $A&&(o.url=r);const l=new se(s);return n||(n=r),Ne.addToCache(l.baseTexture,n),se.addToCache(l,n),n!==r&&(Ne.addToCache(l.baseTexture,r),se.addToCache(l,r)),l.baseTexture.valid?Promise.resolve(l):new Promise(h=>{l.baseTexture.once("loaded",()=>h(l))})}static addToCache(e,r){r&&(e.textureCacheIds.includes(r)||e.textureCacheIds.push(r),ci[r]&&ci[r]!==e&&console.warn(`Texture added to the cache with an id [${r}] that already had an entry`),ci[r]=e)}static removeFromCache(e){if(typeof e=="string"){const r=ci[e];if(r){const n=r.textureCacheIds.indexOf(e);return n>-1&&r.textureCacheIds.splice(n,1),delete ci[e],r}}else if(e!=null&&e.textureCacheIds){for(let r=0;r<e.textureCacheIds.length;++r)ci[e.textureCacheIds[r]]===e&&delete ci[e.textureCacheIds[r]];return e.textureCacheIds.length=0,e}return null}get resolution(){return this.baseTexture.resolution}get frame(){return this._frame}set frame(e){this._frame=e,this.noFrame=!1;const{x:r,y:n,width:i,height:s}=e,o=r+i>this.baseTexture.width,l=n+s>this.baseTexture.height;if(o||l){const h=o&&l?"and":"or",c=`X: ${r} + ${i} = ${r+i} > ${this.baseTexture.width}`,f=`Y: ${n} + ${s} = ${n+s} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${c} ${h} ${f}`)}this.valid=i&&s&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=e),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(e){this._rotate=e,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return se._EMPTY||(se._EMPTY=new se(new Ne),Wc(se._EMPTY),Wc(se._EMPTY.baseTexture)),se._EMPTY}static get WHITE(){if(!se._WHITE){const e=he.ADAPTER.createCanvas(16,16),r=e.getContext("2d");e.width=16,e.height=16,r.fillStyle="white",r.fillRect(0,0,16,16),se._WHITE=new se(Ne.from(e)),Wc(se._WHITE),Wc(se._WHITE.baseTexture)}return se._WHITE}}class Qo extends se{constructor(e,r){super(e,r),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(e){this.framebuffer.multisample=e}resize(e,r,n=!0){const i=this.baseTexture.resolution,s=Math.round(e*i)/i,o=Math.round(r*i)/i;this.valid=s>0&&o>0,this._frame.width=this.orig.width=s,this._frame.height=this.orig.height=o,n&&this.baseTexture.resize(s,o),this.updateUvs()}setResolution(e){const{baseTexture:r}=this;r.resolution!==e&&(r.setResolution(e),this.resize(r.width,r.height,!1))}static create(e){return new Qo(new jA(e))}}class WA{constructor(e){this.texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(e,r,n=kt.NONE){const i=new jA(Object.assign({width:e,height:r,resolution:1,multisample:n},this.textureOptions));return new Qo(i)}getOptimalTexture(e,r,n=1,i=kt.NONE){let s;e=Math.max(Math.ceil(e*n-1e-6),1),r=Math.max(Math.ceil(r*n-1e-6),1),!this.enableFullScreen||e!==this._pixelsWidth||r!==this._pixelsHeight?(e=pf(e),r=pf(r),s=((e&65535)<<16|r&65535)>>>0,i>1&&(s+=i*4294967296)):s=i>1?-i:-1,this.texturePool[s]||(this.texturePool[s]=[]);let o=this.texturePool[s].pop();return o||(o=this.createTexture(e,r,i)),o.filterPoolKey=s,o.setResolution(n),o}getFilterTexture(e,r,n){const i=this.getOptimalTexture(e.width,e.height,r||e.resolution,n||kt.NONE);return i.filterFrame=e.filterFrame,i}returnTexture(e){const r=e.filterPoolKey;e.filterFrame=null,this.texturePool[r].push(e)}returnFilterTexture(e){this.returnTexture(e)}clear(e){if(e=e!==!1,e)for(const r in this.texturePool){const n=this.texturePool[r];if(n)for(let i=0;i<n.length;i++)n[i].destroy(!0)}this.texturePool={}}setScreenSize(e){if(!(e.width===this._pixelsWidth&&e.height===this._pixelsHeight)){this.enableFullScreen=e.width>0&&e.height>0;for(const r in this.texturePool){if(!(Number(r)<0))continue;const n=this.texturePool[r];if(n)for(let i=0;i<n.length;i++)n[i].destroy(!0);this.texturePool[r]=[]}this._pixelsWidth=e.width,this._pixelsHeight=e.height}}}WA.SCREEN_KEY=-1;class mN extends Ys{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class VA extends Ys{constructor(){super(),this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.vertexBuffer=new It(this.vertices),this.uvBuffer=new It(this.uvs),this.addAttribute("aVertexPosition",this.vertexBuffer).addAttribute("aTextureCoord",this.uvBuffer).addIndex([0,1,2,0,2,3])}map(e,r){let n=0,i=0;return this.uvs[0]=n,this.uvs[1]=i,this.uvs[2]=n+r.width/e.width,this.uvs[3]=i,this.uvs[4]=n+r.width/e.width,this.uvs[5]=i+r.height/e.height,this.uvs[6]=n,this.uvs[7]=i+r.height/e.height,n=r.x,i=r.y,this.vertices[0]=n,this.vertices[1]=i,this.vertices[2]=n+r.width,this.vertices[3]=i,this.vertices[4]=n+r.width,this.vertices[5]=i+r.height,this.vertices[6]=n,this.vertices[7]=i+r.height,this.invalidate(),this}invalidate(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this}}class gN{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=kt.NONE,this.sourceFrame=new De,this.destinationFrame=new De,this.bindingSourceFrame=new De,this.bindingDestinationFrame=new De,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}}const Vc=[new Ge,new Ge,new Ge,new Ge],Bg=new ot;class XA{constructor(e){this.renderer=e,this.defaultFilterStack=[{}],this.texturePool=new WA,this.statePool=[],this.quad=new mN,this.quadUv=new VA,this.tempRect=new De,this.activeState={},this.globalUniforms=new Qn({outputFrame:new De,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}init(){this.texturePool.setScreenSize(this.renderer.view)}push(e,r){const n=this.renderer,i=this.defaultFilterStack,s=this.statePool.pop()||new gN,o=n.renderTexture;let l,h;if(o.current){const T=o.current;l=T.resolution,h=T.multisample}else l=n.resolution,h=n.multisample;let c=r[0].resolution||l,f=r[0].multisample??h,m=r[0].padding,p=r[0].autoFit,v=r[0].legacy??!0;for(let T=1;T<r.length;T++){const S=r[T];c=Math.min(c,S.resolution||l),f=Math.min(f,S.multisample??h),m=this.useMaxPadding?Math.max(m,S.padding):m+S.padding,p=p&&S.autoFit,v=v||(S.legacy??!0)}i.length===1&&(this.defaultFilterStack[0].renderTexture=o.current),i.push(s),s.resolution=c,s.multisample=f,s.legacy=v,s.target=e,s.sourceFrame.copyFrom(e.filterArea||e.getBounds(!0)),s.sourceFrame.pad(m);const _=this.tempRect.copyFrom(o.sourceFrame);n.projection.transform&&this.transformAABB(Bg.copyFrom(n.projection.transform).invert(),_),p?(s.sourceFrame.fit(_),(s.sourceFrame.width<=0||s.sourceFrame.height<=0)&&(s.sourceFrame.width=0,s.sourceFrame.height=0)):s.sourceFrame.intersects(_)||(s.sourceFrame.width=0,s.sourceFrame.height=0),this.roundFrame(s.sourceFrame,o.current?o.current.resolution:n.resolution,o.sourceFrame,o.destinationFrame,n.projection.transform),s.renderTexture=this.getOptimalFilterTexture(s.sourceFrame.width,s.sourceFrame.height,c,f),s.filters=r,s.destinationFrame.width=s.renderTexture.width,s.destinationFrame.height=s.renderTexture.height;const E=this.tempRect;E.x=0,E.y=0,E.width=s.sourceFrame.width,E.height=s.sourceFrame.height,s.renderTexture.filterFrame=s.sourceFrame,s.bindingSourceFrame.copyFrom(o.sourceFrame),s.bindingDestinationFrame.copyFrom(o.destinationFrame),s.transform=n.projection.transform,n.projection.transform=null,o.bind(s.renderTexture,s.sourceFrame,E),n.framebuffer.clear(0,0,0,0)}pop(){const e=this.defaultFilterStack,r=e.pop(),n=r.filters;this.activeState=r;const i=this.globalUniforms.uniforms;i.outputFrame=r.sourceFrame,i.resolution=r.resolution;const s=i.inputSize,o=i.inputPixel,l=i.inputClamp;if(s[0]=r.destinationFrame.width,s[1]=r.destinationFrame.height,s[2]=1/s[0],s[3]=1/s[1],o[0]=Math.round(s[0]*r.resolution),o[1]=Math.round(s[1]*r.resolution),o[2]=1/o[0],o[3]=1/o[1],l[0]=.5*o[2],l[1]=.5*o[3],l[2]=r.sourceFrame.width*s[2]-.5*o[2],l[3]=r.sourceFrame.height*s[3]-.5*o[3],r.legacy){const c=i.filterArea;c[0]=r.destinationFrame.width,c[1]=r.destinationFrame.height,c[2]=r.sourceFrame.x,c[3]=r.sourceFrame.y,i.filterClamp=i.inputClamp}this.globalUniforms.update();const h=e[e.length-1];if(this.renderer.framebuffer.blit(),n.length===1)n[0].apply(this,r.renderTexture,h.renderTexture,yi.BLEND,r),this.returnFilterTexture(r.renderTexture);else{let c=r.renderTexture,f=this.getOptimalFilterTexture(c.width,c.height,r.resolution);f.filterFrame=c.filterFrame;let m=0;for(m=0;m<n.length-1;++m){m===1&&r.multisample>1&&(f=this.getOptimalFilterTexture(c.width,c.height,r.resolution),f.filterFrame=c.filterFrame),n[m].apply(this,c,f,yi.CLEAR,r);const p=c;c=f,f=p}n[m].apply(this,c,h.renderTexture,yi.BLEND,r),m>1&&r.multisample>1&&this.returnFilterTexture(r.renderTexture),this.returnFilterTexture(c),this.returnFilterTexture(f)}r.clear(),this.statePool.push(r)}bindAndClear(e,r=yi.CLEAR){const{renderTexture:n,state:i}=this.renderer;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e==null?void 0:e.filterFrame){const o=this.tempRect;o.x=0,o.y=0,o.width=e.filterFrame.width,o.height=e.filterFrame.height,n.bind(e,e.filterFrame,o)}else e!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?n.bind(e):this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const s=i.stateId&1||this.forceClear;(r===yi.CLEAR||r===yi.BLIT&&s)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(e,r,n,i){const s=this.renderer;s.state.set(e.state),this.bindAndClear(n,i),e.uniforms.uSampler=r,e.uniforms.filterGlobals=this.globalUniforms,s.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(r._frame,r.filterFrame),s.geometry.bind(this.quadUv),s.geometry.draw($n.TRIANGLES)):(s.geometry.bind(this.quad),s.geometry.draw($n.TRIANGLE_STRIP))}calculateSpriteMatrix(e,r){const{sourceFrame:n,destinationFrame:i}=this.activeState,{orig:s}=r._texture,o=e.set(i.width,0,0,i.height,n.x,n.y),l=r.worldTransform.copyTo(ot.TEMP_MATRIX);return l.invert(),o.prepend(l),o.scale(1/s.width,1/s.height),o.translate(r.anchor.x,r.anchor.y),o}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(e,r,n=1,i=kt.NONE){return this.texturePool.getOptimalTexture(e,r,n,i)}getFilterTexture(e,r,n){if(typeof e=="number"){const s=e;e=r,r=s}e=e||this.activeState.renderTexture;const i=this.texturePool.getOptimalTexture(e.width,e.height,r||e.resolution,n||kt.NONE);return i.filterFrame=e.filterFrame,i}returnFilterTexture(e){this.texturePool.returnTexture(e)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(e,r){const n=Vc[0],i=Vc[1],s=Vc[2],o=Vc[3];n.set(r.left,r.top),i.set(r.left,r.bottom),s.set(r.right,r.top),o.set(r.right,r.bottom),e.apply(n,n),e.apply(i,i),e.apply(s,s),e.apply(o,o);const l=Math.min(n.x,i.x,s.x,o.x),h=Math.min(n.y,i.y,s.y,o.y),c=Math.max(n.x,i.x,s.x,o.x),f=Math.max(n.y,i.y,s.y,o.y);r.x=l,r.y=h,r.width=c-l,r.height=f-h}roundFrame(e,r,n,i,s){if(!(e.width<=0||e.height<=0||n.width<=0||n.height<=0)){if(s){const{a:o,b:l,c:h,d:c}=s;if((Math.abs(l)>1e-4||Math.abs(h)>1e-4)&&(Math.abs(o)>1e-4||Math.abs(c)>1e-4))return}s=s?Bg.copyFrom(s):Bg.identity(),s.translate(-n.x,-n.y).scale(i.width/n.width,i.height/n.height).translate(i.x,i.y),this.transformAABB(s,e),e.ceil(r),this.transformAABB(s.invert(),e)}}}XA.extension={type:ae.RendererSystem,name:"filter"};we.add(XA);class yN{constructor(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=kt.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const vN=new De;class YA{constructor(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new bv(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new De,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let r=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;he.PREFER_ENV===Xo.WEBGL_LEGACY&&(r=null,n=null),r?e.drawBuffers=i=>r.drawBuffersWEBGL(i):(this.hasMRT=!1,e.drawBuffers=()=>{}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)}bind(e,r,n=0){const{gl:i}=this;if(e){const s=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,i.bindFramebuffer(i.FRAMEBUFFER,s.framebuffer)),s.mipLevel!==n&&(e.dirtyId++,e.dirtyFormat++,s.mipLevel=n),s.dirtyId!==e.dirtyId&&(s.dirtyId=e.dirtyId,s.dirtyFormat!==e.dirtyFormat?(s.dirtyFormat=e.dirtyFormat,s.dirtySize=e.dirtySize,this.updateFramebuffer(e,n)):s.dirtySize!==e.dirtySize&&(s.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(let o=0;o<e.colorTextures.length;o++){const l=e.colorTextures[o];this.renderer.texture.unbind(l.parentTextureArray||l)}if(e.depthTexture&&this.renderer.texture.unbind(e.depthTexture),r){const o=r.width>>n,l=r.height>>n,h=o/r.width;this.setViewport(r.x*h,r.y*h,o,l)}else{const o=e.width>>n,l=e.height>>n;this.setViewport(0,0,o,l)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),r?this.setViewport(r.x,r.y,r.width,r.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(e,r,n,i){const s=this.viewport;e=Math.round(e),r=Math.round(r),n=Math.round(n),i=Math.round(i),(s.width!==n||s.height!==i||s.x!==e||s.y!==r)&&(s.x=e,s.y=r,s.width=n,s.height=i,this.gl.viewport(e,r,n,i))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(e,r,n,i,s=Zy.COLOR|Zy.DEPTH){const{gl:o}=this;o.clearColor(e,r,n,i),o.clear(s)}initFramebuffer(e){const{gl:r}=this,n=new yN(r.createFramebuffer());return n.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(e),e.disposeRunner.add(this),n}resizeFramebuffer(e){const{gl:r}=this,n=e.glFramebuffers[this.CONTEXT_UID];if(n.stencil){r.bindRenderbuffer(r.RENDERBUFFER,n.stencil);let o;this.renderer.context.webGLVersion===1?o=r.DEPTH_STENCIL:e.depth&&e.stencil?o=r.DEPTH24_STENCIL8:e.depth?o=r.DEPTH_COMPONENT24:o=r.STENCIL_INDEX8,n.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,o,e.width,e.height):r.renderbufferStorage(r.RENDERBUFFER,o,e.width,e.height)}const i=e.colorTextures;let s=i.length;r.drawBuffers||(s=Math.min(s,1));for(let o=0;o<s;o++){const l=i[o],h=l.parentTextureArray||l;this.renderer.texture.bind(h,0),o===0&&n.msaaBuffer&&(r.bindRenderbuffer(r.RENDERBUFFER,n.msaaBuffer),r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,h._glTextures[this.CONTEXT_UID].internalFormat,e.width,e.height))}e.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(e.depthTexture,0)}updateFramebuffer(e,r){const{gl:n}=this,i=e.glFramebuffers[this.CONTEXT_UID],s=e.colorTextures;let o=s.length;n.drawBuffers||(o=Math.min(o,1)),i.multisample>1&&this.canMultisampleFramebuffer(e)?i.msaaBuffer=i.msaaBuffer||n.createRenderbuffer():i.msaaBuffer&&(n.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));const l=[];for(let h=0;h<o;h++){const c=s[h],f=c.parentTextureArray||c;this.renderer.texture.bind(f,0),h===0&&i.msaaBuffer?(n.bindRenderbuffer(n.RENDERBUFFER,i.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,f._glTextures[this.CONTEXT_UID].internalFormat,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,i.msaaBuffer)):(n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+h,c.target,f._glTextures[this.CONTEXT_UID].texture,r),l.push(n.COLOR_ATTACHMENT0+h))}if(l.length>1&&n.drawBuffers(l),e.depthTexture&&this.writeDepthTexture){const h=e.depthTexture;this.renderer.texture.bind(h,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,h._glTextures[this.CONTEXT_UID].texture,r)}if((e.stencil||e.depth)&&!(e.depthTexture&&this.writeDepthTexture)){i.stencil=i.stencil||n.createRenderbuffer();let h,c;this.renderer.context.webGLVersion===1?(h=n.DEPTH_STENCIL_ATTACHMENT,c=n.DEPTH_STENCIL):e.depth&&e.stencil?(h=n.DEPTH_STENCIL_ATTACHMENT,c=n.DEPTH24_STENCIL8):e.depth?(h=n.DEPTH_ATTACHMENT,c=n.DEPTH_COMPONENT24):(h=n.STENCIL_ATTACHMENT,c=n.STENCIL_INDEX8),n.bindRenderbuffer(n.RENDERBUFFER,i.stencil),i.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,c,e.width,e.height):n.renderbufferStorage(n.RENDERBUFFER,c,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,h,n.RENDERBUFFER,i.stencil)}else i.stencil&&(n.deleteRenderbuffer(i.stencil),i.stencil=null)}canMultisampleFramebuffer(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture}detectSamples(e){const{msaaSamples:r}=this;let n=kt.NONE;if(e<=1||r===null)return n;for(let i=0;i<r.length;i++)if(r[i]<=e){n=r[i];break}return n===1&&(n=kt.NONE),n}blit(e,r,n){const{current:i,renderer:s,gl:o,CONTEXT_UID:l}=this;if(s.context.webGLVersion!==2||!i)return;const h=i.glFramebuffers[l];if(!h)return;if(!e){if(!h.msaaBuffer)return;const f=i.colorTextures[0];if(!f)return;h.blitFramebuffer||(h.blitFramebuffer=new bv(i.width,i.height),h.blitFramebuffer.addColorTexture(0,f)),e=h.blitFramebuffer,e.colorTextures[0]!==f&&(e.colorTextures[0]=f,e.dirtyId++,e.dirtyFormat++),(e.width!==i.width||e.height!==i.height)&&(e.width=i.width,e.height=i.height,e.dirtyId++,e.dirtySize++)}r||(r=vN,r.width=i.width,r.height=i.height),n||(n=r);const c=r.width===n.width&&r.height===n.height;this.bind(e),o.bindFramebuffer(o.READ_FRAMEBUFFER,h.framebuffer),o.blitFramebuffer(r.left,r.top,r.right,r.bottom,n.left,n.top,n.right,n.bottom,o.COLOR_BUFFER_BIT,c?o.NEAREST:o.LINEAR),o.bindFramebuffer(o.READ_FRAMEBUFFER,e.glFramebuffers[this.CONTEXT_UID].framebuffer)}disposeFramebuffer(e,r){const n=e.glFramebuffers[this.CONTEXT_UID],i=this.gl;if(!n)return;delete e.glFramebuffers[this.CONTEXT_UID];const s=this.managedFramebuffers.indexOf(e);s>=0&&this.managedFramebuffers.splice(s,1),e.disposeRunner.remove(this),r||(i.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&i.deleteRenderbuffer(n.msaaBuffer),n.stencil&&i.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&this.disposeFramebuffer(n.blitFramebuffer,r)}disposeAll(e){const r=this.managedFramebuffers;this.managedFramebuffers=[];for(let n=0;n<r.length;n++)this.disposeFramebuffer(r[n],e)}forceStencil(){const e=this.current;if(!e)return;const r=e.glFramebuffers[this.CONTEXT_UID];if(!r||r.stencil&&e.stencil)return;e.stencil=!0;const n=e.width,i=e.height,s=this.gl,o=r.stencil=s.createRenderbuffer();s.bindRenderbuffer(s.RENDERBUFFER,o);let l,h;this.renderer.context.webGLVersion===1?(l=s.DEPTH_STENCIL_ATTACHMENT,h=s.DEPTH_STENCIL):e.depth?(l=s.DEPTH_STENCIL_ATTACHMENT,h=s.DEPTH24_STENCIL8):(l=s.STENCIL_ATTACHMENT,h=s.STENCIL_INDEX8),r.msaaBuffer?s.renderbufferStorageMultisample(s.RENDERBUFFER,r.multisample,h,n,i):s.renderbufferStorage(s.RENDERBUFFER,h,n,i),s.framebufferRenderbuffer(s.FRAMEBUFFER,l,s.RENDERBUFFER,o)}reset(){this.current=this.unknownFramebuffer,this.viewport=new De}destroy(){this.renderer=null}}YA.extension={type:ae.RendererSystem,name:"framebuffer"};we.add(YA);const Lg={5126:4,5123:2,5121:1};class QA{constructor(e){this.renderer=e,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}contextChange(){this.disposeAll(!0);const e=this.gl=this.renderer.gl,r=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,r.webGLVersion!==2){let n=this.renderer.context.extensions.vertexArrayObject;he.PREFER_ENV===Xo.WEBGL_LEGACY&&(n=null),n?(e.createVertexArray=()=>n.createVertexArrayOES(),e.bindVertexArray=i=>n.bindVertexArrayOES(i),e.deleteVertexArray=i=>n.deleteVertexArrayOES(i)):(this.hasVao=!1,e.createVertexArray=()=>null,e.bindVertexArray=()=>null,e.deleteVertexArray=()=>null)}if(r.webGLVersion!==2){const n=e.getExtension("ANGLE_instanced_arrays");n?(e.vertexAttribDivisor=(i,s)=>n.vertexAttribDivisorANGLE(i,s),e.drawElementsInstanced=(i,s,o,l,h)=>n.drawElementsInstancedANGLE(i,s,o,l,h),e.drawArraysInstanced=(i,s,o,l)=>n.drawArraysInstancedANGLE(i,s,o,l)):this.hasInstance=!1}this.canUseUInt32ElementIndex=r.webGLVersion===2||!!r.extensions.uint32ElementIndex}bind(e,r){r=r||this.renderer.shader.shader;const{gl:n}=this;let i=e.glVertexArrayObjects[this.CONTEXT_UID],s=!1;i||(this.managedGeometries[e.id]=e,e.disposeRunner.add(this),e.glVertexArrayObjects[this.CONTEXT_UID]=i={},s=!0);const o=i[r.program.id]||this.initGeometryVao(e,r,s);this._activeGeometry=e,this._activeVao!==o&&(this._activeVao=o,this.hasVao?n.bindVertexArray(o):this.activateVao(e,r.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const e=this._activeGeometry,r=this.renderer.buffer;for(let n=0;n<e.buffers.length;n++){const i=e.buffers[n];r.update(i)}}checkCompatibility(e,r){const n=e.attributes,i=r.attributeData;for(const s in i)if(!n[s])throw new Error(`shader and geometry incompatible, geometry missing the "${s}" attribute`)}getSignature(e,r){const n=e.attributes,i=r.attributeData,s=["g",e.id];for(const o in n)i[o]&&s.push(o,i[o].location);return s.join("-")}initGeometryVao(e,r,n=!0){const i=this.gl,s=this.CONTEXT_UID,o=this.renderer.buffer,l=r.program;l.glPrograms[s]||this.renderer.shader.generateProgram(r),this.checkCompatibility(e,l);const h=this.getSignature(e,l),c=e.glVertexArrayObjects[this.CONTEXT_UID];let f=c[h];if(f)return c[l.id]=f,f;const m=e.buffers,p=e.attributes,v={},_={};for(const E in m)v[E]=0,_[E]=0;for(const E in p)!p[E].size&&l.attributeData[E]?p[E].size=l.attributeData[E].size:p[E].size||console.warn(`PIXI Geometry attribute '${E}' size cannot be determined (likely the bound shader does not have the attribute)`),v[p[E].buffer]+=p[E].size*Lg[p[E].type];for(const E in p){const T=p[E],S=T.size;T.stride===void 0&&(v[T.buffer]===S*Lg[T.type]?T.stride=0:T.stride=v[T.buffer]),T.start===void 0&&(T.start=_[T.buffer],_[T.buffer]+=S*Lg[T.type])}f=i.createVertexArray(),i.bindVertexArray(f);for(let E=0;E<m.length;E++){const T=m[E];o.bind(T),n&&T._glBuffers[s].refCount++}return this.activateVao(e,l),c[l.id]=f,c[h]=f,i.bindVertexArray(null),o.unbind(Ai.ARRAY_BUFFER),f}disposeGeometry(e,r){var l;if(!this.managedGeometries[e.id])return;delete this.managedGeometries[e.id];const n=e.glVertexArrayObjects[this.CONTEXT_UID],i=this.gl,s=e.buffers,o=(l=this.renderer)==null?void 0:l.buffer;if(e.disposeRunner.remove(this),!!n){if(o)for(let h=0;h<s.length;h++){const c=s[h]._glBuffers[this.CONTEXT_UID];c&&(c.refCount--,c.refCount===0&&!r&&o.dispose(s[h],r))}if(!r){for(const h in n)if(h[0]==="g"){const c=n[h];this._activeVao===c&&this.unbind(),i.deleteVertexArray(c)}}delete e.glVertexArrayObjects[this.CONTEXT_UID]}}disposeAll(e){const r=Object.keys(this.managedGeometries);for(let n=0;n<r.length;n++)this.disposeGeometry(this.managedGeometries[r[n]],e)}activateVao(e,r){const n=this.gl,i=this.CONTEXT_UID,s=this.renderer.buffer,o=e.buffers,l=e.attributes;e.indexBuffer&&s.bind(e.indexBuffer);let h=null;for(const c in l){const f=l[c],m=o[f.buffer],p=m._glBuffers[i];if(r.attributeData[c]){h!==p&&(s.bind(m),h=p);const v=r.attributeData[c].location;if(n.enableVertexAttribArray(v),n.vertexAttribPointer(v,f.size,f.type||n.FLOAT,f.normalized,f.stride,f.start),f.instance)if(this.hasInstance)n.vertexAttribDivisor(v,f.divisor);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(e,r,n,i){const{gl:s}=this,o=this._activeGeometry;if(o.indexBuffer){const l=o.indexBuffer.data.BYTES_PER_ELEMENT,h=l===2?s.UNSIGNED_SHORT:s.UNSIGNED_INT;l===2||l===4&&this.canUseUInt32ElementIndex?o.instanced?s.drawElementsInstanced(e,r||o.indexBuffer.data.length,h,(n||0)*l,i||1):s.drawElements(e,r||o.indexBuffer.data.length,h,(n||0)*l):console.warn("unsupported index buffer type: uint32")}else o.instanced?s.drawArraysInstanced(e,n,r||o.getSize(),i||1):s.drawArrays(e,n,r||o.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this.renderer=null}}QA.extension={type:ae.RendererSystem,name:"geometry"};we.add(QA);const EE=new ot;class a_{constructor(e,r){this._texture=e,this.mapCoord=new ot,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=typeof r>"u"?.5:r,this.isSimple=!1}get texture(){return this._texture}set texture(e){this._texture=e,this._textureID=-1}multiplyUvs(e,r){r===void 0&&(r=e);const n=this.mapCoord;for(let i=0;i<e.length;i+=2){const s=e[i],o=e[i+1];r[i]=s*n.a+o*n.c+n.tx,r[i+1]=s*n.b+o*n.d+n.ty}return r}update(e){const r=this._texture;if(!r||!r.valid||!e&&this._textureID===r._updateID)return!1;this._textureID=r._updateID,this._updateID++;const n=r._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 i=r.orig,s=r.trim;s&&(EE.set(i.width/s.width,0,0,i.height/s.height,-s.x/s.width,-s.y/s.height),this.mapCoord.append(EE));const o=r.baseTexture,l=this.uClampFrame,h=this.clampMargin/o.resolution,c=this.clampOffset;return l[0]=(r._frame.x+h+c)/o.width,l[1]=(r._frame.y+h+c)/o.height,l[2]=(r._frame.x+r._frame.width-h+c)/o.width,l[3]=(r._frame.y+r._frame.height-h+c)/o.height,this.uClampOffset[0]=c/o.realWidth,this.uClampOffset[1]=c/o.realHeight,this.isSimple=r._frame.width===o.width&&r._frame.height===o.height&&r.rotate===0,!0}}var _N=`varying vec2 vMaskCoord;
417
+ `;const Sv=class au extends Ci{constructor(e,r,n){const i=Qi.from(e||au.defaultVertexSrc,r||au.defaultFragmentSrc);super(i,n),this.padding=0,this.resolution=au.defaultResolution,this.multisample=au.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new Mi}apply(e,r,n,i,s){e.applyFilter(this,r,n,i)}get blendMode(){return this.state.blendMode}set blendMode(e){this.state.blendMode=e}get resolution(){return this._resolution}set resolution(e){this._resolution=e}static get defaultVertexSrc(){return pN}static get defaultFragmentSrc(){return fN}};Sv.defaultResolution=1,Sv.defaultMultisample=kt.NONE;let Sr=Sv;class yf{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new tt(0),this.alpha=1}init(e){this.clearBeforeRender=e.clearBeforeRender;const{backgroundColor:r,background:n,backgroundAlpha:i}=e,s=n??r;s!==void 0&&(this.color=s),this.alpha=i}get color(){return this._backgroundColor.value}set color(e){this._backgroundColor.setValue(e)}get alpha(){return this._backgroundColor.alpha}set alpha(e){this._backgroundColor.setAlpha(e)}get backgroundColor(){return this._backgroundColor}destroy(){}}yf.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},yf.extension={type:[ae.RendererSystem,ae.CanvasRendererSystem],name:"background"};we.add(yf);class HA{constructor(e){this.renderer=e,this.emptyRenderer=new lp(e),this.currentRenderer=this.emptyRenderer}setObjectRenderer(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(e,r){const{boundTextures:n}=this.renderer.texture;for(let i=r-1;i>=0;--i)e[i]=n[i]||null,e[i]&&(e[i]._batchLocation=i)}boundArray(e,r,n,i){const{elements:s,ids:o,count:l}=e;let h=0;for(let c=0;c<l;c++){const f=s[c],m=f._batchLocation;if(m>=0&&m<i&&r[m]===f){o[c]=m;continue}for(;h<i;){const p=r[h];if(p&&p._batchEnabled===n&&p._batchLocation===h){h++;continue}o[c]=h,f._batchLocation=h,r[h]=f;break}}}destroy(){this.renderer=null}}HA.extension={type:ae.RendererSystem,name:"batch"};we.add(HA);let xE=0;class vf{constructor(e){this.renderer=e,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(e){this.gl=e,this.renderer.gl=e,this.renderer.CONTEXT_UID=xE++}init(e){if(e.context)this.initFromContext(e.context);else{const r=this.renderer.background.alpha<1,n=e.premultipliedAlpha;this.preserveDrawingBuffer=e.preserveDrawingBuffer,this.useContextAlpha=e.useContextAlpha,this.powerPreference=e.powerPreference,this.initFromOptions({alpha:r,premultipliedAlpha:n,antialias:e.antialias,stencil:!0,preserveDrawingBuffer:e.preserveDrawingBuffer,powerPreference:e.powerPreference})}}initFromContext(e){this.gl=e,this.validateContext(e),this.renderer.gl=e,this.renderer.CONTEXT_UID=xE++,this.renderer.runners.contextChange.emit(e);const r=this.renderer.view;r.addEventListener!==void 0&&(r.addEventListener("webglcontextlost",this.handleContextLost,!1),r.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(e){const r=this.createContext(this.renderer.view,e);this.initFromContext(r)}createContext(e,r){let n;if(he.PREFER_ENV>=Xo.WEBGL2&&(n=e.getContext("webgl2",r)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=e.getContext("webgl",r)||e.getContext("experimental-webgl",r),!n)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl}getExtensions(){const{gl:e}=this,r={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc"),bptc:e.getExtension("EXT_texture_compression_bptc")};this.webGLVersion===1?Object.assign(this.extensions,r,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,r,{colorBufferFloat:e.getExtension("EXT_color_buffer_float")})}handleContextLost(e){e.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const e=this.renderer.view;this.renderer=null,e.removeEventListener!==void 0&&(e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(e){const r=e.getContextAttributes(),n="WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),r&&!r.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const i=n||!!e.getExtension("OES_element_index_uint");this.supports.uint32Indices=i,i||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}vf.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},vf.extension={type:ae.RendererSystem,name:"context"};we.add(vf);class bv{constructor(e,r){if(this.width=Math.round(e),this.height=Math.round(r),!this.width||!this.height)throw new Error("Framebuffer width or height is zero");this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new Yn("disposeFramebuffer"),this.multisample=kt.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(e=0,r){return this.colorTextures[e]=r||new Ne(null,{scaleMode:wn.NEAREST,resolution:1,mipmap:Pi.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(e){return this.depthTexture=e||new Ne(null,{scaleMode:wn.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Pi.OFF,format:ne.DEPTH_COMPONENT,type:Ae.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(e,r){if(e=Math.round(e),r=Math.round(r),!e||!r)throw new Error("Framebuffer width and height must not be zero");if(!(e===this.width&&r===this.height)){this.width=e,this.height=r,this.dirtyId++,this.dirtySize++;for(let n=0;n<this.colorTextures.length;n++){const i=this.colorTextures[n],s=i.resolution;i.setSize(e/s,r/s)}if(this.depthTexture){const n=this.depthTexture.resolution;this.depthTexture.setSize(e/n,r/n)}}}dispose(){this.disposeRunner.emit(this,!1)}destroyDepthTexture(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)}}class jA extends Ne{constructor(e={}){if(typeof e=="number"){const r=arguments[0],n=arguments[1],i=arguments[2],s=arguments[3];e={width:r,height:n,scaleMode:i,resolution:s}}e.width=e.width??100,e.height=e.height??100,e.multisample??(e.multisample=kt.NONE),super(null,e),this.mipmap=Pi.OFF,this.valid=!0,this._clear=new tt([0,0,0,0]),this.framebuffer=new bv(this.realWidth,this.realHeight).addColorTexture(0,this),this.framebuffer.multisample=e.multisample,this.maskStack=[],this.filterStack=[{}]}set clearColor(e){this._clear.setValue(e)}get clearColor(){return this._clear.value}get clear(){return this._clear}get multisample(){return this.framebuffer.multisample}set multisample(e){this.framebuffer.multisample=e}resize(e,r){this.framebuffer.resize(e*this.resolution,r*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)}dispose(){this.framebuffer.dispose(),super.dispose()}destroy(){super.destroy(),this.framebuffer.destroyDepthTexture(),this.framebuffer=null}}class is extends qu{constructor(e){const r=e,n=r.naturalWidth||r.videoWidth||r.displayWidth||r.width,i=r.naturalHeight||r.videoHeight||r.displayHeight||r.height;super(n,i),this.source=e,this.noSubImage=!1}static crossOrigin(e,r,n){n===void 0&&!r.startsWith("data:")?e.crossOrigin=B4(r):n!==!1&&(e.crossOrigin=typeof n=="string"?n:"anonymous")}upload(e,r,n,i){const s=e.gl,o=r.realWidth,l=r.realHeight;if(i=i||this.source,typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement){if(!i.complete||i.naturalWidth===0)return!1}else if(typeof HTMLVideoElement<"u"&&i instanceof HTMLVideoElement&&i.readyState<=1)return!1;return s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===Br.UNPACK),!this.noSubImage&&r.target===s.TEXTURE_2D&&n.width===o&&n.height===l?s.texSubImage2D(s.TEXTURE_2D,0,0,0,r.format,n.type,i):(n.width=o,n.height=l,s.texImage2D(r.target,0,n.internalFormat,r.format,n.type,i)),!0}update(){if(this.destroyed)return;const e=this.source,r=e.naturalWidth||e.videoWidth||e.width,n=e.naturalHeight||e.videoHeight||e.height;this.resize(r,n),super.update()}dispose(){this.source=null}}class $A extends is{constructor(e,r){if(r=r||{},typeof e=="string"){const n=new Image;is.crossOrigin(n,e,r.crossorigin),n.src=e,e=n}super(e),!e.complete&&this._width&&this._height&&(this._width=0,this._height=0),this.url=e.src,this._process=null,this.preserveBitmap=!1,this.createBitmap=(r.createBitmap??he.CREATE_IMAGE_BITMAP)&&!!globalThis.createImageBitmap,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this.bitmap=null,this._load=null,r.autoLoad!==!1&&this.load()}load(e){return this._load?this._load:(e!==void 0&&(this.createBitmap=e),this._load=new Promise((r,n)=>{const i=this.source;this.url=i.src;const s=()=>{this.destroyed||(i.onload=null,i.onerror=null,this.update(),this._load=null,this.createBitmap?r(this.process()):r(this))};i.complete&&i.src?s():(i.onload=s,i.onerror=o=>{n(o),this.onError.emit(o)})}),this._load)}process(){const e=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const r=globalThis.createImageBitmap,n=!e.crossOrigin||e.crossOrigin==="anonymous";return this._process=fetch(e.src,{mode:n?"cors":"no-cors"}).then(i=>i.blob()).then(i=>r(i,0,0,e.width,e.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Br.UNPACK?"premultiply":"none"})).then(i=>this.destroyed?Promise.reject():(this.bitmap=i,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(e,r,n){if(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(e,r,n);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(e,r,n,this.bitmap),!this.preserveBitmap){let i=!0;const s=r._glTextures;for(const o in s){const l=s[o];if(l!==n&&l.dirtyId!==r.dirtyId){i=!1;break}}i&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(e){return typeof HTMLImageElement<"u"&&(typeof e=="string"||e instanceof HTMLImageElement)}}class o_{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(e,r,n){const i=r.width,s=r.height;if(n){const o=e.width/2/i,l=e.height/2/s,h=e.x/i+o,c=e.y/s+l;n=ft.add(n,ft.NW),this.x0=h+o*ft.uX(n),this.y0=c+l*ft.uY(n),n=ft.add(n,2),this.x1=h+o*ft.uX(n),this.y1=c+l*ft.uY(n),n=ft.add(n,2),this.x2=h+o*ft.uX(n),this.y2=c+l*ft.uY(n),n=ft.add(n,2),this.x3=h+o*ft.uX(n),this.y3=c+l*ft.uY(n)}else this.x0=e.x/i,this.y0=e.y/s,this.x1=(e.x+e.width)/i,this.y1=e.y/s,this.x2=(e.x+e.width)/i,this.y2=(e.y+e.height)/s,this.x3=e.x/i,this.y3=(e.y+e.height)/s;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}}o_.prototype.toString=function(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`};const wE=new o_;function Wc(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}class se extends lh{constructor(e,r,n,i,s,o,l){if(super(),this.noFrame=!1,r||(this.noFrame=!0,r=new De(0,0,1,1)),e instanceof se&&(e=e.baseTexture),this.baseTexture=e,this._frame=r,this.trim=i,this.valid=!1,this.destroyed=!1,this._uvs=wE,this.uvMatrix=null,this.orig=n||r,this._rotate=Number(s||0),s===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=o?new Ge(o.x,o.y):new Ge(0,0),this.defaultBorders=l,this._updateID=0,this.textureCacheIds=[],e.valid?this.noFrame?e.valid&&this.onBaseTextureUpdated(e):this.frame=r:e.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&e.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(e){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=e.width,this._frame.height=e.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(e){if(this.baseTexture){if(e){const{resource:r}=this.baseTexture;r!=null&&r.url&&ci[r.url]&&se.removeFromCache(r.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,se.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}clone(){var i;const e=this._frame.clone(),r=this._frame===this.orig?e:this.orig.clone(),n=new se(this.baseTexture,!this.noFrame&&e,r,(i=this.trim)==null?void 0:i.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(n._frame=e),n}updateUvs(){this._uvs===wE&&(this._uvs=new o_),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(e,r={},n=he.STRICT_TEXTURE_CACHE){const i=typeof e=="string";let s=null;if(i)s=e;else if(e instanceof Ne){if(!e.cacheId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";e.cacheId=`${l}-${$o()}`,Ne.addToCache(e,e.cacheId)}s=e.cacheId}else{if(!e._pixiId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";e._pixiId=`${l}_${$o()}`}s=e._pixiId}let o=ci[s];if(i&&n&&!o)throw new Error(`The cacheId "${s}" does not exist in TextureCache.`);return!o&&!(e instanceof Ne)?(r.resolution||(r.resolution=ns(e)),o=new se(new Ne(e,r)),o.baseTexture.cacheId=s,Ne.addToCache(o.baseTexture,s),se.addToCache(o,s)):!o&&e instanceof Ne&&(o=new se(e),se.addToCache(o,s)),o}static fromURL(e,r){const n=Object.assign({autoLoad:!1},r==null?void 0:r.resourceOptions),i=se.from(e,Object.assign({resourceOptions:n},r),!1),s=i.baseTexture.resource;return i.baseTexture.valid?Promise.resolve(i):s.load().then(()=>Promise.resolve(i))}static fromBuffer(e,r,n,i){return new se(Ne.fromBuffer(e,r,n,i))}static fromLoader(e,r,n,i){const s=new Ne(e,Object.assign({scaleMode:Ne.defaultOptions.scaleMode,resolution:ns(r)},i)),{resource:o}=s;o instanceof $A&&(o.url=r);const l=new se(s);return n||(n=r),Ne.addToCache(l.baseTexture,n),se.addToCache(l,n),n!==r&&(Ne.addToCache(l.baseTexture,r),se.addToCache(l,r)),l.baseTexture.valid?Promise.resolve(l):new Promise(h=>{l.baseTexture.once("loaded",()=>h(l))})}static addToCache(e,r){r&&(e.textureCacheIds.includes(r)||e.textureCacheIds.push(r),ci[r]&&ci[r]!==e&&console.warn(`Texture added to the cache with an id [${r}] that already had an entry`),ci[r]=e)}static removeFromCache(e){if(typeof e=="string"){const r=ci[e];if(r){const n=r.textureCacheIds.indexOf(e);return n>-1&&r.textureCacheIds.splice(n,1),delete ci[e],r}}else if(e!=null&&e.textureCacheIds){for(let r=0;r<e.textureCacheIds.length;++r)ci[e.textureCacheIds[r]]===e&&delete ci[e.textureCacheIds[r]];return e.textureCacheIds.length=0,e}return null}get resolution(){return this.baseTexture.resolution}get frame(){return this._frame}set frame(e){this._frame=e,this.noFrame=!1;const{x:r,y:n,width:i,height:s}=e,o=r+i>this.baseTexture.width,l=n+s>this.baseTexture.height;if(o||l){const h=o&&l?"and":"or",c=`X: ${r} + ${i} = ${r+i} > ${this.baseTexture.width}`,f=`Y: ${n} + ${s} = ${n+s} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${c} ${h} ${f}`)}this.valid=i&&s&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=e),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(e){this._rotate=e,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return se._EMPTY||(se._EMPTY=new se(new Ne),Wc(se._EMPTY),Wc(se._EMPTY.baseTexture)),se._EMPTY}static get WHITE(){if(!se._WHITE){const e=he.ADAPTER.createCanvas(16,16),r=e.getContext("2d");e.width=16,e.height=16,r.fillStyle="white",r.fillRect(0,0,16,16),se._WHITE=new se(Ne.from(e)),Wc(se._WHITE),Wc(se._WHITE.baseTexture)}return se._WHITE}}class Qo extends se{constructor(e,r){super(e,r),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(e){this.framebuffer.multisample=e}resize(e,r,n=!0){const i=this.baseTexture.resolution,s=Math.round(e*i)/i,o=Math.round(r*i)/i;this.valid=s>0&&o>0,this._frame.width=this.orig.width=s,this._frame.height=this.orig.height=o,n&&this.baseTexture.resize(s,o),this.updateUvs()}setResolution(e){const{baseTexture:r}=this;r.resolution!==e&&(r.setResolution(e),this.resize(r.width,r.height,!1))}static create(e){return new Qo(new jA(e))}}class WA{constructor(e){this.texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(e,r,n=kt.NONE){const i=new jA(Object.assign({width:e,height:r,resolution:1,multisample:n},this.textureOptions));return new Qo(i)}getOptimalTexture(e,r,n=1,i=kt.NONE){let s;e=Math.max(Math.ceil(e*n-1e-6),1),r=Math.max(Math.ceil(r*n-1e-6),1),!this.enableFullScreen||e!==this._pixelsWidth||r!==this._pixelsHeight?(e=pf(e),r=pf(r),s=((e&65535)<<16|r&65535)>>>0,i>1&&(s+=i*4294967296)):s=i>1?-i:-1,this.texturePool[s]||(this.texturePool[s]=[]);let o=this.texturePool[s].pop();return o||(o=this.createTexture(e,r,i)),o.filterPoolKey=s,o.setResolution(n),o}getFilterTexture(e,r,n){const i=this.getOptimalTexture(e.width,e.height,r||e.resolution,n||kt.NONE);return i.filterFrame=e.filterFrame,i}returnTexture(e){const r=e.filterPoolKey;e.filterFrame=null,this.texturePool[r].push(e)}returnFilterTexture(e){this.returnTexture(e)}clear(e){if(e=e!==!1,e)for(const r in this.texturePool){const n=this.texturePool[r];if(n)for(let i=0;i<n.length;i++)n[i].destroy(!0)}this.texturePool={}}setScreenSize(e){if(!(e.width===this._pixelsWidth&&e.height===this._pixelsHeight)){this.enableFullScreen=e.width>0&&e.height>0;for(const r in this.texturePool){if(!(Number(r)<0))continue;const n=this.texturePool[r];if(n)for(let i=0;i<n.length;i++)n[i].destroy(!0);this.texturePool[r]=[]}this._pixelsWidth=e.width,this._pixelsHeight=e.height}}}WA.SCREEN_KEY=-1;class mN extends Ys{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class VA extends Ys{constructor(){super(),this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.vertexBuffer=new It(this.vertices),this.uvBuffer=new It(this.uvs),this.addAttribute("aVertexPosition",this.vertexBuffer).addAttribute("aTextureCoord",this.uvBuffer).addIndex([0,1,2,0,2,3])}map(e,r){let n=0,i=0;return this.uvs[0]=n,this.uvs[1]=i,this.uvs[2]=n+r.width/e.width,this.uvs[3]=i,this.uvs[4]=n+r.width/e.width,this.uvs[5]=i+r.height/e.height,this.uvs[6]=n,this.uvs[7]=i+r.height/e.height,n=r.x,i=r.y,this.vertices[0]=n,this.vertices[1]=i,this.vertices[2]=n+r.width,this.vertices[3]=i,this.vertices[4]=n+r.width,this.vertices[5]=i+r.height,this.vertices[6]=n,this.vertices[7]=i+r.height,this.invalidate(),this}invalidate(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this}}class gN{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=kt.NONE,this.sourceFrame=new De,this.destinationFrame=new De,this.bindingSourceFrame=new De,this.bindingDestinationFrame=new De,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}}const Vc=[new Ge,new Ge,new Ge,new Ge],Bg=new ot;class XA{constructor(e){this.renderer=e,this.defaultFilterStack=[{}],this.texturePool=new WA,this.statePool=[],this.quad=new mN,this.quadUv=new VA,this.tempRect=new De,this.activeState={},this.globalUniforms=new Qn({outputFrame:new De,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}init(){this.texturePool.setScreenSize(this.renderer.view)}push(e,r){const n=this.renderer,i=this.defaultFilterStack,s=this.statePool.pop()||new gN,o=n.renderTexture;let l,h;if(o.current){const T=o.current;l=T.resolution,h=T.multisample}else l=n.resolution,h=n.multisample;let c=r[0].resolution||l,f=r[0].multisample??h,m=r[0].padding,p=r[0].autoFit,v=r[0].legacy??!0;for(let T=1;T<r.length;T++){const S=r[T];c=Math.min(c,S.resolution||l),f=Math.min(f,S.multisample??h),m=this.useMaxPadding?Math.max(m,S.padding):m+S.padding,p=p&&S.autoFit,v=v||(S.legacy??!0)}i.length===1&&(this.defaultFilterStack[0].renderTexture=o.current),i.push(s),s.resolution=c,s.multisample=f,s.legacy=v,s.target=e,s.sourceFrame.copyFrom(e.filterArea||e.getBounds(!0)),s.sourceFrame.pad(m);const _=this.tempRect.copyFrom(o.sourceFrame);n.projection.transform&&this.transformAABB(Bg.copyFrom(n.projection.transform).invert(),_),p?(s.sourceFrame.fit(_),(s.sourceFrame.width<=0||s.sourceFrame.height<=0)&&(s.sourceFrame.width=0,s.sourceFrame.height=0)):s.sourceFrame.intersects(_)||(s.sourceFrame.width=0,s.sourceFrame.height=0),this.roundFrame(s.sourceFrame,o.current?o.current.resolution:n.resolution,o.sourceFrame,o.destinationFrame,n.projection.transform),s.renderTexture=this.getOptimalFilterTexture(s.sourceFrame.width,s.sourceFrame.height,c,f),s.filters=r,s.destinationFrame.width=s.renderTexture.width,s.destinationFrame.height=s.renderTexture.height;const E=this.tempRect;E.x=0,E.y=0,E.width=s.sourceFrame.width,E.height=s.sourceFrame.height,s.renderTexture.filterFrame=s.sourceFrame,s.bindingSourceFrame.copyFrom(o.sourceFrame),s.bindingDestinationFrame.copyFrom(o.destinationFrame),s.transform=n.projection.transform,n.projection.transform=null,o.bind(s.renderTexture,s.sourceFrame,E),n.framebuffer.clear(0,0,0,0)}pop(){const e=this.defaultFilterStack,r=e.pop(),n=r.filters;this.activeState=r;const i=this.globalUniforms.uniforms;i.outputFrame=r.sourceFrame,i.resolution=r.resolution;const s=i.inputSize,o=i.inputPixel,l=i.inputClamp;if(s[0]=r.destinationFrame.width,s[1]=r.destinationFrame.height,s[2]=1/s[0],s[3]=1/s[1],o[0]=Math.round(s[0]*r.resolution),o[1]=Math.round(s[1]*r.resolution),o[2]=1/o[0],o[3]=1/o[1],l[0]=.5*o[2],l[1]=.5*o[3],l[2]=r.sourceFrame.width*s[2]-.5*o[2],l[3]=r.sourceFrame.height*s[3]-.5*o[3],r.legacy){const c=i.filterArea;c[0]=r.destinationFrame.width,c[1]=r.destinationFrame.height,c[2]=r.sourceFrame.x,c[3]=r.sourceFrame.y,i.filterClamp=i.inputClamp}this.globalUniforms.update();const h=e[e.length-1];if(this.renderer.framebuffer.blit(),n.length===1)n[0].apply(this,r.renderTexture,h.renderTexture,yi.BLEND,r),this.returnFilterTexture(r.renderTexture);else{let c=r.renderTexture,f=this.getOptimalFilterTexture(c.width,c.height,r.resolution);f.filterFrame=c.filterFrame;let m=0;for(m=0;m<n.length-1;++m){m===1&&r.multisample>1&&(f=this.getOptimalFilterTexture(c.width,c.height,r.resolution),f.filterFrame=c.filterFrame),n[m].apply(this,c,f,yi.CLEAR,r);const p=c;c=f,f=p}n[m].apply(this,c,h.renderTexture,yi.BLEND,r),m>1&&r.multisample>1&&this.returnFilterTexture(r.renderTexture),this.returnFilterTexture(c),this.returnFilterTexture(f)}r.clear(),this.statePool.push(r)}bindAndClear(e,r=yi.CLEAR){const{renderTexture:n,state:i}=this.renderer;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e==null?void 0:e.filterFrame){const o=this.tempRect;o.x=0,o.y=0,o.width=e.filterFrame.width,o.height=e.filterFrame.height,n.bind(e,e.filterFrame,o)}else e!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?n.bind(e):this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const s=i.stateId&1||this.forceClear;(r===yi.CLEAR||r===yi.BLIT&&s)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(e,r,n,i){const s=this.renderer;s.state.set(e.state),this.bindAndClear(n,i),e.uniforms.uSampler=r,e.uniforms.filterGlobals=this.globalUniforms,s.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(r._frame,r.filterFrame),s.geometry.bind(this.quadUv),s.geometry.draw($n.TRIANGLES)):(s.geometry.bind(this.quad),s.geometry.draw($n.TRIANGLE_STRIP))}calculateSpriteMatrix(e,r){const{sourceFrame:n,destinationFrame:i}=this.activeState,{orig:s}=r._texture,o=e.set(i.width,0,0,i.height,n.x,n.y),l=r.worldTransform.copyTo(ot.TEMP_MATRIX);return l.invert(),o.prepend(l),o.scale(1/s.width,1/s.height),o.translate(r.anchor.x,r.anchor.y),o}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(e,r,n=1,i=kt.NONE){return this.texturePool.getOptimalTexture(e,r,n,i)}getFilterTexture(e,r,n){if(typeof e=="number"){const s=e;e=r,r=s}e=e||this.activeState.renderTexture;const i=this.texturePool.getOptimalTexture(e.width,e.height,r||e.resolution,n||kt.NONE);return i.filterFrame=e.filterFrame,i}returnFilterTexture(e){this.texturePool.returnTexture(e)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(e,r){const n=Vc[0],i=Vc[1],s=Vc[2],o=Vc[3];n.set(r.left,r.top),i.set(r.left,r.bottom),s.set(r.right,r.top),o.set(r.right,r.bottom),e.apply(n,n),e.apply(i,i),e.apply(s,s),e.apply(o,o);const l=Math.min(n.x,i.x,s.x,o.x),h=Math.min(n.y,i.y,s.y,o.y),c=Math.max(n.x,i.x,s.x,o.x),f=Math.max(n.y,i.y,s.y,o.y);r.x=l,r.y=h,r.width=c-l,r.height=f-h}roundFrame(e,r,n,i,s){if(!(e.width<=0||e.height<=0||n.width<=0||n.height<=0)){if(s){const{a:o,b:l,c:h,d:c}=s;if((Math.abs(l)>1e-4||Math.abs(h)>1e-4)&&(Math.abs(o)>1e-4||Math.abs(c)>1e-4))return}s=s?Bg.copyFrom(s):Bg.identity(),s.translate(-n.x,-n.y).scale(i.width/n.width,i.height/n.height).translate(i.x,i.y),this.transformAABB(s,e),e.ceil(r),this.transformAABB(s.invert(),e)}}}XA.extension={type:ae.RendererSystem,name:"filter"};we.add(XA);class yN{constructor(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=kt.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const vN=new De;class YA{constructor(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new bv(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new De,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let r=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;he.PREFER_ENV===Xo.WEBGL_LEGACY&&(r=null,n=null),r?e.drawBuffers=i=>r.drawBuffersWEBGL(i):(this.hasMRT=!1,e.drawBuffers=()=>{}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)}bind(e,r,n=0){const{gl:i}=this;if(e){const s=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,i.bindFramebuffer(i.FRAMEBUFFER,s.framebuffer)),s.mipLevel!==n&&(e.dirtyId++,e.dirtyFormat++,s.mipLevel=n),s.dirtyId!==e.dirtyId&&(s.dirtyId=e.dirtyId,s.dirtyFormat!==e.dirtyFormat?(s.dirtyFormat=e.dirtyFormat,s.dirtySize=e.dirtySize,this.updateFramebuffer(e,n)):s.dirtySize!==e.dirtySize&&(s.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(let o=0;o<e.colorTextures.length;o++){const l=e.colorTextures[o];this.renderer.texture.unbind(l.parentTextureArray||l)}if(e.depthTexture&&this.renderer.texture.unbind(e.depthTexture),r){const o=r.width>>n,l=r.height>>n,h=o/r.width;this.setViewport(r.x*h,r.y*h,o,l)}else{const o=e.width>>n,l=e.height>>n;this.setViewport(0,0,o,l)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),r?this.setViewport(r.x,r.y,r.width,r.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(e,r,n,i){const s=this.viewport;e=Math.round(e),r=Math.round(r),n=Math.round(n),i=Math.round(i),(s.width!==n||s.height!==i||s.x!==e||s.y!==r)&&(s.x=e,s.y=r,s.width=n,s.height=i,this.gl.viewport(e,r,n,i))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(e,r,n,i,s=Zy.COLOR|Zy.DEPTH){const{gl:o}=this;o.clearColor(e,r,n,i),o.clear(s)}initFramebuffer(e){const{gl:r}=this,n=new yN(r.createFramebuffer());return n.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(e),e.disposeRunner.add(this),n}resizeFramebuffer(e){const{gl:r}=this,n=e.glFramebuffers[this.CONTEXT_UID];if(n.stencil){r.bindRenderbuffer(r.RENDERBUFFER,n.stencil);let o;this.renderer.context.webGLVersion===1?o=r.DEPTH_STENCIL:e.depth&&e.stencil?o=r.DEPTH24_STENCIL8:e.depth?o=r.DEPTH_COMPONENT24:o=r.STENCIL_INDEX8,n.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,o,e.width,e.height):r.renderbufferStorage(r.RENDERBUFFER,o,e.width,e.height)}const i=e.colorTextures;let s=i.length;r.drawBuffers||(s=Math.min(s,1));for(let o=0;o<s;o++){const l=i[o],h=l.parentTextureArray||l;this.renderer.texture.bind(h,0),o===0&&n.msaaBuffer&&(r.bindRenderbuffer(r.RENDERBUFFER,n.msaaBuffer),r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,h._glTextures[this.CONTEXT_UID].internalFormat,e.width,e.height))}e.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(e.depthTexture,0)}updateFramebuffer(e,r){const{gl:n}=this,i=e.glFramebuffers[this.CONTEXT_UID],s=e.colorTextures;let o=s.length;n.drawBuffers||(o=Math.min(o,1)),i.multisample>1&&this.canMultisampleFramebuffer(e)?i.msaaBuffer=i.msaaBuffer||n.createRenderbuffer():i.msaaBuffer&&(n.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));const l=[];for(let h=0;h<o;h++){const c=s[h],f=c.parentTextureArray||c;this.renderer.texture.bind(f,0),h===0&&i.msaaBuffer?(n.bindRenderbuffer(n.RENDERBUFFER,i.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,f._glTextures[this.CONTEXT_UID].internalFormat,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,i.msaaBuffer)):(n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+h,c.target,f._glTextures[this.CONTEXT_UID].texture,r),l.push(n.COLOR_ATTACHMENT0+h))}if(l.length>1&&n.drawBuffers(l),e.depthTexture&&this.writeDepthTexture){const h=e.depthTexture;this.renderer.texture.bind(h,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,h._glTextures[this.CONTEXT_UID].texture,r)}if((e.stencil||e.depth)&&!(e.depthTexture&&this.writeDepthTexture)){i.stencil=i.stencil||n.createRenderbuffer();let h,c;this.renderer.context.webGLVersion===1?(h=n.DEPTH_STENCIL_ATTACHMENT,c=n.DEPTH_STENCIL):e.depth&&e.stencil?(h=n.DEPTH_STENCIL_ATTACHMENT,c=n.DEPTH24_STENCIL8):e.depth?(h=n.DEPTH_ATTACHMENT,c=n.DEPTH_COMPONENT24):(h=n.STENCIL_ATTACHMENT,c=n.STENCIL_INDEX8),n.bindRenderbuffer(n.RENDERBUFFER,i.stencil),i.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,c,e.width,e.height):n.renderbufferStorage(n.RENDERBUFFER,c,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,h,n.RENDERBUFFER,i.stencil)}else i.stencil&&(n.deleteRenderbuffer(i.stencil),i.stencil=null)}canMultisampleFramebuffer(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture}detectSamples(e){const{msaaSamples:r}=this;let n=kt.NONE;if(e<=1||r===null)return n;for(let i=0;i<r.length;i++)if(r[i]<=e){n=r[i];break}return n===1&&(n=kt.NONE),n}blit(e,r,n){const{current:i,renderer:s,gl:o,CONTEXT_UID:l}=this;if(s.context.webGLVersion!==2||!i)return;const h=i.glFramebuffers[l];if(!h)return;if(!e){if(!h.msaaBuffer)return;const f=i.colorTextures[0];if(!f)return;h.blitFramebuffer||(h.blitFramebuffer=new bv(i.width,i.height),h.blitFramebuffer.addColorTexture(0,f)),e=h.blitFramebuffer,e.colorTextures[0]!==f&&(e.colorTextures[0]=f,e.dirtyId++,e.dirtyFormat++),(e.width!==i.width||e.height!==i.height)&&(e.width=i.width,e.height=i.height,e.dirtyId++,e.dirtySize++)}r||(r=vN,r.width=i.width,r.height=i.height),n||(n=r);const c=r.width===n.width&&r.height===n.height;this.bind(e),o.bindFramebuffer(o.READ_FRAMEBUFFER,h.framebuffer),o.blitFramebuffer(r.left,r.top,r.right,r.bottom,n.left,n.top,n.right,n.bottom,o.COLOR_BUFFER_BIT,c?o.NEAREST:o.LINEAR),o.bindFramebuffer(o.READ_FRAMEBUFFER,e.glFramebuffers[this.CONTEXT_UID].framebuffer)}disposeFramebuffer(e,r){const n=e.glFramebuffers[this.CONTEXT_UID],i=this.gl;if(!n)return;delete e.glFramebuffers[this.CONTEXT_UID];const s=this.managedFramebuffers.indexOf(e);s>=0&&this.managedFramebuffers.splice(s,1),e.disposeRunner.remove(this),r||(i.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&i.deleteRenderbuffer(n.msaaBuffer),n.stencil&&i.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&this.disposeFramebuffer(n.blitFramebuffer,r)}disposeAll(e){const r=this.managedFramebuffers;this.managedFramebuffers=[];for(let n=0;n<r.length;n++)this.disposeFramebuffer(r[n],e)}forceStencil(){const e=this.current;if(!e)return;const r=e.glFramebuffers[this.CONTEXT_UID];if(!r||r.stencil&&e.stencil)return;e.stencil=!0;const n=e.width,i=e.height,s=this.gl,o=r.stencil=s.createRenderbuffer();s.bindRenderbuffer(s.RENDERBUFFER,o);let l,h;this.renderer.context.webGLVersion===1?(l=s.DEPTH_STENCIL_ATTACHMENT,h=s.DEPTH_STENCIL):e.depth?(l=s.DEPTH_STENCIL_ATTACHMENT,h=s.DEPTH24_STENCIL8):(l=s.STENCIL_ATTACHMENT,h=s.STENCIL_INDEX8),r.msaaBuffer?s.renderbufferStorageMultisample(s.RENDERBUFFER,r.multisample,h,n,i):s.renderbufferStorage(s.RENDERBUFFER,h,n,i),s.framebufferRenderbuffer(s.FRAMEBUFFER,l,s.RENDERBUFFER,o)}reset(){this.current=this.unknownFramebuffer,this.viewport=new De}destroy(){this.renderer=null}}YA.extension={type:ae.RendererSystem,name:"framebuffer"};we.add(YA);const Lg={5126:4,5123:2,5121:1};class QA{constructor(e){this.renderer=e,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}contextChange(){this.disposeAll(!0);const e=this.gl=this.renderer.gl,r=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,r.webGLVersion!==2){let n=this.renderer.context.extensions.vertexArrayObject;he.PREFER_ENV===Xo.WEBGL_LEGACY&&(n=null),n?(e.createVertexArray=()=>n.createVertexArrayOES(),e.bindVertexArray=i=>n.bindVertexArrayOES(i),e.deleteVertexArray=i=>n.deleteVertexArrayOES(i)):(this.hasVao=!1,e.createVertexArray=()=>null,e.bindVertexArray=()=>null,e.deleteVertexArray=()=>null)}if(r.webGLVersion!==2){const n=e.getExtension("ANGLE_instanced_arrays");n?(e.vertexAttribDivisor=(i,s)=>n.vertexAttribDivisorANGLE(i,s),e.drawElementsInstanced=(i,s,o,l,h)=>n.drawElementsInstancedANGLE(i,s,o,l,h),e.drawArraysInstanced=(i,s,o,l)=>n.drawArraysInstancedANGLE(i,s,o,l)):this.hasInstance=!1}this.canUseUInt32ElementIndex=r.webGLVersion===2||!!r.extensions.uint32ElementIndex}bind(e,r){r=r||this.renderer.shader.shader;const{gl:n}=this;let i=e.glVertexArrayObjects[this.CONTEXT_UID],s=!1;i||(this.managedGeometries[e.id]=e,e.disposeRunner.add(this),e.glVertexArrayObjects[this.CONTEXT_UID]=i={},s=!0);const o=i[r.program.id]||this.initGeometryVao(e,r,s);this._activeGeometry=e,this._activeVao!==o&&(this._activeVao=o,this.hasVao?n.bindVertexArray(o):this.activateVao(e,r.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const e=this._activeGeometry,r=this.renderer.buffer;for(let n=0;n<e.buffers.length;n++){const i=e.buffers[n];r.update(i)}}checkCompatibility(e,r){const n=e.attributes,i=r.attributeData;for(const s in i)if(!n[s])throw new Error(`shader and geometry incompatible, geometry missing the "${s}" attribute`)}getSignature(e,r){const n=e.attributes,i=r.attributeData,s=["g",e.id];for(const o in n)i[o]&&s.push(o,i[o].location);return s.join("-")}initGeometryVao(e,r,n=!0){const i=this.gl,s=this.CONTEXT_UID,o=this.renderer.buffer,l=r.program;l.glPrograms[s]||this.renderer.shader.generateProgram(r),this.checkCompatibility(e,l);const h=this.getSignature(e,l),c=e.glVertexArrayObjects[this.CONTEXT_UID];let f=c[h];if(f)return c[l.id]=f,f;const m=e.buffers,p=e.attributes,v={},_={};for(const E in m)v[E]=0,_[E]=0;for(const E in p)!p[E].size&&l.attributeData[E]?p[E].size=l.attributeData[E].size:p[E].size||console.warn(`PIXI Geometry attribute '${E}' size cannot be determined (likely the bound shader does not have the attribute)`),v[p[E].buffer]+=p[E].size*Lg[p[E].type];for(const E in p){const T=p[E],S=T.size;T.stride===void 0&&(v[T.buffer]===S*Lg[T.type]?T.stride=0:T.stride=v[T.buffer]),T.start===void 0&&(T.start=_[T.buffer],_[T.buffer]+=S*Lg[T.type])}f=i.createVertexArray(),i.bindVertexArray(f);for(let E=0;E<m.length;E++){const T=m[E];o.bind(T),n&&T._glBuffers[s].refCount++}return this.activateVao(e,l),c[l.id]=f,c[h]=f,i.bindVertexArray(null),o.unbind(Ai.ARRAY_BUFFER),f}disposeGeometry(e,r){var l;if(!this.managedGeometries[e.id])return;delete this.managedGeometries[e.id];const n=e.glVertexArrayObjects[this.CONTEXT_UID],i=this.gl,s=e.buffers,o=(l=this.renderer)==null?void 0:l.buffer;if(e.disposeRunner.remove(this),!!n){if(o)for(let h=0;h<s.length;h++){const c=s[h]._glBuffers[this.CONTEXT_UID];c&&(c.refCount--,c.refCount===0&&!r&&o.dispose(s[h],r))}if(!r){for(const h in n)if(h[0]==="g"){const c=n[h];this._activeVao===c&&this.unbind(),i.deleteVertexArray(c)}}delete e.glVertexArrayObjects[this.CONTEXT_UID]}}disposeAll(e){const r=Object.keys(this.managedGeometries);for(let n=0;n<r.length;n++)this.disposeGeometry(this.managedGeometries[r[n]],e)}activateVao(e,r){const n=this.gl,i=this.CONTEXT_UID,s=this.renderer.buffer,o=e.buffers,l=e.attributes;e.indexBuffer&&s.bind(e.indexBuffer);let h=null;for(const c in l){const f=l[c],m=o[f.buffer],p=m._glBuffers[i];if(r.attributeData[c]){h!==p&&(s.bind(m),h=p);const v=r.attributeData[c].location;if(n.enableVertexAttribArray(v),n.vertexAttribPointer(v,f.size,f.type||n.FLOAT,f.normalized,f.stride,f.start),f.instance)if(this.hasInstance)n.vertexAttribDivisor(v,f.divisor);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(e,r,n,i){const{gl:s}=this,o=this._activeGeometry;if(o.indexBuffer){const l=o.indexBuffer.data.BYTES_PER_ELEMENT,h=l===2?s.UNSIGNED_SHORT:s.UNSIGNED_INT;l===2||l===4&&this.canUseUInt32ElementIndex?o.instanced?s.drawElementsInstanced(e,r||o.indexBuffer.data.length,h,(n||0)*l,i||1):s.drawElements(e,r||o.indexBuffer.data.length,h,(n||0)*l):console.warn("unsupported index buffer type: uint32")}else o.instanced?s.drawArraysInstanced(e,n,r||o.getSize(),i||1):s.drawArrays(e,n,r||o.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this.renderer=null}}QA.extension={type:ae.RendererSystem,name:"geometry"};we.add(QA);const EE=new ot;class a_{constructor(e,r){this._texture=e,this.mapCoord=new ot,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=typeof r>"u"?.5:r,this.isSimple=!1}get texture(){return this._texture}set texture(e){this._texture=e,this._textureID=-1}multiplyUvs(e,r){r===void 0&&(r=e);const n=this.mapCoord;for(let i=0;i<e.length;i+=2){const s=e[i],o=e[i+1];r[i]=s*n.a+o*n.c+n.tx,r[i+1]=s*n.b+o*n.d+n.ty}return r}update(e){const r=this._texture;if(!r||!r.valid||!e&&this._textureID===r._updateID)return!1;this._textureID=r._updateID,this._updateID++;const n=r._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 i=r.orig,s=r.trim;s&&(EE.set(i.width/s.width,0,0,i.height/s.height,-s.x/s.width,-s.y/s.height),this.mapCoord.append(EE));const o=r.baseTexture,l=this.uClampFrame,h=this.clampMargin/o.resolution,c=this.clampOffset;return l[0]=(r._frame.x+h+c)/o.width,l[1]=(r._frame.y+h+c)/o.height,l[2]=(r._frame.x+r._frame.width-h+c)/o.width,l[3]=(r._frame.y+r._frame.height-h+c)/o.height,this.uClampOffset[0]=c/o.realWidth,this.uClampOffset[1]=c/o.realHeight,this.isSimple=r._frame.width===o.width&&r._frame.height===o.height&&r.rotate===0,!0}}var _N=`varying vec2 vMaskCoord;
418
418
  varying vec2 vTextureCoord;
419
419
 
420
420
  uniform sampler2D uSampler;
@@ -525,7 +525,7 @@ void main(void)
525
525
  `)}}return s.push(`
526
526
  renderer.buffer.update(buffer);
527
527
  `),{size:i,syncFunc:new Function("ud","uv","renderer","syncData","buffer",s.join(`
528
- `))}}let DN=0;const Xc={textureCount:0,uboCount:0};class sC{constructor(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=DN++}systemCheck(){if(!sN())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(e){this.gl=e,this.reset()}bind(e,r){e.disposeRunner.add(this),e.uniforms.globals=this.renderer.globalUniforms;const n=e.program,i=n.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==n&&(this.program=n,this.gl.useProgram(i.program)),r||(Xc.textureCount=0,Xc.uboCount=0,this.syncUniformGroup(e.uniformGroup,Xc)),i}setUniforms(e){const r=this.shader.program,n=r.glPrograms[this.renderer.CONTEXT_UID];r.syncUniforms(n.uniformData,e,this.renderer)}syncUniformGroup(e,r){const n=this.getGlProgram();(!e.static||e.dirtyId!==n.uniformDirtyGroups[e.id])&&(n.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,n,r))}syncUniforms(e,r,n){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(r.uniformData,e.uniforms,this.renderer,n)}createSyncGroups(e){const r=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[r]||(this.cache[r]=eN(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[r],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,r){const n=this.getGlProgram();if(!e.static||e.dirtyId!==0||!n.uniformGroups[e.id]){e.dirtyId=0;const i=n.uniformGroups[e.id]||this.createSyncBufferGroup(e,n,r);e.buffer.update(),i(n.uniformData,e.uniforms,this.renderer,Xc,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,n.uniformBufferBindings[r])}createSyncBufferGroup(e,r,n){const{gl:i}=this.renderer;this.renderer.buffer.bind(e.buffer);const s=this.gl.getUniformBlockIndex(r.program,n);r.uniformBufferBindings[n]=this.shader.uniformBindCount,i.uniformBlockBinding(r.program,s,this.shader.uniformBindCount),this.shader.uniformBindCount++;const o=this.getSignature(e,this.shader.program.uniformData,"ubo");let l=this._uboCache[o];if(l||(l=this._uboCache[o]=NN(e,this.shader.program.uniformData)),e.autoManage){const h=new Float32Array(l.size/4);e.buffer.update(h)}return r.uniformGroups[e.id]=l.syncFunc,r.uniformGroups[e.id]}getSignature(e,r,n){const i=e.uniforms,s=[`${n}-`];for(const o in i)s.push(o),r[o]&&s.push(r[o].type);return s.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(e){const r=this.gl,n=e.program,i=PN(r,n);return n.glPrograms[this.renderer.CONTEXT_UID]=i,i}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}sC.extension={type:ae.RendererSystem,name:"shader"};we.add(sC);class _f{constructor(e){this.renderer=e}run(e){const{renderer:r}=this;r.runners.init.emit(r.options),e.hello&&console.log(`PixiJS 7.4.3 - ${r.rendererLogId} - https://pixijs.com`),r.resize(r.screen.width,r.screen.height)}destroy(){}}_f.defaultOptions={hello:!1},_f.extension={type:[ae.RendererSystem,ae.CanvasRendererSystem],name:"startup"};we.add(_f);function ON(t,e=[]){return e[Ie.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ie.ADD]=[t.ONE,t.ONE],e[Ie.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ie.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ie.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ie.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ie.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ie.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ie.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ie.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ie.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ie.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ie.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ie.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ie.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ie.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ie.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ie.NONE]=[0,0],e[Ie.NORMAL_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ie.ADD_NPM]=[t.SRC_ALPHA,t.ONE,t.ONE,t.ONE],e[Ie.SCREEN_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Ie.SRC_IN]=[t.DST_ALPHA,t.ZERO],e[Ie.SRC_OUT]=[t.ONE_MINUS_DST_ALPHA,t.ZERO],e[Ie.SRC_ATOP]=[t.DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[Ie.DST_OVER]=[t.ONE_MINUS_DST_ALPHA,t.ONE],e[Ie.DST_IN]=[t.ZERO,t.SRC_ALPHA],e[Ie.DST_OUT]=[t.ZERO,t.ONE_MINUS_SRC_ALPHA],e[Ie.DST_ATOP]=[t.ONE_MINUS_DST_ALPHA,t.SRC_ALPHA],e[Ie.XOR]=[t.ONE_MINUS_DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[Ie.SUBTRACT]=[t.ONE,t.ONE,t.ONE,t.ONE,t.FUNC_REVERSE_SUBTRACT,t.FUNC_ADD],e}const FN=0,BN=1,LN=2,UN=3,zN=4,GN=5,oC=class Tv{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Ie.NONE,this._blendEq=!1,this.map=[],this.map[FN]=this.setBlend,this.map[BN]=this.setOffset,this.map[LN]=this.setCullFace,this.map[UN]=this.setDepthTest,this.map[zN]=this.setFrontFace,this.map[GN]=this.setDepthMask,this.checks=[],this.defaultState=new Mi,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=ON(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let r=this.stateId^e.data,n=0;for(;r;)r&1&&this.map[n].call(this,!!(e.data&1<<n)),r=r>>1,n++;this.stateId=e.data}for(let r=0;r<this.checks.length;r++)this.checks[r](this,e)}forceState(e){e=e||this.defaultState;for(let r=0;r<this.map.length;r++)this.map[r].call(this,!!(e.data&1<<r));for(let r=0;r<this.checks.length;r++)this.checks[r](this,e);this.stateId=e.data}setBlend(e){this.updateCheck(Tv.checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)}setOffset(e){this.updateCheck(Tv.checkPolygonOffset,e),this.gl[e?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(e){this.gl[e?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(e){this.gl.depthMask(e)}setCullFace(e){this.gl[e?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(e){this.gl.frontFace(this.gl[e?"CW":"CCW"])}setBlendMode(e){if(e===this.blendMode)return;this.blendMode=e;const r=this.blendModes[e],n=this.gl;r.length===2?n.blendFunc(r[0],r[1]):n.blendFuncSeparate(r[0],r[1],r[2],r[3]),r.length===6?(this._blendEq=!0,n.blendEquationSeparate(r[4],r[5])):this._blendEq&&(this._blendEq=!1,n.blendEquationSeparate(n.FUNC_ADD,n.FUNC_ADD))}setPolygonOffset(e,r){this.gl.polygonOffset(e,r)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)}updateCheck(e,r){const n=this.checks.indexOf(e);r&&n===-1?this.checks.push(e):!r&&n!==-1&&this.checks.splice(n,1)}static checkBlendMode(e,r){e.setBlendMode(r.blendMode)}static checkPolygonOffset(e,r){e.setPolygonOffset(1,r.polygonOffset)}destroy(){this.gl=null}};oC.extension={type:ae.RendererSystem,name:"state"};let HN=oC;we.add(HN);class jN extends lh{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(e){this.addRunners(...e.runners);const r=(e.priority??[]).filter(i=>e.systems[i]),n=[...r,...Object.keys(e.systems).filter(i=>!r.includes(i))];for(const i of n)this.addSystem(e.systems[i],i)}addRunners(...e){e.forEach(r=>{this.runners[r]=new Yn(r)})}addSystem(e,r){const n=new e(this);if(this[r])throw new Error(`Whoops! The name "${r}" is already in use`);this[r]=n,this._systemsHash[r]=n;for(const i in this.runners)this.runners[i].add(n);return this}emitWithCustomOptions(e,r){const n=Object.keys(this._systemsHash);e.items.forEach(i=>{const s=n.find(o=>this._systemsHash[o]===i);i[e.name](r[s])})}destroy(){Object.values(this.runners).forEach(e=>{e.destroy()}),this._systemsHash={}}}const lu=class Md{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=Md.defaultMaxIdle,this.checkCountMax=Md.defaultCheckCountMax,this.mode=Md.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==q0.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,r=e.managedTextures;let n=!1;for(let i=0;i<r.length;i++){const s=r[i];s.resource&&this.count-s.touched>this.maxIdle&&(e.destroyTexture(s,!0),r[i]=null,n=!0)}if(n){let i=0;for(let s=0;s<r.length;s++)r[s]!==null&&(r[i++]=r[s]);r.length=i}}unload(e){const r=this.renderer.texture,n=e._texture;n&&!n.framebuffer&&r.destroyTexture(n);for(let i=e.children.length-1;i>=0;i--)this.unload(e.children[i])}destroy(){this.renderer=null}};lu.defaultMode=q0.AUTO,lu.defaultMaxIdle=60*60,lu.defaultCheckCountMax=60*10,lu.extension={type:ae.RendererSystem,name:"textureGC"};let Co=lu;we.add(Co);class Ug{constructor(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=Ae.UNSIGNED_BYTE,this.internalFormat=re.RGBA,this.samplerType=0}}function $N(t){let e;return"WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext?e={[t.RGB]:de.FLOAT,[t.RGBA]:de.FLOAT,[t.ALPHA]:de.FLOAT,[t.LUMINANCE]:de.FLOAT,[t.LUMINANCE_ALPHA]:de.FLOAT,[t.R8]:de.FLOAT,[t.R8_SNORM]:de.FLOAT,[t.RG8]:de.FLOAT,[t.RG8_SNORM]:de.FLOAT,[t.RGB8]:de.FLOAT,[t.RGB8_SNORM]:de.FLOAT,[t.RGB565]:de.FLOAT,[t.RGBA4]:de.FLOAT,[t.RGB5_A1]:de.FLOAT,[t.RGBA8]:de.FLOAT,[t.RGBA8_SNORM]:de.FLOAT,[t.RGB10_A2]:de.FLOAT,[t.RGB10_A2UI]:de.FLOAT,[t.SRGB8]:de.FLOAT,[t.SRGB8_ALPHA8]:de.FLOAT,[t.R16F]:de.FLOAT,[t.RG16F]:de.FLOAT,[t.RGB16F]:de.FLOAT,[t.RGBA16F]:de.FLOAT,[t.R32F]:de.FLOAT,[t.RG32F]:de.FLOAT,[t.RGB32F]:de.FLOAT,[t.RGBA32F]:de.FLOAT,[t.R11F_G11F_B10F]:de.FLOAT,[t.RGB9_E5]:de.FLOAT,[t.R8I]:de.INT,[t.R8UI]:de.UINT,[t.R16I]:de.INT,[t.R16UI]:de.UINT,[t.R32I]:de.INT,[t.R32UI]:de.UINT,[t.RG8I]:de.INT,[t.RG8UI]:de.UINT,[t.RG16I]:de.INT,[t.RG16UI]:de.UINT,[t.RG32I]:de.INT,[t.RG32UI]:de.UINT,[t.RGB8I]:de.INT,[t.RGB8UI]:de.UINT,[t.RGB16I]:de.INT,[t.RGB16UI]:de.UINT,[t.RGB32I]:de.INT,[t.RGB32UI]:de.UINT,[t.RGBA8I]:de.INT,[t.RGBA8UI]:de.UINT,[t.RGBA16I]:de.INT,[t.RGBA16UI]:de.UINT,[t.RGBA32I]:de.INT,[t.RGBA32UI]:de.UINT,[t.DEPTH_COMPONENT16]:de.FLOAT,[t.DEPTH_COMPONENT24]:de.FLOAT,[t.DEPTH_COMPONENT32F]:de.FLOAT,[t.DEPTH_STENCIL]:de.FLOAT,[t.DEPTH24_STENCIL8]:de.FLOAT,[t.DEPTH32F_STENCIL8]:de.FLOAT}:e={[t.RGB]:de.FLOAT,[t.RGBA]:de.FLOAT,[t.ALPHA]:de.FLOAT,[t.LUMINANCE]:de.FLOAT,[t.LUMINANCE_ALPHA]:de.FLOAT,[t.DEPTH_STENCIL]:de.FLOAT},e}function WN(t){let e;return"WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext?e={[Ae.UNSIGNED_BYTE]:{[re.RGBA]:t.RGBA8,[re.RGB]:t.RGB8,[re.RG]:t.RG8,[re.RED]:t.R8,[re.RGBA_INTEGER]:t.RGBA8UI,[re.RGB_INTEGER]:t.RGB8UI,[re.RG_INTEGER]:t.RG8UI,[re.RED_INTEGER]:t.R8UI,[re.ALPHA]:t.ALPHA,[re.LUMINANCE]:t.LUMINANCE,[re.LUMINANCE_ALPHA]:t.LUMINANCE_ALPHA},[Ae.BYTE]:{[re.RGBA]:t.RGBA8_SNORM,[re.RGB]:t.RGB8_SNORM,[re.RG]:t.RG8_SNORM,[re.RED]:t.R8_SNORM,[re.RGBA_INTEGER]:t.RGBA8I,[re.RGB_INTEGER]:t.RGB8I,[re.RG_INTEGER]:t.RG8I,[re.RED_INTEGER]:t.R8I},[Ae.UNSIGNED_SHORT]:{[re.RGBA_INTEGER]:t.RGBA16UI,[re.RGB_INTEGER]:t.RGB16UI,[re.RG_INTEGER]:t.RG16UI,[re.RED_INTEGER]:t.R16UI,[re.DEPTH_COMPONENT]:t.DEPTH_COMPONENT16},[Ae.SHORT]:{[re.RGBA_INTEGER]:t.RGBA16I,[re.RGB_INTEGER]:t.RGB16I,[re.RG_INTEGER]:t.RG16I,[re.RED_INTEGER]:t.R16I},[Ae.UNSIGNED_INT]:{[re.RGBA_INTEGER]:t.RGBA32UI,[re.RGB_INTEGER]:t.RGB32UI,[re.RG_INTEGER]:t.RG32UI,[re.RED_INTEGER]:t.R32UI,[re.DEPTH_COMPONENT]:t.DEPTH_COMPONENT24},[Ae.INT]:{[re.RGBA_INTEGER]:t.RGBA32I,[re.RGB_INTEGER]:t.RGB32I,[re.RG_INTEGER]:t.RG32I,[re.RED_INTEGER]:t.R32I},[Ae.FLOAT]:{[re.RGBA]:t.RGBA32F,[re.RGB]:t.RGB32F,[re.RG]:t.RG32F,[re.RED]:t.R32F,[re.DEPTH_COMPONENT]:t.DEPTH_COMPONENT32F},[Ae.HALF_FLOAT]:{[re.RGBA]:t.RGBA16F,[re.RGB]:t.RGB16F,[re.RG]:t.RG16F,[re.RED]:t.R16F},[Ae.UNSIGNED_SHORT_5_6_5]:{[re.RGB]:t.RGB565},[Ae.UNSIGNED_SHORT_4_4_4_4]:{[re.RGBA]:t.RGBA4},[Ae.UNSIGNED_SHORT_5_5_5_1]:{[re.RGBA]:t.RGB5_A1},[Ae.UNSIGNED_INT_2_10_10_10_REV]:{[re.RGBA]:t.RGB10_A2,[re.RGBA_INTEGER]:t.RGB10_A2UI},[Ae.UNSIGNED_INT_10F_11F_11F_REV]:{[re.RGB]:t.R11F_G11F_B10F},[Ae.UNSIGNED_INT_5_9_9_9_REV]:{[re.RGB]:t.RGB9_E5},[Ae.UNSIGNED_INT_24_8]:{[re.DEPTH_STENCIL]:t.DEPTH24_STENCIL8},[Ae.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[re.DEPTH_STENCIL]:t.DEPTH32F_STENCIL8}}:e={[Ae.UNSIGNED_BYTE]:{[re.RGBA]:t.RGBA,[re.RGB]:t.RGB,[re.ALPHA]:t.ALPHA,[re.LUMINANCE]:t.LUMINANCE,[re.LUMINANCE_ALPHA]:t.LUMINANCE_ALPHA},[Ae.UNSIGNED_SHORT_5_6_5]:{[re.RGB]:t.RGB},[Ae.UNSIGNED_SHORT_4_4_4_4]:{[re.RGBA]:t.RGBA},[Ae.UNSIGNED_SHORT_5_5_5_1]:{[re.RGBA]:t.RGBA}},e}class aC{constructor(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Ne,this.hasIntegerTextures=!1}contextChange(){const e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=WN(e),this.samplerTypes=$N(e);const r=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=r;for(let i=0;i<r;i++)this.boundTextures[i]=null;this.emptyTextures={};const n=new Ug(e.createTexture());e.bindTexture(e.TEXTURE_2D,n.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[e.TEXTURE_2D]=n,this.emptyTextures[e.TEXTURE_CUBE_MAP]=new Ug(e.createTexture()),e.bindTexture(e.TEXTURE_CUBE_MAP,this.emptyTextures[e.TEXTURE_CUBE_MAP].texture);for(let i=0;i<6;i++)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,null);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,e.LINEAR);for(let i=0;i<this.boundTextures.length;i++)this.bind(null,i)}bind(e,r=0){const{gl:n}=this;if(e=e==null?void 0:e.castToBaseTexture(),(e==null?void 0:e.valid)&&!e.parentTextureArray){e.touched=this.renderer.textureGC.count;const i=e._glTextures[this.CONTEXT_UID]||this.initTexture(e);this.boundTextures[r]!==e&&(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(e.target,i.texture)),i.dirtyId!==e.dirtyId?(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),this.updateTexture(e)):i.dirtyStyleId!==e.dirtyStyleId&&this.updateTextureStyle(e),this.boundTextures[r]=e}else this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(n.TEXTURE_2D,this.emptyTextures[n.TEXTURE_2D].texture),this.boundTextures[r]=null}reset(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(let e=0;e<this.boundTextures.length;e++)this.boundTextures[e]=this.unknownTexture}unbind(e){const{gl:r,boundTextures:n}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let i=0;i<n.length;i++)n[i]===this.unknownTexture&&this.bind(null,i)}for(let i=0;i<n.length;i++)n[i]===e&&(this.currentLocation!==i&&(r.activeTexture(r.TEXTURE0+i),this.currentLocation=i),r.bindTexture(e.target,this.emptyTextures[e.target].texture),n[i]=null)}ensureSamplerType(e){const{boundTextures:r,hasIntegerTextures:n,CONTEXT_UID:i}=this;if(n)for(let s=e-1;s>=0;--s){const o=r[s];o&&o._glTextures[i].samplerType!==de.FLOAT&&this.renderer.texture.unbind(o)}}initTexture(e){const r=new Ug(this.gl.createTexture());return r.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=r,this.managedTextures.push(e),e.on("dispose",this.destroyTexture,this),r}initTextureType(e,r){var n;r.internalFormat=((n=this.internalFormats[e.type])==null?void 0:n[e.format])??e.format,r.samplerType=this.samplerTypes[r.internalFormat]??de.FLOAT,this.webGLVersion===2&&e.type===Ae.HALF_FLOAT?r.type=this.gl.HALF_FLOAT:r.type=e.type}updateTexture(e){var i;const r=e._glTextures[this.CONTEXT_UID];if(!r)return;const n=this.renderer;if(this.initTextureType(e,r),(i=e.resource)==null?void 0:i.upload(n,e,r))r.samplerType!==de.FLOAT&&(this.hasIntegerTextures=!0);else{const s=e.realWidth,o=e.realHeight,l=n.gl;(r.width!==s||r.height!==o||r.dirtyId<0)&&(r.width=s,r.height=o,l.texImage2D(e.target,0,r.internalFormat,s,o,0,e.format,r.type,null))}e.dirtyStyleId!==r.dirtyStyleId&&this.updateTextureStyle(e),r.dirtyId=e.dirtyId}destroyTexture(e,r){const{gl:n}=this;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),n.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off("dispose",this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!r)){const i=this.managedTextures.indexOf(e);i!==-1&&Za(this.managedTextures,i,1)}}updateTextureStyle(e){var n;const r=e._glTextures[this.CONTEXT_UID];r&&((e.mipmap===Pi.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?r.mipmap=!1:r.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?r.wrapMode=qi.CLAMP:r.wrapMode=e.wrapMode,(n=e.resource)!=null&&n.style(this.renderer,e,r)||this.setStyle(e,r),r.dirtyStyleId=e.dirtyStyleId)}setStyle(e,r){const n=this.gl;if(r.mipmap&&e.mipmap!==Pi.ON_MANUAL&&n.generateMipmap(e.target),n.texParameteri(e.target,n.TEXTURE_WRAP_S,r.wrapMode),n.texParameteri(e.target,n.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===wn.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&e.anisotropicLevel>0&&e.scaleMode===wn.LINEAR){const s=Math.min(e.anisotropicLevel,n.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(e.target,i.TEXTURE_MAX_ANISOTROPY_EXT,s)}}else n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===wn.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(e.target,n.TEXTURE_MAG_FILTER,e.scaleMode===wn.LINEAR?n.LINEAR:n.NEAREST)}destroy(){this.renderer=null}}aC.extension={type:ae.RendererSystem,name:"texture"};we.add(aC);class lC{constructor(e){this.renderer=e}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:r,CONTEXT_UID:n}=this,i=e._glTransformFeedbacks[n]||this.createGLTransformFeedback(e);r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,i)}unbind(){const{gl:e}=this;e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(e,r){const{gl:n,renderer:i}=this;r&&i.shader.bind(r),n.beginTransformFeedback(e)}endTransformFeedback(){const{gl:e}=this;e.endTransformFeedback()}createGLTransformFeedback(e){const{gl:r,renderer:n,CONTEXT_UID:i}=this,s=r.createTransformFeedback();e._glTransformFeedbacks[i]=s,r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,s);for(let o=0;o<e.buffers.length;o++){const l=e.buffers[o];l&&(n.buffer.update(l),l._glBuffers[i].refCount++,r.bindBufferBase(r.TRANSFORM_FEEDBACK_BUFFER,o,l._glBuffers[i].buffer||null))}return r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,null),e.disposeRunner.add(this),s}disposeTransformFeedback(e,r){const n=e._glTransformFeedbacks[this.CONTEXT_UID],i=this.gl;e.disposeRunner.remove(this);const s=this.renderer.buffer;if(s)for(let o=0;o<e.buffers.length;o++){const l=e.buffers[o];if(!l)continue;const h=l._glBuffers[this.CONTEXT_UID];h&&(h.refCount--,h.refCount===0&&!r&&s.dispose(l,r))}n&&(r||i.deleteTransformFeedback(n),delete e._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}}lC.extension={type:ae.RendererSystem,name:"transformFeedback"};we.add(lC);class xf{constructor(e){this.renderer=e}init(e){this.screen=new De(0,0,e.width,e.height),this.element=e.view||he.ADAPTER.createCanvas(),this.resolution=e.resolution||he.RESOLUTION,this.autoDensity=!!e.autoDensity}resizeView(e,r){this.element.width=Math.round(e*this.resolution),this.element.height=Math.round(r*this.resolution);const n=this.element.width/this.resolution,i=this.element.height/this.resolution;this.screen.width=n,this.screen.height=i,this.autoDensity&&(this.element.style.width=`${n}px`,this.element.style.height=`${i}px`),this.renderer.emit("resize",n,i),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(e){var r;e&&((r=this.element.parentNode)==null||r.removeChild(this.element)),this.renderer=null,this.element=null,this.screen=null}}xf.defaultOptions={width:800,height:600,resolution:void 0,autoDensity:!1},xf.extension={type:[ae.RendererSystem,ae.CanvasRendererSystem],name:"_view"};we.add(xf);he.PREFER_ENV=Xo.WEBGL2;he.STRICT_TEXTURE_CACHE=!1;he.RENDER_OPTIONS={...vf.defaultOptions,...yf.defaultOptions,...xf.defaultOptions,..._f.defaultOptions};Object.defineProperties(he,{WRAP_MODE:{get(){return Ne.defaultOptions.wrapMode},set(t){Ue("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),Ne.defaultOptions.wrapMode=t}},SCALE_MODE:{get(){return Ne.defaultOptions.scaleMode},set(t){Ue("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),Ne.defaultOptions.scaleMode=t}},MIPMAP_TEXTURES:{get(){return Ne.defaultOptions.mipmap},set(t){Ue("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),Ne.defaultOptions.mipmap=t}},ANISOTROPIC_LEVEL:{get(){return Ne.defaultOptions.anisotropicLevel},set(t){Ue("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),Ne.defaultOptions.anisotropicLevel=t}},FILTER_RESOLUTION:{get(){return Ue("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),Sr.defaultResolution},set(t){Sr.defaultResolution=t}},FILTER_MULTISAMPLE:{get(){return Ue("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),Sr.defaultMultisample},set(t){Sr.defaultMultisample=t}},SPRITE_MAX_TEXTURES:{get(){return Ao.defaultMaxTextures},set(t){Ue("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),Ao.defaultMaxTextures=t}},SPRITE_BATCH_SIZE:{get(){return Ao.defaultBatchSize},set(t){Ue("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),Ao.defaultBatchSize=t}},CAN_UPLOAD_SAME_BUFFER:{get(){return Ao.canUploadSameBuffer},set(t){Ue("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),Ao.canUploadSameBuffer=t}},GC_MODE:{get(){return Co.defaultMode},set(t){Ue("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),Co.defaultMode=t}},GC_MAX_IDLE:{get(){return Co.defaultMaxIdle},set(t){Ue("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),Co.defaultMaxIdle=t}},GC_MAX_CHECK_COUNT:{get(){return Co.defaultCheckCountMax},set(t){Ue("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),Co.defaultCheckCountMax=t}},PRECISION_VERTEX:{get(){return Qi.defaultVertexPrecision},set(t){Ue("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),Qi.defaultVertexPrecision=t}},PRECISION_FRAGMENT:{get(){return Qi.defaultFragmentPrecision},set(t){Ue("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),Qi.defaultFragmentPrecision=t}}});var Qs=(t=>(t[t.INTERACTION=50]="INTERACTION",t[t.HIGH=25]="HIGH",t[t.NORMAL=0]="NORMAL",t[t.LOW=-25]="LOW",t[t.UTILITY=-50]="UTILITY",t))(Qs||{});class zg{constructor(e,r=null,n=0,i=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=r,this.priority=n,this.once=i}match(e,r=null){return this.fn===e&&this.context===r}emit(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));const r=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),r}connect(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this}destroy(e=!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 r=this.next;return this.next=e?null:r,this.previous=null,r}}const uC=class Qr{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 zg(null,null,1/0),this.deltaMS=1/Qr.targetFPMS,this.elapsedMS=1/Qr.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),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(e,r,n=Qs.NORMAL){return this._addListener(new zg(e,r,n))}addOnce(e,r,n=Qs.NORMAL){return this._addListener(new zg(e,r,n,!0))}_addListener(e){let r=this._head.next,n=this._head;if(!r)e.connect(n);else{for(;r;){if(e.priority>r.priority){e.connect(n);break}n=r,r=r.next}e.previous||e.connect(n)}return this._startIfPossible(),this}remove(e,r){let n=this._head.next;for(;n;)n.match(e,r)?n=n.destroy():n=n.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,r=this._head;for(;r=r.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let r;if(e>this.lastTime){if(r=this.elapsedMS=e-this.lastTime,r>this._maxElapsedMS&&(r=this._maxElapsedMS),r*=this.speed,this._minElapsedMS){const s=e-this._lastFrame|0;if(s<this._minElapsedMS)return;this._lastFrame=e-s%this._minElapsedMS}this.deltaMS=r,this.deltaTime=this.deltaMS*Qr.targetFPMS;const n=this._head;let i=n.next;for(;i;)i=i.emit(this.deltaTime);n.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=e}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(e){const r=Math.min(this.maxFPS,e),n=Math.min(Math.max(0,r)/1e3,Qr.targetFPMS);this._maxElapsedMS=1/n}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(e){if(e===0)this._minElapsedMS=0;else{const r=Math.max(this.minFPS,e);this._minElapsedMS=1/(r/1e3)}}static get shared(){if(!Qr._shared){const e=Qr._shared=new Qr;e.autoStart=!0,e._protected=!0}return Qr._shared}static get system(){if(!Qr._system){const e=Qr._system=new Qr;e.autoStart=!0,e._protected=!0}return Qr._system}};uC.targetFPMS=.06;let Yt=uC;Object.defineProperties(he,{TARGET_FPMS:{get(){return Yt.targetFPMS},set(t){Ue("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),Yt.targetFPMS=t}}});class hC{static init(e){e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{set(r){this._ticker&&this._ticker.remove(this.render,this),this._ticker=r,r&&r.add(this.render,this,Qs.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?Yt.shared:new Yt,e.autoStart&&this.start()}static destroy(){if(this._ticker){const e=this._ticker;this.ticker=null,e.destroy()}}}hC.extension=ae.Application;we.add(hC);const cC=[];we.handleByList(ae.Renderer,cC);function VN(t){for(const e of cC)if(e.test(t))return new e(t);throw new Error("Unable to auto-detect a suitable renderer.")}var XN=`attribute vec2 aVertexPosition;
528
+ `))}}let DN=0;const Xc={textureCount:0,uboCount:0};class sC{constructor(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=DN++}systemCheck(){if(!sN())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(e){this.gl=e,this.reset()}bind(e,r){e.disposeRunner.add(this),e.uniforms.globals=this.renderer.globalUniforms;const n=e.program,i=n.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==n&&(this.program=n,this.gl.useProgram(i.program)),r||(Xc.textureCount=0,Xc.uboCount=0,this.syncUniformGroup(e.uniformGroup,Xc)),i}setUniforms(e){const r=this.shader.program,n=r.glPrograms[this.renderer.CONTEXT_UID];r.syncUniforms(n.uniformData,e,this.renderer)}syncUniformGroup(e,r){const n=this.getGlProgram();(!e.static||e.dirtyId!==n.uniformDirtyGroups[e.id])&&(n.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,n,r))}syncUniforms(e,r,n){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(r.uniformData,e.uniforms,this.renderer,n)}createSyncGroups(e){const r=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[r]||(this.cache[r]=eN(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[r],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,r){const n=this.getGlProgram();if(!e.static||e.dirtyId!==0||!n.uniformGroups[e.id]){e.dirtyId=0;const i=n.uniformGroups[e.id]||this.createSyncBufferGroup(e,n,r);e.buffer.update(),i(n.uniformData,e.uniforms,this.renderer,Xc,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,n.uniformBufferBindings[r])}createSyncBufferGroup(e,r,n){const{gl:i}=this.renderer;this.renderer.buffer.bind(e.buffer);const s=this.gl.getUniformBlockIndex(r.program,n);r.uniformBufferBindings[n]=this.shader.uniformBindCount,i.uniformBlockBinding(r.program,s,this.shader.uniformBindCount),this.shader.uniformBindCount++;const o=this.getSignature(e,this.shader.program.uniformData,"ubo");let l=this._uboCache[o];if(l||(l=this._uboCache[o]=NN(e,this.shader.program.uniformData)),e.autoManage){const h=new Float32Array(l.size/4);e.buffer.update(h)}return r.uniformGroups[e.id]=l.syncFunc,r.uniformGroups[e.id]}getSignature(e,r,n){const i=e.uniforms,s=[`${n}-`];for(const o in i)s.push(o),r[o]&&s.push(r[o].type);return s.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(e){const r=this.gl,n=e.program,i=PN(r,n);return n.glPrograms[this.renderer.CONTEXT_UID]=i,i}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}sC.extension={type:ae.RendererSystem,name:"shader"};we.add(sC);class _f{constructor(e){this.renderer=e}run(e){const{renderer:r}=this;r.runners.init.emit(r.options),e.hello&&console.log(`PixiJS 7.4.3 - ${r.rendererLogId} - https://pixijs.com`),r.resize(r.screen.width,r.screen.height)}destroy(){}}_f.defaultOptions={hello:!1},_f.extension={type:[ae.RendererSystem,ae.CanvasRendererSystem],name:"startup"};we.add(_f);function ON(t,e=[]){return e[Re.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Re.ADD]=[t.ONE,t.ONE],e[Re.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Re.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Re.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Re.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Re.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Re.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Re.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Re.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Re.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Re.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Re.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Re.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Re.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Re.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Re.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Re.NONE]=[0,0],e[Re.NORMAL_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Re.ADD_NPM]=[t.SRC_ALPHA,t.ONE,t.ONE,t.ONE],e[Re.SCREEN_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[Re.SRC_IN]=[t.DST_ALPHA,t.ZERO],e[Re.SRC_OUT]=[t.ONE_MINUS_DST_ALPHA,t.ZERO],e[Re.SRC_ATOP]=[t.DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[Re.DST_OVER]=[t.ONE_MINUS_DST_ALPHA,t.ONE],e[Re.DST_IN]=[t.ZERO,t.SRC_ALPHA],e[Re.DST_OUT]=[t.ZERO,t.ONE_MINUS_SRC_ALPHA],e[Re.DST_ATOP]=[t.ONE_MINUS_DST_ALPHA,t.SRC_ALPHA],e[Re.XOR]=[t.ONE_MINUS_DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[Re.SUBTRACT]=[t.ONE,t.ONE,t.ONE,t.ONE,t.FUNC_REVERSE_SUBTRACT,t.FUNC_ADD],e}const FN=0,BN=1,LN=2,UN=3,zN=4,GN=5,oC=class Tv{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Re.NONE,this._blendEq=!1,this.map=[],this.map[FN]=this.setBlend,this.map[BN]=this.setOffset,this.map[LN]=this.setCullFace,this.map[UN]=this.setDepthTest,this.map[zN]=this.setFrontFace,this.map[GN]=this.setDepthMask,this.checks=[],this.defaultState=new Mi,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=ON(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let r=this.stateId^e.data,n=0;for(;r;)r&1&&this.map[n].call(this,!!(e.data&1<<n)),r=r>>1,n++;this.stateId=e.data}for(let r=0;r<this.checks.length;r++)this.checks[r](this,e)}forceState(e){e=e||this.defaultState;for(let r=0;r<this.map.length;r++)this.map[r].call(this,!!(e.data&1<<r));for(let r=0;r<this.checks.length;r++)this.checks[r](this,e);this.stateId=e.data}setBlend(e){this.updateCheck(Tv.checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)}setOffset(e){this.updateCheck(Tv.checkPolygonOffset,e),this.gl[e?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(e){this.gl[e?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(e){this.gl.depthMask(e)}setCullFace(e){this.gl[e?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(e){this.gl.frontFace(this.gl[e?"CW":"CCW"])}setBlendMode(e){if(e===this.blendMode)return;this.blendMode=e;const r=this.blendModes[e],n=this.gl;r.length===2?n.blendFunc(r[0],r[1]):n.blendFuncSeparate(r[0],r[1],r[2],r[3]),r.length===6?(this._blendEq=!0,n.blendEquationSeparate(r[4],r[5])):this._blendEq&&(this._blendEq=!1,n.blendEquationSeparate(n.FUNC_ADD,n.FUNC_ADD))}setPolygonOffset(e,r){this.gl.polygonOffset(e,r)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)}updateCheck(e,r){const n=this.checks.indexOf(e);r&&n===-1?this.checks.push(e):!r&&n!==-1&&this.checks.splice(n,1)}static checkBlendMode(e,r){e.setBlendMode(r.blendMode)}static checkPolygonOffset(e,r){e.setPolygonOffset(1,r.polygonOffset)}destroy(){this.gl=null}};oC.extension={type:ae.RendererSystem,name:"state"};let HN=oC;we.add(HN);class jN extends lh{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(e){this.addRunners(...e.runners);const r=(e.priority??[]).filter(i=>e.systems[i]),n=[...r,...Object.keys(e.systems).filter(i=>!r.includes(i))];for(const i of n)this.addSystem(e.systems[i],i)}addRunners(...e){e.forEach(r=>{this.runners[r]=new Yn(r)})}addSystem(e,r){const n=new e(this);if(this[r])throw new Error(`Whoops! The name "${r}" is already in use`);this[r]=n,this._systemsHash[r]=n;for(const i in this.runners)this.runners[i].add(n);return this}emitWithCustomOptions(e,r){const n=Object.keys(this._systemsHash);e.items.forEach(i=>{const s=n.find(o=>this._systemsHash[o]===i);i[e.name](r[s])})}destroy(){Object.values(this.runners).forEach(e=>{e.destroy()}),this._systemsHash={}}}const lu=class Md{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=Md.defaultMaxIdle,this.checkCountMax=Md.defaultCheckCountMax,this.mode=Md.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==q0.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,r=e.managedTextures;let n=!1;for(let i=0;i<r.length;i++){const s=r[i];s.resource&&this.count-s.touched>this.maxIdle&&(e.destroyTexture(s,!0),r[i]=null,n=!0)}if(n){let i=0;for(let s=0;s<r.length;s++)r[s]!==null&&(r[i++]=r[s]);r.length=i}}unload(e){const r=this.renderer.texture,n=e._texture;n&&!n.framebuffer&&r.destroyTexture(n);for(let i=e.children.length-1;i>=0;i--)this.unload(e.children[i])}destroy(){this.renderer=null}};lu.defaultMode=q0.AUTO,lu.defaultMaxIdle=60*60,lu.defaultCheckCountMax=60*10,lu.extension={type:ae.RendererSystem,name:"textureGC"};let Co=lu;we.add(Co);class Ug{constructor(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=Ae.UNSIGNED_BYTE,this.internalFormat=ne.RGBA,this.samplerType=0}}function $N(t){let e;return"WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext?e={[t.RGB]:de.FLOAT,[t.RGBA]:de.FLOAT,[t.ALPHA]:de.FLOAT,[t.LUMINANCE]:de.FLOAT,[t.LUMINANCE_ALPHA]:de.FLOAT,[t.R8]:de.FLOAT,[t.R8_SNORM]:de.FLOAT,[t.RG8]:de.FLOAT,[t.RG8_SNORM]:de.FLOAT,[t.RGB8]:de.FLOAT,[t.RGB8_SNORM]:de.FLOAT,[t.RGB565]:de.FLOAT,[t.RGBA4]:de.FLOAT,[t.RGB5_A1]:de.FLOAT,[t.RGBA8]:de.FLOAT,[t.RGBA8_SNORM]:de.FLOAT,[t.RGB10_A2]:de.FLOAT,[t.RGB10_A2UI]:de.FLOAT,[t.SRGB8]:de.FLOAT,[t.SRGB8_ALPHA8]:de.FLOAT,[t.R16F]:de.FLOAT,[t.RG16F]:de.FLOAT,[t.RGB16F]:de.FLOAT,[t.RGBA16F]:de.FLOAT,[t.R32F]:de.FLOAT,[t.RG32F]:de.FLOAT,[t.RGB32F]:de.FLOAT,[t.RGBA32F]:de.FLOAT,[t.R11F_G11F_B10F]:de.FLOAT,[t.RGB9_E5]:de.FLOAT,[t.R8I]:de.INT,[t.R8UI]:de.UINT,[t.R16I]:de.INT,[t.R16UI]:de.UINT,[t.R32I]:de.INT,[t.R32UI]:de.UINT,[t.RG8I]:de.INT,[t.RG8UI]:de.UINT,[t.RG16I]:de.INT,[t.RG16UI]:de.UINT,[t.RG32I]:de.INT,[t.RG32UI]:de.UINT,[t.RGB8I]:de.INT,[t.RGB8UI]:de.UINT,[t.RGB16I]:de.INT,[t.RGB16UI]:de.UINT,[t.RGB32I]:de.INT,[t.RGB32UI]:de.UINT,[t.RGBA8I]:de.INT,[t.RGBA8UI]:de.UINT,[t.RGBA16I]:de.INT,[t.RGBA16UI]:de.UINT,[t.RGBA32I]:de.INT,[t.RGBA32UI]:de.UINT,[t.DEPTH_COMPONENT16]:de.FLOAT,[t.DEPTH_COMPONENT24]:de.FLOAT,[t.DEPTH_COMPONENT32F]:de.FLOAT,[t.DEPTH_STENCIL]:de.FLOAT,[t.DEPTH24_STENCIL8]:de.FLOAT,[t.DEPTH32F_STENCIL8]:de.FLOAT}:e={[t.RGB]:de.FLOAT,[t.RGBA]:de.FLOAT,[t.ALPHA]:de.FLOAT,[t.LUMINANCE]:de.FLOAT,[t.LUMINANCE_ALPHA]:de.FLOAT,[t.DEPTH_STENCIL]:de.FLOAT},e}function WN(t){let e;return"WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext?e={[Ae.UNSIGNED_BYTE]:{[ne.RGBA]:t.RGBA8,[ne.RGB]:t.RGB8,[ne.RG]:t.RG8,[ne.RED]:t.R8,[ne.RGBA_INTEGER]:t.RGBA8UI,[ne.RGB_INTEGER]:t.RGB8UI,[ne.RG_INTEGER]:t.RG8UI,[ne.RED_INTEGER]:t.R8UI,[ne.ALPHA]:t.ALPHA,[ne.LUMINANCE]:t.LUMINANCE,[ne.LUMINANCE_ALPHA]:t.LUMINANCE_ALPHA},[Ae.BYTE]:{[ne.RGBA]:t.RGBA8_SNORM,[ne.RGB]:t.RGB8_SNORM,[ne.RG]:t.RG8_SNORM,[ne.RED]:t.R8_SNORM,[ne.RGBA_INTEGER]:t.RGBA8I,[ne.RGB_INTEGER]:t.RGB8I,[ne.RG_INTEGER]:t.RG8I,[ne.RED_INTEGER]:t.R8I},[Ae.UNSIGNED_SHORT]:{[ne.RGBA_INTEGER]:t.RGBA16UI,[ne.RGB_INTEGER]:t.RGB16UI,[ne.RG_INTEGER]:t.RG16UI,[ne.RED_INTEGER]:t.R16UI,[ne.DEPTH_COMPONENT]:t.DEPTH_COMPONENT16},[Ae.SHORT]:{[ne.RGBA_INTEGER]:t.RGBA16I,[ne.RGB_INTEGER]:t.RGB16I,[ne.RG_INTEGER]:t.RG16I,[ne.RED_INTEGER]:t.R16I},[Ae.UNSIGNED_INT]:{[ne.RGBA_INTEGER]:t.RGBA32UI,[ne.RGB_INTEGER]:t.RGB32UI,[ne.RG_INTEGER]:t.RG32UI,[ne.RED_INTEGER]:t.R32UI,[ne.DEPTH_COMPONENT]:t.DEPTH_COMPONENT24},[Ae.INT]:{[ne.RGBA_INTEGER]:t.RGBA32I,[ne.RGB_INTEGER]:t.RGB32I,[ne.RG_INTEGER]:t.RG32I,[ne.RED_INTEGER]:t.R32I},[Ae.FLOAT]:{[ne.RGBA]:t.RGBA32F,[ne.RGB]:t.RGB32F,[ne.RG]:t.RG32F,[ne.RED]:t.R32F,[ne.DEPTH_COMPONENT]:t.DEPTH_COMPONENT32F},[Ae.HALF_FLOAT]:{[ne.RGBA]:t.RGBA16F,[ne.RGB]:t.RGB16F,[ne.RG]:t.RG16F,[ne.RED]:t.R16F},[Ae.UNSIGNED_SHORT_5_6_5]:{[ne.RGB]:t.RGB565},[Ae.UNSIGNED_SHORT_4_4_4_4]:{[ne.RGBA]:t.RGBA4},[Ae.UNSIGNED_SHORT_5_5_5_1]:{[ne.RGBA]:t.RGB5_A1},[Ae.UNSIGNED_INT_2_10_10_10_REV]:{[ne.RGBA]:t.RGB10_A2,[ne.RGBA_INTEGER]:t.RGB10_A2UI},[Ae.UNSIGNED_INT_10F_11F_11F_REV]:{[ne.RGB]:t.R11F_G11F_B10F},[Ae.UNSIGNED_INT_5_9_9_9_REV]:{[ne.RGB]:t.RGB9_E5},[Ae.UNSIGNED_INT_24_8]:{[ne.DEPTH_STENCIL]:t.DEPTH24_STENCIL8},[Ae.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[ne.DEPTH_STENCIL]:t.DEPTH32F_STENCIL8}}:e={[Ae.UNSIGNED_BYTE]:{[ne.RGBA]:t.RGBA,[ne.RGB]:t.RGB,[ne.ALPHA]:t.ALPHA,[ne.LUMINANCE]:t.LUMINANCE,[ne.LUMINANCE_ALPHA]:t.LUMINANCE_ALPHA},[Ae.UNSIGNED_SHORT_5_6_5]:{[ne.RGB]:t.RGB},[Ae.UNSIGNED_SHORT_4_4_4_4]:{[ne.RGBA]:t.RGBA},[Ae.UNSIGNED_SHORT_5_5_5_1]:{[ne.RGBA]:t.RGBA}},e}class aC{constructor(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Ne,this.hasIntegerTextures=!1}contextChange(){const e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=WN(e),this.samplerTypes=$N(e);const r=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=r;for(let i=0;i<r;i++)this.boundTextures[i]=null;this.emptyTextures={};const n=new Ug(e.createTexture());e.bindTexture(e.TEXTURE_2D,n.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[e.TEXTURE_2D]=n,this.emptyTextures[e.TEXTURE_CUBE_MAP]=new Ug(e.createTexture()),e.bindTexture(e.TEXTURE_CUBE_MAP,this.emptyTextures[e.TEXTURE_CUBE_MAP].texture);for(let i=0;i<6;i++)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,null);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,e.LINEAR);for(let i=0;i<this.boundTextures.length;i++)this.bind(null,i)}bind(e,r=0){const{gl:n}=this;if(e=e==null?void 0:e.castToBaseTexture(),(e==null?void 0:e.valid)&&!e.parentTextureArray){e.touched=this.renderer.textureGC.count;const i=e._glTextures[this.CONTEXT_UID]||this.initTexture(e);this.boundTextures[r]!==e&&(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(e.target,i.texture)),i.dirtyId!==e.dirtyId?(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),this.updateTexture(e)):i.dirtyStyleId!==e.dirtyStyleId&&this.updateTextureStyle(e),this.boundTextures[r]=e}else this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(n.TEXTURE_2D,this.emptyTextures[n.TEXTURE_2D].texture),this.boundTextures[r]=null}reset(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(let e=0;e<this.boundTextures.length;e++)this.boundTextures[e]=this.unknownTexture}unbind(e){const{gl:r,boundTextures:n}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let i=0;i<n.length;i++)n[i]===this.unknownTexture&&this.bind(null,i)}for(let i=0;i<n.length;i++)n[i]===e&&(this.currentLocation!==i&&(r.activeTexture(r.TEXTURE0+i),this.currentLocation=i),r.bindTexture(e.target,this.emptyTextures[e.target].texture),n[i]=null)}ensureSamplerType(e){const{boundTextures:r,hasIntegerTextures:n,CONTEXT_UID:i}=this;if(n)for(let s=e-1;s>=0;--s){const o=r[s];o&&o._glTextures[i].samplerType!==de.FLOAT&&this.renderer.texture.unbind(o)}}initTexture(e){const r=new Ug(this.gl.createTexture());return r.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=r,this.managedTextures.push(e),e.on("dispose",this.destroyTexture,this),r}initTextureType(e,r){var n;r.internalFormat=((n=this.internalFormats[e.type])==null?void 0:n[e.format])??e.format,r.samplerType=this.samplerTypes[r.internalFormat]??de.FLOAT,this.webGLVersion===2&&e.type===Ae.HALF_FLOAT?r.type=this.gl.HALF_FLOAT:r.type=e.type}updateTexture(e){var i;const r=e._glTextures[this.CONTEXT_UID];if(!r)return;const n=this.renderer;if(this.initTextureType(e,r),(i=e.resource)==null?void 0:i.upload(n,e,r))r.samplerType!==de.FLOAT&&(this.hasIntegerTextures=!0);else{const s=e.realWidth,o=e.realHeight,l=n.gl;(r.width!==s||r.height!==o||r.dirtyId<0)&&(r.width=s,r.height=o,l.texImage2D(e.target,0,r.internalFormat,s,o,0,e.format,r.type,null))}e.dirtyStyleId!==r.dirtyStyleId&&this.updateTextureStyle(e),r.dirtyId=e.dirtyId}destroyTexture(e,r){const{gl:n}=this;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),n.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off("dispose",this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!r)){const i=this.managedTextures.indexOf(e);i!==-1&&Za(this.managedTextures,i,1)}}updateTextureStyle(e){var n;const r=e._glTextures[this.CONTEXT_UID];r&&((e.mipmap===Pi.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?r.mipmap=!1:r.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?r.wrapMode=qi.CLAMP:r.wrapMode=e.wrapMode,(n=e.resource)!=null&&n.style(this.renderer,e,r)||this.setStyle(e,r),r.dirtyStyleId=e.dirtyStyleId)}setStyle(e,r){const n=this.gl;if(r.mipmap&&e.mipmap!==Pi.ON_MANUAL&&n.generateMipmap(e.target),n.texParameteri(e.target,n.TEXTURE_WRAP_S,r.wrapMode),n.texParameteri(e.target,n.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===wn.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&e.anisotropicLevel>0&&e.scaleMode===wn.LINEAR){const s=Math.min(e.anisotropicLevel,n.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(e.target,i.TEXTURE_MAX_ANISOTROPY_EXT,s)}}else n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===wn.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(e.target,n.TEXTURE_MAG_FILTER,e.scaleMode===wn.LINEAR?n.LINEAR:n.NEAREST)}destroy(){this.renderer=null}}aC.extension={type:ae.RendererSystem,name:"texture"};we.add(aC);class lC{constructor(e){this.renderer=e}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:r,CONTEXT_UID:n}=this,i=e._glTransformFeedbacks[n]||this.createGLTransformFeedback(e);r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,i)}unbind(){const{gl:e}=this;e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(e,r){const{gl:n,renderer:i}=this;r&&i.shader.bind(r),n.beginTransformFeedback(e)}endTransformFeedback(){const{gl:e}=this;e.endTransformFeedback()}createGLTransformFeedback(e){const{gl:r,renderer:n,CONTEXT_UID:i}=this,s=r.createTransformFeedback();e._glTransformFeedbacks[i]=s,r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,s);for(let o=0;o<e.buffers.length;o++){const l=e.buffers[o];l&&(n.buffer.update(l),l._glBuffers[i].refCount++,r.bindBufferBase(r.TRANSFORM_FEEDBACK_BUFFER,o,l._glBuffers[i].buffer||null))}return r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,null),e.disposeRunner.add(this),s}disposeTransformFeedback(e,r){const n=e._glTransformFeedbacks[this.CONTEXT_UID],i=this.gl;e.disposeRunner.remove(this);const s=this.renderer.buffer;if(s)for(let o=0;o<e.buffers.length;o++){const l=e.buffers[o];if(!l)continue;const h=l._glBuffers[this.CONTEXT_UID];h&&(h.refCount--,h.refCount===0&&!r&&s.dispose(l,r))}n&&(r||i.deleteTransformFeedback(n),delete e._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}}lC.extension={type:ae.RendererSystem,name:"transformFeedback"};we.add(lC);class xf{constructor(e){this.renderer=e}init(e){this.screen=new De(0,0,e.width,e.height),this.element=e.view||he.ADAPTER.createCanvas(),this.resolution=e.resolution||he.RESOLUTION,this.autoDensity=!!e.autoDensity}resizeView(e,r){this.element.width=Math.round(e*this.resolution),this.element.height=Math.round(r*this.resolution);const n=this.element.width/this.resolution,i=this.element.height/this.resolution;this.screen.width=n,this.screen.height=i,this.autoDensity&&(this.element.style.width=`${n}px`,this.element.style.height=`${i}px`),this.renderer.emit("resize",n,i),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(e){var r;e&&((r=this.element.parentNode)==null||r.removeChild(this.element)),this.renderer=null,this.element=null,this.screen=null}}xf.defaultOptions={width:800,height:600,resolution:void 0,autoDensity:!1},xf.extension={type:[ae.RendererSystem,ae.CanvasRendererSystem],name:"_view"};we.add(xf);he.PREFER_ENV=Xo.WEBGL2;he.STRICT_TEXTURE_CACHE=!1;he.RENDER_OPTIONS={...vf.defaultOptions,...yf.defaultOptions,...xf.defaultOptions,..._f.defaultOptions};Object.defineProperties(he,{WRAP_MODE:{get(){return Ne.defaultOptions.wrapMode},set(t){Ue("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),Ne.defaultOptions.wrapMode=t}},SCALE_MODE:{get(){return Ne.defaultOptions.scaleMode},set(t){Ue("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),Ne.defaultOptions.scaleMode=t}},MIPMAP_TEXTURES:{get(){return Ne.defaultOptions.mipmap},set(t){Ue("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),Ne.defaultOptions.mipmap=t}},ANISOTROPIC_LEVEL:{get(){return Ne.defaultOptions.anisotropicLevel},set(t){Ue("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),Ne.defaultOptions.anisotropicLevel=t}},FILTER_RESOLUTION:{get(){return Ue("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),Sr.defaultResolution},set(t){Sr.defaultResolution=t}},FILTER_MULTISAMPLE:{get(){return Ue("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),Sr.defaultMultisample},set(t){Sr.defaultMultisample=t}},SPRITE_MAX_TEXTURES:{get(){return Ao.defaultMaxTextures},set(t){Ue("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),Ao.defaultMaxTextures=t}},SPRITE_BATCH_SIZE:{get(){return Ao.defaultBatchSize},set(t){Ue("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),Ao.defaultBatchSize=t}},CAN_UPLOAD_SAME_BUFFER:{get(){return Ao.canUploadSameBuffer},set(t){Ue("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),Ao.canUploadSameBuffer=t}},GC_MODE:{get(){return Co.defaultMode},set(t){Ue("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),Co.defaultMode=t}},GC_MAX_IDLE:{get(){return Co.defaultMaxIdle},set(t){Ue("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),Co.defaultMaxIdle=t}},GC_MAX_CHECK_COUNT:{get(){return Co.defaultCheckCountMax},set(t){Ue("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),Co.defaultCheckCountMax=t}},PRECISION_VERTEX:{get(){return Qi.defaultVertexPrecision},set(t){Ue("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),Qi.defaultVertexPrecision=t}},PRECISION_FRAGMENT:{get(){return Qi.defaultFragmentPrecision},set(t){Ue("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),Qi.defaultFragmentPrecision=t}}});var Qs=(t=>(t[t.INTERACTION=50]="INTERACTION",t[t.HIGH=25]="HIGH",t[t.NORMAL=0]="NORMAL",t[t.LOW=-25]="LOW",t[t.UTILITY=-50]="UTILITY",t))(Qs||{});class zg{constructor(e,r=null,n=0,i=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=r,this.priority=n,this.once=i}match(e,r=null){return this.fn===e&&this.context===r}emit(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));const r=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),r}connect(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this}destroy(e=!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 r=this.next;return this.next=e?null:r,this.previous=null,r}}const uC=class Qr{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 zg(null,null,1/0),this.deltaMS=1/Qr.targetFPMS,this.elapsedMS=1/Qr.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),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(e,r,n=Qs.NORMAL){return this._addListener(new zg(e,r,n))}addOnce(e,r,n=Qs.NORMAL){return this._addListener(new zg(e,r,n,!0))}_addListener(e){let r=this._head.next,n=this._head;if(!r)e.connect(n);else{for(;r;){if(e.priority>r.priority){e.connect(n);break}n=r,r=r.next}e.previous||e.connect(n)}return this._startIfPossible(),this}remove(e,r){let n=this._head.next;for(;n;)n.match(e,r)?n=n.destroy():n=n.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,r=this._head;for(;r=r.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let r;if(e>this.lastTime){if(r=this.elapsedMS=e-this.lastTime,r>this._maxElapsedMS&&(r=this._maxElapsedMS),r*=this.speed,this._minElapsedMS){const s=e-this._lastFrame|0;if(s<this._minElapsedMS)return;this._lastFrame=e-s%this._minElapsedMS}this.deltaMS=r,this.deltaTime=this.deltaMS*Qr.targetFPMS;const n=this._head;let i=n.next;for(;i;)i=i.emit(this.deltaTime);n.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=e}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(e){const r=Math.min(this.maxFPS,e),n=Math.min(Math.max(0,r)/1e3,Qr.targetFPMS);this._maxElapsedMS=1/n}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(e){if(e===0)this._minElapsedMS=0;else{const r=Math.max(this.minFPS,e);this._minElapsedMS=1/(r/1e3)}}static get shared(){if(!Qr._shared){const e=Qr._shared=new Qr;e.autoStart=!0,e._protected=!0}return Qr._shared}static get system(){if(!Qr._system){const e=Qr._system=new Qr;e.autoStart=!0,e._protected=!0}return Qr._system}};uC.targetFPMS=.06;let Yt=uC;Object.defineProperties(he,{TARGET_FPMS:{get(){return Yt.targetFPMS},set(t){Ue("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),Yt.targetFPMS=t}}});class hC{static init(e){e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{set(r){this._ticker&&this._ticker.remove(this.render,this),this._ticker=r,r&&r.add(this.render,this,Qs.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?Yt.shared:new Yt,e.autoStart&&this.start()}static destroy(){if(this._ticker){const e=this._ticker;this.ticker=null,e.destroy()}}}hC.extension=ae.Application;we.add(hC);const cC=[];we.handleByList(ae.Renderer,cC);function VN(t){for(const e of cC)if(e.test(t))return new e(t);throw new Error("Unable to auto-detect a suitable renderer.")}var XN=`attribute vec2 aVertexPosition;
529
529
  attribute vec2 aTextureCoord;
530
530
 
531
531
  uniform mat3 projectionMatrix;
@@ -562,8 +562,8 @@ void main(void)
562
562
  gl_Position = filterVertexPosition();
563
563
  vTextureCoord = filterTextureCoord();
564
564
  }
565
- `;const QN=XN,dC=YN;class fC{constructor(e){this.renderer=e}contextChange(e){let r;if(this.renderer.context.webGLVersion===1){const n=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),r=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,n)}else{const n=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),r=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,n)}r>=kt.HIGH?this.multisample=kt.HIGH:r>=kt.MEDIUM?this.multisample=kt.MEDIUM:r>=kt.LOW?this.multisample=kt.LOW:this.multisample=kt.NONE}destroy(){}}fC.extension={type:ae.RendererSystem,name:"_multisample"};we.add(fC);class KN{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class pC{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:r,CONTEXT_UID:n}=this,i=e._glBuffers[n]||this.createGLBuffer(e);r.bindBuffer(e.type,i.buffer)}unbind(e){const{gl:r}=this;r.bindBuffer(e,null)}bindBufferBase(e,r){const{gl:n,CONTEXT_UID:i}=this;if(this.boundBufferBases[r]!==e){const s=e._glBuffers[i]||this.createGLBuffer(e);this.boundBufferBases[r]=e,n.bindBufferBase(n.UNIFORM_BUFFER,r,s.buffer)}}bindBufferRange(e,r,n){const{gl:i,CONTEXT_UID:s}=this;n=n||0;const o=e._glBuffers[s]||this.createGLBuffer(e);i.bindBufferRange(i.UNIFORM_BUFFER,r||0,o.buffer,n*256,256)}update(e){const{gl:r,CONTEXT_UID:n}=this,i=e._glBuffers[n]||this.createGLBuffer(e);if(e._updateID!==i.updateID)if(i.updateID=e._updateID,r.bindBuffer(e.type,i.buffer),i.byteLength>=e.data.byteLength)r.bufferSubData(e.type,0,e.data);else{const s=e.static?r.STATIC_DRAW:r.DYNAMIC_DRAW;i.byteLength=e.data.byteLength,r.bufferData(e.type,e.data,s)}}dispose(e,r){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];const n=e._glBuffers[this.CONTEXT_UID],i=this.gl;e.disposeRunner.remove(this),n&&(r||i.deleteBuffer(n.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){const r=Object.keys(this.managedBuffers);for(let n=0;n<r.length;n++)this.dispose(this.managedBuffers[r[n]],e)}createGLBuffer(e){const{CONTEXT_UID:r,gl:n}=this;return e._glBuffers[r]=new KN(n.createBuffer()),this.managedBuffers[e.id]=e,e.disposeRunner.add(this),e._glBuffers[r]}}pC.extension={type:ae.RendererSystem,name:"buffer"};we.add(pC);class mC{constructor(e){this.renderer=e}render(e,r){const n=this.renderer;let i,s,o,l;if(r&&(i=r.renderTexture,s=r.clear,o=r.transform,l=r.skipUpdateTransform),this.renderingToScreen=!i,n.runners.prerender.emit(),n.emit("prerender"),n.projection.transform=o,!n.context.isLost){if(i||(this.lastObjectRendered=e),!l){const h=e.enableTempParent();e.updateTransform(),e.disableTempParent(h)}n.renderTexture.bind(i),n.batch.currentRenderer.start(),(s??n.background.clearBeforeRender)&&n.renderTexture.clear(),e.render(n),n.batch.currentRenderer.flush(),i&&(r.blit&&n.framebuffer.blit(),i.baseTexture.update()),n.runners.postrender.emit(),n.projection.transform=null,n.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}mC.extension={type:ae.RendererSystem,name:"objectRenderer"};we.add(mC);const kd=class Av extends jN{constructor(e){super(),this.type=qT.WEBGL,e=Object.assign({},he.RENDER_OPTIONS,e),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new Qn({projectionMatrix:new ot},!0);const r={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:Av.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(r),"useContextAlpha"in e&&(Ue("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),e.premultipliedAlpha=e.useContextAlpha&&e.useContextAlpha!=="notMultiplied",e.backgroundAlpha=e.useContextAlpha===!1?1:e.backgroundAlpha),this._plugin.rendererPlugins=Av.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:_4()}render(e,r){this.objectRenderer.render(e,r)}resize(e,r){this._view.resizeView(e,r)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(e=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:e}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(e){this._view.resolution=e,this.runners.resolutionChange.emit(e)}get autoDensity(){return this._view.autoDensity}get view(){return this._view.element}get screen(){return this._view.screen}get lastObjectRendered(){return this.objectRenderer.lastObjectRendered}get renderingToScreen(){return this.objectRenderer.renderingToScreen}get rendererLogId(){return`WebGL ${this.context.webGLVersion}`}get clearBeforeRender(){return Ue("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return Ue("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return Ue("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return Ue("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(e){Ue("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=e}get backgroundAlpha(){return Ue("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(e){Ue("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=e}get powerPreference(){return Ue("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(e,r){return this.textureGenerator.generateTexture(e,r)}};kd.extension={type:ae.Renderer,priority:1},kd.__plugins={},kd.__systems={};let l_=kd;we.handleByMap(ae.RendererPlugin,l_.__plugins);we.handleByMap(ae.RendererSystem,l_.__systems);we.add(l_);class gC extends qu{constructor(e,r){const{width:n,height:i}=r||{};super(n,i),this.items=[],this.itemDirtyIds=[];for(let s=0;s<e;s++){const o=new Ne;this.items.push(o),this.itemDirtyIds.push(-2)}this.length=e,this._load=null,this.baseTexture=null}initFromArray(e,r){for(let n=0;n<this.length;n++)e[n]&&(e[n].castToBaseTexture?this.addBaseTextureAt(e[n].castToBaseTexture(),n):e[n]instanceof qu?this.addResourceAt(e[n],n):this.addResourceAt(OA(e[n],r),n))}dispose(){for(let e=0,r=this.length;e<r;e++)this.items[e].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(e,r){if(!this.items[r])throw new Error(`Index ${r} is out of bounds`);return e.valid&&!this.valid&&this.resize(e.width,e.height),this.items[r].setResource(e),this}bind(e){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");super.bind(e);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=e,this.items[r].on("update",e.update,e)}unbind(e){super.unbind(e);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=null,this.items[r].off("update",e.update,e)}load(){if(this._load)return this._load;const e=this.items.map(r=>r.resource).filter(r=>r).map(r=>r.load());return this._load=Promise.all(e).then(()=>{const{realWidth:r,realHeight:n}=this.items[0];return this.resize(r,n),this.update(),Promise.resolve(this)}),this._load}}class qN extends gC{constructor(e,r){const{width:n,height:i}=r||{};let s,o;Array.isArray(e)?(s=e,o=e.length):o=e,super(o,{width:n,height:i}),s&&this.initFromArray(s,r)}addBaseTextureAt(e,r){if(e.resource)this.addResourceAt(e.resource,r);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(e){super.bind(e),e.target=Qa.TEXTURE_2D_ARRAY}upload(e,r,n){const{length:i,itemDirtyIds:s,items:o}=this,{gl:l}=e;n.dirtyId<0&&l.texImage3D(l.TEXTURE_2D_ARRAY,0,n.internalFormat,this._width,this._height,i,0,r.format,n.type,null);for(let h=0;h<i;h++){const c=o[h];s[h]<c.dirtyId&&(s[h]=c.dirtyId,c.valid&&l.texSubImage3D(l.TEXTURE_2D_ARRAY,0,0,0,h,c.resource.width,c.resource.height,1,r.format,n.type,c.resource.source))}return!0}}class ZN extends is{constructor(e){super(e)}static test(e){const{OffscreenCanvas:r}=globalThis;return r&&e instanceof r?!0:globalThis.HTMLCanvasElement&&e instanceof HTMLCanvasElement}}const yC=class uu extends gC{constructor(e,r){const{width:n,height:i,autoLoad:s,linkBaseTexture:o}=r||{};if(e&&e.length!==uu.SIDES)throw new Error(`Invalid length. Got ${e.length}, expected 6`);super(6,{width:n,height:i});for(let l=0;l<uu.SIDES;l++)this.items[l].target=Qa.TEXTURE_CUBE_MAP_POSITIVE_X+l;this.linkBaseTexture=o!==!1,e&&this.initFromArray(e,r),s!==!1&&this.load()}bind(e){super.bind(e),e.target=Qa.TEXTURE_CUBE_MAP}addBaseTextureAt(e,r,n){if(n===void 0&&(n=this.linkBaseTexture),!this.items[r])throw new Error(`Index ${r} is out of bounds`);if(!this.linkBaseTexture||e.parentTextureArray||Object.keys(e._glTextures).length>0)if(e.resource)this.addResourceAt(e.resource,r);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=Qa.TEXTURE_CUBE_MAP_POSITIVE_X+r,e.parentTextureArray=this.baseTexture,this.items[r]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[r]=e,this}upload(e,r,n){const i=this.itemDirtyIds;for(let s=0;s<uu.SIDES;s++){const o=this.items[s];(i[s]<o.dirtyId||n.dirtyId<r.dirtyId)&&(o.valid&&o.resource?(o.resource.upload(e,o,n),i[s]=o.dirtyId):i[s]<-1&&(e.gl.texImage2D(o.target,0,n.internalFormat,r.realWidth,r.realHeight,0,r.format,n.type,null),i[s]=-1))}return!0}static test(e){return Array.isArray(e)&&e.length===uu.SIDES}};yC.SIDES=6;let JN=yC;class za extends is{constructor(e,r){r=r||{};let n,i,s;typeof e=="string"?(n=za.EMPTY,i=e,s=!0):(n=e,i=null,s=!1),super(n),this.url=i,this.crossOrigin=r.crossOrigin??!0,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this.ownsImageBitmap=r.ownsImageBitmap??s,this._load=null,r.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(async(e,r)=>{if(this.url===null){e(this);return}try{const n=await he.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const i=await n.blob();if(this.destroyed)return;const s=await createImageBitmap(i,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Br.UNPACK?"premultiply":"none"});if(this.destroyed){s.close();return}this.source=s,this.update(),e(this)}catch(n){if(this.destroyed)return;r(n),this.onError.emit(n)}}),this._load)}upload(e,r,n){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),super.upload(e,r,n)):(this.load(),!1)}dispose(){this.ownsImageBitmap&&this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof e=="string"||e instanceof ImageBitmap)}static get EMPTY(){return za._EMPTY=za._EMPTY??he.ADAPTER.createCanvas(0,0),za._EMPTY}}const Cv=class Nd extends is{constructor(e,r){r=r||{},super(he.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=r.scale||1,this._overrideWidth=r.width,this._overrideHeight=r.height,this._resolve=null,this._crossorigin=r.crossorigin,this._load=null,r.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.update(),e(this)},Nd.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const e=new Image;is.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=r=>{this._resolve&&(e.onerror=null,this.onError.emit(r))},e.onload=()=>{if(!this._resolve)return;const r=e.width,n=e.height;if(!r||!n)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let i=r*this.scale,s=n*this.scale;(this._overrideWidth||this._overrideHeight)&&(i=this._overrideWidth||this._overrideHeight/n*r,s=this._overrideHeight||this._overrideWidth/r*n),i=Math.round(i),s=Math.round(s);const o=this.source;o.width=i,o.height=s,o._pixiId=`canvas_${$o()}`,o.getContext("2d").drawImage(e,0,0,r,n,0,0,i,s),this._resolve(),this._resolve=null}}static getSize(e){const r=Nd.SVG_SIZE.exec(e),n={};return r&&(n[r[1]]=Math.round(parseFloat(r[3])),n[r[5]]=Math.round(parseFloat(r[7]))),n}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,r){return r==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&Nd.SVG_XML.test(e)}};Cv.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,Cv.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;let Pv=Cv;class eD extends is{constructor(e){super(e)}static test(e){return!!globalThis.VideoFrame&&e instanceof globalThis.VideoFrame}}const Iv=class Rv extends is{constructor(e,r){if(r=r||{},!(e instanceof HTMLVideoElement)){const n=document.createElement("video");r.autoLoad!==!1&&n.setAttribute("preload","auto"),r.playsinline!==!1&&(n.setAttribute("webkit-playsinline",""),n.setAttribute("playsinline","")),r.muted===!0&&(n.setAttribute("muted",""),n.muted=!0),r.loop===!0&&n.setAttribute("loop",""),r.autoPlay!==!1&&n.setAttribute("autoplay",""),typeof e=="string"&&(e=[e]);const i=e[0].src||e[0];is.crossOrigin(n,i,r.crossorigin);for(let s=0;s<e.length;++s){const o=document.createElement("source");let{src:l,mime:h}=e[s];if(l=l||e[s],l.startsWith("data:"))h=l.slice(5,l.indexOf(";"));else if(!l.startsWith("blob:")){const c=l.split("?").shift().toLowerCase(),f=c.slice(c.lastIndexOf(".")+1);h=h||Rv.MIME_TYPES[f]||`video/${f}`}o.src=l,h&&(o.type=h),n.appendChild(o)}e=n}super(e),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=r.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=r.autoPlay!==!1,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._onError=this._onError.bind(this),this._onPlayStart=this._onPlayStart.bind(this),this._onPlayStop=this._onPlayStop.bind(this),this._onSeeked=this._onSeeked.bind(this),r.autoLoad!==!1&&this.load()}update(e=0){if(!this.destroyed){if(this._updateFPS){const r=Yt.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-r)}(!this._updateFPS||this._msToNextUpdate<=0)&&(super.update(),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}}_videoFrameRequestCallback(){this.update(),this.destroyed?this._videoFrameRequestCallbackHandle=null:this._videoFrameRequestCallbackHandle=this.source.requestVideoFrameCallback(this._videoFrameRequestCallback)}load(){if(this._load)return this._load;const e=this.source;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart),e.addEventListener("pause",this._onPlayStop),e.addEventListener("seeked",this._onSeeked),this._isSourceReady()?this._onCanPlay():(e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlay),e.addEventListener("error",this._onError,!0)),this._load=new Promise((r,n)=>{this.valid?r(this):(this._resolve=r,this._reject=n,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e),this._reject&&(this._reject(e),this._reject=null,this._resolve=null)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const r=this.valid;this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0,!r&&this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._configureAutoUpdate();const e=this.source;e&&(e.removeEventListener("play",this._onPlayStart),e.removeEventListener("pause",this._onPlayStop),e.removeEventListener("seeked",this._onSeeked),e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay),e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.source.requestVideoFrameCallback?(this._isConnectedToTicker&&(Yt.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.source.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(Yt.shared.add(this.update,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(Yt.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(e,r){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||Rv.TYPES.includes(r)}};Iv.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],Iv.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let vC=Iv;gv.push(za,$A,ZN,vC,eD,Pv,np,JN,qN);class wf{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(e){return this.minX>this.maxX||this.minY>this.maxY?De.EMPTY:(e=e||new De(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)}addPoint(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)}addPointMatrix(e,r){const{a:n,b:i,c:s,d:o,tx:l,ty:h}=e,c=n*r.x+s*r.y+l,f=i*r.x+o*r.y+h;this.minX=Math.min(this.minX,c),this.maxX=Math.max(this.maxX,c),this.minY=Math.min(this.minY,f),this.maxY=Math.max(this.maxY,f)}addQuad(e){let r=this.minX,n=this.minY,i=this.maxX,s=this.maxY,o=e[0],l=e[1];r=o<r?o:r,n=l<n?l:n,i=o>i?o:i,s=l>s?l:s,o=e[2],l=e[3],r=o<r?o:r,n=l<n?l:n,i=o>i?o:i,s=l>s?l:s,o=e[4],l=e[5],r=o<r?o:r,n=l<n?l:n,i=o>i?o:i,s=l>s?l:s,o=e[6],l=e[7],r=o<r?o:r,n=l<n?l:n,i=o>i?o:i,s=l>s?l:s,this.minX=r,this.minY=n,this.maxX=i,this.maxY=s}addFrame(e,r,n,i,s){this.addFrameMatrix(e.worldTransform,r,n,i,s)}addFrameMatrix(e,r,n,i,s){const o=e.a,l=e.b,h=e.c,c=e.d,f=e.tx,m=e.ty;let p=this.minX,v=this.minY,_=this.maxX,E=this.maxY,T=o*r+h*n+f,S=l*r+c*n+m;p=T<p?T:p,v=S<v?S:v,_=T>_?T:_,E=S>E?S:E,T=o*i+h*n+f,S=l*i+c*n+m,p=T<p?T:p,v=S<v?S:v,_=T>_?T:_,E=S>E?S:E,T=o*r+h*s+f,S=l*r+c*s+m,p=T<p?T:p,v=S<v?S:v,_=T>_?T:_,E=S>E?S:E,T=o*i+h*s+f,S=l*i+c*s+m,p=T<p?T:p,v=S<v?S:v,_=T>_?T:_,E=S>E?S:E,this.minX=p,this.minY=v,this.maxX=_,this.maxY=E}addVertexData(e,r,n){let i=this.minX,s=this.minY,o=this.maxX,l=this.maxY;for(let h=r;h<n;h+=2){const c=e[h],f=e[h+1];i=c<i?c:i,s=f<s?f:s,o=c>o?c:o,l=f>l?f:l}this.minX=i,this.minY=s,this.maxX=o,this.maxY=l}addVertices(e,r,n,i){this.addVerticesMatrix(e.worldTransform,r,n,i)}addVerticesMatrix(e,r,n,i,s=0,o=s){const l=e.a,h=e.b,c=e.c,f=e.d,m=e.tx,p=e.ty;let v=this.minX,_=this.minY,E=this.maxX,T=this.maxY;for(let S=n;S<i;S+=2){const b=r[S],x=r[S+1],A=l*b+c*x+m,R=f*x+h*b+p;v=Math.min(v,A-s),E=Math.max(E,A+s),_=Math.min(_,R-o),T=Math.max(T,R+o)}this.minX=v,this.minY=_,this.maxX=E,this.maxY=T}addBounds(e){const r=this.minX,n=this.minY,i=this.maxX,s=this.maxY;this.minX=e.minX<r?e.minX:r,this.minY=e.minY<n?e.minY:n,this.maxX=e.maxX>i?e.maxX:i,this.maxY=e.maxY>s?e.maxY:s}addBoundsMask(e,r){const n=e.minX>r.minX?e.minX:r.minX,i=e.minY>r.minY?e.minY:r.minY,s=e.maxX<r.maxX?e.maxX:r.maxX,o=e.maxY<r.maxY?e.maxY:r.maxY;if(n<=s&&i<=o){const l=this.minX,h=this.minY,c=this.maxX,f=this.maxY;this.minX=n<l?n:l,this.minY=i<h?i:h,this.maxX=s>c?s:c,this.maxY=o>f?o:f}}addBoundsMatrix(e,r){this.addFrameMatrix(r,e.minX,e.minY,e.maxX,e.maxY)}addBoundsArea(e,r){const n=e.minX>r.x?e.minX:r.x,i=e.minY>r.y?e.minY:r.y,s=e.maxX<r.x+r.width?e.maxX:r.x+r.width,o=e.maxY<r.y+r.height?e.maxY:r.y+r.height;if(n<=s&&i<=o){const l=this.minX,h=this.minY,c=this.maxX,f=this.maxY;this.minX=n<l?n:l,this.minY=i<h?i:h,this.maxX=s>c?s:c,this.maxY=o>f?o:f}}pad(e=0,r=e){this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=r,this.maxY+=r)}addFramePad(e,r,n,i,s,o){e-=s,r-=o,n+=s,i+=o,this.minX=this.minX<e?this.minX:e,this.maxX=this.maxX>n?this.maxX:n,this.minY=this.minY<r?this.minY:r,this.maxY=this.maxY>i?this.maxY:i}}class ct extends lh{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new ap,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new wf,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(e){const r=Object.keys(e);for(let n=0;n<r.length;++n){const i=r[n];Object.defineProperty(ct.prototype,i,Object.getOwnPropertyDescriptor(e,i))}}get destroyed(){return this._destroyed}_recursivePostUpdateTransform(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)}updateTransform(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha}getBounds(e,r){return e||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),r||(this._boundsRect||(this._boundsRect=new De),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(e){e||(this._localBoundsRect||(this._localBoundsRect=new De),e=this._localBoundsRect),this._localBounds||(this._localBounds=new wf);const r=this.transform,n=this.parent;this.parent=null,this._tempDisplayObjectParent.worldAlpha=(n==null?void 0:n.worldAlpha)??1,this.transform=this._tempDisplayObjectParent.transform;const i=this._bounds,s=this._boundsID;this._bounds=this._localBounds;const o=this.getBounds(!1,e);return this.parent=n,this.transform=r,this._bounds=i,this._bounds.updateID+=this._boundsID-s,o}toGlobal(e,r,n=!1){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(e,r)}toLocal(e,r,n,i){return r&&(e=r.toGlobal(e,n,i)),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(e,n)}setParent(e){if(!e||!e.addChild)throw new Error("setParent: Argument must be a Container");return e.addChild(this),e}removeFromParent(){var e;(e=this.parent)==null||e.removeChild(this)}setTransform(e=0,r=0,n=1,i=1,s=0,o=0,l=0,h=0,c=0){return this.position.x=e,this.position.y=r,this.scale.x=n||1,this.scale.y=i||1,this.rotation=s,this.skew.x=o,this.skew.y=l,this.pivot.x=h,this.pivot.y=c,this}destroy(e){this.removeFromParent(),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.eventMode="auto",this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()}get _tempDisplayObjectParent(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new tD),this.tempDisplayObjectParent}enableTempParent(){const e=this.parent;return this.parent=this._tempDisplayObjectParent,e}disableTempParent(e){this.parent=e}get x(){return this.position.x}set x(e){this.transform.position.x=e}get y(){return this.position.y}set y(e){this.transform.position.y=e}get worldTransform(){return this.transform.worldTransform}get localTransform(){return this.transform.localTransform}get position(){return this.transform.position}set position(e){this.transform.position.copyFrom(e)}get scale(){return this.transform.scale}set scale(e){this.transform.scale.copyFrom(e)}get pivot(){return this.transform.pivot}set pivot(e){this.transform.pivot.copyFrom(e)}get skew(){return this.transform.skew}set skew(e){this.transform.skew.copyFrom(e)}get rotation(){return this.transform.rotation}set rotation(e){this.transform.rotation=e}get angle(){return this.transform.rotation*X4}set angle(e){this.transform.rotation=e*Y4}get zIndex(){return this._zIndex}set zIndex(e){this._zIndex!==e&&(this._zIndex=e,this.parent&&(this.parent.sortDirty=!0))}get worldVisible(){let e=this;do{if(!e.visible)return!1;e=e.parent}while(e);return!0}get mask(){return this._mask}set mask(e){if(this._mask!==e){if(this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount--,r._maskRefCount===0&&(r.renderable=!0,r.isMask=!1))}if(this._mask=e,this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount===0&&(r.renderable=!1,r.isMask=!0),r._maskRefCount++)}}}}class tD extends ct{constructor(){super(...arguments),this.sortDirty=null}}ct.prototype.displayObjectUpdateTransform=ct.prototype.updateTransform;const rD=new ot;function nD(t,e){return t.zIndex===e.zIndex?t._lastSortedIndex-e._lastSortedIndex:t.zIndex-e.zIndex}const _C=class Mv extends ct{constructor(){super(),this.children=[],this.sortableChildren=Mv.defaultSortableChildren,this.sortDirty=!1}onChildrenChange(e){}addChild(...e){if(e.length>1)for(let r=0;r<e.length;r++)this.addChild(e[r]);else{const r=e[0];r.parent&&r.parent.removeChild(r),r.parent=this,this.sortDirty=!0,r.transform._parentID=-1,this.children.push(r),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",r,this,this.children.length-1),r.emit("added",this)}return e[0]}addChildAt(e,r){if(r<0||r>this.children.length)throw new Error(`${e}addChildAt: The index ${r} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(r,0,e),this._boundsID++,this.onChildrenChange(r),e.emit("added",this),this.emit("childAdded",e,this,r),e}swapChildren(e,r){if(e===r)return;const n=this.getChildIndex(e),i=this.getChildIndex(r);this.children[n]=r,this.children[i]=e,this.onChildrenChange(n<i?n:i)}getChildIndex(e){const r=this.children.indexOf(e);if(r===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return r}setChildIndex(e,r){if(r<0||r>=this.children.length)throw new Error(`The index ${r} supplied is out of bounds ${this.children.length}`);const n=this.getChildIndex(e);Za(this.children,n,1),this.children.splice(r,0,e),this.onChildrenChange(r)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let r=0;r<e.length;r++)this.removeChild(e[r]);else{const r=e[0],n=this.children.indexOf(r);if(n===-1)return null;r.parent=null,r.transform._parentID=-1,Za(this.children,n,1),this._boundsID++,this.onChildrenChange(n),r.emit("removed",this),this.emit("childRemoved",r,this,n)}return e[0]}removeChildAt(e){const r=this.getChildAt(e);return r.parent=null,r.transform._parentID=-1,Za(this.children,e,1),this._boundsID++,this.onChildrenChange(e),r.emit("removed",this),this.emit("childRemoved",r,this,e),r}removeChildren(e=0,r=this.children.length){const n=e,i=r,s=i-n;let o;if(s>0&&s<=i){o=this.children.splice(n,s);for(let l=0;l<o.length;++l)o[l].parent=null,o[l].transform&&(o[l].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(let l=0;l<o.length;++l)o[l].emit("removed",this),this.emit("childRemoved",o[l],this,l);return o}else if(s===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")}sortChildren(){let e=!1;for(let r=0,n=this.children.length;r<n;++r){const i=this.children[r];i._lastSortedIndex=r,!e&&i.zIndex!==0&&(e=!0)}e&&this.children.length>1&&this.children.sort(nD),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let e=0,r=this.children.length;e<r;++e){const n=this.children[e];n.visible&&n.updateTransform()}}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(let e=0;e<this.children.length;e++){const r=this.children[e];if(!(!r.visible||!r.renderable))if(r.calculateBounds(),r._mask){const n=r._mask.isMaskData?r._mask.maskObject:r._mask;n?(n.calculateBounds(),this._bounds.addBoundsMask(r._bounds,n._bounds)):this._bounds.addBounds(r._bounds)}else r.filterArea?this._bounds.addBoundsArea(r._bounds,r.filterArea):this._bounds.addBounds(r._bounds)}this._bounds.updateID=this._boundsID}getLocalBounds(e,r=!1){const n=super.getLocalBounds(e);if(!r)for(let i=0,s=this.children.length;i<s;++i){const o=this.children[i];o.visible&&o.updateTransform()}return n}_calculateBounds(){}_renderWithCulling(e){const r=e.renderTexture.sourceFrame;if(!(r.width>0&&r.height>0))return;let n,i;this.cullArea?(n=this.cullArea,i=this.worldTransform):this._render!==Mv.prototype._render&&(n=this.getBounds(!0));const s=e.projection.transform;if(s&&(i?(i=rD.copyFrom(i),i.prepend(s)):i=s),n&&r.intersects(n,i))this._render(e);else if(this.cullArea)return;for(let o=0,l=this.children.length;o<l;++o){const h=this.children[o],c=h.cullable;h.cullable=c||!this.cullArea,h.render(e),h.cullable=c}}render(e){var r;if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||(r=this.filters)!=null&&r.length)this.renderAdvanced(e);else if(this.cullable)this._renderWithCulling(e);else{this._render(e);for(let n=0,i=this.children.length;n<i;++n)this.children[n].render(e)}}renderAdvanced(e){var s,o,l;const r=this.filters,n=this._mask;if(r){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let h=0;h<r.length;h++)r[h].enabled&&this._enabledFilters.push(r[h])}const i=r&&((s=this._enabledFilters)==null?void 0:s.length)||n&&(!n.isMaskData||n.enabled&&(n.autoDetect||n.type!==Bt.NONE));if(i&&e.batch.flush(),r&&((o=this._enabledFilters)!=null&&o.length)&&e.filter.push(this,this._enabledFilters),n&&e.mask.push(this,this._mask),this.cullable)this._renderWithCulling(e);else{this._render(e);for(let h=0,c=this.children.length;h<c;++h)this.children[h].render(e)}i&&e.batch.flush(),n&&e.mask.pop(this),r&&((l=this._enabledFilters)!=null&&l.length)&&e.filter.pop()}_render(e){}destroy(e){super.destroy(),this.sortDirty=!1;const r=typeof e=="boolean"?e:e==null?void 0:e.children,n=this.removeChildren(0,this.children.length);if(r)for(let i=0;i<n.length;++i)n[i].destroy(e)}get width(){return this.scale.x*this.getLocalBounds().width}set width(e){const r=this.getLocalBounds().width;r!==0?this.scale.x=e/r:this.scale.x=1,this._width=e}get height(){return this.scale.y*this.getLocalBounds().height}set height(e){const r=this.getLocalBounds().height;r!==0?this.scale.y=e/r:this.scale.y=1,this._height=e}};_C.defaultSortableChildren=!1;let Tr=_C;Tr.prototype.containerUpdateTransform=Tr.prototype.updateTransform;Object.defineProperties(he,{SORTABLE_CHILDREN:{get(){return Tr.defaultSortableChildren},set(t){Ue("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Tr.defaultSortableChildren=t}}});var up=(t=>(t[t.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",t[t.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",t))(up||{});const eu=new Ge,iD=new Uint16Array([0,1,2,0,2,3]);class ki extends Tr{constructor(e){super(),this._anchor=new Ei(this._onAnchorUpdate,this,e?e.defaultAnchor.x:0,e?e.defaultAnchor.y:0),this._texture=null,this._width=0,this._height=0,this._tintColor=new tt(16777215),this._tintRGB=null,this.tint=16777215,this.blendMode=Ie.NORMAL,this._cachedTint=16777215,this.uvs=null,this.texture=e||se.EMPTY,this.vertexData=new Float32Array(8),this.vertexTrimmedData=null,this._transformID=-1,this._textureID=-1,this._transformTrimmedID=-1,this._textureTrimmedID=-1,this.indices=iD,this.pluginName="batch",this.isSprite=!0,this._roundPixels=he.ROUND_PIXELS}_onTextureUpdate(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=Ds(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=Ds(this.scale.y)*this._height/this._texture.orig.height)}_onAnchorUpdate(){this._transformID=-1,this._transformTrimmedID=-1}calculateVertices(){const e=this._texture;if(this._transformID===this.transform._worldID&&this._textureID===e._updateID)return;this._textureID!==e._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=e._updateID;const r=this.transform.worldTransform,n=r.a,i=r.b,s=r.c,o=r.d,l=r.tx,h=r.ty,c=this.vertexData,f=e.trim,m=e.orig,p=this._anchor;let v=0,_=0,E=0,T=0;if(f?(_=f.x-p._x*m.width,v=_+f.width,T=f.y-p._y*m.height,E=T+f.height):(_=-p._x*m.width,v=_+m.width,T=-p._y*m.height,E=T+m.height),c[0]=n*_+s*T+l,c[1]=o*T+i*_+h,c[2]=n*v+s*T+l,c[3]=o*T+i*v+h,c[4]=n*v+s*E+l,c[5]=o*E+i*v+h,c[6]=n*_+s*E+l,c[7]=o*E+i*_+h,this._roundPixels){const S=he.RESOLUTION;for(let b=0;b<c.length;++b)c[b]=Math.round(c[b]*S)/S}}calculateTrimmedVertices(){if(!this.vertexTrimmedData)this.vertexTrimmedData=new Float32Array(8);else if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return;this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;const e=this._texture,r=this.vertexTrimmedData,n=e.orig,i=this._anchor,s=this.transform.worldTransform,o=s.a,l=s.b,h=s.c,c=s.d,f=s.tx,m=s.ty,p=-i._x*n.width,v=p+n.width,_=-i._y*n.height,E=_+n.height;if(r[0]=o*p+h*_+f,r[1]=c*_+l*p+m,r[2]=o*v+h*_+f,r[3]=c*_+l*v+m,r[4]=o*v+h*E+f,r[5]=c*E+l*v+m,r[6]=o*p+h*E+f,r[7]=c*E+l*p+m,this._roundPixels){const T=he.RESOLUTION;for(let S=0;S<r.length;++S)r[S]=Math.round(r[S]*T)/T}}_render(e){this.calculateVertices(),e.batch.setObjectRenderer(e.plugins[this.pluginName]),e.plugins[this.pluginName].render(this)}_calculateBounds(){const e=this._texture.trim,r=this._texture.orig;!e||e.width===r.width&&e.height===r.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))}getLocalBounds(e){return this.children.length===0?(this._localBounds||(this._localBounds=new wf),this._localBounds.minX=this._texture.orig.width*-this._anchor._x,this._localBounds.minY=this._texture.orig.height*-this._anchor._y,this._localBounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._localBounds.maxY=this._texture.orig.height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new De),e=this._localBoundsRect),this._localBounds.getRectangle(e)):super.getLocalBounds.call(this,e)}containsPoint(e){this.worldTransform.applyInverse(e,eu);const r=this._texture.orig.width,n=this._texture.orig.height,i=-r*this.anchor.x;let s=0;return eu.x>=i&&eu.x<i+r&&(s=-n*this.anchor.y,eu.y>=s&&eu.y<s+n)}destroy(e){if(super.destroy(e),this._texture.off("update",this._onTextureUpdate,this),this._anchor=null,typeof e=="boolean"?e:e==null?void 0:e.texture){const r=typeof e=="boolean"?e:e==null?void 0:e.baseTexture;this._texture.destroy(!!r)}this._texture=null}static from(e,r){const n=e instanceof se?e:se.from(e,r);return new ki(n)}set roundPixels(e){this._roundPixels!==e&&(this._transformID=-1,this._transformTrimmedID=-1),this._roundPixels=e}get roundPixels(){return this._roundPixels}get width(){return Math.abs(this.scale.x)*this._texture.orig.width}set width(e){const r=Ds(this.scale.x)||1;this.scale.x=r*e/this._texture.orig.width,this._width=e}get height(){return Math.abs(this.scale.y)*this._texture.orig.height}set height(e){const r=Ds(this.scale.y)||1;this.scale.y=r*e/this._texture.orig.height,this._height=e}get anchor(){return this._anchor}set anchor(e){this._anchor.copyFrom(e)}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e),this._tintRGB=this._tintColor.toLittleEndianNumber()}get tintValue(){return this._tintColor.toNumber()}get texture(){return this._texture}set texture(e){this._texture!==e&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=e||se.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,e&&(e.baseTexture.valid?this._onTextureUpdate():e.once("update",this._onTextureUpdate,this)))}}const Yc={willReadFrequently:!0},di=class be{static get experimentalLetterSpacingSupported(){let e=be._experimentalLetterSpacingSupported;if(e!==void 0){const r=he.ADAPTER.getCanvasRenderingContext2D().prototype;e=be._experimentalLetterSpacingSupported="letterSpacing"in r||"textLetterSpacing"in r}return e}constructor(e,r,n,i,s,o,l,h,c){this.text=e,this.style=r,this.width=n,this.height=i,this.lines=s,this.lineWidths=o,this.lineHeight=l,this.maxLineWidth=h,this.fontProperties=c}static measureText(e,r,n,i=be._canvas){n=n??r.wordWrap;const s=r.toFontString(),o=be.measureFont(s);o.fontSize===0&&(o.fontSize=r.fontSize,o.ascent=r.fontSize);const l=i.getContext("2d",Yc);l.font=s;const h=(n?be.wordWrap(e,r,i):e).split(/(?:\r\n|\r|\n)/),c=new Array(h.length);let f=0;for(let _=0;_<h.length;_++){const E=be._measureText(h[_],r.letterSpacing,l);c[_]=E,f=Math.max(f,E)}let m=f+r.strokeThickness;r.dropShadow&&(m+=r.dropShadowDistance);const p=r.lineHeight||o.fontSize+r.strokeThickness;let v=Math.max(p,o.fontSize+r.strokeThickness*2)+r.leading+(h.length-1)*(p+r.leading);return r.dropShadow&&(v+=r.dropShadowDistance),new be(e,r,m,v,h,c,p+r.leading,f,o)}static _measureText(e,r,n){let i=!1;be.experimentalLetterSpacingSupported&&(be.experimentalLetterSpacing?(n.letterSpacing=`${r}px`,n.textLetterSpacing=`${r}px`,i=!0):(n.letterSpacing="0px",n.textLetterSpacing="0px"));let s=n.measureText(e).width;return s>0&&(i?s-=r:s+=(be.graphemeSegmenter(e).length-1)*r),s}static wordWrap(e,r,n=be._canvas){const i=n.getContext("2d",Yc);let s=0,o="",l="";const h=Object.create(null),{letterSpacing:c,whiteSpace:f}=r,m=be.collapseSpaces(f),p=be.collapseNewlines(f);let v=!m;const _=r.wordWrapWidth+c,E=be.tokenize(e);for(let T=0;T<E.length;T++){let S=E[T];if(be.isNewline(S)){if(!p){l+=be.addLine(o),v=!m,o="",s=0;continue}S=" "}if(m){const x=be.isBreakingSpace(S),A=be.isBreakingSpace(o[o.length-1]);if(x&&A)continue}const b=be.getFromCache(S,c,h,i);if(b>_)if(o!==""&&(l+=be.addLine(o),o="",s=0),be.canBreakWords(S,r.breakWords)){const x=be.wordWrapSplit(S);for(let A=0;A<x.length;A++){let R=x[A],L=R,N=1;for(;x[A+N];){const q=x[A+N];if(!be.canBreakChars(L,q,S,A,r.breakWords))R+=q;else break;L=q,N++}A+=N-1;const D=be.getFromCache(R,c,h,i);D+s>_&&(l+=be.addLine(o),v=!1,o="",s=0),o+=R,s+=D}}else{o.length>0&&(l+=be.addLine(o),o="",s=0);const x=T===E.length-1;l+=be.addLine(S,!x),v=!1,o="",s=0}else b+s>_&&(v=!1,l+=be.addLine(o),o="",s=0),(o.length>0||!be.isBreakingSpace(S)||v)&&(o+=S,s+=b)}return l+=be.addLine(o,!1),l}static addLine(e,r=!0){return e=be.trimRight(e),e=r?`${e}
566
- `:e,e}static getFromCache(e,r,n,i){let s=n[e];return typeof s!="number"&&(s=be._measureText(e,r,i)+r,n[e]=s),s}static collapseSpaces(e){return e==="normal"||e==="pre-line"}static collapseNewlines(e){return e==="normal"}static trimRight(e){if(typeof e!="string")return"";for(let r=e.length-1;r>=0;r--){const n=e[r];if(!be.isBreakingSpace(n))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:be._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,r){return typeof e!="string"?!1:be._breakingSpaces.includes(e.charCodeAt(0))}static tokenize(e){const r=[];let n="";if(typeof e!="string")return r;for(let i=0;i<e.length;i++){const s=e[i],o=e[i+1];if(be.isBreakingSpace(s,o)||be.isNewline(s)){n!==""&&(r.push(n),n=""),r.push(s);continue}n+=s}return n!==""&&r.push(n),r}static canBreakWords(e,r){return r}static canBreakChars(e,r,n,i,s){return!0}static wordWrapSplit(e){return be.graphemeSegmenter(e)}static measureFont(e){if(be._fonts[e])return be._fonts[e];const r={ascent:0,descent:0,fontSize:0},n=be._canvas,i=be._context;i.font=e;const s=be.METRICS_STRING+be.BASELINE_SYMBOL,o=Math.ceil(i.measureText(s).width);let l=Math.ceil(i.measureText(be.BASELINE_SYMBOL).width);const h=Math.ceil(be.HEIGHT_MULTIPLIER*l);if(l=l*be.BASELINE_MULTIPLIER|0,o===0||h===0)return be._fonts[e]=r,r;n.width=o,n.height=h,i.fillStyle="#f00",i.fillRect(0,0,o,h),i.font=e,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(s,0,l);const c=i.getImageData(0,0,o,h).data,f=c.length,m=o*4;let p=0,v=0,_=!1;for(p=0;p<l;++p){for(let E=0;E<m;E+=4)if(c[v+E]!==255){_=!0;break}if(!_)v+=m;else break}for(r.ascent=l-p,v=f-m,_=!1,p=h;p>l;--p){for(let E=0;E<m;E+=4)if(c[v+E]!==255){_=!0;break}if(!_)v-=m;else break}return r.descent=p-l,r.fontSize=r.ascent+r.descent,be._fonts[e]=r,r}static clearMetrics(e=""){e?delete be._fonts[e]:be._fonts={}}static get _canvas(){var e;if(!be.__canvas){let r;try{const n=new OffscreenCanvas(0,0);if((e=n.getContext("2d",Yc))!=null&&e.measureText)return be.__canvas=n,n;r=he.ADAPTER.createCanvas()}catch{r=he.ADAPTER.createCanvas()}r.width=r.height=10,be.__canvas=r}return be.__canvas}static get _context(){return be.__context||(be.__context=be._canvas.getContext("2d",Yc)),be.__context}};di.METRICS_STRING="|ÉqÅ",di.BASELINE_SYMBOL="M",di.BASELINE_MULTIPLIER=1.4,di.HEIGHT_MULTIPLIER=2,di.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const t=new Intl.Segmenter;return e=>[...t.segment(e)].map(r=>r.segment)}return t=>[...t]})(),di.experimentalLetterSpacing=!1,di._fonts={},di._newlines=[10,13],di._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];let _n=di;const sD=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],xC=class hu{constructor(e){this.styleID=0,this.reset(),Hg(this,e,e)}clone(){const e={};return Hg(e,this,hu.defaultStyle),new hu(e)}reset(){Hg(this,hu.defaultStyle,hu.defaultStyle)}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(e){const r=Gg(e);this._dropShadowColor!==r&&(this._dropShadowColor=r,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)}get fill(){return this._fill}set fill(e){const r=Gg(e);this._fill!==r&&(this._fill=r,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(e){oD(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.styleID++)}get lineHeight(){return this._lineHeight}set lineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.styleID++)}get leading(){return this._leading}set leading(e){this._leading!==e&&(this._leading=e,this.styleID++)}get lineJoin(){return this._lineJoin}set lineJoin(e){this._lineJoin!==e&&(this._lineJoin=e,this.styleID++)}get miterLimit(){return this._miterLimit}set miterLimit(e){this._miterLimit!==e&&(this._miterLimit=e,this.styleID++)}get padding(){return this._padding}set padding(e){this._padding!==e&&(this._padding=e,this.styleID++)}get stroke(){return this._stroke}set stroke(e){const r=Gg(e);this._stroke!==r&&(this._stroke=r,this.styleID++)}get strokeThickness(){return this._strokeThickness}set strokeThickness(e){this._strokeThickness!==e&&(this._strokeThickness=e,this.styleID++)}get textBaseline(){return this._textBaseline}set textBaseline(e){this._textBaseline!==e&&(this._textBaseline=e,this.styleID++)}get trim(){return this._trim}set trim(e){this._trim!==e&&(this._trim=e,this.styleID++)}get whiteSpace(){return this._whiteSpace}set whiteSpace(e){this._whiteSpace!==e&&(this._whiteSpace=e,this.styleID++)}get wordWrap(){return this._wordWrap}set wordWrap(e){this._wordWrap!==e&&(this._wordWrap=e,this.styleID++)}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(e){this._wordWrapWidth!==e&&(this._wordWrapWidth=e,this.styleID++)}toFontString(){const e=typeof this.fontSize=="number"?`${this.fontSize}px`:this.fontSize;let r=this.fontFamily;Array.isArray(this.fontFamily)||(r=this.fontFamily.split(","));for(let n=r.length-1;n>=0;n--){let i=r[n].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&!sD.includes(i)&&(i=`"${i}"`),r[n]=i}return`${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${e} ${r.join(",")}`}};xC.defaultStyle={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:up.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};let Or=xC;function Gg(t){const e=tt.shared,r=n=>{const i=e.setValue(n);return i.alpha===1?i.toHex():i.toRgbaString()};return Array.isArray(t)?t.map(r):r(t)}function oD(t,e){if(!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0}function Hg(t,e,r){for(const n in r)Array.isArray(e[n])?t[n]=e[n].slice():t[n]=e[n]}const aD={texture:!0,children:!1,baseTexture:!0},wC=class kv extends ki{constructor(e,r,n){let i=!1;n||(n=he.ADAPTER.createCanvas(),i=!0),n.width=3,n.height=3;const s=se.from(n);s.orig=new De,s.trim=new De,super(s),this._ownCanvas=i,this.canvas=n,this.context=n.getContext("2d",{willReadFrequently:!0}),this._resolution=kv.defaultResolution??he.RESOLUTION,this._autoResolution=kv.defaultAutoResolution,this._text=null,this._style=null,this._styleListener=null,this._font="",this.text=e,this.style=r,this.localStyleID=-1}static get experimentalLetterSpacing(){return _n.experimentalLetterSpacing}static set experimentalLetterSpacing(e){Ue("7.1.0","Text.experimentalLetterSpacing is deprecated, use TextMetrics.experimentalLetterSpacing"),_n.experimentalLetterSpacing=e}updateText(e){const r=this._style;if(this.localStyleID!==r.styleID&&(this.dirty=!0,this.localStyleID=r.styleID),!this.dirty&&e)return;this._font=this._style.toFontString();const n=this.context,i=_n.measureText(this._text||" ",this._style,this._style.wordWrap,this.canvas),s=i.width,o=i.height,l=i.lines,h=i.lineHeight,c=i.lineWidths,f=i.maxLineWidth,m=i.fontProperties;this.canvas.width=Math.ceil(Math.ceil(Math.max(1,s)+r.padding*2)*this._resolution),this.canvas.height=Math.ceil(Math.ceil(Math.max(1,o)+r.padding*2)*this._resolution),n.scale(this._resolution,this._resolution),n.clearRect(0,0,this.canvas.width,this.canvas.height),n.font=this._font,n.lineWidth=r.strokeThickness,n.textBaseline=r.textBaseline,n.lineJoin=r.lineJoin,n.miterLimit=r.miterLimit;let p,v;const _=r.dropShadow?2:1;for(let E=0;E<_;++E){const T=r.dropShadow&&E===0,S=T?Math.ceil(Math.max(1,o)+r.padding*2):0,b=S*this._resolution;if(T){n.fillStyle="black",n.strokeStyle="black";const A=r.dropShadowColor,R=r.dropShadowBlur*this._resolution,L=r.dropShadowDistance*this._resolution;n.shadowColor=tt.shared.setValue(A).setAlpha(r.dropShadowAlpha).toRgbaString(),n.shadowBlur=R,n.shadowOffsetX=Math.cos(r.dropShadowAngle)*L,n.shadowOffsetY=Math.sin(r.dropShadowAngle)*L+b}else n.fillStyle=this._generateFillStyle(r,l,i),n.strokeStyle=r.stroke,n.shadowColor="black",n.shadowBlur=0,n.shadowOffsetX=0,n.shadowOffsetY=0;let x=(h-m.fontSize)/2;h-m.fontSize<0&&(x=0);for(let A=0;A<l.length;A++)p=r.strokeThickness/2,v=r.strokeThickness/2+A*h+m.ascent+x,r.align==="right"?p+=f-c[A]:r.align==="center"&&(p+=(f-c[A])/2),r.stroke&&r.strokeThickness&&this.drawLetterSpacing(l[A],p+r.padding,v+r.padding-S,!0),r.fill&&this.drawLetterSpacing(l[A],p+r.padding,v+r.padding-S)}this.updateTexture()}drawLetterSpacing(e,r,n,i=!1){const s=this._style.letterSpacing;let o=!1;if(_n.experimentalLetterSpacingSupported&&(_n.experimentalLetterSpacing?(this.context.letterSpacing=`${s}px`,this.context.textLetterSpacing=`${s}px`,o=!0):(this.context.letterSpacing="0px",this.context.textLetterSpacing="0px")),s===0||o){i?this.context.strokeText(e,r,n):this.context.fillText(e,r,n);return}let l=r;const h=_n.graphemeSegmenter(e);let c=this.context.measureText(e).width,f=0;for(let m=0;m<h.length;++m){const p=h[m];i?this.context.strokeText(p,l,n):this.context.fillText(p,l,n);let v="";for(let _=m+1;_<h.length;++_)v+=h[_];f=this.context.measureText(v).width,l+=c-f+s,c=f}}updateTexture(){const e=this.canvas;if(this._style.trim){const o=F4(e);o.data&&(e.width=o.width,e.height=o.height,this.context.putImageData(o.data,0,0))}const r=this._texture,n=this._style,i=n.trim?0:n.padding,s=r.baseTexture;r.trim.width=r._frame.width=e.width/this._resolution,r.trim.height=r._frame.height=e.height/this._resolution,r.trim.x=-i,r.trim.y=-i,r.orig.width=r._frame.width-i*2,r.orig.height=r._frame.height-i*2,this._onTextureUpdate(),s.setRealSize(e.width,e.height,this._resolution),r.updateUvs(),this.dirty=!1}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._render(e)}updateTransform(){this.updateText(!0),super.updateTransform()}getBounds(e,r){return this.updateText(!0),this._textureID===-1&&(e=!1),super.getBounds(e,r)}getLocalBounds(e){return this.updateText(!0),super.getLocalBounds.call(this,e)}_calculateBounds(){this.calculateVertices(),this._bounds.addQuad(this.vertexData)}_generateFillStyle(e,r,n){const i=e.fill;if(Array.isArray(i)){if(i.length===1)return i[0]}else return i;let s;const o=e.dropShadow?e.dropShadowDistance:0,l=e.padding||0,h=this.canvas.width/this._resolution-o-l*2,c=this.canvas.height/this._resolution-o-l*2,f=i.slice(),m=e.fillGradientStops.slice();if(!m.length){const p=f.length+1;for(let v=1;v<p;++v)m.push(v/p)}if(f.unshift(i[0]),m.unshift(0),f.push(i[i.length-1]),m.push(1),e.fillGradientType===up.LINEAR_VERTICAL){s=this.context.createLinearGradient(h/2,l,h/2,c+l);const p=n.fontProperties.fontSize+e.strokeThickness;for(let v=0;v<r.length;v++){const _=n.lineHeight*(v-1)+p,E=n.lineHeight*v;let T=E;v>0&&_>E&&(T=(E+_)/2);const S=E+p,b=n.lineHeight*(v+1);let x=S;v+1<r.length&&b<S&&(x=(S+b)/2);const A=(x-T)/c;for(let R=0;R<f.length;R++){let L=0;typeof m[R]=="number"?L=m[R]:L=R/f.length;let N=Math.min(1,Math.max(0,T/c+L*A));N=Number(N.toFixed(5)),s.addColorStop(N,f[R])}}}else{s=this.context.createLinearGradient(l,c/2,h+l,c/2);const p=f.length+1;let v=1;for(let _=0;_<f.length;_++){let E;typeof m[_]=="number"?E=m[_]:E=v/p,s.addColorStop(E,f[_]),v++}}return s}destroy(e){typeof e=="boolean"&&(e={children:e}),e=Object.assign({},aD,e),super.destroy(e),this._ownCanvas&&(this.canvas.height=this.canvas.width=0),this.context=null,this.canvas=null,this._style=null}get width(){return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width}set width(e){this.updateText(!0);const r=Ds(this.scale.x)||1;this.scale.x=r*e/this._texture.orig.width,this._width=e}get height(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height}set height(e){this.updateText(!0);const r=Ds(this.scale.y)||1;this.scale.y=r*e/this._texture.orig.height,this._height=e}get style(){return this._style}set style(e){e=e||{},e instanceof Or?this._style=e:this._style=new Or(e),this.localStyleID=-1,this.dirty=!0}get text(){return this._text}set text(e){e=String(e??""),this._text!==e&&(this._text=e,this.dirty=!0)}get resolution(){return this._resolution}set resolution(e){this._autoResolution=!1,this._resolution!==e&&(this._resolution=e,this.dirty=!0)}};wC.defaultAutoResolution=!0;let u_=wC;class Ef{constructor(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}}class Dd{static test(e){return typeof e=="string"&&e.startsWith("info face=")}static parse(e){const r=e.match(/^[a-z]+\s+.+$/gm),n={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(const s in r){const o=r[s].match(/^[a-z]+/gm)[0],l=r[s].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),h={};for(const c in l){const f=l[c].split("="),m=f[0],p=f[1].replace(/"/gm,""),v=parseFloat(p),_=isNaN(v)?p:v;h[m]=_}n[o].push(h)}const i=new Ef;return n.info.forEach(s=>i.info.push({face:s.face,size:parseInt(s.size,10)})),n.common.forEach(s=>i.common.push({lineHeight:parseInt(s.lineHeight,10)})),n.page.forEach(s=>i.page.push({id:parseInt(s.id,10),file:s.file})),n.char.forEach(s=>i.char.push({id:parseInt(s.id,10),page:parseInt(s.page,10),x:parseInt(s.x,10),y:parseInt(s.y,10),width:parseInt(s.width,10),height:parseInt(s.height,10),xoffset:parseInt(s.xoffset,10),yoffset:parseInt(s.yoffset,10),xadvance:parseInt(s.xadvance,10)})),n.kerning.forEach(s=>i.kerning.push({first:parseInt(s.first,10),second:parseInt(s.second,10),amount:parseInt(s.amount,10)})),n.distanceField.forEach(s=>i.distanceField.push({distanceRange:parseInt(s.distanceRange,10),fieldType:s.fieldType})),i}}class Nv{static test(e){const r=e;return typeof e!="string"&&"getElementsByTagName"in e&&r.getElementsByTagName("page").length&&r.getElementsByTagName("info")[0].getAttribute("face")!==null}static parse(e){const r=new Ef,n=e.getElementsByTagName("info"),i=e.getElementsByTagName("common"),s=e.getElementsByTagName("page"),o=e.getElementsByTagName("char"),l=e.getElementsByTagName("kerning"),h=e.getElementsByTagName("distanceField");for(let c=0;c<n.length;c++)r.info.push({face:n[c].getAttribute("face"),size:parseInt(n[c].getAttribute("size"),10)});for(let c=0;c<i.length;c++)r.common.push({lineHeight:parseInt(i[c].getAttribute("lineHeight"),10)});for(let c=0;c<s.length;c++)r.page.push({id:parseInt(s[c].getAttribute("id"),10)||0,file:s[c].getAttribute("file")});for(let c=0;c<o.length;c++){const f=o[c];r.char.push({id:parseInt(f.getAttribute("id"),10),page:parseInt(f.getAttribute("page"),10)||0,x:parseInt(f.getAttribute("x"),10),y:parseInt(f.getAttribute("y"),10),width:parseInt(f.getAttribute("width"),10),height:parseInt(f.getAttribute("height"),10),xoffset:parseInt(f.getAttribute("xoffset"),10),yoffset:parseInt(f.getAttribute("yoffset"),10),xadvance:parseInt(f.getAttribute("xadvance"),10)})}for(let c=0;c<l.length;c++)r.kerning.push({first:parseInt(l[c].getAttribute("first"),10),second:parseInt(l[c].getAttribute("second"),10),amount:parseInt(l[c].getAttribute("amount"),10)});for(let c=0;c<h.length;c++)r.distanceField.push({fieldType:h[c].getAttribute("fieldType"),distanceRange:parseInt(h[c].getAttribute("distanceRange"),10)});return r}}class Dv{static test(e){return typeof e=="string"&&e.includes("<font>")?Nv.test(he.ADAPTER.parseXML(e)):!1}static parse(e){return Nv.parse(he.ADAPTER.parseXML(e))}}const jg=[Dd,Nv,Dv];function lD(t){for(let e=0;e<jg.length;e++)if(jg[e].test(t))return jg[e];return null}function uD(t,e,r,n,i,s){const o=r.fill;if(Array.isArray(o)){if(o.length===1)return o[0]}else return o;let l;const h=r.dropShadow?r.dropShadowDistance:0,c=r.padding||0,f=t.width/n-h-c*2,m=t.height/n-h-c*2,p=o.slice(),v=r.fillGradientStops.slice();if(!v.length){const _=p.length+1;for(let E=1;E<_;++E)v.push(E/_)}if(p.unshift(o[0]),v.unshift(0),p.push(o[o.length-1]),v.push(1),r.fillGradientType===up.LINEAR_VERTICAL){l=e.createLinearGradient(f/2,c,f/2,m+c);let _=0;const E=(s.fontProperties.fontSize+r.strokeThickness)/m;for(let T=0;T<i.length;T++){const S=s.lineHeight*T;for(let b=0;b<p.length;b++){let x=0;typeof v[b]=="number"?x=v[b]:x=b/p.length;const A=S/m+x*E;let R=Math.max(_,A);R=Math.min(R,1),l.addColorStop(R,p[b]),_=R}}}else{l=e.createLinearGradient(c,m/2,f+c,m/2);const _=p.length+1;let E=1;for(let T=0;T<p.length;T++){let S;typeof v[T]=="number"?S=v[T]:S=E/_,l.addColorStop(S,p[T]),E++}}return l}function hD(t,e,r,n,i,s,o){const l=r.text,h=r.fontProperties;e.translate(n,i),e.scale(s,s);const c=o.strokeThickness/2,f=-(o.strokeThickness/2);if(e.font=o.toFontString(),e.lineWidth=o.strokeThickness,e.textBaseline=o.textBaseline,e.lineJoin=o.lineJoin,e.miterLimit=o.miterLimit,e.fillStyle=uD(t,e,o,s,[l],r),e.strokeStyle=o.stroke,o.dropShadow){const m=o.dropShadowColor,p=o.dropShadowBlur*s,v=o.dropShadowDistance*s;e.shadowColor=tt.shared.setValue(m).setAlpha(o.dropShadowAlpha).toRgbaString(),e.shadowBlur=p,e.shadowOffsetX=Math.cos(o.dropShadowAngle)*v,e.shadowOffsetY=Math.sin(o.dropShadowAngle)*v}else e.shadowColor="black",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0;o.stroke&&o.strokeThickness&&e.strokeText(l,c,f+r.lineHeight-h.descent),o.fill&&e.fillText(l,c,f+r.lineHeight-h.descent),e.setTransform(1,0,0,1,0,0),e.fillStyle="rgba(0, 0, 0, 0)"}function Od(t){return t.codePointAt?t.codePointAt(0):t.charCodeAt(0)}function EC(t){return Array.from?Array.from(t):t.split("")}function cD(t){typeof t=="string"&&(t=[t]);const e=[];for(let r=0,n=t.length;r<n;r++){const i=t[r];if(Array.isArray(i)){if(i.length!==2)throw new Error(`[BitmapFont]: Invalid character range length, expecting 2 got ${i.length}.`);const s=i[0].charCodeAt(0),o=i[1].charCodeAt(0);if(o<s)throw new Error("[BitmapFont]: Invalid character range.");for(let l=s,h=o;l<=h;l++)e.push(String.fromCharCode(l))}else e.push(...EC(i))}if(e.length===0)throw new Error("[BitmapFont]: Empty set when resolving characters.");return e}const bs=class fi{constructor(e,r,n){var f;const[i]=e.info,[s]=e.common,[o]=e.page,[l]=e.distanceField,h=ns(o.file),c={};this._ownsTextures=n,this.font=i.face,this.size=i.size,this.lineHeight=s.lineHeight/h,this.chars={},this.pageTextures=c;for(let m=0;m<e.page.length;m++){const{id:p,file:v}=e.page[m];c[p]=r instanceof Array?r[m]:r[v],l!=null&&l.fieldType&&l.fieldType!=="none"&&(c[p].baseTexture.alphaMode=Br.NO_PREMULTIPLIED_ALPHA,c[p].baseTexture.mipmap=Pi.OFF)}for(let m=0;m<e.char.length;m++){const{id:p,page:v}=e.char[m];let{x:_,y:E,width:T,height:S,xoffset:b,yoffset:x,xadvance:A}=e.char[m];_/=h,E/=h,T/=h,S/=h,b/=h,x/=h,A/=h;const R=new De(_+c[v].frame.x/h,E+c[v].frame.y/h,T,S);this.chars[p]={xOffset:b,yOffset:x,xAdvance:A,kerning:{},texture:new se(c[v].baseTexture,R),page:v}}for(let m=0;m<e.kerning.length;m++){let{first:p,second:v,amount:_}=e.kerning[m];p/=h,v/=h,_/=h,this.chars[v]&&(this.chars[v].kerning[p]=_)}this.distanceFieldRange=l==null?void 0:l.distanceRange,this.distanceFieldType=((f=l==null?void 0:l.fieldType)==null?void 0:f.toLowerCase())??"none"}destroy(){for(const e in this.chars)this.chars[e].texture.destroy(),this.chars[e].texture=null;for(const e in this.pageTextures)this._ownsTextures&&this.pageTextures[e].destroy(!0),this.pageTextures[e]=null;this.chars=null,this.pageTextures=null}static install(e,r,n){let i;if(e instanceof Ef)i=e;else{const o=lD(e);if(!o)throw new Error("Unrecognized data format for font.");i=o.parse(e)}r instanceof se&&(r=[r]);const s=new fi(i,r,n);return fi.available[s.font]=s,s}static uninstall(e){const r=fi.available[e];if(!r)throw new Error(`No font found named '${e}'`);r.destroy(),delete fi.available[e]}static from(e,r,n){if(!e)throw new Error("[BitmapFont] Property `name` is required.");const{chars:i,padding:s,resolution:o,textureWidth:l,textureHeight:h,...c}=Object.assign({},fi.defaultOptions,n),f=cD(i),m=r instanceof Or?r:new Or(r),p=l,v=new Ef;v.info[0]={face:m.fontFamily,size:m.fontSize},v.common[0]={lineHeight:m.fontSize};let _=0,E=0,T,S,b,x=0;const A=[];for(let L=0;L<f.length;L++){T||(T=he.ADAPTER.createCanvas(),T.width=l,T.height=h,S=T.getContext("2d"),b=new Ne(T,{resolution:o,...c}),A.push(new se(b)),v.page.push({id:A.length-1,file:""}));const N=f[L],D=_n.measureText(N,m,!1,T),q=D.width,$=Math.ceil(D.height),me=Math.ceil((m.fontStyle==="italic"?2:1)*q);if(E>=h-$*o){if(E===0)throw new Error(`[BitmapFont] textureHeight ${h}px is too small (fontFamily: '${m.fontFamily}', fontSize: ${m.fontSize}px, char: '${N}')`);--L,T=null,S=null,b=null,E=0,_=0,x=0;continue}if(x=Math.max($+D.fontProperties.descent,x),me*o+_>=p){if(_===0)throw new Error(`[BitmapFont] textureWidth ${l}px is too small (fontFamily: '${m.fontFamily}', fontSize: ${m.fontSize}px, char: '${N}')`);--L,E+=x*o,E=Math.ceil(E),_=0,x=0;continue}hD(T,S,D,_,E,o,m);const ne=Od(D.text);v.char.push({id:ne,page:A.length-1,x:_/o,y:E/o,width:me,height:$,xoffset:0,yoffset:0,xadvance:q-(m.dropShadow?m.dropShadowDistance:0)-(m.stroke?m.strokeThickness:0)}),_+=(me+2*s)*o,_=Math.ceil(_)}if(!(n!=null&&n.skipKerning))for(let L=0,N=f.length;L<N;L++){const D=f[L];for(let q=0;q<N;q++){const $=f[q],me=S.measureText(D).width,ne=S.measureText($).width,B=S.measureText(D+$).width-(me+ne);B&&v.kerning.push({first:Od(D),second:Od($),amount:B})}}const R=new fi(v,A,!0);return fi.available[e]!==void 0&&fi.uninstall(e),fi.available[e]=R,R}};bs.ALPHA=[["a","z"],["A","Z"]," "],bs.NUMERIC=[["0","9"]],bs.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],bs.ASCII=[[" ","~"]],bs.defaultOptions={resolution:1,textureWidth:512,textureHeight:512,padding:4,chars:bs.ALPHANUMERIC},bs.available={};let Ts=bs;class dD{constructor(e,r){this.uvBuffer=e,this.uvMatrix=r,this.data=null,this._bufferUpdateId=-1,this._textureUpdateId=-1,this._updateID=0}update(e){if(!e&&this._bufferUpdateId===this.uvBuffer._updateID&&this._textureUpdateId===this.uvMatrix._updateID)return;this._bufferUpdateId=this.uvBuffer._updateID,this._textureUpdateId=this.uvMatrix._updateID;const r=this.uvBuffer.data;(!this.data||this.data.length!==r.length)&&(this.data=new Float32Array(r.length)),this.uvMatrix.multiplyUvs(r,this.data),this._updateID++}}const $g=new Ge,AE=new Fo,SC=class bC extends Tr{constructor(e,r,n,i=$n.TRIANGLES){super(),this.geometry=e,this.shader=r,this.state=n||Mi.for2d(),this.drawMode=i,this.start=0,this.size=0,this.uvs=null,this.indices=null,this.vertexData=new Float32Array(1),this.vertexDirty=-1,this._transformID=-1,this._roundPixels=he.ROUND_PIXELS,this.batchUvs=null}get geometry(){return this._geometry}set geometry(e){this._geometry!==e&&(this._geometry&&(this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose()),this._geometry=e,this._geometry&&this._geometry.refCount++,this.vertexDirty=-1)}get uvBuffer(){return this.geometry.buffers[1]}get verticesBuffer(){return this.geometry.buffers[0]}set material(e){this.shader=e}get material(){return this.shader}set blendMode(e){this.state.blendMode=e}get blendMode(){return this.state.blendMode}set roundPixels(e){this._roundPixels!==e&&(this._transformID=-1),this._roundPixels=e}get roundPixels(){return this._roundPixels}get tint(){return"tint"in this.shader?this.shader.tint:null}set tint(e){this.shader.tint=e}get tintValue(){return this.shader.tintValue}get texture(){return"texture"in this.shader?this.shader.texture:null}set texture(e){this.shader.texture=e}_render(e){const r=this.geometry.buffers[0].data;this.shader.batchable&&this.drawMode===$n.TRIANGLES&&r.length<bC.BATCHABLE_SIZE*2?this._renderToBatch(e):this._renderDefault(e)}_renderDefault(e){const r=this.shader;r.alpha=this.worldAlpha,r.update&&r.update(),e.batch.flush(),r.uniforms.translationMatrix=this.transform.worldTransform.toArray(!0),e.shader.bind(r),e.state.set(this.state),e.geometry.bind(this.geometry,r),e.geometry.draw(this.drawMode,this.size,this.start,this.geometry.instanceCount)}_renderToBatch(e){const r=this.geometry,n=this.shader;n.uvMatrix&&(n.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=r.indexBuffer.data,this._tintRGB=n._tintRGB,this._texture=n.texture;const i=this.material.pluginName;e.batch.setObjectRenderer(e.plugins[i]),e.plugins[i].render(this)}calculateVertices(){const e=this.geometry.buffers[0],r=e.data,n=e._updateID;if(n===this.vertexDirty&&this._transformID===this.transform._worldID)return;this._transformID=this.transform._worldID,this.vertexData.length!==r.length&&(this.vertexData=new Float32Array(r.length));const i=this.transform.worldTransform,s=i.a,o=i.b,l=i.c,h=i.d,c=i.tx,f=i.ty,m=this.vertexData;for(let p=0;p<m.length/2;p++){const v=r[p*2],_=r[p*2+1];m[p*2]=s*v+l*_+c,m[p*2+1]=o*v+h*_+f}if(this._roundPixels){const p=he.RESOLUTION;for(let v=0;v<m.length;++v)m[v]=Math.round(m[v]*p)/p}this.vertexDirty=n}calculateUvs(){const e=this.geometry.buffers[1],r=this.shader;r.uvMatrix.isSimple?this.uvs=e.data:(this.batchUvs||(this.batchUvs=new dD(e,r.uvMatrix)),this.batchUvs.update(),this.uvs=this.batchUvs.data)}_calculateBounds(){this.calculateVertices(),this._bounds.addVertexData(this.vertexData,0,this.vertexData.length)}containsPoint(e){if(!this.getBounds().contains(e.x,e.y))return!1;this.worldTransform.applyInverse(e,$g);const r=this.geometry.getBuffer("aVertexPosition").data,n=AE.points,i=this.geometry.getIndex().data,s=i.length,o=this.drawMode===4?3:1;for(let l=0;l+2<s;l+=o){const h=i[l]*2,c=i[l+1]*2,f=i[l+2]*2;if(n[0]=r[h],n[1]=r[h+1],n[2]=r[c],n[3]=r[c+1],n[4]=r[f],n[5]=r[f+1],AE.contains($g.x,$g.y))return!0}return!1}destroy(e){super.destroy(e),this._cachedTexture&&(this._cachedTexture.destroy(),this._cachedTexture=null),this.geometry=null,this.shader=null,this.state=null,this.uvs=null,this.indices=null,this.vertexData=null}};SC.BATCHABLE_SIZE=100;let Zu=SC;class hp extends Ys{constructor(e,r,n){super();const i=new It(e),s=new It(r,!0),o=new It(n,!0,!0);this.addAttribute("aVertexPosition",i,2,!1,Ae.FLOAT).addAttribute("aTextureCoord",s,2,!1,Ae.FLOAT).addIndex(o),this._updateId=-1}get vertexDirtyId(){return this.buffers[0]._updateID}}var fD=`varying vec2 vTextureCoord;
565
+ `;const QN=XN,dC=YN;class fC{constructor(e){this.renderer=e}contextChange(e){let r;if(this.renderer.context.webGLVersion===1){const n=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),r=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,n)}else{const n=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),r=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,n)}r>=kt.HIGH?this.multisample=kt.HIGH:r>=kt.MEDIUM?this.multisample=kt.MEDIUM:r>=kt.LOW?this.multisample=kt.LOW:this.multisample=kt.NONE}destroy(){}}fC.extension={type:ae.RendererSystem,name:"_multisample"};we.add(fC);class KN{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class pC{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:r,CONTEXT_UID:n}=this,i=e._glBuffers[n]||this.createGLBuffer(e);r.bindBuffer(e.type,i.buffer)}unbind(e){const{gl:r}=this;r.bindBuffer(e,null)}bindBufferBase(e,r){const{gl:n,CONTEXT_UID:i}=this;if(this.boundBufferBases[r]!==e){const s=e._glBuffers[i]||this.createGLBuffer(e);this.boundBufferBases[r]=e,n.bindBufferBase(n.UNIFORM_BUFFER,r,s.buffer)}}bindBufferRange(e,r,n){const{gl:i,CONTEXT_UID:s}=this;n=n||0;const o=e._glBuffers[s]||this.createGLBuffer(e);i.bindBufferRange(i.UNIFORM_BUFFER,r||0,o.buffer,n*256,256)}update(e){const{gl:r,CONTEXT_UID:n}=this,i=e._glBuffers[n]||this.createGLBuffer(e);if(e._updateID!==i.updateID)if(i.updateID=e._updateID,r.bindBuffer(e.type,i.buffer),i.byteLength>=e.data.byteLength)r.bufferSubData(e.type,0,e.data);else{const s=e.static?r.STATIC_DRAW:r.DYNAMIC_DRAW;i.byteLength=e.data.byteLength,r.bufferData(e.type,e.data,s)}}dispose(e,r){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];const n=e._glBuffers[this.CONTEXT_UID],i=this.gl;e.disposeRunner.remove(this),n&&(r||i.deleteBuffer(n.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){const r=Object.keys(this.managedBuffers);for(let n=0;n<r.length;n++)this.dispose(this.managedBuffers[r[n]],e)}createGLBuffer(e){const{CONTEXT_UID:r,gl:n}=this;return e._glBuffers[r]=new KN(n.createBuffer()),this.managedBuffers[e.id]=e,e.disposeRunner.add(this),e._glBuffers[r]}}pC.extension={type:ae.RendererSystem,name:"buffer"};we.add(pC);class mC{constructor(e){this.renderer=e}render(e,r){const n=this.renderer;let i,s,o,l;if(r&&(i=r.renderTexture,s=r.clear,o=r.transform,l=r.skipUpdateTransform),this.renderingToScreen=!i,n.runners.prerender.emit(),n.emit("prerender"),n.projection.transform=o,!n.context.isLost){if(i||(this.lastObjectRendered=e),!l){const h=e.enableTempParent();e.updateTransform(),e.disableTempParent(h)}n.renderTexture.bind(i),n.batch.currentRenderer.start(),(s??n.background.clearBeforeRender)&&n.renderTexture.clear(),e.render(n),n.batch.currentRenderer.flush(),i&&(r.blit&&n.framebuffer.blit(),i.baseTexture.update()),n.runners.postrender.emit(),n.projection.transform=null,n.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}mC.extension={type:ae.RendererSystem,name:"objectRenderer"};we.add(mC);const kd=class Av extends jN{constructor(e){super(),this.type=qT.WEBGL,e=Object.assign({},he.RENDER_OPTIONS,e),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new Qn({projectionMatrix:new ot},!0);const r={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:Av.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(r),"useContextAlpha"in e&&(Ue("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),e.premultipliedAlpha=e.useContextAlpha&&e.useContextAlpha!=="notMultiplied",e.backgroundAlpha=e.useContextAlpha===!1?1:e.backgroundAlpha),this._plugin.rendererPlugins=Av.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:_4()}render(e,r){this.objectRenderer.render(e,r)}resize(e,r){this._view.resizeView(e,r)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(e=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:e}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(e){this._view.resolution=e,this.runners.resolutionChange.emit(e)}get autoDensity(){return this._view.autoDensity}get view(){return this._view.element}get screen(){return this._view.screen}get lastObjectRendered(){return this.objectRenderer.lastObjectRendered}get renderingToScreen(){return this.objectRenderer.renderingToScreen}get rendererLogId(){return`WebGL ${this.context.webGLVersion}`}get clearBeforeRender(){return Ue("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return Ue("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return Ue("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return Ue("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(e){Ue("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=e}get backgroundAlpha(){return Ue("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(e){Ue("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=e}get powerPreference(){return Ue("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(e,r){return this.textureGenerator.generateTexture(e,r)}};kd.extension={type:ae.Renderer,priority:1},kd.__plugins={},kd.__systems={};let l_=kd;we.handleByMap(ae.RendererPlugin,l_.__plugins);we.handleByMap(ae.RendererSystem,l_.__systems);we.add(l_);class gC extends qu{constructor(e,r){const{width:n,height:i}=r||{};super(n,i),this.items=[],this.itemDirtyIds=[];for(let s=0;s<e;s++){const o=new Ne;this.items.push(o),this.itemDirtyIds.push(-2)}this.length=e,this._load=null,this.baseTexture=null}initFromArray(e,r){for(let n=0;n<this.length;n++)e[n]&&(e[n].castToBaseTexture?this.addBaseTextureAt(e[n].castToBaseTexture(),n):e[n]instanceof qu?this.addResourceAt(e[n],n):this.addResourceAt(OA(e[n],r),n))}dispose(){for(let e=0,r=this.length;e<r;e++)this.items[e].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(e,r){if(!this.items[r])throw new Error(`Index ${r} is out of bounds`);return e.valid&&!this.valid&&this.resize(e.width,e.height),this.items[r].setResource(e),this}bind(e){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");super.bind(e);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=e,this.items[r].on("update",e.update,e)}unbind(e){super.unbind(e);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=null,this.items[r].off("update",e.update,e)}load(){if(this._load)return this._load;const e=this.items.map(r=>r.resource).filter(r=>r).map(r=>r.load());return this._load=Promise.all(e).then(()=>{const{realWidth:r,realHeight:n}=this.items[0];return this.resize(r,n),this.update(),Promise.resolve(this)}),this._load}}class qN extends gC{constructor(e,r){const{width:n,height:i}=r||{};let s,o;Array.isArray(e)?(s=e,o=e.length):o=e,super(o,{width:n,height:i}),s&&this.initFromArray(s,r)}addBaseTextureAt(e,r){if(e.resource)this.addResourceAt(e.resource,r);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(e){super.bind(e),e.target=Qa.TEXTURE_2D_ARRAY}upload(e,r,n){const{length:i,itemDirtyIds:s,items:o}=this,{gl:l}=e;n.dirtyId<0&&l.texImage3D(l.TEXTURE_2D_ARRAY,0,n.internalFormat,this._width,this._height,i,0,r.format,n.type,null);for(let h=0;h<i;h++){const c=o[h];s[h]<c.dirtyId&&(s[h]=c.dirtyId,c.valid&&l.texSubImage3D(l.TEXTURE_2D_ARRAY,0,0,0,h,c.resource.width,c.resource.height,1,r.format,n.type,c.resource.source))}return!0}}class ZN extends is{constructor(e){super(e)}static test(e){const{OffscreenCanvas:r}=globalThis;return r&&e instanceof r?!0:globalThis.HTMLCanvasElement&&e instanceof HTMLCanvasElement}}const yC=class uu extends gC{constructor(e,r){const{width:n,height:i,autoLoad:s,linkBaseTexture:o}=r||{};if(e&&e.length!==uu.SIDES)throw new Error(`Invalid length. Got ${e.length}, expected 6`);super(6,{width:n,height:i});for(let l=0;l<uu.SIDES;l++)this.items[l].target=Qa.TEXTURE_CUBE_MAP_POSITIVE_X+l;this.linkBaseTexture=o!==!1,e&&this.initFromArray(e,r),s!==!1&&this.load()}bind(e){super.bind(e),e.target=Qa.TEXTURE_CUBE_MAP}addBaseTextureAt(e,r,n){if(n===void 0&&(n=this.linkBaseTexture),!this.items[r])throw new Error(`Index ${r} is out of bounds`);if(!this.linkBaseTexture||e.parentTextureArray||Object.keys(e._glTextures).length>0)if(e.resource)this.addResourceAt(e.resource,r);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=Qa.TEXTURE_CUBE_MAP_POSITIVE_X+r,e.parentTextureArray=this.baseTexture,this.items[r]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[r]=e,this}upload(e,r,n){const i=this.itemDirtyIds;for(let s=0;s<uu.SIDES;s++){const o=this.items[s];(i[s]<o.dirtyId||n.dirtyId<r.dirtyId)&&(o.valid&&o.resource?(o.resource.upload(e,o,n),i[s]=o.dirtyId):i[s]<-1&&(e.gl.texImage2D(o.target,0,n.internalFormat,r.realWidth,r.realHeight,0,r.format,n.type,null),i[s]=-1))}return!0}static test(e){return Array.isArray(e)&&e.length===uu.SIDES}};yC.SIDES=6;let JN=yC;class za extends is{constructor(e,r){r=r||{};let n,i,s;typeof e=="string"?(n=za.EMPTY,i=e,s=!0):(n=e,i=null,s=!1),super(n),this.url=i,this.crossOrigin=r.crossOrigin??!0,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this.ownsImageBitmap=r.ownsImageBitmap??s,this._load=null,r.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(async(e,r)=>{if(this.url===null){e(this);return}try{const n=await he.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const i=await n.blob();if(this.destroyed)return;const s=await createImageBitmap(i,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Br.UNPACK?"premultiply":"none"});if(this.destroyed){s.close();return}this.source=s,this.update(),e(this)}catch(n){if(this.destroyed)return;r(n),this.onError.emit(n)}}),this._load)}upload(e,r,n){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),super.upload(e,r,n)):(this.load(),!1)}dispose(){this.ownsImageBitmap&&this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof e=="string"||e instanceof ImageBitmap)}static get EMPTY(){return za._EMPTY=za._EMPTY??he.ADAPTER.createCanvas(0,0),za._EMPTY}}const Cv=class Nd extends is{constructor(e,r){r=r||{},super(he.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=r.scale||1,this._overrideWidth=r.width,this._overrideHeight=r.height,this._resolve=null,this._crossorigin=r.crossorigin,this._load=null,r.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.update(),e(this)},Nd.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const e=new Image;is.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=r=>{this._resolve&&(e.onerror=null,this.onError.emit(r))},e.onload=()=>{if(!this._resolve)return;const r=e.width,n=e.height;if(!r||!n)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let i=r*this.scale,s=n*this.scale;(this._overrideWidth||this._overrideHeight)&&(i=this._overrideWidth||this._overrideHeight/n*r,s=this._overrideHeight||this._overrideWidth/r*n),i=Math.round(i),s=Math.round(s);const o=this.source;o.width=i,o.height=s,o._pixiId=`canvas_${$o()}`,o.getContext("2d").drawImage(e,0,0,r,n,0,0,i,s),this._resolve(),this._resolve=null}}static getSize(e){const r=Nd.SVG_SIZE.exec(e),n={};return r&&(n[r[1]]=Math.round(parseFloat(r[3])),n[r[5]]=Math.round(parseFloat(r[7]))),n}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,r){return r==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&Nd.SVG_XML.test(e)}};Cv.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,Cv.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;let Pv=Cv;class eD extends is{constructor(e){super(e)}static test(e){return!!globalThis.VideoFrame&&e instanceof globalThis.VideoFrame}}const Iv=class Rv extends is{constructor(e,r){if(r=r||{},!(e instanceof HTMLVideoElement)){const n=document.createElement("video");r.autoLoad!==!1&&n.setAttribute("preload","auto"),r.playsinline!==!1&&(n.setAttribute("webkit-playsinline",""),n.setAttribute("playsinline","")),r.muted===!0&&(n.setAttribute("muted",""),n.muted=!0),r.loop===!0&&n.setAttribute("loop",""),r.autoPlay!==!1&&n.setAttribute("autoplay",""),typeof e=="string"&&(e=[e]);const i=e[0].src||e[0];is.crossOrigin(n,i,r.crossorigin);for(let s=0;s<e.length;++s){const o=document.createElement("source");let{src:l,mime:h}=e[s];if(l=l||e[s],l.startsWith("data:"))h=l.slice(5,l.indexOf(";"));else if(!l.startsWith("blob:")){const c=l.split("?").shift().toLowerCase(),f=c.slice(c.lastIndexOf(".")+1);h=h||Rv.MIME_TYPES[f]||`video/${f}`}o.src=l,h&&(o.type=h),n.appendChild(o)}e=n}super(e),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=r.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=r.autoPlay!==!1,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._onError=this._onError.bind(this),this._onPlayStart=this._onPlayStart.bind(this),this._onPlayStop=this._onPlayStop.bind(this),this._onSeeked=this._onSeeked.bind(this),r.autoLoad!==!1&&this.load()}update(e=0){if(!this.destroyed){if(this._updateFPS){const r=Yt.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-r)}(!this._updateFPS||this._msToNextUpdate<=0)&&(super.update(),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}}_videoFrameRequestCallback(){this.update(),this.destroyed?this._videoFrameRequestCallbackHandle=null:this._videoFrameRequestCallbackHandle=this.source.requestVideoFrameCallback(this._videoFrameRequestCallback)}load(){if(this._load)return this._load;const e=this.source;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart),e.addEventListener("pause",this._onPlayStop),e.addEventListener("seeked",this._onSeeked),this._isSourceReady()?this._onCanPlay():(e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlay),e.addEventListener("error",this._onError,!0)),this._load=new Promise((r,n)=>{this.valid?r(this):(this._resolve=r,this._reject=n,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e),this._reject&&(this._reject(e),this._reject=null,this._resolve=null)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const r=this.valid;this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0,!r&&this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._configureAutoUpdate();const e=this.source;e&&(e.removeEventListener("play",this._onPlayStart),e.removeEventListener("pause",this._onPlayStop),e.removeEventListener("seeked",this._onSeeked),e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay),e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.source.requestVideoFrameCallback?(this._isConnectedToTicker&&(Yt.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.source.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(Yt.shared.add(this.update,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(Yt.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(e,r){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||Rv.TYPES.includes(r)}};Iv.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],Iv.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let vC=Iv;gv.push(za,$A,ZN,vC,eD,Pv,np,JN,qN);class wf{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(e){return this.minX>this.maxX||this.minY>this.maxY?De.EMPTY:(e=e||new De(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)}addPoint(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)}addPointMatrix(e,r){const{a:n,b:i,c:s,d:o,tx:l,ty:h}=e,c=n*r.x+s*r.y+l,f=i*r.x+o*r.y+h;this.minX=Math.min(this.minX,c),this.maxX=Math.max(this.maxX,c),this.minY=Math.min(this.minY,f),this.maxY=Math.max(this.maxY,f)}addQuad(e){let r=this.minX,n=this.minY,i=this.maxX,s=this.maxY,o=e[0],l=e[1];r=o<r?o:r,n=l<n?l:n,i=o>i?o:i,s=l>s?l:s,o=e[2],l=e[3],r=o<r?o:r,n=l<n?l:n,i=o>i?o:i,s=l>s?l:s,o=e[4],l=e[5],r=o<r?o:r,n=l<n?l:n,i=o>i?o:i,s=l>s?l:s,o=e[6],l=e[7],r=o<r?o:r,n=l<n?l:n,i=o>i?o:i,s=l>s?l:s,this.minX=r,this.minY=n,this.maxX=i,this.maxY=s}addFrame(e,r,n,i,s){this.addFrameMatrix(e.worldTransform,r,n,i,s)}addFrameMatrix(e,r,n,i,s){const o=e.a,l=e.b,h=e.c,c=e.d,f=e.tx,m=e.ty;let p=this.minX,v=this.minY,_=this.maxX,E=this.maxY,T=o*r+h*n+f,S=l*r+c*n+m;p=T<p?T:p,v=S<v?S:v,_=T>_?T:_,E=S>E?S:E,T=o*i+h*n+f,S=l*i+c*n+m,p=T<p?T:p,v=S<v?S:v,_=T>_?T:_,E=S>E?S:E,T=o*r+h*s+f,S=l*r+c*s+m,p=T<p?T:p,v=S<v?S:v,_=T>_?T:_,E=S>E?S:E,T=o*i+h*s+f,S=l*i+c*s+m,p=T<p?T:p,v=S<v?S:v,_=T>_?T:_,E=S>E?S:E,this.minX=p,this.minY=v,this.maxX=_,this.maxY=E}addVertexData(e,r,n){let i=this.minX,s=this.minY,o=this.maxX,l=this.maxY;for(let h=r;h<n;h+=2){const c=e[h],f=e[h+1];i=c<i?c:i,s=f<s?f:s,o=c>o?c:o,l=f>l?f:l}this.minX=i,this.minY=s,this.maxX=o,this.maxY=l}addVertices(e,r,n,i){this.addVerticesMatrix(e.worldTransform,r,n,i)}addVerticesMatrix(e,r,n,i,s=0,o=s){const l=e.a,h=e.b,c=e.c,f=e.d,m=e.tx,p=e.ty;let v=this.minX,_=this.minY,E=this.maxX,T=this.maxY;for(let S=n;S<i;S+=2){const b=r[S],x=r[S+1],A=l*b+c*x+m,R=f*x+h*b+p;v=Math.min(v,A-s),E=Math.max(E,A+s),_=Math.min(_,R-o),T=Math.max(T,R+o)}this.minX=v,this.minY=_,this.maxX=E,this.maxY=T}addBounds(e){const r=this.minX,n=this.minY,i=this.maxX,s=this.maxY;this.minX=e.minX<r?e.minX:r,this.minY=e.minY<n?e.minY:n,this.maxX=e.maxX>i?e.maxX:i,this.maxY=e.maxY>s?e.maxY:s}addBoundsMask(e,r){const n=e.minX>r.minX?e.minX:r.minX,i=e.minY>r.minY?e.minY:r.minY,s=e.maxX<r.maxX?e.maxX:r.maxX,o=e.maxY<r.maxY?e.maxY:r.maxY;if(n<=s&&i<=o){const l=this.minX,h=this.minY,c=this.maxX,f=this.maxY;this.minX=n<l?n:l,this.minY=i<h?i:h,this.maxX=s>c?s:c,this.maxY=o>f?o:f}}addBoundsMatrix(e,r){this.addFrameMatrix(r,e.minX,e.minY,e.maxX,e.maxY)}addBoundsArea(e,r){const n=e.minX>r.x?e.minX:r.x,i=e.minY>r.y?e.minY:r.y,s=e.maxX<r.x+r.width?e.maxX:r.x+r.width,o=e.maxY<r.y+r.height?e.maxY:r.y+r.height;if(n<=s&&i<=o){const l=this.minX,h=this.minY,c=this.maxX,f=this.maxY;this.minX=n<l?n:l,this.minY=i<h?i:h,this.maxX=s>c?s:c,this.maxY=o>f?o:f}}pad(e=0,r=e){this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=r,this.maxY+=r)}addFramePad(e,r,n,i,s,o){e-=s,r-=o,n+=s,i+=o,this.minX=this.minX<e?this.minX:e,this.maxX=this.maxX>n?this.maxX:n,this.minY=this.minY<r?this.minY:r,this.maxY=this.maxY>i?this.maxY:i}}class ct extends lh{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new ap,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new wf,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(e){const r=Object.keys(e);for(let n=0;n<r.length;++n){const i=r[n];Object.defineProperty(ct.prototype,i,Object.getOwnPropertyDescriptor(e,i))}}get destroyed(){return this._destroyed}_recursivePostUpdateTransform(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)}updateTransform(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha}getBounds(e,r){return e||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),r||(this._boundsRect||(this._boundsRect=new De),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(e){e||(this._localBoundsRect||(this._localBoundsRect=new De),e=this._localBoundsRect),this._localBounds||(this._localBounds=new wf);const r=this.transform,n=this.parent;this.parent=null,this._tempDisplayObjectParent.worldAlpha=(n==null?void 0:n.worldAlpha)??1,this.transform=this._tempDisplayObjectParent.transform;const i=this._bounds,s=this._boundsID;this._bounds=this._localBounds;const o=this.getBounds(!1,e);return this.parent=n,this.transform=r,this._bounds=i,this._bounds.updateID+=this._boundsID-s,o}toGlobal(e,r,n=!1){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(e,r)}toLocal(e,r,n,i){return r&&(e=r.toGlobal(e,n,i)),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(e,n)}setParent(e){if(!e||!e.addChild)throw new Error("setParent: Argument must be a Container");return e.addChild(this),e}removeFromParent(){var e;(e=this.parent)==null||e.removeChild(this)}setTransform(e=0,r=0,n=1,i=1,s=0,o=0,l=0,h=0,c=0){return this.position.x=e,this.position.y=r,this.scale.x=n||1,this.scale.y=i||1,this.rotation=s,this.skew.x=o,this.skew.y=l,this.pivot.x=h,this.pivot.y=c,this}destroy(e){this.removeFromParent(),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.eventMode="auto",this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()}get _tempDisplayObjectParent(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new tD),this.tempDisplayObjectParent}enableTempParent(){const e=this.parent;return this.parent=this._tempDisplayObjectParent,e}disableTempParent(e){this.parent=e}get x(){return this.position.x}set x(e){this.transform.position.x=e}get y(){return this.position.y}set y(e){this.transform.position.y=e}get worldTransform(){return this.transform.worldTransform}get localTransform(){return this.transform.localTransform}get position(){return this.transform.position}set position(e){this.transform.position.copyFrom(e)}get scale(){return this.transform.scale}set scale(e){this.transform.scale.copyFrom(e)}get pivot(){return this.transform.pivot}set pivot(e){this.transform.pivot.copyFrom(e)}get skew(){return this.transform.skew}set skew(e){this.transform.skew.copyFrom(e)}get rotation(){return this.transform.rotation}set rotation(e){this.transform.rotation=e}get angle(){return this.transform.rotation*X4}set angle(e){this.transform.rotation=e*Y4}get zIndex(){return this._zIndex}set zIndex(e){this._zIndex!==e&&(this._zIndex=e,this.parent&&(this.parent.sortDirty=!0))}get worldVisible(){let e=this;do{if(!e.visible)return!1;e=e.parent}while(e);return!0}get mask(){return this._mask}set mask(e){if(this._mask!==e){if(this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount--,r._maskRefCount===0&&(r.renderable=!0,r.isMask=!1))}if(this._mask=e,this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount===0&&(r.renderable=!1,r.isMask=!0),r._maskRefCount++)}}}}class tD extends ct{constructor(){super(...arguments),this.sortDirty=null}}ct.prototype.displayObjectUpdateTransform=ct.prototype.updateTransform;const rD=new ot;function nD(t,e){return t.zIndex===e.zIndex?t._lastSortedIndex-e._lastSortedIndex:t.zIndex-e.zIndex}const _C=class Mv extends ct{constructor(){super(),this.children=[],this.sortableChildren=Mv.defaultSortableChildren,this.sortDirty=!1}onChildrenChange(e){}addChild(...e){if(e.length>1)for(let r=0;r<e.length;r++)this.addChild(e[r]);else{const r=e[0];r.parent&&r.parent.removeChild(r),r.parent=this,this.sortDirty=!0,r.transform._parentID=-1,this.children.push(r),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",r,this,this.children.length-1),r.emit("added",this)}return e[0]}addChildAt(e,r){if(r<0||r>this.children.length)throw new Error(`${e}addChildAt: The index ${r} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(r,0,e),this._boundsID++,this.onChildrenChange(r),e.emit("added",this),this.emit("childAdded",e,this,r),e}swapChildren(e,r){if(e===r)return;const n=this.getChildIndex(e),i=this.getChildIndex(r);this.children[n]=r,this.children[i]=e,this.onChildrenChange(n<i?n:i)}getChildIndex(e){const r=this.children.indexOf(e);if(r===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return r}setChildIndex(e,r){if(r<0||r>=this.children.length)throw new Error(`The index ${r} supplied is out of bounds ${this.children.length}`);const n=this.getChildIndex(e);Za(this.children,n,1),this.children.splice(r,0,e),this.onChildrenChange(r)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let r=0;r<e.length;r++)this.removeChild(e[r]);else{const r=e[0],n=this.children.indexOf(r);if(n===-1)return null;r.parent=null,r.transform._parentID=-1,Za(this.children,n,1),this._boundsID++,this.onChildrenChange(n),r.emit("removed",this),this.emit("childRemoved",r,this,n)}return e[0]}removeChildAt(e){const r=this.getChildAt(e);return r.parent=null,r.transform._parentID=-1,Za(this.children,e,1),this._boundsID++,this.onChildrenChange(e),r.emit("removed",this),this.emit("childRemoved",r,this,e),r}removeChildren(e=0,r=this.children.length){const n=e,i=r,s=i-n;let o;if(s>0&&s<=i){o=this.children.splice(n,s);for(let l=0;l<o.length;++l)o[l].parent=null,o[l].transform&&(o[l].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(let l=0;l<o.length;++l)o[l].emit("removed",this),this.emit("childRemoved",o[l],this,l);return o}else if(s===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")}sortChildren(){let e=!1;for(let r=0,n=this.children.length;r<n;++r){const i=this.children[r];i._lastSortedIndex=r,!e&&i.zIndex!==0&&(e=!0)}e&&this.children.length>1&&this.children.sort(nD),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let e=0,r=this.children.length;e<r;++e){const n=this.children[e];n.visible&&n.updateTransform()}}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(let e=0;e<this.children.length;e++){const r=this.children[e];if(!(!r.visible||!r.renderable))if(r.calculateBounds(),r._mask){const n=r._mask.isMaskData?r._mask.maskObject:r._mask;n?(n.calculateBounds(),this._bounds.addBoundsMask(r._bounds,n._bounds)):this._bounds.addBounds(r._bounds)}else r.filterArea?this._bounds.addBoundsArea(r._bounds,r.filterArea):this._bounds.addBounds(r._bounds)}this._bounds.updateID=this._boundsID}getLocalBounds(e,r=!1){const n=super.getLocalBounds(e);if(!r)for(let i=0,s=this.children.length;i<s;++i){const o=this.children[i];o.visible&&o.updateTransform()}return n}_calculateBounds(){}_renderWithCulling(e){const r=e.renderTexture.sourceFrame;if(!(r.width>0&&r.height>0))return;let n,i;this.cullArea?(n=this.cullArea,i=this.worldTransform):this._render!==Mv.prototype._render&&(n=this.getBounds(!0));const s=e.projection.transform;if(s&&(i?(i=rD.copyFrom(i),i.prepend(s)):i=s),n&&r.intersects(n,i))this._render(e);else if(this.cullArea)return;for(let o=0,l=this.children.length;o<l;++o){const h=this.children[o],c=h.cullable;h.cullable=c||!this.cullArea,h.render(e),h.cullable=c}}render(e){var r;if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||(r=this.filters)!=null&&r.length)this.renderAdvanced(e);else if(this.cullable)this._renderWithCulling(e);else{this._render(e);for(let n=0,i=this.children.length;n<i;++n)this.children[n].render(e)}}renderAdvanced(e){var s,o,l;const r=this.filters,n=this._mask;if(r){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let h=0;h<r.length;h++)r[h].enabled&&this._enabledFilters.push(r[h])}const i=r&&((s=this._enabledFilters)==null?void 0:s.length)||n&&(!n.isMaskData||n.enabled&&(n.autoDetect||n.type!==Bt.NONE));if(i&&e.batch.flush(),r&&((o=this._enabledFilters)!=null&&o.length)&&e.filter.push(this,this._enabledFilters),n&&e.mask.push(this,this._mask),this.cullable)this._renderWithCulling(e);else{this._render(e);for(let h=0,c=this.children.length;h<c;++h)this.children[h].render(e)}i&&e.batch.flush(),n&&e.mask.pop(this),r&&((l=this._enabledFilters)!=null&&l.length)&&e.filter.pop()}_render(e){}destroy(e){super.destroy(),this.sortDirty=!1;const r=typeof e=="boolean"?e:e==null?void 0:e.children,n=this.removeChildren(0,this.children.length);if(r)for(let i=0;i<n.length;++i)n[i].destroy(e)}get width(){return this.scale.x*this.getLocalBounds().width}set width(e){const r=this.getLocalBounds().width;r!==0?this.scale.x=e/r:this.scale.x=1,this._width=e}get height(){return this.scale.y*this.getLocalBounds().height}set height(e){const r=this.getLocalBounds().height;r!==0?this.scale.y=e/r:this.scale.y=1,this._height=e}};_C.defaultSortableChildren=!1;let Tr=_C;Tr.prototype.containerUpdateTransform=Tr.prototype.updateTransform;Object.defineProperties(he,{SORTABLE_CHILDREN:{get(){return Tr.defaultSortableChildren},set(t){Ue("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Tr.defaultSortableChildren=t}}});var up=(t=>(t[t.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",t[t.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",t))(up||{});const eu=new Ge,iD=new Uint16Array([0,1,2,0,2,3]);class ki extends Tr{constructor(e){super(),this._anchor=new Ei(this._onAnchorUpdate,this,e?e.defaultAnchor.x:0,e?e.defaultAnchor.y:0),this._texture=null,this._width=0,this._height=0,this._tintColor=new tt(16777215),this._tintRGB=null,this.tint=16777215,this.blendMode=Re.NORMAL,this._cachedTint=16777215,this.uvs=null,this.texture=e||se.EMPTY,this.vertexData=new Float32Array(8),this.vertexTrimmedData=null,this._transformID=-1,this._textureID=-1,this._transformTrimmedID=-1,this._textureTrimmedID=-1,this.indices=iD,this.pluginName="batch",this.isSprite=!0,this._roundPixels=he.ROUND_PIXELS}_onTextureUpdate(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=Ds(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=Ds(this.scale.y)*this._height/this._texture.orig.height)}_onAnchorUpdate(){this._transformID=-1,this._transformTrimmedID=-1}calculateVertices(){const e=this._texture;if(this._transformID===this.transform._worldID&&this._textureID===e._updateID)return;this._textureID!==e._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=e._updateID;const r=this.transform.worldTransform,n=r.a,i=r.b,s=r.c,o=r.d,l=r.tx,h=r.ty,c=this.vertexData,f=e.trim,m=e.orig,p=this._anchor;let v=0,_=0,E=0,T=0;if(f?(_=f.x-p._x*m.width,v=_+f.width,T=f.y-p._y*m.height,E=T+f.height):(_=-p._x*m.width,v=_+m.width,T=-p._y*m.height,E=T+m.height),c[0]=n*_+s*T+l,c[1]=o*T+i*_+h,c[2]=n*v+s*T+l,c[3]=o*T+i*v+h,c[4]=n*v+s*E+l,c[5]=o*E+i*v+h,c[6]=n*_+s*E+l,c[7]=o*E+i*_+h,this._roundPixels){const S=he.RESOLUTION;for(let b=0;b<c.length;++b)c[b]=Math.round(c[b]*S)/S}}calculateTrimmedVertices(){if(!this.vertexTrimmedData)this.vertexTrimmedData=new Float32Array(8);else if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return;this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;const e=this._texture,r=this.vertexTrimmedData,n=e.orig,i=this._anchor,s=this.transform.worldTransform,o=s.a,l=s.b,h=s.c,c=s.d,f=s.tx,m=s.ty,p=-i._x*n.width,v=p+n.width,_=-i._y*n.height,E=_+n.height;if(r[0]=o*p+h*_+f,r[1]=c*_+l*p+m,r[2]=o*v+h*_+f,r[3]=c*_+l*v+m,r[4]=o*v+h*E+f,r[5]=c*E+l*v+m,r[6]=o*p+h*E+f,r[7]=c*E+l*p+m,this._roundPixels){const T=he.RESOLUTION;for(let S=0;S<r.length;++S)r[S]=Math.round(r[S]*T)/T}}_render(e){this.calculateVertices(),e.batch.setObjectRenderer(e.plugins[this.pluginName]),e.plugins[this.pluginName].render(this)}_calculateBounds(){const e=this._texture.trim,r=this._texture.orig;!e||e.width===r.width&&e.height===r.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))}getLocalBounds(e){return this.children.length===0?(this._localBounds||(this._localBounds=new wf),this._localBounds.minX=this._texture.orig.width*-this._anchor._x,this._localBounds.minY=this._texture.orig.height*-this._anchor._y,this._localBounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._localBounds.maxY=this._texture.orig.height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new De),e=this._localBoundsRect),this._localBounds.getRectangle(e)):super.getLocalBounds.call(this,e)}containsPoint(e){this.worldTransform.applyInverse(e,eu);const r=this._texture.orig.width,n=this._texture.orig.height,i=-r*this.anchor.x;let s=0;return eu.x>=i&&eu.x<i+r&&(s=-n*this.anchor.y,eu.y>=s&&eu.y<s+n)}destroy(e){if(super.destroy(e),this._texture.off("update",this._onTextureUpdate,this),this._anchor=null,typeof e=="boolean"?e:e==null?void 0:e.texture){const r=typeof e=="boolean"?e:e==null?void 0:e.baseTexture;this._texture.destroy(!!r)}this._texture=null}static from(e,r){const n=e instanceof se?e:se.from(e,r);return new ki(n)}set roundPixels(e){this._roundPixels!==e&&(this._transformID=-1,this._transformTrimmedID=-1),this._roundPixels=e}get roundPixels(){return this._roundPixels}get width(){return Math.abs(this.scale.x)*this._texture.orig.width}set width(e){const r=Ds(this.scale.x)||1;this.scale.x=r*e/this._texture.orig.width,this._width=e}get height(){return Math.abs(this.scale.y)*this._texture.orig.height}set height(e){const r=Ds(this.scale.y)||1;this.scale.y=r*e/this._texture.orig.height,this._height=e}get anchor(){return this._anchor}set anchor(e){this._anchor.copyFrom(e)}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e),this._tintRGB=this._tintColor.toLittleEndianNumber()}get tintValue(){return this._tintColor.toNumber()}get texture(){return this._texture}set texture(e){this._texture!==e&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=e||se.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,e&&(e.baseTexture.valid?this._onTextureUpdate():e.once("update",this._onTextureUpdate,this)))}}const Yc={willReadFrequently:!0},di=class be{static get experimentalLetterSpacingSupported(){let e=be._experimentalLetterSpacingSupported;if(e!==void 0){const r=he.ADAPTER.getCanvasRenderingContext2D().prototype;e=be._experimentalLetterSpacingSupported="letterSpacing"in r||"textLetterSpacing"in r}return e}constructor(e,r,n,i,s,o,l,h,c){this.text=e,this.style=r,this.width=n,this.height=i,this.lines=s,this.lineWidths=o,this.lineHeight=l,this.maxLineWidth=h,this.fontProperties=c}static measureText(e,r,n,i=be._canvas){n=n??r.wordWrap;const s=r.toFontString(),o=be.measureFont(s);o.fontSize===0&&(o.fontSize=r.fontSize,o.ascent=r.fontSize);const l=i.getContext("2d",Yc);l.font=s;const h=(n?be.wordWrap(e,r,i):e).split(/(?:\r\n|\r|\n)/),c=new Array(h.length);let f=0;for(let _=0;_<h.length;_++){const E=be._measureText(h[_],r.letterSpacing,l);c[_]=E,f=Math.max(f,E)}let m=f+r.strokeThickness;r.dropShadow&&(m+=r.dropShadowDistance);const p=r.lineHeight||o.fontSize+r.strokeThickness;let v=Math.max(p,o.fontSize+r.strokeThickness*2)+r.leading+(h.length-1)*(p+r.leading);return r.dropShadow&&(v+=r.dropShadowDistance),new be(e,r,m,v,h,c,p+r.leading,f,o)}static _measureText(e,r,n){let i=!1;be.experimentalLetterSpacingSupported&&(be.experimentalLetterSpacing?(n.letterSpacing=`${r}px`,n.textLetterSpacing=`${r}px`,i=!0):(n.letterSpacing="0px",n.textLetterSpacing="0px"));let s=n.measureText(e).width;return s>0&&(i?s-=r:s+=(be.graphemeSegmenter(e).length-1)*r),s}static wordWrap(e,r,n=be._canvas){const i=n.getContext("2d",Yc);let s=0,o="",l="";const h=Object.create(null),{letterSpacing:c,whiteSpace:f}=r,m=be.collapseSpaces(f),p=be.collapseNewlines(f);let v=!m;const _=r.wordWrapWidth+c,E=be.tokenize(e);for(let T=0;T<E.length;T++){let S=E[T];if(be.isNewline(S)){if(!p){l+=be.addLine(o),v=!m,o="",s=0;continue}S=" "}if(m){const x=be.isBreakingSpace(S),A=be.isBreakingSpace(o[o.length-1]);if(x&&A)continue}const b=be.getFromCache(S,c,h,i);if(b>_)if(o!==""&&(l+=be.addLine(o),o="",s=0),be.canBreakWords(S,r.breakWords)){const x=be.wordWrapSplit(S);for(let A=0;A<x.length;A++){let R=x[A],L=R,k=1;for(;x[A+k];){const Q=x[A+k];if(!be.canBreakChars(L,Q,S,A,r.breakWords))R+=Q;else break;L=Q,k++}A+=k-1;const D=be.getFromCache(R,c,h,i);D+s>_&&(l+=be.addLine(o),v=!1,o="",s=0),o+=R,s+=D}}else{o.length>0&&(l+=be.addLine(o),o="",s=0);const x=T===E.length-1;l+=be.addLine(S,!x),v=!1,o="",s=0}else b+s>_&&(v=!1,l+=be.addLine(o),o="",s=0),(o.length>0||!be.isBreakingSpace(S)||v)&&(o+=S,s+=b)}return l+=be.addLine(o,!1),l}static addLine(e,r=!0){return e=be.trimRight(e),e=r?`${e}
566
+ `:e,e}static getFromCache(e,r,n,i){let s=n[e];return typeof s!="number"&&(s=be._measureText(e,r,i)+r,n[e]=s),s}static collapseSpaces(e){return e==="normal"||e==="pre-line"}static collapseNewlines(e){return e==="normal"}static trimRight(e){if(typeof e!="string")return"";for(let r=e.length-1;r>=0;r--){const n=e[r];if(!be.isBreakingSpace(n))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:be._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,r){return typeof e!="string"?!1:be._breakingSpaces.includes(e.charCodeAt(0))}static tokenize(e){const r=[];let n="";if(typeof e!="string")return r;for(let i=0;i<e.length;i++){const s=e[i],o=e[i+1];if(be.isBreakingSpace(s,o)||be.isNewline(s)){n!==""&&(r.push(n),n=""),r.push(s);continue}n+=s}return n!==""&&r.push(n),r}static canBreakWords(e,r){return r}static canBreakChars(e,r,n,i,s){return!0}static wordWrapSplit(e){return be.graphemeSegmenter(e)}static measureFont(e){if(be._fonts[e])return be._fonts[e];const r={ascent:0,descent:0,fontSize:0},n=be._canvas,i=be._context;i.font=e;const s=be.METRICS_STRING+be.BASELINE_SYMBOL,o=Math.ceil(i.measureText(s).width);let l=Math.ceil(i.measureText(be.BASELINE_SYMBOL).width);const h=Math.ceil(be.HEIGHT_MULTIPLIER*l);if(l=l*be.BASELINE_MULTIPLIER|0,o===0||h===0)return be._fonts[e]=r,r;n.width=o,n.height=h,i.fillStyle="#f00",i.fillRect(0,0,o,h),i.font=e,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(s,0,l);const c=i.getImageData(0,0,o,h).data,f=c.length,m=o*4;let p=0,v=0,_=!1;for(p=0;p<l;++p){for(let E=0;E<m;E+=4)if(c[v+E]!==255){_=!0;break}if(!_)v+=m;else break}for(r.ascent=l-p,v=f-m,_=!1,p=h;p>l;--p){for(let E=0;E<m;E+=4)if(c[v+E]!==255){_=!0;break}if(!_)v-=m;else break}return r.descent=p-l,r.fontSize=r.ascent+r.descent,be._fonts[e]=r,r}static clearMetrics(e=""){e?delete be._fonts[e]:be._fonts={}}static get _canvas(){var e;if(!be.__canvas){let r;try{const n=new OffscreenCanvas(0,0);if((e=n.getContext("2d",Yc))!=null&&e.measureText)return be.__canvas=n,n;r=he.ADAPTER.createCanvas()}catch{r=he.ADAPTER.createCanvas()}r.width=r.height=10,be.__canvas=r}return be.__canvas}static get _context(){return be.__context||(be.__context=be._canvas.getContext("2d",Yc)),be.__context}};di.METRICS_STRING="|ÉqÅ",di.BASELINE_SYMBOL="M",di.BASELINE_MULTIPLIER=1.4,di.HEIGHT_MULTIPLIER=2,di.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const t=new Intl.Segmenter;return e=>[...t.segment(e)].map(r=>r.segment)}return t=>[...t]})(),di.experimentalLetterSpacing=!1,di._fonts={},di._newlines=[10,13],di._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];let _n=di;const sD=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],xC=class hu{constructor(e){this.styleID=0,this.reset(),Hg(this,e,e)}clone(){const e={};return Hg(e,this,hu.defaultStyle),new hu(e)}reset(){Hg(this,hu.defaultStyle,hu.defaultStyle)}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(e){const r=Gg(e);this._dropShadowColor!==r&&(this._dropShadowColor=r,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)}get fill(){return this._fill}set fill(e){const r=Gg(e);this._fill!==r&&(this._fill=r,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(e){oD(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.styleID++)}get lineHeight(){return this._lineHeight}set lineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.styleID++)}get leading(){return this._leading}set leading(e){this._leading!==e&&(this._leading=e,this.styleID++)}get lineJoin(){return this._lineJoin}set lineJoin(e){this._lineJoin!==e&&(this._lineJoin=e,this.styleID++)}get miterLimit(){return this._miterLimit}set miterLimit(e){this._miterLimit!==e&&(this._miterLimit=e,this.styleID++)}get padding(){return this._padding}set padding(e){this._padding!==e&&(this._padding=e,this.styleID++)}get stroke(){return this._stroke}set stroke(e){const r=Gg(e);this._stroke!==r&&(this._stroke=r,this.styleID++)}get strokeThickness(){return this._strokeThickness}set strokeThickness(e){this._strokeThickness!==e&&(this._strokeThickness=e,this.styleID++)}get textBaseline(){return this._textBaseline}set textBaseline(e){this._textBaseline!==e&&(this._textBaseline=e,this.styleID++)}get trim(){return this._trim}set trim(e){this._trim!==e&&(this._trim=e,this.styleID++)}get whiteSpace(){return this._whiteSpace}set whiteSpace(e){this._whiteSpace!==e&&(this._whiteSpace=e,this.styleID++)}get wordWrap(){return this._wordWrap}set wordWrap(e){this._wordWrap!==e&&(this._wordWrap=e,this.styleID++)}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(e){this._wordWrapWidth!==e&&(this._wordWrapWidth=e,this.styleID++)}toFontString(){const e=typeof this.fontSize=="number"?`${this.fontSize}px`:this.fontSize;let r=this.fontFamily;Array.isArray(this.fontFamily)||(r=this.fontFamily.split(","));for(let n=r.length-1;n>=0;n--){let i=r[n].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&!sD.includes(i)&&(i=`"${i}"`),r[n]=i}return`${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${e} ${r.join(",")}`}};xC.defaultStyle={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:up.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};let Or=xC;function Gg(t){const e=tt.shared,r=n=>{const i=e.setValue(n);return i.alpha===1?i.toHex():i.toRgbaString()};return Array.isArray(t)?t.map(r):r(t)}function oD(t,e){if(!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0}function Hg(t,e,r){for(const n in r)Array.isArray(e[n])?t[n]=e[n].slice():t[n]=e[n]}const aD={texture:!0,children:!1,baseTexture:!0},wC=class kv extends ki{constructor(e,r,n){let i=!1;n||(n=he.ADAPTER.createCanvas(),i=!0),n.width=3,n.height=3;const s=se.from(n);s.orig=new De,s.trim=new De,super(s),this._ownCanvas=i,this.canvas=n,this.context=n.getContext("2d",{willReadFrequently:!0}),this._resolution=kv.defaultResolution??he.RESOLUTION,this._autoResolution=kv.defaultAutoResolution,this._text=null,this._style=null,this._styleListener=null,this._font="",this.text=e,this.style=r,this.localStyleID=-1}static get experimentalLetterSpacing(){return _n.experimentalLetterSpacing}static set experimentalLetterSpacing(e){Ue("7.1.0","Text.experimentalLetterSpacing is deprecated, use TextMetrics.experimentalLetterSpacing"),_n.experimentalLetterSpacing=e}updateText(e){const r=this._style;if(this.localStyleID!==r.styleID&&(this.dirty=!0,this.localStyleID=r.styleID),!this.dirty&&e)return;this._font=this._style.toFontString();const n=this.context,i=_n.measureText(this._text||" ",this._style,this._style.wordWrap,this.canvas),s=i.width,o=i.height,l=i.lines,h=i.lineHeight,c=i.lineWidths,f=i.maxLineWidth,m=i.fontProperties;this.canvas.width=Math.ceil(Math.ceil(Math.max(1,s)+r.padding*2)*this._resolution),this.canvas.height=Math.ceil(Math.ceil(Math.max(1,o)+r.padding*2)*this._resolution),n.scale(this._resolution,this._resolution),n.clearRect(0,0,this.canvas.width,this.canvas.height),n.font=this._font,n.lineWidth=r.strokeThickness,n.textBaseline=r.textBaseline,n.lineJoin=r.lineJoin,n.miterLimit=r.miterLimit;let p,v;const _=r.dropShadow?2:1;for(let E=0;E<_;++E){const T=r.dropShadow&&E===0,S=T?Math.ceil(Math.max(1,o)+r.padding*2):0,b=S*this._resolution;if(T){n.fillStyle="black",n.strokeStyle="black";const A=r.dropShadowColor,R=r.dropShadowBlur*this._resolution,L=r.dropShadowDistance*this._resolution;n.shadowColor=tt.shared.setValue(A).setAlpha(r.dropShadowAlpha).toRgbaString(),n.shadowBlur=R,n.shadowOffsetX=Math.cos(r.dropShadowAngle)*L,n.shadowOffsetY=Math.sin(r.dropShadowAngle)*L+b}else n.fillStyle=this._generateFillStyle(r,l,i),n.strokeStyle=r.stroke,n.shadowColor="black",n.shadowBlur=0,n.shadowOffsetX=0,n.shadowOffsetY=0;let x=(h-m.fontSize)/2;h-m.fontSize<0&&(x=0);for(let A=0;A<l.length;A++)p=r.strokeThickness/2,v=r.strokeThickness/2+A*h+m.ascent+x,r.align==="right"?p+=f-c[A]:r.align==="center"&&(p+=(f-c[A])/2),r.stroke&&r.strokeThickness&&this.drawLetterSpacing(l[A],p+r.padding,v+r.padding-S,!0),r.fill&&this.drawLetterSpacing(l[A],p+r.padding,v+r.padding-S)}this.updateTexture()}drawLetterSpacing(e,r,n,i=!1){const s=this._style.letterSpacing;let o=!1;if(_n.experimentalLetterSpacingSupported&&(_n.experimentalLetterSpacing?(this.context.letterSpacing=`${s}px`,this.context.textLetterSpacing=`${s}px`,o=!0):(this.context.letterSpacing="0px",this.context.textLetterSpacing="0px")),s===0||o){i?this.context.strokeText(e,r,n):this.context.fillText(e,r,n);return}let l=r;const h=_n.graphemeSegmenter(e);let c=this.context.measureText(e).width,f=0;for(let m=0;m<h.length;++m){const p=h[m];i?this.context.strokeText(p,l,n):this.context.fillText(p,l,n);let v="";for(let _=m+1;_<h.length;++_)v+=h[_];f=this.context.measureText(v).width,l+=c-f+s,c=f}}updateTexture(){const e=this.canvas;if(this._style.trim){const o=F4(e);o.data&&(e.width=o.width,e.height=o.height,this.context.putImageData(o.data,0,0))}const r=this._texture,n=this._style,i=n.trim?0:n.padding,s=r.baseTexture;r.trim.width=r._frame.width=e.width/this._resolution,r.trim.height=r._frame.height=e.height/this._resolution,r.trim.x=-i,r.trim.y=-i,r.orig.width=r._frame.width-i*2,r.orig.height=r._frame.height-i*2,this._onTextureUpdate(),s.setRealSize(e.width,e.height,this._resolution),r.updateUvs(),this.dirty=!1}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._render(e)}updateTransform(){this.updateText(!0),super.updateTransform()}getBounds(e,r){return this.updateText(!0),this._textureID===-1&&(e=!1),super.getBounds(e,r)}getLocalBounds(e){return this.updateText(!0),super.getLocalBounds.call(this,e)}_calculateBounds(){this.calculateVertices(),this._bounds.addQuad(this.vertexData)}_generateFillStyle(e,r,n){const i=e.fill;if(Array.isArray(i)){if(i.length===1)return i[0]}else return i;let s;const o=e.dropShadow?e.dropShadowDistance:0,l=e.padding||0,h=this.canvas.width/this._resolution-o-l*2,c=this.canvas.height/this._resolution-o-l*2,f=i.slice(),m=e.fillGradientStops.slice();if(!m.length){const p=f.length+1;for(let v=1;v<p;++v)m.push(v/p)}if(f.unshift(i[0]),m.unshift(0),f.push(i[i.length-1]),m.push(1),e.fillGradientType===up.LINEAR_VERTICAL){s=this.context.createLinearGradient(h/2,l,h/2,c+l);const p=n.fontProperties.fontSize+e.strokeThickness;for(let v=0;v<r.length;v++){const _=n.lineHeight*(v-1)+p,E=n.lineHeight*v;let T=E;v>0&&_>E&&(T=(E+_)/2);const S=E+p,b=n.lineHeight*(v+1);let x=S;v+1<r.length&&b<S&&(x=(S+b)/2);const A=(x-T)/c;for(let R=0;R<f.length;R++){let L=0;typeof m[R]=="number"?L=m[R]:L=R/f.length;let k=Math.min(1,Math.max(0,T/c+L*A));k=Number(k.toFixed(5)),s.addColorStop(k,f[R])}}}else{s=this.context.createLinearGradient(l,c/2,h+l,c/2);const p=f.length+1;let v=1;for(let _=0;_<f.length;_++){let E;typeof m[_]=="number"?E=m[_]:E=v/p,s.addColorStop(E,f[_]),v++}}return s}destroy(e){typeof e=="boolean"&&(e={children:e}),e=Object.assign({},aD,e),super.destroy(e),this._ownCanvas&&(this.canvas.height=this.canvas.width=0),this.context=null,this.canvas=null,this._style=null}get width(){return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width}set width(e){this.updateText(!0);const r=Ds(this.scale.x)||1;this.scale.x=r*e/this._texture.orig.width,this._width=e}get height(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height}set height(e){this.updateText(!0);const r=Ds(this.scale.y)||1;this.scale.y=r*e/this._texture.orig.height,this._height=e}get style(){return this._style}set style(e){e=e||{},e instanceof Or?this._style=e:this._style=new Or(e),this.localStyleID=-1,this.dirty=!0}get text(){return this._text}set text(e){e=String(e??""),this._text!==e&&(this._text=e,this.dirty=!0)}get resolution(){return this._resolution}set resolution(e){this._autoResolution=!1,this._resolution!==e&&(this._resolution=e,this.dirty=!0)}};wC.defaultAutoResolution=!0;let u_=wC;class Ef{constructor(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}}class Dd{static test(e){return typeof e=="string"&&e.startsWith("info face=")}static parse(e){const r=e.match(/^[a-z]+\s+.+$/gm),n={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(const s in r){const o=r[s].match(/^[a-z]+/gm)[0],l=r[s].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),h={};for(const c in l){const f=l[c].split("="),m=f[0],p=f[1].replace(/"/gm,""),v=parseFloat(p),_=isNaN(v)?p:v;h[m]=_}n[o].push(h)}const i=new Ef;return n.info.forEach(s=>i.info.push({face:s.face,size:parseInt(s.size,10)})),n.common.forEach(s=>i.common.push({lineHeight:parseInt(s.lineHeight,10)})),n.page.forEach(s=>i.page.push({id:parseInt(s.id,10),file:s.file})),n.char.forEach(s=>i.char.push({id:parseInt(s.id,10),page:parseInt(s.page,10),x:parseInt(s.x,10),y:parseInt(s.y,10),width:parseInt(s.width,10),height:parseInt(s.height,10),xoffset:parseInt(s.xoffset,10),yoffset:parseInt(s.yoffset,10),xadvance:parseInt(s.xadvance,10)})),n.kerning.forEach(s=>i.kerning.push({first:parseInt(s.first,10),second:parseInt(s.second,10),amount:parseInt(s.amount,10)})),n.distanceField.forEach(s=>i.distanceField.push({distanceRange:parseInt(s.distanceRange,10),fieldType:s.fieldType})),i}}class Nv{static test(e){const r=e;return typeof e!="string"&&"getElementsByTagName"in e&&r.getElementsByTagName("page").length&&r.getElementsByTagName("info")[0].getAttribute("face")!==null}static parse(e){const r=new Ef,n=e.getElementsByTagName("info"),i=e.getElementsByTagName("common"),s=e.getElementsByTagName("page"),o=e.getElementsByTagName("char"),l=e.getElementsByTagName("kerning"),h=e.getElementsByTagName("distanceField");for(let c=0;c<n.length;c++)r.info.push({face:n[c].getAttribute("face"),size:parseInt(n[c].getAttribute("size"),10)});for(let c=0;c<i.length;c++)r.common.push({lineHeight:parseInt(i[c].getAttribute("lineHeight"),10)});for(let c=0;c<s.length;c++)r.page.push({id:parseInt(s[c].getAttribute("id"),10)||0,file:s[c].getAttribute("file")});for(let c=0;c<o.length;c++){const f=o[c];r.char.push({id:parseInt(f.getAttribute("id"),10),page:parseInt(f.getAttribute("page"),10)||0,x:parseInt(f.getAttribute("x"),10),y:parseInt(f.getAttribute("y"),10),width:parseInt(f.getAttribute("width"),10),height:parseInt(f.getAttribute("height"),10),xoffset:parseInt(f.getAttribute("xoffset"),10),yoffset:parseInt(f.getAttribute("yoffset"),10),xadvance:parseInt(f.getAttribute("xadvance"),10)})}for(let c=0;c<l.length;c++)r.kerning.push({first:parseInt(l[c].getAttribute("first"),10),second:parseInt(l[c].getAttribute("second"),10),amount:parseInt(l[c].getAttribute("amount"),10)});for(let c=0;c<h.length;c++)r.distanceField.push({fieldType:h[c].getAttribute("fieldType"),distanceRange:parseInt(h[c].getAttribute("distanceRange"),10)});return r}}class Dv{static test(e){return typeof e=="string"&&e.includes("<font>")?Nv.test(he.ADAPTER.parseXML(e)):!1}static parse(e){return Nv.parse(he.ADAPTER.parseXML(e))}}const jg=[Dd,Nv,Dv];function lD(t){for(let e=0;e<jg.length;e++)if(jg[e].test(t))return jg[e];return null}function uD(t,e,r,n,i,s){const o=r.fill;if(Array.isArray(o)){if(o.length===1)return o[0]}else return o;let l;const h=r.dropShadow?r.dropShadowDistance:0,c=r.padding||0,f=t.width/n-h-c*2,m=t.height/n-h-c*2,p=o.slice(),v=r.fillGradientStops.slice();if(!v.length){const _=p.length+1;for(let E=1;E<_;++E)v.push(E/_)}if(p.unshift(o[0]),v.unshift(0),p.push(o[o.length-1]),v.push(1),r.fillGradientType===up.LINEAR_VERTICAL){l=e.createLinearGradient(f/2,c,f/2,m+c);let _=0;const E=(s.fontProperties.fontSize+r.strokeThickness)/m;for(let T=0;T<i.length;T++){const S=s.lineHeight*T;for(let b=0;b<p.length;b++){let x=0;typeof v[b]=="number"?x=v[b]:x=b/p.length;const A=S/m+x*E;let R=Math.max(_,A);R=Math.min(R,1),l.addColorStop(R,p[b]),_=R}}}else{l=e.createLinearGradient(c,m/2,f+c,m/2);const _=p.length+1;let E=1;for(let T=0;T<p.length;T++){let S;typeof v[T]=="number"?S=v[T]:S=E/_,l.addColorStop(S,p[T]),E++}}return l}function hD(t,e,r,n,i,s,o){const l=r.text,h=r.fontProperties;e.translate(n,i),e.scale(s,s);const c=o.strokeThickness/2,f=-(o.strokeThickness/2);if(e.font=o.toFontString(),e.lineWidth=o.strokeThickness,e.textBaseline=o.textBaseline,e.lineJoin=o.lineJoin,e.miterLimit=o.miterLimit,e.fillStyle=uD(t,e,o,s,[l],r),e.strokeStyle=o.stroke,o.dropShadow){const m=o.dropShadowColor,p=o.dropShadowBlur*s,v=o.dropShadowDistance*s;e.shadowColor=tt.shared.setValue(m).setAlpha(o.dropShadowAlpha).toRgbaString(),e.shadowBlur=p,e.shadowOffsetX=Math.cos(o.dropShadowAngle)*v,e.shadowOffsetY=Math.sin(o.dropShadowAngle)*v}else e.shadowColor="black",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0;o.stroke&&o.strokeThickness&&e.strokeText(l,c,f+r.lineHeight-h.descent),o.fill&&e.fillText(l,c,f+r.lineHeight-h.descent),e.setTransform(1,0,0,1,0,0),e.fillStyle="rgba(0, 0, 0, 0)"}function Od(t){return t.codePointAt?t.codePointAt(0):t.charCodeAt(0)}function EC(t){return Array.from?Array.from(t):t.split("")}function cD(t){typeof t=="string"&&(t=[t]);const e=[];for(let r=0,n=t.length;r<n;r++){const i=t[r];if(Array.isArray(i)){if(i.length!==2)throw new Error(`[BitmapFont]: Invalid character range length, expecting 2 got ${i.length}.`);const s=i[0].charCodeAt(0),o=i[1].charCodeAt(0);if(o<s)throw new Error("[BitmapFont]: Invalid character range.");for(let l=s,h=o;l<=h;l++)e.push(String.fromCharCode(l))}else e.push(...EC(i))}if(e.length===0)throw new Error("[BitmapFont]: Empty set when resolving characters.");return e}const bs=class fi{constructor(e,r,n){var f;const[i]=e.info,[s]=e.common,[o]=e.page,[l]=e.distanceField,h=ns(o.file),c={};this._ownsTextures=n,this.font=i.face,this.size=i.size,this.lineHeight=s.lineHeight/h,this.chars={},this.pageTextures=c;for(let m=0;m<e.page.length;m++){const{id:p,file:v}=e.page[m];c[p]=r instanceof Array?r[m]:r[v],l!=null&&l.fieldType&&l.fieldType!=="none"&&(c[p].baseTexture.alphaMode=Br.NO_PREMULTIPLIED_ALPHA,c[p].baseTexture.mipmap=Pi.OFF)}for(let m=0;m<e.char.length;m++){const{id:p,page:v}=e.char[m];let{x:_,y:E,width:T,height:S,xoffset:b,yoffset:x,xadvance:A}=e.char[m];_/=h,E/=h,T/=h,S/=h,b/=h,x/=h,A/=h;const R=new De(_+c[v].frame.x/h,E+c[v].frame.y/h,T,S);this.chars[p]={xOffset:b,yOffset:x,xAdvance:A,kerning:{},texture:new se(c[v].baseTexture,R),page:v}}for(let m=0;m<e.kerning.length;m++){let{first:p,second:v,amount:_}=e.kerning[m];p/=h,v/=h,_/=h,this.chars[v]&&(this.chars[v].kerning[p]=_)}this.distanceFieldRange=l==null?void 0:l.distanceRange,this.distanceFieldType=((f=l==null?void 0:l.fieldType)==null?void 0:f.toLowerCase())??"none"}destroy(){for(const e in this.chars)this.chars[e].texture.destroy(),this.chars[e].texture=null;for(const e in this.pageTextures)this._ownsTextures&&this.pageTextures[e].destroy(!0),this.pageTextures[e]=null;this.chars=null,this.pageTextures=null}static install(e,r,n){let i;if(e instanceof Ef)i=e;else{const o=lD(e);if(!o)throw new Error("Unrecognized data format for font.");i=o.parse(e)}r instanceof se&&(r=[r]);const s=new fi(i,r,n);return fi.available[s.font]=s,s}static uninstall(e){const r=fi.available[e];if(!r)throw new Error(`No font found named '${e}'`);r.destroy(),delete fi.available[e]}static from(e,r,n){if(!e)throw new Error("[BitmapFont] Property `name` is required.");const{chars:i,padding:s,resolution:o,textureWidth:l,textureHeight:h,...c}=Object.assign({},fi.defaultOptions,n),f=cD(i),m=r instanceof Or?r:new Or(r),p=l,v=new Ef;v.info[0]={face:m.fontFamily,size:m.fontSize},v.common[0]={lineHeight:m.fontSize};let _=0,E=0,T,S,b,x=0;const A=[];for(let L=0;L<f.length;L++){T||(T=he.ADAPTER.createCanvas(),T.width=l,T.height=h,S=T.getContext("2d"),b=new Ne(T,{resolution:o,...c}),A.push(new se(b)),v.page.push({id:A.length-1,file:""}));const k=f[L],D=_n.measureText(k,m,!1,T),Q=D.width,$=Math.ceil(D.height),me=Math.ceil((m.fontStyle==="italic"?2:1)*Q);if(E>=h-$*o){if(E===0)throw new Error(`[BitmapFont] textureHeight ${h}px is too small (fontFamily: '${m.fontFamily}', fontSize: ${m.fontSize}px, char: '${k}')`);--L,T=null,S=null,b=null,E=0,_=0,x=0;continue}if(x=Math.max($+D.fontProperties.descent,x),me*o+_>=p){if(_===0)throw new Error(`[BitmapFont] textureWidth ${l}px is too small (fontFamily: '${m.fontFamily}', fontSize: ${m.fontSize}px, char: '${k}')`);--L,E+=x*o,E=Math.ceil(E),_=0,x=0;continue}hD(T,S,D,_,E,o,m);const te=Od(D.text);v.char.push({id:te,page:A.length-1,x:_/o,y:E/o,width:me,height:$,xoffset:0,yoffset:0,xadvance:Q-(m.dropShadow?m.dropShadowDistance:0)-(m.stroke?m.strokeThickness:0)}),_+=(me+2*s)*o,_=Math.ceil(_)}if(!(n!=null&&n.skipKerning))for(let L=0,k=f.length;L<k;L++){const D=f[L];for(let Q=0;Q<k;Q++){const $=f[Q],me=S.measureText(D).width,te=S.measureText($).width,O=S.measureText(D+$).width-(me+te);O&&v.kerning.push({first:Od(D),second:Od($),amount:O})}}const R=new fi(v,A,!0);return fi.available[e]!==void 0&&fi.uninstall(e),fi.available[e]=R,R}};bs.ALPHA=[["a","z"],["A","Z"]," "],bs.NUMERIC=[["0","9"]],bs.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],bs.ASCII=[[" ","~"]],bs.defaultOptions={resolution:1,textureWidth:512,textureHeight:512,padding:4,chars:bs.ALPHANUMERIC},bs.available={};let Ts=bs;class dD{constructor(e,r){this.uvBuffer=e,this.uvMatrix=r,this.data=null,this._bufferUpdateId=-1,this._textureUpdateId=-1,this._updateID=0}update(e){if(!e&&this._bufferUpdateId===this.uvBuffer._updateID&&this._textureUpdateId===this.uvMatrix._updateID)return;this._bufferUpdateId=this.uvBuffer._updateID,this._textureUpdateId=this.uvMatrix._updateID;const r=this.uvBuffer.data;(!this.data||this.data.length!==r.length)&&(this.data=new Float32Array(r.length)),this.uvMatrix.multiplyUvs(r,this.data),this._updateID++}}const $g=new Ge,AE=new Fo,SC=class bC extends Tr{constructor(e,r,n,i=$n.TRIANGLES){super(),this.geometry=e,this.shader=r,this.state=n||Mi.for2d(),this.drawMode=i,this.start=0,this.size=0,this.uvs=null,this.indices=null,this.vertexData=new Float32Array(1),this.vertexDirty=-1,this._transformID=-1,this._roundPixels=he.ROUND_PIXELS,this.batchUvs=null}get geometry(){return this._geometry}set geometry(e){this._geometry!==e&&(this._geometry&&(this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose()),this._geometry=e,this._geometry&&this._geometry.refCount++,this.vertexDirty=-1)}get uvBuffer(){return this.geometry.buffers[1]}get verticesBuffer(){return this.geometry.buffers[0]}set material(e){this.shader=e}get material(){return this.shader}set blendMode(e){this.state.blendMode=e}get blendMode(){return this.state.blendMode}set roundPixels(e){this._roundPixels!==e&&(this._transformID=-1),this._roundPixels=e}get roundPixels(){return this._roundPixels}get tint(){return"tint"in this.shader?this.shader.tint:null}set tint(e){this.shader.tint=e}get tintValue(){return this.shader.tintValue}get texture(){return"texture"in this.shader?this.shader.texture:null}set texture(e){this.shader.texture=e}_render(e){const r=this.geometry.buffers[0].data;this.shader.batchable&&this.drawMode===$n.TRIANGLES&&r.length<bC.BATCHABLE_SIZE*2?this._renderToBatch(e):this._renderDefault(e)}_renderDefault(e){const r=this.shader;r.alpha=this.worldAlpha,r.update&&r.update(),e.batch.flush(),r.uniforms.translationMatrix=this.transform.worldTransform.toArray(!0),e.shader.bind(r),e.state.set(this.state),e.geometry.bind(this.geometry,r),e.geometry.draw(this.drawMode,this.size,this.start,this.geometry.instanceCount)}_renderToBatch(e){const r=this.geometry,n=this.shader;n.uvMatrix&&(n.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=r.indexBuffer.data,this._tintRGB=n._tintRGB,this._texture=n.texture;const i=this.material.pluginName;e.batch.setObjectRenderer(e.plugins[i]),e.plugins[i].render(this)}calculateVertices(){const e=this.geometry.buffers[0],r=e.data,n=e._updateID;if(n===this.vertexDirty&&this._transformID===this.transform._worldID)return;this._transformID=this.transform._worldID,this.vertexData.length!==r.length&&(this.vertexData=new Float32Array(r.length));const i=this.transform.worldTransform,s=i.a,o=i.b,l=i.c,h=i.d,c=i.tx,f=i.ty,m=this.vertexData;for(let p=0;p<m.length/2;p++){const v=r[p*2],_=r[p*2+1];m[p*2]=s*v+l*_+c,m[p*2+1]=o*v+h*_+f}if(this._roundPixels){const p=he.RESOLUTION;for(let v=0;v<m.length;++v)m[v]=Math.round(m[v]*p)/p}this.vertexDirty=n}calculateUvs(){const e=this.geometry.buffers[1],r=this.shader;r.uvMatrix.isSimple?this.uvs=e.data:(this.batchUvs||(this.batchUvs=new dD(e,r.uvMatrix)),this.batchUvs.update(),this.uvs=this.batchUvs.data)}_calculateBounds(){this.calculateVertices(),this._bounds.addVertexData(this.vertexData,0,this.vertexData.length)}containsPoint(e){if(!this.getBounds().contains(e.x,e.y))return!1;this.worldTransform.applyInverse(e,$g);const r=this.geometry.getBuffer("aVertexPosition").data,n=AE.points,i=this.geometry.getIndex().data,s=i.length,o=this.drawMode===4?3:1;for(let l=0;l+2<s;l+=o){const h=i[l]*2,c=i[l+1]*2,f=i[l+2]*2;if(n[0]=r[h],n[1]=r[h+1],n[2]=r[c],n[3]=r[c+1],n[4]=r[f],n[5]=r[f+1],AE.contains($g.x,$g.y))return!0}return!1}destroy(e){super.destroy(e),this._cachedTexture&&(this._cachedTexture.destroy(),this._cachedTexture=null),this.geometry=null,this.shader=null,this.state=null,this.uvs=null,this.indices=null,this.vertexData=null}};SC.BATCHABLE_SIZE=100;let Zu=SC;class hp extends Ys{constructor(e,r,n){super();const i=new It(e),s=new It(r,!0),o=new It(n,!0,!0);this.addAttribute("aVertexPosition",i,2,!1,Ae.FLOAT).addAttribute("aTextureCoord",s,2,!1,Ae.FLOAT).addIndex(o),this._updateId=-1}get vertexDirtyId(){return this.buffers[0]._updateID}}var fD=`varying vec2 vTextureCoord;
567
567
  uniform vec4 uColor;
568
568
 
569
569
  uniform sampler2D uSampler;
@@ -642,9 +642,9 @@ void main(void)\r
642
642
  vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r
643
643
  }\r
644
644
  `;const CE=[],PE=[],IE=[],TC=class AC extends Tr{constructor(e,r={}){super();const{align:n,tint:i,maxWidth:s,letterSpacing:o,fontName:l,fontSize:h}=Object.assign({},AC.styleDefaults,r);if(!Ts.available[l])throw new Error(`Missing BitmapFont "${l}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=n,this._tintColor=new tt(i),this._font=void 0,this._fontName=l,this._fontSize=h,this.text=e,this._maxWidth=s,this._maxLineHeight=0,this._letterSpacing=o,this._anchor=new Ei(()=>{this.dirty=!0},this,0,0),this._roundPixels=he.ROUND_PIXELS,this.dirty=!0,this._resolution=he.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var me;const e=Ts.available[this._fontName],r=this.fontSize,n=r/e.size,i=new Ge,s=[],o=[],l=[],h=this._text.replace(/(?:\r\n|\r)/g,`
645
- `)||" ",c=EC(h),f=this._maxWidth*e.size/r,m=e.distanceFieldType==="none"?CE:PE;let p=null,v=0,_=0,E=0,T=-1,S=0,b=0,x=0,A=0;for(let ne=0;ne<c.length;ne++){const B=c[ne],K=Od(B);if(/(?:\s)/.test(B)&&(T=ne,S=v,A++),B==="\r"||B===`
646
- `){o.push(v),l.push(-1),_=Math.max(_,v),++E,++b,i.x=0,i.y+=e.lineHeight,p=null,A=0;continue}const ie=e.chars[K];if(!ie)continue;p&&ie.kerning[p]&&(i.x+=ie.kerning[p]);const _e=IE.pop()||{texture:se.EMPTY,line:0,charCode:0,prevSpaces:0,position:new Ge};_e.texture=ie.texture,_e.line=E,_e.charCode=K,_e.position.x=Math.round(i.x+ie.xOffset+this._letterSpacing/2),_e.position.y=Math.round(i.y+ie.yOffset),_e.prevSpaces=A,s.push(_e),v=_e.position.x+Math.max(ie.xAdvance-ie.xOffset,ie.texture.orig.width),i.x+=ie.xAdvance+this._letterSpacing,x=Math.max(x,ie.yOffset+ie.texture.height),p=K,T!==-1&&f>0&&i.x>f&&(++b,Za(s,1+T-b,1+ne-T),ne=T,T=-1,o.push(S),l.push(s.length>0?s[s.length-1].prevSpaces:0),_=Math.max(_,S),E++,i.x=0,i.y+=e.lineHeight,p=null,A=0)}const R=c[c.length-1];R!=="\r"&&R!==`
647
- `&&(/(?:\s)/.test(R)&&(v=S),o.push(v),_=Math.max(_,v),l.push(-1));const L=[];for(let ne=0;ne<=E;ne++){let B=0;this._align==="right"?B=_-o[ne]:this._align==="center"?B=(_-o[ne])/2:this._align==="justify"&&(B=l[ne]<0?0:(_-o[ne])/l[ne]),L.push(B)}const N=s.length,D={},q=[],$=this._activePagesMeshData;m.push(...$);for(let ne=0;ne<N;ne++){const B=s[ne].texture,K=B.baseTexture.uid;if(!D[K]){let ie=m.pop();if(!ie){const fe=new hp;let M,W;e.distanceFieldType==="none"?(M=new Ju(se.EMPTY),W=Ie.NORMAL):(M=new Ju(se.EMPTY,{program:Qi.from(gD,mD),uniforms:{uFWidth:0}}),W=Ie.NORMAL_NPM);const O=new Zu(fe,M);O.blendMode=W,ie={index:0,indexCount:0,vertexCount:0,uvsCount:0,total:0,mesh:O,vertices:null,uvs:null,indices:null}}ie.index=0,ie.indexCount=0,ie.vertexCount=0,ie.uvsCount=0,ie.total=0;const{_textureCache:_e}=this;_e[K]=_e[K]||new se(B.baseTexture),ie.mesh.texture=_e[K],ie.mesh.tint=this._tintColor.value,q.push(ie),D[K]=ie}D[K].total++}for(let ne=0;ne<$.length;ne++)q.includes($[ne])||this.removeChild($[ne].mesh);for(let ne=0;ne<q.length;ne++)q[ne].mesh.parent!==this&&this.addChild(q[ne].mesh);this._activePagesMeshData=q;for(const ne in D){const B=D[ne],K=B.total;if(!(((me=B.indices)==null?void 0:me.length)>6*K)||B.vertices.length<Zu.BATCHABLE_SIZE*2)B.vertices=new Float32Array(4*2*K),B.uvs=new Float32Array(4*2*K),B.indices=new Uint16Array(6*K);else{const ie=B.total,_e=B.vertices;for(let fe=ie*4*2;fe<_e.length;fe++)_e[fe]=0}B.mesh.size=6*K}for(let ne=0;ne<N;ne++){const B=s[ne];let K=B.position.x+L[B.line]*(this._align==="justify"?B.prevSpaces:1);this._roundPixels&&(K=Math.round(K));const ie=K*n,_e=B.position.y*n,fe=B.texture,M=D[fe.baseTexture.uid],W=fe.frame,O=fe._uvs,H=M.index++;M.indices[H*6+0]=0+H*4,M.indices[H*6+1]=1+H*4,M.indices[H*6+2]=2+H*4,M.indices[H*6+3]=0+H*4,M.indices[H*6+4]=2+H*4,M.indices[H*6+5]=3+H*4,M.vertices[H*8+0]=ie,M.vertices[H*8+1]=_e,M.vertices[H*8+2]=ie+W.width*n,M.vertices[H*8+3]=_e,M.vertices[H*8+4]=ie+W.width*n,M.vertices[H*8+5]=_e+W.height*n,M.vertices[H*8+6]=ie,M.vertices[H*8+7]=_e+W.height*n,M.uvs[H*8+0]=O.x0,M.uvs[H*8+1]=O.y0,M.uvs[H*8+2]=O.x1,M.uvs[H*8+3]=O.y1,M.uvs[H*8+4]=O.x2,M.uvs[H*8+5]=O.y2,M.uvs[H*8+6]=O.x3,M.uvs[H*8+7]=O.y3}this._textWidth=_*n,this._textHeight=(i.y+e.lineHeight)*n;for(const ne in D){const B=D[ne];if(this.anchor.x!==0||this.anchor.y!==0){let fe=0;const M=this._textWidth*this.anchor.x,W=this._textHeight*this.anchor.y;for(let O=0;O<B.total;O++)B.vertices[fe++]-=M,B.vertices[fe++]-=W,B.vertices[fe++]-=M,B.vertices[fe++]-=W,B.vertices[fe++]-=M,B.vertices[fe++]-=W,B.vertices[fe++]-=M,B.vertices[fe++]-=W}this._maxLineHeight=x*n;const K=B.mesh.geometry.getBuffer("aVertexPosition"),ie=B.mesh.geometry.getBuffer("aTextureCoord"),_e=B.mesh.geometry.getIndex();K.data=B.vertices,ie.data=B.uvs,_e.data=B.indices,K.update(),ie.update(),_e.update()}for(let ne=0;ne<s.length;ne++)IE.push(s[ne]);this._font=e,this.dirty=!1}updateTransform(){this.validate(),this.containerUpdateTransform()}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0);const{distanceFieldRange:r,distanceFieldType:n,size:i}=Ts.available[this._fontName];if(n!=="none"){const{a:s,b:o,c:l,d:h}=this.worldTransform,c=Math.sqrt(s*s+o*o),f=Math.sqrt(l*l+h*h),m=(Math.abs(c)+Math.abs(f))/2,p=this.fontSize/i,v=e._view.resolution;for(const _ of this._activePagesMeshData)_.mesh.shader.uniforms.uFWidth=m*r*p*v}super._render(e)}getLocalBounds(){return this.validate(),super.getLocalBounds()}validate(){const e=Ts.available[this._fontName];if(!e)throw new Error(`Missing BitmapFont "${this._fontName}"`);this._font!==e&&(this.dirty=!0),this.dirty&&this.updateText()}get tint(){return this._tintColor.value}set tint(e){if(this.tint!==e){this._tintColor.setValue(e);for(let r=0;r<this._activePagesMeshData.length;r++)this._activePagesMeshData[r].mesh.tint=e}}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.dirty=!0)}get fontName(){return this._fontName}set fontName(e){if(!Ts.available[e])throw new Error(`Missing BitmapFont "${e}"`);this._fontName!==e&&(this._fontName=e,this.dirty=!0)}get fontSize(){return this._fontSize??Ts.available[this._fontName].size}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.dirty=!0)}get anchor(){return this._anchor}set anchor(e){typeof e=="number"?this._anchor.set(e):this._anchor.copyFrom(e)}get text(){return this._text}set text(e){e=String(e??""),this._text!==e&&(this._text=e,this.dirty=!0)}get maxWidth(){return this._maxWidth}set maxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.dirty=!0)}get maxLineHeight(){return this.validate(),this._maxLineHeight}get textWidth(){return this.validate(),this._textWidth}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.dirty=!0)}get roundPixels(){return this._roundPixels}set roundPixels(e){e!==this._roundPixels&&(this._roundPixels=e,this.dirty=!0)}get textHeight(){return this.validate(),this._textHeight}get resolution(){return this._resolution}set resolution(e){this._autoResolution=!1,this._resolution!==e&&(this._resolution=e,this.dirty=!0)}destroy(e){const{_textureCache:r}=this,n=Ts.available[this._fontName].distanceFieldType==="none"?CE:PE;n.push(...this._activePagesMeshData);for(const i of this._activePagesMeshData)this.removeChild(i.mesh);this._activePagesMeshData=[],n.filter(i=>r[i.mesh.texture.baseTexture.uid]).forEach(i=>{i.mesh.texture=se.EMPTY});for(const i in r)r[i].destroy(),delete r[i];this._font=null,this._tintColor=null,this._textureCache=null,super.destroy(e)}};TC.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0};let yD=TC;const RE={loader:ae.LoadParser,resolver:ae.ResolveParser,cache:ae.CacheParser,detection:ae.DetectionParser};we.handle(ae.Asset,t=>{const e=t.ref;Object.entries(RE).filter(([r])=>!!e[r]).forEach(([r,n])=>we.add(Object.assign(e[r],{extension:e[r].extension??n})))},t=>{const e=t.ref;Object.keys(RE).filter(r=>!!e[r]).forEach(r=>we.remove(e[r]))});class vD{constructor(e,r=!1){this._loader=e,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=r}add(e){e.forEach(r=>{this._assetList.push(r)}),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;const e=[],r=Math.min(this._assetList.length,this._maxConcurrent);for(let n=0;n<r;n++)e.push(this._assetList.pop());await this._loader.load(e),this._isLoading=!1,this._next()}}get active(){return this._isActive}set active(e){this._isActive!==e&&(this._isActive=e,e&&!this._isLoading&&this._next())}}function yl(t,e){if(Array.isArray(e)){for(const r of e)if(t.startsWith(`data:${r}`))return!0;return!1}return t.startsWith(`data:${e}`)}function to(t,e){const r=t.split("?")[0],n=Kt.extname(r).toLowerCase();return Array.isArray(e)?e.includes(n):n===e}const jn=(t,e,r=!1)=>(Array.isArray(t)||(t=[t]),e?t.map(n=>typeof n=="string"||r?e(n):n):t),Ov=(t,e)=>{const r=e.split("?")[1];return r&&(t+=`?${r}`),t};function CC(t,e,r,n,i){const s=e[r];for(let o=0;o<s.length;o++){const l=s[o];r<e.length-1?CC(t.replace(n[r],l),e,r+1,n,i):i.push(t.replace(n[r],l))}}function _D(t){const e=/\{(.*?)\}/g,r=t.match(e),n=[];if(r){const i=[];r.forEach(s=>{const o=s.substring(1,s.length-1).split(",");i.push(o)}),CC(t,i,0,r,n)}else n.push(t);return n}const Sf=t=>!Array.isArray(t);class xD{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(e){return this._cache.has(e)}get(e){const r=this._cache.get(e);return r||console.warn(`[Assets] Asset id ${e} was not found in the Cache`),r}set(e,r){const n=jn(e);let i;for(let l=0;l<this.parsers.length;l++){const h=this.parsers[l];if(h.test(r)){i=h.getCacheableAssets(n,r);break}}i||(i={},n.forEach(l=>{i[l]=r}));const s=Object.keys(i),o={cacheKeys:s,keys:n};if(n.forEach(l=>{this._cacheMap.set(l,o)}),s.forEach(l=>{const h=i?i[l]:r;this._cache.has(l)&&this._cache.get(l)!==h&&console.warn("[Cache] already has key:",l),this._cache.set(l,i[l])}),r instanceof se){const l=r;n.forEach(h=>{l.baseTexture!==se.EMPTY.baseTexture&&Ne.addToCache(l.baseTexture,h),se.addToCache(l,h)})}}remove(e){if(!this._cacheMap.has(e)){console.warn(`[Assets] Asset id ${e} was not found in the Cache`);return}const r=this._cacheMap.get(e);r.cacheKeys.forEach(n=>{this._cache.delete(n)}),r.keys.forEach(n=>{this._cacheMap.delete(n)})}get parsers(){return this._parsers}}const Io=new xD;class wD{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(e,r,n)=>(this._parsersValidated=!1,e[r]=n,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(e,r){const n={promise:null,parser:null};return n.promise=(async()=>{var o,l;let i=null,s=null;if(r.loadParser&&(s=this._parserHash[r.loadParser],s||console.warn(`[Assets] specified load parser "${r.loadParser}" not found while loading ${e}`)),!s){for(let h=0;h<this.parsers.length;h++){const c=this.parsers[h];if(c.load&&((o=c.test)!=null&&o.call(c,e,r,this))){s=c;break}}if(!s)return console.warn(`[Assets] ${e} could not be loaded as we don't know how to parse it, ensure the correct parser has been added`),null}i=await s.load(e,r,this),n.parser=s;for(let h=0;h<this.parsers.length;h++){const c=this.parsers[h];c.parse&&c.parse&&await((l=c.testParse)==null?void 0:l.call(c,i,r,this))&&(i=await c.parse(i,r,this)||i,n.parser=c)}return i})(),n}async load(e,r){this._parsersValidated||this._validateParsers();let n=0;const i={},s=Sf(e),o=jn(e,c=>({alias:[c],src:c})),l=o.length,h=o.map(async c=>{const f=Kt.toAbsolute(c.src);if(!i[c.src])try{this.promiseCache[f]||(this.promiseCache[f]=this._getLoadPromiseAndParser(f,c)),i[c.src]=await this.promiseCache[f].promise,r&&r(++n/l)}catch(m){throw delete this.promiseCache[f],delete i[c.src],new Error(`[Loader.load] Failed to load ${f}.
645
+ `)||" ",c=EC(h),f=this._maxWidth*e.size/r,m=e.distanceFieldType==="none"?CE:PE;let p=null,v=0,_=0,E=0,T=-1,S=0,b=0,x=0,A=0;for(let te=0;te<c.length;te++){const O=c[te],V=Od(O);if(/(?:\s)/.test(O)&&(T=te,S=v,A++),O==="\r"||O===`
646
+ `){o.push(v),l.push(-1),_=Math.max(_,v),++E,++b,i.x=0,i.y+=e.lineHeight,p=null,A=0;continue}const ie=e.chars[V];if(!ie)continue;p&&ie.kerning[p]&&(i.x+=ie.kerning[p]);const _e=IE.pop()||{texture:se.EMPTY,line:0,charCode:0,prevSpaces:0,position:new Ge};_e.texture=ie.texture,_e.line=E,_e.charCode=V,_e.position.x=Math.round(i.x+ie.xOffset+this._letterSpacing/2),_e.position.y=Math.round(i.y+ie.yOffset),_e.prevSpaces=A,s.push(_e),v=_e.position.x+Math.max(ie.xAdvance-ie.xOffset,ie.texture.orig.width),i.x+=ie.xAdvance+this._letterSpacing,x=Math.max(x,ie.yOffset+ie.texture.height),p=V,T!==-1&&f>0&&i.x>f&&(++b,Za(s,1+T-b,1+te-T),te=T,T=-1,o.push(S),l.push(s.length>0?s[s.length-1].prevSpaces:0),_=Math.max(_,S),E++,i.x=0,i.y+=e.lineHeight,p=null,A=0)}const R=c[c.length-1];R!=="\r"&&R!==`
647
+ `&&(/(?:\s)/.test(R)&&(v=S),o.push(v),_=Math.max(_,v),l.push(-1));const L=[];for(let te=0;te<=E;te++){let O=0;this._align==="right"?O=_-o[te]:this._align==="center"?O=(_-o[te])/2:this._align==="justify"&&(O=l[te]<0?0:(_-o[te])/l[te]),L.push(O)}const k=s.length,D={},Q=[],$=this._activePagesMeshData;m.push(...$);for(let te=0;te<k;te++){const O=s[te].texture,V=O.baseTexture.uid;if(!D[V]){let ie=m.pop();if(!ie){const fe=new hp;let M,W;e.distanceFieldType==="none"?(M=new Ju(se.EMPTY),W=Re.NORMAL):(M=new Ju(se.EMPTY,{program:Qi.from(gD,mD),uniforms:{uFWidth:0}}),W=Re.NORMAL_NPM);const F=new Zu(fe,M);F.blendMode=W,ie={index:0,indexCount:0,vertexCount:0,uvsCount:0,total:0,mesh:F,vertices:null,uvs:null,indices:null}}ie.index=0,ie.indexCount=0,ie.vertexCount=0,ie.uvsCount=0,ie.total=0;const{_textureCache:_e}=this;_e[V]=_e[V]||new se(O.baseTexture),ie.mesh.texture=_e[V],ie.mesh.tint=this._tintColor.value,Q.push(ie),D[V]=ie}D[V].total++}for(let te=0;te<$.length;te++)Q.includes($[te])||this.removeChild($[te].mesh);for(let te=0;te<Q.length;te++)Q[te].mesh.parent!==this&&this.addChild(Q[te].mesh);this._activePagesMeshData=Q;for(const te in D){const O=D[te],V=O.total;if(!(((me=O.indices)==null?void 0:me.length)>6*V)||O.vertices.length<Zu.BATCHABLE_SIZE*2)O.vertices=new Float32Array(4*2*V),O.uvs=new Float32Array(4*2*V),O.indices=new Uint16Array(6*V);else{const ie=O.total,_e=O.vertices;for(let fe=ie*4*2;fe<_e.length;fe++)_e[fe]=0}O.mesh.size=6*V}for(let te=0;te<k;te++){const O=s[te];let V=O.position.x+L[O.line]*(this._align==="justify"?O.prevSpaces:1);this._roundPixels&&(V=Math.round(V));const ie=V*n,_e=O.position.y*n,fe=O.texture,M=D[fe.baseTexture.uid],W=fe.frame,F=fe._uvs,H=M.index++;M.indices[H*6+0]=0+H*4,M.indices[H*6+1]=1+H*4,M.indices[H*6+2]=2+H*4,M.indices[H*6+3]=0+H*4,M.indices[H*6+4]=2+H*4,M.indices[H*6+5]=3+H*4,M.vertices[H*8+0]=ie,M.vertices[H*8+1]=_e,M.vertices[H*8+2]=ie+W.width*n,M.vertices[H*8+3]=_e,M.vertices[H*8+4]=ie+W.width*n,M.vertices[H*8+5]=_e+W.height*n,M.vertices[H*8+6]=ie,M.vertices[H*8+7]=_e+W.height*n,M.uvs[H*8+0]=F.x0,M.uvs[H*8+1]=F.y0,M.uvs[H*8+2]=F.x1,M.uvs[H*8+3]=F.y1,M.uvs[H*8+4]=F.x2,M.uvs[H*8+5]=F.y2,M.uvs[H*8+6]=F.x3,M.uvs[H*8+7]=F.y3}this._textWidth=_*n,this._textHeight=(i.y+e.lineHeight)*n;for(const te in D){const O=D[te];if(this.anchor.x!==0||this.anchor.y!==0){let fe=0;const M=this._textWidth*this.anchor.x,W=this._textHeight*this.anchor.y;for(let F=0;F<O.total;F++)O.vertices[fe++]-=M,O.vertices[fe++]-=W,O.vertices[fe++]-=M,O.vertices[fe++]-=W,O.vertices[fe++]-=M,O.vertices[fe++]-=W,O.vertices[fe++]-=M,O.vertices[fe++]-=W}this._maxLineHeight=x*n;const V=O.mesh.geometry.getBuffer("aVertexPosition"),ie=O.mesh.geometry.getBuffer("aTextureCoord"),_e=O.mesh.geometry.getIndex();V.data=O.vertices,ie.data=O.uvs,_e.data=O.indices,V.update(),ie.update(),_e.update()}for(let te=0;te<s.length;te++)IE.push(s[te]);this._font=e,this.dirty=!1}updateTransform(){this.validate(),this.containerUpdateTransform()}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0);const{distanceFieldRange:r,distanceFieldType:n,size:i}=Ts.available[this._fontName];if(n!=="none"){const{a:s,b:o,c:l,d:h}=this.worldTransform,c=Math.sqrt(s*s+o*o),f=Math.sqrt(l*l+h*h),m=(Math.abs(c)+Math.abs(f))/2,p=this.fontSize/i,v=e._view.resolution;for(const _ of this._activePagesMeshData)_.mesh.shader.uniforms.uFWidth=m*r*p*v}super._render(e)}getLocalBounds(){return this.validate(),super.getLocalBounds()}validate(){const e=Ts.available[this._fontName];if(!e)throw new Error(`Missing BitmapFont "${this._fontName}"`);this._font!==e&&(this.dirty=!0),this.dirty&&this.updateText()}get tint(){return this._tintColor.value}set tint(e){if(this.tint!==e){this._tintColor.setValue(e);for(let r=0;r<this._activePagesMeshData.length;r++)this._activePagesMeshData[r].mesh.tint=e}}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.dirty=!0)}get fontName(){return this._fontName}set fontName(e){if(!Ts.available[e])throw new Error(`Missing BitmapFont "${e}"`);this._fontName!==e&&(this._fontName=e,this.dirty=!0)}get fontSize(){return this._fontSize??Ts.available[this._fontName].size}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.dirty=!0)}get anchor(){return this._anchor}set anchor(e){typeof e=="number"?this._anchor.set(e):this._anchor.copyFrom(e)}get text(){return this._text}set text(e){e=String(e??""),this._text!==e&&(this._text=e,this.dirty=!0)}get maxWidth(){return this._maxWidth}set maxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.dirty=!0)}get maxLineHeight(){return this.validate(),this._maxLineHeight}get textWidth(){return this.validate(),this._textWidth}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.dirty=!0)}get roundPixels(){return this._roundPixels}set roundPixels(e){e!==this._roundPixels&&(this._roundPixels=e,this.dirty=!0)}get textHeight(){return this.validate(),this._textHeight}get resolution(){return this._resolution}set resolution(e){this._autoResolution=!1,this._resolution!==e&&(this._resolution=e,this.dirty=!0)}destroy(e){const{_textureCache:r}=this,n=Ts.available[this._fontName].distanceFieldType==="none"?CE:PE;n.push(...this._activePagesMeshData);for(const i of this._activePagesMeshData)this.removeChild(i.mesh);this._activePagesMeshData=[],n.filter(i=>r[i.mesh.texture.baseTexture.uid]).forEach(i=>{i.mesh.texture=se.EMPTY});for(const i in r)r[i].destroy(),delete r[i];this._font=null,this._tintColor=null,this._textureCache=null,super.destroy(e)}};TC.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0};let yD=TC;const RE={loader:ae.LoadParser,resolver:ae.ResolveParser,cache:ae.CacheParser,detection:ae.DetectionParser};we.handle(ae.Asset,t=>{const e=t.ref;Object.entries(RE).filter(([r])=>!!e[r]).forEach(([r,n])=>we.add(Object.assign(e[r],{extension:e[r].extension??n})))},t=>{const e=t.ref;Object.keys(RE).filter(r=>!!e[r]).forEach(r=>we.remove(e[r]))});class vD{constructor(e,r=!1){this._loader=e,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=r}add(e){e.forEach(r=>{this._assetList.push(r)}),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;const e=[],r=Math.min(this._assetList.length,this._maxConcurrent);for(let n=0;n<r;n++)e.push(this._assetList.pop());await this._loader.load(e),this._isLoading=!1,this._next()}}get active(){return this._isActive}set active(e){this._isActive!==e&&(this._isActive=e,e&&!this._isLoading&&this._next())}}function yl(t,e){if(Array.isArray(e)){for(const r of e)if(t.startsWith(`data:${r}`))return!0;return!1}return t.startsWith(`data:${e}`)}function to(t,e){const r=t.split("?")[0],n=Kt.extname(r).toLowerCase();return Array.isArray(e)?e.includes(n):n===e}const jn=(t,e,r=!1)=>(Array.isArray(t)||(t=[t]),e?t.map(n=>typeof n=="string"||r?e(n):n):t),Ov=(t,e)=>{const r=e.split("?")[1];return r&&(t+=`?${r}`),t};function CC(t,e,r,n,i){const s=e[r];for(let o=0;o<s.length;o++){const l=s[o];r<e.length-1?CC(t.replace(n[r],l),e,r+1,n,i):i.push(t.replace(n[r],l))}}function _D(t){const e=/\{(.*?)\}/g,r=t.match(e),n=[];if(r){const i=[];r.forEach(s=>{const o=s.substring(1,s.length-1).split(",");i.push(o)}),CC(t,i,0,r,n)}else n.push(t);return n}const Sf=t=>!Array.isArray(t);class xD{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(e){return this._cache.has(e)}get(e){const r=this._cache.get(e);return r||console.warn(`[Assets] Asset id ${e} was not found in the Cache`),r}set(e,r){const n=jn(e);let i;for(let l=0;l<this.parsers.length;l++){const h=this.parsers[l];if(h.test(r)){i=h.getCacheableAssets(n,r);break}}i||(i={},n.forEach(l=>{i[l]=r}));const s=Object.keys(i),o={cacheKeys:s,keys:n};if(n.forEach(l=>{this._cacheMap.set(l,o)}),s.forEach(l=>{const h=i?i[l]:r;this._cache.has(l)&&this._cache.get(l)!==h&&console.warn("[Cache] already has key:",l),this._cache.set(l,i[l])}),r instanceof se){const l=r;n.forEach(h=>{l.baseTexture!==se.EMPTY.baseTexture&&Ne.addToCache(l.baseTexture,h),se.addToCache(l,h)})}}remove(e){if(!this._cacheMap.has(e)){console.warn(`[Assets] Asset id ${e} was not found in the Cache`);return}const r=this._cacheMap.get(e);r.cacheKeys.forEach(n=>{this._cache.delete(n)}),r.keys.forEach(n=>{this._cacheMap.delete(n)})}get parsers(){return this._parsers}}const Io=new xD;class wD{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(e,r,n)=>(this._parsersValidated=!1,e[r]=n,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(e,r){const n={promise:null,parser:null};return n.promise=(async()=>{var o,l;let i=null,s=null;if(r.loadParser&&(s=this._parserHash[r.loadParser],s||console.warn(`[Assets] specified load parser "${r.loadParser}" not found while loading ${e}`)),!s){for(let h=0;h<this.parsers.length;h++){const c=this.parsers[h];if(c.load&&((o=c.test)!=null&&o.call(c,e,r,this))){s=c;break}}if(!s)return console.warn(`[Assets] ${e} could not be loaded as we don't know how to parse it, ensure the correct parser has been added`),null}i=await s.load(e,r,this),n.parser=s;for(let h=0;h<this.parsers.length;h++){const c=this.parsers[h];c.parse&&c.parse&&await((l=c.testParse)==null?void 0:l.call(c,i,r,this))&&(i=await c.parse(i,r,this)||i,n.parser=c)}return i})(),n}async load(e,r){this._parsersValidated||this._validateParsers();let n=0;const i={},s=Sf(e),o=jn(e,c=>({alias:[c],src:c})),l=o.length,h=o.map(async c=>{const f=Kt.toAbsolute(c.src);if(!i[c.src])try{this.promiseCache[f]||(this.promiseCache[f]=this._getLoadPromiseAndParser(f,c)),i[c.src]=await this.promiseCache[f].promise,r&&r(++n/l)}catch(m){throw delete this.promiseCache[f],delete i[c.src],new Error(`[Loader.load] Failed to load ${f}.
648
648
  ${m}`)}});return await Promise.all(h),s?i[o[0].src]:i}async unload(e){const r=jn(e,n=>({alias:[n],src:n})).map(async n=>{var o,l;const i=Kt.toAbsolute(n.src),s=this.promiseCache[i];if(s){const h=await s.promise;delete this.promiseCache[i],(l=(o=s.parser)==null?void 0:o.unload)==null||l.call(o,h,n,this)}});await Promise.all(r)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(e=>e.name).reduce((e,r)=>(e[r.name]&&console.warn(`[Assets] loadParser name conflict "${r.name}"`),{...e,[r.name]:r}),{})}}var qn=(t=>(t[t.Low=0]="Low",t[t.Normal=1]="Normal",t[t.High=2]="High",t))(qn||{});const ED=".json",SD="application/json",bD={extension:{type:ae.LoadParser,priority:qn.Low},name:"loadJson",test(t){return yl(t,SD)||to(t,ED)},async load(t){return await(await he.ADAPTER.fetch(t)).json()}};we.add(bD);const TD=".txt",AD="text/plain",CD={name:"loadTxt",extension:{type:ae.LoadParser,priority:qn.Low},test(t){return yl(t,AD)||to(t,TD)},async load(t){return await(await he.ADAPTER.fetch(t)).text()}};we.add(CD);const PD=["normal","bold","100","200","300","400","500","600","700","800","900"],ID=[".ttf",".otf",".woff",".woff2"],RD=["font/ttf","font/otf","font/woff","font/woff2"],MD=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function kD(t){const e=Kt.extname(t),r=Kt.basename(t,e).replace(/(-|_)/g," ").toLowerCase().split(" ").map(s=>s.charAt(0).toUpperCase()+s.slice(1));let n=r.length>0;for(const s of r)if(!s.match(MD)){n=!1;break}let i=r.join(" ");return n||(i=`"${i.replace(/[\\"]/g,"\\$&")}"`),i}const ND=/^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;function DD(t){return ND.test(t)?t:encodeURI(t)}const OD={extension:{type:ae.LoadParser,priority:qn.Low},name:"loadWebFont",test(t){return yl(t,RD)||to(t,ID)},async load(t,e){var n,i,s;const r=he.ADAPTER.getFontFaceSet();if(r){const o=[],l=((n=e.data)==null?void 0:n.family)??kD(t),h=((s=(i=e.data)==null?void 0:i.weights)==null?void 0:s.filter(f=>PD.includes(f)))??["normal"],c=e.data??{};for(let f=0;f<h.length;f++){const m=h[f],p=new FontFace(l,`url(${DD(t)})`,{...c,weight:m});await p.load(),r.add(p),o.push(p)}return o.length===1?o[0]:o}return console.warn("[loadWebFont] FontFace API is not supported. Skipping loading font"),null},unload(t){(Array.isArray(t)?t:[t]).forEach(e=>he.ADAPTER.getFontFaceSet().delete(e))}};we.add(OD);const FD=`(function() {
649
649
  "use strict";
650
650
  const WHITE_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=";
@@ -689,7 +689,7 @@ ${m}`)}});return await Promise.all(h),s?i[o[0].src]:i}async unload(e){const r=jn
689
689
  };
690
690
  })();
691
691
  `;let tl=null;class PC{constructor(){tl||(tl=URL.createObjectURL(new Blob([BD],{type:"application/javascript"}))),this.worker=new Worker(tl)}}PC.revokeObjectURL=function(){tl&&(URL.revokeObjectURL(tl),tl=null)};let ME=0,Wg;class LD{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(e=>{const{worker:r}=new Fv;r.addEventListener("message",n=>{r.terminate(),Fv.revokeObjectURL(),e(n.data)})}),this._isImageBitmapSupported)}loadImageBitmap(e){return this._run("loadImageBitmap",[e])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){Wg===void 0&&(Wg=navigator.hardwareConcurrency||4);let e=this.workerPool.pop();return!e&&this._createdWorkers<Wg&&(this._createdWorkers++,e=new PC().worker,e.addEventListener("message",r=>{this.complete(r.data),this.returnWorker(r.target),this.next()})),e}returnWorker(e){this.workerPool.push(e)}complete(e){e.error!==void 0?this.resolveHash[e.uuid].reject(e.error):this.resolveHash[e.uuid].resolve(e.data),this.resolveHash[e.uuid]=null}async _run(e,r){await this._initWorkers();const n=new Promise((i,s)=>{this.queue.push({id:e,arguments:r,resolve:i,reject:s})});return this.next(),n}next(){if(!this.queue.length)return;const e=this.getWorker();if(!e)return;const r=this.queue.pop(),n=r.id;this.resolveHash[ME]={resolve:r.resolve,reject:r.reject},e.postMessage({data:r.arguments,uuid:ME++,id:n})}}const kE=new LD;function dh(t,e,r){t.resource.internal=!0;const n=new se(t),i=()=>{delete e.promiseCache[r],Io.has(r)&&Io.remove(r)};return n.baseTexture.once("destroyed",()=>{r in e.promiseCache&&(console.warn("[Assets] A BaseTexture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the BaseTexture."),i())}),n.once("destroyed",()=>{t.destroyed||(console.warn("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),i())}),n}const UD=[".jpeg",".jpg",".png",".webp",".avif"],zD=["image/jpeg","image/png","image/webp","image/avif"];async function GD(t){const e=await he.ADAPTER.fetch(t);if(!e.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${t}: ${e.status} ${e.statusText}`);const r=await e.blob();return await createImageBitmap(r)}const cp={name:"loadTextures",extension:{type:ae.LoadParser,priority:qn.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(t){return yl(t,zD)||to(t,UD)},async load(t,e,r){var l;const n=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap;let i;n?this.config.preferWorkers&&await kE.isImageBitmapSupported()?i=await kE.loadImageBitmap(t):i=await GD(t):i=await new Promise((h,c)=>{const f=new Image;f.crossOrigin=this.config.crossOrigin,f.src=t,f.complete?h(f):(f.onload=()=>h(f),f.onerror=m=>c(m))});const s={...e.data};s.resolution??(s.resolution=ns(t)),n&&((l=s.resourceOptions)==null?void 0:l.ownsImageBitmap)===void 0&&(s.resourceOptions={...s.resourceOptions},s.resourceOptions.ownsImageBitmap=!0);const o=new Ne(i,s);return o.resource.src=t,dh(o,r,t)},unload(t){t.destroy(!0)}};we.add(cp);const HD=".svg",jD="image/svg+xml",$D={extension:{type:ae.LoadParser,priority:qn.High},name:"loadSVG",test(t){return yl(t,jD)||to(t,HD)},async testParse(t){return Pv.test(t)},async parse(t,e,r){var s;const n=new Pv(t,(s=e==null?void 0:e.data)==null?void 0:s.resourceOptions);await n.load();const i=new Ne(n,{resolution:ns(t),...e==null?void 0:e.data});return i.resource.src=e.src,dh(i,r,e.src)},async load(t,e){return(await he.ADAPTER.fetch(t)).text()},unload:cp.unload};we.add($D);const WD=[".mp4",".m4v",".webm",".ogv"],VD=["video/mp4","video/webm","video/ogg"],XD={name:"loadVideo",extension:{type:ae.LoadParser,priority:qn.High},config:{defaultAutoPlay:!0,defaultUpdateFPS:0,defaultLoop:!1,defaultMuted:!1,defaultPlaysinline:!0},test(t){return yl(t,VD)||to(t,WD)},async load(t,e,r){var o;let n;const i=await(await he.ADAPTER.fetch(t)).blob(),s=URL.createObjectURL(i);try{const l={autoPlay:this.config.defaultAutoPlay,updateFPS:this.config.defaultUpdateFPS,loop:this.config.defaultLoop,muted:this.config.defaultMuted,playsinline:this.config.defaultPlaysinline,...(o=e==null?void 0:e.data)==null?void 0:o.resourceOptions,autoLoad:!0},h=new vC(s,l);await h.load();const c=new Ne(h,{alphaMode:await v4(),resolution:ns(t),...e==null?void 0:e.data});c.resource.src=t,n=dh(c,r,t),n.baseTexture.once("destroyed",()=>{URL.revokeObjectURL(s)})}catch(l){throw URL.revokeObjectURL(s),l}return n},unload(t){t.destroy(!0)}};we.add(XD);class YD{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(e,r)=>`${e}${this._bundleIdConnector}${r}`,extractAssetIdFromBundle:(e,r)=>r.replace(`${e}${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(e){if(this._bundleIdConnector=e.connector??this._bundleIdConnector,this._createBundleAssetId=e.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=e.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...e){e.forEach(r=>{this._preferredOrder.push(r),r.priority||(r.priority=Object.keys(r.params))}),this._resolverHash={}}set basePath(e){this._basePath=e}get basePath(){return this._basePath}set rootPath(e){this._rootPath=e}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(e){if(typeof e=="string")this._defaultSearchParams=e;else{const r=e;this._defaultSearchParams=Object.keys(r).map(n=>`${encodeURIComponent(n)}=${encodeURIComponent(r[n])}`).join("&")}}getAlias(e){const{alias:r,name:n,src:i,srcs:s}=e;return jn(r||n||i||s,o=>typeof o=="string"?o:Array.isArray(o)?o.map(l=>(l==null?void 0:l.src)??(l==null?void 0:l.srcs)??l):o!=null&&o.src||o!=null&&o.srcs?o.src??o.srcs:o,!0)}addManifest(e){this._manifest&&console.warn("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=e,e.bundles.forEach(r=>{this.addBundle(r.name,r.assets)})}addBundle(e,r){const n=[];Array.isArray(r)?r.forEach(i=>{const s=i.src??i.srcs,o=i.alias??i.name;let l;if(typeof o=="string"){const h=this._createBundleAssetId(e,o);n.push(h),l=[o,h]}else{const h=o.map(c=>this._createBundleAssetId(e,c));n.push(...h),l=[...o,...h]}this.add({...i,alias:l,src:s})}):Object.keys(r).forEach(i=>{const s=[i,this._createBundleAssetId(e,i)];if(typeof r[i]=="string")this.add({alias:s,src:r[i]});else if(Array.isArray(r[i]))this.add({alias:s,src:r[i]});else{const o=r[i],l=o.src??o.srcs;this.add({...o,alias:s,src:Array.isArray(l)?l:[l]})}n.push(...s)}),this._bundles[e]=n}add(e,r,n,i,s){const o=[];typeof e=="string"||Array.isArray(e)&&typeof e[0]=="string"?(Ue("7.2.0",`Assets.add now uses an object instead of individual parameters.
692
- Please use Assets.add({ alias, src, data, format, loadParser }) instead.`),o.push({alias:e,src:r,data:n,format:i,loadParser:s})):Array.isArray(e)?o.push(...e):o.push(e);let l;l=h=>{this.hasKey(h)&&console.warn(`[Resolver] already has key: ${h} overwriting`)},jn(o).forEach(h=>{const{src:c,srcs:f}=h;let{data:m,format:p,loadParser:v}=h;const _=jn(c||f).map(S=>typeof S=="string"?_D(S):Array.isArray(S)?S:[S]),E=this.getAlias(h);Array.isArray(E)?E.forEach(l):l(E);const T=[];_.forEach(S=>{S.forEach(b=>{let x={};if(typeof b!="object"){x.src=b;for(let A=0;A<this._parsers.length;A++){const R=this._parsers[A];if(R.test(b)){x=R.parse(b);break}}}else m=b.data??m,p=b.format??p,v=b.loadParser??v,x={...x,...b};if(!E)throw new Error(`[Resolver] alias is undefined for this asset: ${x.src}`);x=this.buildResolvedAsset(x,{aliases:E,data:m,format:p,loadParser:v}),T.push(x)})}),E.forEach(S=>{this._assetMap[S]=T})})}resolveBundle(e){const r=Sf(e);e=jn(e);const n={};return e.forEach(i=>{const s=this._bundles[i];if(s){const o=this.resolve(s),l={};for(const h in o){const c=o[h];l[this._extractAssetIdFromBundle(i,h)]=c}n[i]=l}}),r?n[e[0]]:n}resolveUrl(e){const r=this.resolve(e);if(typeof e!="string"){const n={};for(const i in r)n[i]=r[i].src;return n}return r.src}resolve(e){const r=Sf(e);e=jn(e);const n={};return e.forEach(i=>{if(!this._resolverHash[i])if(this._assetMap[i]){let s=this._assetMap[i];const o=s[0],l=this._getPreferredOrder(s);l==null||l.priority.forEach(h=>{l.params[h].forEach(c=>{const f=s.filter(m=>m[h]?m[h]===c:!1);f.length&&(s=f)})}),this._resolverHash[i]=s[0]??o}else this._resolverHash[i]=this.buildResolvedAsset({alias:[i],src:i},{});n[i]=this._resolverHash[i]}),r?n[e[0]]:n}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let r=0;r<e.length;r++){const n=e[0],i=this._preferredOrder.find(s=>s.params.format.includes(n.format));if(i)return i}return this._preferredOrder[0]}_appendDefaultSearchParams(e){if(!this._defaultSearchParams)return e;const r=/\?/.test(e)?"&":"?";return`${e}${r}${this._defaultSearchParams}`}buildResolvedAsset(e,r){const{aliases:n,data:i,loadParser:s,format:o}=r;return(this._basePath||this._rootPath)&&(e.src=Kt.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=n??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...i||{},...e.data},e.loadParser=s??e.loadParser,e.format=o??e.format??Kt.extname(e.src).slice(1),e.srcs=e.src,e.name=e.alias,e}}class QD{constructor(){this._detections=[],this._initialized=!1,this.resolver=new YD,this.loader=new wD,this.cache=Io,this._backgroundLoader=new vD(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(e={}){var s,o;if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");return}if(this._initialized=!0,e.defaultSearchParams&&this.resolver.setDefaultSearchParams(e.defaultSearchParams),e.basePath&&(this.resolver.basePath=e.basePath),e.bundleIdentifier&&this.resolver.setBundleIdentifier(e.bundleIdentifier),e.manifest){let l=e.manifest;typeof l=="string"&&(l=await this.load(l)),this.resolver.addManifest(l)}const r=((s=e.texturePreference)==null?void 0:s.resolution)??1,n=typeof r=="number"?[r]:r,i=await this._detectFormats({preferredFormats:(o=e.texturePreference)==null?void 0:o.format,skipDetections:e.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:i,resolution:n}}),e.preferences&&this.setPreferences(e.preferences)}add(e,r,n,i,s){this.resolver.add(e,r,n,i,s)}async load(e,r){this._initialized||await this.init();const n=Sf(e),i=jn(e).map(l=>{if(typeof l!="string"){const h=this.resolver.getAlias(l);return h.some(c=>!this.resolver.hasKey(c))&&this.add(l),Array.isArray(h)?h[0]:h}return this.resolver.hasKey(l)||this.add({alias:l,src:l}),l}),s=this.resolver.resolve(i),o=await this._mapLoadToResolve(s,r);return n?o[i[0]]:o}addBundle(e,r){this.resolver.addBundle(e,r)}async loadBundle(e,r){this._initialized||await this.init();let n=!1;typeof e=="string"&&(n=!0,e=[e]);const i=this.resolver.resolveBundle(e),s={},o=Object.keys(i);let l=0,h=0;const c=()=>{r==null||r(++l/h)},f=o.map(m=>{const p=i[m];return h+=Object.keys(p).length,this._mapLoadToResolve(p,c).then(v=>{s[m]=v})});return await Promise.all(f),n?s[e[0]]:s}async backgroundLoad(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const r=this.resolver.resolve(e);this._backgroundLoader.add(Object.values(r))}async backgroundLoadBundle(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const r=this.resolver.resolveBundle(e);Object.values(r).forEach(n=>{this._backgroundLoader.add(Object.values(n))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(e){if(typeof e=="string")return Io.get(e);const r={};for(let n=0;n<e.length;n++)r[n]=Io.get(e[n]);return r}async _mapLoadToResolve(e,r){const n=Object.values(e),i=Object.keys(e);this._backgroundLoader.active=!1;const s=await this.loader.load(n,r);this._backgroundLoader.active=!0;const o={};return n.forEach((l,h)=>{const c=s[l.src],f=[l.src];l.alias&&f.push(...l.alias),o[i[h]]=c,Io.set(f,c)}),o}async unload(e){this._initialized||await this.init();const r=jn(e).map(i=>typeof i!="string"?i.src:i),n=this.resolver.resolve(r);await this._unloadFromResolved(n)}async unloadBundle(e){this._initialized||await this.init(),e=jn(e);const r=this.resolver.resolveBundle(e),n=Object.keys(r).map(i=>this._unloadFromResolved(r[i]));await Promise.all(n)}async _unloadFromResolved(e){const r=Object.values(e);r.forEach(n=>{Io.remove(n.src)}),await this.loader.unload(r)}async _detectFormats(e){let r=[];e.preferredFormats&&(r=Array.isArray(e.preferredFormats)?e.preferredFormats:[e.preferredFormats]);for(const n of e.detections)e.skipDetections||await n.test()?r=await n.add(r):e.skipDetections||(r=await n.remove(r));return r=r.filter((n,i)=>r.indexOf(n)===i),r}get detections(){return this._detections}get preferWorkers(){return cp.config.preferWorkers}set preferWorkers(e){Ue("7.2.0","Assets.prefersWorkers is deprecated, use Assets.setPreferences({ preferWorkers: true }) instead."),this.setPreferences({preferWorkers:e})}setPreferences(e){this.loader.parsers.forEach(r=>{r.config&&Object.keys(r.config).filter(n=>n in e).forEach(n=>{r.config[n]=e[n]})})}}const Qc=new QD;we.handleByList(ae.LoadParser,Qc.loader.parsers).handleByList(ae.ResolveParser,Qc.resolver.parsers).handleByList(ae.CacheParser,Qc.cache.parsers).handleByList(ae.DetectionParser,Qc.detections);const KD={extension:ae.CacheParser,test:t=>Array.isArray(t)&&t.every(e=>e instanceof se),getCacheableAssets:(t,e)=>{const r={};return t.forEach(n=>{e.forEach((i,s)=>{r[n+(s===0?"":s+1)]=i})}),r}};we.add(KD);async function IC(t){if("Image"in globalThis)return new Promise(e=>{const r=new Image;r.onload=()=>{e(!0)},r.onerror=()=>{e(!1)},r.src=t});if("createImageBitmap"in globalThis&&"fetch"in globalThis){try{const e=await(await fetch(t)).blob();await createImageBitmap(e)}catch{return!1}return!0}return!1}const qD={extension:{type:ae.DetectionParser,priority:1},test:async()=>IC("data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="),add:async t=>[...t,"avif"],remove:async t=>t.filter(e=>e!=="avif")};we.add(qD);const ZD={extension:{type:ae.DetectionParser,priority:0},test:async()=>IC("data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="),add:async t=>[...t,"webp"],remove:async t=>t.filter(e=>e!=="webp")};we.add(ZD);const NE=["png","jpg","jpeg"],JD={extension:{type:ae.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async t=>[...t,...NE],remove:async t=>t.filter(e=>!NE.includes(e))};we.add(JD);const eO="WorkerGlobalScope"in globalThis&&globalThis instanceof globalThis.WorkerGlobalScope;function h_(t){return eO?!1:document.createElement("video").canPlayType(t)!==""}const tO={extension:{type:ae.DetectionParser,priority:0},test:async()=>h_("video/webm"),add:async t=>[...t,"webm"],remove:async t=>t.filter(e=>e!=="webm")};we.add(tO);const rO={extension:{type:ae.DetectionParser,priority:0},test:async()=>h_("video/mp4"),add:async t=>[...t,"mp4","m4v"],remove:async t=>t.filter(e=>e!=="mp4"&&e!=="m4v")};we.add(rO);const nO={extension:{type:ae.DetectionParser,priority:0},test:async()=>h_("video/ogg"),add:async t=>[...t,"ogv"],remove:async t=>t.filter(e=>e!=="ogv")};we.add(nO);const iO={extension:ae.ResolveParser,test:cp.test,parse:t=>{var e;return{resolution:parseFloat(((e=he.RETINA_PREFIX.exec(t))==null?void 0:e[1])??"1"),format:Kt.extname(t).slice(1),src:t}}};we.add(iO);const sO=[".xml",".fnt"],oO={extension:{type:ae.LoadParser,priority:qn.Normal},name:"loadBitmapFont",test(t){return sO.includes(Kt.extname(t).toLowerCase())},async testParse(t){return Dd.test(t)||Dv.test(t)},async parse(t,e,r){const n=Dd.test(t)?Dd.parse(t):Dv.parse(t),{src:i}=e,{page:s}=n,o=[];for(let c=0;c<s.length;++c){const f=s[c].file;let m=Kt.join(Kt.dirname(i),f);m=Ov(m,i),o.push(m)}const l=await r.load(o),h=o.map(c=>l[c]);return Ts.install(n,h,!0)},async load(t,e){return(await he.ADAPTER.fetch(t)).text()},unload(t){t.destroy()}};we.add(oO);const bf={build(t){const e=t.points;let r,n,i,s,o,l;if(t.type===sr.CIRC){const _=t.shape;r=_.x,n=_.y,o=l=_.radius,i=s=0}else if(t.type===sr.ELIP){const _=t.shape;r=_.x,n=_.y,o=_.width,l=_.height,i=s=0}else{const _=t.shape,E=_.width/2,T=_.height/2;r=_.x+E,n=_.y+T,o=l=Math.max(0,Math.min(_.radius,Math.min(E,T))),i=E-o,s=T-l}if(!(o>=0&&l>=0&&i>=0&&s>=0)){e.length=0;return}const h=Math.ceil(2.3*Math.sqrt(o+l)),c=h*8+(i?4:0)+(s?4:0);if(e.length=c,c===0)return;if(h===0){e.length=8,e[0]=e[6]=r+i,e[1]=e[3]=n+s,e[2]=e[4]=r-i,e[5]=e[7]=n-s;return}let f=0,m=h*4+(i?2:0)+2,p=m,v=c;{const _=i+o,E=s,T=r+_,S=r-_,b=n+E;if(e[f++]=T,e[f++]=b,e[--m]=b,e[--m]=S,s){const x=n-E;e[p++]=S,e[p++]=x,e[--v]=x,e[--v]=T}}for(let _=1;_<h;_++){const E=Math.PI/2*(_/h),T=i+Math.cos(E)*o,S=s+Math.sin(E)*l,b=r+T,x=r-T,A=n+S,R=n-S;e[f++]=b,e[f++]=A,e[--m]=A,e[--m]=x,e[p++]=x,e[p++]=R,e[--v]=R,e[--v]=b}{const _=i,E=s+l,T=r+_,S=r-_,b=n+E,x=n-E;e[f++]=T,e[f++]=b,e[--v]=x,e[--v]=T,i&&(e[f++]=S,e[f++]=b,e[--v]=x,e[--v]=S)}},triangulate(t,e){const r=t.points,n=e.points,i=e.indices;if(r.length===0)return;let s=n.length/2;const o=s;let l,h;if(t.type!==sr.RREC){const f=t.shape;l=f.x,h=f.y}else{const f=t.shape;l=f.x+f.width/2,h=f.y+f.height/2}const c=t.matrix;n.push(t.matrix?c.a*l+c.c*h+c.tx:l,t.matrix?c.b*l+c.d*h+c.ty:h),s++,n.push(r[0],r[1]);for(let f=2;f<r.length;f+=2)n.push(r[f],r[f+1]),i.push(s++,o,s);i.push(o+1,o,s)}};function DE(t,e=!1){const r=t.length;if(r<6)return;let n=0;for(let i=0,s=t[r-2],o=t[r-1];i<r;i+=2){const l=t[i],h=t[i+1];n+=(l-s)*(h+o),s=l,o=h}if(!e&&n>0||e&&n<=0){const i=r/2;for(let s=i+i%2;s<r;s+=2){const o=r-s-2,l=r-s-1,h=s,c=s+1;[t[o],t[h]]=[t[h],t[o]],[t[l],t[c]]=[t[c],t[l]]}}}const RC={build(t){t.points=t.shape.points.slice()},triangulate(t,e){let r=t.points;const n=t.holes,i=e.points,s=e.indices;if(r.length>=6){DE(r,!1);const o=[];for(let c=0;c<n.length;c++){const f=n[c];DE(f.points,!0),o.push(r.length/2),r=r.concat(f.points)}const l=hM(r,o,2);if(!l)return;const h=i.length/2;for(let c=0;c<l.length;c+=3)s.push(l[c]+h),s.push(l[c+1]+h),s.push(l[c+2]+h);for(let c=0;c<r.length;c++)i.push(r[c])}}},aO={build(t){const e=t.shape,r=e.x,n=e.y,i=e.width,s=e.height,o=t.points;o.length=0,i>=0&&s>=0&&o.push(r,n,r+i,n,r+i,n+s,r,n+s)},triangulate(t,e){const r=t.points,n=e.points;if(r.length===0)return;const i=n.length/2;n.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),e.indices.push(i,i+1,i+2,i+1,i+2,i+3)}},lO={build(t){bf.build(t)},triangulate(t,e){bf.triangulate(t,e)}};var gn=(t=>(t.MITER="miter",t.BEVEL="bevel",t.ROUND="round",t))(gn||{}),Os=(t=>(t.BUTT="butt",t.ROUND="round",t.SQUARE="square",t))(Os||{});const dl={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(t,e=20){if(!this.adaptive||!t||isNaN(t))return e;let r=Math.ceil(t/this.maxLength);return r<this.minSegments?r=this.minSegments:r>this.maxSegments&&(r=this.maxSegments),r}};class OE{static curveTo(e,r,n,i,s,o){const l=o[o.length-2],h=o[o.length-1]-r,c=l-e,f=i-r,m=n-e,p=Math.abs(h*m-c*f);if(p<1e-8||s===0)return(o[o.length-2]!==e||o[o.length-1]!==r)&&o.push(e,r),null;const v=h*h+c*c,_=f*f+m*m,E=h*f+c*m,T=s*Math.sqrt(v)/p,S=s*Math.sqrt(_)/p,b=T*E/v,x=S*E/_,A=T*m+S*c,R=T*f+S*h,L=c*(S+b),N=h*(S+b),D=m*(T+x),q=f*(T+x),$=Math.atan2(N-R,L-A),me=Math.atan2(q-R,D-A);return{cx:A+e,cy:R+r,radius:s,startAngle:$,endAngle:me,anticlockwise:c*f>m*h}}static arc(e,r,n,i,s,o,l,h,c){const f=l-o,m=dl._segmentsCount(Math.abs(f)*s,Math.ceil(Math.abs(f)/gf)*40),p=f/(m*2),v=p*2,_=Math.cos(p),E=Math.sin(p),T=m-1,S=T%1/T;for(let b=0;b<=T;++b){const x=b+S*b,A=p+o+v*x,R=Math.cos(A),L=-Math.sin(A);c.push((_*R+E*L)*s+n,(_*-L+E*R)*s+i)}}}class uO{constructor(){this.reset()}begin(e,r,n){this.reset(),this.style=e,this.start=r,this.attribStart=n}end(e,r){this.attribSize=r-this.attribStart,this.size=e-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class c_{static curveLength(e,r,n,i,s,o,l,h){let c=0,f=0,m=0,p=0,v=0,_=0,E=0,T=0,S=0,b=0,x=0,A=e,R=r;for(let L=1;L<=10;++L)f=L/10,m=f*f,p=m*f,v=1-f,_=v*v,E=_*v,T=E*e+3*_*f*n+3*v*m*s+p*l,S=E*r+3*_*f*i+3*v*m*o+p*h,b=A-T,x=R-S,A=T,R=S,c+=Math.sqrt(b*b+x*x);return c}static curveTo(e,r,n,i,s,o,l){const h=l[l.length-2],c=l[l.length-1];l.length-=2;const f=dl._segmentsCount(c_.curveLength(h,c,e,r,n,i,s,o));let m=0,p=0,v=0,_=0,E=0;l.push(h,c);for(let T=1,S=0;T<=f;++T)S=T/f,m=1-S,p=m*m,v=p*m,_=S*S,E=_*S,l.push(v*h+3*p*S*e+3*m*_*n+E*s,v*c+3*p*S*r+3*m*_*i+E*o)}}function FE(t,e,r,n,i,s,o,l){const h=t-r*i,c=e-n*i,f=t+r*s,m=e+n*s;let p,v;o?(p=n,v=-r):(p=-n,v=r);const _=h+p,E=c+v,T=f+p,S=m+v;return l.push(_,E,T,S),2}function vo(t,e,r,n,i,s,o,l){const h=r-t,c=n-e;let f=Math.atan2(h,c),m=Math.atan2(i-t,s-e);l&&f<m?f+=Math.PI*2:!l&&f>m&&(m+=Math.PI*2);let p=f;const v=m-f,_=Math.abs(v),E=Math.sqrt(h*h+c*c),T=(15*_*Math.sqrt(E)/Math.PI>>0)+1,S=v/T;if(p+=S,l){o.push(t,e,r,n);for(let b=1,x=p;b<T;b++,x+=S)o.push(t,e,t+Math.sin(x)*E,e+Math.cos(x)*E);o.push(t,e,i,s)}else{o.push(r,n,t,e);for(let b=1,x=p;b<T;b++,x+=S)o.push(t+Math.sin(x)*E,e+Math.cos(x)*E,t,e);o.push(i,s,t,e)}return T*2}function hO(t,e){const r=t.shape;let n=t.points||r.points.slice();const i=e.closePointEps;if(n.length===0)return;const s=t.lineStyle,o=new Ge(n[0],n[1]),l=new Ge(n[n.length-2],n[n.length-1]),h=r.type!==sr.POLY||r.closeStroke,c=Math.abs(o.x-l.x)<i&&Math.abs(o.y-l.y)<i;if(h){n=n.slice(),c&&(n.pop(),n.pop(),l.set(n[n.length-2],n[n.length-1]));const fe=(o.x+l.x)*.5,M=(l.y+o.y)*.5;n.unshift(fe,M),n.push(fe,M)}const f=e.points,m=n.length/2;let p=n.length;const v=f.length/2,_=s.width/2,E=_*_,T=s.miterLimit*s.miterLimit;let S=n[0],b=n[1],x=n[2],A=n[3],R=0,L=0,N=-(b-A),D=S-x,q=0,$=0,me=Math.sqrt(N*N+D*D);N/=me,D/=me,N*=_,D*=_;const ne=s.alignment,B=(1-ne)*2,K=ne*2;h||(s.cap===Os.ROUND?p+=vo(S-N*(B-K)*.5,b-D*(B-K)*.5,S-N*B,b-D*B,S+N*K,b+D*K,f,!0)+2:s.cap===Os.SQUARE&&(p+=FE(S,b,N,D,B,K,!0,f))),f.push(S-N*B,b-D*B,S+N*K,b+D*K);for(let fe=1;fe<m-1;++fe){S=n[(fe-1)*2],b=n[(fe-1)*2+1],x=n[fe*2],A=n[fe*2+1],R=n[(fe+1)*2],L=n[(fe+1)*2+1],N=-(b-A),D=S-x,me=Math.sqrt(N*N+D*D),N/=me,D/=me,N*=_,D*=_,q=-(A-L),$=x-R,me=Math.sqrt(q*q+$*$),q/=me,$/=me,q*=_,$*=_;const M=x-S,W=b-A,O=x-R,H=L-A,z=M*O+W*H,X=W*O-H*M,J=X<0;if(Math.abs(X)<.001*Math.abs(z)){f.push(x-N*B,A-D*B,x+N*K,A+D*K),z>=0&&(s.join===gn.ROUND?p+=vo(x,A,x-N*B,A-D*B,x-q*B,A-$*B,f,!1)+4:p+=2,f.push(x-q*K,A-$*K,x+q*B,A+$*B));continue}const ve=(-N+S)*(-D+A)-(-N+x)*(-D+b),le=(-q+R)*(-$+A)-(-q+x)*(-$+L),Te=(M*le-O*ve)/X,Ce=(H*ve-W*le)/X,pe=(Te-x)*(Te-x)+(Ce-A)*(Ce-A),P=x+(Te-x)*B,ue=A+(Ce-A)*B,Ee=x-(Te-x)*K,Re=A-(Ce-A)*K,Ke=Math.min(M*M+W*W,O*O+H*H),je=J?B:K,vt=Ke+je*je*E,St=pe<=vt;let Oe=s.join;if(Oe===gn.MITER&&pe/E>T&&(Oe=gn.BEVEL),St)switch(Oe){case gn.MITER:{f.push(P,ue,Ee,Re);break}case gn.BEVEL:{J?f.push(P,ue,x+N*K,A+D*K,P,ue,x+q*K,A+$*K):f.push(x-N*B,A-D*B,Ee,Re,x-q*B,A-$*B,Ee,Re),p+=2;break}case gn.ROUND:{J?(f.push(P,ue,x+N*K,A+D*K),p+=vo(x,A,x+N*K,A+D*K,x+q*K,A+$*K,f,!0)+4,f.push(P,ue,x+q*K,A+$*K)):(f.push(x-N*B,A-D*B,Ee,Re),p+=vo(x,A,x-N*B,A-D*B,x-q*B,A-$*B,f,!1)+4,f.push(x-q*B,A-$*B,Ee,Re));break}}else{switch(f.push(x-N*B,A-D*B,x+N*K,A+D*K),Oe){case gn.MITER:{J?f.push(Ee,Re,Ee,Re):f.push(P,ue,P,ue),p+=2;break}case gn.ROUND:{J?p+=vo(x,A,x+N*K,A+D*K,x+q*K,A+$*K,f,!0)+2:p+=vo(x,A,x-N*B,A-D*B,x-q*B,A-$*B,f,!1)+2;break}}f.push(x-q*B,A-$*B,x+q*K,A+$*K),p+=2}}S=n[(m-2)*2],b=n[(m-2)*2+1],x=n[(m-1)*2],A=n[(m-1)*2+1],N=-(b-A),D=S-x,me=Math.sqrt(N*N+D*D),N/=me,D/=me,N*=_,D*=_,f.push(x-N*B,A-D*B,x+N*K,A+D*K),h||(s.cap===Os.ROUND?p+=vo(x-N*(B-K)*.5,A-D*(B-K)*.5,x-N*B,A-D*B,x+N*K,A+D*K,f,!1)+2:s.cap===Os.SQUARE&&(p+=FE(x,A,N,D,B,K,!1,f)));const ie=e.indices,_e=dl.epsilon*dl.epsilon;for(let fe=v;fe<p+v-2;++fe)S=f[fe*2],b=f[fe*2+1],x=f[(fe+1)*2],A=f[(fe+1)*2+1],R=f[(fe+2)*2],L=f[(fe+2)*2+1],!(Math.abs(S*(A-L)+x*(L-b)+R*(b-A))<_e)&&ie.push(fe,fe+1,fe+2)}function cO(t,e){let r=0;const n=t.shape,i=t.points||n.points,s=n.type!==sr.POLY||n.closeStroke;if(i.length===0)return;const o=e.points,l=e.indices,h=i.length/2,c=o.length/2;let f=c;for(o.push(i[0],i[1]),r=1;r<h;r++)o.push(i[r*2],i[r*2+1]),l.push(f,f+1),f++;s&&l.push(f,c)}function BE(t,e){t.lineStyle.native?cO(t,e):hO(t,e)}class d_{static curveLength(e,r,n,i,s,o){const l=e-2*n+s,h=r-2*i+o,c=2*n-2*e,f=2*i-2*r,m=4*(l*l+h*h),p=4*(l*c+h*f),v=c*c+f*f,_=2*Math.sqrt(m+p+v),E=Math.sqrt(m),T=2*m*E,S=2*Math.sqrt(v),b=p/E;return(T*_+E*p*(_-S)+(4*v*m-p*p)*Math.log((2*E+b+_)/(b+S)))/(4*T)}static curveTo(e,r,n,i,s){const o=s[s.length-2],l=s[s.length-1],h=dl._segmentsCount(d_.curveLength(o,l,e,r,n,i));let c=0,f=0;for(let m=1;m<=h;++m){const p=m/h;c=o+(e-o)*p,f=l+(r-l)*p,s.push(c+(e+(n-e)*p-c)*p,f+(r+(i-r)*p-f)*p)}}}const Vg={[sr.POLY]:RC,[sr.CIRC]:bf,[sr.ELIP]:bf,[sr.RECT]:aO,[sr.RREC]:lO},LE=[],Kc=[];class Tf{constructor(e,r=null,n=null,i=null){this.points=[],this.holes=[],this.shape=e,this.lineStyle=n,this.fillStyle=r,this.matrix=i,this.type=e.type}clone(){return new Tf(this.shape,this.fillStyle,this.lineStyle,this.matrix)}destroy(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null}}const va=new Ge,MC=class kC extends FA{constructor(){super(),this.closePointEps=1e-4,this.boundsPadding=0,this.uvsFloat32=null,this.indicesUint16=null,this.batchable=!1,this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.drawCalls=[],this.batchDirty=-1,this.batches=[],this.dirty=0,this.cacheDirty=-1,this.clearDirty=0,this.shapeIndex=0,this._bounds=new wf,this.boundsDirty=-1}get bounds(){return this.updateBatches(),this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds}invalidate(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(let e=0;e<this.drawCalls.length;e++)this.drawCalls[e].texArray.clear(),Kc.push(this.drawCalls[e]);this.drawCalls.length=0;for(let e=0;e<this.batches.length;e++){const r=this.batches[e];r.reset(),LE.push(r)}this.batches.length=0}clear(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,r=null,n=null,i=null){const s=new Tf(e,r,n,i);return this.graphicsData.push(s),this.dirty++,this}drawHole(e,r=null){if(!this.graphicsData.length)return null;const n=new Tf(e,null,null,r),i=this.graphicsData[this.graphicsData.length-1];return n.lineStyle=i.lineStyle,i.holes.push(n),this.dirty++,this}destroy(){super.destroy();for(let e=0;e<this.graphicsData.length;++e)this.graphicsData[e].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null}containsPoint(e){const r=this.graphicsData;for(let n=0;n<r.length;++n){const i=r[n];if(i.fillStyle.visible&&i.shape&&(i.matrix?i.matrix.applyInverse(e,va):va.copyFrom(e),i.shape.contains(va.x,va.y))){let s=!1;if(i.holes){for(let o=0;o<i.holes.length;o++)if(i.holes[o].shape.contains(va.x,va.y)){s=!0;break}}if(!s)return!0}}return!1}updateBatches(){if(!this.graphicsData.length){this.batchable=!0;return}if(!this.validateBatching())return;this.cacheDirty=this.dirty;const e=this.uvs,r=this.graphicsData;let n=null,i=null;this.batches.length>0&&(n=this.batches[this.batches.length-1],i=n.style);for(let h=this.shapeIndex;h<r.length;h++){this.shapeIndex++;const c=r[h],f=c.fillStyle,m=c.lineStyle;Vg[c.type].build(c),c.matrix&&this.transformPoints(c.points,c.matrix),(f.visible||m.visible)&&this.processHoles(c.holes);for(let p=0;p<2;p++){const v=p===0?f:m;if(!v.visible)continue;const _=v.texture.baseTexture,E=this.indices.length,T=this.points.length/2;_.wrapMode=qi.REPEAT,p===0?this.processFill(c):this.processLine(c);const S=this.points.length/2-T;S!==0&&(n&&!this._compareStyles(i,v)&&(n.end(E,T),n=null),n||(n=LE.pop()||new uO,n.begin(v,E,T),this.batches.push(n),i=v),this.addUvs(this.points,e,v.texture,T,S,v.matrix))}}const s=this.indices.length,o=this.points.length/2;if(n&&n.end(s,o),this.batches.length===0){this.batchable=!0;return}const l=o>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&l===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=l?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,r){return!(!e||!r||e.texture.baseTexture!==r.texture.baseTexture||e.color+e.alpha!==r.color+r.alpha||!!e.native!=!!r.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,r=this.graphicsData.length;e<r;e++){const n=this.graphicsData[e],i=n.fillStyle,s=n.lineStyle;if(i&&!i.texture.baseTexture.valid||s&&!s.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);const e=this.batches;for(let r=0,n=e.length;r<n;r++){const i=e[r];for(let s=0;s<i.size;s++){const o=i.start+s;this.indicesUint16[o]=this.indicesUint16[o]-i.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;const e=this.batches;for(let r=0;r<e.length;r++)if(e[r].style.native)return!1;return this.points.length<kC.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++Ne._globalBatch;for(let m=0;m<this.drawCalls.length;m++)this.drawCalls[m].texArray.clear(),Kc.push(this.drawCalls[m]);this.drawCalls.length=0;const r=this.colors,n=this.textureIds;let i=Kc.pop();i||(i=new vv,i.texArray=new Ev),i.texArray.count=0,i.start=0,i.size=0,i.type=$n.TRIANGLES;let s=0,o=null,l=0,h=!1,c=$n.TRIANGLES,f=0;this.drawCalls.push(i);for(let m=0;m<this.batches.length;m++){const p=this.batches[m],v=8,_=p.style,E=_.texture.baseTexture;h!==!!_.native&&(h=!!_.native,c=h?$n.LINES:$n.TRIANGLES,o=null,s=v,e++),o!==E&&(o=E,E._batchEnabled!==e&&(s===v&&(e++,s=0,i.size>0&&(i=Kc.pop(),i||(i=new vv,i.texArray=new Ev),this.drawCalls.push(i)),i.start=f,i.size=0,i.texArray.count=0,i.type=c),E.touched=1,E._batchEnabled=e,E._batchLocation=s,E.wrapMode=qi.REPEAT,i.texArray.elements[i.texArray.count++]=E,s++)),i.size+=p.size,f+=p.size,l=E._batchLocation,this.addColors(r,_.color,_.alpha,p.attribSize,p.attribStart),this.addTextureIds(n,l,p.attribSize,p.attribStart)}Ne._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,r=this.uvs,n=this.colors,i=this.textureIds,s=new ArrayBuffer(e.length*3*4),o=new Float32Array(s),l=new Uint32Array(s);let h=0;for(let c=0;c<e.length/2;c++)o[h++]=e[c*2],o[h++]=e[c*2+1],o[h++]=r[c*2],o[h++]=r[c*2+1],l[h++]=n[c],o[h++]=i[c];this._buffer.update(s),this._indexBuffer.update(this.indicesUint16)}processFill(e){e.holes.length?RC.triangulate(e,this):Vg[e.type].triangulate(e,this)}processLine(e){BE(e,this);for(let r=0;r<e.holes.length;r++)BE(e.holes[r],this)}processHoles(e){for(let r=0;r<e.length;r++){const n=e[r];Vg[n.type].build(n),n.matrix&&this.transformPoints(n.points,n.matrix)}}calculateBounds(){const e=this._bounds;e.clear(),e.addVertexData(this.points,0,this.points.length),e.pad(this.boundsPadding,this.boundsPadding)}transformPoints(e,r){for(let n=0;n<e.length/2;n++){const i=e[n*2],s=e[n*2+1];e[n*2]=r.a*i+r.c*s+r.tx,e[n*2+1]=r.b*i+r.d*s+r.ty}}addColors(e,r,n,i,s=0){const o=tt.shared.setValue(r).toLittleEndianNumber(),l=tt.shared.setValue(o).toPremultiplied(n);e.length=Math.max(e.length,s+i);for(let h=0;h<i;h++)e[s+h]=l}addTextureIds(e,r,n,i=0){e.length=Math.max(e.length,i+n);for(let s=0;s<n;s++)e[i+s]=r}addUvs(e,r,n,i,s,o=null){let l=0;const h=r.length,c=n.frame;for(;l<s;){let m=e[(i+l)*2],p=e[(i+l)*2+1];if(o){const v=o.a*m+o.c*p+o.tx;p=o.b*m+o.d*p+o.ty,m=v}l++,r.push(m/c.width,p/c.height)}const f=n.baseTexture;(c.width<f.width||c.height<f.height)&&this.adjustUvs(r,n,h,s)}adjustUvs(e,r,n,i){const s=r.baseTexture,o=1e-6,l=n+i*2,h=r.frame,c=h.width/s.width,f=h.height/s.height;let m=h.x/h.width,p=h.y/h.height,v=Math.floor(e[n]+o),_=Math.floor(e[n+1]+o);for(let E=n+2;E<l;E+=2)v=Math.min(v,Math.floor(e[E]+o)),_=Math.min(_,Math.floor(e[E+1]+o));m-=v,p-=_;for(let E=n;E<l;E+=2)e[E]=(e[E]+m)*c,e[E+1]=(e[E+1]+p)*f}};MC.BATCHABLE_SIZE=100;let dO=MC;class dp{constructor(){this.color=16777215,this.alpha=1,this.texture=se.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const e=new dp;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e}reset(){this.color=16777215,this.alpha=1,this.texture=se.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class f_ extends dp{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=Os.BUTT,this.join=gn.MITER,this.miterLimit=10}clone(){const e=new f_;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e.width=this.width,e.alignment=this.alignment,e.native=this.native,e.cap=this.cap,e.join=this.join,e.miterLimit=this.miterLimit,e}reset(){super.reset(),this.color=0,this.alignment=.5,this.width=0,this.native=!1,this.cap=Os.BUTT,this.join=gn.MITER,this.miterLimit=10}}const Xg={},Bv=class Fd extends Tr{constructor(e=null){super(),this.shader=null,this.pluginName="batch",this.currentPath=null,this.batches=[],this.batchTint=-1,this.batchDirty=-1,this.vertexData=null,this._fillStyle=new dp,this._lineStyle=new f_,this._matrix=null,this._holeMode=!1,this.state=Mi.for2d(),this._geometry=e||new dO,this._geometry.refCount++,this._transformID=-1,this._tintColor=new tt(16777215),this.blendMode=Ie.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new Fd(this._geometry)}set blendMode(e){this.state.blendMode=e}get blendMode(){return this.state.blendMode}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e)}get fill(){return this._fillStyle}get line(){return this._lineStyle}lineStyle(e=null,r=0,n,i=.5,s=!1){return typeof e=="number"&&(e={width:e,color:r,alpha:n,alignment:i,native:s}),this.lineTextureStyle(e)}lineTextureStyle(e){const r={width:0,texture:se.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:Os.BUTT,join:gn.MITER,miterLimit:10};e=Object.assign(r,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const n=e.width>0&&e.alpha>0;return n?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:n},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,r=this.currentPath.points.length;r>2&&(this.drawShape(this.currentPath),this.currentPath=new Fo,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[r-2],e[r-1]))}else this.currentPath=new Fo,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(e,r){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=r,this}lineTo(e,r){this.currentPath||this.moveTo(0,0);const n=this.currentPath.points,i=n[n.length-2],s=n[n.length-1];return(i!==e||s!==r)&&n.push(e,r),this}_initCurve(e=0,r=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,r]):this.moveTo(e,r)}quadraticCurveTo(e,r,n,i){this._initCurve();const s=this.currentPath.points;return s.length===0&&this.moveTo(0,0),d_.curveTo(e,r,n,i,s),this}bezierCurveTo(e,r,n,i,s,o){return this._initCurve(),c_.curveTo(e,r,n,i,s,o,this.currentPath.points),this}arcTo(e,r,n,i,s){this._initCurve(e,r);const o=this.currentPath.points,l=OE.curveTo(e,r,n,i,s,o);if(l){const{cx:h,cy:c,radius:f,startAngle:m,endAngle:p,anticlockwise:v}=l;this.arc(h,c,f,m,p,v)}return this}arc(e,r,n,i,s,o=!1){if(i===s)return this;if(!o&&s<=i?s+=gf:o&&i<=s&&(i+=gf),s-i===0)return this;const l=e+Math.cos(i)*n,h=r+Math.sin(i)*n,c=this._geometry.closePointEps;let f=this.currentPath?this.currentPath.points:null;if(f){const m=Math.abs(f[f.length-2]-l),p=Math.abs(f[f.length-1]-h);m<c&&p<c||f.push(l,h)}else this.moveTo(l,h),f=this.currentPath.points;return OE.arc(l,h,e,r,n,i,s,o,f),this}beginFill(e=0,r){return this.beginTextureFill({texture:se.WHITE,color:e,alpha:r})}normalizeColor(e){const r=tt.shared.setValue(e.color??0);e.color=r.toNumber(),e.alpha??(e.alpha=r.alpha)}beginTextureFill(e){const r={texture:se.WHITE,color:16777215,matrix:null};e=Object.assign(r,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const n=e.alpha>0;return n?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:n},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,r,n,i){return this.drawShape(new De(e,r,n,i))}drawRoundedRect(e,r,n,i,s){return this.drawShape(new op(e,r,n,i,s))}drawCircle(e,r,n){return this.drawShape(new ip(e,r,n))}drawEllipse(e,r,n,i){return this.drawShape(new sp(e,r,n,i))}drawPolygon(...e){let r,n=!0;const i=e[0];i.points?(n=i.closeStroke,r=i.points):Array.isArray(e[0])?r=e[0]:r=e;const s=new Fo(r);return s.closeStroke=n,this.drawShape(s),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===sr.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const r=this._geometry;r.updateBatches(),r.batchable?(this.batchDirty!==r.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,r=this.blendMode,n=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=n,this.vertexData=new Float32Array(e.points);for(let i=0;i<n;i++){const s=e.batches[i],o=s.style.color,l=new Float32Array(this.vertexData.buffer,s.attribStart*4*2,s.attribSize*2),h=new Float32Array(e.uvsFloat32.buffer,s.attribStart*4*2,s.attribSize*2),c=new Uint16Array(e.indicesUint16.buffer,s.start*2,s.size),f={vertexData:l,blendMode:r,indices:c,uvs:h,_batchRGB:tt.shared.setValue(o).toRgbArray(),_tintRGB:o,_texture:s.style.texture,alpha:s.style.alpha,worldAlpha:1};this.batches[i]=f}}_renderBatched(e){if(this.batches.length){e.batch.setObjectRenderer(e.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let r=0,n=this.batches.length;r<n;r++){const i=this.batches[r];i.worldAlpha=this.worldAlpha*i.alpha,e.plugins[this.pluginName].render(i)}}}_renderDirect(e){const r=this._resolveDirectShader(e),n=this._geometry,i=this.worldAlpha,s=r.uniforms,o=n.drawCalls;s.translationMatrix=this.transform.worldTransform,tt.shared.setValue(this._tintColor).premultiply(i).toArray(s.tint),e.shader.bind(r),e.geometry.bind(n,r),e.state.set(this.state);for(let l=0,h=o.length;l<h;l++)this._renderDrawCallDirect(e,n.drawCalls[l])}_renderDrawCallDirect(e,r){const{texArray:n,type:i,size:s,start:o}=r,l=n.count;for(let h=0;h<l;h++)e.texture.bind(n.elements[h],h);e.geometry.draw(i,s,o)}_resolveDirectShader(e){let r=this.shader;const n=this.pluginName;if(!r){if(!Xg[n]){const{maxTextures:i}=e.plugins[n],s=new Int32Array(i);for(let h=0;h<i;h++)s[h]=h;const o={tint:new Float32Array([1,1,1,1]),translationMatrix:new ot,default:Qn.from({uSamplers:s},!0)},l=e.plugins[n]._shader.program;Xg[n]=new Ci(l,o)}r=Xg[n]}return r}_calculateBounds(){this.finishPoly();const e=this._geometry;if(!e.graphicsData.length)return;const{minX:r,minY:n,maxX:i,maxY:s}=e.bounds;this._bounds.addFrame(this.transform,r,n,i,s)}containsPoint(e){return this.worldTransform.applyInverse(e,Fd._TEMP_POINT),this._geometry.containsPoint(Fd._TEMP_POINT)}calculateTints(){if(this.batchTint!==this.tint){this.batchTint=this._tintColor.toNumber();for(let e=0;e<this.batches.length;e++){const r=this.batches[e];r._tintRGB=tt.shared.setValue(this._tintColor).multiply(r._batchRGB).toLittleEndianNumber()}}}calculateVertices(){const e=this.transform._worldID;if(this._transformID===e)return;this._transformID=e;const r=this.transform.worldTransform,n=r.a,i=r.b,s=r.c,o=r.d,l=r.tx,h=r.ty,c=this._geometry.points,f=this.vertexData;let m=0;for(let p=0;p<c.length;p+=2){const v=c[p],_=c[p+1];f[m++]=n*v+s*_+l,f[m++]=o*_+i*v+h}}closePath(){const e=this.currentPath;return e&&(e.closeStroke=!0,this.finishPoly()),this}setMatrix(e){return this._matrix=e,this}beginHole(){return this.finishPoly(),this._holeMode=!0,this}endHole(){return this.finishPoly(),this._holeMode=!1,this}destroy(e){this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,super.destroy(e)}};Bv.curves=dl,Bv._TEMP_POINT=new Ge;let Iu=Bv;class fO extends hp{constructor(e=100,r=100,n=10,i=10){super(),this.segWidth=n,this.segHeight=i,this.width=e,this.height=r,this.build()}build(){const e=this.segWidth*this.segHeight,r=[],n=[],i=[],s=this.segWidth-1,o=this.segHeight-1,l=this.width/s,h=this.height/o;for(let f=0;f<e;f++){const m=f%this.segWidth,p=f/this.segWidth|0;r.push(m*l,p*h),n.push(m/s,p/o)}const c=s*o;for(let f=0;f<c;f++){const m=f%s,p=f/s|0,v=p*this.segWidth+m,_=p*this.segWidth+m+1,E=(p+1)*this.segWidth+m,T=(p+1)*this.segWidth+m+1;i.push(v,_,E,_,T,E)}this.buffers[0].data=new Float32Array(r),this.buffers[1].data=new Float32Array(n),this.indexBuffer.data=new Uint16Array(i),this.buffers[0].update(),this.buffers[1].update(),this.indexBuffer.update()}}class pO extends hp{constructor(e=200,r,n=0){super(new Float32Array(r.length*4),new Float32Array(r.length*4),new Uint16Array((r.length-1)*6)),this.points=r,this._width=e,this.textureScale=n,this.build()}get width(){return this._width}build(){const e=this.points;if(!e)return;const r=this.getBuffer("aVertexPosition"),n=this.getBuffer("aTextureCoord"),i=this.getIndex();if(e.length<1)return;r.data.length/4!==e.length&&(r.data=new Float32Array(e.length*4),n.data=new Float32Array(e.length*4),i.data=new Uint16Array((e.length-1)*6));const s=n.data,o=i.data;s[0]=0,s[1]=0,s[2]=0,s[3]=1;let l=0,h=e[0];const c=this._width*this.textureScale,f=e.length;for(let p=0;p<f;p++){const v=p*4;if(this.textureScale>0){const _=h.x-e[p].x,E=h.y-e[p].y,T=Math.sqrt(_*_+E*E);h=e[p],l+=T/c}else l=p/(f-1);s[v]=l,s[v+1]=0,s[v+2]=l,s[v+3]=1}let m=0;for(let p=0;p<f-1;p++){const v=p*2;o[m++]=v,o[m++]=v+1,o[m++]=v+2,o[m++]=v+2,o[m++]=v+1,o[m++]=v+3}n.update(),i.update(),this.updateVertices()}updateVertices(){const e=this.points;if(e.length<1)return;let r=e[0],n,i=0,s=0;const o=this.buffers[0].data,l=e.length,h=this.textureScale>0?this.textureScale*this._width/2:this._width/2;for(let c=0;c<l;c++){const f=e[c],m=c*4;c<e.length-1?n=e[c+1]:n=f,s=-(n.x-r.x),i=n.y-r.y;const p=Math.sqrt(i*i+s*s);p<1e-6?(i=0,s=0):(i/=p,s/=p,i*=h,s*=h),o[m]=f.x+i,o[m+1]=f.y+s,o[m+2]=f.x-i,o[m+3]=f.y-s,r=f}this.buffers[0].update()}update(){this.textureScale>0?this.build():this.updateVertices()}}class mO extends Zu{constructor(e,r,n){const i=new fO(e.width,e.height,r,n),s=new Ju(se.WHITE);super(i,s),this.texture=e,this.autoResize=!0}textureUpdated(){this._textureID=this.shader.texture._updateID;const e=this.geometry,{width:r,height:n}=this.shader.texture;this.autoResize&&(e.width!==r||e.height!==n)&&(e.width=this.shader.texture.width,e.height=this.shader.texture.height,e.build())}set texture(e){this.shader.texture!==e&&(this.shader.texture=e,this._textureID=-1,e.baseTexture.valid?this.textureUpdated():e.once("update",this.textureUpdated,this))}get texture(){return this.shader.texture}_render(e){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),super._render(e)}destroy(e){this.shader.texture.off("update",this.textureUpdated,this),super.destroy(e)}}const qc=10;class gO extends mO{constructor(e,r,n,i,s){var o,l,h,c;super(se.WHITE,4,4),this._origWidth=e.orig.width,this._origHeight=e.orig.height,this._width=this._origWidth,this._height=this._origHeight,this._leftWidth=r??((o=e.defaultBorders)==null?void 0:o.left)??qc,this._rightWidth=i??((l=e.defaultBorders)==null?void 0:l.right)??qc,this._topHeight=n??((h=e.defaultBorders)==null?void 0:h.top)??qc,this._bottomHeight=s??((c=e.defaultBorders)==null?void 0:c.bottom)??qc,this.texture=e}textureUpdated(){this._textureID=this.shader.texture._updateID,this._refresh()}get vertices(){return this.geometry.getBuffer("aVertexPosition").data}set vertices(e){this.geometry.getBuffer("aVertexPosition").data=e}updateHorizontalVertices(){const e=this.vertices,r=this._getMinScale();e[9]=e[11]=e[13]=e[15]=this._topHeight*r,e[17]=e[19]=e[21]=e[23]=this._height-this._bottomHeight*r,e[25]=e[27]=e[29]=e[31]=this._height}updateVerticalVertices(){const e=this.vertices,r=this._getMinScale();e[2]=e[10]=e[18]=e[26]=this._leftWidth*r,e[4]=e[12]=e[20]=e[28]=this._width-this._rightWidth*r,e[6]=e[14]=e[22]=e[30]=this._width}_getMinScale(){const e=this._leftWidth+this._rightWidth,r=this._width>e?1:this._width/e,n=this._topHeight+this._bottomHeight,i=this._height>n?1:this._height/n;return Math.min(r,i)}get width(){return this._width}set width(e){this._width=e,this._refresh()}get height(){return this._height}set height(e){this._height=e,this._refresh()}get leftWidth(){return this._leftWidth}set leftWidth(e){this._leftWidth=e,this._refresh()}get rightWidth(){return this._rightWidth}set rightWidth(e){this._rightWidth=e,this._refresh()}get topHeight(){return this._topHeight}set topHeight(e){this._topHeight=e,this._refresh()}get bottomHeight(){return this._bottomHeight}set bottomHeight(e){this._bottomHeight=e,this._refresh()}_refresh(){const e=this.texture,r=this.geometry.buffers[1].data;this._origWidth=e.orig.width,this._origHeight=e.orig.height;const n=1/this._origWidth,i=1/this._origHeight;r[0]=r[8]=r[16]=r[24]=0,r[1]=r[3]=r[5]=r[7]=0,r[6]=r[14]=r[22]=r[30]=1,r[25]=r[27]=r[29]=r[31]=1,r[2]=r[10]=r[18]=r[26]=n*this._leftWidth,r[4]=r[12]=r[20]=r[28]=1-n*this._rightWidth,r[9]=r[11]=r[13]=r[15]=i*this._topHeight,r[17]=r[19]=r[21]=r[23]=1-i*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()}}class yO extends Zu{constructor(e=se.EMPTY,r,n,i,s){const o=new hp(r,n,i);o.getBuffer("aVertexPosition").static=!1;const l=new Ju(e);super(o,l,null,s),this.autoUpdate=!0}get vertices(){return this.geometry.getBuffer("aVertexPosition").data}set vertices(e){this.geometry.getBuffer("aVertexPosition").data=e}_render(e){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),super._render(e)}}class vO extends Zu{constructor(e,r,n=0){const i=new pO(e.height,r,n),s=new Ju(e);n>0&&(e.baseTexture.wrapMode=qi.REPEAT),super(i,s),this.autoUpdate=!0}_render(e){const r=this.geometry;(this.autoUpdate||r._width!==this.shader.texture.height)&&(r._width=this.shader.texture.height,r.update()),super._render(e)}}class _O extends Tr{constructor(e=1500,r,n=16384,i=!1){super();const s=16384;n>s&&(n=s),this._properties=[!1,!0,!1,!1,!1],this._maxSize=e,this._batchSize=n,this._buffers=null,this._bufferUpdateIDs=[],this._updateID=0,this.interactiveChildren=!1,this.blendMode=Ie.NORMAL,this.autoResize=i,this.roundPixels=!0,this.baseTexture=null,this.setProperties(r),this._tintColor=new tt(0),this.tintRgb=new Float32Array(3),this.tint=16777215}setProperties(e){e&&(this._properties[0]="vertices"in e||"scale"in e?!!e.vertices||!!e.scale:this._properties[0],this._properties[1]="position"in e?!!e.position:this._properties[1],this._properties[2]="rotation"in e?!!e.rotation:this._properties[2],this._properties[3]="uvs"in e?!!e.uvs:this._properties[3],this._properties[4]="tint"in e||"alpha"in e?!!e.tint||!!e.alpha:this._properties[4])}updateTransform(){this.displayObjectUpdateTransform()}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e),this._tintColor.toRgbArray(this.tintRgb)}render(e){!this.visible||this.worldAlpha<=0||!this.children.length||!this.renderable||(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",()=>this.onChildrenChange(0))),e.batch.setObjectRenderer(e.plugins.particle),e.plugins.particle.render(this))}onChildrenChange(e){const r=Math.floor(e/this._batchSize);for(;this._bufferUpdateIDs.length<r;)this._bufferUpdateIDs.push(0);this._bufferUpdateIDs[r]=++this._updateID}dispose(){if(this._buffers){for(let e=0;e<this._buffers.length;++e)this._buffers[e].destroy();this._buffers=null}}destroy(e){super.destroy(e),this.dispose(),this._properties=null,this._buffers=null,this._bufferUpdateIDs=null}}class UE{constructor(e,r,n){this.geometry=new Ys,this.indexBuffer=null,this.size=n,this.dynamicProperties=[],this.staticProperties=[];for(let i=0;i<e.length;++i){let s=e[i];s={attributeName:s.attributeName,size:s.size,uploadFunction:s.uploadFunction,type:s.type||Ae.FLOAT,offset:s.offset},r[i]?this.dynamicProperties.push(s):this.staticProperties.push(s)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()}initBuffers(){const e=this.geometry;let r=0;this.indexBuffer=new It(k4(this.size),!0,!0),e.addIndex(this.indexBuffer),this.dynamicStride=0;for(let o=0;o<this.dynamicProperties.length;++o){const l=this.dynamicProperties[o];l.offset=r,r+=l.size,this.dynamicStride+=l.size}const n=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(n),this.dynamicDataUint32=new Uint32Array(n),this.dynamicBuffer=new It(this.dynamicData,!1,!1);let i=0;this.staticStride=0;for(let o=0;o<this.staticProperties.length;++o){const l=this.staticProperties[o];l.offset=i,i+=l.size,this.staticStride+=l.size}const s=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(s),this.staticDataUint32=new Uint32Array(s),this.staticBuffer=new It(this.staticData,!0,!1);for(let o=0;o<this.dynamicProperties.length;++o){const l=this.dynamicProperties[o];e.addAttribute(l.attributeName,this.dynamicBuffer,0,l.type===Ae.UNSIGNED_BYTE,l.type,this.dynamicStride*4,l.offset*4)}for(let o=0;o<this.staticProperties.length;++o){const l=this.staticProperties[o];e.addAttribute(l.attributeName,this.staticBuffer,0,l.type===Ae.UNSIGNED_BYTE,l.type,this.staticStride*4,l.offset*4)}}uploadDynamic(e,r,n){for(let i=0;i<this.dynamicProperties.length;i++){const s=this.dynamicProperties[i];s.uploadFunction(e,r,n,s.type===Ae.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,s.offset)}this.dynamicBuffer._updateID++}uploadStatic(e,r,n){for(let i=0;i<this.staticProperties.length;i++){const s=this.staticProperties[i];s.uploadFunction(e,r,n,s.type===Ae.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,s.offset)}this.staticBuffer._updateID++}destroy(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()}}var xO=`varying vec2 vTextureCoord;
692
+ Please use Assets.add({ alias, src, data, format, loadParser }) instead.`),o.push({alias:e,src:r,data:n,format:i,loadParser:s})):Array.isArray(e)?o.push(...e):o.push(e);let l;l=h=>{this.hasKey(h)&&console.warn(`[Resolver] already has key: ${h} overwriting`)},jn(o).forEach(h=>{const{src:c,srcs:f}=h;let{data:m,format:p,loadParser:v}=h;const _=jn(c||f).map(S=>typeof S=="string"?_D(S):Array.isArray(S)?S:[S]),E=this.getAlias(h);Array.isArray(E)?E.forEach(l):l(E);const T=[];_.forEach(S=>{S.forEach(b=>{let x={};if(typeof b!="object"){x.src=b;for(let A=0;A<this._parsers.length;A++){const R=this._parsers[A];if(R.test(b)){x=R.parse(b);break}}}else m=b.data??m,p=b.format??p,v=b.loadParser??v,x={...x,...b};if(!E)throw new Error(`[Resolver] alias is undefined for this asset: ${x.src}`);x=this.buildResolvedAsset(x,{aliases:E,data:m,format:p,loadParser:v}),T.push(x)})}),E.forEach(S=>{this._assetMap[S]=T})})}resolveBundle(e){const r=Sf(e);e=jn(e);const n={};return e.forEach(i=>{const s=this._bundles[i];if(s){const o=this.resolve(s),l={};for(const h in o){const c=o[h];l[this._extractAssetIdFromBundle(i,h)]=c}n[i]=l}}),r?n[e[0]]:n}resolveUrl(e){const r=this.resolve(e);if(typeof e!="string"){const n={};for(const i in r)n[i]=r[i].src;return n}return r.src}resolve(e){const r=Sf(e);e=jn(e);const n={};return e.forEach(i=>{if(!this._resolverHash[i])if(this._assetMap[i]){let s=this._assetMap[i];const o=s[0],l=this._getPreferredOrder(s);l==null||l.priority.forEach(h=>{l.params[h].forEach(c=>{const f=s.filter(m=>m[h]?m[h]===c:!1);f.length&&(s=f)})}),this._resolverHash[i]=s[0]??o}else this._resolverHash[i]=this.buildResolvedAsset({alias:[i],src:i},{});n[i]=this._resolverHash[i]}),r?n[e[0]]:n}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let r=0;r<e.length;r++){const n=e[0],i=this._preferredOrder.find(s=>s.params.format.includes(n.format));if(i)return i}return this._preferredOrder[0]}_appendDefaultSearchParams(e){if(!this._defaultSearchParams)return e;const r=/\?/.test(e)?"&":"?";return`${e}${r}${this._defaultSearchParams}`}buildResolvedAsset(e,r){const{aliases:n,data:i,loadParser:s,format:o}=r;return(this._basePath||this._rootPath)&&(e.src=Kt.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=n??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...i||{},...e.data},e.loadParser=s??e.loadParser,e.format=o??e.format??Kt.extname(e.src).slice(1),e.srcs=e.src,e.name=e.alias,e}}class QD{constructor(){this._detections=[],this._initialized=!1,this.resolver=new YD,this.loader=new wD,this.cache=Io,this._backgroundLoader=new vD(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(e={}){var s,o;if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");return}if(this._initialized=!0,e.defaultSearchParams&&this.resolver.setDefaultSearchParams(e.defaultSearchParams),e.basePath&&(this.resolver.basePath=e.basePath),e.bundleIdentifier&&this.resolver.setBundleIdentifier(e.bundleIdentifier),e.manifest){let l=e.manifest;typeof l=="string"&&(l=await this.load(l)),this.resolver.addManifest(l)}const r=((s=e.texturePreference)==null?void 0:s.resolution)??1,n=typeof r=="number"?[r]:r,i=await this._detectFormats({preferredFormats:(o=e.texturePreference)==null?void 0:o.format,skipDetections:e.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:i,resolution:n}}),e.preferences&&this.setPreferences(e.preferences)}add(e,r,n,i,s){this.resolver.add(e,r,n,i,s)}async load(e,r){this._initialized||await this.init();const n=Sf(e),i=jn(e).map(l=>{if(typeof l!="string"){const h=this.resolver.getAlias(l);return h.some(c=>!this.resolver.hasKey(c))&&this.add(l),Array.isArray(h)?h[0]:h}return this.resolver.hasKey(l)||this.add({alias:l,src:l}),l}),s=this.resolver.resolve(i),o=await this._mapLoadToResolve(s,r);return n?o[i[0]]:o}addBundle(e,r){this.resolver.addBundle(e,r)}async loadBundle(e,r){this._initialized||await this.init();let n=!1;typeof e=="string"&&(n=!0,e=[e]);const i=this.resolver.resolveBundle(e),s={},o=Object.keys(i);let l=0,h=0;const c=()=>{r==null||r(++l/h)},f=o.map(m=>{const p=i[m];return h+=Object.keys(p).length,this._mapLoadToResolve(p,c).then(v=>{s[m]=v})});return await Promise.all(f),n?s[e[0]]:s}async backgroundLoad(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const r=this.resolver.resolve(e);this._backgroundLoader.add(Object.values(r))}async backgroundLoadBundle(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const r=this.resolver.resolveBundle(e);Object.values(r).forEach(n=>{this._backgroundLoader.add(Object.values(n))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(e){if(typeof e=="string")return Io.get(e);const r={};for(let n=0;n<e.length;n++)r[n]=Io.get(e[n]);return r}async _mapLoadToResolve(e,r){const n=Object.values(e),i=Object.keys(e);this._backgroundLoader.active=!1;const s=await this.loader.load(n,r);this._backgroundLoader.active=!0;const o={};return n.forEach((l,h)=>{const c=s[l.src],f=[l.src];l.alias&&f.push(...l.alias),o[i[h]]=c,Io.set(f,c)}),o}async unload(e){this._initialized||await this.init();const r=jn(e).map(i=>typeof i!="string"?i.src:i),n=this.resolver.resolve(r);await this._unloadFromResolved(n)}async unloadBundle(e){this._initialized||await this.init(),e=jn(e);const r=this.resolver.resolveBundle(e),n=Object.keys(r).map(i=>this._unloadFromResolved(r[i]));await Promise.all(n)}async _unloadFromResolved(e){const r=Object.values(e);r.forEach(n=>{Io.remove(n.src)}),await this.loader.unload(r)}async _detectFormats(e){let r=[];e.preferredFormats&&(r=Array.isArray(e.preferredFormats)?e.preferredFormats:[e.preferredFormats]);for(const n of e.detections)e.skipDetections||await n.test()?r=await n.add(r):e.skipDetections||(r=await n.remove(r));return r=r.filter((n,i)=>r.indexOf(n)===i),r}get detections(){return this._detections}get preferWorkers(){return cp.config.preferWorkers}set preferWorkers(e){Ue("7.2.0","Assets.prefersWorkers is deprecated, use Assets.setPreferences({ preferWorkers: true }) instead."),this.setPreferences({preferWorkers:e})}setPreferences(e){this.loader.parsers.forEach(r=>{r.config&&Object.keys(r.config).filter(n=>n in e).forEach(n=>{r.config[n]=e[n]})})}}const Qc=new QD;we.handleByList(ae.LoadParser,Qc.loader.parsers).handleByList(ae.ResolveParser,Qc.resolver.parsers).handleByList(ae.CacheParser,Qc.cache.parsers).handleByList(ae.DetectionParser,Qc.detections);const KD={extension:ae.CacheParser,test:t=>Array.isArray(t)&&t.every(e=>e instanceof se),getCacheableAssets:(t,e)=>{const r={};return t.forEach(n=>{e.forEach((i,s)=>{r[n+(s===0?"":s+1)]=i})}),r}};we.add(KD);async function IC(t){if("Image"in globalThis)return new Promise(e=>{const r=new Image;r.onload=()=>{e(!0)},r.onerror=()=>{e(!1)},r.src=t});if("createImageBitmap"in globalThis&&"fetch"in globalThis){try{const e=await(await fetch(t)).blob();await createImageBitmap(e)}catch{return!1}return!0}return!1}const qD={extension:{type:ae.DetectionParser,priority:1},test:async()=>IC("data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="),add:async t=>[...t,"avif"],remove:async t=>t.filter(e=>e!=="avif")};we.add(qD);const ZD={extension:{type:ae.DetectionParser,priority:0},test:async()=>IC("data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="),add:async t=>[...t,"webp"],remove:async t=>t.filter(e=>e!=="webp")};we.add(ZD);const NE=["png","jpg","jpeg"],JD={extension:{type:ae.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async t=>[...t,...NE],remove:async t=>t.filter(e=>!NE.includes(e))};we.add(JD);const eO="WorkerGlobalScope"in globalThis&&globalThis instanceof globalThis.WorkerGlobalScope;function h_(t){return eO?!1:document.createElement("video").canPlayType(t)!==""}const tO={extension:{type:ae.DetectionParser,priority:0},test:async()=>h_("video/webm"),add:async t=>[...t,"webm"],remove:async t=>t.filter(e=>e!=="webm")};we.add(tO);const rO={extension:{type:ae.DetectionParser,priority:0},test:async()=>h_("video/mp4"),add:async t=>[...t,"mp4","m4v"],remove:async t=>t.filter(e=>e!=="mp4"&&e!=="m4v")};we.add(rO);const nO={extension:{type:ae.DetectionParser,priority:0},test:async()=>h_("video/ogg"),add:async t=>[...t,"ogv"],remove:async t=>t.filter(e=>e!=="ogv")};we.add(nO);const iO={extension:ae.ResolveParser,test:cp.test,parse:t=>{var e;return{resolution:parseFloat(((e=he.RETINA_PREFIX.exec(t))==null?void 0:e[1])??"1"),format:Kt.extname(t).slice(1),src:t}}};we.add(iO);const sO=[".xml",".fnt"],oO={extension:{type:ae.LoadParser,priority:qn.Normal},name:"loadBitmapFont",test(t){return sO.includes(Kt.extname(t).toLowerCase())},async testParse(t){return Dd.test(t)||Dv.test(t)},async parse(t,e,r){const n=Dd.test(t)?Dd.parse(t):Dv.parse(t),{src:i}=e,{page:s}=n,o=[];for(let c=0;c<s.length;++c){const f=s[c].file;let m=Kt.join(Kt.dirname(i),f);m=Ov(m,i),o.push(m)}const l=await r.load(o),h=o.map(c=>l[c]);return Ts.install(n,h,!0)},async load(t,e){return(await he.ADAPTER.fetch(t)).text()},unload(t){t.destroy()}};we.add(oO);const bf={build(t){const e=t.points;let r,n,i,s,o,l;if(t.type===sr.CIRC){const _=t.shape;r=_.x,n=_.y,o=l=_.radius,i=s=0}else if(t.type===sr.ELIP){const _=t.shape;r=_.x,n=_.y,o=_.width,l=_.height,i=s=0}else{const _=t.shape,E=_.width/2,T=_.height/2;r=_.x+E,n=_.y+T,o=l=Math.max(0,Math.min(_.radius,Math.min(E,T))),i=E-o,s=T-l}if(!(o>=0&&l>=0&&i>=0&&s>=0)){e.length=0;return}const h=Math.ceil(2.3*Math.sqrt(o+l)),c=h*8+(i?4:0)+(s?4:0);if(e.length=c,c===0)return;if(h===0){e.length=8,e[0]=e[6]=r+i,e[1]=e[3]=n+s,e[2]=e[4]=r-i,e[5]=e[7]=n-s;return}let f=0,m=h*4+(i?2:0)+2,p=m,v=c;{const _=i+o,E=s,T=r+_,S=r-_,b=n+E;if(e[f++]=T,e[f++]=b,e[--m]=b,e[--m]=S,s){const x=n-E;e[p++]=S,e[p++]=x,e[--v]=x,e[--v]=T}}for(let _=1;_<h;_++){const E=Math.PI/2*(_/h),T=i+Math.cos(E)*o,S=s+Math.sin(E)*l,b=r+T,x=r-T,A=n+S,R=n-S;e[f++]=b,e[f++]=A,e[--m]=A,e[--m]=x,e[p++]=x,e[p++]=R,e[--v]=R,e[--v]=b}{const _=i,E=s+l,T=r+_,S=r-_,b=n+E,x=n-E;e[f++]=T,e[f++]=b,e[--v]=x,e[--v]=T,i&&(e[f++]=S,e[f++]=b,e[--v]=x,e[--v]=S)}},triangulate(t,e){const r=t.points,n=e.points,i=e.indices;if(r.length===0)return;let s=n.length/2;const o=s;let l,h;if(t.type!==sr.RREC){const f=t.shape;l=f.x,h=f.y}else{const f=t.shape;l=f.x+f.width/2,h=f.y+f.height/2}const c=t.matrix;n.push(t.matrix?c.a*l+c.c*h+c.tx:l,t.matrix?c.b*l+c.d*h+c.ty:h),s++,n.push(r[0],r[1]);for(let f=2;f<r.length;f+=2)n.push(r[f],r[f+1]),i.push(s++,o,s);i.push(o+1,o,s)}};function DE(t,e=!1){const r=t.length;if(r<6)return;let n=0;for(let i=0,s=t[r-2],o=t[r-1];i<r;i+=2){const l=t[i],h=t[i+1];n+=(l-s)*(h+o),s=l,o=h}if(!e&&n>0||e&&n<=0){const i=r/2;for(let s=i+i%2;s<r;s+=2){const o=r-s-2,l=r-s-1,h=s,c=s+1;[t[o],t[h]]=[t[h],t[o]],[t[l],t[c]]=[t[c],t[l]]}}}const RC={build(t){t.points=t.shape.points.slice()},triangulate(t,e){let r=t.points;const n=t.holes,i=e.points,s=e.indices;if(r.length>=6){DE(r,!1);const o=[];for(let c=0;c<n.length;c++){const f=n[c];DE(f.points,!0),o.push(r.length/2),r=r.concat(f.points)}const l=hM(r,o,2);if(!l)return;const h=i.length/2;for(let c=0;c<l.length;c+=3)s.push(l[c]+h),s.push(l[c+1]+h),s.push(l[c+2]+h);for(let c=0;c<r.length;c++)i.push(r[c])}}},aO={build(t){const e=t.shape,r=e.x,n=e.y,i=e.width,s=e.height,o=t.points;o.length=0,i>=0&&s>=0&&o.push(r,n,r+i,n,r+i,n+s,r,n+s)},triangulate(t,e){const r=t.points,n=e.points;if(r.length===0)return;const i=n.length/2;n.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),e.indices.push(i,i+1,i+2,i+1,i+2,i+3)}},lO={build(t){bf.build(t)},triangulate(t,e){bf.triangulate(t,e)}};var gn=(t=>(t.MITER="miter",t.BEVEL="bevel",t.ROUND="round",t))(gn||{}),Os=(t=>(t.BUTT="butt",t.ROUND="round",t.SQUARE="square",t))(Os||{});const dl={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(t,e=20){if(!this.adaptive||!t||isNaN(t))return e;let r=Math.ceil(t/this.maxLength);return r<this.minSegments?r=this.minSegments:r>this.maxSegments&&(r=this.maxSegments),r}};class OE{static curveTo(e,r,n,i,s,o){const l=o[o.length-2],h=o[o.length-1]-r,c=l-e,f=i-r,m=n-e,p=Math.abs(h*m-c*f);if(p<1e-8||s===0)return(o[o.length-2]!==e||o[o.length-1]!==r)&&o.push(e,r),null;const v=h*h+c*c,_=f*f+m*m,E=h*f+c*m,T=s*Math.sqrt(v)/p,S=s*Math.sqrt(_)/p,b=T*E/v,x=S*E/_,A=T*m+S*c,R=T*f+S*h,L=c*(S+b),k=h*(S+b),D=m*(T+x),Q=f*(T+x),$=Math.atan2(k-R,L-A),me=Math.atan2(Q-R,D-A);return{cx:A+e,cy:R+r,radius:s,startAngle:$,endAngle:me,anticlockwise:c*f>m*h}}static arc(e,r,n,i,s,o,l,h,c){const f=l-o,m=dl._segmentsCount(Math.abs(f)*s,Math.ceil(Math.abs(f)/gf)*40),p=f/(m*2),v=p*2,_=Math.cos(p),E=Math.sin(p),T=m-1,S=T%1/T;for(let b=0;b<=T;++b){const x=b+S*b,A=p+o+v*x,R=Math.cos(A),L=-Math.sin(A);c.push((_*R+E*L)*s+n,(_*-L+E*R)*s+i)}}}class uO{constructor(){this.reset()}begin(e,r,n){this.reset(),this.style=e,this.start=r,this.attribStart=n}end(e,r){this.attribSize=r-this.attribStart,this.size=e-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class c_{static curveLength(e,r,n,i,s,o,l,h){let c=0,f=0,m=0,p=0,v=0,_=0,E=0,T=0,S=0,b=0,x=0,A=e,R=r;for(let L=1;L<=10;++L)f=L/10,m=f*f,p=m*f,v=1-f,_=v*v,E=_*v,T=E*e+3*_*f*n+3*v*m*s+p*l,S=E*r+3*_*f*i+3*v*m*o+p*h,b=A-T,x=R-S,A=T,R=S,c+=Math.sqrt(b*b+x*x);return c}static curveTo(e,r,n,i,s,o,l){const h=l[l.length-2],c=l[l.length-1];l.length-=2;const f=dl._segmentsCount(c_.curveLength(h,c,e,r,n,i,s,o));let m=0,p=0,v=0,_=0,E=0;l.push(h,c);for(let T=1,S=0;T<=f;++T)S=T/f,m=1-S,p=m*m,v=p*m,_=S*S,E=_*S,l.push(v*h+3*p*S*e+3*m*_*n+E*s,v*c+3*p*S*r+3*m*_*i+E*o)}}function FE(t,e,r,n,i,s,o,l){const h=t-r*i,c=e-n*i,f=t+r*s,m=e+n*s;let p,v;o?(p=n,v=-r):(p=-n,v=r);const _=h+p,E=c+v,T=f+p,S=m+v;return l.push(_,E,T,S),2}function vo(t,e,r,n,i,s,o,l){const h=r-t,c=n-e;let f=Math.atan2(h,c),m=Math.atan2(i-t,s-e);l&&f<m?f+=Math.PI*2:!l&&f>m&&(m+=Math.PI*2);let p=f;const v=m-f,_=Math.abs(v),E=Math.sqrt(h*h+c*c),T=(15*_*Math.sqrt(E)/Math.PI>>0)+1,S=v/T;if(p+=S,l){o.push(t,e,r,n);for(let b=1,x=p;b<T;b++,x+=S)o.push(t,e,t+Math.sin(x)*E,e+Math.cos(x)*E);o.push(t,e,i,s)}else{o.push(r,n,t,e);for(let b=1,x=p;b<T;b++,x+=S)o.push(t+Math.sin(x)*E,e+Math.cos(x)*E,t,e);o.push(i,s,t,e)}return T*2}function hO(t,e){const r=t.shape;let n=t.points||r.points.slice();const i=e.closePointEps;if(n.length===0)return;const s=t.lineStyle,o=new Ge(n[0],n[1]),l=new Ge(n[n.length-2],n[n.length-1]),h=r.type!==sr.POLY||r.closeStroke,c=Math.abs(o.x-l.x)<i&&Math.abs(o.y-l.y)<i;if(h){n=n.slice(),c&&(n.pop(),n.pop(),l.set(n[n.length-2],n[n.length-1]));const fe=(o.x+l.x)*.5,M=(l.y+o.y)*.5;n.unshift(fe,M),n.push(fe,M)}const f=e.points,m=n.length/2;let p=n.length;const v=f.length/2,_=s.width/2,E=_*_,T=s.miterLimit*s.miterLimit;let S=n[0],b=n[1],x=n[2],A=n[3],R=0,L=0,k=-(b-A),D=S-x,Q=0,$=0,me=Math.sqrt(k*k+D*D);k/=me,D/=me,k*=_,D*=_;const te=s.alignment,O=(1-te)*2,V=te*2;h||(s.cap===Os.ROUND?p+=vo(S-k*(O-V)*.5,b-D*(O-V)*.5,S-k*O,b-D*O,S+k*V,b+D*V,f,!0)+2:s.cap===Os.SQUARE&&(p+=FE(S,b,k,D,O,V,!0,f))),f.push(S-k*O,b-D*O,S+k*V,b+D*V);for(let fe=1;fe<m-1;++fe){S=n[(fe-1)*2],b=n[(fe-1)*2+1],x=n[fe*2],A=n[fe*2+1],R=n[(fe+1)*2],L=n[(fe+1)*2+1],k=-(b-A),D=S-x,me=Math.sqrt(k*k+D*D),k/=me,D/=me,k*=_,D*=_,Q=-(A-L),$=x-R,me=Math.sqrt(Q*Q+$*$),Q/=me,$/=me,Q*=_,$*=_;const M=x-S,W=b-A,F=x-R,H=L-A,z=M*F+W*H,Y=W*F-H*M,J=Y<0;if(Math.abs(Y)<.001*Math.abs(z)){f.push(x-k*O,A-D*O,x+k*V,A+D*V),z>=0&&(s.join===gn.ROUND?p+=vo(x,A,x-k*O,A-D*O,x-Q*O,A-$*O,f,!1)+4:p+=2,f.push(x-Q*V,A-$*V,x+Q*O,A+$*O));continue}const ve=(-k+S)*(-D+A)-(-k+x)*(-D+b),le=(-Q+R)*(-$+A)-(-Q+x)*(-$+L),Te=(M*le-F*ve)/Y,Pe=(H*ve-W*le)/Y,pe=(Te-x)*(Te-x)+(Pe-A)*(Pe-A),P=x+(Te-x)*O,ue=A+(Pe-A)*O,Ee=x-(Te-x)*V,Me=A-(Pe-A)*V,Ke=Math.min(M*M+W*W,F*F+H*H),je=J?O:V,vt=Ke+je*je*E,St=pe<=vt;let Oe=s.join;if(Oe===gn.MITER&&pe/E>T&&(Oe=gn.BEVEL),St)switch(Oe){case gn.MITER:{f.push(P,ue,Ee,Me);break}case gn.BEVEL:{J?f.push(P,ue,x+k*V,A+D*V,P,ue,x+Q*V,A+$*V):f.push(x-k*O,A-D*O,Ee,Me,x-Q*O,A-$*O,Ee,Me),p+=2;break}case gn.ROUND:{J?(f.push(P,ue,x+k*V,A+D*V),p+=vo(x,A,x+k*V,A+D*V,x+Q*V,A+$*V,f,!0)+4,f.push(P,ue,x+Q*V,A+$*V)):(f.push(x-k*O,A-D*O,Ee,Me),p+=vo(x,A,x-k*O,A-D*O,x-Q*O,A-$*O,f,!1)+4,f.push(x-Q*O,A-$*O,Ee,Me));break}}else{switch(f.push(x-k*O,A-D*O,x+k*V,A+D*V),Oe){case gn.MITER:{J?f.push(Ee,Me,Ee,Me):f.push(P,ue,P,ue),p+=2;break}case gn.ROUND:{J?p+=vo(x,A,x+k*V,A+D*V,x+Q*V,A+$*V,f,!0)+2:p+=vo(x,A,x-k*O,A-D*O,x-Q*O,A-$*O,f,!1)+2;break}}f.push(x-Q*O,A-$*O,x+Q*V,A+$*V),p+=2}}S=n[(m-2)*2],b=n[(m-2)*2+1],x=n[(m-1)*2],A=n[(m-1)*2+1],k=-(b-A),D=S-x,me=Math.sqrt(k*k+D*D),k/=me,D/=me,k*=_,D*=_,f.push(x-k*O,A-D*O,x+k*V,A+D*V),h||(s.cap===Os.ROUND?p+=vo(x-k*(O-V)*.5,A-D*(O-V)*.5,x-k*O,A-D*O,x+k*V,A+D*V,f,!1)+2:s.cap===Os.SQUARE&&(p+=FE(x,A,k,D,O,V,!1,f)));const ie=e.indices,_e=dl.epsilon*dl.epsilon;for(let fe=v;fe<p+v-2;++fe)S=f[fe*2],b=f[fe*2+1],x=f[(fe+1)*2],A=f[(fe+1)*2+1],R=f[(fe+2)*2],L=f[(fe+2)*2+1],!(Math.abs(S*(A-L)+x*(L-b)+R*(b-A))<_e)&&ie.push(fe,fe+1,fe+2)}function cO(t,e){let r=0;const n=t.shape,i=t.points||n.points,s=n.type!==sr.POLY||n.closeStroke;if(i.length===0)return;const o=e.points,l=e.indices,h=i.length/2,c=o.length/2;let f=c;for(o.push(i[0],i[1]),r=1;r<h;r++)o.push(i[r*2],i[r*2+1]),l.push(f,f+1),f++;s&&l.push(f,c)}function BE(t,e){t.lineStyle.native?cO(t,e):hO(t,e)}class d_{static curveLength(e,r,n,i,s,o){const l=e-2*n+s,h=r-2*i+o,c=2*n-2*e,f=2*i-2*r,m=4*(l*l+h*h),p=4*(l*c+h*f),v=c*c+f*f,_=2*Math.sqrt(m+p+v),E=Math.sqrt(m),T=2*m*E,S=2*Math.sqrt(v),b=p/E;return(T*_+E*p*(_-S)+(4*v*m-p*p)*Math.log((2*E+b+_)/(b+S)))/(4*T)}static curveTo(e,r,n,i,s){const o=s[s.length-2],l=s[s.length-1],h=dl._segmentsCount(d_.curveLength(o,l,e,r,n,i));let c=0,f=0;for(let m=1;m<=h;++m){const p=m/h;c=o+(e-o)*p,f=l+(r-l)*p,s.push(c+(e+(n-e)*p-c)*p,f+(r+(i-r)*p-f)*p)}}}const Vg={[sr.POLY]:RC,[sr.CIRC]:bf,[sr.ELIP]:bf,[sr.RECT]:aO,[sr.RREC]:lO},LE=[],Kc=[];class Tf{constructor(e,r=null,n=null,i=null){this.points=[],this.holes=[],this.shape=e,this.lineStyle=n,this.fillStyle=r,this.matrix=i,this.type=e.type}clone(){return new Tf(this.shape,this.fillStyle,this.lineStyle,this.matrix)}destroy(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null}}const va=new Ge,MC=class kC extends FA{constructor(){super(),this.closePointEps=1e-4,this.boundsPadding=0,this.uvsFloat32=null,this.indicesUint16=null,this.batchable=!1,this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.drawCalls=[],this.batchDirty=-1,this.batches=[],this.dirty=0,this.cacheDirty=-1,this.clearDirty=0,this.shapeIndex=0,this._bounds=new wf,this.boundsDirty=-1}get bounds(){return this.updateBatches(),this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds}invalidate(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(let e=0;e<this.drawCalls.length;e++)this.drawCalls[e].texArray.clear(),Kc.push(this.drawCalls[e]);this.drawCalls.length=0;for(let e=0;e<this.batches.length;e++){const r=this.batches[e];r.reset(),LE.push(r)}this.batches.length=0}clear(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,r=null,n=null,i=null){const s=new Tf(e,r,n,i);return this.graphicsData.push(s),this.dirty++,this}drawHole(e,r=null){if(!this.graphicsData.length)return null;const n=new Tf(e,null,null,r),i=this.graphicsData[this.graphicsData.length-1];return n.lineStyle=i.lineStyle,i.holes.push(n),this.dirty++,this}destroy(){super.destroy();for(let e=0;e<this.graphicsData.length;++e)this.graphicsData[e].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null}containsPoint(e){const r=this.graphicsData;for(let n=0;n<r.length;++n){const i=r[n];if(i.fillStyle.visible&&i.shape&&(i.matrix?i.matrix.applyInverse(e,va):va.copyFrom(e),i.shape.contains(va.x,va.y))){let s=!1;if(i.holes){for(let o=0;o<i.holes.length;o++)if(i.holes[o].shape.contains(va.x,va.y)){s=!0;break}}if(!s)return!0}}return!1}updateBatches(){if(!this.graphicsData.length){this.batchable=!0;return}if(!this.validateBatching())return;this.cacheDirty=this.dirty;const e=this.uvs,r=this.graphicsData;let n=null,i=null;this.batches.length>0&&(n=this.batches[this.batches.length-1],i=n.style);for(let h=this.shapeIndex;h<r.length;h++){this.shapeIndex++;const c=r[h],f=c.fillStyle,m=c.lineStyle;Vg[c.type].build(c),c.matrix&&this.transformPoints(c.points,c.matrix),(f.visible||m.visible)&&this.processHoles(c.holes);for(let p=0;p<2;p++){const v=p===0?f:m;if(!v.visible)continue;const _=v.texture.baseTexture,E=this.indices.length,T=this.points.length/2;_.wrapMode=qi.REPEAT,p===0?this.processFill(c):this.processLine(c);const S=this.points.length/2-T;S!==0&&(n&&!this._compareStyles(i,v)&&(n.end(E,T),n=null),n||(n=LE.pop()||new uO,n.begin(v,E,T),this.batches.push(n),i=v),this.addUvs(this.points,e,v.texture,T,S,v.matrix))}}const s=this.indices.length,o=this.points.length/2;if(n&&n.end(s,o),this.batches.length===0){this.batchable=!0;return}const l=o>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&l===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=l?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,r){return!(!e||!r||e.texture.baseTexture!==r.texture.baseTexture||e.color+e.alpha!==r.color+r.alpha||!!e.native!=!!r.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,r=this.graphicsData.length;e<r;e++){const n=this.graphicsData[e],i=n.fillStyle,s=n.lineStyle;if(i&&!i.texture.baseTexture.valid||s&&!s.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);const e=this.batches;for(let r=0,n=e.length;r<n;r++){const i=e[r];for(let s=0;s<i.size;s++){const o=i.start+s;this.indicesUint16[o]=this.indicesUint16[o]-i.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;const e=this.batches;for(let r=0;r<e.length;r++)if(e[r].style.native)return!1;return this.points.length<kC.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++Ne._globalBatch;for(let m=0;m<this.drawCalls.length;m++)this.drawCalls[m].texArray.clear(),Kc.push(this.drawCalls[m]);this.drawCalls.length=0;const r=this.colors,n=this.textureIds;let i=Kc.pop();i||(i=new vv,i.texArray=new Ev),i.texArray.count=0,i.start=0,i.size=0,i.type=$n.TRIANGLES;let s=0,o=null,l=0,h=!1,c=$n.TRIANGLES,f=0;this.drawCalls.push(i);for(let m=0;m<this.batches.length;m++){const p=this.batches[m],v=8,_=p.style,E=_.texture.baseTexture;h!==!!_.native&&(h=!!_.native,c=h?$n.LINES:$n.TRIANGLES,o=null,s=v,e++),o!==E&&(o=E,E._batchEnabled!==e&&(s===v&&(e++,s=0,i.size>0&&(i=Kc.pop(),i||(i=new vv,i.texArray=new Ev),this.drawCalls.push(i)),i.start=f,i.size=0,i.texArray.count=0,i.type=c),E.touched=1,E._batchEnabled=e,E._batchLocation=s,E.wrapMode=qi.REPEAT,i.texArray.elements[i.texArray.count++]=E,s++)),i.size+=p.size,f+=p.size,l=E._batchLocation,this.addColors(r,_.color,_.alpha,p.attribSize,p.attribStart),this.addTextureIds(n,l,p.attribSize,p.attribStart)}Ne._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,r=this.uvs,n=this.colors,i=this.textureIds,s=new ArrayBuffer(e.length*3*4),o=new Float32Array(s),l=new Uint32Array(s);let h=0;for(let c=0;c<e.length/2;c++)o[h++]=e[c*2],o[h++]=e[c*2+1],o[h++]=r[c*2],o[h++]=r[c*2+1],l[h++]=n[c],o[h++]=i[c];this._buffer.update(s),this._indexBuffer.update(this.indicesUint16)}processFill(e){e.holes.length?RC.triangulate(e,this):Vg[e.type].triangulate(e,this)}processLine(e){BE(e,this);for(let r=0;r<e.holes.length;r++)BE(e.holes[r],this)}processHoles(e){for(let r=0;r<e.length;r++){const n=e[r];Vg[n.type].build(n),n.matrix&&this.transformPoints(n.points,n.matrix)}}calculateBounds(){const e=this._bounds;e.clear(),e.addVertexData(this.points,0,this.points.length),e.pad(this.boundsPadding,this.boundsPadding)}transformPoints(e,r){for(let n=0;n<e.length/2;n++){const i=e[n*2],s=e[n*2+1];e[n*2]=r.a*i+r.c*s+r.tx,e[n*2+1]=r.b*i+r.d*s+r.ty}}addColors(e,r,n,i,s=0){const o=tt.shared.setValue(r).toLittleEndianNumber(),l=tt.shared.setValue(o).toPremultiplied(n);e.length=Math.max(e.length,s+i);for(let h=0;h<i;h++)e[s+h]=l}addTextureIds(e,r,n,i=0){e.length=Math.max(e.length,i+n);for(let s=0;s<n;s++)e[i+s]=r}addUvs(e,r,n,i,s,o=null){let l=0;const h=r.length,c=n.frame;for(;l<s;){let m=e[(i+l)*2],p=e[(i+l)*2+1];if(o){const v=o.a*m+o.c*p+o.tx;p=o.b*m+o.d*p+o.ty,m=v}l++,r.push(m/c.width,p/c.height)}const f=n.baseTexture;(c.width<f.width||c.height<f.height)&&this.adjustUvs(r,n,h,s)}adjustUvs(e,r,n,i){const s=r.baseTexture,o=1e-6,l=n+i*2,h=r.frame,c=h.width/s.width,f=h.height/s.height;let m=h.x/h.width,p=h.y/h.height,v=Math.floor(e[n]+o),_=Math.floor(e[n+1]+o);for(let E=n+2;E<l;E+=2)v=Math.min(v,Math.floor(e[E]+o)),_=Math.min(_,Math.floor(e[E+1]+o));m-=v,p-=_;for(let E=n;E<l;E+=2)e[E]=(e[E]+m)*c,e[E+1]=(e[E+1]+p)*f}};MC.BATCHABLE_SIZE=100;let dO=MC;class dp{constructor(){this.color=16777215,this.alpha=1,this.texture=se.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const e=new dp;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e}reset(){this.color=16777215,this.alpha=1,this.texture=se.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class f_ extends dp{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=Os.BUTT,this.join=gn.MITER,this.miterLimit=10}clone(){const e=new f_;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e.width=this.width,e.alignment=this.alignment,e.native=this.native,e.cap=this.cap,e.join=this.join,e.miterLimit=this.miterLimit,e}reset(){super.reset(),this.color=0,this.alignment=.5,this.width=0,this.native=!1,this.cap=Os.BUTT,this.join=gn.MITER,this.miterLimit=10}}const Xg={},Bv=class Fd extends Tr{constructor(e=null){super(),this.shader=null,this.pluginName="batch",this.currentPath=null,this.batches=[],this.batchTint=-1,this.batchDirty=-1,this.vertexData=null,this._fillStyle=new dp,this._lineStyle=new f_,this._matrix=null,this._holeMode=!1,this.state=Mi.for2d(),this._geometry=e||new dO,this._geometry.refCount++,this._transformID=-1,this._tintColor=new tt(16777215),this.blendMode=Re.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new Fd(this._geometry)}set blendMode(e){this.state.blendMode=e}get blendMode(){return this.state.blendMode}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e)}get fill(){return this._fillStyle}get line(){return this._lineStyle}lineStyle(e=null,r=0,n,i=.5,s=!1){return typeof e=="number"&&(e={width:e,color:r,alpha:n,alignment:i,native:s}),this.lineTextureStyle(e)}lineTextureStyle(e){const r={width:0,texture:se.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:Os.BUTT,join:gn.MITER,miterLimit:10};e=Object.assign(r,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const n=e.width>0&&e.alpha>0;return n?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:n},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,r=this.currentPath.points.length;r>2&&(this.drawShape(this.currentPath),this.currentPath=new Fo,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[r-2],e[r-1]))}else this.currentPath=new Fo,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(e,r){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=r,this}lineTo(e,r){this.currentPath||this.moveTo(0,0);const n=this.currentPath.points,i=n[n.length-2],s=n[n.length-1];return(i!==e||s!==r)&&n.push(e,r),this}_initCurve(e=0,r=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,r]):this.moveTo(e,r)}quadraticCurveTo(e,r,n,i){this._initCurve();const s=this.currentPath.points;return s.length===0&&this.moveTo(0,0),d_.curveTo(e,r,n,i,s),this}bezierCurveTo(e,r,n,i,s,o){return this._initCurve(),c_.curveTo(e,r,n,i,s,o,this.currentPath.points),this}arcTo(e,r,n,i,s){this._initCurve(e,r);const o=this.currentPath.points,l=OE.curveTo(e,r,n,i,s,o);if(l){const{cx:h,cy:c,radius:f,startAngle:m,endAngle:p,anticlockwise:v}=l;this.arc(h,c,f,m,p,v)}return this}arc(e,r,n,i,s,o=!1){if(i===s)return this;if(!o&&s<=i?s+=gf:o&&i<=s&&(i+=gf),s-i===0)return this;const l=e+Math.cos(i)*n,h=r+Math.sin(i)*n,c=this._geometry.closePointEps;let f=this.currentPath?this.currentPath.points:null;if(f){const m=Math.abs(f[f.length-2]-l),p=Math.abs(f[f.length-1]-h);m<c&&p<c||f.push(l,h)}else this.moveTo(l,h),f=this.currentPath.points;return OE.arc(l,h,e,r,n,i,s,o,f),this}beginFill(e=0,r){return this.beginTextureFill({texture:se.WHITE,color:e,alpha:r})}normalizeColor(e){const r=tt.shared.setValue(e.color??0);e.color=r.toNumber(),e.alpha??(e.alpha=r.alpha)}beginTextureFill(e){const r={texture:se.WHITE,color:16777215,matrix:null};e=Object.assign(r,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const n=e.alpha>0;return n?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:n},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,r,n,i){return this.drawShape(new De(e,r,n,i))}drawRoundedRect(e,r,n,i,s){return this.drawShape(new op(e,r,n,i,s))}drawCircle(e,r,n){return this.drawShape(new ip(e,r,n))}drawEllipse(e,r,n,i){return this.drawShape(new sp(e,r,n,i))}drawPolygon(...e){let r,n=!0;const i=e[0];i.points?(n=i.closeStroke,r=i.points):Array.isArray(e[0])?r=e[0]:r=e;const s=new Fo(r);return s.closeStroke=n,this.drawShape(s),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===sr.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const r=this._geometry;r.updateBatches(),r.batchable?(this.batchDirty!==r.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,r=this.blendMode,n=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=n,this.vertexData=new Float32Array(e.points);for(let i=0;i<n;i++){const s=e.batches[i],o=s.style.color,l=new Float32Array(this.vertexData.buffer,s.attribStart*4*2,s.attribSize*2),h=new Float32Array(e.uvsFloat32.buffer,s.attribStart*4*2,s.attribSize*2),c=new Uint16Array(e.indicesUint16.buffer,s.start*2,s.size),f={vertexData:l,blendMode:r,indices:c,uvs:h,_batchRGB:tt.shared.setValue(o).toRgbArray(),_tintRGB:o,_texture:s.style.texture,alpha:s.style.alpha,worldAlpha:1};this.batches[i]=f}}_renderBatched(e){if(this.batches.length){e.batch.setObjectRenderer(e.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let r=0,n=this.batches.length;r<n;r++){const i=this.batches[r];i.worldAlpha=this.worldAlpha*i.alpha,e.plugins[this.pluginName].render(i)}}}_renderDirect(e){const r=this._resolveDirectShader(e),n=this._geometry,i=this.worldAlpha,s=r.uniforms,o=n.drawCalls;s.translationMatrix=this.transform.worldTransform,tt.shared.setValue(this._tintColor).premultiply(i).toArray(s.tint),e.shader.bind(r),e.geometry.bind(n,r),e.state.set(this.state);for(let l=0,h=o.length;l<h;l++)this._renderDrawCallDirect(e,n.drawCalls[l])}_renderDrawCallDirect(e,r){const{texArray:n,type:i,size:s,start:o}=r,l=n.count;for(let h=0;h<l;h++)e.texture.bind(n.elements[h],h);e.geometry.draw(i,s,o)}_resolveDirectShader(e){let r=this.shader;const n=this.pluginName;if(!r){if(!Xg[n]){const{maxTextures:i}=e.plugins[n],s=new Int32Array(i);for(let h=0;h<i;h++)s[h]=h;const o={tint:new Float32Array([1,1,1,1]),translationMatrix:new ot,default:Qn.from({uSamplers:s},!0)},l=e.plugins[n]._shader.program;Xg[n]=new Ci(l,o)}r=Xg[n]}return r}_calculateBounds(){this.finishPoly();const e=this._geometry;if(!e.graphicsData.length)return;const{minX:r,minY:n,maxX:i,maxY:s}=e.bounds;this._bounds.addFrame(this.transform,r,n,i,s)}containsPoint(e){return this.worldTransform.applyInverse(e,Fd._TEMP_POINT),this._geometry.containsPoint(Fd._TEMP_POINT)}calculateTints(){if(this.batchTint!==this.tint){this.batchTint=this._tintColor.toNumber();for(let e=0;e<this.batches.length;e++){const r=this.batches[e];r._tintRGB=tt.shared.setValue(this._tintColor).multiply(r._batchRGB).toLittleEndianNumber()}}}calculateVertices(){const e=this.transform._worldID;if(this._transformID===e)return;this._transformID=e;const r=this.transform.worldTransform,n=r.a,i=r.b,s=r.c,o=r.d,l=r.tx,h=r.ty,c=this._geometry.points,f=this.vertexData;let m=0;for(let p=0;p<c.length;p+=2){const v=c[p],_=c[p+1];f[m++]=n*v+s*_+l,f[m++]=o*_+i*v+h}}closePath(){const e=this.currentPath;return e&&(e.closeStroke=!0,this.finishPoly()),this}setMatrix(e){return this._matrix=e,this}beginHole(){return this.finishPoly(),this._holeMode=!0,this}endHole(){return this.finishPoly(),this._holeMode=!1,this}destroy(e){this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,super.destroy(e)}};Bv.curves=dl,Bv._TEMP_POINT=new Ge;let Iu=Bv;class fO extends hp{constructor(e=100,r=100,n=10,i=10){super(),this.segWidth=n,this.segHeight=i,this.width=e,this.height=r,this.build()}build(){const e=this.segWidth*this.segHeight,r=[],n=[],i=[],s=this.segWidth-1,o=this.segHeight-1,l=this.width/s,h=this.height/o;for(let f=0;f<e;f++){const m=f%this.segWidth,p=f/this.segWidth|0;r.push(m*l,p*h),n.push(m/s,p/o)}const c=s*o;for(let f=0;f<c;f++){const m=f%s,p=f/s|0,v=p*this.segWidth+m,_=p*this.segWidth+m+1,E=(p+1)*this.segWidth+m,T=(p+1)*this.segWidth+m+1;i.push(v,_,E,_,T,E)}this.buffers[0].data=new Float32Array(r),this.buffers[1].data=new Float32Array(n),this.indexBuffer.data=new Uint16Array(i),this.buffers[0].update(),this.buffers[1].update(),this.indexBuffer.update()}}class pO extends hp{constructor(e=200,r,n=0){super(new Float32Array(r.length*4),new Float32Array(r.length*4),new Uint16Array((r.length-1)*6)),this.points=r,this._width=e,this.textureScale=n,this.build()}get width(){return this._width}build(){const e=this.points;if(!e)return;const r=this.getBuffer("aVertexPosition"),n=this.getBuffer("aTextureCoord"),i=this.getIndex();if(e.length<1)return;r.data.length/4!==e.length&&(r.data=new Float32Array(e.length*4),n.data=new Float32Array(e.length*4),i.data=new Uint16Array((e.length-1)*6));const s=n.data,o=i.data;s[0]=0,s[1]=0,s[2]=0,s[3]=1;let l=0,h=e[0];const c=this._width*this.textureScale,f=e.length;for(let p=0;p<f;p++){const v=p*4;if(this.textureScale>0){const _=h.x-e[p].x,E=h.y-e[p].y,T=Math.sqrt(_*_+E*E);h=e[p],l+=T/c}else l=p/(f-1);s[v]=l,s[v+1]=0,s[v+2]=l,s[v+3]=1}let m=0;for(let p=0;p<f-1;p++){const v=p*2;o[m++]=v,o[m++]=v+1,o[m++]=v+2,o[m++]=v+2,o[m++]=v+1,o[m++]=v+3}n.update(),i.update(),this.updateVertices()}updateVertices(){const e=this.points;if(e.length<1)return;let r=e[0],n,i=0,s=0;const o=this.buffers[0].data,l=e.length,h=this.textureScale>0?this.textureScale*this._width/2:this._width/2;for(let c=0;c<l;c++){const f=e[c],m=c*4;c<e.length-1?n=e[c+1]:n=f,s=-(n.x-r.x),i=n.y-r.y;const p=Math.sqrt(i*i+s*s);p<1e-6?(i=0,s=0):(i/=p,s/=p,i*=h,s*=h),o[m]=f.x+i,o[m+1]=f.y+s,o[m+2]=f.x-i,o[m+3]=f.y-s,r=f}this.buffers[0].update()}update(){this.textureScale>0?this.build():this.updateVertices()}}class mO extends Zu{constructor(e,r,n){const i=new fO(e.width,e.height,r,n),s=new Ju(se.WHITE);super(i,s),this.texture=e,this.autoResize=!0}textureUpdated(){this._textureID=this.shader.texture._updateID;const e=this.geometry,{width:r,height:n}=this.shader.texture;this.autoResize&&(e.width!==r||e.height!==n)&&(e.width=this.shader.texture.width,e.height=this.shader.texture.height,e.build())}set texture(e){this.shader.texture!==e&&(this.shader.texture=e,this._textureID=-1,e.baseTexture.valid?this.textureUpdated():e.once("update",this.textureUpdated,this))}get texture(){return this.shader.texture}_render(e){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),super._render(e)}destroy(e){this.shader.texture.off("update",this.textureUpdated,this),super.destroy(e)}}const qc=10;class gO extends mO{constructor(e,r,n,i,s){var o,l,h,c;super(se.WHITE,4,4),this._origWidth=e.orig.width,this._origHeight=e.orig.height,this._width=this._origWidth,this._height=this._origHeight,this._leftWidth=r??((o=e.defaultBorders)==null?void 0:o.left)??qc,this._rightWidth=i??((l=e.defaultBorders)==null?void 0:l.right)??qc,this._topHeight=n??((h=e.defaultBorders)==null?void 0:h.top)??qc,this._bottomHeight=s??((c=e.defaultBorders)==null?void 0:c.bottom)??qc,this.texture=e}textureUpdated(){this._textureID=this.shader.texture._updateID,this._refresh()}get vertices(){return this.geometry.getBuffer("aVertexPosition").data}set vertices(e){this.geometry.getBuffer("aVertexPosition").data=e}updateHorizontalVertices(){const e=this.vertices,r=this._getMinScale();e[9]=e[11]=e[13]=e[15]=this._topHeight*r,e[17]=e[19]=e[21]=e[23]=this._height-this._bottomHeight*r,e[25]=e[27]=e[29]=e[31]=this._height}updateVerticalVertices(){const e=this.vertices,r=this._getMinScale();e[2]=e[10]=e[18]=e[26]=this._leftWidth*r,e[4]=e[12]=e[20]=e[28]=this._width-this._rightWidth*r,e[6]=e[14]=e[22]=e[30]=this._width}_getMinScale(){const e=this._leftWidth+this._rightWidth,r=this._width>e?1:this._width/e,n=this._topHeight+this._bottomHeight,i=this._height>n?1:this._height/n;return Math.min(r,i)}get width(){return this._width}set width(e){this._width=e,this._refresh()}get height(){return this._height}set height(e){this._height=e,this._refresh()}get leftWidth(){return this._leftWidth}set leftWidth(e){this._leftWidth=e,this._refresh()}get rightWidth(){return this._rightWidth}set rightWidth(e){this._rightWidth=e,this._refresh()}get topHeight(){return this._topHeight}set topHeight(e){this._topHeight=e,this._refresh()}get bottomHeight(){return this._bottomHeight}set bottomHeight(e){this._bottomHeight=e,this._refresh()}_refresh(){const e=this.texture,r=this.geometry.buffers[1].data;this._origWidth=e.orig.width,this._origHeight=e.orig.height;const n=1/this._origWidth,i=1/this._origHeight;r[0]=r[8]=r[16]=r[24]=0,r[1]=r[3]=r[5]=r[7]=0,r[6]=r[14]=r[22]=r[30]=1,r[25]=r[27]=r[29]=r[31]=1,r[2]=r[10]=r[18]=r[26]=n*this._leftWidth,r[4]=r[12]=r[20]=r[28]=1-n*this._rightWidth,r[9]=r[11]=r[13]=r[15]=i*this._topHeight,r[17]=r[19]=r[21]=r[23]=1-i*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()}}class yO extends Zu{constructor(e=se.EMPTY,r,n,i,s){const o=new hp(r,n,i);o.getBuffer("aVertexPosition").static=!1;const l=new Ju(e);super(o,l,null,s),this.autoUpdate=!0}get vertices(){return this.geometry.getBuffer("aVertexPosition").data}set vertices(e){this.geometry.getBuffer("aVertexPosition").data=e}_render(e){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),super._render(e)}}class vO extends Zu{constructor(e,r,n=0){const i=new pO(e.height,r,n),s=new Ju(e);n>0&&(e.baseTexture.wrapMode=qi.REPEAT),super(i,s),this.autoUpdate=!0}_render(e){const r=this.geometry;(this.autoUpdate||r._width!==this.shader.texture.height)&&(r._width=this.shader.texture.height,r.update()),super._render(e)}}class _O extends Tr{constructor(e=1500,r,n=16384,i=!1){super();const s=16384;n>s&&(n=s),this._properties=[!1,!0,!1,!1,!1],this._maxSize=e,this._batchSize=n,this._buffers=null,this._bufferUpdateIDs=[],this._updateID=0,this.interactiveChildren=!1,this.blendMode=Re.NORMAL,this.autoResize=i,this.roundPixels=!0,this.baseTexture=null,this.setProperties(r),this._tintColor=new tt(0),this.tintRgb=new Float32Array(3),this.tint=16777215}setProperties(e){e&&(this._properties[0]="vertices"in e||"scale"in e?!!e.vertices||!!e.scale:this._properties[0],this._properties[1]="position"in e?!!e.position:this._properties[1],this._properties[2]="rotation"in e?!!e.rotation:this._properties[2],this._properties[3]="uvs"in e?!!e.uvs:this._properties[3],this._properties[4]="tint"in e||"alpha"in e?!!e.tint||!!e.alpha:this._properties[4])}updateTransform(){this.displayObjectUpdateTransform()}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e),this._tintColor.toRgbArray(this.tintRgb)}render(e){!this.visible||this.worldAlpha<=0||!this.children.length||!this.renderable||(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",()=>this.onChildrenChange(0))),e.batch.setObjectRenderer(e.plugins.particle),e.plugins.particle.render(this))}onChildrenChange(e){const r=Math.floor(e/this._batchSize);for(;this._bufferUpdateIDs.length<r;)this._bufferUpdateIDs.push(0);this._bufferUpdateIDs[r]=++this._updateID}dispose(){if(this._buffers){for(let e=0;e<this._buffers.length;++e)this._buffers[e].destroy();this._buffers=null}}destroy(e){super.destroy(e),this.dispose(),this._properties=null,this._buffers=null,this._bufferUpdateIDs=null}}class UE{constructor(e,r,n){this.geometry=new Ys,this.indexBuffer=null,this.size=n,this.dynamicProperties=[],this.staticProperties=[];for(let i=0;i<e.length;++i){let s=e[i];s={attributeName:s.attributeName,size:s.size,uploadFunction:s.uploadFunction,type:s.type||Ae.FLOAT,offset:s.offset},r[i]?this.dynamicProperties.push(s):this.staticProperties.push(s)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()}initBuffers(){const e=this.geometry;let r=0;this.indexBuffer=new It(k4(this.size),!0,!0),e.addIndex(this.indexBuffer),this.dynamicStride=0;for(let o=0;o<this.dynamicProperties.length;++o){const l=this.dynamicProperties[o];l.offset=r,r+=l.size,this.dynamicStride+=l.size}const n=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(n),this.dynamicDataUint32=new Uint32Array(n),this.dynamicBuffer=new It(this.dynamicData,!1,!1);let i=0;this.staticStride=0;for(let o=0;o<this.staticProperties.length;++o){const l=this.staticProperties[o];l.offset=i,i+=l.size,this.staticStride+=l.size}const s=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(s),this.staticDataUint32=new Uint32Array(s),this.staticBuffer=new It(this.staticData,!0,!1);for(let o=0;o<this.dynamicProperties.length;++o){const l=this.dynamicProperties[o];e.addAttribute(l.attributeName,this.dynamicBuffer,0,l.type===Ae.UNSIGNED_BYTE,l.type,this.dynamicStride*4,l.offset*4)}for(let o=0;o<this.staticProperties.length;++o){const l=this.staticProperties[o];e.addAttribute(l.attributeName,this.staticBuffer,0,l.type===Ae.UNSIGNED_BYTE,l.type,this.staticStride*4,l.offset*4)}}uploadDynamic(e,r,n){for(let i=0;i<this.dynamicProperties.length;i++){const s=this.dynamicProperties[i];s.uploadFunction(e,r,n,s.type===Ae.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,s.offset)}this.dynamicBuffer._updateID++}uploadStatic(e,r,n){for(let i=0;i<this.staticProperties.length;i++){const s=this.staticProperties[i];s.uploadFunction(e,r,n,s.type===Ae.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,s.offset)}this.staticBuffer._updateID++}destroy(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()}}var xO=`varying vec2 vTextureCoord;
693
693
  varying vec4 vColor;
694
694
 
695
695
  uniform sampler2D uSampler;
@@ -837,7 +837,7 @@ void main(void)
837
837
  gl_FragColor = texSample * uColor;
838
838
  }
839
839
  `;const Zc=new ot;class DC extends lp{constructor(e){super(e),e.runners.contextChange.add(this),this.quad=new VA,this.state=Mi.for2d()}contextChange(){const e=this.renderer,r={globals:e.globalUniforms};this.simpleShader=Ci.from(zE,TO,r),this.shader=e.context.webGLVersion>1?Ci.from(SO,EO,r):Ci.from(zE,bO,r)}render(e){const r=this.renderer,n=this.quad;let i=n.vertices;i[0]=i[6]=e._width*-e.anchor.x,i[1]=i[3]=e._height*-e.anchor.y,i[2]=i[4]=e._width*(1-e.anchor.x),i[5]=i[7]=e._height*(1-e.anchor.y);const s=e.uvRespectAnchor?e.anchor.x:0,o=e.uvRespectAnchor?e.anchor.y:0;i=n.uvs,i[0]=i[6]=-s,i[1]=i[3]=-o,i[2]=i[4]=1-s,i[5]=i[7]=1-o,n.invalidate();const l=e._texture,h=l.baseTexture,c=h.alphaMode>0,f=e.tileTransform.localTransform,m=e.uvMatrix;let p=h.isPowerOfTwo&&l.frame.width===h.width&&l.frame.height===h.height;p&&(h._glTextures[r.CONTEXT_UID]?p=h.wrapMode!==qi.CLAMP:h.wrapMode===qi.CLAMP&&(h.wrapMode=qi.REPEAT));const v=p?this.simpleShader:this.shader,_=l.width,E=l.height,T=e._width,S=e._height;Zc.set(f.a*_/T,f.b*_/S,f.c*E/T,f.d*E/S,f.tx/T,f.ty/S),Zc.invert(),p?Zc.prepend(m.mapCoord):(v.uniforms.uMapCoord=m.mapCoord.toArray(!0),v.uniforms.uClampFrame=m.uClampFrame,v.uniforms.uClampOffset=m.uClampOffset),v.uniforms.uTransform=Zc.toArray(!0),v.uniforms.uColor=tt.shared.setValue(e.tint).premultiply(e.worldAlpha,c).toArray(v.uniforms.uColor),v.uniforms.translationMatrix=e.transform.worldTransform.toArray(!0),v.uniforms.uSampler=l,r.shader.bind(v),r.geometry.bind(n),this.state.blendMode=NA(e.blendMode,c),r.state.set(this.state),r.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}DC.extension={name:"tilingSprite",type:ae.RendererPlugin};we.add(DC);const OC=class Lv{constructor(e){this.stage=new Tr,e=Object.assign({forceCanvas:!1},e),this.renderer=VN(e),Lv._plugins.forEach(r=>{r.init.call(this,e)})}render(){this.renderer.render(this.stage)}get view(){var e;return(e=this.renderer)==null?void 0:e.view}get screen(){var e;return(e=this.renderer)==null?void 0:e.screen}destroy(e,r){const n=Lv._plugins.slice(0);n.reverse(),n.forEach(i=>{i.destroy.call(this)}),this.stage.destroy(r),this.stage=null,this.renderer.destroy(e),this.renderer=null}};OC._plugins=[];let fp=OC;we.handleByList(ae.Application,fp._plugins);class FC{static init(e){Object.defineProperty(this,"resizeTo",{set(r){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=r,r&&(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 r,n;if(this._resizeTo===globalThis.window)r=globalThis.innerWidth,n=globalThis.innerHeight;else{const{clientWidth:i,clientHeight:s}=this._resizeTo;r=i,n=s}this.renderer.resize(r,n),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}FC.extension=ae.Application;we.add(FC);function Jr(t){return Jr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jr(t)}function BC(t){var e=function(r,n){if(Jr(r)!=="object"||r===null)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var s=i.call(r,n);if(Jr(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}(t,"string");return Jr(e)==="symbol"?e:String(e)}function Pt(t,e,r){return(e=BC(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Yg(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ss(t){return function(e){if(Array.isArray(e))return Yg(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||function(e,r){if(e){if(typeof e=="string")return Yg(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yg(e,r):void 0}}(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
840
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Et(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i]}var AO=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function CO(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var PO=function(t){return t==null};function cu(t){var e=[];if(t===void 0)return e;if(typeof t=="string")e=t.split(",");else if(typeof t=="number")e=[t];else if(Array.isArray(t))e=ss(t);else{if(t===null||Jr(t)!=="object")return e;e=[t&&(t==null?void 0:t.x)||0,t&&(t==null?void 0:t.y)||0]}return e.filter(function(r){return!PO(r)&&!isNaN(r)}).map(Number)}function GE(t,e){if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function Qg(t){return t instanceof Ge||t instanceof Ei}var Af=["click","mousedown","mousemove","mouseout","mouseover","mouseup","mouseupoutside","tap","touchstart","touchmove","touchend","touchendoutside","pointercancel","pointerout","pointerover","pointertap","pointerdown","pointerup","pointerupoutside","pointermove","rightclick","rightdown","rightup","rightupoutside","touchcancel","touchendoutside","touchmove","touchstart"];function Kg(t,e,r){if(Qg(t[e])&&Qg(r))t[e].copyFrom(r);else if(Qg(t[e])){var n=cu(r);Et(n!==void 0&&n.length>0&&n.length<3,"The property `%s` is a `Point` and must be set to a comma-separated string of either coordinates, an array containing coordinates, or a Point.",e,JSON.stringify(r),Jr(r)),t[e].set(n.shift(),n.shift())}else t[e]=r}var _a,LC=function(t){var e,r=t;if(!Array.isArray(r)){if(e=t,Object.prototype.toString.call(e)!=="[object Object]")throw new Error("collection needs to be an Array or Object");r=Object.keys(t)}var n={};return r.forEach(function(i){n[i]=!0}),function(i){return n[i]!==void 0}},UC=function(t){return function(){return!t.apply(void 0,arguments)}},Uv="children",IO=(Pt(_a={},Uv,!0),Pt(_a,"parent",!0),Pt(_a,"worldAlpha",!0),Pt(_a,"worldTransform",!0),Pt(_a,"worldVisible",!0),_a),zv={alpha:1,buttonMode:!1,cacheAsBitmap:!1,cursor:null,filterArea:null,filters:null,hitArea:null,interactive:!1,mask:null,pivot:0,position:0,renderable:!0,rotation:0,scale:1,skew:0,transform:null,visible:!0,x:0,y:0},Ii=function(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=function(l){return requestAnimationFrame(function(){var h,c;l==null||(h=l.__reactpixi)===null||h===void 0||(c=h.root)===null||c===void 0||c.emit("__REACT_PIXI_REQUEST_RENDER__")})},i=function(l,h){if(r.hasOwnProperty(l))return Et(h.typeofs.some(function(c){return Jr(r[l])===c})||h.instanceofs.some(function(c){return r[l]instanceof c}),"".concat(t," ").concat(l," prop is invalid")),r[l]};if(r.texture)return Et(r.texture instanceof se,"".concat(t," texture needs to be typeof `Texture`")),r.texture;var s=i("image",{typeofs:["string"],instanceofs:[HTMLImageElement]})||i("video",{typeofs:["string"],instanceofs:[HTMLVideoElement]})||i("source",{typeofs:["string","number"],instanceofs:[HTMLImageElement,HTMLVideoElement,HTMLCanvasElement,se]});Et(!!s,"".concat(t," could not get texture from props"));var o=se.from(s);return o.__reactpixi={root:e},o.once("update",n),o.once("loaded",n),o.valid&&n(o),o},RO=UC(LC([].concat(ss(Object.keys(IO)),ss(Af))));function Ri(t,e,r){var n=!1;if(Et(ct.prototype.isPrototypeOf(t),"instance needs to be typeof `DisplayObject`, got `%s`",Jr(t)),!r.ignoreEvents)for(var i=typeof t.removeListener=="function",s=typeof t.on=="function",o=0;o<Af.length;o++){var l=Af[o];e[l]!==r[l]&&(n=!0,typeof e[l]=="function"&&i&&t.removeListener(l,e[l]),typeof r[l]=="function"&&s&&t.on(l,r[l]))}var h=Object.keys(r||{});if(r.overwriteProps){for(var c=0;c<h.length;c++){var f=h[c];e[f]!==r[f]&&(n=!0,Kg(t,f,r[f]))}return n}for(var m=h.filter(RO),p=0;p<m.length;p++){var v=m[p],_=r[v];r[v]!==e[v]&&(n=!0),_!==void 0?Kg(t,v,_):v in zv?(console.warn("setting default value: ".concat(v,", from: ").concat(t[v]," to: ").concat(_," for"),t),n=!0,Kg(t,v,zv[v])):console.warn("ignoring prop: ".concat(v,", from ").concat(t[v]," to ").concat(_," for"),t)}return n}var MO=function(t,e){var r=e.text,n=e.style;return new yD(r,n)},kO=function(){return new Tr};function ro(t,e){if(t==null)return{};var r,n,i=function(o,l){if(o==null)return{};var h,c,f={},m=Object.keys(o);for(c=0;c<m.length;c++)h=m[c],l.indexOf(h)>=0||(f[h]=o[h]);return f}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var NO=["draw","geometry"],DO=function(t,e){var r=e.geometry;Et(!r||r instanceof Iu,"Graphics geometry needs to be a `Graphics`");var n=r?new Iu(r.geometry):new Iu;return n.applyProps=function(i,s,o){var l=o.draw;o.geometry;var h=Ri(i,s,ro(o,NO));return s.draw!==l&&typeof l=="function"&&(h=!0,l.call(n,n)),h},n},OO=["image","texture"],FO=function(t,e){var r=e.leftWidth,n=r===void 0?10:r,i=e.topHeight,s=i===void 0?10:i,o=e.rightWidth,l=o===void 0?10:o,h=e.bottomHeight,c=h===void 0?10:h,f=Ii("NineSlicePlane",t,e),m=new gO(f,n,s,l,c);return m.applyProps=function(p,v,_){var E=_.image,T=_.texture,S=Ri(p,v,ro(_,OO));return(E||T)&&(T!==v.texture&&(S=!0),p.texture=Ii("NineSlicePlane",t,_)),S},m};function HE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Jc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?HE(Object(r),!0).forEach(function(n){Pt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):HE(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var BO=function(t,e){var r=e.maxSize,n=r===void 0?1500:r,i=e.batchSize,s=i===void 0?16384:i,o=e.autoResize,l=o!==void 0&&o,h=Jc(Jc({},{vertices:!1,scale:!0,position:!0,rotation:!0,uvs:!0,tint:!0}),e.properties||{}),c=Jc(Jc({},{children:!1,texture:!1,baseTexture:!1}),e.destroyOptions||{}),f=new _O(n,h,s,l);return f.willUnmount=function(m,p,v){m.destroy(c)},f},LO=["image","texture"],UO=function(t,e){var r=new ki(Ii("Sprite",t,e));return r.applyProps=function(n,i,s){var o=s.image,l=s.texture,h=Ri(n,i,ro(s,LO));return(l&&i.texture!==s.texture||o&&i.image!==s.image)&&(i.texture!==s.texture&&(h=!0),n.texture=Ii("Sprite",t,s)),h},r},zO=["textures","isPlaying","initialFrame","images"],GO=function(t,e){var r=e.textures,n=e.images,i=e.isPlaying,s=i===void 0||i,o=e.initialFrame,l=function(c){return c.map(function(f){return Et(f instanceof se||(f==null?void 0:f.texture),"AnimationSprite texture needs to be an array of `Texture` or `{ texture: Texture, time:\n number }`"),f})},h=n?eh.fromImages(n):new eh(l(r));return h[s?"gotoAndPlay":"gotoAndStop"](o||0),h.applyProps=function(c,f,m){var p=m.textures,v=m.isPlaying,_=m.initialFrame,E=m.images,T=Ri(c,f,ro(m,zO));if(E&&f.images!==E){for(var S=[],b=0;b<E.length;++b)S.push(se.from(E[b]));c.textures=S,T=!0}if(p&&f.textures!==p&&(c.textures=l(p),T=!0),v!==f.isPlaying||_!==f.initialFrame){var x=typeof _=="number"?_:h.currentFrame||0;h[v?"gotoAndPlay":"gotoAndStop"](x),T=!0}return T},h},HO=function(t,e){var r=e.text,n=r===void 0?"":r,i=e.style,s=i===void 0?{}:i,o=e.isSprite,l=new u_(n,s);return o?(l.updateText(),new ki(l.texture)):l},jO=["tileScale","tilePosition","image","texture"],$O=function(t,e){var r=e.width,n=r===void 0?100:r,i=e.height,s=i===void 0?100:i,o=Ii("TilingSprite",t,e),l=new p_(o,n,s);return l.applyProps=function(h,c,f){var m=f.tileScale,p=f.tilePosition,v=f.image,_=f.texture,E=Ri(h,c,ro(f,jO));if(p){var T,S=cu(p);(T=h.tilePosition).set.apply(T,ss(S)),E=!GE(cu(c.tilePosition),S)||E}if(m){var b,x=cu(m);(b=h.tileScale).set.apply(b,ss(x)),E=!GE(cu(c.tileScale),x)||E}return(v||_)&&(_!==c.texture&&(E=!0),h.texture=Ii("Sprite",t,f)),E},l},WO=["image","texture"],VO=function(t,e){var r=Ii("Mesh",t,e),n=e.vertices,i=e.uvs,s=e.indices,o=e.drawMode,l=o===void 0?$n.TRIANGLES:o,h=new yO(r,n,i,s,l);return h.applyProps=function(c,f,m){var p=m.image,v=m.texture,_=Ri(c,f,ro(m,WO));return(p||v)&&(v!==f.texture&&(_=!0),c.texture=Ii("Mesh",t,m)),_},h},XO=["image","texture"],YO=function(t,e){var r=Ii("SimpleRope",t,e),n=e.points,i=new vO(r,n);return i.applyProps=function(s,o,l){var h=l.image,c=l.texture,f=ro(l,XO);Et(Array.isArray(l.points),"SimpleRope points needs to be %s","Array<Point>");var m=Ri(s,o,f);return(h||c)&&(c!==o.texture&&(m=!0),s.texture=Ii("SimpleRope",t,l)),m},i},QO=Object.freeze({__proto__:null,BitmapText:MO,Container:kO,Graphics:DO,NineSlicePlane:FO,ParticleContainer:BO,Sprite:UO,Text:HO,TilingSprite:$O,SimpleMesh:VO,SimpleRope:YO,AnimatedSprite:GO});function jE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function $E(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?jE(Object(r),!0).forEach(function(n){Pt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jE(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Gr={BitmapText:"BitmapText",Container:"Container",Graphics:"Graphics",NineSlicePlane:"NineSlicePlane",ParticleContainer:"ParticleContainer",Sprite:"Sprite",AnimatedSprite:"AnimatedSprite",Text:"Text",TilingSprite:"TilingSprite",SimpleMesh:"SimpleMesh",SimpleRope:"SimpleRope"},KO=Object.keys(Gr).reduce(function(t,e){return $E($E({},t),{},Pt({},e,QO[e]))},{}),zC={};function qO(t,e){return Et(!!t,"Expect type to be defined, got `%s`",t),Et(!Gr[t],"Component `%s` could not be created, already exists in default components.",t),zC[t]=e,t}var WE,VE,XE,YE,Gv={},Hv={},ZO={get exports(){return Hv},set exports(t){Hv=t}},QE={};function JO(){return VE||(VE=1,ZO.exports=(WE||(WE=1,function(t){function e(M,W){var O=M.length;M.push(W);e:for(;0<O;){var H=O-1>>>1,z=M[H];if(!(0<i(z,W)))break e;M[H]=W,M[O]=z,O=H}}function r(M){return M.length===0?null:M[0]}function n(M){if(M.length===0)return null;var W=M[0],O=M.pop();if(O!==W){M[0]=O;e:for(var H=0,z=M.length,X=z>>>1;H<X;){var J=2*(H+1)-1,ve=M[J],le=J+1,Te=M[le];if(0>i(ve,O))le<z&&0>i(Te,ve)?(M[H]=Te,M[le]=O,H=le):(M[H]=ve,M[J]=O,H=J);else{if(!(le<z&&0>i(Te,O)))break e;M[H]=Te,M[le]=O,H=le}}}return W}function i(M,W){var O=M.sortIndex-W.sortIndex;return O!==0?O:M.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var h=[],c=[],f=1,m=null,p=3,v=!1,_=!1,E=!1,T=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;function x(M){for(var W=r(c);W!==null;){if(W.callback===null)n(c);else{if(!(W.startTime<=M))break;n(c),W.sortIndex=W.expirationTime,e(h,W)}W=r(c)}}function A(M){if(E=!1,x(M),!_)if(r(h)!==null)_=!0,_e(R);else{var W=r(c);W!==null&&fe(A,W.startTime-M)}}function R(M,W){_=!1,E&&(E=!1,S(q),q=-1),v=!0;var O=p;try{for(x(W),m=r(h);m!==null&&(!(m.expirationTime>W)||M&&!ne());){var H=m.callback;if(typeof H=="function"){m.callback=null,p=m.priorityLevel;var z=H(m.expirationTime<=W);W=t.unstable_now(),typeof z=="function"?m.callback=z:m===r(h)&&n(h),x(W)}else n(h);m=r(h)}if(m!==null)var X=!0;else{var J=r(c);J!==null&&fe(A,J.startTime-W),X=!1}return X}finally{m=null,p=O,v=!1}}typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var L,N=!1,D=null,q=-1,$=5,me=-1;function ne(){return!(t.unstable_now()-me<$)}function B(){if(D!==null){var M=t.unstable_now();me=M;var W=!0;try{W=D(!0,M)}finally{W?L():(N=!1,D=null)}}else N=!1}if(typeof b=="function")L=function(){b(B)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,ie=K.port2;K.port1.onmessage=B,L=function(){ie.postMessage(null)}}else L=function(){T(B,0)};function _e(M){D=M,N||(N=!0,L())}function fe(M,W){q=T(function(){M(t.unstable_now())},W)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(M){M.callback=null},t.unstable_continueExecution=function(){_||v||(_=!0,_e(R))},t.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<M?Math.floor(1e3/M):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(h)},t.unstable_next=function(M){switch(p){case 1:case 2:case 3:var W=3;break;default:W=p}var O=p;p=W;try{return M()}finally{p=O}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(M,W){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var O=p;p=M;try{return W()}finally{p=O}},t.unstable_scheduleCallback=function(M,W,O){var H=t.unstable_now();switch(O=typeof O=="object"&&O!==null&&typeof(O=O.delay)=="number"&&0<O?H+O:H,M){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return M={id:f++,callback:W,priorityLevel:M,startTime:O,expirationTime:z=O+z,sortIndex:-1},O>H?(M.sortIndex=O,e(c,M),r(h)===null&&M===r(c)&&(E?(S(q),q=-1):E=!0,fe(A,O-H))):(M.sortIndex=z,e(h,M),_||v||(_=!0,_e(R))),M},t.unstable_shouldYield=ne,t.unstable_wrapCallback=function(M){var W=p;return function(){var O=p;p=W;try{return M.apply(this,arguments)}finally{p=O}}}}(QE)),QE)),Hv}/**
840
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Et(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i]}var AO=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function CO(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var PO=function(t){return t==null};function cu(t){var e=[];if(t===void 0)return e;if(typeof t=="string")e=t.split(",");else if(typeof t=="number")e=[t];else if(Array.isArray(t))e=ss(t);else{if(t===null||Jr(t)!=="object")return e;e=[t&&(t==null?void 0:t.x)||0,t&&(t==null?void 0:t.y)||0]}return e.filter(function(r){return!PO(r)&&!isNaN(r)}).map(Number)}function GE(t,e){if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function Qg(t){return t instanceof Ge||t instanceof Ei}var Af=["click","mousedown","mousemove","mouseout","mouseover","mouseup","mouseupoutside","tap","touchstart","touchmove","touchend","touchendoutside","pointercancel","pointerout","pointerover","pointertap","pointerdown","pointerup","pointerupoutside","pointermove","rightclick","rightdown","rightup","rightupoutside","touchcancel","touchendoutside","touchmove","touchstart"];function Kg(t,e,r){if(Qg(t[e])&&Qg(r))t[e].copyFrom(r);else if(Qg(t[e])){var n=cu(r);Et(n!==void 0&&n.length>0&&n.length<3,"The property `%s` is a `Point` and must be set to a comma-separated string of either coordinates, an array containing coordinates, or a Point.",e,JSON.stringify(r),Jr(r)),t[e].set(n.shift(),n.shift())}else t[e]=r}var _a,LC=function(t){var e,r=t;if(!Array.isArray(r)){if(e=t,Object.prototype.toString.call(e)!=="[object Object]")throw new Error("collection needs to be an Array or Object");r=Object.keys(t)}var n={};return r.forEach(function(i){n[i]=!0}),function(i){return n[i]!==void 0}},UC=function(t){return function(){return!t.apply(void 0,arguments)}},Uv="children",IO=(Pt(_a={},Uv,!0),Pt(_a,"parent",!0),Pt(_a,"worldAlpha",!0),Pt(_a,"worldTransform",!0),Pt(_a,"worldVisible",!0),_a),zv={alpha:1,buttonMode:!1,cacheAsBitmap:!1,cursor:null,filterArea:null,filters:null,hitArea:null,interactive:!1,mask:null,pivot:0,position:0,renderable:!0,rotation:0,scale:1,skew:0,transform:null,visible:!0,x:0,y:0},Ii=function(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=function(l){return requestAnimationFrame(function(){var h,c;l==null||(h=l.__reactpixi)===null||h===void 0||(c=h.root)===null||c===void 0||c.emit("__REACT_PIXI_REQUEST_RENDER__")})},i=function(l,h){if(r.hasOwnProperty(l))return Et(h.typeofs.some(function(c){return Jr(r[l])===c})||h.instanceofs.some(function(c){return r[l]instanceof c}),"".concat(t," ").concat(l," prop is invalid")),r[l]};if(r.texture)return Et(r.texture instanceof se,"".concat(t," texture needs to be typeof `Texture`")),r.texture;var s=i("image",{typeofs:["string"],instanceofs:[HTMLImageElement]})||i("video",{typeofs:["string"],instanceofs:[HTMLVideoElement]})||i("source",{typeofs:["string","number"],instanceofs:[HTMLImageElement,HTMLVideoElement,HTMLCanvasElement,se]});Et(!!s,"".concat(t," could not get texture from props"));var o=se.from(s);return o.__reactpixi={root:e},o.once("update",n),o.once("loaded",n),o.valid&&n(o),o},RO=UC(LC([].concat(ss(Object.keys(IO)),ss(Af))));function Ri(t,e,r){var n=!1;if(Et(ct.prototype.isPrototypeOf(t),"instance needs to be typeof `DisplayObject`, got `%s`",Jr(t)),!r.ignoreEvents)for(var i=typeof t.removeListener=="function",s=typeof t.on=="function",o=0;o<Af.length;o++){var l=Af[o];e[l]!==r[l]&&(n=!0,typeof e[l]=="function"&&i&&t.removeListener(l,e[l]),typeof r[l]=="function"&&s&&t.on(l,r[l]))}var h=Object.keys(r||{});if(r.overwriteProps){for(var c=0;c<h.length;c++){var f=h[c];e[f]!==r[f]&&(n=!0,Kg(t,f,r[f]))}return n}for(var m=h.filter(RO),p=0;p<m.length;p++){var v=m[p],_=r[v];r[v]!==e[v]&&(n=!0),_!==void 0?Kg(t,v,_):v in zv?(console.warn("setting default value: ".concat(v,", from: ").concat(t[v]," to: ").concat(_," for"),t),n=!0,Kg(t,v,zv[v])):console.warn("ignoring prop: ".concat(v,", from ").concat(t[v]," to ").concat(_," for"),t)}return n}var MO=function(t,e){var r=e.text,n=e.style;return new yD(r,n)},kO=function(){return new Tr};function ro(t,e){if(t==null)return{};var r,n,i=function(o,l){if(o==null)return{};var h,c,f={},m=Object.keys(o);for(c=0;c<m.length;c++)h=m[c],l.indexOf(h)>=0||(f[h]=o[h]);return f}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var NO=["draw","geometry"],DO=function(t,e){var r=e.geometry;Et(!r||r instanceof Iu,"Graphics geometry needs to be a `Graphics`");var n=r?new Iu(r.geometry):new Iu;return n.applyProps=function(i,s,o){var l=o.draw;o.geometry;var h=Ri(i,s,ro(o,NO));return s.draw!==l&&typeof l=="function"&&(h=!0,l.call(n,n)),h},n},OO=["image","texture"],FO=function(t,e){var r=e.leftWidth,n=r===void 0?10:r,i=e.topHeight,s=i===void 0?10:i,o=e.rightWidth,l=o===void 0?10:o,h=e.bottomHeight,c=h===void 0?10:h,f=Ii("NineSlicePlane",t,e),m=new gO(f,n,s,l,c);return m.applyProps=function(p,v,_){var E=_.image,T=_.texture,S=Ri(p,v,ro(_,OO));return(E||T)&&(T!==v.texture&&(S=!0),p.texture=Ii("NineSlicePlane",t,_)),S},m};function HE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Jc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?HE(Object(r),!0).forEach(function(n){Pt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):HE(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var BO=function(t,e){var r=e.maxSize,n=r===void 0?1500:r,i=e.batchSize,s=i===void 0?16384:i,o=e.autoResize,l=o!==void 0&&o,h=Jc(Jc({},{vertices:!1,scale:!0,position:!0,rotation:!0,uvs:!0,tint:!0}),e.properties||{}),c=Jc(Jc({},{children:!1,texture:!1,baseTexture:!1}),e.destroyOptions||{}),f=new _O(n,h,s,l);return f.willUnmount=function(m,p,v){m.destroy(c)},f},LO=["image","texture"],UO=function(t,e){var r=new ki(Ii("Sprite",t,e));return r.applyProps=function(n,i,s){var o=s.image,l=s.texture,h=Ri(n,i,ro(s,LO));return(l&&i.texture!==s.texture||o&&i.image!==s.image)&&(i.texture!==s.texture&&(h=!0),n.texture=Ii("Sprite",t,s)),h},r},zO=["textures","isPlaying","initialFrame","images"],GO=function(t,e){var r=e.textures,n=e.images,i=e.isPlaying,s=i===void 0||i,o=e.initialFrame,l=function(c){return c.map(function(f){return Et(f instanceof se||(f==null?void 0:f.texture),"AnimationSprite texture needs to be an array of `Texture` or `{ texture: Texture, time:\n number }`"),f})},h=n?eh.fromImages(n):new eh(l(r));return h[s?"gotoAndPlay":"gotoAndStop"](o||0),h.applyProps=function(c,f,m){var p=m.textures,v=m.isPlaying,_=m.initialFrame,E=m.images,T=Ri(c,f,ro(m,zO));if(E&&f.images!==E){for(var S=[],b=0;b<E.length;++b)S.push(se.from(E[b]));c.textures=S,T=!0}if(p&&f.textures!==p&&(c.textures=l(p),T=!0),v!==f.isPlaying||_!==f.initialFrame){var x=typeof _=="number"?_:h.currentFrame||0;h[v?"gotoAndPlay":"gotoAndStop"](x),T=!0}return T},h},HO=function(t,e){var r=e.text,n=r===void 0?"":r,i=e.style,s=i===void 0?{}:i,o=e.isSprite,l=new u_(n,s);return o?(l.updateText(),new ki(l.texture)):l},jO=["tileScale","tilePosition","image","texture"],$O=function(t,e){var r=e.width,n=r===void 0?100:r,i=e.height,s=i===void 0?100:i,o=Ii("TilingSprite",t,e),l=new p_(o,n,s);return l.applyProps=function(h,c,f){var m=f.tileScale,p=f.tilePosition,v=f.image,_=f.texture,E=Ri(h,c,ro(f,jO));if(p){var T,S=cu(p);(T=h.tilePosition).set.apply(T,ss(S)),E=!GE(cu(c.tilePosition),S)||E}if(m){var b,x=cu(m);(b=h.tileScale).set.apply(b,ss(x)),E=!GE(cu(c.tileScale),x)||E}return(v||_)&&(_!==c.texture&&(E=!0),h.texture=Ii("Sprite",t,f)),E},l},WO=["image","texture"],VO=function(t,e){var r=Ii("Mesh",t,e),n=e.vertices,i=e.uvs,s=e.indices,o=e.drawMode,l=o===void 0?$n.TRIANGLES:o,h=new yO(r,n,i,s,l);return h.applyProps=function(c,f,m){var p=m.image,v=m.texture,_=Ri(c,f,ro(m,WO));return(p||v)&&(v!==f.texture&&(_=!0),c.texture=Ii("Mesh",t,m)),_},h},XO=["image","texture"],YO=function(t,e){var r=Ii("SimpleRope",t,e),n=e.points,i=new vO(r,n);return i.applyProps=function(s,o,l){var h=l.image,c=l.texture,f=ro(l,XO);Et(Array.isArray(l.points),"SimpleRope points needs to be %s","Array<Point>");var m=Ri(s,o,f);return(h||c)&&(c!==o.texture&&(m=!0),s.texture=Ii("SimpleRope",t,l)),m},i},QO=Object.freeze({__proto__:null,BitmapText:MO,Container:kO,Graphics:DO,NineSlicePlane:FO,ParticleContainer:BO,Sprite:UO,Text:HO,TilingSprite:$O,SimpleMesh:VO,SimpleRope:YO,AnimatedSprite:GO});function jE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function $E(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?jE(Object(r),!0).forEach(function(n){Pt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jE(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Gr={BitmapText:"BitmapText",Container:"Container",Graphics:"Graphics",NineSlicePlane:"NineSlicePlane",ParticleContainer:"ParticleContainer",Sprite:"Sprite",AnimatedSprite:"AnimatedSprite",Text:"Text",TilingSprite:"TilingSprite",SimpleMesh:"SimpleMesh",SimpleRope:"SimpleRope"},KO=Object.keys(Gr).reduce(function(t,e){return $E($E({},t),{},Pt({},e,QO[e]))},{}),zC={};function qO(t,e){return Et(!!t,"Expect type to be defined, got `%s`",t),Et(!Gr[t],"Component `%s` could not be created, already exists in default components.",t),zC[t]=e,t}var WE,VE,XE,YE,Gv={},Hv={},ZO={get exports(){return Hv},set exports(t){Hv=t}},QE={};function JO(){return VE||(VE=1,ZO.exports=(WE||(WE=1,function(t){function e(M,W){var F=M.length;M.push(W);e:for(;0<F;){var H=F-1>>>1,z=M[H];if(!(0<i(z,W)))break e;M[H]=W,M[F]=z,F=H}}function r(M){return M.length===0?null:M[0]}function n(M){if(M.length===0)return null;var W=M[0],F=M.pop();if(F!==W){M[0]=F;e:for(var H=0,z=M.length,Y=z>>>1;H<Y;){var J=2*(H+1)-1,ve=M[J],le=J+1,Te=M[le];if(0>i(ve,F))le<z&&0>i(Te,ve)?(M[H]=Te,M[le]=F,H=le):(M[H]=ve,M[J]=F,H=J);else{if(!(le<z&&0>i(Te,F)))break e;M[H]=Te,M[le]=F,H=le}}}return W}function i(M,W){var F=M.sortIndex-W.sortIndex;return F!==0?F:M.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var h=[],c=[],f=1,m=null,p=3,v=!1,_=!1,E=!1,T=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;function x(M){for(var W=r(c);W!==null;){if(W.callback===null)n(c);else{if(!(W.startTime<=M))break;n(c),W.sortIndex=W.expirationTime,e(h,W)}W=r(c)}}function A(M){if(E=!1,x(M),!_)if(r(h)!==null)_=!0,_e(R);else{var W=r(c);W!==null&&fe(A,W.startTime-M)}}function R(M,W){_=!1,E&&(E=!1,S(Q),Q=-1),v=!0;var F=p;try{for(x(W),m=r(h);m!==null&&(!(m.expirationTime>W)||M&&!te());){var H=m.callback;if(typeof H=="function"){m.callback=null,p=m.priorityLevel;var z=H(m.expirationTime<=W);W=t.unstable_now(),typeof z=="function"?m.callback=z:m===r(h)&&n(h),x(W)}else n(h);m=r(h)}if(m!==null)var Y=!0;else{var J=r(c);J!==null&&fe(A,J.startTime-W),Y=!1}return Y}finally{m=null,p=F,v=!1}}typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var L,k=!1,D=null,Q=-1,$=5,me=-1;function te(){return!(t.unstable_now()-me<$)}function O(){if(D!==null){var M=t.unstable_now();me=M;var W=!0;try{W=D(!0,M)}finally{W?L():(k=!1,D=null)}}else k=!1}if(typeof b=="function")L=function(){b(O)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,ie=V.port2;V.port1.onmessage=O,L=function(){ie.postMessage(null)}}else L=function(){T(O,0)};function _e(M){D=M,k||(k=!0,L())}function fe(M,W){Q=T(function(){M(t.unstable_now())},W)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(M){M.callback=null},t.unstable_continueExecution=function(){_||v||(_=!0,_e(R))},t.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<M?Math.floor(1e3/M):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(h)},t.unstable_next=function(M){switch(p){case 1:case 2:case 3:var W=3;break;default:W=p}var F=p;p=W;try{return M()}finally{p=F}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(M,W){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var F=p;p=M;try{return W()}finally{p=F}},t.unstable_scheduleCallback=function(M,W,F){var H=t.unstable_now();switch(F=typeof F=="object"&&F!==null&&typeof(F=F.delay)=="number"&&0<F?H+F:H,M){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return M={id:f++,callback:W,priorityLevel:M,startTime:F,expirationTime:z=F+z,sortIndex:-1},F>H?(M.sortIndex=F,e(c,M),r(h)===null&&M===r(c)&&(E?(S(Q),Q=-1):E=!0,fe(A,F-H))):(M.sortIndex=z,e(h,M),_||v||(_=!0,_e(R))),M},t.unstable_shouldYield=te,t.unstable_wrapCallback=function(M){var W=p;return function(){var F=p;p=W;try{return M.apply(this,arguments)}finally{p=F}}}}(QE)),QE)),Hv}/**
841
841
  * @license React
842
842
  * react-reconciler.production.min.js
843
843
  *
@@ -845,17 +845,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
845
845
  *
846
846
  * This source code is licensed under the MIT license found in the
847
847
  * LICENSE file in the root directory of this source tree.
848
- */function eF(){return YE||(YE=1,XE=function(t){var e={},r=Si,n=JO(),i=Object.assign;function s(a){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=1;d<arguments.length;d++)u+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+a+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=Symbol.for("react.element"),h=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),v=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),A=Symbol.iterator;function R(a){return a===null||typeof a!="object"?null:typeof(a=A&&a[A]||a["@@iterator"])=="function"?a:null}function L(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case c:return"Fragment";case h:return"Portal";case m:return"Profiler";case f:return"StrictMode";case E:return"Suspense";case T:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case v:return(a.displayName||"Context")+".Consumer";case p:return(a._context.displayName||"Context")+".Provider";case _:var u=a.render;return(a=a.displayName)||(a=(a=u.displayName||u.name||"")!==""?"ForwardRef("+a+")":"ForwardRef"),a;case S:return(u=a.displayName||null)!==null?u:L(a.type)||"Memo";case b:u=a._payload,a=a._init;try{return L(a(u))}catch{}}return null}function N(a){var u=a.type;switch(a.tag){case 24:return"Cache";case 9:return(u.displayName||"Context")+".Consumer";case 10:return(u._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=(a=u.render).displayName||a.name||"",u.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return u;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return L(u);case 8:return u===f?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u}return null}function D(a){var u=a,d=a;if(a.alternate)for(;u.return;)u=u.return;else{a=u;do 4098&(u=a).flags&&(d=u.return),a=u.return;while(a)}return u.tag===3?d:null}function q(a){if(D(a)!==a)throw Error(s(188))}function $(a){var u=a.alternate;if(!u){if((u=D(a))===null)throw Error(s(188));return u!==a?null:a}for(var d=a,g=u;;){var y=d.return;if(y===null)break;var w=y.alternate;if(w===null){if((g=y.return)!==null){d=g;continue}break}if(y.child===w.child){for(w=y.child;w;){if(w===d)return q(y),a;if(w===g)return q(y),u;w=w.sibling}throw Error(s(188))}if(d.return!==g.return)d=y,g=w;else{for(var C=!1,I=y.child;I;){if(I===d){C=!0,d=y,g=w;break}if(I===g){C=!0,g=y,d=w;break}I=I.sibling}if(!C){for(I=w.child;I;){if(I===d){C=!0,d=w,g=y;break}if(I===g){C=!0,g=w,d=y;break}I=I.sibling}if(!C)throw Error(s(189))}}if(d.alternate!==g)throw Error(s(190))}if(d.tag!==3)throw Error(s(188));return d.stateNode.current===d?a:u}function me(a){return(a=$(a))!==null?ne(a):null}function ne(a){if(a.tag===5||a.tag===6)return a;for(a=a.child;a!==null;){var u=ne(a);if(u!==null)return u;a=a.sibling}return null}function B(a){if(a.tag===5||a.tag===6)return a;for(a=a.child;a!==null;){if(a.tag!==4){var u=B(a);if(u!==null)return u}a=a.sibling}return null}var K,ie=Array.isArray,_e=t.getPublicInstance,fe=t.getRootHostContext,M=t.getChildHostContext,W=t.prepareForCommit,O=t.resetAfterCommit,H=t.createInstance,z=t.appendInitialChild,X=t.finalizeInitialChildren,J=t.prepareUpdate,ve=t.shouldSetTextContent,le=t.createTextInstance,Te=t.scheduleTimeout,Ce=t.cancelTimeout,pe=t.noTimeout,P=t.isPrimaryRenderer,ue=t.supportsMutation,Ee=t.supportsPersistence,Re=t.supportsHydration,Ke=t.getInstanceFromNode,je=t.preparePortalMount,vt=t.getCurrentEventPriority,St=t.detachDeletedInstance,Oe=t.supportsMicrotasks,Me=t.scheduleMicrotask,Xe=t.supportsTestSelectors,Dt=t.findFiberRoot,yr=t.getBoundingRect,Pr=t.getTextContent,bt=t.isHiddenSubtree,qe=t.matchAccessibilityRole,zt=t.setFocusIfFocusable,Ir=t.setupIntersectionObserver,as=t.appendChild,rt=t.appendChildToContainer,Tt=t.commitTextUpdate,Hr=t.commitMount,lr=t.commitUpdate,qt=t.insertBefore,At=t.insertInContainerBefore,Cn=t.removeChild,Pn=t.removeChildFromContainer,vr=t.resetTextContent,jr=t.hideInstance,_r=t.hideTextInstance,$r=t.unhideInstance,sn=t.unhideTextInstance,Ko=t.clearContainer,ph=t.cloneInstance,mh=t.createContainerChildSet,no=t.appendChildToContainerChildSet,gh=t.finalizeContainerChildren,vl=t.replaceContainerChildren,_l=t.cloneHiddenInstance,yh=t.cloneHiddenTextInstance,vh=t.canHydrateInstance,_h=t.canHydrateTextInstance,xl=t.canHydrateSuspenseInstance,xh=t.isSuspenseInstancePending,wl=t.isSuspenseInstanceFallback,mp=t.getSuspenseInstanceFallbackErrorDetails,gp=t.registerSuspenseInstanceRetry,io=t.getNextHydratableSibling,wh=t.getFirstHydratableChild,Eh=t.getFirstHydratableChildWithinContainer,Ni=t.getFirstHydratableChildWithinSuspenseInstance,m_=t.hydrateInstance,Sh=t.hydrateTextInstance,ls=t.hydrateSuspenseInstance,bh=t.getNextHydratableInstanceAfterSuspenseInstance,Th=t.commitHydratedContainer,Be=t.commitHydratedSuspenseInstance,El=t.clearSuspenseBoundary,Ah=t.clearSuspenseBoundaryFromContainer,so=t.shouldDeleteUnhydratedTailInstances,qo=t.didNotMatchHydratedContainerTextInstance,yp=t.didNotMatchHydratedTextInstance;function Sl(a){if(K===void 0)try{throw Error()}catch(d){var u=d.stack.trim().match(/\n( *(at )?)/);K=u&&u[1]||""}return`
849
- `+K+a}var vp=!1;function _p(a,u){if(!a||vp)return"";vp=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(u)if(u=function(){throw Error()},Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(j){var g=j}Reflect.construct(a,[],u)}else{try{u.call()}catch(j){g=j}a.call(u.prototype)}else{try{throw Error()}catch(j){g=j}a()}}catch(j){if(j&&g&&typeof j.stack=="string"){for(var y=j.stack.split(`
848
+ */function eF(){return YE||(YE=1,XE=function(t){var e={},r=Si,n=JO(),i=Object.assign;function s(a){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=1;d<arguments.length;d++)u+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+a+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=Symbol.for("react.element"),h=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),v=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),A=Symbol.iterator;function R(a){return a===null||typeof a!="object"?null:typeof(a=A&&a[A]||a["@@iterator"])=="function"?a:null}function L(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case c:return"Fragment";case h:return"Portal";case m:return"Profiler";case f:return"StrictMode";case E:return"Suspense";case T:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case v:return(a.displayName||"Context")+".Consumer";case p:return(a._context.displayName||"Context")+".Provider";case _:var u=a.render;return(a=a.displayName)||(a=(a=u.displayName||u.name||"")!==""?"ForwardRef("+a+")":"ForwardRef"),a;case S:return(u=a.displayName||null)!==null?u:L(a.type)||"Memo";case b:u=a._payload,a=a._init;try{return L(a(u))}catch{}}return null}function k(a){var u=a.type;switch(a.tag){case 24:return"Cache";case 9:return(u.displayName||"Context")+".Consumer";case 10:return(u._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=(a=u.render).displayName||a.name||"",u.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return u;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return L(u);case 8:return u===f?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u}return null}function D(a){var u=a,d=a;if(a.alternate)for(;u.return;)u=u.return;else{a=u;do 4098&(u=a).flags&&(d=u.return),a=u.return;while(a)}return u.tag===3?d:null}function Q(a){if(D(a)!==a)throw Error(s(188))}function $(a){var u=a.alternate;if(!u){if((u=D(a))===null)throw Error(s(188));return u!==a?null:a}for(var d=a,g=u;;){var y=d.return;if(y===null)break;var w=y.alternate;if(w===null){if((g=y.return)!==null){d=g;continue}break}if(y.child===w.child){for(w=y.child;w;){if(w===d)return Q(y),a;if(w===g)return Q(y),u;w=w.sibling}throw Error(s(188))}if(d.return!==g.return)d=y,g=w;else{for(var C=!1,I=y.child;I;){if(I===d){C=!0,d=y,g=w;break}if(I===g){C=!0,g=y,d=w;break}I=I.sibling}if(!C){for(I=w.child;I;){if(I===d){C=!0,d=w,g=y;break}if(I===g){C=!0,g=w,d=y;break}I=I.sibling}if(!C)throw Error(s(189))}}if(d.alternate!==g)throw Error(s(190))}if(d.tag!==3)throw Error(s(188));return d.stateNode.current===d?a:u}function me(a){return(a=$(a))!==null?te(a):null}function te(a){if(a.tag===5||a.tag===6)return a;for(a=a.child;a!==null;){var u=te(a);if(u!==null)return u;a=a.sibling}return null}function O(a){if(a.tag===5||a.tag===6)return a;for(a=a.child;a!==null;){if(a.tag!==4){var u=O(a);if(u!==null)return u}a=a.sibling}return null}var V,ie=Array.isArray,_e=t.getPublicInstance,fe=t.getRootHostContext,M=t.getChildHostContext,W=t.prepareForCommit,F=t.resetAfterCommit,H=t.createInstance,z=t.appendInitialChild,Y=t.finalizeInitialChildren,J=t.prepareUpdate,ve=t.shouldSetTextContent,le=t.createTextInstance,Te=t.scheduleTimeout,Pe=t.cancelTimeout,pe=t.noTimeout,P=t.isPrimaryRenderer,ue=t.supportsMutation,Ee=t.supportsPersistence,Me=t.supportsHydration,Ke=t.getInstanceFromNode,je=t.preparePortalMount,vt=t.getCurrentEventPriority,St=t.detachDeletedInstance,Oe=t.supportsMicrotasks,ke=t.scheduleMicrotask,Xe=t.supportsTestSelectors,Dt=t.findFiberRoot,yr=t.getBoundingRect,Pr=t.getTextContent,bt=t.isHiddenSubtree,qe=t.matchAccessibilityRole,zt=t.setFocusIfFocusable,Ir=t.setupIntersectionObserver,as=t.appendChild,rt=t.appendChildToContainer,Tt=t.commitTextUpdate,Hr=t.commitMount,lr=t.commitUpdate,qt=t.insertBefore,At=t.insertInContainerBefore,Cn=t.removeChild,Pn=t.removeChildFromContainer,vr=t.resetTextContent,jr=t.hideInstance,_r=t.hideTextInstance,$r=t.unhideInstance,sn=t.unhideTextInstance,Ko=t.clearContainer,ph=t.cloneInstance,mh=t.createContainerChildSet,no=t.appendChildToContainerChildSet,gh=t.finalizeContainerChildren,vl=t.replaceContainerChildren,_l=t.cloneHiddenInstance,yh=t.cloneHiddenTextInstance,vh=t.canHydrateInstance,_h=t.canHydrateTextInstance,xl=t.canHydrateSuspenseInstance,xh=t.isSuspenseInstancePending,wl=t.isSuspenseInstanceFallback,mp=t.getSuspenseInstanceFallbackErrorDetails,gp=t.registerSuspenseInstanceRetry,io=t.getNextHydratableSibling,wh=t.getFirstHydratableChild,Eh=t.getFirstHydratableChildWithinContainer,Ni=t.getFirstHydratableChildWithinSuspenseInstance,m_=t.hydrateInstance,Sh=t.hydrateTextInstance,ls=t.hydrateSuspenseInstance,bh=t.getNextHydratableInstanceAfterSuspenseInstance,Th=t.commitHydratedContainer,Be=t.commitHydratedSuspenseInstance,El=t.clearSuspenseBoundary,Ah=t.clearSuspenseBoundaryFromContainer,so=t.shouldDeleteUnhydratedTailInstances,qo=t.didNotMatchHydratedContainerTextInstance,yp=t.didNotMatchHydratedTextInstance;function Sl(a){if(V===void 0)try{throw Error()}catch(d){var u=d.stack.trim().match(/\n( *(at )?)/);V=u&&u[1]||""}return`
849
+ `+V+a}var vp=!1;function _p(a,u){if(!a||vp)return"";vp=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(u)if(u=function(){throw Error()},Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(j){var g=j}Reflect.construct(a,[],u)}else{try{u.call()}catch(j){g=j}a.call(u.prototype)}else{try{throw Error()}catch(j){g=j}a()}}catch(j){if(j&&g&&typeof j.stack=="string"){for(var y=j.stack.split(`
850
850
  `),w=g.stack.split(`
851
- `),C=y.length-1,I=w.length-1;1<=C&&0<=I&&y[C]!==w[I];)I--;for(;1<=C&&0<=I;C--,I--)if(y[C]!==w[I]){if(C!==1||I!==1)do if(C--,0>--I||y[C]!==w[I]){var F=`
852
- `+y[C].replace(" at new "," at ");return a.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",a.displayName)),F}while(1<=C&&0<=I);break}}}finally{vp=!1,Error.prepareStackTrace=d}return(a=a?a.displayName||a.name:"")?Sl(a):""}var l2=Object.prototype.hasOwnProperty,xp=[],Zo=-1;function us(a){return{current:a}}function at(a){0>Zo||(a.current=xp[Zo],xp[Zo]=null,Zo--)}function Je(a,u){Zo++,xp[Zo]=a.current,a.current=u}var hs={},ur=us(hs),Rr=us(!1),oo=hs;function Jo(a,u){var d=a.type.contextTypes;if(!d)return hs;var g=a.stateNode;if(g&&g.__reactInternalMemoizedUnmaskedChildContext===u)return g.__reactInternalMemoizedMaskedChildContext;var y,w={};for(y in d)w[y]=u[y];return g&&((a=a.stateNode).__reactInternalMemoizedUnmaskedChildContext=u,a.__reactInternalMemoizedMaskedChildContext=w),w}function Wr(a){return(a=a.childContextTypes)!=null}function wp(){at(Rr),at(ur)}function g_(a,u,d){if(ur.current!==hs)throw Error(s(168));Je(ur,u),Je(Rr,d)}function y_(a,u,d){var g=a.stateNode;if(u=u.childContextTypes,typeof g.getChildContext!="function")return d;for(var y in g=g.getChildContext())if(!(y in u))throw Error(s(108,N(a)||"Unknown",y));return i({},d,g)}function Ch(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||hs,oo=ur.current,Je(ur,a),Je(Rr,Rr.current),!0}function v_(a,u,d){var g=a.stateNode;if(!g)throw Error(s(169));d?(a=y_(a,u,oo),g.__reactInternalMemoizedMergedChildContext=a,at(Rr),at(ur),Je(ur,a)):at(Rr),Je(Rr,d)}var In=Math.clz32?Math.clz32:function(a){return(a>>>=0)===0?32:31-(u2(a)/h2|0)|0},u2=Math.log,h2=Math.LN2,Ep=64,Sp=4194304;function bl(a){switch(a&-a){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: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 4194240&a;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&a;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function Ph(a,u){var d=a.pendingLanes;if(d===0)return 0;var g=0,y=a.suspendedLanes,w=a.pingedLanes,C=268435455&d;if(C!==0){var I=C&~y;I!==0?g=bl(I):(w&=C)!==0&&(g=bl(w))}else(C=d&~y)!==0?g=bl(C):w!==0&&(g=bl(w));if(g===0)return 0;if(u!==0&&u!==g&&!(u&y)&&((y=g&-g)>=(w=u&-u)||y===16&&4194240&w))return u;if(4&g&&(g|=16&d),(u=a.entangledLanes)!==0)for(a=a.entanglements,u&=g;0<u;)y=1<<(d=31-In(u)),g|=a[d],u&=~y;return g}function c2(a,u){switch(a){case 1:case 2:case 4:return u+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;default:return-1}}function bp(a){return(a=-1073741825&a.pendingLanes)!==0?a:1073741824&a?1073741824:0}function __(){var a=Ep;return!(4194240&(Ep<<=1))&&(Ep=64),a}function Tp(a){for(var u=[],d=0;31>d;d++)u.push(a);return u}function Tl(a,u,d){a.pendingLanes|=u,u!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),(a=a.eventTimes)[u=31-In(u)]=d}function Ap(a,u){var d=a.entangledLanes|=u;for(a=a.entanglements;d;){var g=31-In(d),y=1<<g;y&u|a[g]&u&&(a[g]|=u),d&=~y}}var We=0;function x_(a){return 1<(a&=-a)?4<a?268435455&a?16:536870912:4:1}var Cp=n.unstable_scheduleCallback,w_=n.unstable_cancelCallback,d2=n.unstable_shouldYield,f2=n.unstable_requestPaint,Gt=n.unstable_now,Pp=n.unstable_ImmediatePriority,p2=n.unstable_UserBlockingPriority,E_=n.unstable_NormalPriority,m2=n.unstable_IdlePriority,Ih=null,Zn=null,Rn=typeof Object.is=="function"?Object.is:function(a,u){return a===u&&(a!==0||1/a==1/u)||a!=a&&u!=u},Di=null,Rh=!1,Ip=!1;function S_(a){Di===null?Di=[a]:Di.push(a)}function Jn(){if(!Ip&&Di!==null){Ip=!0;var a=0,u=We;try{var d=Di;for(We=1;a<d.length;a++){var g=d[a];do g=g(!0);while(g!==null)}Di=null,Rh=!1}catch(y){throw Di!==null&&(Di=Di.slice(a+1)),Cp(Pp,Jn),y}finally{We=u,Ip=!1}}return null}var ea=[],ta=0,Mh=null,kh=0,on=[],an=0,ao=null,ei=1,Oi="";function lo(a,u){ea[ta++]=kh,ea[ta++]=Mh,Mh=a,kh=u}function b_(a,u,d){on[an++]=ei,on[an++]=Oi,on[an++]=ao,ao=a;var g=ei;a=Oi;var y=32-In(g)-1;g&=~(1<<y),d+=1;var w=32-In(u)+y;if(30<w){var C=y-y%5;w=(g&(1<<C)-1).toString(32),g>>=C,y-=C,ei=1<<32-In(u)+y|d<<y|g,Oi=w+a}else ei=1<<w|d<<y|g,Oi=a}function Rp(a){a.return!==null&&(lo(a,1),b_(a,1,0))}function Mp(a){for(;a===Mh;)Mh=ea[--ta],ea[ta]=null,kh=ea[--ta],ea[ta]=null;for(;a===ao;)ao=on[--an],on[an]=null,Oi=on[--an],on[an]=null,ei=on[--an],on[an]=null}var Vr=null,ln=null,lt=!1,Al=!1,Mn=null;function T_(a,u){var d=fn(5,null,null,0);d.elementType="DELETED",d.stateNode=u,d.return=a,(u=a.deletions)===null?(a.deletions=[d],a.flags|=16):u.push(d)}function A_(a,u){switch(a.tag){case 5:return(u=vh(u,a.type,a.pendingProps))!==null&&(a.stateNode=u,Vr=a,ln=wh(u),!0);case 6:return(u=_h(u,a.pendingProps))!==null&&(a.stateNode=u,Vr=a,ln=null,!0);case 13:if((u=xl(u))!==null){var d=ao!==null?{id:ei,overflow:Oi}:null;return a.memoizedState={dehydrated:u,treeContext:d,retryLane:1073741824},(d=fn(18,null,null,0)).stateNode=u,d.return=a,a.child=d,Vr=a,ln=null,!0}return!1;default:return!1}}function kp(a){return(1&a.mode)!=0&&(128&a.flags)==0}function Np(a){if(lt){var u=ln;if(u){var d=u;if(!A_(a,u)){if(kp(a))throw Error(s(418));u=io(d);var g=Vr;u&&A_(a,u)?T_(g,d):(a.flags=-4097&a.flags|2,lt=!1,Vr=a)}}else{if(kp(a))throw Error(s(418));a.flags=-4097&a.flags|2,lt=!1,Vr=a}}}function C_(a){for(a=a.return;a!==null&&a.tag!==5&&a.tag!==3&&a.tag!==13;)a=a.return;Vr=a}function Nh(a){if(!Re||a!==Vr)return!1;if(!lt)return C_(a),lt=!0,!1;if(a.tag!==3&&(a.tag!==5||so(a.type)&&!ve(a.type,a.memoizedProps))){var u=ln;if(u){if(kp(a))throw P_(),Error(s(418));for(;u;)T_(a,u),u=io(u)}}if(C_(a),a.tag===13){if(!Re)throw Error(s(316));if(!(a=(a=a.memoizedState)!==null?a.dehydrated:null))throw Error(s(317));ln=bh(a)}else ln=Vr?io(a.stateNode):null;return!0}function P_(){for(var a=ln;a;)a=io(a)}function ra(){Re&&(ln=Vr=null,Al=lt=!1)}function Dp(a){Mn===null?Mn=[a]:Mn.push(a)}var g2=o.ReactCurrentBatchConfig;function Dh(a,u){if(Rn(a,u))return!0;if(typeof a!="object"||a===null||typeof u!="object"||u===null)return!1;var d=Object.keys(a),g=Object.keys(u);if(d.length!==g.length)return!1;for(g=0;g<d.length;g++){var y=d[g];if(!l2.call(u,y)||!Rn(a[y],u[y]))return!1}return!0}function y2(a){switch(a.tag){case 5:return Sl(a.type);case 16:return Sl("Lazy");case 13:return Sl("Suspense");case 19:return Sl("SuspenseList");case 0:case 2:case 15:return a=_p(a.type,!1);case 11:return a=_p(a.type.render,!1);case 1:return a=_p(a.type,!0);default:return""}}function kn(a,u){if(a&&a.defaultProps){for(var d in u=i({},u),a=a.defaultProps)u[d]===void 0&&(u[d]=a[d]);return u}return u}var Oh=us(null),Fh=null,na=null,Op=null;function Fp(){Op=na=Fh=null}function I_(a,u,d){P?(Je(Oh,u._currentValue),u._currentValue=d):(Je(Oh,u._currentValue2),u._currentValue2=d)}function Bp(a){var u=Oh.current;at(Oh),P?a._currentValue=u:a._currentValue2=u}function Lp(a,u,d){for(;a!==null;){var g=a.alternate;if((a.childLanes&u)!==u?(a.childLanes|=u,g!==null&&(g.childLanes|=u)):g!==null&&(g.childLanes&u)!==u&&(g.childLanes|=u),a===d)break;a=a.return}}function ia(a,u){Fh=a,Op=na=null,(a=a.dependencies)!==null&&a.firstContext!==null&&(a.lanes&u&&(Mr=!0),a.firstContext=null)}function un(a){var u=P?a._currentValue:a._currentValue2;if(Op!==a)if(a={context:a,memoizedValue:u,next:null},na===null){if(Fh===null)throw Error(s(308));na=a,Fh.dependencies={lanes:0,firstContext:a}}else na=na.next=a;return u}var uo=null;function Up(a){uo===null?uo=[a]:uo.push(a)}function R_(a,u,d,g){var y=u.interleaved;return y===null?(d.next=d,Up(u)):(d.next=y.next,y.next=d),u.interleaved=d,ti(a,g)}function ti(a,u){a.lanes|=u;var d=a.alternate;for(d!==null&&(d.lanes|=u),d=a,a=a.return;a!==null;)a.childLanes|=u,(d=a.alternate)!==null&&(d.childLanes|=u),d=a,a=a.return;return d.tag===3?d.stateNode:null}var cs=!1;function zp(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function M_(a,u){a=a.updateQueue,u.updateQueue===a&&(u.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Fi(a,u){return{eventTime:a,lane:u,tag:0,payload:null,callback:null,next:null}}function ds(a,u,d){var g=a.updateQueue;if(g===null)return null;if(g=g.shared,(2&He)!=0){var y=g.pending;return y===null?u.next=u:(u.next=y.next,y.next=u),g.pending=u,ti(a,d)}return(y=g.interleaved)===null?(u.next=u,Up(g)):(u.next=y.next,y.next=u),g.interleaved=u,ti(a,d)}function Bh(a,u,d){if((u=u.updateQueue)!==null&&(u=u.shared,(4194240&d)!=0)){var g=u.lanes;d|=g&=a.pendingLanes,u.lanes=d,Ap(a,d)}}function k_(a,u){var d=a.updateQueue,g=a.alternate;if(g!==null&&d===(g=g.updateQueue)){var y=null,w=null;if((d=d.firstBaseUpdate)!==null){do{var C={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};w===null?y=w=C:w=w.next=C,d=d.next}while(d!==null);w===null?y=w=u:w=w.next=u}else y=w=u;return d={baseState:g.baseState,firstBaseUpdate:y,lastBaseUpdate:w,shared:g.shared,effects:g.effects},void(a.updateQueue=d)}(a=d.lastBaseUpdate)===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=u}function Lh(a,u,d,g){var y=a.updateQueue;cs=!1;var w=y.firstBaseUpdate,C=y.lastBaseUpdate,I=y.shared.pending;if(I!==null){y.shared.pending=null;var F=I,j=F.next;F.next=null,C===null?w=j:C.next=j,C=F;var Y=a.alternate;Y!==null&&(I=(Y=Y.updateQueue).lastBaseUpdate)!==C&&(I===null?Y.firstBaseUpdate=j:I.next=j,Y.lastBaseUpdate=F)}if(w!==null){var oe=y.baseState;for(C=0,Y=j=F=null,I=w;;){var V=I.lane,te=I.eventTime;if((g&V)===V){Y!==null&&(Y=Y.next={eventTime:te,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var xe=a,Fe=I;switch(V=u,te=d,Fe.tag){case 1:if(typeof(xe=Fe.payload)=="function"){oe=xe.call(te,oe,V);break e}oe=xe;break e;case 3:xe.flags=-65537&xe.flags|128;case 0:if((V=typeof(xe=Fe.payload)=="function"?xe.call(te,oe,V):xe)==null)break e;oe=i({},oe,V);break e;case 2:cs=!0}}I.callback!==null&&I.lane!==0&&(a.flags|=64,(V=y.effects)===null?y.effects=[I]:V.push(I))}else te={eventTime:te,lane:V,tag:I.tag,payload:I.payload,callback:I.callback,next:null},Y===null?(j=Y=te,F=oe):Y=Y.next=te,C|=V;if((I=I.next)===null){if((I=y.shared.pending)===null)break;I=(V=I).next,V.next=null,y.lastBaseUpdate=V,y.shared.pending=null}}if(Y===null&&(F=oe),y.baseState=F,y.firstBaseUpdate=j,y.lastBaseUpdate=Y,(u=y.shared.interleaved)!==null){y=u;do C|=y.lane,y=y.next;while(y!==u)}else w===null&&(y.shared.lanes=0);co|=C,a.lanes=C,a.memoizedState=oe}}function N_(a,u,d){if(a=u.effects,u.effects=null,a!==null)for(u=0;u<a.length;u++){var g=a[u],y=g.callback;if(y!==null){if(g.callback=null,g=d,typeof y!="function")throw Error(s(191,y));y.call(g)}}}var D_=new r.Component().refs;function Gp(a,u,d,g){d=(d=d(g,u=a.memoizedState))==null?u:i({},u,d),a.memoizedState=d,a.lanes===0&&(a.updateQueue.baseState=d)}var Uh={isMounted:function(a){return!!(a=a._reactInternals)&&D(a)===a},enqueueSetState:function(a,u,d){a=a._reactInternals;var g=dr(),y=gs(a),w=Fi(g,y);w.payload=u,d!=null&&(w.callback=d),(u=ds(a,w,y))!==null&&(dn(u,a,y,g),Bh(u,a,y))},enqueueReplaceState:function(a,u,d){a=a._reactInternals;var g=dr(),y=gs(a),w=Fi(g,y);w.tag=1,w.payload=u,d!=null&&(w.callback=d),(u=ds(a,w,y))!==null&&(dn(u,a,y,g),Bh(u,a,y))},enqueueForceUpdate:function(a,u){a=a._reactInternals;var d=dr(),g=gs(a),y=Fi(d,g);y.tag=2,u!=null&&(y.callback=u),(u=ds(a,y,g))!==null&&(dn(u,a,g,d),Bh(u,a,g))}};function O_(a,u,d,g,y,w,C){return typeof(a=a.stateNode).shouldComponentUpdate=="function"?a.shouldComponentUpdate(g,w,C):!u.prototype||!u.prototype.isPureReactComponent||!Dh(d,g)||!Dh(y,w)}function F_(a,u,d){var g=!1,y=hs,w=u.contextType;return typeof w=="object"&&w!==null?w=un(w):(y=Wr(u)?oo:ur.current,w=(g=(g=u.contextTypes)!=null)?Jo(a,y):hs),u=new u(d,w),a.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Uh,a.stateNode=u,u._reactInternals=a,g&&((a=a.stateNode).__reactInternalMemoizedUnmaskedChildContext=y,a.__reactInternalMemoizedMaskedChildContext=w),u}function B_(a,u,d,g){a=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(d,g),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(d,g),u.state!==a&&Uh.enqueueReplaceState(u,u.state,null)}function Hp(a,u,d,g){var y=a.stateNode;y.props=d,y.state=a.memoizedState,y.refs=D_,zp(a);var w=u.contextType;typeof w=="object"&&w!==null?y.context=un(w):(w=Wr(u)?oo:ur.current,y.context=Jo(a,w)),y.state=a.memoizedState,typeof(w=u.getDerivedStateFromProps)=="function"&&(Gp(a,u,w,d),y.state=a.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(u=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),u!==y.state&&Uh.enqueueReplaceState(y,y.state,null),Lh(a,d,y,g),y.state=a.memoizedState),typeof y.componentDidMount=="function"&&(a.flags|=4194308)}function Cl(a,u,d){if((a=d.ref)!==null&&typeof a!="function"&&typeof a!="object"){if(d._owner){if(d=d._owner){if(d.tag!==1)throw Error(s(309));var g=d.stateNode}if(!g)throw Error(s(147,a));var y=g,w=""+a;return u!==null&&u.ref!==null&&typeof u.ref=="function"&&u.ref._stringRef===w?u.ref:(u=function(C){var I=y.refs;I===D_&&(I=y.refs={}),C===null?delete I[w]:I[w]=C},u._stringRef=w,u)}if(typeof a!="string")throw Error(s(284));if(!d._owner)throw Error(s(290,a))}return a}function zh(a,u){throw a=Object.prototype.toString.call(u),Error(s(31,a==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":a))}function L_(a){return(0,a._init)(a._payload)}function U_(a){function u(Q,k){if(a){var G=Q.deletions;G===null?(Q.deletions=[k],Q.flags|=16):G.push(k)}}function d(Q,k){if(!a)return null;for(;k!==null;)u(Q,k),k=k.sibling;return null}function g(Q,k){for(Q=new Map;k!==null;)k.key!==null?Q.set(k.key,k):Q.set(k.index,k),k=k.sibling;return Q}function y(Q,k){return(Q=vs(Q,k)).index=0,Q.sibling=null,Q}function w(Q,k,G){return Q.index=G,a?(G=Q.alternate)!==null?(G=G.index)<k?(Q.flags|=2,k):G:(Q.flags|=2,k):(Q.flags|=1048576,k)}function C(Q){return a&&Q.alternate===null&&(Q.flags|=2),Q}function I(Q,k,G,Z){return k===null||k.tag!==6?((k=Pm(G,Q.mode,Z)).return=Q,k):((k=y(k,G)).return=Q,k)}function F(Q,k,G,Z){var Pe=G.type;return Pe===c?Y(Q,k,G.props.children,Z,G.key):k!==null&&(k.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===b&&L_(Pe)===k.type)?((Z=y(k,G.props)).ref=Cl(Q,k,G),Z.return=Q,Z):((Z=dc(G.type,G.key,G.props,null,Q.mode,Z)).ref=Cl(Q,k,G),Z.return=Q,Z)}function j(Q,k,G,Z){return k===null||k.tag!==4||k.stateNode.containerInfo!==G.containerInfo||k.stateNode.implementation!==G.implementation?((k=Im(G,Q.mode,Z)).return=Q,k):((k=y(k,G.children||[])).return=Q,k)}function Y(Q,k,G,Z,Pe){return k===null||k.tag!==7?((k=mo(G,Q.mode,Z,Pe)).return=Q,k):((k=y(k,G)).return=Q,k)}function oe(Q,k,G){if(typeof k=="string"&&k!==""||typeof k=="number")return(k=Pm(""+k,Q.mode,G)).return=Q,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case l:return(G=dc(k.type,k.key,k.props,null,Q.mode,G)).ref=Cl(Q,null,k),G.return=Q,G;case h:return(k=Im(k,Q.mode,G)).return=Q,k;case b:return oe(Q,(0,k._init)(k._payload),G)}if(ie(k)||R(k))return(k=mo(k,Q.mode,G,null)).return=Q,k;zh(Q,k)}return null}function V(Q,k,G,Z){var Pe=k!==null?k.key:null;if(typeof G=="string"&&G!==""||typeof G=="number")return Pe!==null?null:I(Q,k,""+G,Z);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case l:return G.key===Pe?F(Q,k,G,Z):null;case h:return G.key===Pe?j(Q,k,G,Z):null;case b:return V(Q,k,(Pe=G._init)(G._payload),Z)}if(ie(G)||R(G))return Pe!==null?null:Y(Q,k,G,Z,null);zh(Q,G)}return null}function te(Q,k,G,Z,Pe){if(typeof Z=="string"&&Z!==""||typeof Z=="number")return I(k,Q=Q.get(G)||null,""+Z,Pe);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case l:return F(k,Q=Q.get(Z.key===null?G:Z.key)||null,Z,Pe);case h:return j(k,Q=Q.get(Z.key===null?G:Z.key)||null,Z,Pe);case b:return te(Q,k,G,(0,Z._init)(Z._payload),Pe)}if(ie(Z)||R(Z))return Y(k,Q=Q.get(G)||null,Z,Pe,null);zh(k,Z)}return null}function xe(Q,k,G,Z){for(var Pe=null,Ye=null,Se=k,Ve=k=0,Jt=null;Se!==null&&Ve<G.length;Ve++){Se.index>Ve?(Jt=Se,Se=null):Jt=Se.sibling;var Qe=V(Q,Se,G[Ve],Z);if(Qe===null){Se===null&&(Se=Jt);break}a&&Se&&Qe.alternate===null&&u(Q,Se),k=w(Qe,k,Ve),Ye===null?Pe=Qe:Ye.sibling=Qe,Ye=Qe,Se=Jt}if(Ve===G.length)return d(Q,Se),lt&&lo(Q,Ve),Pe;if(Se===null){for(;Ve<G.length;Ve++)(Se=oe(Q,G[Ve],Z))!==null&&(k=w(Se,k,Ve),Ye===null?Pe=Se:Ye.sibling=Se,Ye=Se);return lt&&lo(Q,Ve),Pe}for(Se=g(Q,Se);Ve<G.length;Ve++)(Jt=te(Se,Q,Ve,G[Ve],Z))!==null&&(a&&Jt.alternate!==null&&Se.delete(Jt.key===null?Ve:Jt.key),k=w(Jt,k,Ve),Ye===null?Pe=Jt:Ye.sibling=Jt,Ye=Jt);return a&&Se.forEach(function(_s){return u(Q,_s)}),lt&&lo(Q,Ve),Pe}function Fe(Q,k,G,Z){var Pe=R(G);if(typeof Pe!="function")throw Error(s(150));if((G=Pe.call(G))==null)throw Error(s(151));for(var Ye=Pe=null,Se=k,Ve=k=0,Jt=null,Qe=G.next();Se!==null&&!Qe.done;Ve++,Qe=G.next()){Se.index>Ve?(Jt=Se,Se=null):Jt=Se.sibling;var _s=V(Q,Se,Qe.value,Z);if(_s===null){Se===null&&(Se=Jt);break}a&&Se&&_s.alternate===null&&u(Q,Se),k=w(_s,k,Ve),Ye===null?Pe=_s:Ye.sibling=_s,Ye=_s,Se=Jt}if(Qe.done)return d(Q,Se),lt&&lo(Q,Ve),Pe;if(Se===null){for(;!Qe.done;Ve++,Qe=G.next())(Qe=oe(Q,Qe.value,Z))!==null&&(k=w(Qe,k,Ve),Ye===null?Pe=Qe:Ye.sibling=Qe,Ye=Qe);return lt&&lo(Q,Ve),Pe}for(Se=g(Q,Se);!Qe.done;Ve++,Qe=G.next())(Qe=te(Se,Q,Ve,Qe.value,Z))!==null&&(a&&Qe.alternate!==null&&Se.delete(Qe.key===null?Ve:Qe.key),k=w(Qe,k,Ve),Ye===null?Pe=Qe:Ye.sibling=Qe,Ye=Qe);return a&&Se.forEach(function(G2){return u(Q,G2)}),lt&&lo(Q,Ve),Pe}return function Q(k,G,Z,Pe){if(typeof Z=="object"&&Z!==null&&Z.type===c&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case l:e:{for(var Ye=Z.key,Se=G;Se!==null;){if(Se.key===Ye){if((Ye=Z.type)===c){if(Se.tag===7){d(k,Se.sibling),(G=y(Se,Z.props.children)).return=k,k=G;break e}}else if(Se.elementType===Ye||typeof Ye=="object"&&Ye!==null&&Ye.$$typeof===b&&L_(Ye)===Se.type){d(k,Se.sibling),(G=y(Se,Z.props)).ref=Cl(k,Se,Z),G.return=k,k=G;break e}d(k,Se);break}u(k,Se),Se=Se.sibling}Z.type===c?((G=mo(Z.props.children,k.mode,Pe,Z.key)).return=k,k=G):((Pe=dc(Z.type,Z.key,Z.props,null,k.mode,Pe)).ref=Cl(k,G,Z),Pe.return=k,k=Pe)}return C(k);case h:e:{for(Se=Z.key;G!==null;){if(G.key===Se){if(G.tag===4&&G.stateNode.containerInfo===Z.containerInfo&&G.stateNode.implementation===Z.implementation){d(k,G.sibling),(G=y(G,Z.children||[])).return=k,k=G;break e}d(k,G);break}u(k,G),G=G.sibling}(G=Im(Z,k.mode,Pe)).return=k,k=G}return C(k);case b:return Q(k,G,(Se=Z._init)(Z._payload),Pe)}if(ie(Z))return xe(k,G,Z,Pe);if(R(Z))return Fe(k,G,Z,Pe);zh(k,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"?(Z=""+Z,G!==null&&G.tag===6?(d(k,G.sibling),(G=y(G,Z)).return=k,k=G):(d(k,G),(G=Pm(Z,k.mode,Pe)).return=k,k=G),C(k)):d(k,G)}}var sa=U_(!0),z_=U_(!1),Pl={},hn=us(Pl),Il=us(Pl),oa=us(Pl);function ri(a){if(a===Pl)throw Error(s(174));return a}function jp(a,u){Je(oa,u),Je(Il,a),Je(hn,Pl),a=fe(u),at(hn),Je(hn,a)}function aa(){at(hn),at(Il),at(oa)}function G_(a){var u=ri(oa.current),d=ri(hn.current);d!==(u=M(d,a.type,u))&&(Je(Il,a),Je(hn,u))}function $p(a){Il.current===a&&(at(hn),at(Il))}var _t=us(0);function Gh(a){for(var u=a;u!==null;){if(u.tag===13){var d=u.memoizedState;if(d!==null&&((d=d.dehydrated)===null||xh(d)||wl(d)))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if(128&u.flags)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===a)break;for(;u.sibling===null;){if(u.return===null||u.return===a)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var Wp=[];function Vp(){for(var a=0;a<Wp.length;a++){var u=Wp[a];P?u._workInProgressVersionPrimary=null:u._workInProgressVersionSecondary=null}Wp.length=0}var Hh=o.ReactCurrentDispatcher,Xp=o.ReactCurrentBatchConfig,ho=0,dt=null,Ht=null,jt=null,jh=!1,Rl=!1,Ml=0,v2=0;function hr(){throw Error(s(321))}function Yp(a,u){if(u===null)return!1;for(var d=0;d<u.length&&d<a.length;d++)if(!Rn(a[d],u[d]))return!1;return!0}function Qp(a,u,d,g,y,w){if(ho=w,dt=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,Hh.current=a===null||a.memoizedState===null?E2:S2,a=d(g,y),Rl){w=0;do{if(Rl=!1,Ml=0,25<=w)throw Error(s(301));w+=1,jt=Ht=null,u.updateQueue=null,Hh.current=b2,a=d(g,y)}while(Rl)}if(Hh.current=Vh,u=Ht!==null&&Ht.next!==null,ho=0,jt=Ht=dt=null,jh=!1,u)throw Error(s(300));return a}function Kp(){var a=Ml!==0;return Ml=0,a}function ni(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?dt.memoizedState=jt=a:jt=jt.next=a,jt}function cn(){if(Ht===null){var a=dt.alternate;a=a!==null?a.memoizedState:null}else a=Ht.next;var u=jt===null?dt.memoizedState:jt.next;if(u!==null)jt=u,Ht=a;else{if(a===null)throw Error(s(310));a={memoizedState:(Ht=a).memoizedState,baseState:Ht.baseState,baseQueue:Ht.baseQueue,queue:Ht.queue,next:null},jt===null?dt.memoizedState=jt=a:jt=jt.next=a}return jt}function kl(a,u){return typeof u=="function"?u(a):u}function qp(a){var u=cn(),d=u.queue;if(d===null)throw Error(s(311));d.lastRenderedReducer=a;var g=Ht,y=g.baseQueue,w=d.pending;if(w!==null){if(y!==null){var C=y.next;y.next=w.next,w.next=C}g.baseQueue=y=w,d.pending=null}if(y!==null){w=y.next,g=g.baseState;var I=C=null,F=null,j=w;do{var Y=j.lane;if((ho&Y)===Y)F!==null&&(F=F.next={lane:0,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null}),g=j.hasEagerState?j.eagerState:a(g,j.action);else{var oe={lane:Y,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null};F===null?(I=F=oe,C=g):F=F.next=oe,dt.lanes|=Y,co|=Y}j=j.next}while(j!==null&&j!==w);F===null?C=g:F.next=I,Rn(g,u.memoizedState)||(Mr=!0),u.memoizedState=g,u.baseState=C,u.baseQueue=F,d.lastRenderedState=g}if((a=d.interleaved)!==null){y=a;do w=y.lane,dt.lanes|=w,co|=w,y=y.next;while(y!==a)}else y===null&&(d.lanes=0);return[u.memoizedState,d.dispatch]}function Zp(a){var u=cn(),d=u.queue;if(d===null)throw Error(s(311));d.lastRenderedReducer=a;var g=d.dispatch,y=d.pending,w=u.memoizedState;if(y!==null){d.pending=null;var C=y=y.next;do w=a(w,C.action),C=C.next;while(C!==y);Rn(w,u.memoizedState)||(Mr=!0),u.memoizedState=w,u.baseQueue===null&&(u.baseState=w),d.lastRenderedState=w}return[w,g]}function H_(){}function j_(a,u){var d=dt,g=cn(),y=u(),w=!Rn(g.memoizedState,y);if(w&&(g.memoizedState=y,Mr=!0),g=g.queue,Jp(V_.bind(null,d,g,a),[a]),g.getSnapshot!==u||w||jt!==null&&1&jt.memoizedState.tag){if(d.flags|=2048,Nl(9,W_.bind(null,d,g,y,u),void 0,null),$t===null)throw Error(s(349));30&ho||$_(d,u,y)}return y}function $_(a,u,d){a.flags|=16384,a={getSnapshot:u,value:d},(u=dt.updateQueue)===null?(u={lastEffect:null,stores:null},dt.updateQueue=u,u.stores=[a]):(d=u.stores)===null?u.stores=[a]:d.push(a)}function W_(a,u,d,g){u.value=d,u.getSnapshot=g,X_(u)&&Y_(a)}function V_(a,u,d){return d(function(){X_(u)&&Y_(a)})}function X_(a){var u=a.getSnapshot;a=a.value;try{var d=u();return!Rn(a,d)}catch{return!0}}function Y_(a){var u=ti(a,1);u!==null&&dn(u,a,1,-1)}function Q_(a){var u=ni();return typeof a=="function"&&(a=a()),u.memoizedState=u.baseState=a,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:kl,lastRenderedState:a},u.queue=a,a=a.dispatch=w2.bind(null,dt,a),[u.memoizedState,a]}function Nl(a,u,d,g){return a={tag:a,create:u,destroy:d,deps:g,next:null},(u=dt.updateQueue)===null?(u={lastEffect:null,stores:null},dt.updateQueue=u,u.lastEffect=a.next=a):(d=u.lastEffect)===null?u.lastEffect=a.next=a:(g=d.next,d.next=a,a.next=g,u.lastEffect=a),a}function K_(){return cn().memoizedState}function $h(a,u,d,g){var y=ni();dt.flags|=a,y.memoizedState=Nl(1|u,d,void 0,g===void 0?null:g)}function Wh(a,u,d,g){var y=cn();g=g===void 0?null:g;var w=void 0;if(Ht!==null){var C=Ht.memoizedState;if(w=C.destroy,g!==null&&Yp(g,C.deps))return void(y.memoizedState=Nl(u,d,w,g))}dt.flags|=a,y.memoizedState=Nl(1|u,d,w,g)}function q_(a,u){return $h(8390656,8,a,u)}function Jp(a,u){return Wh(2048,8,a,u)}function Z_(a,u){return Wh(4,2,a,u)}function J_(a,u){return Wh(4,4,a,u)}function e1(a,u){return typeof u=="function"?(a=a(),u(a),function(){u(null)}):u!=null?(a=a(),u.current=a,function(){u.current=null}):void 0}function t1(a,u,d){return d=d!=null?d.concat([a]):null,Wh(4,4,e1.bind(null,u,a),d)}function em(){}function r1(a,u){var d=cn();u=u===void 0?null:u;var g=d.memoizedState;return g!==null&&u!==null&&Yp(u,g[1])?g[0]:(d.memoizedState=[a,u],a)}function n1(a,u){var d=cn();u=u===void 0?null:u;var g=d.memoizedState;return g!==null&&u!==null&&Yp(u,g[1])?g[0]:(a=a(),d.memoizedState=[a,u],a)}function i1(a,u,d){return 21&ho?(Rn(d,u)||(d=__(),dt.lanes|=d,co|=d,a.baseState=!0),u):(a.baseState&&(a.baseState=!1,Mr=!0),a.memoizedState=d)}function _2(a,u){var d=We;We=d!==0&&4>d?d:4,a(!0);var g=Xp.transition;Xp.transition={};try{a(!1),u()}finally{We=d,Xp.transition=g}}function s1(){return cn().memoizedState}function x2(a,u,d){var g=gs(a);d={lane:g,action:d,hasEagerState:!1,eagerState:null,next:null},o1(a)?a1(u,d):(d=R_(a,u,d,g))!==null&&(dn(d,a,g,dr()),l1(d,u,g))}function w2(a,u,d){var g=gs(a),y={lane:g,action:d,hasEagerState:!1,eagerState:null,next:null};if(o1(a))a1(u,y);else{var w=a.alternate;if(a.lanes===0&&(w===null||w.lanes===0)&&(w=u.lastRenderedReducer)!==null)try{var C=u.lastRenderedState,I=w(C,d);if(y.hasEagerState=!0,y.eagerState=I,Rn(I,C)){var F=u.interleaved;return F===null?(y.next=y,Up(u)):(y.next=F.next,F.next=y),void(u.interleaved=y)}}catch{}(d=R_(a,u,y,g))!==null&&(dn(d,a,g,y=dr()),l1(d,u,g))}}function o1(a){var u=a.alternate;return a===dt||u!==null&&u===dt}function a1(a,u){Rl=jh=!0;var d=a.pending;d===null?u.next=u:(u.next=d.next,d.next=u),a.pending=u}function l1(a,u,d){if(4194240&d){var g=u.lanes;d|=g&=a.pendingLanes,u.lanes=d,Ap(a,d)}}var Vh={readContext:un,useCallback:hr,useContext:hr,useEffect:hr,useImperativeHandle:hr,useInsertionEffect:hr,useLayoutEffect:hr,useMemo:hr,useReducer:hr,useRef:hr,useState:hr,useDebugValue:hr,useDeferredValue:hr,useTransition:hr,useMutableSource:hr,useSyncExternalStore:hr,useId:hr,unstable_isNewReconciler:!1},E2={readContext:un,useCallback:function(a,u){return ni().memoizedState=[a,u===void 0?null:u],a},useContext:un,useEffect:q_,useImperativeHandle:function(a,u,d){return d=d!=null?d.concat([a]):null,$h(4194308,4,e1.bind(null,u,a),d)},useLayoutEffect:function(a,u){return $h(4194308,4,a,u)},useInsertionEffect:function(a,u){return $h(4,2,a,u)},useMemo:function(a,u){var d=ni();return u=u===void 0?null:u,a=a(),d.memoizedState=[a,u],a},useReducer:function(a,u,d){var g=ni();return u=d!==void 0?d(u):u,g.memoizedState=g.baseState=u,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:u},g.queue=a,a=a.dispatch=x2.bind(null,dt,a),[g.memoizedState,a]},useRef:function(a){return a={current:a},ni().memoizedState=a},useState:Q_,useDebugValue:em,useDeferredValue:function(a){return ni().memoizedState=a},useTransition:function(){var a=Q_(!1),u=a[0];return a=_2.bind(null,a[1]),ni().memoizedState=a,[u,a]},useMutableSource:function(){},useSyncExternalStore:function(a,u,d){var g=dt,y=ni();if(lt){if(d===void 0)throw Error(s(407));d=d()}else{if(d=u(),$t===null)throw Error(s(349));30&ho||$_(g,u,d)}y.memoizedState=d;var w={value:d,getSnapshot:u};return y.queue=w,q_(V_.bind(null,g,w,a),[a]),g.flags|=2048,Nl(9,W_.bind(null,g,w,d,u),void 0,null),d},useId:function(){var a=ni(),u=$t.identifierPrefix;if(lt){var d=Oi;u=":"+u+"R"+(d=(ei&~(1<<32-In(ei)-1)).toString(32)+d),0<(d=Ml++)&&(u+="H"+d.toString(32)),u+=":"}else u=":"+u+"r"+(d=v2++).toString(32)+":";return a.memoizedState=u},unstable_isNewReconciler:!1},S2={readContext:un,useCallback:r1,useContext:un,useEffect:Jp,useImperativeHandle:t1,useInsertionEffect:Z_,useLayoutEffect:J_,useMemo:n1,useReducer:qp,useRef:K_,useState:function(){return qp(kl)},useDebugValue:em,useDeferredValue:function(a){return i1(cn(),Ht.memoizedState,a)},useTransition:function(){return[qp(kl)[0],cn().memoizedState]},useMutableSource:H_,useSyncExternalStore:j_,useId:s1,unstable_isNewReconciler:!1},b2={readContext:un,useCallback:r1,useContext:un,useEffect:Jp,useImperativeHandle:t1,useInsertionEffect:Z_,useLayoutEffect:J_,useMemo:n1,useReducer:Zp,useRef:K_,useState:function(){return Zp(kl)},useDebugValue:em,useDeferredValue:function(a){var u=cn();return Ht===null?u.memoizedState=a:i1(u,Ht.memoizedState,a)},useTransition:function(){return[Zp(kl)[0],cn().memoizedState]},useMutableSource:H_,useSyncExternalStore:j_,useId:s1,unstable_isNewReconciler:!1};function la(a,u){try{var d="",g=u;do d+=y2(g),g=g.return;while(g);var y=d}catch(w){y=`
851
+ `),C=y.length-1,I=w.length-1;1<=C&&0<=I&&y[C]!==w[I];)I--;for(;1<=C&&0<=I;C--,I--)if(y[C]!==w[I]){if(C!==1||I!==1)do if(C--,0>--I||y[C]!==w[I]){var B=`
852
+ `+y[C].replace(" at new "," at ");return a.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",a.displayName)),B}while(1<=C&&0<=I);break}}}finally{vp=!1,Error.prepareStackTrace=d}return(a=a?a.displayName||a.name:"")?Sl(a):""}var l2=Object.prototype.hasOwnProperty,xp=[],Zo=-1;function us(a){return{current:a}}function at(a){0>Zo||(a.current=xp[Zo],xp[Zo]=null,Zo--)}function Je(a,u){Zo++,xp[Zo]=a.current,a.current=u}var hs={},ur=us(hs),Rr=us(!1),oo=hs;function Jo(a,u){var d=a.type.contextTypes;if(!d)return hs;var g=a.stateNode;if(g&&g.__reactInternalMemoizedUnmaskedChildContext===u)return g.__reactInternalMemoizedMaskedChildContext;var y,w={};for(y in d)w[y]=u[y];return g&&((a=a.stateNode).__reactInternalMemoizedUnmaskedChildContext=u,a.__reactInternalMemoizedMaskedChildContext=w),w}function Wr(a){return(a=a.childContextTypes)!=null}function wp(){at(Rr),at(ur)}function g_(a,u,d){if(ur.current!==hs)throw Error(s(168));Je(ur,u),Je(Rr,d)}function y_(a,u,d){var g=a.stateNode;if(u=u.childContextTypes,typeof g.getChildContext!="function")return d;for(var y in g=g.getChildContext())if(!(y in u))throw Error(s(108,k(a)||"Unknown",y));return i({},d,g)}function Ch(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||hs,oo=ur.current,Je(ur,a),Je(Rr,Rr.current),!0}function v_(a,u,d){var g=a.stateNode;if(!g)throw Error(s(169));d?(a=y_(a,u,oo),g.__reactInternalMemoizedMergedChildContext=a,at(Rr),at(ur),Je(ur,a)):at(Rr),Je(Rr,d)}var In=Math.clz32?Math.clz32:function(a){return(a>>>=0)===0?32:31-(u2(a)/h2|0)|0},u2=Math.log,h2=Math.LN2,Ep=64,Sp=4194304;function bl(a){switch(a&-a){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: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 4194240&a;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&a;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function Ph(a,u){var d=a.pendingLanes;if(d===0)return 0;var g=0,y=a.suspendedLanes,w=a.pingedLanes,C=268435455&d;if(C!==0){var I=C&~y;I!==0?g=bl(I):(w&=C)!==0&&(g=bl(w))}else(C=d&~y)!==0?g=bl(C):w!==0&&(g=bl(w));if(g===0)return 0;if(u!==0&&u!==g&&!(u&y)&&((y=g&-g)>=(w=u&-u)||y===16&&4194240&w))return u;if(4&g&&(g|=16&d),(u=a.entangledLanes)!==0)for(a=a.entanglements,u&=g;0<u;)y=1<<(d=31-In(u)),g|=a[d],u&=~y;return g}function c2(a,u){switch(a){case 1:case 2:case 4:return u+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;default:return-1}}function bp(a){return(a=-1073741825&a.pendingLanes)!==0?a:1073741824&a?1073741824:0}function __(){var a=Ep;return!(4194240&(Ep<<=1))&&(Ep=64),a}function Tp(a){for(var u=[],d=0;31>d;d++)u.push(a);return u}function Tl(a,u,d){a.pendingLanes|=u,u!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),(a=a.eventTimes)[u=31-In(u)]=d}function Ap(a,u){var d=a.entangledLanes|=u;for(a=a.entanglements;d;){var g=31-In(d),y=1<<g;y&u|a[g]&u&&(a[g]|=u),d&=~y}}var We=0;function x_(a){return 1<(a&=-a)?4<a?268435455&a?16:536870912:4:1}var Cp=n.unstable_scheduleCallback,w_=n.unstable_cancelCallback,d2=n.unstable_shouldYield,f2=n.unstable_requestPaint,Gt=n.unstable_now,Pp=n.unstable_ImmediatePriority,p2=n.unstable_UserBlockingPriority,E_=n.unstable_NormalPriority,m2=n.unstable_IdlePriority,Ih=null,Zn=null,Rn=typeof Object.is=="function"?Object.is:function(a,u){return a===u&&(a!==0||1/a==1/u)||a!=a&&u!=u},Di=null,Rh=!1,Ip=!1;function S_(a){Di===null?Di=[a]:Di.push(a)}function Jn(){if(!Ip&&Di!==null){Ip=!0;var a=0,u=We;try{var d=Di;for(We=1;a<d.length;a++){var g=d[a];do g=g(!0);while(g!==null)}Di=null,Rh=!1}catch(y){throw Di!==null&&(Di=Di.slice(a+1)),Cp(Pp,Jn),y}finally{We=u,Ip=!1}}return null}var ea=[],ta=0,Mh=null,kh=0,on=[],an=0,ao=null,ei=1,Oi="";function lo(a,u){ea[ta++]=kh,ea[ta++]=Mh,Mh=a,kh=u}function b_(a,u,d){on[an++]=ei,on[an++]=Oi,on[an++]=ao,ao=a;var g=ei;a=Oi;var y=32-In(g)-1;g&=~(1<<y),d+=1;var w=32-In(u)+y;if(30<w){var C=y-y%5;w=(g&(1<<C)-1).toString(32),g>>=C,y-=C,ei=1<<32-In(u)+y|d<<y|g,Oi=w+a}else ei=1<<w|d<<y|g,Oi=a}function Rp(a){a.return!==null&&(lo(a,1),b_(a,1,0))}function Mp(a){for(;a===Mh;)Mh=ea[--ta],ea[ta]=null,kh=ea[--ta],ea[ta]=null;for(;a===ao;)ao=on[--an],on[an]=null,Oi=on[--an],on[an]=null,ei=on[--an],on[an]=null}var Vr=null,ln=null,lt=!1,Al=!1,Mn=null;function T_(a,u){var d=fn(5,null,null,0);d.elementType="DELETED",d.stateNode=u,d.return=a,(u=a.deletions)===null?(a.deletions=[d],a.flags|=16):u.push(d)}function A_(a,u){switch(a.tag){case 5:return(u=vh(u,a.type,a.pendingProps))!==null&&(a.stateNode=u,Vr=a,ln=wh(u),!0);case 6:return(u=_h(u,a.pendingProps))!==null&&(a.stateNode=u,Vr=a,ln=null,!0);case 13:if((u=xl(u))!==null){var d=ao!==null?{id:ei,overflow:Oi}:null;return a.memoizedState={dehydrated:u,treeContext:d,retryLane:1073741824},(d=fn(18,null,null,0)).stateNode=u,d.return=a,a.child=d,Vr=a,ln=null,!0}return!1;default:return!1}}function kp(a){return(1&a.mode)!=0&&(128&a.flags)==0}function Np(a){if(lt){var u=ln;if(u){var d=u;if(!A_(a,u)){if(kp(a))throw Error(s(418));u=io(d);var g=Vr;u&&A_(a,u)?T_(g,d):(a.flags=-4097&a.flags|2,lt=!1,Vr=a)}}else{if(kp(a))throw Error(s(418));a.flags=-4097&a.flags|2,lt=!1,Vr=a}}}function C_(a){for(a=a.return;a!==null&&a.tag!==5&&a.tag!==3&&a.tag!==13;)a=a.return;Vr=a}function Nh(a){if(!Me||a!==Vr)return!1;if(!lt)return C_(a),lt=!0,!1;if(a.tag!==3&&(a.tag!==5||so(a.type)&&!ve(a.type,a.memoizedProps))){var u=ln;if(u){if(kp(a))throw P_(),Error(s(418));for(;u;)T_(a,u),u=io(u)}}if(C_(a),a.tag===13){if(!Me)throw Error(s(316));if(!(a=(a=a.memoizedState)!==null?a.dehydrated:null))throw Error(s(317));ln=bh(a)}else ln=Vr?io(a.stateNode):null;return!0}function P_(){for(var a=ln;a;)a=io(a)}function ra(){Me&&(ln=Vr=null,Al=lt=!1)}function Dp(a){Mn===null?Mn=[a]:Mn.push(a)}var g2=o.ReactCurrentBatchConfig;function Dh(a,u){if(Rn(a,u))return!0;if(typeof a!="object"||a===null||typeof u!="object"||u===null)return!1;var d=Object.keys(a),g=Object.keys(u);if(d.length!==g.length)return!1;for(g=0;g<d.length;g++){var y=d[g];if(!l2.call(u,y)||!Rn(a[y],u[y]))return!1}return!0}function y2(a){switch(a.tag){case 5:return Sl(a.type);case 16:return Sl("Lazy");case 13:return Sl("Suspense");case 19:return Sl("SuspenseList");case 0:case 2:case 15:return a=_p(a.type,!1);case 11:return a=_p(a.type.render,!1);case 1:return a=_p(a.type,!0);default:return""}}function kn(a,u){if(a&&a.defaultProps){for(var d in u=i({},u),a=a.defaultProps)u[d]===void 0&&(u[d]=a[d]);return u}return u}var Oh=us(null),Fh=null,na=null,Op=null;function Fp(){Op=na=Fh=null}function I_(a,u,d){P?(Je(Oh,u._currentValue),u._currentValue=d):(Je(Oh,u._currentValue2),u._currentValue2=d)}function Bp(a){var u=Oh.current;at(Oh),P?a._currentValue=u:a._currentValue2=u}function Lp(a,u,d){for(;a!==null;){var g=a.alternate;if((a.childLanes&u)!==u?(a.childLanes|=u,g!==null&&(g.childLanes|=u)):g!==null&&(g.childLanes&u)!==u&&(g.childLanes|=u),a===d)break;a=a.return}}function ia(a,u){Fh=a,Op=na=null,(a=a.dependencies)!==null&&a.firstContext!==null&&(a.lanes&u&&(Mr=!0),a.firstContext=null)}function un(a){var u=P?a._currentValue:a._currentValue2;if(Op!==a)if(a={context:a,memoizedValue:u,next:null},na===null){if(Fh===null)throw Error(s(308));na=a,Fh.dependencies={lanes:0,firstContext:a}}else na=na.next=a;return u}var uo=null;function Up(a){uo===null?uo=[a]:uo.push(a)}function R_(a,u,d,g){var y=u.interleaved;return y===null?(d.next=d,Up(u)):(d.next=y.next,y.next=d),u.interleaved=d,ti(a,g)}function ti(a,u){a.lanes|=u;var d=a.alternate;for(d!==null&&(d.lanes|=u),d=a,a=a.return;a!==null;)a.childLanes|=u,(d=a.alternate)!==null&&(d.childLanes|=u),d=a,a=a.return;return d.tag===3?d.stateNode:null}var cs=!1;function zp(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function M_(a,u){a=a.updateQueue,u.updateQueue===a&&(u.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Fi(a,u){return{eventTime:a,lane:u,tag:0,payload:null,callback:null,next:null}}function ds(a,u,d){var g=a.updateQueue;if(g===null)return null;if(g=g.shared,(2&He)!=0){var y=g.pending;return y===null?u.next=u:(u.next=y.next,y.next=u),g.pending=u,ti(a,d)}return(y=g.interleaved)===null?(u.next=u,Up(g)):(u.next=y.next,y.next=u),g.interleaved=u,ti(a,d)}function Bh(a,u,d){if((u=u.updateQueue)!==null&&(u=u.shared,(4194240&d)!=0)){var g=u.lanes;d|=g&=a.pendingLanes,u.lanes=d,Ap(a,d)}}function k_(a,u){var d=a.updateQueue,g=a.alternate;if(g!==null&&d===(g=g.updateQueue)){var y=null,w=null;if((d=d.firstBaseUpdate)!==null){do{var C={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};w===null?y=w=C:w=w.next=C,d=d.next}while(d!==null);w===null?y=w=u:w=w.next=u}else y=w=u;return d={baseState:g.baseState,firstBaseUpdate:y,lastBaseUpdate:w,shared:g.shared,effects:g.effects},void(a.updateQueue=d)}(a=d.lastBaseUpdate)===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=u}function Lh(a,u,d,g){var y=a.updateQueue;cs=!1;var w=y.firstBaseUpdate,C=y.lastBaseUpdate,I=y.shared.pending;if(I!==null){y.shared.pending=null;var B=I,j=B.next;B.next=null,C===null?w=j:C.next=j,C=B;var K=a.alternate;K!==null&&(I=(K=K.updateQueue).lastBaseUpdate)!==C&&(I===null?K.firstBaseUpdate=j:I.next=j,K.lastBaseUpdate=B)}if(w!==null){var oe=y.baseState;for(C=0,K=j=B=null,I=w;;){var X=I.lane,re=I.eventTime;if((g&X)===X){K!==null&&(K=K.next={eventTime:re,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var xe=a,Fe=I;switch(X=u,re=d,Fe.tag){case 1:if(typeof(xe=Fe.payload)=="function"){oe=xe.call(re,oe,X);break e}oe=xe;break e;case 3:xe.flags=-65537&xe.flags|128;case 0:if((X=typeof(xe=Fe.payload)=="function"?xe.call(re,oe,X):xe)==null)break e;oe=i({},oe,X);break e;case 2:cs=!0}}I.callback!==null&&I.lane!==0&&(a.flags|=64,(X=y.effects)===null?y.effects=[I]:X.push(I))}else re={eventTime:re,lane:X,tag:I.tag,payload:I.payload,callback:I.callback,next:null},K===null?(j=K=re,B=oe):K=K.next=re,C|=X;if((I=I.next)===null){if((I=y.shared.pending)===null)break;I=(X=I).next,X.next=null,y.lastBaseUpdate=X,y.shared.pending=null}}if(K===null&&(B=oe),y.baseState=B,y.firstBaseUpdate=j,y.lastBaseUpdate=K,(u=y.shared.interleaved)!==null){y=u;do C|=y.lane,y=y.next;while(y!==u)}else w===null&&(y.shared.lanes=0);co|=C,a.lanes=C,a.memoizedState=oe}}function N_(a,u,d){if(a=u.effects,u.effects=null,a!==null)for(u=0;u<a.length;u++){var g=a[u],y=g.callback;if(y!==null){if(g.callback=null,g=d,typeof y!="function")throw Error(s(191,y));y.call(g)}}}var D_=new r.Component().refs;function Gp(a,u,d,g){d=(d=d(g,u=a.memoizedState))==null?u:i({},u,d),a.memoizedState=d,a.lanes===0&&(a.updateQueue.baseState=d)}var Uh={isMounted:function(a){return!!(a=a._reactInternals)&&D(a)===a},enqueueSetState:function(a,u,d){a=a._reactInternals;var g=dr(),y=gs(a),w=Fi(g,y);w.payload=u,d!=null&&(w.callback=d),(u=ds(a,w,y))!==null&&(dn(u,a,y,g),Bh(u,a,y))},enqueueReplaceState:function(a,u,d){a=a._reactInternals;var g=dr(),y=gs(a),w=Fi(g,y);w.tag=1,w.payload=u,d!=null&&(w.callback=d),(u=ds(a,w,y))!==null&&(dn(u,a,y,g),Bh(u,a,y))},enqueueForceUpdate:function(a,u){a=a._reactInternals;var d=dr(),g=gs(a),y=Fi(d,g);y.tag=2,u!=null&&(y.callback=u),(u=ds(a,y,g))!==null&&(dn(u,a,g,d),Bh(u,a,g))}};function O_(a,u,d,g,y,w,C){return typeof(a=a.stateNode).shouldComponentUpdate=="function"?a.shouldComponentUpdate(g,w,C):!u.prototype||!u.prototype.isPureReactComponent||!Dh(d,g)||!Dh(y,w)}function F_(a,u,d){var g=!1,y=hs,w=u.contextType;return typeof w=="object"&&w!==null?w=un(w):(y=Wr(u)?oo:ur.current,w=(g=(g=u.contextTypes)!=null)?Jo(a,y):hs),u=new u(d,w),a.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Uh,a.stateNode=u,u._reactInternals=a,g&&((a=a.stateNode).__reactInternalMemoizedUnmaskedChildContext=y,a.__reactInternalMemoizedMaskedChildContext=w),u}function B_(a,u,d,g){a=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(d,g),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(d,g),u.state!==a&&Uh.enqueueReplaceState(u,u.state,null)}function Hp(a,u,d,g){var y=a.stateNode;y.props=d,y.state=a.memoizedState,y.refs=D_,zp(a);var w=u.contextType;typeof w=="object"&&w!==null?y.context=un(w):(w=Wr(u)?oo:ur.current,y.context=Jo(a,w)),y.state=a.memoizedState,typeof(w=u.getDerivedStateFromProps)=="function"&&(Gp(a,u,w,d),y.state=a.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(u=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),u!==y.state&&Uh.enqueueReplaceState(y,y.state,null),Lh(a,d,y,g),y.state=a.memoizedState),typeof y.componentDidMount=="function"&&(a.flags|=4194308)}function Cl(a,u,d){if((a=d.ref)!==null&&typeof a!="function"&&typeof a!="object"){if(d._owner){if(d=d._owner){if(d.tag!==1)throw Error(s(309));var g=d.stateNode}if(!g)throw Error(s(147,a));var y=g,w=""+a;return u!==null&&u.ref!==null&&typeof u.ref=="function"&&u.ref._stringRef===w?u.ref:(u=function(C){var I=y.refs;I===D_&&(I=y.refs={}),C===null?delete I[w]:I[w]=C},u._stringRef=w,u)}if(typeof a!="string")throw Error(s(284));if(!d._owner)throw Error(s(290,a))}return a}function zh(a,u){throw a=Object.prototype.toString.call(u),Error(s(31,a==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":a))}function L_(a){return(0,a._init)(a._payload)}function U_(a){function u(q,N){if(a){var G=q.deletions;G===null?(q.deletions=[N],q.flags|=16):G.push(N)}}function d(q,N){if(!a)return null;for(;N!==null;)u(q,N),N=N.sibling;return null}function g(q,N){for(q=new Map;N!==null;)N.key!==null?q.set(N.key,N):q.set(N.index,N),N=N.sibling;return q}function y(q,N){return(q=vs(q,N)).index=0,q.sibling=null,q}function w(q,N,G){return q.index=G,a?(G=q.alternate)!==null?(G=G.index)<N?(q.flags|=2,N):G:(q.flags|=2,N):(q.flags|=1048576,N)}function C(q){return a&&q.alternate===null&&(q.flags|=2),q}function I(q,N,G,Z){return N===null||N.tag!==6?((N=Pm(G,q.mode,Z)).return=q,N):((N=y(N,G)).return=q,N)}function B(q,N,G,Z){var Ie=G.type;return Ie===c?K(q,N,G.props.children,Z,G.key):N!==null&&(N.elementType===Ie||typeof Ie=="object"&&Ie!==null&&Ie.$$typeof===b&&L_(Ie)===N.type)?((Z=y(N,G.props)).ref=Cl(q,N,G),Z.return=q,Z):((Z=dc(G.type,G.key,G.props,null,q.mode,Z)).ref=Cl(q,N,G),Z.return=q,Z)}function j(q,N,G,Z){return N===null||N.tag!==4||N.stateNode.containerInfo!==G.containerInfo||N.stateNode.implementation!==G.implementation?((N=Im(G,q.mode,Z)).return=q,N):((N=y(N,G.children||[])).return=q,N)}function K(q,N,G,Z,Ie){return N===null||N.tag!==7?((N=mo(G,q.mode,Z,Ie)).return=q,N):((N=y(N,G)).return=q,N)}function oe(q,N,G){if(typeof N=="string"&&N!==""||typeof N=="number")return(N=Pm(""+N,q.mode,G)).return=q,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case l:return(G=dc(N.type,N.key,N.props,null,q.mode,G)).ref=Cl(q,null,N),G.return=q,G;case h:return(N=Im(N,q.mode,G)).return=q,N;case b:return oe(q,(0,N._init)(N._payload),G)}if(ie(N)||R(N))return(N=mo(N,q.mode,G,null)).return=q,N;zh(q,N)}return null}function X(q,N,G,Z){var Ie=N!==null?N.key:null;if(typeof G=="string"&&G!==""||typeof G=="number")return Ie!==null?null:I(q,N,""+G,Z);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case l:return G.key===Ie?B(q,N,G,Z):null;case h:return G.key===Ie?j(q,N,G,Z):null;case b:return X(q,N,(Ie=G._init)(G._payload),Z)}if(ie(G)||R(G))return Ie!==null?null:K(q,N,G,Z,null);zh(q,G)}return null}function re(q,N,G,Z,Ie){if(typeof Z=="string"&&Z!==""||typeof Z=="number")return I(N,q=q.get(G)||null,""+Z,Ie);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case l:return B(N,q=q.get(Z.key===null?G:Z.key)||null,Z,Ie);case h:return j(N,q=q.get(Z.key===null?G:Z.key)||null,Z,Ie);case b:return re(q,N,G,(0,Z._init)(Z._payload),Ie)}if(ie(Z)||R(Z))return K(N,q=q.get(G)||null,Z,Ie,null);zh(N,Z)}return null}function xe(q,N,G,Z){for(var Ie=null,Ye=null,Se=N,Ve=N=0,Jt=null;Se!==null&&Ve<G.length;Ve++){Se.index>Ve?(Jt=Se,Se=null):Jt=Se.sibling;var Qe=X(q,Se,G[Ve],Z);if(Qe===null){Se===null&&(Se=Jt);break}a&&Se&&Qe.alternate===null&&u(q,Se),N=w(Qe,N,Ve),Ye===null?Ie=Qe:Ye.sibling=Qe,Ye=Qe,Se=Jt}if(Ve===G.length)return d(q,Se),lt&&lo(q,Ve),Ie;if(Se===null){for(;Ve<G.length;Ve++)(Se=oe(q,G[Ve],Z))!==null&&(N=w(Se,N,Ve),Ye===null?Ie=Se:Ye.sibling=Se,Ye=Se);return lt&&lo(q,Ve),Ie}for(Se=g(q,Se);Ve<G.length;Ve++)(Jt=re(Se,q,Ve,G[Ve],Z))!==null&&(a&&Jt.alternate!==null&&Se.delete(Jt.key===null?Ve:Jt.key),N=w(Jt,N,Ve),Ye===null?Ie=Jt:Ye.sibling=Jt,Ye=Jt);return a&&Se.forEach(function(_s){return u(q,_s)}),lt&&lo(q,Ve),Ie}function Fe(q,N,G,Z){var Ie=R(G);if(typeof Ie!="function")throw Error(s(150));if((G=Ie.call(G))==null)throw Error(s(151));for(var Ye=Ie=null,Se=N,Ve=N=0,Jt=null,Qe=G.next();Se!==null&&!Qe.done;Ve++,Qe=G.next()){Se.index>Ve?(Jt=Se,Se=null):Jt=Se.sibling;var _s=X(q,Se,Qe.value,Z);if(_s===null){Se===null&&(Se=Jt);break}a&&Se&&_s.alternate===null&&u(q,Se),N=w(_s,N,Ve),Ye===null?Ie=_s:Ye.sibling=_s,Ye=_s,Se=Jt}if(Qe.done)return d(q,Se),lt&&lo(q,Ve),Ie;if(Se===null){for(;!Qe.done;Ve++,Qe=G.next())(Qe=oe(q,Qe.value,Z))!==null&&(N=w(Qe,N,Ve),Ye===null?Ie=Qe:Ye.sibling=Qe,Ye=Qe);return lt&&lo(q,Ve),Ie}for(Se=g(q,Se);!Qe.done;Ve++,Qe=G.next())(Qe=re(Se,q,Ve,Qe.value,Z))!==null&&(a&&Qe.alternate!==null&&Se.delete(Qe.key===null?Ve:Qe.key),N=w(Qe,N,Ve),Ye===null?Ie=Qe:Ye.sibling=Qe,Ye=Qe);return a&&Se.forEach(function(G2){return u(q,G2)}),lt&&lo(q,Ve),Ie}return function q(N,G,Z,Ie){if(typeof Z=="object"&&Z!==null&&Z.type===c&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case l:e:{for(var Ye=Z.key,Se=G;Se!==null;){if(Se.key===Ye){if((Ye=Z.type)===c){if(Se.tag===7){d(N,Se.sibling),(G=y(Se,Z.props.children)).return=N,N=G;break e}}else if(Se.elementType===Ye||typeof Ye=="object"&&Ye!==null&&Ye.$$typeof===b&&L_(Ye)===Se.type){d(N,Se.sibling),(G=y(Se,Z.props)).ref=Cl(N,Se,Z),G.return=N,N=G;break e}d(N,Se);break}u(N,Se),Se=Se.sibling}Z.type===c?((G=mo(Z.props.children,N.mode,Ie,Z.key)).return=N,N=G):((Ie=dc(Z.type,Z.key,Z.props,null,N.mode,Ie)).ref=Cl(N,G,Z),Ie.return=N,N=Ie)}return C(N);case h:e:{for(Se=Z.key;G!==null;){if(G.key===Se){if(G.tag===4&&G.stateNode.containerInfo===Z.containerInfo&&G.stateNode.implementation===Z.implementation){d(N,G.sibling),(G=y(G,Z.children||[])).return=N,N=G;break e}d(N,G);break}u(N,G),G=G.sibling}(G=Im(Z,N.mode,Ie)).return=N,N=G}return C(N);case b:return q(N,G,(Se=Z._init)(Z._payload),Ie)}if(ie(Z))return xe(N,G,Z,Ie);if(R(Z))return Fe(N,G,Z,Ie);zh(N,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"?(Z=""+Z,G!==null&&G.tag===6?(d(N,G.sibling),(G=y(G,Z)).return=N,N=G):(d(N,G),(G=Pm(Z,N.mode,Ie)).return=N,N=G),C(N)):d(N,G)}}var sa=U_(!0),z_=U_(!1),Pl={},hn=us(Pl),Il=us(Pl),oa=us(Pl);function ri(a){if(a===Pl)throw Error(s(174));return a}function jp(a,u){Je(oa,u),Je(Il,a),Je(hn,Pl),a=fe(u),at(hn),Je(hn,a)}function aa(){at(hn),at(Il),at(oa)}function G_(a){var u=ri(oa.current),d=ri(hn.current);d!==(u=M(d,a.type,u))&&(Je(Il,a),Je(hn,u))}function $p(a){Il.current===a&&(at(hn),at(Il))}var _t=us(0);function Gh(a){for(var u=a;u!==null;){if(u.tag===13){var d=u.memoizedState;if(d!==null&&((d=d.dehydrated)===null||xh(d)||wl(d)))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if(128&u.flags)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===a)break;for(;u.sibling===null;){if(u.return===null||u.return===a)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var Wp=[];function Vp(){for(var a=0;a<Wp.length;a++){var u=Wp[a];P?u._workInProgressVersionPrimary=null:u._workInProgressVersionSecondary=null}Wp.length=0}var Hh=o.ReactCurrentDispatcher,Xp=o.ReactCurrentBatchConfig,ho=0,dt=null,Ht=null,jt=null,jh=!1,Rl=!1,Ml=0,v2=0;function hr(){throw Error(s(321))}function Yp(a,u){if(u===null)return!1;for(var d=0;d<u.length&&d<a.length;d++)if(!Rn(a[d],u[d]))return!1;return!0}function Qp(a,u,d,g,y,w){if(ho=w,dt=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,Hh.current=a===null||a.memoizedState===null?E2:S2,a=d(g,y),Rl){w=0;do{if(Rl=!1,Ml=0,25<=w)throw Error(s(301));w+=1,jt=Ht=null,u.updateQueue=null,Hh.current=b2,a=d(g,y)}while(Rl)}if(Hh.current=Vh,u=Ht!==null&&Ht.next!==null,ho=0,jt=Ht=dt=null,jh=!1,u)throw Error(s(300));return a}function Kp(){var a=Ml!==0;return Ml=0,a}function ni(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?dt.memoizedState=jt=a:jt=jt.next=a,jt}function cn(){if(Ht===null){var a=dt.alternate;a=a!==null?a.memoizedState:null}else a=Ht.next;var u=jt===null?dt.memoizedState:jt.next;if(u!==null)jt=u,Ht=a;else{if(a===null)throw Error(s(310));a={memoizedState:(Ht=a).memoizedState,baseState:Ht.baseState,baseQueue:Ht.baseQueue,queue:Ht.queue,next:null},jt===null?dt.memoizedState=jt=a:jt=jt.next=a}return jt}function kl(a,u){return typeof u=="function"?u(a):u}function qp(a){var u=cn(),d=u.queue;if(d===null)throw Error(s(311));d.lastRenderedReducer=a;var g=Ht,y=g.baseQueue,w=d.pending;if(w!==null){if(y!==null){var C=y.next;y.next=w.next,w.next=C}g.baseQueue=y=w,d.pending=null}if(y!==null){w=y.next,g=g.baseState;var I=C=null,B=null,j=w;do{var K=j.lane;if((ho&K)===K)B!==null&&(B=B.next={lane:0,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null}),g=j.hasEagerState?j.eagerState:a(g,j.action);else{var oe={lane:K,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null};B===null?(I=B=oe,C=g):B=B.next=oe,dt.lanes|=K,co|=K}j=j.next}while(j!==null&&j!==w);B===null?C=g:B.next=I,Rn(g,u.memoizedState)||(Mr=!0),u.memoizedState=g,u.baseState=C,u.baseQueue=B,d.lastRenderedState=g}if((a=d.interleaved)!==null){y=a;do w=y.lane,dt.lanes|=w,co|=w,y=y.next;while(y!==a)}else y===null&&(d.lanes=0);return[u.memoizedState,d.dispatch]}function Zp(a){var u=cn(),d=u.queue;if(d===null)throw Error(s(311));d.lastRenderedReducer=a;var g=d.dispatch,y=d.pending,w=u.memoizedState;if(y!==null){d.pending=null;var C=y=y.next;do w=a(w,C.action),C=C.next;while(C!==y);Rn(w,u.memoizedState)||(Mr=!0),u.memoizedState=w,u.baseQueue===null&&(u.baseState=w),d.lastRenderedState=w}return[w,g]}function H_(){}function j_(a,u){var d=dt,g=cn(),y=u(),w=!Rn(g.memoizedState,y);if(w&&(g.memoizedState=y,Mr=!0),g=g.queue,Jp(V_.bind(null,d,g,a),[a]),g.getSnapshot!==u||w||jt!==null&&1&jt.memoizedState.tag){if(d.flags|=2048,Nl(9,W_.bind(null,d,g,y,u),void 0,null),$t===null)throw Error(s(349));30&ho||$_(d,u,y)}return y}function $_(a,u,d){a.flags|=16384,a={getSnapshot:u,value:d},(u=dt.updateQueue)===null?(u={lastEffect:null,stores:null},dt.updateQueue=u,u.stores=[a]):(d=u.stores)===null?u.stores=[a]:d.push(a)}function W_(a,u,d,g){u.value=d,u.getSnapshot=g,X_(u)&&Y_(a)}function V_(a,u,d){return d(function(){X_(u)&&Y_(a)})}function X_(a){var u=a.getSnapshot;a=a.value;try{var d=u();return!Rn(a,d)}catch{return!0}}function Y_(a){var u=ti(a,1);u!==null&&dn(u,a,1,-1)}function Q_(a){var u=ni();return typeof a=="function"&&(a=a()),u.memoizedState=u.baseState=a,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:kl,lastRenderedState:a},u.queue=a,a=a.dispatch=w2.bind(null,dt,a),[u.memoizedState,a]}function Nl(a,u,d,g){return a={tag:a,create:u,destroy:d,deps:g,next:null},(u=dt.updateQueue)===null?(u={lastEffect:null,stores:null},dt.updateQueue=u,u.lastEffect=a.next=a):(d=u.lastEffect)===null?u.lastEffect=a.next=a:(g=d.next,d.next=a,a.next=g,u.lastEffect=a),a}function K_(){return cn().memoizedState}function $h(a,u,d,g){var y=ni();dt.flags|=a,y.memoizedState=Nl(1|u,d,void 0,g===void 0?null:g)}function Wh(a,u,d,g){var y=cn();g=g===void 0?null:g;var w=void 0;if(Ht!==null){var C=Ht.memoizedState;if(w=C.destroy,g!==null&&Yp(g,C.deps))return void(y.memoizedState=Nl(u,d,w,g))}dt.flags|=a,y.memoizedState=Nl(1|u,d,w,g)}function q_(a,u){return $h(8390656,8,a,u)}function Jp(a,u){return Wh(2048,8,a,u)}function Z_(a,u){return Wh(4,2,a,u)}function J_(a,u){return Wh(4,4,a,u)}function e1(a,u){return typeof u=="function"?(a=a(),u(a),function(){u(null)}):u!=null?(a=a(),u.current=a,function(){u.current=null}):void 0}function t1(a,u,d){return d=d!=null?d.concat([a]):null,Wh(4,4,e1.bind(null,u,a),d)}function em(){}function r1(a,u){var d=cn();u=u===void 0?null:u;var g=d.memoizedState;return g!==null&&u!==null&&Yp(u,g[1])?g[0]:(d.memoizedState=[a,u],a)}function n1(a,u){var d=cn();u=u===void 0?null:u;var g=d.memoizedState;return g!==null&&u!==null&&Yp(u,g[1])?g[0]:(a=a(),d.memoizedState=[a,u],a)}function i1(a,u,d){return 21&ho?(Rn(d,u)||(d=__(),dt.lanes|=d,co|=d,a.baseState=!0),u):(a.baseState&&(a.baseState=!1,Mr=!0),a.memoizedState=d)}function _2(a,u){var d=We;We=d!==0&&4>d?d:4,a(!0);var g=Xp.transition;Xp.transition={};try{a(!1),u()}finally{We=d,Xp.transition=g}}function s1(){return cn().memoizedState}function x2(a,u,d){var g=gs(a);d={lane:g,action:d,hasEagerState:!1,eagerState:null,next:null},o1(a)?a1(u,d):(d=R_(a,u,d,g))!==null&&(dn(d,a,g,dr()),l1(d,u,g))}function w2(a,u,d){var g=gs(a),y={lane:g,action:d,hasEagerState:!1,eagerState:null,next:null};if(o1(a))a1(u,y);else{var w=a.alternate;if(a.lanes===0&&(w===null||w.lanes===0)&&(w=u.lastRenderedReducer)!==null)try{var C=u.lastRenderedState,I=w(C,d);if(y.hasEagerState=!0,y.eagerState=I,Rn(I,C)){var B=u.interleaved;return B===null?(y.next=y,Up(u)):(y.next=B.next,B.next=y),void(u.interleaved=y)}}catch{}(d=R_(a,u,y,g))!==null&&(dn(d,a,g,y=dr()),l1(d,u,g))}}function o1(a){var u=a.alternate;return a===dt||u!==null&&u===dt}function a1(a,u){Rl=jh=!0;var d=a.pending;d===null?u.next=u:(u.next=d.next,d.next=u),a.pending=u}function l1(a,u,d){if(4194240&d){var g=u.lanes;d|=g&=a.pendingLanes,u.lanes=d,Ap(a,d)}}var Vh={readContext:un,useCallback:hr,useContext:hr,useEffect:hr,useImperativeHandle:hr,useInsertionEffect:hr,useLayoutEffect:hr,useMemo:hr,useReducer:hr,useRef:hr,useState:hr,useDebugValue:hr,useDeferredValue:hr,useTransition:hr,useMutableSource:hr,useSyncExternalStore:hr,useId:hr,unstable_isNewReconciler:!1},E2={readContext:un,useCallback:function(a,u){return ni().memoizedState=[a,u===void 0?null:u],a},useContext:un,useEffect:q_,useImperativeHandle:function(a,u,d){return d=d!=null?d.concat([a]):null,$h(4194308,4,e1.bind(null,u,a),d)},useLayoutEffect:function(a,u){return $h(4194308,4,a,u)},useInsertionEffect:function(a,u){return $h(4,2,a,u)},useMemo:function(a,u){var d=ni();return u=u===void 0?null:u,a=a(),d.memoizedState=[a,u],a},useReducer:function(a,u,d){var g=ni();return u=d!==void 0?d(u):u,g.memoizedState=g.baseState=u,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:u},g.queue=a,a=a.dispatch=x2.bind(null,dt,a),[g.memoizedState,a]},useRef:function(a){return a={current:a},ni().memoizedState=a},useState:Q_,useDebugValue:em,useDeferredValue:function(a){return ni().memoizedState=a},useTransition:function(){var a=Q_(!1),u=a[0];return a=_2.bind(null,a[1]),ni().memoizedState=a,[u,a]},useMutableSource:function(){},useSyncExternalStore:function(a,u,d){var g=dt,y=ni();if(lt){if(d===void 0)throw Error(s(407));d=d()}else{if(d=u(),$t===null)throw Error(s(349));30&ho||$_(g,u,d)}y.memoizedState=d;var w={value:d,getSnapshot:u};return y.queue=w,q_(V_.bind(null,g,w,a),[a]),g.flags|=2048,Nl(9,W_.bind(null,g,w,d,u),void 0,null),d},useId:function(){var a=ni(),u=$t.identifierPrefix;if(lt){var d=Oi;u=":"+u+"R"+(d=(ei&~(1<<32-In(ei)-1)).toString(32)+d),0<(d=Ml++)&&(u+="H"+d.toString(32)),u+=":"}else u=":"+u+"r"+(d=v2++).toString(32)+":";return a.memoizedState=u},unstable_isNewReconciler:!1},S2={readContext:un,useCallback:r1,useContext:un,useEffect:Jp,useImperativeHandle:t1,useInsertionEffect:Z_,useLayoutEffect:J_,useMemo:n1,useReducer:qp,useRef:K_,useState:function(){return qp(kl)},useDebugValue:em,useDeferredValue:function(a){return i1(cn(),Ht.memoizedState,a)},useTransition:function(){return[qp(kl)[0],cn().memoizedState]},useMutableSource:H_,useSyncExternalStore:j_,useId:s1,unstable_isNewReconciler:!1},b2={readContext:un,useCallback:r1,useContext:un,useEffect:Jp,useImperativeHandle:t1,useInsertionEffect:Z_,useLayoutEffect:J_,useMemo:n1,useReducer:Zp,useRef:K_,useState:function(){return Zp(kl)},useDebugValue:em,useDeferredValue:function(a){var u=cn();return Ht===null?u.memoizedState=a:i1(u,Ht.memoizedState,a)},useTransition:function(){return[Zp(kl)[0],cn().memoizedState]},useMutableSource:H_,useSyncExternalStore:j_,useId:s1,unstable_isNewReconciler:!1};function la(a,u){try{var d="",g=u;do d+=y2(g),g=g.return;while(g);var y=d}catch(w){y=`
853
853
  Error generating stack: `+w.message+`
854
- `+w.stack}return{value:a,source:u,stack:y,digest:null}}function tm(a,u,d){return{value:a,source:null,stack:d??null,digest:u??null}}function rm(a,u){try{console.error(u.value)}catch(d){setTimeout(function(){throw d})}}var T2=typeof WeakMap=="function"?WeakMap:Map;function u1(a,u,d){(d=Fi(-1,d)).tag=3,d.payload={element:null};var g=u.value;return d.callback=function(){oc||(oc=!0,wm=g),rm(0,u)},d}function h1(a,u,d){(d=Fi(-1,d)).tag=3;var g=a.type.getDerivedStateFromError;if(typeof g=="function"){var y=u.value;d.payload=function(){return g(y)},d.callback=function(){rm(0,u)}}var w=a.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(d.callback=function(){rm(0,u),typeof g!="function"&&(ps===null?ps=new Set([this]):ps.add(this));var C=u.stack;this.componentDidCatch(u.value,{componentStack:C!==null?C:""})}),d}function c1(a,u,d){var g=a.pingCache;if(g===null){g=a.pingCache=new T2;var y=new Set;g.set(u,y)}else(y=g.get(u))===void 0&&(y=new Set,g.set(u,y));y.has(d)||(y.add(d),a=D2.bind(null,a,u,d),u.then(a,a))}function d1(a){do{var u;if((u=a.tag===13)&&(u=(u=a.memoizedState)===null||u.dehydrated!==null),u)return a;a=a.return}while(a!==null);return null}function f1(a,u,d,g,y){return 1&a.mode?(a.flags|=65536,a.lanes=y,a):(a===u?a.flags|=65536:(a.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:((u=Fi(-1,1)).tag=2,ds(d,u,1))),d.lanes|=1),a)}var A2=o.ReactCurrentOwner,Mr=!1;function kr(a,u,d,g){u.child=a===null?z_(u,null,d,g):sa(u,a.child,d,g)}function p1(a,u,d,g,y){d=d.render;var w=u.ref;return ia(u,y),g=Qp(a,u,d,g,w,y),d=Kp(),a===null||Mr?(lt&&d&&Rp(u),u.flags|=1,kr(a,u,g,y),u.child):(u.updateQueue=a.updateQueue,u.flags&=-2053,a.lanes&=~y,Bi(a,u,y))}function m1(a,u,d,g,y){if(a===null){var w=d.type;return typeof w!="function"||Cm(w)||w.defaultProps!==void 0||d.compare!==null||d.defaultProps!==void 0?((a=dc(d.type,null,g,u,u.mode,y)).ref=u.ref,a.return=u,u.child=a):(u.tag=15,u.type=w,g1(a,u,w,g,y))}if(w=a.child,(a.lanes&y)==0){var C=w.memoizedProps;if((d=(d=d.compare)!==null?d:Dh)(C,g)&&a.ref===u.ref)return Bi(a,u,y)}return u.flags|=1,(a=vs(w,g)).ref=u.ref,a.return=u,u.child=a}function g1(a,u,d,g,y){if(a!==null){var w=a.memoizedProps;if(Dh(w,g)&&a.ref===u.ref){if(Mr=!1,u.pendingProps=g=w,(a.lanes&y)==0)return u.lanes=a.lanes,Bi(a,u,y);131072&a.flags&&(Mr=!0)}}return nm(a,u,d,g,y)}function y1(a,u,d){var g=u.pendingProps,y=g.children,w=a!==null?a.memoizedState:null;if(g.mode==="hidden")if(!(1&u.mode))u.memoizedState={baseLanes:0,cachePool:null,transitions:null},Je(ha,Xr),Xr|=d;else{if(!(1073741824&d))return a=w!==null?w.baseLanes|d:d,u.lanes=u.childLanes=1073741824,u.memoizedState={baseLanes:a,cachePool:null,transitions:null},u.updateQueue=null,Je(ha,Xr),Xr|=a,null;u.memoizedState={baseLanes:0,cachePool:null,transitions:null},g=w!==null?w.baseLanes:d,Je(ha,Xr),Xr|=g}else w!==null?(g=w.baseLanes|d,u.memoizedState=null):g=d,Je(ha,Xr),Xr|=g;return kr(a,u,y,d),u.child}function v1(a,u){var d=u.ref;(a===null&&d!==null||a!==null&&a.ref!==d)&&(u.flags|=512,u.flags|=2097152)}function nm(a,u,d,g,y){var w=Wr(d)?oo:ur.current;return w=Jo(u,w),ia(u,y),d=Qp(a,u,d,g,w,y),g=Kp(),a===null||Mr?(lt&&g&&Rp(u),u.flags|=1,kr(a,u,d,y),u.child):(u.updateQueue=a.updateQueue,u.flags&=-2053,a.lanes&=~y,Bi(a,u,y))}function _1(a,u,d,g,y){if(Wr(d)){var w=!0;Ch(u)}else w=!1;if(ia(u,y),u.stateNode===null)Kh(a,u),F_(u,d,g),Hp(u,d,g,y),g=!0;else if(a===null){var C=u.stateNode,I=u.memoizedProps;C.props=I;var F=C.context,j=d.contextType;typeof j=="object"&&j!==null?j=un(j):j=Jo(u,j=Wr(d)?oo:ur.current);var Y=d.getDerivedStateFromProps,oe=typeof Y=="function"||typeof C.getSnapshotBeforeUpdate=="function";oe||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(I!==g||F!==j)&&B_(u,C,g,j),cs=!1;var V=u.memoizedState;C.state=V,Lh(u,g,C,y),F=u.memoizedState,I!==g||V!==F||Rr.current||cs?(typeof Y=="function"&&(Gp(u,d,Y,g),F=u.memoizedState),(I=cs||O_(u,d,I,g,V,F,j))?(oe||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(u.flags|=4194308)):(typeof C.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=g,u.memoizedState=F),C.props=g,C.state=F,C.context=j,g=I):(typeof C.componentDidMount=="function"&&(u.flags|=4194308),g=!1)}else{C=u.stateNode,M_(a,u),I=u.memoizedProps,j=u.type===u.elementType?I:kn(u.type,I),C.props=j,oe=u.pendingProps,V=C.context,typeof(F=d.contextType)=="object"&&F!==null?F=un(F):F=Jo(u,F=Wr(d)?oo:ur.current);var te=d.getDerivedStateFromProps;(Y=typeof te=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(I!==oe||V!==F)&&B_(u,C,g,F),cs=!1,V=u.memoizedState,C.state=V,Lh(u,g,C,y);var xe=u.memoizedState;I!==oe||V!==xe||Rr.current||cs?(typeof te=="function"&&(Gp(u,d,te,g),xe=u.memoizedState),(j=cs||O_(u,d,j,g,V,xe,F)||!1)?(Y||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(g,xe,F),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(g,xe,F)),typeof C.componentDidUpdate=="function"&&(u.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof C.componentDidUpdate!="function"||I===a.memoizedProps&&V===a.memoizedState||(u.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||I===a.memoizedProps&&V===a.memoizedState||(u.flags|=1024),u.memoizedProps=g,u.memoizedState=xe),C.props=g,C.state=xe,C.context=F,g=j):(typeof C.componentDidUpdate!="function"||I===a.memoizedProps&&V===a.memoizedState||(u.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||I===a.memoizedProps&&V===a.memoizedState||(u.flags|=1024),g=!1)}return im(a,u,d,g,w,y)}function im(a,u,d,g,y,w){v1(a,u);var C=(128&u.flags)!=0;if(!g&&!C)return y&&v_(u,d,!1),Bi(a,u,w);g=u.stateNode,A2.current=u;var I=C&&typeof d.getDerivedStateFromError!="function"?null:g.render();return u.flags|=1,a!==null&&C?(u.child=sa(u,a.child,null,w),u.child=sa(u,null,I,w)):kr(a,u,I,w),u.memoizedState=g.state,y&&v_(u,d,!0),u.child}function x1(a){var u=a.stateNode;u.pendingContext?g_(0,u.pendingContext,u.pendingContext!==u.context):u.context&&g_(0,u.context,!1),jp(a,u.containerInfo)}function w1(a,u,d,g,y){return ra(),Dp(y),u.flags|=256,kr(a,u,d,g),u.child}var Dl,Ol,Xh,Yh,sm={dehydrated:null,treeContext:null,retryLane:0};function om(a){return{baseLanes:a,cachePool:null,transitions:null}}function E1(a,u,d){var g,y=u.pendingProps,w=_t.current,C=!1,I=(128&u.flags)!=0;if((g=I)||(g=(a===null||a.memoizedState!==null)&&(2&w)!=0),g?(C=!0,u.flags&=-129):a!==null&&a.memoizedState===null||(w|=1),Je(_t,1&w),a===null)return Np(u),(a=u.memoizedState)!==null&&(a=a.dehydrated)!==null?(1&u.mode?wl(a)?u.lanes=8:u.lanes=1073741824:u.lanes=1,null):(I=y.children,a=y.fallback,C?(y=u.mode,C=u.child,I={mode:"hidden",children:I},!(1&y)&&C!==null?(C.childLanes=0,C.pendingProps=I):C=fc(I,y,0,null),a=mo(a,y,d,null),C.return=u,a.return=u,C.sibling=a,u.child=C,u.child.memoizedState=om(d),u.memoizedState=sm,a):am(u,I));if((w=a.memoizedState)!==null&&(g=w.dehydrated)!==null)return function(j,Y,oe,V,te,xe,Fe){if(oe)return 256&Y.flags?(Y.flags&=-257,Qh(j,Y,Fe,V=tm(Error(s(422))))):Y.memoizedState!==null?(Y.child=j.child,Y.flags|=128,null):(xe=V.fallback,te=Y.mode,V=fc({mode:"visible",children:V.children},te,0,null),(xe=mo(xe,te,Fe,null)).flags|=2,V.return=Y,xe.return=Y,V.sibling=xe,Y.child=V,1&Y.mode&&sa(Y,j.child,null,Fe),Y.child.memoizedState=om(Fe),Y.memoizedState=sm,xe);if(!(1&Y.mode))return Qh(j,Y,Fe,null);if(wl(te))return V=mp(te).digest,xe=Error(s(419)),V=tm(xe,V,void 0),Qh(j,Y,Fe,V);if(oe=(Fe&j.childLanes)!=0,Mr||oe){if((V=$t)!==null){switch(Fe&-Fe){case 4:te=2;break;case 16:te=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:te=32;break;case 536870912:te=268435456;break;default:te=0}(te=te&(V.suspendedLanes|Fe)?0:te)!==0&&te!==xe.retryLane&&(xe.retryLane=te,ti(j,te),dn(V,j,te,-1))}return Am(),Qh(j,Y,Fe,V=tm(Error(s(421))))}return xh(te)?(Y.flags|=128,Y.child=j.child,Y=O2.bind(null,j),gp(te,Y),null):(j=xe.treeContext,Re&&(ln=Ni(te),Vr=Y,lt=!0,Mn=null,Al=!1,j!==null&&(on[an++]=ei,on[an++]=Oi,on[an++]=ao,ei=j.id,Oi=j.overflow,ao=Y)),Y=am(Y,V.children),Y.flags|=4096,Y)}(a,u,I,y,g,w,d);if(C){C=y.fallback,I=u.mode,g=(w=a.child).sibling;var F={mode:"hidden",children:y.children};return!(1&I)&&u.child!==w?((y=u.child).childLanes=0,y.pendingProps=F,u.deletions=null):(y=vs(w,F)).subtreeFlags=14680064&w.subtreeFlags,g!==null?C=vs(g,C):(C=mo(C,I,d,null)).flags|=2,C.return=u,y.return=u,y.sibling=C,u.child=y,y=C,C=u.child,I=(I=a.child.memoizedState)===null?om(d):{baseLanes:I.baseLanes|d,cachePool:null,transitions:I.transitions},C.memoizedState=I,C.childLanes=a.childLanes&~d,u.memoizedState=sm,y}return a=(C=a.child).sibling,y=vs(C,{mode:"visible",children:y.children}),!(1&u.mode)&&(y.lanes=d),y.return=u,y.sibling=null,a!==null&&((d=u.deletions)===null?(u.deletions=[a],u.flags|=16):d.push(a)),u.child=y,u.memoizedState=null,y}function am(a,u){return(u=fc({mode:"visible",children:u},a.mode,0,null)).return=a,a.child=u}function Qh(a,u,d,g){return g!==null&&Dp(g),sa(u,a.child,null,d),(a=am(u,u.pendingProps.children)).flags|=2,u.memoizedState=null,a}function S1(a,u,d){a.lanes|=u;var g=a.alternate;g!==null&&(g.lanes|=u),Lp(a.return,u,d)}function lm(a,u,d,g,y){var w=a.memoizedState;w===null?a.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:g,tail:d,tailMode:y}:(w.isBackwards=u,w.rendering=null,w.renderingStartTime=0,w.last=g,w.tail=d,w.tailMode=y)}function b1(a,u,d){var g=u.pendingProps,y=g.revealOrder,w=g.tail;if(kr(a,u,g.children,d),(2&(g=_t.current))!=0)g=1&g|2,u.flags|=128;else{if(a!==null&&128&a.flags)e:for(a=u.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&S1(a,d,u);else if(a.tag===19)S1(a,d,u);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===u)break e;for(;a.sibling===null;){if(a.return===null||a.return===u)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}g&=1}if(Je(_t,g),(1&u.mode)==0)u.memoizedState=null;else switch(y){case"forwards":for(d=u.child,y=null;d!==null;)(a=d.alternate)!==null&&Gh(a)===null&&(y=d),d=d.sibling;(d=y)===null?(y=u.child,u.child=null):(y=d.sibling,d.sibling=null),lm(u,!1,y,d,w);break;case"backwards":for(d=null,y=u.child,u.child=null;y!==null;){if((a=y.alternate)!==null&&Gh(a)===null){u.child=y;break}a=y.sibling,y.sibling=d,d=y,y=a}lm(u,!0,d,null,w);break;case"together":lm(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function Kh(a,u){!(1&u.mode)&&a!==null&&(a.alternate=null,u.alternate=null,u.flags|=2)}function Bi(a,u,d){if(a!==null&&(u.dependencies=a.dependencies),co|=u.lanes,(d&u.childLanes)==0)return null;if(a!==null&&u.child!==a.child)throw Error(s(153));if(u.child!==null){for(d=vs(a=u.child,a.pendingProps),u.child=d,d.return=u;a.sibling!==null;)a=a.sibling,(d=d.sibling=vs(a,a.pendingProps)).return=u;d.sibling=null}return u.child}function ii(a){a.flags|=4}function T1(a,u){if(a!==null&&a.child===u.child)return!0;if(16&u.flags)return!1;for(a=u.child;a!==null;){if(12854&a.flags||12854&a.subtreeFlags)return!1;a=a.sibling}return!0}if(ue)Dl=function(a,u){for(var d=u.child;d!==null;){if(d.tag===5||d.tag===6)z(a,d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===u)break;for(;d.sibling===null;){if(d.return===null||d.return===u)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},Ol=function(){},Xh=function(a,u,d,g,y){if((a=a.memoizedProps)!==g){var w=u.stateNode,C=ri(hn.current);d=J(w,d,a,g,y,C),(u.updateQueue=d)&&ii(u)}},Yh=function(a,u,d,g){d!==g&&ii(u)};else if(Ee){Dl=function(a,u,d,g){for(var y=u.child;y!==null;){if(y.tag===5){var w=y.stateNode;d&&g&&(w=_l(w,y.type,y.memoizedProps,y)),z(a,w)}else if(y.tag===6)w=y.stateNode,d&&g&&(w=yh(w,y.memoizedProps,y)),z(a,w);else if(y.tag!==4){if(y.tag===22&&y.memoizedState!==null)(w=y.child)!==null&&(w.return=y),Dl(a,y,!0,!0);else if(y.child!==null){y.child.return=y,y=y.child;continue}}if(y===u)break;for(;y.sibling===null;){if(y.return===null||y.return===u)return;y=y.return}y.sibling.return=y.return,y=y.sibling}};var A1=function(a,u,d,g){for(var y=u.child;y!==null;){if(y.tag===5){var w=y.stateNode;d&&g&&(w=_l(w,y.type,y.memoizedProps,y)),no(a,w)}else if(y.tag===6)w=y.stateNode,d&&g&&(w=yh(w,y.memoizedProps,y)),no(a,w);else if(y.tag!==4){if(y.tag===22&&y.memoizedState!==null)(w=y.child)!==null&&(w.return=y),A1(a,y,!0,!0);else if(y.child!==null){y.child.return=y,y=y.child;continue}}if(y===u)break;for(;y.sibling===null;){if(y.return===null||y.return===u)return;y=y.return}y.sibling.return=y.return,y=y.sibling}};Ol=function(a,u){var d=u.stateNode;if(!T1(a,u)){a=d.containerInfo;var g=mh(a);A1(g,u,!1,!1),d.pendingChildren=g,ii(u),gh(a,g)}},Xh=function(a,u,d,g,y){var w=a.stateNode,C=a.memoizedProps;if((a=T1(a,u))&&C===g)u.stateNode=w;else{var I=u.stateNode,F=ri(hn.current),j=null;C!==g&&(j=J(I,d,C,g,y,F)),a&&j===null?u.stateNode=w:(w=ph(w,j,d,C,g,u,a,I),X(w,d,g,y,F)&&ii(u),u.stateNode=w,a?ii(u):Dl(w,u,!1,!1))}},Yh=function(a,u,d,g){d!==g?(a=ri(oa.current),d=ri(hn.current),u.stateNode=le(g,a,d,u),ii(u)):u.stateNode=a.stateNode}}else Ol=function(){},Xh=function(){},Yh=function(){};function Fl(a,u){if(!lt)switch(a.tailMode){case"hidden":u=a.tail;for(var d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?a.tail=null:d.sibling=null;break;case"collapsed":d=a.tail;for(var g=null;d!==null;)d.alternate!==null&&(g=d),d=d.sibling;g===null?u||a.tail===null?a.tail=null:a.tail.sibling=null:g.sibling=null}}function xr(a){var u=a.alternate!==null&&a.alternate.child===a.child,d=0,g=0;if(u)for(var y=a.child;y!==null;)d|=y.lanes|y.childLanes,g|=14680064&y.subtreeFlags,g|=14680064&y.flags,y.return=a,y=y.sibling;else for(y=a.child;y!==null;)d|=y.lanes|y.childLanes,g|=y.subtreeFlags,g|=y.flags,y.return=a,y=y.sibling;return a.subtreeFlags|=g,a.childLanes=d,u}function C2(a,u,d){var g=u.pendingProps;switch(Mp(u),u.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xr(u),null;case 1:case 17:return Wr(u.type)&&wp(),xr(u),null;case 3:return d=u.stateNode,aa(),at(Rr),at(ur),Vp(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),a!==null&&a.child!==null||(Nh(u)?ii(u):a===null||a.memoizedState.isDehydrated&&!(256&u.flags)||(u.flags|=1024,Mn!==null&&(bm(Mn),Mn=null))),Ol(a,u),xr(u),null;case 5:$p(u),d=ri(oa.current);var y=u.type;if(a!==null&&u.stateNode!=null)Xh(a,u,y,g,d),a.ref!==u.ref&&(u.flags|=512,u.flags|=2097152);else{if(!g){if(u.stateNode===null)throw Error(s(166));return xr(u),null}if(a=ri(hn.current),Nh(u)){if(!Re)throw Error(s(175));a=m_(u.stateNode,u.type,u.memoizedProps,d,a,u,!Al),u.updateQueue=a,a!==null&&ii(u)}else{var w=H(y,g,d,a,u);Dl(w,u,!1,!1),u.stateNode=w,X(w,y,g,d,a)&&ii(u)}u.ref!==null&&(u.flags|=512,u.flags|=2097152)}return xr(u),null;case 6:if(a&&u.stateNode!=null)Yh(a,u,a.memoizedProps,g);else{if(typeof g!="string"&&u.stateNode===null)throw Error(s(166));if(a=ri(oa.current),d=ri(hn.current),Nh(u)){if(!Re)throw Error(s(176));if(a=u.stateNode,d=u.memoizedProps,(g=Sh(a,d,u,!Al))&&(y=Vr)!==null)switch(y.tag){case 3:qo(y.stateNode.containerInfo,a,d,(1&y.mode)!=0);break;case 5:yp(y.type,y.memoizedProps,y.stateNode,a,d,(1&y.mode)!=0)}g&&ii(u)}else u.stateNode=le(g,a,d,u)}return xr(u),null;case 13:if(at(_t),g=u.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(lt&&ln!==null&&1&u.mode&&!(128&u.flags))P_(),ra(),u.flags|=98560,y=!1;else if(y=Nh(u),g!==null&&g.dehydrated!==null){if(a===null){if(!y)throw Error(s(318));if(!Re)throw Error(s(344));if(!(y=(y=u.memoizedState)!==null?y.dehydrated:null))throw Error(s(317));ls(y,u)}else ra(),!(128&u.flags)&&(u.memoizedState=null),u.flags|=4;xr(u),y=!1}else Mn!==null&&(bm(Mn),Mn=null),y=!0;if(!y)return 65536&u.flags?u:null}return 128&u.flags?(u.lanes=d,u):((d=g!==null)!=(a!==null&&a.memoizedState!==null)&&d&&(u.child.flags|=8192,1&u.mode&&(a===null||1&_t.current?Ot===0&&(Ot=3):Am())),u.updateQueue!==null&&(u.flags|=4),xr(u),null);case 4:return aa(),Ol(a,u),a===null&&je(u.stateNode.containerInfo),xr(u),null;case 10:return Bp(u.type._context),xr(u),null;case 19:if(at(_t),(y=u.memoizedState)===null)return xr(u),null;if(g=(128&u.flags)!=0,(w=y.rendering)===null)if(g)Fl(y,!1);else{if(Ot!==0||a!==null&&128&a.flags)for(a=u.child;a!==null;){if((w=Gh(a))!==null){for(u.flags|=128,Fl(y,!1),(a=w.updateQueue)!==null&&(u.updateQueue=a,u.flags|=4),u.subtreeFlags=0,a=d,d=u.child;d!==null;)y=a,(g=d).flags&=14680066,(w=g.alternate)===null?(g.childLanes=0,g.lanes=y,g.child=null,g.subtreeFlags=0,g.memoizedProps=null,g.memoizedState=null,g.updateQueue=null,g.dependencies=null,g.stateNode=null):(g.childLanes=w.childLanes,g.lanes=w.lanes,g.child=w.child,g.subtreeFlags=0,g.deletions=null,g.memoizedProps=w.memoizedProps,g.memoizedState=w.memoizedState,g.updateQueue=w.updateQueue,g.type=w.type,y=w.dependencies,g.dependencies=y===null?null:{lanes:y.lanes,firstContext:y.firstContext}),d=d.sibling;return Je(_t,1&_t.current|2),u.child}a=a.sibling}y.tail!==null&&Gt()>xm&&(u.flags|=128,g=!0,Fl(y,!1),u.lanes=4194304)}else{if(!g)if((a=Gh(w))!==null){if(u.flags|=128,g=!0,(a=a.updateQueue)!==null&&(u.updateQueue=a,u.flags|=4),Fl(y,!0),y.tail===null&&y.tailMode==="hidden"&&!w.alternate&&!lt)return xr(u),null}else 2*Gt()-y.renderingStartTime>xm&&d!==1073741824&&(u.flags|=128,g=!0,Fl(y,!1),u.lanes=4194304);y.isBackwards?(w.sibling=u.child,u.child=w):((a=y.last)!==null?a.sibling=w:u.child=w,y.last=w)}return y.tail!==null?(u=y.tail,y.rendering=u,y.tail=u.sibling,y.renderingStartTime=Gt(),u.sibling=null,a=_t.current,Je(_t,g?1&a|2:1&a),u):(xr(u),null);case 22:case 23:return Tm(),d=u.memoizedState!==null,a!==null&&a.memoizedState!==null!==d&&(u.flags|=8192),d&&1&u.mode?1073741824&Xr&&(xr(u),ue&&6&u.subtreeFlags&&(u.flags|=8192)):xr(u),null;case 24:case 25:return null}throw Error(s(156,u.tag))}function P2(a,u){switch(Mp(u),u.tag){case 1:return Wr(u.type)&&wp(),65536&(a=u.flags)?(u.flags=-65537&a|128,u):null;case 3:return aa(),at(Rr),at(ur),Vp(),65536&(a=u.flags)&&!(128&a)?(u.flags=-65537&a|128,u):null;case 5:return $p(u),null;case 13:if(at(_t),(a=u.memoizedState)!==null&&a.dehydrated!==null){if(u.alternate===null)throw Error(s(340));ra()}return 65536&(a=u.flags)?(u.flags=-65537&a|128,u):null;case 19:return at(_t),null;case 4:return aa(),null;case 10:return Bp(u.type._context),null;case 22:case 23:return Tm(),null;default:return null}}var qh=!1,cr=!1,I2=typeof WeakSet=="function"?WeakSet:Set,ge=null;function ua(a,u){var d=a.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(g){ut(a,u,g)}else d.current=null}function C1(a,u,d){try{d()}catch(g){ut(a,u,g)}}var P1=!1;function Bl(a,u,d){var g=u.updateQueue;if((g=g!==null?g.lastEffect:null)!==null){var y=g=g.next;do{if((y.tag&a)===a){var w=y.destroy;y.destroy=void 0,w!==void 0&&C1(u,d,w)}y=y.next}while(y!==g)}}function Zh(a,u){if((u=(u=u.updateQueue)!==null?u.lastEffect:null)!==null){var d=u=u.next;do{if((d.tag&a)===a){var g=d.create;d.destroy=g()}d=d.next}while(d!==u)}}function um(a){var u=a.ref;if(u!==null){var d=a.stateNode;a.tag===5?a=_e(d):a=d,typeof u=="function"?u(a):u.current=a}}function I1(a){var u=a.alternate;u!==null&&(a.alternate=null,I1(u)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(u=a.stateNode)!==null&&St(u),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function R1(a){return a.tag===5||a.tag===3||a.tag===4}function M1(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||R1(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(2&a.flags||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(2&a.flags))return a.stateNode}}function hm(a,u,d){var g=a.tag;if(g===5||g===6)a=a.stateNode,u?At(d,a,u):rt(d,a);else if(g!==4&&(a=a.child)!==null)for(hm(a,u,d),a=a.sibling;a!==null;)hm(a,u,d),a=a.sibling}function cm(a,u,d){var g=a.tag;if(g===5||g===6)a=a.stateNode,u?qt(d,a,u):as(d,a);else if(g!==4&&(a=a.child)!==null)for(cm(a,u,d),a=a.sibling;a!==null;)cm(a,u,d),a=a.sibling}var wr=null,si=!1;function oi(a,u,d){for(d=d.child;d!==null;)dm(a,u,d),d=d.sibling}function dm(a,u,d){if(Zn&&typeof Zn.onCommitFiberUnmount=="function")try{Zn.onCommitFiberUnmount(Ih,d)}catch{}switch(d.tag){case 5:cr||ua(d,u);case 6:if(ue){var g=wr,y=si;wr=null,oi(a,u,d),si=y,(wr=g)!==null&&(si?Pn(wr,d.stateNode):Cn(wr,d.stateNode))}else oi(a,u,d);break;case 18:ue&&wr!==null&&(si?Ah(wr,d.stateNode):El(wr,d.stateNode));break;case 4:ue?(g=wr,y=si,wr=d.stateNode.containerInfo,si=!0,oi(a,u,d),wr=g,si=y):(Ee&&(g=d.stateNode.containerInfo,y=mh(g),vl(g,y)),oi(a,u,d));break;case 0:case 11:case 14:case 15:if(!cr&&(g=d.updateQueue)!==null&&(g=g.lastEffect)!==null){y=g=g.next;do{var w=y,C=w.destroy;w=w.tag,C!==void 0&&(2&w||4&w)&&C1(d,u,C),y=y.next}while(y!==g)}oi(a,u,d);break;case 1:if(!cr&&(ua(d,u),typeof(g=d.stateNode).componentWillUnmount=="function"))try{g.props=d.memoizedProps,g.state=d.memoizedState,g.componentWillUnmount()}catch(I){ut(d,u,I)}oi(a,u,d);break;case 21:oi(a,u,d);break;case 22:1&d.mode?(cr=(g=cr)||d.memoizedState!==null,oi(a,u,d),cr=g):oi(a,u,d);break;default:oi(a,u,d)}}function k1(a){var u=a.updateQueue;if(u!==null){a.updateQueue=null;var d=a.stateNode;d===null&&(d=a.stateNode=new I2),u.forEach(function(g){var y=F2.bind(null,a,g);d.has(g)||(d.add(g),g.then(y,y))})}}function Nn(a,u){var d=u.deletions;if(d!==null)for(var g=0;g<d.length;g++){var y=d[g];try{var w=a,C=u;if(ue){var I=C;e:for(;I!==null;){switch(I.tag){case 5:wr=I.stateNode,si=!1;break e;case 3:case 4:wr=I.stateNode.containerInfo,si=!0;break e}I=I.return}if(wr===null)throw Error(s(160));dm(w,C,y),wr=null,si=!1}else dm(w,C,y);var F=y.alternate;F!==null&&(F.return=null),y.return=null}catch(j){ut(y,u,j)}}if(12854&u.subtreeFlags)for(u=u.child;u!==null;)N1(u,a),u=u.sibling}function N1(a,u){var d=a.alternate,g=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:if(Nn(u,a),ai(a),4&g){try{Bl(3,a,a.return),Zh(3,a)}catch(V){ut(a,a.return,V)}try{Bl(5,a,a.return)}catch(V){ut(a,a.return,V)}}break;case 1:Nn(u,a),ai(a),512&g&&d!==null&&ua(d,d.return);break;case 5:if(Nn(u,a),ai(a),512&g&&d!==null&&ua(d,d.return),ue){if(32&a.flags){var y=a.stateNode;try{vr(y)}catch(V){ut(a,a.return,V)}}if(4&g&&(y=a.stateNode)!=null){var w=a.memoizedProps;if(d=d!==null?d.memoizedProps:w,g=a.type,u=a.updateQueue,a.updateQueue=null,u!==null)try{lr(y,u,g,d,w,a)}catch(V){ut(a,a.return,V)}}}break;case 6:if(Nn(u,a),ai(a),4&g&&ue){if(a.stateNode===null)throw Error(s(162));y=a.stateNode,w=a.memoizedProps,d=d!==null?d.memoizedProps:w;try{Tt(y,d,w)}catch(V){ut(a,a.return,V)}}break;case 3:if(Nn(u,a),ai(a),4&g){if(ue&&Re&&d!==null&&d.memoizedState.isDehydrated)try{Th(u.containerInfo)}catch(V){ut(a,a.return,V)}if(Ee){y=u.containerInfo,w=u.pendingChildren;try{vl(y,w)}catch(V){ut(a,a.return,V)}}}break;case 4:if(Nn(u,a),ai(a),4&g&&Ee){y=(w=a.stateNode).containerInfo,w=w.pendingChildren;try{vl(y,w)}catch(V){ut(a,a.return,V)}}break;case 13:Nn(u,a),ai(a),8192&(y=a.child).flags&&(w=y.memoizedState!==null,y.stateNode.isHidden=w,!w||y.alternate!==null&&y.alternate.memoizedState!==null||(_m=Gt())),4&g&&k1(a);break;case 22:var C=d!==null&&d.memoizedState!==null;if(1&a.mode?(cr=(d=cr)||C,Nn(u,a),cr=d):Nn(u,a),ai(a),8192&g){if(d=a.memoizedState!==null,(a.stateNode.isHidden=d)&&!C&&(1&a.mode)!=0)for(ge=a,g=a.child;g!==null;){for(u=ge=g;ge!==null;){var I=(C=ge).child;switch(C.tag){case 0:case 11:case 14:case 15:Bl(4,C,C.return);break;case 1:ua(C,C.return);var F=C.stateNode;if(typeof F.componentWillUnmount=="function"){var j=C,Y=C.return;try{var oe=j;F.props=oe.memoizedProps,F.state=oe.memoizedState,F.componentWillUnmount()}catch(V){ut(j,Y,V)}}break;case 5:ua(C,C.return);break;case 22:if(C.memoizedState!==null){F1(u);continue}}I!==null?(I.return=C,ge=I):F1(u)}g=g.sibling}if(ue){e:if(g=null,ue)for(u=a;;){if(u.tag===5){if(g===null){g=u;try{y=u.stateNode,d?jr(y):$r(u.stateNode,u.memoizedProps)}catch(V){ut(a,a.return,V)}}}else if(u.tag===6){if(g===null)try{w=u.stateNode,d?_r(w):sn(w,u.memoizedProps)}catch(V){ut(a,a.return,V)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===a)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===a)break e;for(;u.sibling===null;){if(u.return===null||u.return===a)break e;g===u&&(g=null),u=u.return}g===u&&(g=null),u.sibling.return=u.return,u=u.sibling}}}break;case 19:Nn(u,a),ai(a),4&g&&k1(a);break;case 21:break;default:Nn(u,a),ai(a)}}function ai(a){var u=a.flags;if(2&u){try{if(ue){e:{for(var d=a.return;d!==null;){if(R1(d)){var g=d;break e}d=d.return}throw Error(s(160))}switch(g.tag){case 5:var y=g.stateNode;32&g.flags&&(vr(y),g.flags&=-33),cm(a,M1(a),y);break;case 3:case 4:var w=g.stateNode.containerInfo;hm(a,M1(a),w);break;default:throw Error(s(161))}}}catch(C){ut(a,a.return,C)}a.flags&=-3}4096&u&&(a.flags&=-4097)}function R2(a,u,d){ge=a,D1(a)}function D1(a,u,d){for(var g=(1&a.mode)!=0;ge!==null;){var y=ge,w=y.child;if(y.tag===22&&g){var C=y.memoizedState!==null||qh;if(!C){var I=y.alternate,F=I!==null&&I.memoizedState!==null||cr;I=qh;var j=cr;if(qh=C,(cr=F)&&!j)for(ge=y;ge!==null;)F=(C=ge).child,C.tag===22&&C.memoizedState!==null?B1(y):F!==null?(F.return=C,ge=F):B1(y);for(;w!==null;)ge=w,D1(w),w=w.sibling;ge=y,qh=I,cr=j}O1(a)}else 8772&y.subtreeFlags&&w!==null?(w.return=y,ge=w):O1(a)}}function O1(a){for(;ge!==null;){var u=ge;if(8772&u.flags){var d=u.alternate;try{if(8772&u.flags)switch(u.tag){case 0:case 11:case 15:cr||Zh(5,u);break;case 1:var g=u.stateNode;if(4&u.flags&&!cr)if(d===null)g.componentDidMount();else{var y=u.elementType===u.type?d.memoizedProps:kn(u.type,d.memoizedProps);g.componentDidUpdate(y,d.memoizedState,g.__reactInternalSnapshotBeforeUpdate)}var w=u.updateQueue;w!==null&&N_(u,w,g);break;case 3:var C=u.updateQueue;if(C!==null){if(d=null,u.child!==null)switch(u.child.tag){case 5:d=_e(u.child.stateNode);break;case 1:d=u.child.stateNode}N_(u,C,d)}break;case 5:var I=u.stateNode;d===null&&4&u.flags&&Hr(I,u.type,u.memoizedProps,u);break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(Re&&u.memoizedState===null){var F=u.alternate;if(F!==null){var j=F.memoizedState;if(j!==null){var Y=j.dehydrated;Y!==null&&Be(Y)}}}break;default:throw Error(s(163))}cr||512&u.flags&&um(u)}catch(oe){ut(u,u.return,oe)}}if(u===a){ge=null;break}if((d=u.sibling)!==null){d.return=u.return,ge=d;break}ge=u.return}}function F1(a){for(;ge!==null;){var u=ge;if(u===a){ge=null;break}var d=u.sibling;if(d!==null){d.return=u.return,ge=d;break}ge=u.return}}function B1(a){for(;ge!==null;){var u=ge;try{switch(u.tag){case 0:case 11:case 15:var d=u.return;try{Zh(4,u)}catch(F){ut(u,d,F)}break;case 1:var g=u.stateNode;if(typeof g.componentDidMount=="function"){var y=u.return;try{g.componentDidMount()}catch(F){ut(u,y,F)}}var w=u.return;try{um(u)}catch(F){ut(u,w,F)}break;case 5:var C=u.return;try{um(u)}catch(F){ut(u,C,F)}}}catch(F){ut(u,u.return,F)}if(u===a){ge=null;break}var I=u.sibling;if(I!==null){I.return=u.return,ge=I;break}ge=u.return}}var Jh=0,ec=1,tc=2,rc=3,nc=4;if(typeof Symbol=="function"&&Symbol.for){var Ll=Symbol.for;Jh=Ll("selector.component"),ec=Ll("selector.has_pseudo_class"),tc=Ll("selector.role"),rc=Ll("selector.test_id"),nc=Ll("selector.text")}function fm(a){var u=Ke(a);if(u!=null){if(typeof u.memoizedProps["data-testname"]!="string")throw Error(s(364));return u}if((a=Dt(a))===null)throw Error(s(362));return a.stateNode.current}function pm(a,u){switch(u.$$typeof){case Jh:if(a.type===u.value)return!0;break;case ec:e:{u=u.value,a=[a,0];for(var d=0;d<a.length;){var g=a[d++],y=a[d++],w=u[y];if(g.tag!==5||!bt(g)){for(;w!=null&&pm(g,w);)w=u[++y];if(y===u.length){u=!0;break e}for(g=g.child;g!==null;)a.push(g,y),g=g.sibling}}u=!1}return u;case tc:if(a.tag===5&&qe(a.stateNode,u.value))return!0;break;case nc:if((a.tag===5||a.tag===6)&&(a=Pr(a))!==null&&0<=a.indexOf(u.value))return!0;break;case rc:if(a.tag===5&&typeof(a=a.memoizedProps["data-testname"])=="string"&&a.toLowerCase()===u.value.toLowerCase())return!0;break;default:throw Error(s(365))}return!1}function mm(a){switch(a.$$typeof){case Jh:return"<"+(L(a.value)||"Unknown")+">";case ec:return":has("+(mm(a)||"")+")";case tc:return'[role="'+a.value+'"]';case nc:return'"'+a.value+'"';case rc:return'[data-testname="'+a.value+'"]';default:throw Error(s(365))}}function L1(a,u){var d=[];a=[a,0];for(var g=0;g<a.length;){var y=a[g++],w=a[g++],C=u[w];if(y.tag!==5||!bt(y)){for(;C!=null&&pm(y,C);)C=u[++w];if(w===u.length)d.push(y);else for(y=y.child;y!==null;)a.push(y,w),y=y.sibling}}return d}function gm(a,u){if(!Xe)throw Error(s(363));a=L1(a=fm(a),u),u=[],a=Array.from(a);for(var d=0;d<a.length;){var g=a[d++];if(g.tag===5)bt(g)||u.push(g.stateNode);else for(g=g.child;g!==null;)a.push(g),g=g.sibling}return u}var M2=Math.ceil,ic=o.ReactCurrentDispatcher,ym=o.ReactCurrentOwner,Ct=o.ReactCurrentBatchConfig,He=0,$t=null,Mt=null,Zt=0,Xr=0,ha=us(0),Ot=0,Ul=null,co=0,sc=0,vm=0,zl=null,Yr=null,_m=0,xm=1/0,fs=null;function ca(){xm=Gt()+500}var U1,oc=!1,wm=null,ps=null,ac=!1,ms=null,lc=0,Gl=0,Em=null,uc=-1,hc=0;function dr(){return 6&He?Gt():uc!==-1?uc:uc=Gt()}function gs(a){return 1&a.mode?2&He&&Zt!==0?Zt&-Zt:g2.transition!==null?(hc===0&&(hc=__()),hc):(a=We)!==0?a:vt():1}function dn(a,u,d,g){if(50<Gl)throw Gl=0,Em=null,Error(s(185));Tl(a,d,g),2&He&&a===$t||(a===$t&&(!(2&He)&&(sc|=d),Ot===4&&ys(a,Zt)),Nr(a,g),d===1&&He===0&&!(1&u.mode)&&(ca(),Rh&&Jn()))}function Nr(a,u){var d=a.callbackNode;(function(y,w){for(var C=y.suspendedLanes,I=y.pingedLanes,F=y.expirationTimes,j=y.pendingLanes;0<j;){var Y=31-In(j),oe=1<<Y,V=F[Y];V===-1?oe&C&&!(oe&I)||(F[Y]=c2(oe,w)):V<=w&&(y.expiredLanes|=oe),j&=~oe}})(a,u);var g=Ph(a,a===$t?Zt:0);if(g===0)d!==null&&w_(d),a.callbackNode=null,a.callbackPriority=0;else if(u=g&-g,a.callbackPriority!==u){if(d!=null&&w_(d),u===1)a.tag===0?function(y){Rh=!0,S_(y)}(G1.bind(null,a)):S_(G1.bind(null,a)),Oe?Me(function(){!(6&He)&&Jn()}):Cp(Pp,Jn),d=null;else{switch(x_(g)){case 1:d=Pp;break;case 4:d=p2;break;case 16:default:d=E_;break;case 536870912:d=m2}d=Q1(d,z1.bind(null,a))}a.callbackPriority=u,a.callbackNode=d}}function z1(a,u){if(uc=-1,hc=0,(6&He)!=0)throw Error(s(327));var d=a.callbackNode;if(po()&&a.callbackNode!==d)return null;var g=Ph(a,a===$t?Zt:0);if(g===0)return null;if(30&g||g&a.expiredLanes||u)u=cc(a,g);else{u=g;var y=He;He|=2;var w=$1();for($t===a&&Zt===u||(fs=null,ca(),fo(a,u));;)try{N2();break}catch(I){j1(a,I)}Fp(),ic.current=w,He=y,Mt!==null?u=0:($t=null,Zt=0,u=Ot)}if(u!==0){if(u===2&&(y=bp(a))!==0&&(g=y,u=Sm(a,y)),u===1)throw d=Ul,fo(a,0),ys(a,g),Nr(a,Gt()),d;if(u===6)ys(a,g);else{if(y=a.current.alternate,(30&g)==0&&!function(I){for(var F=I;;){if(16384&F.flags){var j=F.updateQueue;if(j!==null&&(j=j.stores)!==null)for(var Y=0;Y<j.length;Y++){var oe=j[Y],V=oe.getSnapshot;oe=oe.value;try{if(!Rn(V(),oe))return!1}catch{return!1}}}if(j=F.child,16384&F.subtreeFlags&&j!==null)j.return=F,F=j;else{if(F===I)break;for(;F.sibling===null;){if(F.return===null||F.return===I)return!0;F=F.return}F.sibling.return=F.return,F=F.sibling}}return!0}(y)&&((u=cc(a,g))===2&&(w=bp(a))!==0&&(g=w,u=Sm(a,w)),u===1))throw d=Ul,fo(a,0),ys(a,g),Nr(a,Gt()),d;switch(a.finishedWork=y,a.finishedLanes=g,u){case 0:case 1:throw Error(s(345));case 2:case 5:da(a,Yr,fs);break;case 3:if(ys(a,g),(130023424&g)===g&&10<(u=_m+500-Gt())){if(Ph(a,0)!==0)break;if(((y=a.suspendedLanes)&g)!==g){dr(),a.pingedLanes|=a.suspendedLanes&y;break}a.timeoutHandle=Te(da.bind(null,a,Yr,fs),u);break}da(a,Yr,fs);break;case 4:if(ys(a,g),(4194240&g)===g)break;for(u=a.eventTimes,y=-1;0<g;){var C=31-In(g);w=1<<C,(C=u[C])>y&&(y=C),g&=~w}if(g=y,10<(g=(120>(g=Gt()-g)?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*M2(g/1960))-g)){a.timeoutHandle=Te(da.bind(null,a,Yr,fs),g);break}da(a,Yr,fs);break;default:throw Error(s(329))}}}return Nr(a,Gt()),a.callbackNode===d?z1.bind(null,a):null}function Sm(a,u){var d=zl;return a.current.memoizedState.isDehydrated&&(fo(a,u).flags|=256),(a=cc(a,u))!==2&&(u=Yr,Yr=d,u!==null&&bm(u)),a}function bm(a){Yr===null?Yr=a:Yr.push.apply(Yr,a)}function ys(a,u){for(u&=~vm,u&=~sc,a.suspendedLanes|=u,a.pingedLanes&=~u,a=a.expirationTimes;0<u;){var d=31-In(u),g=1<<d;a[d]=-1,u&=~g}}function G1(a){if(6&He)throw Error(s(327));po();var u=Ph(a,0);if(!(1&u))return Nr(a,Gt()),null;var d=cc(a,u);if(a.tag!==0&&d===2){var g=bp(a);g!==0&&(u=g,d=Sm(a,g))}if(d===1)throw d=Ul,fo(a,0),ys(a,u),Nr(a,Gt()),d;if(d===6)throw Error(s(345));return a.finishedWork=a.current.alternate,a.finishedLanes=u,da(a,Yr,fs),Nr(a,Gt()),null}function H1(a){ms!==null&&ms.tag===0&&!(6&He)&&po();var u=He;He|=1;var d=Ct.transition,g=We;try{if(Ct.transition=null,We=1,a)return a()}finally{We=g,Ct.transition=d,!(6&(He=u))&&Jn()}}function Tm(){Xr=ha.current,at(ha)}function fo(a,u){a.finishedWork=null,a.finishedLanes=0;var d=a.timeoutHandle;if(d!==pe&&(a.timeoutHandle=pe,Ce(d)),Mt!==null)for(d=Mt.return;d!==null;){var g=d;switch(Mp(g),g.tag){case 1:(g=g.type.childContextTypes)!=null&&wp();break;case 3:aa(),at(Rr),at(ur),Vp();break;case 5:$p(g);break;case 4:aa();break;case 13:case 19:at(_t);break;case 10:Bp(g.type._context);break;case 22:case 23:Tm()}d=d.return}if($t=a,Mt=a=vs(a.current,null),Zt=Xr=u,Ot=0,Ul=null,vm=sc=co=0,Yr=zl=null,uo!==null){for(u=0;u<uo.length;u++)if((g=(d=uo[u]).interleaved)!==null){d.interleaved=null;var y=g.next,w=d.pending;if(w!==null){var C=w.next;w.next=y,g.next=C}d.pending=g}uo=null}return a}function j1(a,u){for(;;){var d=Mt;try{if(Fp(),Hh.current=Vh,jh){for(var g=dt.memoizedState;g!==null;){var y=g.queue;y!==null&&(y.pending=null),g=g.next}jh=!1}if(ho=0,jt=Ht=dt=null,Rl=!1,Ml=0,ym.current=null,d===null||d.return===null){Ot=1,Ul=u,Mt=null;break}e:{var w=a,C=d.return,I=d,F=u;if(u=Zt,I.flags|=32768,F!==null&&typeof F=="object"&&typeof F.then=="function"){var j=F,Y=I,oe=Y.tag;if(!(1&Y.mode)&&(oe===0||oe===11||oe===15)){var V=Y.alternate;V?(Y.updateQueue=V.updateQueue,Y.memoizedState=V.memoizedState,Y.lanes=V.lanes):(Y.updateQueue=null,Y.memoizedState=null)}var te=d1(C);if(te!==null){te.flags&=-257,f1(te,C,I,0,u),1&te.mode&&c1(w,j,u),F=j;var xe=(u=te).updateQueue;if(xe===null){var Fe=new Set;Fe.add(F),u.updateQueue=Fe}else xe.add(F);break e}if(!(1&u)){c1(w,j,u),Am();break e}F=Error(s(426))}else if(lt&&1&I.mode){var Q=d1(C);if(Q!==null){!(65536&Q.flags)&&(Q.flags|=256),f1(Q,C,I,0,u),Dp(la(F,I));break e}}w=F=la(F,I),Ot!==4&&(Ot=2),zl===null?zl=[w]:zl.push(w),w=C;do{switch(w.tag){case 3:w.flags|=65536,u&=-u,w.lanes|=u,k_(w,u1(0,F,u));break e;case 1:I=F;var k=w.type,G=w.stateNode;if(!(128&w.flags)&&(typeof k.getDerivedStateFromError=="function"||G!==null&&typeof G.componentDidCatch=="function"&&(ps===null||!ps.has(G)))){w.flags|=65536,u&=-u,w.lanes|=u,k_(w,h1(w,I,u));break e}}w=w.return}while(w!==null)}V1(d)}catch(Z){u=Z,Mt===d&&d!==null&&(Mt=d=d.return);continue}break}}function $1(){var a=ic.current;return ic.current=Vh,a===null?Vh:a}function Am(){Ot!==0&&Ot!==3&&Ot!==2||(Ot=4),$t===null||!(268435455&co)&&!(268435455&sc)||ys($t,Zt)}function cc(a,u){var d=He;He|=2;var g=$1();for($t===a&&Zt===u||(fs=null,fo(a,u));;)try{k2();break}catch(y){j1(a,y)}if(Fp(),He=d,ic.current=g,Mt!==null)throw Error(s(261));return $t=null,Zt=0,Ot}function k2(){for(;Mt!==null;)W1(Mt)}function N2(){for(;Mt!==null&&!d2();)W1(Mt)}function W1(a){var u=U1(a.alternate,a,Xr);a.memoizedProps=a.pendingProps,u===null?V1(a):Mt=u,ym.current=null}function V1(a){var u=a;do{var d=u.alternate;if(a=u.return,(32768&u.flags)==0){if((d=C2(d,u,Xr))!==null)return void(Mt=d)}else{if((d=P2(d,u))!==null)return d.flags&=32767,void(Mt=d);if(a===null)return Ot=6,void(Mt=null);a.flags|=32768,a.subtreeFlags=0,a.deletions=null}if((u=u.sibling)!==null)return void(Mt=u);Mt=u=a}while(u!==null);Ot===0&&(Ot=5)}function da(a,u,d){var g=We,y=Ct.transition;try{Ct.transition=null,We=1,function(w,C,I,F){do po();while(ms!==null);if(6&He)throw Error(s(327));I=w.finishedWork;var j=w.finishedLanes;if(I===null)return null;if(w.finishedWork=null,w.finishedLanes=0,I===w.current)throw Error(s(177));w.callbackNode=null,w.callbackPriority=0;var Y=I.lanes|I.childLanes;if(function(te,xe){var Fe=te.pendingLanes&~xe;te.pendingLanes=xe,te.suspendedLanes=0,te.pingedLanes=0,te.expiredLanes&=xe,te.mutableReadLanes&=xe,te.entangledLanes&=xe,xe=te.entanglements;var Q=te.eventTimes;for(te=te.expirationTimes;0<Fe;){var k=31-In(Fe),G=1<<k;xe[k]=0,Q[k]=-1,te[k]=-1,Fe&=~G}}(w,Y),w===$t&&(Mt=$t=null,Zt=0),!(2064&I.subtreeFlags)&&!(2064&I.flags)||ac||(ac=!0,Q1(E_,function(){return po(),null})),Y=(15990&I.flags)!=0,(15990&I.subtreeFlags)!=0||Y){Y=Ct.transition,Ct.transition=null;var oe=We;We=1;var V=He;He|=4,ym.current=null,function(te,xe){for(W(te.containerInfo),ge=xe;ge!==null;)if(xe=(te=ge).child,(1028&te.subtreeFlags)!=0&&xe!==null)xe.return=te,ge=xe;else for(;ge!==null;){te=ge;try{var Fe=te.alternate;if(1024&te.flags)switch(te.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(Fe!==null){var Q=Fe.memoizedProps,k=Fe.memoizedState,G=te.stateNode,Z=G.getSnapshotBeforeUpdate(te.elementType===te.type?Q:kn(te.type,Q),k);G.__reactInternalSnapshotBeforeUpdate=Z}break;case 3:ue&&Ko(te.stateNode.containerInfo);break;default:throw Error(s(163))}}catch(Pe){ut(te,te.return,Pe)}if((xe=te.sibling)!==null){xe.return=te.return,ge=xe;break}ge=te.return}Fe=P1,P1=!1}(w,I),N1(I,w),O(w.containerInfo),w.current=I,R2(I),f2(),He=V,We=oe,Ct.transition=Y}else w.current=I;if(ac&&(ac=!1,ms=w,lc=j),Y=w.pendingLanes,Y===0&&(ps=null),function(te){if(Zn&&typeof Zn.onCommitFiberRoot=="function")try{Zn.onCommitFiberRoot(Ih,te,void 0,(128&te.current.flags)==128)}catch{}}(I.stateNode),Nr(w,Gt()),C!==null)for(F=w.onRecoverableError,I=0;I<C.length;I++)j=C[I],F(j.value,{componentStack:j.stack,digest:j.digest});if(oc)throw oc=!1,w=wm,wm=null,w;1&lc&&w.tag!==0&&po(),Y=w.pendingLanes,1&Y?w===Em?Gl++:(Gl=0,Em=w):Gl=0,Jn()}(a,u,d,g)}finally{Ct.transition=y,We=g}return null}function po(){if(ms!==null){var a=x_(lc),u=Ct.transition,d=We;try{if(Ct.transition=null,We=16>a?16:a,ms===null)var g=!1;else{if(a=ms,ms=null,lc=0,(6&He)!=0)throw Error(s(331));var y=He;for(He|=4,ge=a.current;ge!==null;){var w=ge,C=w.child;if(16&ge.flags){var I=w.deletions;if(I!==null){for(var F=0;F<I.length;F++){var j=I[F];for(ge=j;ge!==null;){var Y=ge;switch(Y.tag){case 0:case 11:case 15:Bl(8,Y,w)}var oe=Y.child;if(oe!==null)oe.return=Y,ge=oe;else for(;ge!==null;){var V=(Y=ge).sibling,te=Y.return;if(I1(Y),Y===j){ge=null;break}if(V!==null){V.return=te,ge=V;break}ge=te}}}var xe=w.alternate;if(xe!==null){var Fe=xe.child;if(Fe!==null){xe.child=null;do{var Q=Fe.sibling;Fe.sibling=null,Fe=Q}while(Fe!==null)}}ge=w}}if(2064&w.subtreeFlags&&C!==null)C.return=w,ge=C;else e:for(;ge!==null;){if(2048&(w=ge).flags)switch(w.tag){case 0:case 11:case 15:Bl(9,w,w.return)}var k=w.sibling;if(k!==null){k.return=w.return,ge=k;break e}ge=w.return}}var G=a.current;for(ge=G;ge!==null;){var Z=(C=ge).child;if(2064&C.subtreeFlags&&Z!==null)Z.return=C,ge=Z;else e:for(C=G;ge!==null;){if(2048&(I=ge).flags)try{switch(I.tag){case 0:case 11:case 15:Zh(9,I)}}catch(Ye){ut(I,I.return,Ye)}if(I===C){ge=null;break e}var Pe=I.sibling;if(Pe!==null){Pe.return=I.return,ge=Pe;break e}ge=I.return}}if(He=y,Jn(),Zn&&typeof Zn.onPostCommitFiberRoot=="function")try{Zn.onPostCommitFiberRoot(Ih,a)}catch{}g=!0}return g}finally{We=d,Ct.transition=u}}return!1}function X1(a,u,d){a=ds(a,u=u1(0,u=la(d,u),1),1),u=dr(),a!==null&&(Tl(a,1,u),Nr(a,u))}function ut(a,u,d){if(a.tag===3)X1(a,a,d);else for(;u!==null;){if(u.tag===3){X1(u,a,d);break}if(u.tag===1){var g=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(ps===null||!ps.has(g))){u=ds(u,a=h1(u,a=la(d,a),1),1),a=dr(),u!==null&&(Tl(u,1,a),Nr(u,a));break}}u=u.return}}function D2(a,u,d){var g=a.pingCache;g!==null&&g.delete(u),u=dr(),a.pingedLanes|=a.suspendedLanes&d,$t===a&&(Zt&d)===d&&(Ot===4||Ot===3&&(130023424&Zt)===Zt&&500>Gt()-_m?fo(a,0):vm|=d),Nr(a,u)}function Y1(a,u){u===0&&(1&a.mode?(u=Sp,!(130023424&(Sp<<=1))&&(Sp=4194304)):u=1);var d=dr();(a=ti(a,u))!==null&&(Tl(a,u,d),Nr(a,d))}function O2(a){var u=a.memoizedState,d=0;u!==null&&(d=u.retryLane),Y1(a,d)}function F2(a,u){var d=0;switch(a.tag){case 13:var g=a.stateNode,y=a.memoizedState;y!==null&&(d=y.retryLane);break;case 19:g=a.stateNode;break;default:throw Error(s(314))}g!==null&&g.delete(u),Y1(a,d)}function Q1(a,u){return Cp(a,u)}function B2(a,u,d,g){this.tag=a,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fn(a,u,d,g){return new B2(a,u,d,g)}function Cm(a){return!(!(a=a.prototype)||!a.isReactComponent)}function vs(a,u){var d=a.alternate;return d===null?((d=fn(a.tag,u,a.key,a.mode)).elementType=a.elementType,d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=u,d.type=a.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=14680064&a.flags,d.childLanes=a.childLanes,d.lanes=a.lanes,d.child=a.child,d.memoizedProps=a.memoizedProps,d.memoizedState=a.memoizedState,d.updateQueue=a.updateQueue,u=a.dependencies,d.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},d.sibling=a.sibling,d.index=a.index,d.ref=a.ref,d}function dc(a,u,d,g,y,w){var C=2;if(g=a,typeof a=="function")Cm(a)&&(C=1);else if(typeof a=="string")C=5;else e:switch(a){case c:return mo(d.children,y,w,u);case f:C=8,y|=8;break;case m:return(a=fn(12,d,u,2|y)).elementType=m,a.lanes=w,a;case E:return(a=fn(13,d,u,y)).elementType=E,a.lanes=w,a;case T:return(a=fn(19,d,u,y)).elementType=T,a.lanes=w,a;case x:return fc(d,y,w,u);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case p:C=10;break e;case v:C=9;break e;case _:C=11;break e;case S:C=14;break e;case b:C=16,g=null;break e}throw Error(s(130,a==null?a:typeof a,""))}return(u=fn(C,d,u,y)).elementType=a,u.type=g,u.lanes=w,u}function mo(a,u,d,g){return(a=fn(7,a,g,u)).lanes=d,a}function fc(a,u,d,g){return(a=fn(22,a,g,u)).elementType=x,a.lanes=d,a.stateNode={isHidden:!1},a}function Pm(a,u,d){return(a=fn(6,a,null,u)).lanes=d,a}function Im(a,u,d){return(u=fn(4,a.children!==null?a.children:[],a.key,u)).lanes=d,u.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},u}function L2(a,u,d,g,y){this.tag=u,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=pe,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Tp(0),this.expirationTimes=Tp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tp(0),this.identifierPrefix=g,this.onRecoverableError=y,Re&&(this.mutableSourceEagerHydrationData=null)}function K1(a,u,d,g,y,w,C,I,F){return a=new L2(a,u,d,I,F),u===1?(u=1,w===!0&&(u|=8)):u=0,w=fn(3,null,null,u),a.current=w,w.stateNode=a,w.memoizedState={element:g,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},zp(w),a}function q1(a){if(!a)return hs;e:{if(D(a=a._reactInternals)!==a||a.tag!==1)throw Error(s(170));var u=a;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(Wr(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(u!==null);throw Error(s(171))}if(a.tag===1){var d=a.type;if(Wr(d))return y_(a,d,u)}return u}function Z1(a){var u=a._reactInternals;if(u===void 0)throw typeof a.render=="function"?Error(s(188)):(a=Object.keys(a).join(","),Error(s(268,a)));return(a=me(u))===null?null:a.stateNode}function J1(a,u){if((a=a.memoizedState)!==null&&a.dehydrated!==null){var d=a.retryLane;a.retryLane=d!==0&&d<u?d:u}}function pc(a,u){J1(a,u),(a=a.alternate)&&J1(a,u)}function U2(a){return(a=me(a))===null?null:a.stateNode}function z2(){return null}return U1=function(a,u,d){if(a!==null)if(a.memoizedProps!==u.pendingProps||Rr.current)Mr=!0;else{if(!(a.lanes&d)&&!(128&u.flags))return Mr=!1,function(oe,V,te){switch(V.tag){case 3:x1(V),ra();break;case 5:G_(V);break;case 1:Wr(V.type)&&Ch(V);break;case 4:jp(V,V.stateNode.containerInfo);break;case 10:I_(0,V.type._context,V.memoizedProps.value);break;case 13:var xe=V.memoizedState;if(xe!==null)return xe.dehydrated!==null?(Je(_t,1&_t.current),V.flags|=128,null):te&V.child.childLanes?E1(oe,V,te):(Je(_t,1&_t.current),(oe=Bi(oe,V,te))!==null?oe.sibling:null);Je(_t,1&_t.current);break;case 19:if(xe=(te&V.childLanes)!=0,(128&oe.flags)!=0){if(xe)return b1(oe,V,te);V.flags|=128}var Fe=V.memoizedState;if(Fe!==null&&(Fe.rendering=null,Fe.tail=null,Fe.lastEffect=null),Je(_t,_t.current),xe)break;return null;case 22:case 23:return V.lanes=0,y1(oe,V,te)}return Bi(oe,V,te)}(a,u,d);Mr=(131072&a.flags)!=0}else Mr=!1,lt&&1048576&u.flags&&b_(u,kh,u.index);switch(u.lanes=0,u.tag){case 2:var g=u.type;Kh(a,u),a=u.pendingProps;var y=Jo(u,ur.current);ia(u,d),y=Qp(null,u,g,a,y,d);var w=Kp();return u.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(u.tag=1,u.memoizedState=null,u.updateQueue=null,Wr(g)?(w=!0,Ch(u)):w=!1,u.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,zp(u),y.updater=Uh,u.stateNode=y,y._reactInternals=u,Hp(u,g,a,d),u=im(null,u,g,!0,w,d)):(u.tag=0,lt&&w&&Rp(u),kr(null,u,y,d),u=u.child),u;case 16:g=u.elementType;e:{switch(Kh(a,u),a=u.pendingProps,g=(y=g._init)(g._payload),u.type=g,y=u.tag=function(oe){if(typeof oe=="function")return Cm(oe)?1:0;if(oe!=null){if((oe=oe.$$typeof)===_)return 11;if(oe===S)return 14}return 2}(g),a=kn(g,a),y){case 0:u=nm(null,u,g,a,d);break e;case 1:u=_1(null,u,g,a,d);break e;case 11:u=p1(null,u,g,a,d);break e;case 14:u=m1(null,u,g,kn(g.type,a),d);break e}throw Error(s(306,g,""))}return u;case 0:return g=u.type,y=u.pendingProps,nm(a,u,g,y=u.elementType===g?y:kn(g,y),d);case 1:return g=u.type,y=u.pendingProps,_1(a,u,g,y=u.elementType===g?y:kn(g,y),d);case 3:e:{if(x1(u),a===null)throw Error(s(387));g=u.pendingProps,y=(w=u.memoizedState).element,M_(a,u),Lh(u,g,null,d);var C=u.memoizedState;if(g=C.element,Re&&w.isDehydrated){if(w={element:g,isDehydrated:!1,cache:C.cache,pendingSuspenseBoundaries:C.pendingSuspenseBoundaries,transitions:C.transitions},u.updateQueue.baseState=w,u.memoizedState=w,256&u.flags){u=w1(a,u,g,d,y=la(Error(s(423)),u));break e}if(g!==y){u=w1(a,u,g,d,y=la(Error(s(424)),u));break e}for(Re&&(ln=Eh(u.stateNode.containerInfo),Vr=u,lt=!0,Mn=null,Al=!1),d=z_(u,null,g,d),u.child=d;d;)d.flags=-3&d.flags|4096,d=d.sibling}else{if(ra(),g===y){u=Bi(a,u,d);break e}kr(a,u,g,d)}u=u.child}return u;case 5:return G_(u),a===null&&Np(u),g=u.type,y=u.pendingProps,w=a!==null?a.memoizedProps:null,C=y.children,ve(g,y)?C=null:w!==null&&ve(g,w)&&(u.flags|=32),v1(a,u),kr(a,u,C,d),u.child;case 6:return a===null&&Np(u),null;case 13:return E1(a,u,d);case 4:return jp(u,u.stateNode.containerInfo),g=u.pendingProps,a===null?u.child=sa(u,null,g,d):kr(a,u,g,d),u.child;case 11:return g=u.type,y=u.pendingProps,p1(a,u,g,y=u.elementType===g?y:kn(g,y),d);case 7:return kr(a,u,u.pendingProps,d),u.child;case 8:case 12:return kr(a,u,u.pendingProps.children,d),u.child;case 10:e:{if(g=u.type._context,y=u.pendingProps,w=u.memoizedProps,I_(0,g,C=y.value),w!==null)if(Rn(w.value,C)){if(w.children===y.children&&!Rr.current){u=Bi(a,u,d);break e}}else for((w=u.child)!==null&&(w.return=u);w!==null;){var I=w.dependencies;if(I!==null){C=w.child;for(var F=I.firstContext;F!==null;){if(F.context===g){if(w.tag===1){(F=Fi(-1,d&-d)).tag=2;var j=w.updateQueue;if(j!==null){var Y=(j=j.shared).pending;Y===null?F.next=F:(F.next=Y.next,Y.next=F),j.pending=F}}w.lanes|=d,(F=w.alternate)!==null&&(F.lanes|=d),Lp(w.return,d,u),I.lanes|=d;break}F=F.next}}else if(w.tag===10)C=w.type===u.type?null:w.child;else if(w.tag===18){if((C=w.return)===null)throw Error(s(341));C.lanes|=d,(I=C.alternate)!==null&&(I.lanes|=d),Lp(C,d,u),C=w.sibling}else C=w.child;if(C!==null)C.return=w;else for(C=w;C!==null;){if(C===u){C=null;break}if((w=C.sibling)!==null){w.return=C.return,C=w;break}C=C.return}w=C}kr(a,u,y.children,d),u=u.child}return u;case 9:return y=u.type,g=u.pendingProps.children,ia(u,d),g=g(y=un(y)),u.flags|=1,kr(a,u,g,d),u.child;case 14:return y=kn(g=u.type,u.pendingProps),m1(a,u,g,y=kn(g.type,y),d);case 15:return g1(a,u,u.type,u.pendingProps,d);case 17:return g=u.type,y=u.pendingProps,y=u.elementType===g?y:kn(g,y),Kh(a,u),u.tag=1,Wr(g)?(a=!0,Ch(u)):a=!1,ia(u,d),F_(u,g,y),Hp(u,g,y,d),im(null,u,g,!0,a,d);case 19:return b1(a,u,d);case 22:return y1(a,u,d)}throw Error(s(156,u.tag))},e.attemptContinuousHydration=function(a){if(a.tag===13){var u=ti(a,134217728);u!==null&&dn(u,a,134217728,dr()),pc(a,134217728)}},e.attemptDiscreteHydration=function(a){if(a.tag===13){var u=ti(a,1);u!==null&&dn(u,a,1,dr()),pc(a,1)}},e.attemptHydrationAtCurrentPriority=function(a){if(a.tag===13){var u=gs(a),d=ti(a,u);d!==null&&dn(d,a,u,dr()),pc(a,u)}},e.attemptSynchronousHydration=function(a){switch(a.tag){case 3:var u=a.stateNode;if(u.current.memoizedState.isDehydrated){var d=bl(u.pendingLanes);d!==0&&(Ap(u,1|d),Nr(u,Gt()),!(6&He)&&(ca(),Jn()))}break;case 13:H1(function(){var g=ti(a,1);if(g!==null){var y=dr();dn(g,a,1,y)}}),pc(a,1)}},e.batchedUpdates=function(a,u){var d=He;He|=1;try{return a(u)}finally{(He=d)===0&&(ca(),Rh&&Jn())}},e.createComponentSelector=function(a){return{$$typeof:Jh,value:a}},e.createContainer=function(a,u,d,g,y,w,C){return K1(a,u,!1,null,0,g,0,w,C)},e.createHasPseudoClassSelector=function(a){return{$$typeof:ec,value:a}},e.createHydrationContainer=function(a,u,d,g,y,w,C,I,F){return(a=K1(d,g,!0,a,0,w,0,I,F)).context=q1(null),d=a.current,(w=Fi(g=dr(),y=gs(d))).callback=u??null,ds(d,w,y),a.current.lanes=y,Tl(a,y,g),Nr(a,g),a},e.createPortal=function(a,u,d){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:g==null?null:""+g,children:a,containerInfo:u,implementation:d}},e.createRoleSelector=function(a){return{$$typeof:tc,value:a}},e.createTestNameSelector=function(a){return{$$typeof:rc,value:a}},e.createTextSelector=function(a){return{$$typeof:nc,value:a}},e.deferredUpdates=function(a){var u=We,d=Ct.transition;try{return Ct.transition=null,We=16,a()}finally{We=u,Ct.transition=d}},e.discreteUpdates=function(a,u,d,g,y){var w=We,C=Ct.transition;try{return Ct.transition=null,We=1,a(u,d,g,y)}finally{We=w,Ct.transition=C,He===0&&ca()}},e.findAllNodes=gm,e.findBoundingRects=function(a,u){if(!Xe)throw Error(s(363));u=gm(a,u),a=[];for(var d=0;d<u.length;d++)a.push(yr(u[d]));for(u=a.length-1;0<u;u--)for(var g=(d=a[u]).x,y=g+d.width,w=d.y,C=w+d.height,I=u-1;0<=I;I--)if(u!==I){var F=a[I],j=F.x,Y=j+F.width,oe=F.y,V=oe+F.height;if(g>=j&&w>=oe&&y<=Y&&C<=V){a.splice(u,1);break}if(!(g!==j||d.width!==F.width||V<w||oe>C)){oe>w&&(F.height+=oe-w,F.y=w),V<C&&(F.height=C-oe),a.splice(u,1);break}if(!(w!==oe||d.height!==F.height||Y<g||j>y)){j>g&&(F.width+=j-g,F.x=g),Y<y&&(F.width=y-j),a.splice(u,1);break}}return a},e.findHostInstance=Z1,e.findHostInstanceWithNoPortals=function(a){return(a=(a=$(a))!==null?B(a):null)===null?null:a.stateNode},e.findHostInstanceWithWarning=function(a){return Z1(a)},e.flushControlled=function(a){var u=He;He|=1;var d=Ct.transition,g=We;try{Ct.transition=null,We=1,a()}finally{We=g,Ct.transition=d,(He=u)===0&&(ca(),Jn())}},e.flushPassiveEffects=po,e.flushSync=H1,e.focusWithin=function(a,u){if(!Xe)throw Error(s(363));for(u=L1(a=fm(a),u),u=Array.from(u),a=0;a<u.length;){var d=u[a++];if(!bt(d)){if(d.tag===5&&zt(d.stateNode))return!0;for(d=d.child;d!==null;)u.push(d),d=d.sibling}}return!1},e.getCurrentUpdatePriority=function(){return We},e.getFindAllNodesFailureDescription=function(a,u){if(!Xe)throw Error(s(363));var d=0,g=[];a=[fm(a),0];for(var y=0;y<a.length;){var w=a[y++],C=a[y++],I=u[C];if((w.tag!==5||!bt(w))&&(pm(w,I)&&(g.push(mm(I)),++C>d&&(d=C)),C<u.length))for(w=w.child;w!==null;)a.push(w,C),w=w.sibling}if(d<u.length){for(a=[];d<u.length;d++)a.push(mm(u[d]));return`findAllNodes was able to match part of the selector:
854
+ `+w.stack}return{value:a,source:u,stack:y,digest:null}}function tm(a,u,d){return{value:a,source:null,stack:d??null,digest:u??null}}function rm(a,u){try{console.error(u.value)}catch(d){setTimeout(function(){throw d})}}var T2=typeof WeakMap=="function"?WeakMap:Map;function u1(a,u,d){(d=Fi(-1,d)).tag=3,d.payload={element:null};var g=u.value;return d.callback=function(){oc||(oc=!0,wm=g),rm(0,u)},d}function h1(a,u,d){(d=Fi(-1,d)).tag=3;var g=a.type.getDerivedStateFromError;if(typeof g=="function"){var y=u.value;d.payload=function(){return g(y)},d.callback=function(){rm(0,u)}}var w=a.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(d.callback=function(){rm(0,u),typeof g!="function"&&(ps===null?ps=new Set([this]):ps.add(this));var C=u.stack;this.componentDidCatch(u.value,{componentStack:C!==null?C:""})}),d}function c1(a,u,d){var g=a.pingCache;if(g===null){g=a.pingCache=new T2;var y=new Set;g.set(u,y)}else(y=g.get(u))===void 0&&(y=new Set,g.set(u,y));y.has(d)||(y.add(d),a=D2.bind(null,a,u,d),u.then(a,a))}function d1(a){do{var u;if((u=a.tag===13)&&(u=(u=a.memoizedState)===null||u.dehydrated!==null),u)return a;a=a.return}while(a!==null);return null}function f1(a,u,d,g,y){return 1&a.mode?(a.flags|=65536,a.lanes=y,a):(a===u?a.flags|=65536:(a.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:((u=Fi(-1,1)).tag=2,ds(d,u,1))),d.lanes|=1),a)}var A2=o.ReactCurrentOwner,Mr=!1;function kr(a,u,d,g){u.child=a===null?z_(u,null,d,g):sa(u,a.child,d,g)}function p1(a,u,d,g,y){d=d.render;var w=u.ref;return ia(u,y),g=Qp(a,u,d,g,w,y),d=Kp(),a===null||Mr?(lt&&d&&Rp(u),u.flags|=1,kr(a,u,g,y),u.child):(u.updateQueue=a.updateQueue,u.flags&=-2053,a.lanes&=~y,Bi(a,u,y))}function m1(a,u,d,g,y){if(a===null){var w=d.type;return typeof w!="function"||Cm(w)||w.defaultProps!==void 0||d.compare!==null||d.defaultProps!==void 0?((a=dc(d.type,null,g,u,u.mode,y)).ref=u.ref,a.return=u,u.child=a):(u.tag=15,u.type=w,g1(a,u,w,g,y))}if(w=a.child,(a.lanes&y)==0){var C=w.memoizedProps;if((d=(d=d.compare)!==null?d:Dh)(C,g)&&a.ref===u.ref)return Bi(a,u,y)}return u.flags|=1,(a=vs(w,g)).ref=u.ref,a.return=u,u.child=a}function g1(a,u,d,g,y){if(a!==null){var w=a.memoizedProps;if(Dh(w,g)&&a.ref===u.ref){if(Mr=!1,u.pendingProps=g=w,(a.lanes&y)==0)return u.lanes=a.lanes,Bi(a,u,y);131072&a.flags&&(Mr=!0)}}return nm(a,u,d,g,y)}function y1(a,u,d){var g=u.pendingProps,y=g.children,w=a!==null?a.memoizedState:null;if(g.mode==="hidden")if(!(1&u.mode))u.memoizedState={baseLanes:0,cachePool:null,transitions:null},Je(ha,Xr),Xr|=d;else{if(!(1073741824&d))return a=w!==null?w.baseLanes|d:d,u.lanes=u.childLanes=1073741824,u.memoizedState={baseLanes:a,cachePool:null,transitions:null},u.updateQueue=null,Je(ha,Xr),Xr|=a,null;u.memoizedState={baseLanes:0,cachePool:null,transitions:null},g=w!==null?w.baseLanes:d,Je(ha,Xr),Xr|=g}else w!==null?(g=w.baseLanes|d,u.memoizedState=null):g=d,Je(ha,Xr),Xr|=g;return kr(a,u,y,d),u.child}function v1(a,u){var d=u.ref;(a===null&&d!==null||a!==null&&a.ref!==d)&&(u.flags|=512,u.flags|=2097152)}function nm(a,u,d,g,y){var w=Wr(d)?oo:ur.current;return w=Jo(u,w),ia(u,y),d=Qp(a,u,d,g,w,y),g=Kp(),a===null||Mr?(lt&&g&&Rp(u),u.flags|=1,kr(a,u,d,y),u.child):(u.updateQueue=a.updateQueue,u.flags&=-2053,a.lanes&=~y,Bi(a,u,y))}function _1(a,u,d,g,y){if(Wr(d)){var w=!0;Ch(u)}else w=!1;if(ia(u,y),u.stateNode===null)Kh(a,u),F_(u,d,g),Hp(u,d,g,y),g=!0;else if(a===null){var C=u.stateNode,I=u.memoizedProps;C.props=I;var B=C.context,j=d.contextType;typeof j=="object"&&j!==null?j=un(j):j=Jo(u,j=Wr(d)?oo:ur.current);var K=d.getDerivedStateFromProps,oe=typeof K=="function"||typeof C.getSnapshotBeforeUpdate=="function";oe||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(I!==g||B!==j)&&B_(u,C,g,j),cs=!1;var X=u.memoizedState;C.state=X,Lh(u,g,C,y),B=u.memoizedState,I!==g||X!==B||Rr.current||cs?(typeof K=="function"&&(Gp(u,d,K,g),B=u.memoizedState),(I=cs||O_(u,d,I,g,X,B,j))?(oe||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(u.flags|=4194308)):(typeof C.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=g,u.memoizedState=B),C.props=g,C.state=B,C.context=j,g=I):(typeof C.componentDidMount=="function"&&(u.flags|=4194308),g=!1)}else{C=u.stateNode,M_(a,u),I=u.memoizedProps,j=u.type===u.elementType?I:kn(u.type,I),C.props=j,oe=u.pendingProps,X=C.context,typeof(B=d.contextType)=="object"&&B!==null?B=un(B):B=Jo(u,B=Wr(d)?oo:ur.current);var re=d.getDerivedStateFromProps;(K=typeof re=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(I!==oe||X!==B)&&B_(u,C,g,B),cs=!1,X=u.memoizedState,C.state=X,Lh(u,g,C,y);var xe=u.memoizedState;I!==oe||X!==xe||Rr.current||cs?(typeof re=="function"&&(Gp(u,d,re,g),xe=u.memoizedState),(j=cs||O_(u,d,j,g,X,xe,B)||!1)?(K||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(g,xe,B),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(g,xe,B)),typeof C.componentDidUpdate=="function"&&(u.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof C.componentDidUpdate!="function"||I===a.memoizedProps&&X===a.memoizedState||(u.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||I===a.memoizedProps&&X===a.memoizedState||(u.flags|=1024),u.memoizedProps=g,u.memoizedState=xe),C.props=g,C.state=xe,C.context=B,g=j):(typeof C.componentDidUpdate!="function"||I===a.memoizedProps&&X===a.memoizedState||(u.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||I===a.memoizedProps&&X===a.memoizedState||(u.flags|=1024),g=!1)}return im(a,u,d,g,w,y)}function im(a,u,d,g,y,w){v1(a,u);var C=(128&u.flags)!=0;if(!g&&!C)return y&&v_(u,d,!1),Bi(a,u,w);g=u.stateNode,A2.current=u;var I=C&&typeof d.getDerivedStateFromError!="function"?null:g.render();return u.flags|=1,a!==null&&C?(u.child=sa(u,a.child,null,w),u.child=sa(u,null,I,w)):kr(a,u,I,w),u.memoizedState=g.state,y&&v_(u,d,!0),u.child}function x1(a){var u=a.stateNode;u.pendingContext?g_(0,u.pendingContext,u.pendingContext!==u.context):u.context&&g_(0,u.context,!1),jp(a,u.containerInfo)}function w1(a,u,d,g,y){return ra(),Dp(y),u.flags|=256,kr(a,u,d,g),u.child}var Dl,Ol,Xh,Yh,sm={dehydrated:null,treeContext:null,retryLane:0};function om(a){return{baseLanes:a,cachePool:null,transitions:null}}function E1(a,u,d){var g,y=u.pendingProps,w=_t.current,C=!1,I=(128&u.flags)!=0;if((g=I)||(g=(a===null||a.memoizedState!==null)&&(2&w)!=0),g?(C=!0,u.flags&=-129):a!==null&&a.memoizedState===null||(w|=1),Je(_t,1&w),a===null)return Np(u),(a=u.memoizedState)!==null&&(a=a.dehydrated)!==null?(1&u.mode?wl(a)?u.lanes=8:u.lanes=1073741824:u.lanes=1,null):(I=y.children,a=y.fallback,C?(y=u.mode,C=u.child,I={mode:"hidden",children:I},!(1&y)&&C!==null?(C.childLanes=0,C.pendingProps=I):C=fc(I,y,0,null),a=mo(a,y,d,null),C.return=u,a.return=u,C.sibling=a,u.child=C,u.child.memoizedState=om(d),u.memoizedState=sm,a):am(u,I));if((w=a.memoizedState)!==null&&(g=w.dehydrated)!==null)return function(j,K,oe,X,re,xe,Fe){if(oe)return 256&K.flags?(K.flags&=-257,Qh(j,K,Fe,X=tm(Error(s(422))))):K.memoizedState!==null?(K.child=j.child,K.flags|=128,null):(xe=X.fallback,re=K.mode,X=fc({mode:"visible",children:X.children},re,0,null),(xe=mo(xe,re,Fe,null)).flags|=2,X.return=K,xe.return=K,X.sibling=xe,K.child=X,1&K.mode&&sa(K,j.child,null,Fe),K.child.memoizedState=om(Fe),K.memoizedState=sm,xe);if(!(1&K.mode))return Qh(j,K,Fe,null);if(wl(re))return X=mp(re).digest,xe=Error(s(419)),X=tm(xe,X,void 0),Qh(j,K,Fe,X);if(oe=(Fe&j.childLanes)!=0,Mr||oe){if((X=$t)!==null){switch(Fe&-Fe){case 4:re=2;break;case 16:re=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:re=32;break;case 536870912:re=268435456;break;default:re=0}(re=re&(X.suspendedLanes|Fe)?0:re)!==0&&re!==xe.retryLane&&(xe.retryLane=re,ti(j,re),dn(X,j,re,-1))}return Am(),Qh(j,K,Fe,X=tm(Error(s(421))))}return xh(re)?(K.flags|=128,K.child=j.child,K=O2.bind(null,j),gp(re,K),null):(j=xe.treeContext,Me&&(ln=Ni(re),Vr=K,lt=!0,Mn=null,Al=!1,j!==null&&(on[an++]=ei,on[an++]=Oi,on[an++]=ao,ei=j.id,Oi=j.overflow,ao=K)),K=am(K,X.children),K.flags|=4096,K)}(a,u,I,y,g,w,d);if(C){C=y.fallback,I=u.mode,g=(w=a.child).sibling;var B={mode:"hidden",children:y.children};return!(1&I)&&u.child!==w?((y=u.child).childLanes=0,y.pendingProps=B,u.deletions=null):(y=vs(w,B)).subtreeFlags=14680064&w.subtreeFlags,g!==null?C=vs(g,C):(C=mo(C,I,d,null)).flags|=2,C.return=u,y.return=u,y.sibling=C,u.child=y,y=C,C=u.child,I=(I=a.child.memoizedState)===null?om(d):{baseLanes:I.baseLanes|d,cachePool:null,transitions:I.transitions},C.memoizedState=I,C.childLanes=a.childLanes&~d,u.memoizedState=sm,y}return a=(C=a.child).sibling,y=vs(C,{mode:"visible",children:y.children}),!(1&u.mode)&&(y.lanes=d),y.return=u,y.sibling=null,a!==null&&((d=u.deletions)===null?(u.deletions=[a],u.flags|=16):d.push(a)),u.child=y,u.memoizedState=null,y}function am(a,u){return(u=fc({mode:"visible",children:u},a.mode,0,null)).return=a,a.child=u}function Qh(a,u,d,g){return g!==null&&Dp(g),sa(u,a.child,null,d),(a=am(u,u.pendingProps.children)).flags|=2,u.memoizedState=null,a}function S1(a,u,d){a.lanes|=u;var g=a.alternate;g!==null&&(g.lanes|=u),Lp(a.return,u,d)}function lm(a,u,d,g,y){var w=a.memoizedState;w===null?a.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:g,tail:d,tailMode:y}:(w.isBackwards=u,w.rendering=null,w.renderingStartTime=0,w.last=g,w.tail=d,w.tailMode=y)}function b1(a,u,d){var g=u.pendingProps,y=g.revealOrder,w=g.tail;if(kr(a,u,g.children,d),(2&(g=_t.current))!=0)g=1&g|2,u.flags|=128;else{if(a!==null&&128&a.flags)e:for(a=u.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&S1(a,d,u);else if(a.tag===19)S1(a,d,u);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===u)break e;for(;a.sibling===null;){if(a.return===null||a.return===u)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}g&=1}if(Je(_t,g),(1&u.mode)==0)u.memoizedState=null;else switch(y){case"forwards":for(d=u.child,y=null;d!==null;)(a=d.alternate)!==null&&Gh(a)===null&&(y=d),d=d.sibling;(d=y)===null?(y=u.child,u.child=null):(y=d.sibling,d.sibling=null),lm(u,!1,y,d,w);break;case"backwards":for(d=null,y=u.child,u.child=null;y!==null;){if((a=y.alternate)!==null&&Gh(a)===null){u.child=y;break}a=y.sibling,y.sibling=d,d=y,y=a}lm(u,!0,d,null,w);break;case"together":lm(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function Kh(a,u){!(1&u.mode)&&a!==null&&(a.alternate=null,u.alternate=null,u.flags|=2)}function Bi(a,u,d){if(a!==null&&(u.dependencies=a.dependencies),co|=u.lanes,(d&u.childLanes)==0)return null;if(a!==null&&u.child!==a.child)throw Error(s(153));if(u.child!==null){for(d=vs(a=u.child,a.pendingProps),u.child=d,d.return=u;a.sibling!==null;)a=a.sibling,(d=d.sibling=vs(a,a.pendingProps)).return=u;d.sibling=null}return u.child}function ii(a){a.flags|=4}function T1(a,u){if(a!==null&&a.child===u.child)return!0;if(16&u.flags)return!1;for(a=u.child;a!==null;){if(12854&a.flags||12854&a.subtreeFlags)return!1;a=a.sibling}return!0}if(ue)Dl=function(a,u){for(var d=u.child;d!==null;){if(d.tag===5||d.tag===6)z(a,d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===u)break;for(;d.sibling===null;){if(d.return===null||d.return===u)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},Ol=function(){},Xh=function(a,u,d,g,y){if((a=a.memoizedProps)!==g){var w=u.stateNode,C=ri(hn.current);d=J(w,d,a,g,y,C),(u.updateQueue=d)&&ii(u)}},Yh=function(a,u,d,g){d!==g&&ii(u)};else if(Ee){Dl=function(a,u,d,g){for(var y=u.child;y!==null;){if(y.tag===5){var w=y.stateNode;d&&g&&(w=_l(w,y.type,y.memoizedProps,y)),z(a,w)}else if(y.tag===6)w=y.stateNode,d&&g&&(w=yh(w,y.memoizedProps,y)),z(a,w);else if(y.tag!==4){if(y.tag===22&&y.memoizedState!==null)(w=y.child)!==null&&(w.return=y),Dl(a,y,!0,!0);else if(y.child!==null){y.child.return=y,y=y.child;continue}}if(y===u)break;for(;y.sibling===null;){if(y.return===null||y.return===u)return;y=y.return}y.sibling.return=y.return,y=y.sibling}};var A1=function(a,u,d,g){for(var y=u.child;y!==null;){if(y.tag===5){var w=y.stateNode;d&&g&&(w=_l(w,y.type,y.memoizedProps,y)),no(a,w)}else if(y.tag===6)w=y.stateNode,d&&g&&(w=yh(w,y.memoizedProps,y)),no(a,w);else if(y.tag!==4){if(y.tag===22&&y.memoizedState!==null)(w=y.child)!==null&&(w.return=y),A1(a,y,!0,!0);else if(y.child!==null){y.child.return=y,y=y.child;continue}}if(y===u)break;for(;y.sibling===null;){if(y.return===null||y.return===u)return;y=y.return}y.sibling.return=y.return,y=y.sibling}};Ol=function(a,u){var d=u.stateNode;if(!T1(a,u)){a=d.containerInfo;var g=mh(a);A1(g,u,!1,!1),d.pendingChildren=g,ii(u),gh(a,g)}},Xh=function(a,u,d,g,y){var w=a.stateNode,C=a.memoizedProps;if((a=T1(a,u))&&C===g)u.stateNode=w;else{var I=u.stateNode,B=ri(hn.current),j=null;C!==g&&(j=J(I,d,C,g,y,B)),a&&j===null?u.stateNode=w:(w=ph(w,j,d,C,g,u,a,I),Y(w,d,g,y,B)&&ii(u),u.stateNode=w,a?ii(u):Dl(w,u,!1,!1))}},Yh=function(a,u,d,g){d!==g?(a=ri(oa.current),d=ri(hn.current),u.stateNode=le(g,a,d,u),ii(u)):u.stateNode=a.stateNode}}else Ol=function(){},Xh=function(){},Yh=function(){};function Fl(a,u){if(!lt)switch(a.tailMode){case"hidden":u=a.tail;for(var d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?a.tail=null:d.sibling=null;break;case"collapsed":d=a.tail;for(var g=null;d!==null;)d.alternate!==null&&(g=d),d=d.sibling;g===null?u||a.tail===null?a.tail=null:a.tail.sibling=null:g.sibling=null}}function xr(a){var u=a.alternate!==null&&a.alternate.child===a.child,d=0,g=0;if(u)for(var y=a.child;y!==null;)d|=y.lanes|y.childLanes,g|=14680064&y.subtreeFlags,g|=14680064&y.flags,y.return=a,y=y.sibling;else for(y=a.child;y!==null;)d|=y.lanes|y.childLanes,g|=y.subtreeFlags,g|=y.flags,y.return=a,y=y.sibling;return a.subtreeFlags|=g,a.childLanes=d,u}function C2(a,u,d){var g=u.pendingProps;switch(Mp(u),u.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xr(u),null;case 1:case 17:return Wr(u.type)&&wp(),xr(u),null;case 3:return d=u.stateNode,aa(),at(Rr),at(ur),Vp(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),a!==null&&a.child!==null||(Nh(u)?ii(u):a===null||a.memoizedState.isDehydrated&&!(256&u.flags)||(u.flags|=1024,Mn!==null&&(bm(Mn),Mn=null))),Ol(a,u),xr(u),null;case 5:$p(u),d=ri(oa.current);var y=u.type;if(a!==null&&u.stateNode!=null)Xh(a,u,y,g,d),a.ref!==u.ref&&(u.flags|=512,u.flags|=2097152);else{if(!g){if(u.stateNode===null)throw Error(s(166));return xr(u),null}if(a=ri(hn.current),Nh(u)){if(!Me)throw Error(s(175));a=m_(u.stateNode,u.type,u.memoizedProps,d,a,u,!Al),u.updateQueue=a,a!==null&&ii(u)}else{var w=H(y,g,d,a,u);Dl(w,u,!1,!1),u.stateNode=w,Y(w,y,g,d,a)&&ii(u)}u.ref!==null&&(u.flags|=512,u.flags|=2097152)}return xr(u),null;case 6:if(a&&u.stateNode!=null)Yh(a,u,a.memoizedProps,g);else{if(typeof g!="string"&&u.stateNode===null)throw Error(s(166));if(a=ri(oa.current),d=ri(hn.current),Nh(u)){if(!Me)throw Error(s(176));if(a=u.stateNode,d=u.memoizedProps,(g=Sh(a,d,u,!Al))&&(y=Vr)!==null)switch(y.tag){case 3:qo(y.stateNode.containerInfo,a,d,(1&y.mode)!=0);break;case 5:yp(y.type,y.memoizedProps,y.stateNode,a,d,(1&y.mode)!=0)}g&&ii(u)}else u.stateNode=le(g,a,d,u)}return xr(u),null;case 13:if(at(_t),g=u.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(lt&&ln!==null&&1&u.mode&&!(128&u.flags))P_(),ra(),u.flags|=98560,y=!1;else if(y=Nh(u),g!==null&&g.dehydrated!==null){if(a===null){if(!y)throw Error(s(318));if(!Me)throw Error(s(344));if(!(y=(y=u.memoizedState)!==null?y.dehydrated:null))throw Error(s(317));ls(y,u)}else ra(),!(128&u.flags)&&(u.memoizedState=null),u.flags|=4;xr(u),y=!1}else Mn!==null&&(bm(Mn),Mn=null),y=!0;if(!y)return 65536&u.flags?u:null}return 128&u.flags?(u.lanes=d,u):((d=g!==null)!=(a!==null&&a.memoizedState!==null)&&d&&(u.child.flags|=8192,1&u.mode&&(a===null||1&_t.current?Ot===0&&(Ot=3):Am())),u.updateQueue!==null&&(u.flags|=4),xr(u),null);case 4:return aa(),Ol(a,u),a===null&&je(u.stateNode.containerInfo),xr(u),null;case 10:return Bp(u.type._context),xr(u),null;case 19:if(at(_t),(y=u.memoizedState)===null)return xr(u),null;if(g=(128&u.flags)!=0,(w=y.rendering)===null)if(g)Fl(y,!1);else{if(Ot!==0||a!==null&&128&a.flags)for(a=u.child;a!==null;){if((w=Gh(a))!==null){for(u.flags|=128,Fl(y,!1),(a=w.updateQueue)!==null&&(u.updateQueue=a,u.flags|=4),u.subtreeFlags=0,a=d,d=u.child;d!==null;)y=a,(g=d).flags&=14680066,(w=g.alternate)===null?(g.childLanes=0,g.lanes=y,g.child=null,g.subtreeFlags=0,g.memoizedProps=null,g.memoizedState=null,g.updateQueue=null,g.dependencies=null,g.stateNode=null):(g.childLanes=w.childLanes,g.lanes=w.lanes,g.child=w.child,g.subtreeFlags=0,g.deletions=null,g.memoizedProps=w.memoizedProps,g.memoizedState=w.memoizedState,g.updateQueue=w.updateQueue,g.type=w.type,y=w.dependencies,g.dependencies=y===null?null:{lanes:y.lanes,firstContext:y.firstContext}),d=d.sibling;return Je(_t,1&_t.current|2),u.child}a=a.sibling}y.tail!==null&&Gt()>xm&&(u.flags|=128,g=!0,Fl(y,!1),u.lanes=4194304)}else{if(!g)if((a=Gh(w))!==null){if(u.flags|=128,g=!0,(a=a.updateQueue)!==null&&(u.updateQueue=a,u.flags|=4),Fl(y,!0),y.tail===null&&y.tailMode==="hidden"&&!w.alternate&&!lt)return xr(u),null}else 2*Gt()-y.renderingStartTime>xm&&d!==1073741824&&(u.flags|=128,g=!0,Fl(y,!1),u.lanes=4194304);y.isBackwards?(w.sibling=u.child,u.child=w):((a=y.last)!==null?a.sibling=w:u.child=w,y.last=w)}return y.tail!==null?(u=y.tail,y.rendering=u,y.tail=u.sibling,y.renderingStartTime=Gt(),u.sibling=null,a=_t.current,Je(_t,g?1&a|2:1&a),u):(xr(u),null);case 22:case 23:return Tm(),d=u.memoizedState!==null,a!==null&&a.memoizedState!==null!==d&&(u.flags|=8192),d&&1&u.mode?1073741824&Xr&&(xr(u),ue&&6&u.subtreeFlags&&(u.flags|=8192)):xr(u),null;case 24:case 25:return null}throw Error(s(156,u.tag))}function P2(a,u){switch(Mp(u),u.tag){case 1:return Wr(u.type)&&wp(),65536&(a=u.flags)?(u.flags=-65537&a|128,u):null;case 3:return aa(),at(Rr),at(ur),Vp(),65536&(a=u.flags)&&!(128&a)?(u.flags=-65537&a|128,u):null;case 5:return $p(u),null;case 13:if(at(_t),(a=u.memoizedState)!==null&&a.dehydrated!==null){if(u.alternate===null)throw Error(s(340));ra()}return 65536&(a=u.flags)?(u.flags=-65537&a|128,u):null;case 19:return at(_t),null;case 4:return aa(),null;case 10:return Bp(u.type._context),null;case 22:case 23:return Tm(),null;default:return null}}var qh=!1,cr=!1,I2=typeof WeakSet=="function"?WeakSet:Set,ge=null;function ua(a,u){var d=a.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(g){ut(a,u,g)}else d.current=null}function C1(a,u,d){try{d()}catch(g){ut(a,u,g)}}var P1=!1;function Bl(a,u,d){var g=u.updateQueue;if((g=g!==null?g.lastEffect:null)!==null){var y=g=g.next;do{if((y.tag&a)===a){var w=y.destroy;y.destroy=void 0,w!==void 0&&C1(u,d,w)}y=y.next}while(y!==g)}}function Zh(a,u){if((u=(u=u.updateQueue)!==null?u.lastEffect:null)!==null){var d=u=u.next;do{if((d.tag&a)===a){var g=d.create;d.destroy=g()}d=d.next}while(d!==u)}}function um(a){var u=a.ref;if(u!==null){var d=a.stateNode;a.tag===5?a=_e(d):a=d,typeof u=="function"?u(a):u.current=a}}function I1(a){var u=a.alternate;u!==null&&(a.alternate=null,I1(u)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(u=a.stateNode)!==null&&St(u),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function R1(a){return a.tag===5||a.tag===3||a.tag===4}function M1(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||R1(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(2&a.flags||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(2&a.flags))return a.stateNode}}function hm(a,u,d){var g=a.tag;if(g===5||g===6)a=a.stateNode,u?At(d,a,u):rt(d,a);else if(g!==4&&(a=a.child)!==null)for(hm(a,u,d),a=a.sibling;a!==null;)hm(a,u,d),a=a.sibling}function cm(a,u,d){var g=a.tag;if(g===5||g===6)a=a.stateNode,u?qt(d,a,u):as(d,a);else if(g!==4&&(a=a.child)!==null)for(cm(a,u,d),a=a.sibling;a!==null;)cm(a,u,d),a=a.sibling}var wr=null,si=!1;function oi(a,u,d){for(d=d.child;d!==null;)dm(a,u,d),d=d.sibling}function dm(a,u,d){if(Zn&&typeof Zn.onCommitFiberUnmount=="function")try{Zn.onCommitFiberUnmount(Ih,d)}catch{}switch(d.tag){case 5:cr||ua(d,u);case 6:if(ue){var g=wr,y=si;wr=null,oi(a,u,d),si=y,(wr=g)!==null&&(si?Pn(wr,d.stateNode):Cn(wr,d.stateNode))}else oi(a,u,d);break;case 18:ue&&wr!==null&&(si?Ah(wr,d.stateNode):El(wr,d.stateNode));break;case 4:ue?(g=wr,y=si,wr=d.stateNode.containerInfo,si=!0,oi(a,u,d),wr=g,si=y):(Ee&&(g=d.stateNode.containerInfo,y=mh(g),vl(g,y)),oi(a,u,d));break;case 0:case 11:case 14:case 15:if(!cr&&(g=d.updateQueue)!==null&&(g=g.lastEffect)!==null){y=g=g.next;do{var w=y,C=w.destroy;w=w.tag,C!==void 0&&(2&w||4&w)&&C1(d,u,C),y=y.next}while(y!==g)}oi(a,u,d);break;case 1:if(!cr&&(ua(d,u),typeof(g=d.stateNode).componentWillUnmount=="function"))try{g.props=d.memoizedProps,g.state=d.memoizedState,g.componentWillUnmount()}catch(I){ut(d,u,I)}oi(a,u,d);break;case 21:oi(a,u,d);break;case 22:1&d.mode?(cr=(g=cr)||d.memoizedState!==null,oi(a,u,d),cr=g):oi(a,u,d);break;default:oi(a,u,d)}}function k1(a){var u=a.updateQueue;if(u!==null){a.updateQueue=null;var d=a.stateNode;d===null&&(d=a.stateNode=new I2),u.forEach(function(g){var y=F2.bind(null,a,g);d.has(g)||(d.add(g),g.then(y,y))})}}function Nn(a,u){var d=u.deletions;if(d!==null)for(var g=0;g<d.length;g++){var y=d[g];try{var w=a,C=u;if(ue){var I=C;e:for(;I!==null;){switch(I.tag){case 5:wr=I.stateNode,si=!1;break e;case 3:case 4:wr=I.stateNode.containerInfo,si=!0;break e}I=I.return}if(wr===null)throw Error(s(160));dm(w,C,y),wr=null,si=!1}else dm(w,C,y);var B=y.alternate;B!==null&&(B.return=null),y.return=null}catch(j){ut(y,u,j)}}if(12854&u.subtreeFlags)for(u=u.child;u!==null;)N1(u,a),u=u.sibling}function N1(a,u){var d=a.alternate,g=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:if(Nn(u,a),ai(a),4&g){try{Bl(3,a,a.return),Zh(3,a)}catch(X){ut(a,a.return,X)}try{Bl(5,a,a.return)}catch(X){ut(a,a.return,X)}}break;case 1:Nn(u,a),ai(a),512&g&&d!==null&&ua(d,d.return);break;case 5:if(Nn(u,a),ai(a),512&g&&d!==null&&ua(d,d.return),ue){if(32&a.flags){var y=a.stateNode;try{vr(y)}catch(X){ut(a,a.return,X)}}if(4&g&&(y=a.stateNode)!=null){var w=a.memoizedProps;if(d=d!==null?d.memoizedProps:w,g=a.type,u=a.updateQueue,a.updateQueue=null,u!==null)try{lr(y,u,g,d,w,a)}catch(X){ut(a,a.return,X)}}}break;case 6:if(Nn(u,a),ai(a),4&g&&ue){if(a.stateNode===null)throw Error(s(162));y=a.stateNode,w=a.memoizedProps,d=d!==null?d.memoizedProps:w;try{Tt(y,d,w)}catch(X){ut(a,a.return,X)}}break;case 3:if(Nn(u,a),ai(a),4&g){if(ue&&Me&&d!==null&&d.memoizedState.isDehydrated)try{Th(u.containerInfo)}catch(X){ut(a,a.return,X)}if(Ee){y=u.containerInfo,w=u.pendingChildren;try{vl(y,w)}catch(X){ut(a,a.return,X)}}}break;case 4:if(Nn(u,a),ai(a),4&g&&Ee){y=(w=a.stateNode).containerInfo,w=w.pendingChildren;try{vl(y,w)}catch(X){ut(a,a.return,X)}}break;case 13:Nn(u,a),ai(a),8192&(y=a.child).flags&&(w=y.memoizedState!==null,y.stateNode.isHidden=w,!w||y.alternate!==null&&y.alternate.memoizedState!==null||(_m=Gt())),4&g&&k1(a);break;case 22:var C=d!==null&&d.memoizedState!==null;if(1&a.mode?(cr=(d=cr)||C,Nn(u,a),cr=d):Nn(u,a),ai(a),8192&g){if(d=a.memoizedState!==null,(a.stateNode.isHidden=d)&&!C&&(1&a.mode)!=0)for(ge=a,g=a.child;g!==null;){for(u=ge=g;ge!==null;){var I=(C=ge).child;switch(C.tag){case 0:case 11:case 14:case 15:Bl(4,C,C.return);break;case 1:ua(C,C.return);var B=C.stateNode;if(typeof B.componentWillUnmount=="function"){var j=C,K=C.return;try{var oe=j;B.props=oe.memoizedProps,B.state=oe.memoizedState,B.componentWillUnmount()}catch(X){ut(j,K,X)}}break;case 5:ua(C,C.return);break;case 22:if(C.memoizedState!==null){F1(u);continue}}I!==null?(I.return=C,ge=I):F1(u)}g=g.sibling}if(ue){e:if(g=null,ue)for(u=a;;){if(u.tag===5){if(g===null){g=u;try{y=u.stateNode,d?jr(y):$r(u.stateNode,u.memoizedProps)}catch(X){ut(a,a.return,X)}}}else if(u.tag===6){if(g===null)try{w=u.stateNode,d?_r(w):sn(w,u.memoizedProps)}catch(X){ut(a,a.return,X)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===a)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===a)break e;for(;u.sibling===null;){if(u.return===null||u.return===a)break e;g===u&&(g=null),u=u.return}g===u&&(g=null),u.sibling.return=u.return,u=u.sibling}}}break;case 19:Nn(u,a),ai(a),4&g&&k1(a);break;case 21:break;default:Nn(u,a),ai(a)}}function ai(a){var u=a.flags;if(2&u){try{if(ue){e:{for(var d=a.return;d!==null;){if(R1(d)){var g=d;break e}d=d.return}throw Error(s(160))}switch(g.tag){case 5:var y=g.stateNode;32&g.flags&&(vr(y),g.flags&=-33),cm(a,M1(a),y);break;case 3:case 4:var w=g.stateNode.containerInfo;hm(a,M1(a),w);break;default:throw Error(s(161))}}}catch(C){ut(a,a.return,C)}a.flags&=-3}4096&u&&(a.flags&=-4097)}function R2(a,u,d){ge=a,D1(a)}function D1(a,u,d){for(var g=(1&a.mode)!=0;ge!==null;){var y=ge,w=y.child;if(y.tag===22&&g){var C=y.memoizedState!==null||qh;if(!C){var I=y.alternate,B=I!==null&&I.memoizedState!==null||cr;I=qh;var j=cr;if(qh=C,(cr=B)&&!j)for(ge=y;ge!==null;)B=(C=ge).child,C.tag===22&&C.memoizedState!==null?B1(y):B!==null?(B.return=C,ge=B):B1(y);for(;w!==null;)ge=w,D1(w),w=w.sibling;ge=y,qh=I,cr=j}O1(a)}else 8772&y.subtreeFlags&&w!==null?(w.return=y,ge=w):O1(a)}}function O1(a){for(;ge!==null;){var u=ge;if(8772&u.flags){var d=u.alternate;try{if(8772&u.flags)switch(u.tag){case 0:case 11:case 15:cr||Zh(5,u);break;case 1:var g=u.stateNode;if(4&u.flags&&!cr)if(d===null)g.componentDidMount();else{var y=u.elementType===u.type?d.memoizedProps:kn(u.type,d.memoizedProps);g.componentDidUpdate(y,d.memoizedState,g.__reactInternalSnapshotBeforeUpdate)}var w=u.updateQueue;w!==null&&N_(u,w,g);break;case 3:var C=u.updateQueue;if(C!==null){if(d=null,u.child!==null)switch(u.child.tag){case 5:d=_e(u.child.stateNode);break;case 1:d=u.child.stateNode}N_(u,C,d)}break;case 5:var I=u.stateNode;d===null&&4&u.flags&&Hr(I,u.type,u.memoizedProps,u);break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(Me&&u.memoizedState===null){var B=u.alternate;if(B!==null){var j=B.memoizedState;if(j!==null){var K=j.dehydrated;K!==null&&Be(K)}}}break;default:throw Error(s(163))}cr||512&u.flags&&um(u)}catch(oe){ut(u,u.return,oe)}}if(u===a){ge=null;break}if((d=u.sibling)!==null){d.return=u.return,ge=d;break}ge=u.return}}function F1(a){for(;ge!==null;){var u=ge;if(u===a){ge=null;break}var d=u.sibling;if(d!==null){d.return=u.return,ge=d;break}ge=u.return}}function B1(a){for(;ge!==null;){var u=ge;try{switch(u.tag){case 0:case 11:case 15:var d=u.return;try{Zh(4,u)}catch(B){ut(u,d,B)}break;case 1:var g=u.stateNode;if(typeof g.componentDidMount=="function"){var y=u.return;try{g.componentDidMount()}catch(B){ut(u,y,B)}}var w=u.return;try{um(u)}catch(B){ut(u,w,B)}break;case 5:var C=u.return;try{um(u)}catch(B){ut(u,C,B)}}}catch(B){ut(u,u.return,B)}if(u===a){ge=null;break}var I=u.sibling;if(I!==null){I.return=u.return,ge=I;break}ge=u.return}}var Jh=0,ec=1,tc=2,rc=3,nc=4;if(typeof Symbol=="function"&&Symbol.for){var Ll=Symbol.for;Jh=Ll("selector.component"),ec=Ll("selector.has_pseudo_class"),tc=Ll("selector.role"),rc=Ll("selector.test_id"),nc=Ll("selector.text")}function fm(a){var u=Ke(a);if(u!=null){if(typeof u.memoizedProps["data-testname"]!="string")throw Error(s(364));return u}if((a=Dt(a))===null)throw Error(s(362));return a.stateNode.current}function pm(a,u){switch(u.$$typeof){case Jh:if(a.type===u.value)return!0;break;case ec:e:{u=u.value,a=[a,0];for(var d=0;d<a.length;){var g=a[d++],y=a[d++],w=u[y];if(g.tag!==5||!bt(g)){for(;w!=null&&pm(g,w);)w=u[++y];if(y===u.length){u=!0;break e}for(g=g.child;g!==null;)a.push(g,y),g=g.sibling}}u=!1}return u;case tc:if(a.tag===5&&qe(a.stateNode,u.value))return!0;break;case nc:if((a.tag===5||a.tag===6)&&(a=Pr(a))!==null&&0<=a.indexOf(u.value))return!0;break;case rc:if(a.tag===5&&typeof(a=a.memoizedProps["data-testname"])=="string"&&a.toLowerCase()===u.value.toLowerCase())return!0;break;default:throw Error(s(365))}return!1}function mm(a){switch(a.$$typeof){case Jh:return"<"+(L(a.value)||"Unknown")+">";case ec:return":has("+(mm(a)||"")+")";case tc:return'[role="'+a.value+'"]';case nc:return'"'+a.value+'"';case rc:return'[data-testname="'+a.value+'"]';default:throw Error(s(365))}}function L1(a,u){var d=[];a=[a,0];for(var g=0;g<a.length;){var y=a[g++],w=a[g++],C=u[w];if(y.tag!==5||!bt(y)){for(;C!=null&&pm(y,C);)C=u[++w];if(w===u.length)d.push(y);else for(y=y.child;y!==null;)a.push(y,w),y=y.sibling}}return d}function gm(a,u){if(!Xe)throw Error(s(363));a=L1(a=fm(a),u),u=[],a=Array.from(a);for(var d=0;d<a.length;){var g=a[d++];if(g.tag===5)bt(g)||u.push(g.stateNode);else for(g=g.child;g!==null;)a.push(g),g=g.sibling}return u}var M2=Math.ceil,ic=o.ReactCurrentDispatcher,ym=o.ReactCurrentOwner,Ct=o.ReactCurrentBatchConfig,He=0,$t=null,Mt=null,Zt=0,Xr=0,ha=us(0),Ot=0,Ul=null,co=0,sc=0,vm=0,zl=null,Yr=null,_m=0,xm=1/0,fs=null;function ca(){xm=Gt()+500}var U1,oc=!1,wm=null,ps=null,ac=!1,ms=null,lc=0,Gl=0,Em=null,uc=-1,hc=0;function dr(){return 6&He?Gt():uc!==-1?uc:uc=Gt()}function gs(a){return 1&a.mode?2&He&&Zt!==0?Zt&-Zt:g2.transition!==null?(hc===0&&(hc=__()),hc):(a=We)!==0?a:vt():1}function dn(a,u,d,g){if(50<Gl)throw Gl=0,Em=null,Error(s(185));Tl(a,d,g),2&He&&a===$t||(a===$t&&(!(2&He)&&(sc|=d),Ot===4&&ys(a,Zt)),Nr(a,g),d===1&&He===0&&!(1&u.mode)&&(ca(),Rh&&Jn()))}function Nr(a,u){var d=a.callbackNode;(function(y,w){for(var C=y.suspendedLanes,I=y.pingedLanes,B=y.expirationTimes,j=y.pendingLanes;0<j;){var K=31-In(j),oe=1<<K,X=B[K];X===-1?oe&C&&!(oe&I)||(B[K]=c2(oe,w)):X<=w&&(y.expiredLanes|=oe),j&=~oe}})(a,u);var g=Ph(a,a===$t?Zt:0);if(g===0)d!==null&&w_(d),a.callbackNode=null,a.callbackPriority=0;else if(u=g&-g,a.callbackPriority!==u){if(d!=null&&w_(d),u===1)a.tag===0?function(y){Rh=!0,S_(y)}(G1.bind(null,a)):S_(G1.bind(null,a)),Oe?ke(function(){!(6&He)&&Jn()}):Cp(Pp,Jn),d=null;else{switch(x_(g)){case 1:d=Pp;break;case 4:d=p2;break;case 16:default:d=E_;break;case 536870912:d=m2}d=Q1(d,z1.bind(null,a))}a.callbackPriority=u,a.callbackNode=d}}function z1(a,u){if(uc=-1,hc=0,(6&He)!=0)throw Error(s(327));var d=a.callbackNode;if(po()&&a.callbackNode!==d)return null;var g=Ph(a,a===$t?Zt:0);if(g===0)return null;if(30&g||g&a.expiredLanes||u)u=cc(a,g);else{u=g;var y=He;He|=2;var w=$1();for($t===a&&Zt===u||(fs=null,ca(),fo(a,u));;)try{N2();break}catch(I){j1(a,I)}Fp(),ic.current=w,He=y,Mt!==null?u=0:($t=null,Zt=0,u=Ot)}if(u!==0){if(u===2&&(y=bp(a))!==0&&(g=y,u=Sm(a,y)),u===1)throw d=Ul,fo(a,0),ys(a,g),Nr(a,Gt()),d;if(u===6)ys(a,g);else{if(y=a.current.alternate,(30&g)==0&&!function(I){for(var B=I;;){if(16384&B.flags){var j=B.updateQueue;if(j!==null&&(j=j.stores)!==null)for(var K=0;K<j.length;K++){var oe=j[K],X=oe.getSnapshot;oe=oe.value;try{if(!Rn(X(),oe))return!1}catch{return!1}}}if(j=B.child,16384&B.subtreeFlags&&j!==null)j.return=B,B=j;else{if(B===I)break;for(;B.sibling===null;){if(B.return===null||B.return===I)return!0;B=B.return}B.sibling.return=B.return,B=B.sibling}}return!0}(y)&&((u=cc(a,g))===2&&(w=bp(a))!==0&&(g=w,u=Sm(a,w)),u===1))throw d=Ul,fo(a,0),ys(a,g),Nr(a,Gt()),d;switch(a.finishedWork=y,a.finishedLanes=g,u){case 0:case 1:throw Error(s(345));case 2:case 5:da(a,Yr,fs);break;case 3:if(ys(a,g),(130023424&g)===g&&10<(u=_m+500-Gt())){if(Ph(a,0)!==0)break;if(((y=a.suspendedLanes)&g)!==g){dr(),a.pingedLanes|=a.suspendedLanes&y;break}a.timeoutHandle=Te(da.bind(null,a,Yr,fs),u);break}da(a,Yr,fs);break;case 4:if(ys(a,g),(4194240&g)===g)break;for(u=a.eventTimes,y=-1;0<g;){var C=31-In(g);w=1<<C,(C=u[C])>y&&(y=C),g&=~w}if(g=y,10<(g=(120>(g=Gt()-g)?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*M2(g/1960))-g)){a.timeoutHandle=Te(da.bind(null,a,Yr,fs),g);break}da(a,Yr,fs);break;default:throw Error(s(329))}}}return Nr(a,Gt()),a.callbackNode===d?z1.bind(null,a):null}function Sm(a,u){var d=zl;return a.current.memoizedState.isDehydrated&&(fo(a,u).flags|=256),(a=cc(a,u))!==2&&(u=Yr,Yr=d,u!==null&&bm(u)),a}function bm(a){Yr===null?Yr=a:Yr.push.apply(Yr,a)}function ys(a,u){for(u&=~vm,u&=~sc,a.suspendedLanes|=u,a.pingedLanes&=~u,a=a.expirationTimes;0<u;){var d=31-In(u),g=1<<d;a[d]=-1,u&=~g}}function G1(a){if(6&He)throw Error(s(327));po();var u=Ph(a,0);if(!(1&u))return Nr(a,Gt()),null;var d=cc(a,u);if(a.tag!==0&&d===2){var g=bp(a);g!==0&&(u=g,d=Sm(a,g))}if(d===1)throw d=Ul,fo(a,0),ys(a,u),Nr(a,Gt()),d;if(d===6)throw Error(s(345));return a.finishedWork=a.current.alternate,a.finishedLanes=u,da(a,Yr,fs),Nr(a,Gt()),null}function H1(a){ms!==null&&ms.tag===0&&!(6&He)&&po();var u=He;He|=1;var d=Ct.transition,g=We;try{if(Ct.transition=null,We=1,a)return a()}finally{We=g,Ct.transition=d,!(6&(He=u))&&Jn()}}function Tm(){Xr=ha.current,at(ha)}function fo(a,u){a.finishedWork=null,a.finishedLanes=0;var d=a.timeoutHandle;if(d!==pe&&(a.timeoutHandle=pe,Pe(d)),Mt!==null)for(d=Mt.return;d!==null;){var g=d;switch(Mp(g),g.tag){case 1:(g=g.type.childContextTypes)!=null&&wp();break;case 3:aa(),at(Rr),at(ur),Vp();break;case 5:$p(g);break;case 4:aa();break;case 13:case 19:at(_t);break;case 10:Bp(g.type._context);break;case 22:case 23:Tm()}d=d.return}if($t=a,Mt=a=vs(a.current,null),Zt=Xr=u,Ot=0,Ul=null,vm=sc=co=0,Yr=zl=null,uo!==null){for(u=0;u<uo.length;u++)if((g=(d=uo[u]).interleaved)!==null){d.interleaved=null;var y=g.next,w=d.pending;if(w!==null){var C=w.next;w.next=y,g.next=C}d.pending=g}uo=null}return a}function j1(a,u){for(;;){var d=Mt;try{if(Fp(),Hh.current=Vh,jh){for(var g=dt.memoizedState;g!==null;){var y=g.queue;y!==null&&(y.pending=null),g=g.next}jh=!1}if(ho=0,jt=Ht=dt=null,Rl=!1,Ml=0,ym.current=null,d===null||d.return===null){Ot=1,Ul=u,Mt=null;break}e:{var w=a,C=d.return,I=d,B=u;if(u=Zt,I.flags|=32768,B!==null&&typeof B=="object"&&typeof B.then=="function"){var j=B,K=I,oe=K.tag;if(!(1&K.mode)&&(oe===0||oe===11||oe===15)){var X=K.alternate;X?(K.updateQueue=X.updateQueue,K.memoizedState=X.memoizedState,K.lanes=X.lanes):(K.updateQueue=null,K.memoizedState=null)}var re=d1(C);if(re!==null){re.flags&=-257,f1(re,C,I,0,u),1&re.mode&&c1(w,j,u),B=j;var xe=(u=re).updateQueue;if(xe===null){var Fe=new Set;Fe.add(B),u.updateQueue=Fe}else xe.add(B);break e}if(!(1&u)){c1(w,j,u),Am();break e}B=Error(s(426))}else if(lt&&1&I.mode){var q=d1(C);if(q!==null){!(65536&q.flags)&&(q.flags|=256),f1(q,C,I,0,u),Dp(la(B,I));break e}}w=B=la(B,I),Ot!==4&&(Ot=2),zl===null?zl=[w]:zl.push(w),w=C;do{switch(w.tag){case 3:w.flags|=65536,u&=-u,w.lanes|=u,k_(w,u1(0,B,u));break e;case 1:I=B;var N=w.type,G=w.stateNode;if(!(128&w.flags)&&(typeof N.getDerivedStateFromError=="function"||G!==null&&typeof G.componentDidCatch=="function"&&(ps===null||!ps.has(G)))){w.flags|=65536,u&=-u,w.lanes|=u,k_(w,h1(w,I,u));break e}}w=w.return}while(w!==null)}V1(d)}catch(Z){u=Z,Mt===d&&d!==null&&(Mt=d=d.return);continue}break}}function $1(){var a=ic.current;return ic.current=Vh,a===null?Vh:a}function Am(){Ot!==0&&Ot!==3&&Ot!==2||(Ot=4),$t===null||!(268435455&co)&&!(268435455&sc)||ys($t,Zt)}function cc(a,u){var d=He;He|=2;var g=$1();for($t===a&&Zt===u||(fs=null,fo(a,u));;)try{k2();break}catch(y){j1(a,y)}if(Fp(),He=d,ic.current=g,Mt!==null)throw Error(s(261));return $t=null,Zt=0,Ot}function k2(){for(;Mt!==null;)W1(Mt)}function N2(){for(;Mt!==null&&!d2();)W1(Mt)}function W1(a){var u=U1(a.alternate,a,Xr);a.memoizedProps=a.pendingProps,u===null?V1(a):Mt=u,ym.current=null}function V1(a){var u=a;do{var d=u.alternate;if(a=u.return,(32768&u.flags)==0){if((d=C2(d,u,Xr))!==null)return void(Mt=d)}else{if((d=P2(d,u))!==null)return d.flags&=32767,void(Mt=d);if(a===null)return Ot=6,void(Mt=null);a.flags|=32768,a.subtreeFlags=0,a.deletions=null}if((u=u.sibling)!==null)return void(Mt=u);Mt=u=a}while(u!==null);Ot===0&&(Ot=5)}function da(a,u,d){var g=We,y=Ct.transition;try{Ct.transition=null,We=1,function(w,C,I,B){do po();while(ms!==null);if(6&He)throw Error(s(327));I=w.finishedWork;var j=w.finishedLanes;if(I===null)return null;if(w.finishedWork=null,w.finishedLanes=0,I===w.current)throw Error(s(177));w.callbackNode=null,w.callbackPriority=0;var K=I.lanes|I.childLanes;if(function(re,xe){var Fe=re.pendingLanes&~xe;re.pendingLanes=xe,re.suspendedLanes=0,re.pingedLanes=0,re.expiredLanes&=xe,re.mutableReadLanes&=xe,re.entangledLanes&=xe,xe=re.entanglements;var q=re.eventTimes;for(re=re.expirationTimes;0<Fe;){var N=31-In(Fe),G=1<<N;xe[N]=0,q[N]=-1,re[N]=-1,Fe&=~G}}(w,K),w===$t&&(Mt=$t=null,Zt=0),!(2064&I.subtreeFlags)&&!(2064&I.flags)||ac||(ac=!0,Q1(E_,function(){return po(),null})),K=(15990&I.flags)!=0,(15990&I.subtreeFlags)!=0||K){K=Ct.transition,Ct.transition=null;var oe=We;We=1;var X=He;He|=4,ym.current=null,function(re,xe){for(W(re.containerInfo),ge=xe;ge!==null;)if(xe=(re=ge).child,(1028&re.subtreeFlags)!=0&&xe!==null)xe.return=re,ge=xe;else for(;ge!==null;){re=ge;try{var Fe=re.alternate;if(1024&re.flags)switch(re.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(Fe!==null){var q=Fe.memoizedProps,N=Fe.memoizedState,G=re.stateNode,Z=G.getSnapshotBeforeUpdate(re.elementType===re.type?q:kn(re.type,q),N);G.__reactInternalSnapshotBeforeUpdate=Z}break;case 3:ue&&Ko(re.stateNode.containerInfo);break;default:throw Error(s(163))}}catch(Ie){ut(re,re.return,Ie)}if((xe=re.sibling)!==null){xe.return=re.return,ge=xe;break}ge=re.return}Fe=P1,P1=!1}(w,I),N1(I,w),F(w.containerInfo),w.current=I,R2(I),f2(),He=X,We=oe,Ct.transition=K}else w.current=I;if(ac&&(ac=!1,ms=w,lc=j),K=w.pendingLanes,K===0&&(ps=null),function(re){if(Zn&&typeof Zn.onCommitFiberRoot=="function")try{Zn.onCommitFiberRoot(Ih,re,void 0,(128&re.current.flags)==128)}catch{}}(I.stateNode),Nr(w,Gt()),C!==null)for(B=w.onRecoverableError,I=0;I<C.length;I++)j=C[I],B(j.value,{componentStack:j.stack,digest:j.digest});if(oc)throw oc=!1,w=wm,wm=null,w;1&lc&&w.tag!==0&&po(),K=w.pendingLanes,1&K?w===Em?Gl++:(Gl=0,Em=w):Gl=0,Jn()}(a,u,d,g)}finally{Ct.transition=y,We=g}return null}function po(){if(ms!==null){var a=x_(lc),u=Ct.transition,d=We;try{if(Ct.transition=null,We=16>a?16:a,ms===null)var g=!1;else{if(a=ms,ms=null,lc=0,(6&He)!=0)throw Error(s(331));var y=He;for(He|=4,ge=a.current;ge!==null;){var w=ge,C=w.child;if(16&ge.flags){var I=w.deletions;if(I!==null){for(var B=0;B<I.length;B++){var j=I[B];for(ge=j;ge!==null;){var K=ge;switch(K.tag){case 0:case 11:case 15:Bl(8,K,w)}var oe=K.child;if(oe!==null)oe.return=K,ge=oe;else for(;ge!==null;){var X=(K=ge).sibling,re=K.return;if(I1(K),K===j){ge=null;break}if(X!==null){X.return=re,ge=X;break}ge=re}}}var xe=w.alternate;if(xe!==null){var Fe=xe.child;if(Fe!==null){xe.child=null;do{var q=Fe.sibling;Fe.sibling=null,Fe=q}while(Fe!==null)}}ge=w}}if(2064&w.subtreeFlags&&C!==null)C.return=w,ge=C;else e:for(;ge!==null;){if(2048&(w=ge).flags)switch(w.tag){case 0:case 11:case 15:Bl(9,w,w.return)}var N=w.sibling;if(N!==null){N.return=w.return,ge=N;break e}ge=w.return}}var G=a.current;for(ge=G;ge!==null;){var Z=(C=ge).child;if(2064&C.subtreeFlags&&Z!==null)Z.return=C,ge=Z;else e:for(C=G;ge!==null;){if(2048&(I=ge).flags)try{switch(I.tag){case 0:case 11:case 15:Zh(9,I)}}catch(Ye){ut(I,I.return,Ye)}if(I===C){ge=null;break e}var Ie=I.sibling;if(Ie!==null){Ie.return=I.return,ge=Ie;break e}ge=I.return}}if(He=y,Jn(),Zn&&typeof Zn.onPostCommitFiberRoot=="function")try{Zn.onPostCommitFiberRoot(Ih,a)}catch{}g=!0}return g}finally{We=d,Ct.transition=u}}return!1}function X1(a,u,d){a=ds(a,u=u1(0,u=la(d,u),1),1),u=dr(),a!==null&&(Tl(a,1,u),Nr(a,u))}function ut(a,u,d){if(a.tag===3)X1(a,a,d);else for(;u!==null;){if(u.tag===3){X1(u,a,d);break}if(u.tag===1){var g=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(ps===null||!ps.has(g))){u=ds(u,a=h1(u,a=la(d,a),1),1),a=dr(),u!==null&&(Tl(u,1,a),Nr(u,a));break}}u=u.return}}function D2(a,u,d){var g=a.pingCache;g!==null&&g.delete(u),u=dr(),a.pingedLanes|=a.suspendedLanes&d,$t===a&&(Zt&d)===d&&(Ot===4||Ot===3&&(130023424&Zt)===Zt&&500>Gt()-_m?fo(a,0):vm|=d),Nr(a,u)}function Y1(a,u){u===0&&(1&a.mode?(u=Sp,!(130023424&(Sp<<=1))&&(Sp=4194304)):u=1);var d=dr();(a=ti(a,u))!==null&&(Tl(a,u,d),Nr(a,d))}function O2(a){var u=a.memoizedState,d=0;u!==null&&(d=u.retryLane),Y1(a,d)}function F2(a,u){var d=0;switch(a.tag){case 13:var g=a.stateNode,y=a.memoizedState;y!==null&&(d=y.retryLane);break;case 19:g=a.stateNode;break;default:throw Error(s(314))}g!==null&&g.delete(u),Y1(a,d)}function Q1(a,u){return Cp(a,u)}function B2(a,u,d,g){this.tag=a,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fn(a,u,d,g){return new B2(a,u,d,g)}function Cm(a){return!(!(a=a.prototype)||!a.isReactComponent)}function vs(a,u){var d=a.alternate;return d===null?((d=fn(a.tag,u,a.key,a.mode)).elementType=a.elementType,d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=u,d.type=a.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=14680064&a.flags,d.childLanes=a.childLanes,d.lanes=a.lanes,d.child=a.child,d.memoizedProps=a.memoizedProps,d.memoizedState=a.memoizedState,d.updateQueue=a.updateQueue,u=a.dependencies,d.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},d.sibling=a.sibling,d.index=a.index,d.ref=a.ref,d}function dc(a,u,d,g,y,w){var C=2;if(g=a,typeof a=="function")Cm(a)&&(C=1);else if(typeof a=="string")C=5;else e:switch(a){case c:return mo(d.children,y,w,u);case f:C=8,y|=8;break;case m:return(a=fn(12,d,u,2|y)).elementType=m,a.lanes=w,a;case E:return(a=fn(13,d,u,y)).elementType=E,a.lanes=w,a;case T:return(a=fn(19,d,u,y)).elementType=T,a.lanes=w,a;case x:return fc(d,y,w,u);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case p:C=10;break e;case v:C=9;break e;case _:C=11;break e;case S:C=14;break e;case b:C=16,g=null;break e}throw Error(s(130,a==null?a:typeof a,""))}return(u=fn(C,d,u,y)).elementType=a,u.type=g,u.lanes=w,u}function mo(a,u,d,g){return(a=fn(7,a,g,u)).lanes=d,a}function fc(a,u,d,g){return(a=fn(22,a,g,u)).elementType=x,a.lanes=d,a.stateNode={isHidden:!1},a}function Pm(a,u,d){return(a=fn(6,a,null,u)).lanes=d,a}function Im(a,u,d){return(u=fn(4,a.children!==null?a.children:[],a.key,u)).lanes=d,u.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},u}function L2(a,u,d,g,y){this.tag=u,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=pe,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Tp(0),this.expirationTimes=Tp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tp(0),this.identifierPrefix=g,this.onRecoverableError=y,Me&&(this.mutableSourceEagerHydrationData=null)}function K1(a,u,d,g,y,w,C,I,B){return a=new L2(a,u,d,I,B),u===1?(u=1,w===!0&&(u|=8)):u=0,w=fn(3,null,null,u),a.current=w,w.stateNode=a,w.memoizedState={element:g,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},zp(w),a}function q1(a){if(!a)return hs;e:{if(D(a=a._reactInternals)!==a||a.tag!==1)throw Error(s(170));var u=a;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(Wr(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(u!==null);throw Error(s(171))}if(a.tag===1){var d=a.type;if(Wr(d))return y_(a,d,u)}return u}function Z1(a){var u=a._reactInternals;if(u===void 0)throw typeof a.render=="function"?Error(s(188)):(a=Object.keys(a).join(","),Error(s(268,a)));return(a=me(u))===null?null:a.stateNode}function J1(a,u){if((a=a.memoizedState)!==null&&a.dehydrated!==null){var d=a.retryLane;a.retryLane=d!==0&&d<u?d:u}}function pc(a,u){J1(a,u),(a=a.alternate)&&J1(a,u)}function U2(a){return(a=me(a))===null?null:a.stateNode}function z2(){return null}return U1=function(a,u,d){if(a!==null)if(a.memoizedProps!==u.pendingProps||Rr.current)Mr=!0;else{if(!(a.lanes&d)&&!(128&u.flags))return Mr=!1,function(oe,X,re){switch(X.tag){case 3:x1(X),ra();break;case 5:G_(X);break;case 1:Wr(X.type)&&Ch(X);break;case 4:jp(X,X.stateNode.containerInfo);break;case 10:I_(0,X.type._context,X.memoizedProps.value);break;case 13:var xe=X.memoizedState;if(xe!==null)return xe.dehydrated!==null?(Je(_t,1&_t.current),X.flags|=128,null):re&X.child.childLanes?E1(oe,X,re):(Je(_t,1&_t.current),(oe=Bi(oe,X,re))!==null?oe.sibling:null);Je(_t,1&_t.current);break;case 19:if(xe=(re&X.childLanes)!=0,(128&oe.flags)!=0){if(xe)return b1(oe,X,re);X.flags|=128}var Fe=X.memoizedState;if(Fe!==null&&(Fe.rendering=null,Fe.tail=null,Fe.lastEffect=null),Je(_t,_t.current),xe)break;return null;case 22:case 23:return X.lanes=0,y1(oe,X,re)}return Bi(oe,X,re)}(a,u,d);Mr=(131072&a.flags)!=0}else Mr=!1,lt&&1048576&u.flags&&b_(u,kh,u.index);switch(u.lanes=0,u.tag){case 2:var g=u.type;Kh(a,u),a=u.pendingProps;var y=Jo(u,ur.current);ia(u,d),y=Qp(null,u,g,a,y,d);var w=Kp();return u.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(u.tag=1,u.memoizedState=null,u.updateQueue=null,Wr(g)?(w=!0,Ch(u)):w=!1,u.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,zp(u),y.updater=Uh,u.stateNode=y,y._reactInternals=u,Hp(u,g,a,d),u=im(null,u,g,!0,w,d)):(u.tag=0,lt&&w&&Rp(u),kr(null,u,y,d),u=u.child),u;case 16:g=u.elementType;e:{switch(Kh(a,u),a=u.pendingProps,g=(y=g._init)(g._payload),u.type=g,y=u.tag=function(oe){if(typeof oe=="function")return Cm(oe)?1:0;if(oe!=null){if((oe=oe.$$typeof)===_)return 11;if(oe===S)return 14}return 2}(g),a=kn(g,a),y){case 0:u=nm(null,u,g,a,d);break e;case 1:u=_1(null,u,g,a,d);break e;case 11:u=p1(null,u,g,a,d);break e;case 14:u=m1(null,u,g,kn(g.type,a),d);break e}throw Error(s(306,g,""))}return u;case 0:return g=u.type,y=u.pendingProps,nm(a,u,g,y=u.elementType===g?y:kn(g,y),d);case 1:return g=u.type,y=u.pendingProps,_1(a,u,g,y=u.elementType===g?y:kn(g,y),d);case 3:e:{if(x1(u),a===null)throw Error(s(387));g=u.pendingProps,y=(w=u.memoizedState).element,M_(a,u),Lh(u,g,null,d);var C=u.memoizedState;if(g=C.element,Me&&w.isDehydrated){if(w={element:g,isDehydrated:!1,cache:C.cache,pendingSuspenseBoundaries:C.pendingSuspenseBoundaries,transitions:C.transitions},u.updateQueue.baseState=w,u.memoizedState=w,256&u.flags){u=w1(a,u,g,d,y=la(Error(s(423)),u));break e}if(g!==y){u=w1(a,u,g,d,y=la(Error(s(424)),u));break e}for(Me&&(ln=Eh(u.stateNode.containerInfo),Vr=u,lt=!0,Mn=null,Al=!1),d=z_(u,null,g,d),u.child=d;d;)d.flags=-3&d.flags|4096,d=d.sibling}else{if(ra(),g===y){u=Bi(a,u,d);break e}kr(a,u,g,d)}u=u.child}return u;case 5:return G_(u),a===null&&Np(u),g=u.type,y=u.pendingProps,w=a!==null?a.memoizedProps:null,C=y.children,ve(g,y)?C=null:w!==null&&ve(g,w)&&(u.flags|=32),v1(a,u),kr(a,u,C,d),u.child;case 6:return a===null&&Np(u),null;case 13:return E1(a,u,d);case 4:return jp(u,u.stateNode.containerInfo),g=u.pendingProps,a===null?u.child=sa(u,null,g,d):kr(a,u,g,d),u.child;case 11:return g=u.type,y=u.pendingProps,p1(a,u,g,y=u.elementType===g?y:kn(g,y),d);case 7:return kr(a,u,u.pendingProps,d),u.child;case 8:case 12:return kr(a,u,u.pendingProps.children,d),u.child;case 10:e:{if(g=u.type._context,y=u.pendingProps,w=u.memoizedProps,I_(0,g,C=y.value),w!==null)if(Rn(w.value,C)){if(w.children===y.children&&!Rr.current){u=Bi(a,u,d);break e}}else for((w=u.child)!==null&&(w.return=u);w!==null;){var I=w.dependencies;if(I!==null){C=w.child;for(var B=I.firstContext;B!==null;){if(B.context===g){if(w.tag===1){(B=Fi(-1,d&-d)).tag=2;var j=w.updateQueue;if(j!==null){var K=(j=j.shared).pending;K===null?B.next=B:(B.next=K.next,K.next=B),j.pending=B}}w.lanes|=d,(B=w.alternate)!==null&&(B.lanes|=d),Lp(w.return,d,u),I.lanes|=d;break}B=B.next}}else if(w.tag===10)C=w.type===u.type?null:w.child;else if(w.tag===18){if((C=w.return)===null)throw Error(s(341));C.lanes|=d,(I=C.alternate)!==null&&(I.lanes|=d),Lp(C,d,u),C=w.sibling}else C=w.child;if(C!==null)C.return=w;else for(C=w;C!==null;){if(C===u){C=null;break}if((w=C.sibling)!==null){w.return=C.return,C=w;break}C=C.return}w=C}kr(a,u,y.children,d),u=u.child}return u;case 9:return y=u.type,g=u.pendingProps.children,ia(u,d),g=g(y=un(y)),u.flags|=1,kr(a,u,g,d),u.child;case 14:return y=kn(g=u.type,u.pendingProps),m1(a,u,g,y=kn(g.type,y),d);case 15:return g1(a,u,u.type,u.pendingProps,d);case 17:return g=u.type,y=u.pendingProps,y=u.elementType===g?y:kn(g,y),Kh(a,u),u.tag=1,Wr(g)?(a=!0,Ch(u)):a=!1,ia(u,d),F_(u,g,y),Hp(u,g,y,d),im(null,u,g,!0,a,d);case 19:return b1(a,u,d);case 22:return y1(a,u,d)}throw Error(s(156,u.tag))},e.attemptContinuousHydration=function(a){if(a.tag===13){var u=ti(a,134217728);u!==null&&dn(u,a,134217728,dr()),pc(a,134217728)}},e.attemptDiscreteHydration=function(a){if(a.tag===13){var u=ti(a,1);u!==null&&dn(u,a,1,dr()),pc(a,1)}},e.attemptHydrationAtCurrentPriority=function(a){if(a.tag===13){var u=gs(a),d=ti(a,u);d!==null&&dn(d,a,u,dr()),pc(a,u)}},e.attemptSynchronousHydration=function(a){switch(a.tag){case 3:var u=a.stateNode;if(u.current.memoizedState.isDehydrated){var d=bl(u.pendingLanes);d!==0&&(Ap(u,1|d),Nr(u,Gt()),!(6&He)&&(ca(),Jn()))}break;case 13:H1(function(){var g=ti(a,1);if(g!==null){var y=dr();dn(g,a,1,y)}}),pc(a,1)}},e.batchedUpdates=function(a,u){var d=He;He|=1;try{return a(u)}finally{(He=d)===0&&(ca(),Rh&&Jn())}},e.createComponentSelector=function(a){return{$$typeof:Jh,value:a}},e.createContainer=function(a,u,d,g,y,w,C){return K1(a,u,!1,null,0,g,0,w,C)},e.createHasPseudoClassSelector=function(a){return{$$typeof:ec,value:a}},e.createHydrationContainer=function(a,u,d,g,y,w,C,I,B){return(a=K1(d,g,!0,a,0,w,0,I,B)).context=q1(null),d=a.current,(w=Fi(g=dr(),y=gs(d))).callback=u??null,ds(d,w,y),a.current.lanes=y,Tl(a,y,g),Nr(a,g),a},e.createPortal=function(a,u,d){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:g==null?null:""+g,children:a,containerInfo:u,implementation:d}},e.createRoleSelector=function(a){return{$$typeof:tc,value:a}},e.createTestNameSelector=function(a){return{$$typeof:rc,value:a}},e.createTextSelector=function(a){return{$$typeof:nc,value:a}},e.deferredUpdates=function(a){var u=We,d=Ct.transition;try{return Ct.transition=null,We=16,a()}finally{We=u,Ct.transition=d}},e.discreteUpdates=function(a,u,d,g,y){var w=We,C=Ct.transition;try{return Ct.transition=null,We=1,a(u,d,g,y)}finally{We=w,Ct.transition=C,He===0&&ca()}},e.findAllNodes=gm,e.findBoundingRects=function(a,u){if(!Xe)throw Error(s(363));u=gm(a,u),a=[];for(var d=0;d<u.length;d++)a.push(yr(u[d]));for(u=a.length-1;0<u;u--)for(var g=(d=a[u]).x,y=g+d.width,w=d.y,C=w+d.height,I=u-1;0<=I;I--)if(u!==I){var B=a[I],j=B.x,K=j+B.width,oe=B.y,X=oe+B.height;if(g>=j&&w>=oe&&y<=K&&C<=X){a.splice(u,1);break}if(!(g!==j||d.width!==B.width||X<w||oe>C)){oe>w&&(B.height+=oe-w,B.y=w),X<C&&(B.height=C-oe),a.splice(u,1);break}if(!(w!==oe||d.height!==B.height||K<g||j>y)){j>g&&(B.width+=j-g,B.x=g),K<y&&(B.width=y-j),a.splice(u,1);break}}return a},e.findHostInstance=Z1,e.findHostInstanceWithNoPortals=function(a){return(a=(a=$(a))!==null?O(a):null)===null?null:a.stateNode},e.findHostInstanceWithWarning=function(a){return Z1(a)},e.flushControlled=function(a){var u=He;He|=1;var d=Ct.transition,g=We;try{Ct.transition=null,We=1,a()}finally{We=g,Ct.transition=d,(He=u)===0&&(ca(),Jn())}},e.flushPassiveEffects=po,e.flushSync=H1,e.focusWithin=function(a,u){if(!Xe)throw Error(s(363));for(u=L1(a=fm(a),u),u=Array.from(u),a=0;a<u.length;){var d=u[a++];if(!bt(d)){if(d.tag===5&&zt(d.stateNode))return!0;for(d=d.child;d!==null;)u.push(d),d=d.sibling}}return!1},e.getCurrentUpdatePriority=function(){return We},e.getFindAllNodesFailureDescription=function(a,u){if(!Xe)throw Error(s(363));var d=0,g=[];a=[fm(a),0];for(var y=0;y<a.length;){var w=a[y++],C=a[y++],I=u[C];if((w.tag!==5||!bt(w))&&(pm(w,I)&&(g.push(mm(I)),++C>d&&(d=C)),C<u.length))for(w=w.child;w!==null;)a.push(w,C),w=w.sibling}if(d<u.length){for(a=[];d<u.length;d++)a.push(mm(u[d]));return`findAllNodes was able to match part of the selector:
855
855
  `+g.join(" > ")+`
856
856
 
857
857
  No matching component was found for:
858
- `+a.join(" > ")}return null},e.getPublicRootInstance=function(a){return(a=a.current).child?a.child.tag===5?_e(a.child.stateNode):a.child.stateNode:null},e.injectIntoDevTools=function(a){if(a={bundleType:a.bundleType,version:a.version,rendererPackageName:a.rendererPackageName,rendererConfig:a.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:o.ReactCurrentDispatcher,findHostInstanceByFiber:U2,findFiberByHostInstance:a.findFiberByHostInstance||z2,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")a=!1;else{var u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(u.isDisabled||!u.supportsFiber)a=!0;else{try{Ih=u.inject(a),Zn=u}catch{}a=!!u.checkDCE}}return a},e.isAlreadyRendering=function(){return!1},e.observeVisibleRects=function(a,u,d,g){if(!Xe)throw Error(s(363));a=gm(a,u);var y=Ir(a,d,g).disconnect;return{disconnect:function(){y()}}},e.registerMutableSourceForHydration=function(a,u){var d=u._getVersion;d=d(u._source),a.mutableSourceEagerHydrationData==null?a.mutableSourceEagerHydrationData=[u,d]:a.mutableSourceEagerHydrationData.push(u,d)},e.runWithPriority=function(a,u){var d=We;try{return We=a,u()}finally{We=d}},e.shouldError=function(){return null},e.shouldSuspend=function(){return!1},e.updateContainer=function(a,u,d,g){var y=u.current,w=dr(),C=gs(y);return d=q1(d),u.context===null?u.context=d:u.pendingContext=d,(u=Fi(w,C)).payload={element:a},(g=g===void 0?null:g)!==null&&(u.callback=g),(a=ds(y,u,C))!==null&&(dn(a,y,C,w),Bh(a,y,C)),C},e}),XE}({get exports(){return Gv},set exports(t){Gv=t}}).exports=eF();var tF=CO(Gv),GC={name:"root",dependencies:{"react-dom":"^18.0.0"}},jv={},ed={get exports(){return jv},set exports(t){jv=t}};(function(){var t,e,r,n,i,s;typeof performance<"u"&&performance!==null&&performance.now?ed.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(ed.exports=function(){return(t()-i)/1e6},e=process.hrtime,n=(t=function(){var o;return 1e9*(o=e())[0]+o[1]})(),s=1e9*process.uptime(),i=n-s):Date.now?(ed.exports=function(){return Date.now()-r},r=Date.now()):(ed.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(AO);var KE,Ga={},_o={};({get exports(){return Ga},set exports(t){Ga=t}}).exports=(KE||(KE=1,_o.ConcurrentRoot=1,_o.ContinuousEventPriority=4,_o.DefaultEventPriority=16,_o.DiscreteEventPriority=1,_o.IdleEventPriority=536870912,_o.LegacyRoot=0),_o);var rF={};function qg(t,e){t.addChild&&(t.addChild(e),typeof e.didMount=="function"&&e.didMount(e,t))}function HC(t,e){var r,n,i;(r=t.willUnmount)===null||r===void 0||r.call(t,t,e),((n=t.config)===null||n===void 0?void 0:n.destroyChildren)!==!1&&(i=t.children)!==null&&i!==void 0&&i.length&&ss(t.children).forEach(function(s){HC(s,t)})}function qE(t,e){var r;HC(e,t),t.removeChild(e);var n=(r=e.config)!==null&&r!==void 0?r:{},i=n.destroy,s=i===void 0||i,o=n.destroyChildren,l=o===void 0||o,h=n.destroyTexture,c=h!==void 0&&h,f=n.destroyBaseTexture,m=f!==void 0&&f;s&&e.destroy({children:l,texture:c,baseTexture:m})}function ZE(t,e,r){var n,i;Et(e!==r,"Cannot insert node before itself"),t.children.indexOf(e)!==-1&&t.removeChild(e);var s=t.getChildIndex(r);t.addChildAt(e,s),(n=t.__reactpixi)===null||n===void 0||(i=n.root)===null||i===void 0||i.emit("__REACT_PIXI_REQUEST_RENDER__",{detail:"insertBefore"})}var JE=null,Wn=tF({getRootHostContext:function(){return rF},getChildHostContext:function(t){return t},getChildHostContextForEventComponent:function(t){return t},getPublicInstance:function(t){return t},getCurrentEventPriority:function(){return function(){var t,e;if(typeof window>"u")return Ga.DefaultEventPriority;switch((t=window)===null||t===void 0||(e=t.event)===null||e===void 0?void 0:e.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Ga.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Ga.ContinuousEventPriority;default:return Ga.DefaultEventPriority}}()},prepareForCommit:function(){return null},resetAfterCommit:function(){},createInstance:function(t){var e,r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,s=KO[t];if(typeof s=="function"&&(e=s(i,n)),!e){var o=zC[t];o&&((e=o.create(n,{root:i})).didMount=o.didMount?o.didMount.bind(e):void 0,e.willUnmount=o.willUnmount?o.willUnmount.bind(e):void 0,e.applyProps=o.applyProps?o.applyProps.bind(e):void 0,e.config=o.config)}return e&&(e.__reactpixi={root:i},(typeof((r=e)===null||r===void 0?void 0:r.applyProps)=="function"?e.applyProps:Ri)(e,{},n)),e},hideInstance:function(t){t.visible=!1},unhideInstance:function(t,e){var r=e==null||!e.hasOwnProperty("visible")||e.visible;t.visible=r},finalizeInitialChildren:function(t,e,r){return!1},prepareUpdate:function(t,e,r,n,i,s){return JE=function(o,l,h,c){var f=null;for(var m in h)!c.hasOwnProperty(m)&&h.hasOwnProperty(m)&&h[m]!==null&&(m===Uv||(f||(f=[]),f.push(m,null)));for(var p in c){var v=c[p],_=h!==null?h[p]:void 0;!c.hasOwnProperty(p)||v===_||v===null&&_===null||p===Uv||(f||(f=[]),f.push(p,v))}return f}(0,0,r,n)},shouldSetTextContent:function(t,e){return!1},shouldDeprioritizeSubtree:function(t,e){var r=e.alpha===void 0||e.alpha>0,n=e.renderable===void 0||e.renderable===!0,i=e.visible===void 0||e.visible===!0;return!(r&&n&&i)},createTextInstance:function(t,e,r){Et(!1,'Error trying to add text node "'.concat(t,'"'),"text strings as children of a Pixi component is not supported. To add some text, use &lt;Text text={string} /&gt;")},unhideTextInstance:function(t,e){},mountEventComponent:function(){},updateEventComponent:function(){},handleEventTarget:function(){},scheduleTimeout:setTimeout,cancelTimeout:clearTimeout,noTimeout:-1,warnsIfNotActing:!1,now:jv,isPrimaryRenderer:!1,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,supportsMicrotasks:!0,scheduleMicrotask:queueMicrotask,appendInitialChild:function(){for(var t,e,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var s=qg.apply(null,n);return(t=n[0].__reactpixi)===null||t===void 0||(e=t.root)===null||e===void 0||e.emit("__REACT_PIXI_REQUEST_RENDER__",{detail:"appendInitialChild"}),s},appendChild:function(){for(var t,e,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var s=qg.apply(null,n);return(t=n[0].__reactpixi)===null||t===void 0||(e=t.root)===null||e===void 0||e.emit("__REACT_PIXI_REQUEST_RENDER__",{detail:"appendChild"}),s},appendChildToContainer:function(){for(var t,e,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var s=qg.apply(null,n);return(t=n[0].__reactpixi)===null||t===void 0||(e=t.root)===null||e===void 0||e.emit("__REACT_PIXI_REQUEST_RENDER__",{detail:"appendChildToContainer"}),s},removeChild:function(){for(var t,e,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var s=qE.apply(null,n);return(t=n[0].__reactpixi)===null||t===void 0||(e=t.root)===null||e===void 0||e.emit("__REACT_PIXI_REQUEST_RENDER__",{detail:"removeChild"}),s},removeChildFromContainer:function(){for(var t,e,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var s=qE.apply(null,n);return(t=n[0].__reactpixi)===null||t===void 0||(e=t.root)===null||e===void 0||e.emit("__REACT_PIXI_REQUEST_RENDER__",{detail:"removeChildFromContainer"}),s},insertBefore:ZE,insertInContainerBefore:function(){for(var t,e,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var s=ZE.apply(null,n);return(t=n[0].__reactpixi)===null||t===void 0||(e=t.root)===null||e===void 0||e.emit("__REACT_PIXI_REQUEST_RENDER__",{detail:"insertInContainerBefore"}),s},commitUpdate:function(t,e,r,n,i){var s,o,l=t&&t.applyProps;typeof l!="function"&&(l=Ri),(l(t,n,i)||JE)&&((s=t.__reactpixi)===null||s===void 0||(o=s.root)===null||o===void 0||o.emit("__REACT_PIXI_REQUEST_RENDER__",{detail:"commitUpdate"}))},commitMount:function(t,e,r,n,i){},commitTextUpdate:function(t,e,r){},resetTextContent:function(t){},clearContainer:function(t){},getFundamentalComponentInstance:function(t){throw new Error("Not yet implemented.")},mountFundamentalComponent:function(t){throw new Error("Not yet implemented.")},shouldUpdateFundamentalComponent:function(t){throw new Error("Not yet implemented.")},unmountFundamentalComponent:function(t){throw new Error("Not yet implemented.")},getInstanceFromNode:function(t){throw new Error("Not yet implemented.")},isOpaqueHydratingObject:function(t){throw new Error("Not yet implemented")},makeOpaqueHydratingObject:function(t){throw new Error("Not yet implemented.")},makeClientIdInDEV:function(t){throw new Error("Not yet implemented")},beforeActiveInstanceBlur:function(t){},afterActiveInstanceBlur:function(){},detachDeletedInstance:function(){},preparePortalMount:function(t){}}),nF=GC.dependencies["react-dom"].replace(/[^0-9.]/g,""),iF=GC.name;Wn.injectIntoDevTools({bundleType:0,version:nF,rendererPackageName:iF,findHostInstanceByFiber:Wn.findHostInstance});var $s=new Map;function jC(t){if(Et(Tr.prototype.isPrototypeOf(t),"Invalid argument `container`, expected instance of `Container`."),$s.has(t)){var e=$s.get(t).pixiFiberContainer;Wn.updateContainer(null,e,void 0,function(){$s.delete(t)})}}function $C(t){Et(Tr.prototype.isPrototypeOf(t),"Invalid argument `container`, expected instance of `Container`.");var e=$s.get(t);if(Et(!e,"createRoot should only be called once"),!e){var r=Wn.createContainer(t);e={pixiFiberContainer:r,reactRoot:{render:function(n){return Wn.updateContainer(n,r,void 0),Wn.getPublicRootInstance(r)},unmount:function(){jC(t),$s.delete(t)}}},$s.set(t,e)}return e.reactRoot}function sF(t,e,r){var n;return console.warn("Pixi React Deprecation Warning: render is deprecated, use createRoot instead"),r!==void 0&&console.warn("Pixi React Deprecation Warning: render callback no longer exists in React 18"),$s.has(e)?n=$s.get(e).reactRoot:n=$C(e),n.render(t)}function oF(t){jC(t)}function th(){return th=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},th.apply(this,arguments)}function aF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lF(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,BC(n.key),n)}}function Hi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Cf(t,e){return Cf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Cf(t,e)}function uF(t,e){if(e&&(Jr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hi(t)}function Pf(t){return Pf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pf(t)}var pp=Si.createContext(null),WC=pp.Provider,VC=pp.Consumer,hF=function(t){var e=Si.forwardRef(function(r,n){return Si.createElement(VC,null,function(i){return Si.createElement(t,th({},r,{ref:n,app:i}))})});return e.displayName="withPIXIApp(".concat(t.displayName||t.name,")"),e};function cF(t){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var r,n=Pf(t);if(e){var i=Pf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return uF(this,r)}}function eS(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function td(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?eS(Object(r),!0).forEach(function(n){Pt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):eS(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var tS=function(){},XC={width:it.number,height:it.number,onMount:it.func,onUnmount:it.func,raf:it.bool,renderOnComponentChange:it.bool,children:it.node,options:it.shape({autoStart:it.bool,width:it.number,height:it.number,useContextAlpha:it.bool,backgroundAlpha:it.number,autoDensity:it.bool,antialias:it.bool,preserveDrawingBuffer:it.bool,resolution:it.number,forceCanvas:it.bool,backgroundColor:it.number,clearBeforeRender:it.bool,powerPreference:it.string,sharedTicker:it.bool,sharedLoader:it.bool,resizeTo:function(t,e){var r=t[e];r&&Et(r===window||r instanceof HTMLElement,"Invalid prop `resizeTo` of type ".concat(Jr(r),", expect `window` or an `HTMLElement`."))},view:function(t,e,r){var n=t[e];n&&Et(n instanceof HTMLCanvasElement,"Invalid prop `view` of type ".concat(Jr(n),", supplied to ").concat(r,", expected `<canvas> Element`"))}})},dF={width:800,height:600,onMount:tS,onUnmount:tS,raf:!0,renderOnComponentChange:!0},$v=function(t){(function(s,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(o&&o.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),o&&Cf(s,o)})(i,Si.Component);var e,r,n=cF(i);function i(){var s;aF(this,i);for(var o=arguments.length,l=new Array(o),h=0;h<o;h++)l[h]=arguments[h];return Pt(Hi(s=n.call.apply(n,[this].concat(l))),"_canvas",null),Pt(Hi(s),"_mediaQuery",null),Pt(Hi(s),"_ticker",null),Pt(Hi(s),"_needsUpdate",!0),Pt(Hi(s),"app",null),Pt(Hi(s),"updateSize",function(){var c=s.props,f=c.width,m=c.height,p=c.options;p!=null&&p.resolution||(s.app.renderer.resolution=window.devicePixelRatio,s.resetInteractionManager()),s.app.renderer.resize(f,m)}),Pt(Hi(s),"needsRenderUpdate",function(){s._needsUpdate=!0}),Pt(Hi(s),"renderStage",function(){var c=s.props,f=c.renderOnComponentChange;!c.raf&&f&&s._needsUpdate&&(s._needsUpdate=!1,s.app.renderer.render(s.app.stage))}),s}return e=i,(r=[{key:"componentDidMount",value:function(){var s=this.props,o=s.onMount,l=s.width,h=s.height,c=s.options,f=s.raf,m=s.renderOnComponentChange;this.app=new fp(td(td({width:l,height:h,view:this._canvas},c),{},{autoDensity:(c==null?void 0:c.autoDensity)!==!1})),this.app.ticker.autoStart=!1,this.app.ticker[f?"start":"stop"](),this.app.stage.__reactpixi={root:this.app.stage},this.mountNode=Wn.createContainer(this.app.stage),Wn.updateContainer(this.getChildren(),this.mountNode,this),o(this.app),c!=null&&c.autoDensity&&window.matchMedia&&(c==null?void 0:c.resolution)===void 0&&(this._mediaQuery=window.matchMedia("(-webkit-min-device-pixel-ratio: 1.3), (min-resolution: 120dpi)"),this._mediaQuery.addListener(this.updateSize)),m&&!f&&(this._ticker=new Yt,this._ticker.autoStart=!0,this._ticker.add(this.renderStage),this.app.stage.on("__REACT_PIXI_REQUEST_RENDER__",this.needsRenderUpdate)),this.updateSize(),this.renderStage()}},{key:"componentDidUpdate",value:function(s,o,l){var h,c=this.props,f=c.width,m=c.height,p=c.raf,v=c.renderOnComponentChange,_=c.options;(_==null?void 0:_.resolution)!==void 0&&(s==null?void 0:s.options.resolution)!==(_==null?void 0:_.resolution)&&(this.app.renderer.resolution=_.resolution,this.resetInteractionManager()),s.height===m&&s.width===f&&((h=s.options)===null||h===void 0?void 0:h.resolution)===(_==null?void 0:_.resolution)||this.updateSize(),s.raf!==p&&this.app.ticker[p?"start":"stop"](),Wn.updateContainer(this.getChildren(),this.mountNode,this),s.width===f&&s.height===m&&s.raf===p&&s.renderOnComponentChange===v&&s.options===_||(this._needsUpdate=!0,this.renderStage())}},{key:"resetInteractionManager",value:function(){var s=this.app.renderer.plugins.interaction;s!=null&&s.resolution&&(s.resolution=this.app.renderer.resolution)}},{key:"getChildren",value:function(){var s=this.props.children;return Si.createElement(WC,{value:this.app},s)}},{key:"componentDidCatch",value:function(s,o){console.error("Error occurred in `Stage`."),console.error(s),console.error(o)}},{key:"componentWillUnmount",value:function(){this.props.onUnmount(this.app),this._ticker&&(this._ticker.remove(this.renderStage),this._ticker.destroy()),this.app.stage.off("__REACT_PIXI_REQUEST_RENDER__",this.needsRenderUpdate),Wn.updateContainer(null,this.mountNode,this),this._mediaQuery&&(this._mediaQuery.removeListener(this.updateSize),this._mediaQuery=null),this.app.destroy()}},{key:"render",value:function(){var s,o,l=this,h=this.props.options;return h&&h.view?(Et(h.view instanceof HTMLCanvasElement,"options.view needs to be a `HTMLCanvasElement`"),null):Si.createElement("canvas",th({},(s=this.props,o=[].concat(ss(Object.keys(XC)),ss(Object.keys(zv))),Object.keys(s).filter(function(c){return!o.includes(c)}).reduce(function(c,f){return td(td({},c),{},Pt({},f,s[f]))},{})),{ref:function(c){return l._canvas=c}}))}}])&&lF(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),i}();$v.propTypes=XC,$v.defaultProps=dF;var fF=$v;function YC(){var t=ke.useContext(pp);return Et(t instanceof fp,"No Context found with `%s`. Make sure to wrap component with `%s`","Application","AppProvider"),t}function pF(t){var e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],r=YC();Et(typeof t=="function","`useTick` needs a callback function."),Et(r instanceof fp,"No Context found with `%s`. Make sure to wrap component with `%s`","Application","AppProvider");var n=ke.useRef(null);ke.useEffect(function(){n.current=t},[t]),ke.useEffect(function(){if(e){var i=function(s){return n.current.apply(r.ticker,[s,r.ticker])};return r.ticker.add(i),function(){r.ticker&&r.ticker.remove(i)}}},[e])}function mF(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Wv(t,e,r){return Wv=mF()?Reflect.construct.bind():function(n,i,s){var o=[null];o.push.apply(o,i);var l=new(Function.bind.apply(n,o));return s&&Cf(l,s.prototype),l},Wv.apply(null,arguments)}var gF=["children","apply"];function rS(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function rd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?rS(Object(r),!0).forEach(function(n){Pt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rS(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var yF=function(t,e){Et(Jr(e)==="object","Second argument needs to be an indexed object with { prop: Filter }");var r=Object.keys(e),n=function(i){var s=i.children,o=i.apply,l=ro(i,gF),h=ke.useRef(ke.useMemo(function(){return r.map(function(m){var p,v=(l==null||(p=l[m])===null||p===void 0?void 0:p.construct)||[];return Wv(e[m],ss(v))})},[r])),c=ke.useMemo(function(){return r.reduce(function(m,p,v){return rd(rd({},m),{},Pt({},p,h.current[v]))},{})},[r]),f=ke.useMemo(function(){return Object.keys(l).filter(UC(LC(r))).reduce(function(m,p){return rd(rd({},m),{},Pt({},p,l[p]))},{})},[l,r]);return r.forEach(function(m,p){return Object.assign(h.current[p],l[m])}),o&&function(){for(var m=arguments.length,p=new Array(m),v=0;v<m;v++)p[v]=arguments[v];return p.every(function(_){return typeof _=="function"})}(o)&&o.call(t,c),Si.createElement(t,th({},f,{filters:h.current}),s)};return n.displayName="FilterWrapper",n.propTypes={children:it.node,apply:it.func},n},vF=Gr.BitmapText,_F=Gr.Container,xF=Gr.Graphics,wF=Gr.NineSlicePlane,EF=Gr.ParticleContainer,SF=Gr.Sprite,bF=Gr.AnimatedSprite,TF=Gr.Text,AF=Gr.TilingSprite,CF=Gr.SimpleMesh,PF=Gr.SimpleRope;const IF=Object.freeze(Object.defineProperty({__proto__:null,AnimatedSprite:bF,AppConsumer:VC,AppContext:pp,AppProvider:WC,BitmapText:vF,Container:_F,Graphics:xF,NineSlicePlane:wF,ParticleContainer:EF,PixiComponent:qO,PixiFiber:Wn,SimpleMesh:CF,SimpleRope:PF,Sprite:SF,Stage:fF,TYPES:Gr,Text:TF,TilingSprite:AF,applyDefaultProps:Ri,createRoot:$C,eventHandlers:Af,render:sF,unmountComponentAtNode:oF,useApp:YC,useTick:pF,withFilters:yF,withPixiApp:hF},Symbol.toStringTag,{value:"Module"})),RF=SS(IF);KT.exports=RF;var nr=KT.exports;const QC=new ot;ct.prototype._cacheAsBitmap=!1;ct.prototype._cacheData=null;ct.prototype._cacheAsBitmapResolution=null;ct.prototype._cacheAsBitmapMultisample=null;class MF{constructor(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null}}Object.defineProperties(ct.prototype,{cacheAsBitmapResolution:{get(){return this._cacheAsBitmapResolution},set(t){t!==this._cacheAsBitmapResolution&&(this._cacheAsBitmapResolution=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmapMultisample:{get(){return this._cacheAsBitmapMultisample},set(t){t!==this._cacheAsBitmapMultisample&&(this._cacheAsBitmapMultisample=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmap:{get(){return this._cacheAsBitmap},set(t){if(this._cacheAsBitmap===t)return;this._cacheAsBitmap=t;let e;t?(this._cacheData||(this._cacheData=new MF),e=this._cacheData,e.originalRender=this.render,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this.calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):(e=this._cacheData,e.sprite&&this._destroyCachedDisplayObject(),this.render=e.originalRender,this.renderCanvas=e.originalRenderCanvas,this.calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea)}}});ct.prototype._renderCached=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(t))};ct.prototype._initCachedDisplayObject=function(t){var p,v;if((p=this._cacheData)!=null&&p.sprite)return;const e=this.alpha;this.alpha=1,t.batch.flush();const r=this.getLocalBounds(new De,!0);if((v=this.filters)!=null&&v.length){const _=this.filters[0].padding;r.pad(_)}const n=this.cacheAsBitmapResolution||t.resolution;r.ceil(n),r.width=Math.max(r.width,1/n),r.height=Math.max(r.height,1/n);const i=t.renderTexture.current,s=t.renderTexture.sourceFrame.clone(),o=t.renderTexture.destinationFrame.clone(),l=t.projection.transform,h=Qo.create({width:r.width,height:r.height,resolution:n,multisample:this.cacheAsBitmapMultisample??t.multisample}),c=`cacheAsBitmap_${$o()}`;this._cacheData.textureCacheId=c,Ne.addToCache(h.baseTexture,c),se.addToCache(h,c);const f=this.transform.localTransform.copyTo(QC).invert().translate(-r.x,-r.y);this.render=this._cacheData.originalRender,t.render(this,{renderTexture:h,clear:!0,transform:f,skipUpdateTransform:!1}),t.framebuffer.blit(),t.projection.transform=l,t.renderTexture.bind(i,s,o),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=e;const m=new ki(h);m.transform.worldTransform=this.transform.worldTransform,m.anchor.x=-(r.x/r.width),m.anchor.y=-(r.y/r.height),m.alpha=e,m._bounds=this._bounds,this._cacheData.sprite=m,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=m.containsPoint.bind(m)};ct.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(t))};ct.prototype._initCachedDisplayObjectCanvas=function(t){var f;if((f=this._cacheData)!=null&&f.sprite)return;const e=this.getLocalBounds(new De,!0),r=this.alpha;this.alpha=1;const n=t.canvasContext.activeContext,i=t._projTransform,s=this.cacheAsBitmapResolution||t.resolution;e.ceil(s),e.width=Math.max(e.width,1/s),e.height=Math.max(e.height,1/s);const o=Qo.create({width:e.width,height:e.height,resolution:s}),l=`cacheAsBitmap_${$o()}`;this._cacheData.textureCacheId=l,Ne.addToCache(o.baseTexture,l),se.addToCache(o,l);const h=QC;this.transform.localTransform.copyTo(h),h.invert(),h.tx-=e.x,h.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,{renderTexture:o,clear:!0,transform:h,skipUpdateTransform:!1}),t.canvasContext.activeContext=n,t._projTransform=i,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=r;const c=new ki(o);c.transform.worldTransform=this.transform.worldTransform,c.anchor.x=-(e.x/e.width),c.anchor.y=-(e.y/e.height),c.alpha=r,c._bounds=this._bounds,this._cacheData.sprite=c,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=c.containsPoint.bind(c)};ct.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID};ct.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)};ct.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,Ne.removeFromCache(this._cacheData.textureCacheId),se.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null};ct.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)};ct.prototype.name=null;Tr.prototype.getChildByName=function(t,e){for(let r=0,n=this.children.length;r<n;r++)if(this.children[r].name===t)return this.children[r];if(e)for(let r=0,n=this.children.length;r<n;r++){const i=this.children[r];if(!i.getChildByName)continue;const s=i.getChildByName(t,!0);if(s)return s}return null};ct.prototype.getGlobalPosition=function(t=new Ge,e=!1){return this.parent?this.parent.toGlobal(this.position,t,e):(t.x=this.position.x,t.y=this.position.y),t};var kF=`varying vec2 vTextureCoord;
858
+ `+a.join(" > ")}return null},e.getPublicRootInstance=function(a){return(a=a.current).child?a.child.tag===5?_e(a.child.stateNode):a.child.stateNode:null},e.injectIntoDevTools=function(a){if(a={bundleType:a.bundleType,version:a.version,rendererPackageName:a.rendererPackageName,rendererConfig:a.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:o.ReactCurrentDispatcher,findHostInstanceByFiber:U2,findFiberByHostInstance:a.findFiberByHostInstance||z2,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")a=!1;else{var u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(u.isDisabled||!u.supportsFiber)a=!0;else{try{Ih=u.inject(a),Zn=u}catch{}a=!!u.checkDCE}}return a},e.isAlreadyRendering=function(){return!1},e.observeVisibleRects=function(a,u,d,g){if(!Xe)throw Error(s(363));a=gm(a,u);var y=Ir(a,d,g).disconnect;return{disconnect:function(){y()}}},e.registerMutableSourceForHydration=function(a,u){var d=u._getVersion;d=d(u._source),a.mutableSourceEagerHydrationData==null?a.mutableSourceEagerHydrationData=[u,d]:a.mutableSourceEagerHydrationData.push(u,d)},e.runWithPriority=function(a,u){var d=We;try{return We=a,u()}finally{We=d}},e.shouldError=function(){return null},e.shouldSuspend=function(){return!1},e.updateContainer=function(a,u,d,g){var y=u.current,w=dr(),C=gs(y);return d=q1(d),u.context===null?u.context=d:u.pendingContext=d,(u=Fi(w,C)).payload={element:a},(g=g===void 0?null:g)!==null&&(u.callback=g),(a=ds(y,u,C))!==null&&(dn(a,y,C,w),Bh(a,y,C)),C},e}),XE}({get exports(){return Gv},set exports(t){Gv=t}}).exports=eF();var tF=CO(Gv),GC={name:"root",dependencies:{"react-dom":"^18.0.0"}},jv={},ed={get exports(){return jv},set exports(t){jv=t}};(function(){var t,e,r,n,i,s;typeof performance<"u"&&performance!==null&&performance.now?ed.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(ed.exports=function(){return(t()-i)/1e6},e=process.hrtime,n=(t=function(){var o;return 1e9*(o=e())[0]+o[1]})(),s=1e9*process.uptime(),i=n-s):Date.now?(ed.exports=function(){return Date.now()-r},r=Date.now()):(ed.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(AO);var KE,Ga={},_o={};({get exports(){return Ga},set exports(t){Ga=t}}).exports=(KE||(KE=1,_o.ConcurrentRoot=1,_o.ContinuousEventPriority=4,_o.DefaultEventPriority=16,_o.DiscreteEventPriority=1,_o.IdleEventPriority=536870912,_o.LegacyRoot=0),_o);var rF={};function qg(t,e){t.addChild&&(t.addChild(e),typeof e.didMount=="function"&&e.didMount(e,t))}function HC(t,e){var r,n,i;(r=t.willUnmount)===null||r===void 0||r.call(t,t,e),((n=t.config)===null||n===void 0?void 0:n.destroyChildren)!==!1&&(i=t.children)!==null&&i!==void 0&&i.length&&ss(t.children).forEach(function(s){HC(s,t)})}function qE(t,e){var r;HC(e,t),t.removeChild(e);var n=(r=e.config)!==null&&r!==void 0?r:{},i=n.destroy,s=i===void 0||i,o=n.destroyChildren,l=o===void 0||o,h=n.destroyTexture,c=h!==void 0&&h,f=n.destroyBaseTexture,m=f!==void 0&&f;s&&e.destroy({children:l,texture:c,baseTexture:m})}function ZE(t,e,r){var n,i;Et(e!==r,"Cannot insert node before itself"),t.children.indexOf(e)!==-1&&t.removeChild(e);var s=t.getChildIndex(r);t.addChildAt(e,s),(n=t.__reactpixi)===null||n===void 0||(i=n.root)===null||i===void 0||i.emit("__REACT_PIXI_REQUEST_RENDER__",{detail:"insertBefore"})}var JE=null,Wn=tF({getRootHostContext:function(){return rF},getChildHostContext:function(t){return t},getChildHostContextForEventComponent:function(t){return t},getPublicInstance:function(t){return t},getCurrentEventPriority:function(){return function(){var t,e;if(typeof window>"u")return Ga.DefaultEventPriority;switch((t=window)===null||t===void 0||(e=t.event)===null||e===void 0?void 0:e.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Ga.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Ga.ContinuousEventPriority;default:return Ga.DefaultEventPriority}}()},prepareForCommit:function(){return null},resetAfterCommit:function(){},createInstance:function(t){var e,r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,s=KO[t];if(typeof s=="function"&&(e=s(i,n)),!e){var o=zC[t];o&&((e=o.create(n,{root:i})).didMount=o.didMount?o.didMount.bind(e):void 0,e.willUnmount=o.willUnmount?o.willUnmount.bind(e):void 0,e.applyProps=o.applyProps?o.applyProps.bind(e):void 0,e.config=o.config)}return e&&(e.__reactpixi={root:i},(typeof((r=e)===null||r===void 0?void 0:r.applyProps)=="function"?e.applyProps:Ri)(e,{},n)),e},hideInstance:function(t){t.visible=!1},unhideInstance:function(t,e){var r=e==null||!e.hasOwnProperty("visible")||e.visible;t.visible=r},finalizeInitialChildren:function(t,e,r){return!1},prepareUpdate:function(t,e,r,n,i,s){return JE=function(o,l,h,c){var f=null;for(var m in h)!c.hasOwnProperty(m)&&h.hasOwnProperty(m)&&h[m]!==null&&(m===Uv||(f||(f=[]),f.push(m,null)));for(var p in c){var v=c[p],_=h!==null?h[p]:void 0;!c.hasOwnProperty(p)||v===_||v===null&&_===null||p===Uv||(f||(f=[]),f.push(p,v))}return f}(0,0,r,n)},shouldSetTextContent:function(t,e){return!1},shouldDeprioritizeSubtree:function(t,e){var r=e.alpha===void 0||e.alpha>0,n=e.renderable===void 0||e.renderable===!0,i=e.visible===void 0||e.visible===!0;return!(r&&n&&i)},createTextInstance:function(t,e,r){Et(!1,'Error trying to add text node "'.concat(t,'"'),"text strings as children of a Pixi component is not supported. To add some text, use &lt;Text text={string} /&gt;")},unhideTextInstance:function(t,e){},mountEventComponent:function(){},updateEventComponent:function(){},handleEventTarget:function(){},scheduleTimeout:setTimeout,cancelTimeout:clearTimeout,noTimeout:-1,warnsIfNotActing:!1,now:jv,isPrimaryRenderer:!1,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,supportsMicrotasks:!0,scheduleMicrotask:queueMicrotask,appendInitialChild:function(){for(var t,e,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var s=qg.apply(null,n);return(t=n[0].__reactpixi)===null||t===void 0||(e=t.root)===null||e===void 0||e.emit("__REACT_PIXI_REQUEST_RENDER__",{detail:"appendInitialChild"}),s},appendChild:function(){for(var t,e,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var s=qg.apply(null,n);return(t=n[0].__reactpixi)===null||t===void 0||(e=t.root)===null||e===void 0||e.emit("__REACT_PIXI_REQUEST_RENDER__",{detail:"appendChild"}),s},appendChildToContainer:function(){for(var t,e,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var s=qg.apply(null,n);return(t=n[0].__reactpixi)===null||t===void 0||(e=t.root)===null||e===void 0||e.emit("__REACT_PIXI_REQUEST_RENDER__",{detail:"appendChildToContainer"}),s},removeChild:function(){for(var t,e,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var s=qE.apply(null,n);return(t=n[0].__reactpixi)===null||t===void 0||(e=t.root)===null||e===void 0||e.emit("__REACT_PIXI_REQUEST_RENDER__",{detail:"removeChild"}),s},removeChildFromContainer:function(){for(var t,e,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var s=qE.apply(null,n);return(t=n[0].__reactpixi)===null||t===void 0||(e=t.root)===null||e===void 0||e.emit("__REACT_PIXI_REQUEST_RENDER__",{detail:"removeChildFromContainer"}),s},insertBefore:ZE,insertInContainerBefore:function(){for(var t,e,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var s=ZE.apply(null,n);return(t=n[0].__reactpixi)===null||t===void 0||(e=t.root)===null||e===void 0||e.emit("__REACT_PIXI_REQUEST_RENDER__",{detail:"insertInContainerBefore"}),s},commitUpdate:function(t,e,r,n,i){var s,o,l=t&&t.applyProps;typeof l!="function"&&(l=Ri),(l(t,n,i)||JE)&&((s=t.__reactpixi)===null||s===void 0||(o=s.root)===null||o===void 0||o.emit("__REACT_PIXI_REQUEST_RENDER__",{detail:"commitUpdate"}))},commitMount:function(t,e,r,n,i){},commitTextUpdate:function(t,e,r){},resetTextContent:function(t){},clearContainer:function(t){},getFundamentalComponentInstance:function(t){throw new Error("Not yet implemented.")},mountFundamentalComponent:function(t){throw new Error("Not yet implemented.")},shouldUpdateFundamentalComponent:function(t){throw new Error("Not yet implemented.")},unmountFundamentalComponent:function(t){throw new Error("Not yet implemented.")},getInstanceFromNode:function(t){throw new Error("Not yet implemented.")},isOpaqueHydratingObject:function(t){throw new Error("Not yet implemented")},makeOpaqueHydratingObject:function(t){throw new Error("Not yet implemented.")},makeClientIdInDEV:function(t){throw new Error("Not yet implemented")},beforeActiveInstanceBlur:function(t){},afterActiveInstanceBlur:function(){},detachDeletedInstance:function(){},preparePortalMount:function(t){}}),nF=GC.dependencies["react-dom"].replace(/[^0-9.]/g,""),iF=GC.name;Wn.injectIntoDevTools({bundleType:0,version:nF,rendererPackageName:iF,findHostInstanceByFiber:Wn.findHostInstance});var $s=new Map;function jC(t){if(Et(Tr.prototype.isPrototypeOf(t),"Invalid argument `container`, expected instance of `Container`."),$s.has(t)){var e=$s.get(t).pixiFiberContainer;Wn.updateContainer(null,e,void 0,function(){$s.delete(t)})}}function $C(t){Et(Tr.prototype.isPrototypeOf(t),"Invalid argument `container`, expected instance of `Container`.");var e=$s.get(t);if(Et(!e,"createRoot should only be called once"),!e){var r=Wn.createContainer(t);e={pixiFiberContainer:r,reactRoot:{render:function(n){return Wn.updateContainer(n,r,void 0),Wn.getPublicRootInstance(r)},unmount:function(){jC(t),$s.delete(t)}}},$s.set(t,e)}return e.reactRoot}function sF(t,e,r){var n;return console.warn("Pixi React Deprecation Warning: render is deprecated, use createRoot instead"),r!==void 0&&console.warn("Pixi React Deprecation Warning: render callback no longer exists in React 18"),$s.has(e)?n=$s.get(e).reactRoot:n=$C(e),n.render(t)}function oF(t){jC(t)}function th(){return th=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},th.apply(this,arguments)}function aF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lF(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,BC(n.key),n)}}function Hi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Cf(t,e){return Cf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Cf(t,e)}function uF(t,e){if(e&&(Jr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hi(t)}function Pf(t){return Pf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pf(t)}var pp=Si.createContext(null),WC=pp.Provider,VC=pp.Consumer,hF=function(t){var e=Si.forwardRef(function(r,n){return Si.createElement(VC,null,function(i){return Si.createElement(t,th({},r,{ref:n,app:i}))})});return e.displayName="withPIXIApp(".concat(t.displayName||t.name,")"),e};function cF(t){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var r,n=Pf(t);if(e){var i=Pf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return uF(this,r)}}function eS(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function td(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?eS(Object(r),!0).forEach(function(n){Pt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):eS(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var tS=function(){},XC={width:it.number,height:it.number,onMount:it.func,onUnmount:it.func,raf:it.bool,renderOnComponentChange:it.bool,children:it.node,options:it.shape({autoStart:it.bool,width:it.number,height:it.number,useContextAlpha:it.bool,backgroundAlpha:it.number,autoDensity:it.bool,antialias:it.bool,preserveDrawingBuffer:it.bool,resolution:it.number,forceCanvas:it.bool,backgroundColor:it.number,clearBeforeRender:it.bool,powerPreference:it.string,sharedTicker:it.bool,sharedLoader:it.bool,resizeTo:function(t,e){var r=t[e];r&&Et(r===window||r instanceof HTMLElement,"Invalid prop `resizeTo` of type ".concat(Jr(r),", expect `window` or an `HTMLElement`."))},view:function(t,e,r){var n=t[e];n&&Et(n instanceof HTMLCanvasElement,"Invalid prop `view` of type ".concat(Jr(n),", supplied to ").concat(r,", expected `<canvas> Element`"))}})},dF={width:800,height:600,onMount:tS,onUnmount:tS,raf:!0,renderOnComponentChange:!0},$v=function(t){(function(s,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(o&&o.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),o&&Cf(s,o)})(i,Si.Component);var e,r,n=cF(i);function i(){var s;aF(this,i);for(var o=arguments.length,l=new Array(o),h=0;h<o;h++)l[h]=arguments[h];return Pt(Hi(s=n.call.apply(n,[this].concat(l))),"_canvas",null),Pt(Hi(s),"_mediaQuery",null),Pt(Hi(s),"_ticker",null),Pt(Hi(s),"_needsUpdate",!0),Pt(Hi(s),"app",null),Pt(Hi(s),"updateSize",function(){var c=s.props,f=c.width,m=c.height,p=c.options;p!=null&&p.resolution||(s.app.renderer.resolution=window.devicePixelRatio,s.resetInteractionManager()),s.app.renderer.resize(f,m)}),Pt(Hi(s),"needsRenderUpdate",function(){s._needsUpdate=!0}),Pt(Hi(s),"renderStage",function(){var c=s.props,f=c.renderOnComponentChange;!c.raf&&f&&s._needsUpdate&&(s._needsUpdate=!1,s.app.renderer.render(s.app.stage))}),s}return e=i,(r=[{key:"componentDidMount",value:function(){var s=this.props,o=s.onMount,l=s.width,h=s.height,c=s.options,f=s.raf,m=s.renderOnComponentChange;this.app=new fp(td(td({width:l,height:h,view:this._canvas},c),{},{autoDensity:(c==null?void 0:c.autoDensity)!==!1})),this.app.ticker.autoStart=!1,this.app.ticker[f?"start":"stop"](),this.app.stage.__reactpixi={root:this.app.stage},this.mountNode=Wn.createContainer(this.app.stage),Wn.updateContainer(this.getChildren(),this.mountNode,this),o(this.app),c!=null&&c.autoDensity&&window.matchMedia&&(c==null?void 0:c.resolution)===void 0&&(this._mediaQuery=window.matchMedia("(-webkit-min-device-pixel-ratio: 1.3), (min-resolution: 120dpi)"),this._mediaQuery.addListener(this.updateSize)),m&&!f&&(this._ticker=new Yt,this._ticker.autoStart=!0,this._ticker.add(this.renderStage),this.app.stage.on("__REACT_PIXI_REQUEST_RENDER__",this.needsRenderUpdate)),this.updateSize(),this.renderStage()}},{key:"componentDidUpdate",value:function(s,o,l){var h,c=this.props,f=c.width,m=c.height,p=c.raf,v=c.renderOnComponentChange,_=c.options;(_==null?void 0:_.resolution)!==void 0&&(s==null?void 0:s.options.resolution)!==(_==null?void 0:_.resolution)&&(this.app.renderer.resolution=_.resolution,this.resetInteractionManager()),s.height===m&&s.width===f&&((h=s.options)===null||h===void 0?void 0:h.resolution)===(_==null?void 0:_.resolution)||this.updateSize(),s.raf!==p&&this.app.ticker[p?"start":"stop"](),Wn.updateContainer(this.getChildren(),this.mountNode,this),s.width===f&&s.height===m&&s.raf===p&&s.renderOnComponentChange===v&&s.options===_||(this._needsUpdate=!0,this.renderStage())}},{key:"resetInteractionManager",value:function(){var s=this.app.renderer.plugins.interaction;s!=null&&s.resolution&&(s.resolution=this.app.renderer.resolution)}},{key:"getChildren",value:function(){var s=this.props.children;return Si.createElement(WC,{value:this.app},s)}},{key:"componentDidCatch",value:function(s,o){console.error("Error occurred in `Stage`."),console.error(s),console.error(o)}},{key:"componentWillUnmount",value:function(){this.props.onUnmount(this.app),this._ticker&&(this._ticker.remove(this.renderStage),this._ticker.destroy()),this.app.stage.off("__REACT_PIXI_REQUEST_RENDER__",this.needsRenderUpdate),Wn.updateContainer(null,this.mountNode,this),this._mediaQuery&&(this._mediaQuery.removeListener(this.updateSize),this._mediaQuery=null),this.app.destroy()}},{key:"render",value:function(){var s,o,l=this,h=this.props.options;return h&&h.view?(Et(h.view instanceof HTMLCanvasElement,"options.view needs to be a `HTMLCanvasElement`"),null):Si.createElement("canvas",th({},(s=this.props,o=[].concat(ss(Object.keys(XC)),ss(Object.keys(zv))),Object.keys(s).filter(function(c){return!o.includes(c)}).reduce(function(c,f){return td(td({},c),{},Pt({},f,s[f]))},{})),{ref:function(c){return l._canvas=c}}))}}])&&lF(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),i}();$v.propTypes=XC,$v.defaultProps=dF;var fF=$v;function YC(){var t=Ce.useContext(pp);return Et(t instanceof fp,"No Context found with `%s`. Make sure to wrap component with `%s`","Application","AppProvider"),t}function pF(t){var e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],r=YC();Et(typeof t=="function","`useTick` needs a callback function."),Et(r instanceof fp,"No Context found with `%s`. Make sure to wrap component with `%s`","Application","AppProvider");var n=Ce.useRef(null);Ce.useEffect(function(){n.current=t},[t]),Ce.useEffect(function(){if(e){var i=function(s){return n.current.apply(r.ticker,[s,r.ticker])};return r.ticker.add(i),function(){r.ticker&&r.ticker.remove(i)}}},[e])}function mF(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Wv(t,e,r){return Wv=mF()?Reflect.construct.bind():function(n,i,s){var o=[null];o.push.apply(o,i);var l=new(Function.bind.apply(n,o));return s&&Cf(l,s.prototype),l},Wv.apply(null,arguments)}var gF=["children","apply"];function rS(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function rd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?rS(Object(r),!0).forEach(function(n){Pt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rS(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var yF=function(t,e){Et(Jr(e)==="object","Second argument needs to be an indexed object with { prop: Filter }");var r=Object.keys(e),n=function(i){var s=i.children,o=i.apply,l=ro(i,gF),h=Ce.useRef(Ce.useMemo(function(){return r.map(function(m){var p,v=(l==null||(p=l[m])===null||p===void 0?void 0:p.construct)||[];return Wv(e[m],ss(v))})},[r])),c=Ce.useMemo(function(){return r.reduce(function(m,p,v){return rd(rd({},m),{},Pt({},p,h.current[v]))},{})},[r]),f=Ce.useMemo(function(){return Object.keys(l).filter(UC(LC(r))).reduce(function(m,p){return rd(rd({},m),{},Pt({},p,l[p]))},{})},[l,r]);return r.forEach(function(m,p){return Object.assign(h.current[p],l[m])}),o&&function(){for(var m=arguments.length,p=new Array(m),v=0;v<m;v++)p[v]=arguments[v];return p.every(function(_){return typeof _=="function"})}(o)&&o.call(t,c),Si.createElement(t,th({},f,{filters:h.current}),s)};return n.displayName="FilterWrapper",n.propTypes={children:it.node,apply:it.func},n},vF=Gr.BitmapText,_F=Gr.Container,xF=Gr.Graphics,wF=Gr.NineSlicePlane,EF=Gr.ParticleContainer,SF=Gr.Sprite,bF=Gr.AnimatedSprite,TF=Gr.Text,AF=Gr.TilingSprite,CF=Gr.SimpleMesh,PF=Gr.SimpleRope;const IF=Object.freeze(Object.defineProperty({__proto__:null,AnimatedSprite:bF,AppConsumer:VC,AppContext:pp,AppProvider:WC,BitmapText:vF,Container:_F,Graphics:xF,NineSlicePlane:wF,ParticleContainer:EF,PixiComponent:qO,PixiFiber:Wn,SimpleMesh:CF,SimpleRope:PF,Sprite:SF,Stage:fF,TYPES:Gr,Text:TF,TilingSprite:AF,applyDefaultProps:Ri,createRoot:$C,eventHandlers:Af,render:sF,unmountComponentAtNode:oF,useApp:YC,useTick:pF,withFilters:yF,withPixiApp:hF},Symbol.toStringTag,{value:"Module"})),RF=SS(IF);KT.exports=RF;var nr=KT.exports;const QC=new ot;ct.prototype._cacheAsBitmap=!1;ct.prototype._cacheData=null;ct.prototype._cacheAsBitmapResolution=null;ct.prototype._cacheAsBitmapMultisample=null;class MF{constructor(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null}}Object.defineProperties(ct.prototype,{cacheAsBitmapResolution:{get(){return this._cacheAsBitmapResolution},set(t){t!==this._cacheAsBitmapResolution&&(this._cacheAsBitmapResolution=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmapMultisample:{get(){return this._cacheAsBitmapMultisample},set(t){t!==this._cacheAsBitmapMultisample&&(this._cacheAsBitmapMultisample=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmap:{get(){return this._cacheAsBitmap},set(t){if(this._cacheAsBitmap===t)return;this._cacheAsBitmap=t;let e;t?(this._cacheData||(this._cacheData=new MF),e=this._cacheData,e.originalRender=this.render,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this.calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):(e=this._cacheData,e.sprite&&this._destroyCachedDisplayObject(),this.render=e.originalRender,this.renderCanvas=e.originalRenderCanvas,this.calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea)}}});ct.prototype._renderCached=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(t))};ct.prototype._initCachedDisplayObject=function(t){var p,v;if((p=this._cacheData)!=null&&p.sprite)return;const e=this.alpha;this.alpha=1,t.batch.flush();const r=this.getLocalBounds(new De,!0);if((v=this.filters)!=null&&v.length){const _=this.filters[0].padding;r.pad(_)}const n=this.cacheAsBitmapResolution||t.resolution;r.ceil(n),r.width=Math.max(r.width,1/n),r.height=Math.max(r.height,1/n);const i=t.renderTexture.current,s=t.renderTexture.sourceFrame.clone(),o=t.renderTexture.destinationFrame.clone(),l=t.projection.transform,h=Qo.create({width:r.width,height:r.height,resolution:n,multisample:this.cacheAsBitmapMultisample??t.multisample}),c=`cacheAsBitmap_${$o()}`;this._cacheData.textureCacheId=c,Ne.addToCache(h.baseTexture,c),se.addToCache(h,c);const f=this.transform.localTransform.copyTo(QC).invert().translate(-r.x,-r.y);this.render=this._cacheData.originalRender,t.render(this,{renderTexture:h,clear:!0,transform:f,skipUpdateTransform:!1}),t.framebuffer.blit(),t.projection.transform=l,t.renderTexture.bind(i,s,o),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=e;const m=new ki(h);m.transform.worldTransform=this.transform.worldTransform,m.anchor.x=-(r.x/r.width),m.anchor.y=-(r.y/r.height),m.alpha=e,m._bounds=this._bounds,this._cacheData.sprite=m,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=m.containsPoint.bind(m)};ct.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(t))};ct.prototype._initCachedDisplayObjectCanvas=function(t){var f;if((f=this._cacheData)!=null&&f.sprite)return;const e=this.getLocalBounds(new De,!0),r=this.alpha;this.alpha=1;const n=t.canvasContext.activeContext,i=t._projTransform,s=this.cacheAsBitmapResolution||t.resolution;e.ceil(s),e.width=Math.max(e.width,1/s),e.height=Math.max(e.height,1/s);const o=Qo.create({width:e.width,height:e.height,resolution:s}),l=`cacheAsBitmap_${$o()}`;this._cacheData.textureCacheId=l,Ne.addToCache(o.baseTexture,l),se.addToCache(o,l);const h=QC;this.transform.localTransform.copyTo(h),h.invert(),h.tx-=e.x,h.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,{renderTexture:o,clear:!0,transform:h,skipUpdateTransform:!1}),t.canvasContext.activeContext=n,t._projTransform=i,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=r;const c=new ki(o);c.transform.worldTransform=this.transform.worldTransform,c.anchor.x=-(e.x/e.width),c.anchor.y=-(e.y/e.height),c.alpha=r,c._bounds=this._bounds,this._cacheData.sprite=c,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=c.containsPoint.bind(c)};ct.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID};ct.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)};ct.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,Ne.removeFromCache(this._cacheData.textureCacheId),se.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null};ct.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)};ct.prototype.name=null;Tr.prototype.getChildByName=function(t,e){for(let r=0,n=this.children.length;r<n;r++)if(this.children[r].name===t)return this.children[r];if(e)for(let r=0,n=this.children.length;r<n;r++){const i=this.children[r];if(!i.getChildByName)continue;const s=i.getChildByName(t,!0);if(s)return s}return null};ct.prototype.getGlobalPosition=function(t=new Ge,e=!1){return this.parent?this.parent.toGlobal(this.position,t,e):(t.x=this.position.x,t.y=this.position.y),t};var kF=`varying vec2 vTextureCoord;
859
859
 
860
860
  uniform sampler2D uSampler;
861
861
  uniform float uAlpha;
@@ -1195,7 +1195,7 @@ void main()
1195
1195
 
1196
1196
  gl_FragColor = color;
1197
1197
  }
1198
- `;class YF extends Sr{constructor(e=.5,r=Math.random()){super(dC,XF,{uNoise:0,uSeed:0}),this.noise=e,this.seed=r}get noise(){return this.uniforms.uNoise}set noise(e){this.uniforms.uNoise=e}get seed(){return this.uniforms.uSeed}set seed(e){this.uniforms.uSeed=e}}const nS={AlphaFilter:NF,BlurFilter:UF,BlurFilterPass:Vv,ColorMatrixFilter:Xv,DisplacementFilter:jF,FXAAFilter:VF,NoiseFilter:YF};Object.entries(nS).forEach(([t,e])=>{Object.defineProperty(nS,t,{get(){return Ue("7.1.0",`filters.${t} has moved to ${t}`),e}})});class QF{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this.tickerAdded||!this.domElement||(Yt.system.add(this.tickerUpdate,this,Qs.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(Yt.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const e=this.events.rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:e.clientX,clientY:e.clientY}))}tickerUpdate(e){this._deltaTime+=e,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.update())}}const Rs=new QF;class fh{constructor(e){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=fh.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Ge,this.page=new Ge,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(e,r,n){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(e,r,n,i,s){throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}}class If extends fh{constructor(){super(...arguments),this.client=new Ge,this.movement=new Ge,this.offset=new Ge,this.global=new Ge,this.screen=new Ge}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(e,r,n){return e.worldTransform.applyInverse(n||this.global,r)}getModifierState(e){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(e)}initMouseEvent(e,r,n,i,s,o,l,h,c,f,m,p,v,_,E){throw new Error("Method not implemented.")}}class Ln extends If{constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1}getCoalescedEvents(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}getPredictedEvents(){throw new Error("getPredictedEvents is not supported!")}}class rl extends If{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}}rl.DOM_DELTA_PIXEL=0,rl.DOM_DELTA_LINE=1,rl.DOM_DELTA_PAGE=2;const KF=2048,qF=new Ge,Zg=new Ge;class ZF{constructor(e){this.dispatch=new lh,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=e,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mappingTable={},this.addEventMapping("pointerdown",this.mapPointerDown),this.addEventMapping("pointermove",this.mapPointerMove),this.addEventMapping("pointerout",this.mapPointerOut),this.addEventMapping("pointerleave",this.mapPointerOut),this.addEventMapping("pointerover",this.mapPointerOver),this.addEventMapping("pointerup",this.mapPointerUp),this.addEventMapping("pointerupoutside",this.mapPointerUpOutside),this.addEventMapping("wheel",this.mapWheel)}addEventMapping(e,r){this.mappingTable[e]||(this.mappingTable[e]=[]),this.mappingTable[e].push({fn:r,priority:0}),this.mappingTable[e].sort((n,i)=>n.priority-i.priority)}dispatchEvent(e,r){e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,r),this.dispatch.emit(r||e.type,e)}mapEvent(e){if(!this.rootTarget)return;const r=this.mappingTable[e.type];if(r)for(let n=0,i=r.length;n<i;n++)r[n].fn(e);else console.warn(`[EventBoundary]: Event mapping not defined for ${e.type}`)}hitTest(e,r){Rs.pauseUpdate=!0;const n=this._isPointerMoveEvent&&this.enableGlobalMoveEvents?"hitTestMoveRecursive":"hitTestRecursive",i=this[n](this.rootTarget,this.rootTarget.eventMode,qF.set(e,r),this.hitTestFn,this.hitPruneFn);return i&&i[0]}propagate(e,r){if(!e.target)return;const n=e.composedPath();e.eventPhase=e.CAPTURING_PHASE;for(let i=0,s=n.length-1;i<s;i++)if(e.currentTarget=n[i],this.notifyTarget(e,r),e.propagationStopped||e.propagationImmediatelyStopped)return;if(e.eventPhase=e.AT_TARGET,e.currentTarget=e.target,this.notifyTarget(e,r),!(e.propagationStopped||e.propagationImmediatelyStopped)){e.eventPhase=e.BUBBLING_PHASE;for(let i=n.length-2;i>=0;i--)if(e.currentTarget=n[i],this.notifyTarget(e,r),e.propagationStopped||e.propagationImmediatelyStopped)return}}all(e,r,n=this._allInteractiveElements){if(n.length===0)return;e.eventPhase=e.BUBBLING_PHASE;const i=Array.isArray(r)?r:[r];for(let s=n.length-1;s>=0;s--)i.forEach(o=>{e.currentTarget=n[s],this.notifyTarget(e,o)})}propagationPath(e){const r=[e];for(let n=0;n<KF&&e!==this.rootTarget;n++){if(!e.parent)throw new Error("Cannot find propagation path to disconnected target");r.push(e.parent),e=e.parent}return r.reverse(),r}hitTestMoveRecursive(e,r,n,i,s,o=!1){let l=!1;if(this._interactivePrune(e))return null;if((e.eventMode==="dynamic"||r==="dynamic")&&(Rs.pauseUpdate=!1),e.interactiveChildren&&e.children){const f=e.children;for(let m=f.length-1;m>=0;m--){const p=f[m],v=this.hitTestMoveRecursive(p,this._isInteractive(r)?r:p.eventMode,n,i,s,o||s(e,n));if(v){if(v.length>0&&!v[v.length-1].parent)continue;const _=e.isInteractive();(v.length>0||_)&&(_&&this._allInteractiveElements.push(e),v.push(e)),this._hitElements.length===0&&(this._hitElements=v),l=!0}}}const h=this._isInteractive(r),c=e.isInteractive();return h&&c&&this._allInteractiveElements.push(e),o||this._hitElements.length>0?null:l?this._hitElements:h&&!s(e,n)&&i(e,n)?c?[e]:[]:null}hitTestRecursive(e,r,n,i,s){if(this._interactivePrune(e)||s(e,n))return null;if((e.eventMode==="dynamic"||r==="dynamic")&&(Rs.pauseUpdate=!1),e.interactiveChildren&&e.children){const h=e.children;for(let c=h.length-1;c>=0;c--){const f=h[c],m=this.hitTestRecursive(f,this._isInteractive(r)?r:f.eventMode,n,i,s);if(m){if(m.length>0&&!m[m.length-1].parent)continue;const p=e.isInteractive();return(m.length>0||p)&&m.push(e),m}}}const o=this._isInteractive(r),l=e.isInteractive();return o&&i(e,n)?l?[e]:[]:null}_isInteractive(e){return e==="static"||e==="dynamic"}_interactivePrune(e){return!!(!e||e.isMask||!e.visible||!e.renderable||e.eventMode==="none"||e.eventMode==="passive"&&!e.interactiveChildren||e.isMask)}hitPruneFn(e,r){var n;if(e.hitArea&&(e.worldTransform.applyInverse(r,Zg),!e.hitArea.contains(Zg.x,Zg.y)))return!0;if(e._mask){const i=e._mask.isMaskData?e._mask.maskObject:e._mask;if(i&&!((n=i.containsPoint)!=null&&n.call(i,r)))return!0}return!1}hitTestFn(e,r){return e.eventMode==="passive"?!1:e.hitArea?!0:e.containsPoint?e.containsPoint(r):!1}notifyTarget(e,r){var s,o;r=r??e.type;const n=`on${r}`;(o=(s=e.currentTarget)[n])==null||o.call(s,e);const i=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?`${r}capture`:r;this.notifyListeners(e,i),e.eventPhase===e.AT_TARGET&&this.notifyListeners(e,r)}mapPointerDown(e){if(!(e instanceof Ln)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const r=this.createPointerEvent(e);if(this.dispatchEvent(r,"pointerdown"),r.pointerType==="touch")this.dispatchEvent(r,"touchstart");else if(r.pointerType==="mouse"||r.pointerType==="pen"){const i=r.button===2;this.dispatchEvent(r,i?"rightdown":"mousedown")}const n=this.trackingData(e.pointerId);n.pressTargetsByButton[e.button]=r.composedPath(),this.freeEvent(r)}mapPointerMove(e){var h,c;if(!(e instanceof Ln)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;const r=this.createPointerEvent(e);this._isPointerMoveEvent=!1;const n=r.pointerType==="mouse"||r.pointerType==="pen",i=this.trackingData(e.pointerId),s=this.findMountedTarget(i.overTargets);if(((h=i.overTargets)==null?void 0:h.length)>0&&s!==r.target){const f=e.type==="mousemove"?"mouseout":"pointerout",m=this.createPointerEvent(e,f,s);if(this.dispatchEvent(m,"pointerout"),n&&this.dispatchEvent(m,"mouseout"),!r.composedPath().includes(s)){const p=this.createPointerEvent(e,"pointerleave",s);for(p.eventPhase=p.AT_TARGET;p.target&&!r.composedPath().includes(p.target);)p.currentTarget=p.target,this.notifyTarget(p),n&&this.notifyTarget(p,"mouseleave"),p.target=p.target.parent;this.freeEvent(p)}this.freeEvent(m)}if(s!==r.target){const f=e.type==="mousemove"?"mouseover":"pointerover",m=this.clonePointerEvent(r,f);this.dispatchEvent(m,"pointerover"),n&&this.dispatchEvent(m,"mouseover");let p=s==null?void 0:s.parent;for(;p&&p!==this.rootTarget.parent&&p!==r.target;)p=p.parent;if(!p||p===this.rootTarget.parent){const v=this.clonePointerEvent(r,"pointerenter");for(v.eventPhase=v.AT_TARGET;v.target&&v.target!==s&&v.target!==this.rootTarget.parent;)v.currentTarget=v.target,this.notifyTarget(v),n&&this.notifyTarget(v,"mouseenter"),v.target=v.target.parent;this.freeEvent(v)}this.freeEvent(m)}const o=[],l=this.enableGlobalMoveEvents??!0;this.moveOnAll?o.push("pointermove"):this.dispatchEvent(r,"pointermove"),l&&o.push("globalpointermove"),r.pointerType==="touch"&&(this.moveOnAll?o.splice(1,0,"touchmove"):this.dispatchEvent(r,"touchmove"),l&&o.push("globaltouchmove")),n&&(this.moveOnAll?o.splice(1,0,"mousemove"):this.dispatchEvent(r,"mousemove"),l&&o.push("globalmousemove"),this.cursor=(c=r.target)==null?void 0:c.cursor),o.length>0&&this.all(r,o),this._allInteractiveElements.length=0,this._hitElements.length=0,i.overTargets=r.composedPath(),this.freeEvent(r)}mapPointerOver(e){var o;if(!(e instanceof Ln)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const r=this.trackingData(e.pointerId),n=this.createPointerEvent(e),i=n.pointerType==="mouse"||n.pointerType==="pen";this.dispatchEvent(n,"pointerover"),i&&this.dispatchEvent(n,"mouseover"),n.pointerType==="mouse"&&(this.cursor=(o=n.target)==null?void 0:o.cursor);const s=this.clonePointerEvent(n,"pointerenter");for(s.eventPhase=s.AT_TARGET;s.target&&s.target!==this.rootTarget.parent;)s.currentTarget=s.target,this.notifyTarget(s),i&&this.notifyTarget(s,"mouseenter"),s.target=s.target.parent;r.overTargets=n.composedPath(),this.freeEvent(n),this.freeEvent(s)}mapPointerOut(e){if(!(e instanceof Ln)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const r=this.trackingData(e.pointerId);if(r.overTargets){const n=e.pointerType==="mouse"||e.pointerType==="pen",i=this.findMountedTarget(r.overTargets),s=this.createPointerEvent(e,"pointerout",i);this.dispatchEvent(s),n&&this.dispatchEvent(s,"mouseout");const o=this.createPointerEvent(e,"pointerleave",i);for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==this.rootTarget.parent;)o.currentTarget=o.target,this.notifyTarget(o),n&&this.notifyTarget(o,"mouseleave"),o.target=o.target.parent;r.overTargets=null,this.freeEvent(s),this.freeEvent(o)}this.cursor=null}mapPointerUp(e){if(!(e instanceof Ln)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const r=performance.now(),n=this.createPointerEvent(e);if(this.dispatchEvent(n,"pointerup"),n.pointerType==="touch")this.dispatchEvent(n,"touchend");else if(n.pointerType==="mouse"||n.pointerType==="pen"){const l=n.button===2;this.dispatchEvent(n,l?"rightup":"mouseup")}const i=this.trackingData(e.pointerId),s=this.findMountedTarget(i.pressTargetsByButton[e.button]);let o=s;if(s&&!n.composedPath().includes(s)){let l=s;for(;l&&!n.composedPath().includes(l);){if(n.currentTarget=l,this.notifyTarget(n,"pointerupoutside"),n.pointerType==="touch")this.notifyTarget(n,"touchendoutside");else if(n.pointerType==="mouse"||n.pointerType==="pen"){const h=n.button===2;this.notifyTarget(n,h?"rightupoutside":"mouseupoutside")}l=l.parent}delete i.pressTargetsByButton[e.button],o=l}if(o){const l=this.clonePointerEvent(n,"click");l.target=o,l.path=null,i.clicksByButton[e.button]||(i.clicksByButton[e.button]={clickCount:0,target:l.target,timeStamp:r});const h=i.clicksByButton[e.button];if(h.target===l.target&&r-h.timeStamp<200?++h.clickCount:h.clickCount=1,h.target=l.target,h.timeStamp=r,l.detail=h.clickCount,l.pointerType==="mouse"){const c=l.button===2;this.dispatchEvent(l,c?"rightclick":"click")}else l.pointerType==="touch"&&this.dispatchEvent(l,"tap");this.dispatchEvent(l,"pointertap"),this.freeEvent(l)}this.freeEvent(n)}mapPointerUpOutside(e){if(!(e instanceof Ln)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const r=this.trackingData(e.pointerId),n=this.findMountedTarget(r.pressTargetsByButton[e.button]),i=this.createPointerEvent(e);if(n){let s=n;for(;s;)i.currentTarget=s,this.notifyTarget(i,"pointerupoutside"),i.pointerType==="touch"?this.notifyTarget(i,"touchendoutside"):(i.pointerType==="mouse"||i.pointerType==="pen")&&this.notifyTarget(i,i.button===2?"rightupoutside":"mouseupoutside"),s=s.parent;delete r.pressTargetsByButton[e.button]}this.freeEvent(i)}mapWheel(e){if(!(e instanceof rl)){console.warn("EventBoundary cannot map a non-wheel event as a wheel event");return}const r=this.createWheelEvent(e);this.dispatchEvent(r),this.freeEvent(r)}findMountedTarget(e){if(!e)return null;let r=e[0];for(let n=1;n<e.length&&e[n].parent===r;n++)r=e[n];return r}createPointerEvent(e,r,n){const i=this.allocateEvent(Ln);return this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.nativeEvent=e.nativeEvent,i.originalEvent=e,i.target=n??this.hitTest(i.global.x,i.global.y)??this._hitElements[0],typeof r=="string"&&(i.type=r),i}createWheelEvent(e){const r=this.allocateEvent(rl);return this.copyWheelData(e,r),this.copyMouseData(e,r),this.copyData(e,r),r.nativeEvent=e.nativeEvent,r.originalEvent=e,r.target=this.hitTest(r.global.x,r.global.y),r}clonePointerEvent(e,r){const n=this.allocateEvent(Ln);return n.nativeEvent=e.nativeEvent,n.originalEvent=e.originalEvent,this.copyPointerData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.target=e.target,n.path=e.composedPath().slice(),n.type=r??n.type,n}copyWheelData(e,r){r.deltaMode=e.deltaMode,r.deltaX=e.deltaX,r.deltaY=e.deltaY,r.deltaZ=e.deltaZ}copyPointerData(e,r){e instanceof Ln&&r instanceof Ln&&(r.pointerId=e.pointerId,r.width=e.width,r.height=e.height,r.isPrimary=e.isPrimary,r.pointerType=e.pointerType,r.pressure=e.pressure,r.tangentialPressure=e.tangentialPressure,r.tiltX=e.tiltX,r.tiltY=e.tiltY,r.twist=e.twist)}copyMouseData(e,r){e instanceof If&&r instanceof If&&(r.altKey=e.altKey,r.button=e.button,r.buttons=e.buttons,r.client.copyFrom(e.client),r.ctrlKey=e.ctrlKey,r.metaKey=e.metaKey,r.movement.copyFrom(e.movement),r.screen.copyFrom(e.screen),r.shiftKey=e.shiftKey,r.global.copyFrom(e.global))}copyData(e,r){r.isTrusted=e.isTrusted,r.srcElement=e.srcElement,r.timeStamp=performance.now(),r.type=e.type,r.detail=e.detail,r.view=e.view,r.which=e.which,r.layer.copyFrom(e.layer),r.page.copyFrom(e.page)}trackingData(e){return this.mappingState.trackingData[e]||(this.mappingState.trackingData[e]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[e]}allocateEvent(e){this.eventPool.has(e)||this.eventPool.set(e,[]);const r=this.eventPool.get(e).pop()||new e(this);return r.eventPhase=r.NONE,r.currentTarget=null,r.path=null,r.target=null,r}freeEvent(e){if(e.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");const r=e.constructor;this.eventPool.has(r)||this.eventPool.set(r,[]),this.eventPool.get(r).push(e)}notifyListeners(e,r){const n=e.currentTarget._events[r];if(n&&e.currentTarget.isInteractive())if("fn"in n)n.once&&e.currentTarget.removeListener(r,n.fn,void 0,!0),n.fn.call(n.context,e);else for(let i=0,s=n.length;i<s&&!e.propagationImmediatelyStopped;i++)n[i].once&&e.currentTarget.removeListener(r,n[i].fn,void 0,!0),n[i].fn.call(n[i].context,e)}}const JF=1,eB={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},Yv=class Qv{constructor(e){this.supportsTouchEvents="ontouchstart"in globalThis,this.supportsPointerEvents=!!globalThis.PointerEvent,this.domElement=null,this.resolution=1,this.renderer=e,this.rootBoundary=new ZF(null),Rs.init(this),this.autoPreventDefault=!0,this.eventsAdded=!1,this.rootPointerEvent=new Ln(null),this.rootWheelEvent=new rl(null),this.cursorStyles={default:"inherit",pointer:"pointer"},this.features=new Proxy({...Qv.defaultEventFeatures},{set:(r,n,i)=>(n==="globalMove"&&(this.rootBoundary.enableGlobalMoveEvents=i),r[n]=i,!0)}),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOverOut=this.onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(e){const{view:r,resolution:n}=this.renderer;this.setTargetElement(r),this.resolution=n,Qv._defaultEventMode=e.eventMode??"auto",Object.assign(this.features,e.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(e){this.resolution=e}destroy(){this.setTargetElement(null),this.renderer=null}setCursor(e){e=e||"default";let r=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(r=!1),this.currentCursor===e)return;this.currentCursor=e;const n=this.cursorStyles[e];if(n)switch(typeof n){case"string":r&&(this.domElement.style.cursor=n);break;case"function":n(e);break;case"object":r&&Object.assign(this.domElement.style,n);break}else r&&typeof e=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,e)&&(this.domElement.style.cursor=e)}get pointer(){return this.rootPointerEvent}onPointerDown(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;const r=this.normalizeToPointerData(e);this.autoPreventDefault&&r[0].isNormalized&&(e.cancelable||!("cancelable"in e))&&e.preventDefault();for(let n=0,i=r.length;n<i;n++){const s=r[n],o=this.bootstrapEvent(this.rootPointerEvent,s);this.rootBoundary.mapEvent(o)}this.setCursor(this.rootBoundary.cursor)}onPointerMove(e){if(!this.features.move)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,Rs.pointerMoved();const r=this.normalizeToPointerData(e);for(let n=0,i=r.length;n<i;n++){const s=this.bootstrapEvent(this.rootPointerEvent,r[n]);this.rootBoundary.mapEvent(s)}this.setCursor(this.rootBoundary.cursor)}onPointerUp(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let r=e.target;e.composedPath&&e.composedPath().length>0&&(r=e.composedPath()[0]);const n=r!==this.domElement?"outside":"",i=this.normalizeToPointerData(e);for(let s=0,o=i.length;s<o;s++){const l=this.bootstrapEvent(this.rootPointerEvent,i[s]);l.type+=n,this.rootBoundary.mapEvent(l)}this.setCursor(this.rootBoundary.cursor)}onPointerOverOut(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;const r=this.normalizeToPointerData(e);for(let n=0,i=r.length;n<i;n++){const s=this.bootstrapEvent(this.rootPointerEvent,r[n]);this.rootBoundary.mapEvent(s)}this.setCursor(this.rootBoundary.cursor)}onWheel(e){if(!this.features.wheel)return;const r=this.normalizeWheelEvent(e);this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.rootBoundary.mapEvent(r)}setTargetElement(e){this.removeEvents(),this.domElement=e,Rs.domElement=e,this.addEvents()}addEvents(){if(this.eventsAdded||!this.domElement)return;Rs.addTickerListener();const e=this.domElement.style;e&&(globalThis.navigator.msPointerEnabled?(e.msContentZooming="none",e.msTouchAction="none"):this.supportsPointerEvents&&(e.touchAction="none")),this.supportsPointerEvents?(globalThis.document.addEventListener("pointermove",this.onPointerMove,!0),this.domElement.addEventListener("pointerdown",this.onPointerDown,!0),this.domElement.addEventListener("pointerleave",this.onPointerOverOut,!0),this.domElement.addEventListener("pointerover",this.onPointerOverOut,!0),globalThis.addEventListener("pointerup",this.onPointerUp,!0)):(globalThis.document.addEventListener("mousemove",this.onPointerMove,!0),this.domElement.addEventListener("mousedown",this.onPointerDown,!0),this.domElement.addEventListener("mouseout",this.onPointerOverOut,!0),this.domElement.addEventListener("mouseover",this.onPointerOverOut,!0),globalThis.addEventListener("mouseup",this.onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.addEventListener("touchstart",this.onPointerDown,!0),this.domElement.addEventListener("touchend",this.onPointerUp,!0),this.domElement.addEventListener("touchmove",this.onPointerMove,!0))),this.domElement.addEventListener("wheel",this.onWheel,{passive:!0,capture:!0}),this.eventsAdded=!0}removeEvents(){if(!this.eventsAdded||!this.domElement)return;Rs.removeTickerListener();const e=this.domElement.style;globalThis.navigator.msPointerEnabled?(e.msContentZooming="",e.msTouchAction=""):this.supportsPointerEvents&&(e.touchAction=""),this.supportsPointerEvents?(globalThis.document.removeEventListener("pointermove",this.onPointerMove,!0),this.domElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.domElement.removeEventListener("pointerleave",this.onPointerOverOut,!0),this.domElement.removeEventListener("pointerover",this.onPointerOverOut,!0),globalThis.removeEventListener("pointerup",this.onPointerUp,!0)):(globalThis.document.removeEventListener("mousemove",this.onPointerMove,!0),this.domElement.removeEventListener("mousedown",this.onPointerDown,!0),this.domElement.removeEventListener("mouseout",this.onPointerOverOut,!0),this.domElement.removeEventListener("mouseover",this.onPointerOverOut,!0),globalThis.removeEventListener("mouseup",this.onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.removeEventListener("touchstart",this.onPointerDown,!0),this.domElement.removeEventListener("touchend",this.onPointerUp,!0),this.domElement.removeEventListener("touchmove",this.onPointerMove,!0))),this.domElement.removeEventListener("wheel",this.onWheel,!0),this.domElement=null,this.eventsAdded=!1}mapPositionToPoint(e,r,n){const i=this.domElement.isConnected?this.domElement.getBoundingClientRect():{width:this.domElement.width,height:this.domElement.height,left:0,top:0},s=1/this.resolution;e.x=(r-i.left)*(this.domElement.width/i.width)*s,e.y=(n-i.top)*(this.domElement.height/i.height)*s}normalizeToPointerData(e){const r=[];if(this.supportsTouchEvents&&e instanceof TouchEvent)for(let n=0,i=e.changedTouches.length;n<i;n++){const s=e.changedTouches[n];typeof s.button>"u"&&(s.button=0),typeof s.buttons>"u"&&(s.buttons=1),typeof s.isPrimary>"u"&&(s.isPrimary=e.touches.length===1&&e.type==="touchstart"),typeof s.width>"u"&&(s.width=s.radiusX||1),typeof s.height>"u"&&(s.height=s.radiusY||1),typeof s.tiltX>"u"&&(s.tiltX=0),typeof s.tiltY>"u"&&(s.tiltY=0),typeof s.pointerType>"u"&&(s.pointerType="touch"),typeof s.pointerId>"u"&&(s.pointerId=s.identifier||0),typeof s.pressure>"u"&&(s.pressure=s.force||.5),typeof s.twist>"u"&&(s.twist=0),typeof s.tangentialPressure>"u"&&(s.tangentialPressure=0),typeof s.layerX>"u"&&(s.layerX=s.offsetX=s.clientX),typeof s.layerY>"u"&&(s.layerY=s.offsetY=s.clientY),s.isNormalized=!0,s.type=e.type,r.push(s)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){const n=e;typeof n.isPrimary>"u"&&(n.isPrimary=!0),typeof n.width>"u"&&(n.width=1),typeof n.height>"u"&&(n.height=1),typeof n.tiltX>"u"&&(n.tiltX=0),typeof n.tiltY>"u"&&(n.tiltY=0),typeof n.pointerType>"u"&&(n.pointerType="mouse"),typeof n.pointerId>"u"&&(n.pointerId=JF),typeof n.pressure>"u"&&(n.pressure=.5),typeof n.twist>"u"&&(n.twist=0),typeof n.tangentialPressure>"u"&&(n.tangentialPressure=0),n.isNormalized=!0,r.push(n)}else r.push(e);return r}normalizeWheelEvent(e){const r=this.rootWheelEvent;return this.transferMouseData(r,e),r.deltaX=e.deltaX,r.deltaY=e.deltaY,r.deltaZ=e.deltaZ,r.deltaMode=e.deltaMode,this.mapPositionToPoint(r.screen,e.clientX,e.clientY),r.global.copyFrom(r.screen),r.offset.copyFrom(r.screen),r.nativeEvent=e,r.type=e.type,r}bootstrapEvent(e,r){return e.originalEvent=null,e.nativeEvent=r,e.pointerId=r.pointerId,e.width=r.width,e.height=r.height,e.isPrimary=r.isPrimary,e.pointerType=r.pointerType,e.pressure=r.pressure,e.tangentialPressure=r.tangentialPressure,e.tiltX=r.tiltX,e.tiltY=r.tiltY,e.twist=r.twist,this.transferMouseData(e,r),this.mapPositionToPoint(e.screen,r.clientX,r.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.isTrusted=r.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=eB[e.type]||e.type),e}transferMouseData(e,r){e.isTrusted=r.isTrusted,e.srcElement=r.srcElement,e.timeStamp=performance.now(),e.type=r.type,e.altKey=r.altKey,e.button=r.button,e.buttons=r.buttons,e.client.x=r.clientX,e.client.y=r.clientY,e.ctrlKey=r.ctrlKey,e.metaKey=r.metaKey,e.movement.x=r.movementX,e.movement.y=r.movementY,e.page.x=r.pageX,e.page.y=r.pageY,e.relatedTarget=null,e.shiftKey=r.shiftKey}};Yv.extension={name:"events",type:[ae.RendererSystem,ae.CanvasRendererSystem]},Yv.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};let Kv=Yv;we.add(Kv);function iS(t){return t==="dynamic"||t==="static"}const tB={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,_internalInteractive:void 0,get interactive(){return this._internalInteractive??iS(Kv.defaultEventMode)},set interactive(t){Ue("7.2.0","Setting interactive is deprecated, use eventMode = 'none'/'passive'/'auto'/'static'/'dynamic' instead."),this._internalInteractive=t,this.eventMode=t?"static":"auto"},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??Kv.defaultEventMode},set eventMode(t){this._internalInteractive=iS(t),this._internalEventMode=t},isInteractive(){return this.eventMode==="static"||this.eventMode==="dynamic"},interactiveChildren:!0,hitArea:null,addEventListener(t,e,r){const n=typeof r=="boolean"&&r||typeof r=="object"&&r.capture,i=typeof r=="object"?r.signal:void 0,s=typeof r=="object"?r.once===!0:!1,o=typeof e=="function"?void 0:e;t=n?`${t}capture`:t;const l=typeof e=="function"?e:e.handleEvent,h=this;i&&i.addEventListener("abort",()=>{h.off(t,l,o)}),s?h.once(t,l,o):h.on(t,l,o)},removeEventListener(t,e,r){const n=typeof r=="boolean"&&r||typeof r=="object"&&r.capture,i=typeof e=="function"?void 0:e;t=n?`${t}capture`:t,e=typeof e=="function"?e:e.handleEvent,this.off(t,e,i)},dispatchEvent(t){if(!(t instanceof fh))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");return t.defaultPrevented=!1,t.path=null,t.target=this,t.manager.dispatchEvent(t),!t.defaultPrevented}};ct.mixin(tB);const rB={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};ct.mixin(rB);const nB=9,nd=100,iB=0,sB=0,sS=2,oS=1,oB=-1e3,aB=-1e3,lB=2;class KC{constructor(e){this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this.pool=[],this.renderId=0,this.children=[],this.androidUpdateCount=0,this.androidUpdateFrequency=500,this._hookDiv=null,(Yi.tablet||Yi.phone)&&this.createTouchHook();const r=document.createElement("div");r.style.width=`${nd}px`,r.style.height=`${nd}px`,r.style.position="absolute",r.style.top=`${iB}px`,r.style.left=`${sB}px`,r.style.zIndex=sS.toString(),this.div=r,this.renderer=e,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}createTouchHook(){const e=document.createElement("button");e.style.width=`${oS}px`,e.style.height=`${oS}px`,e.style.position="absolute",e.style.top=`${oB}px`,e.style.left=`${aB}px`,e.style.zIndex=lB.toString(),e.style.backgroundColor="#FF0000",e.title="select to enable accessibility for this content",e.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this.activate(),this.destroyTouchHook()}),document.body.appendChild(e),this._hookDiv=e}destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}activate(){var e;this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),(e=this.renderer.view.parentNode)==null||e.appendChild(this.div))}deactivate(){var e;!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),(e=this.div.parentNode)==null||e.removeChild(this.div))}updateAccessibleObjects(e){if(!e.visible||!e.accessibleChildren)return;e.accessible&&e.isInteractive()&&(e._accessibleActive||this.addChild(e),e.renderId=this.renderId);const r=e.children;if(r)for(let n=0;n<r.length;n++)this.updateAccessibleObjects(r[n])}update(){const e=performance.now();if(Yi.android.device&&e<this.androidUpdateCount||(this.androidUpdateCount=e+this.androidUpdateFrequency,!this.renderer.renderingToScreen))return;this.renderer.lastObjectRendered&&this.updateAccessibleObjects(this.renderer.lastObjectRendered);const{x:r,y:n,width:i,height:s}=this.renderer.view.getBoundingClientRect(),{width:o,height:l,resolution:h}=this.renderer,c=i/o*h,f=s/l*h;let m=this.div;m.style.left=`${r}px`,m.style.top=`${n}px`,m.style.width=`${o}px`,m.style.height=`${l}px`;for(let p=0;p<this.children.length;p++){const v=this.children[p];if(v.renderId!==this.renderId)v._accessibleActive=!1,Za(this.children,p,1),this.div.removeChild(v._accessibleDiv),this.pool.push(v._accessibleDiv),v._accessibleDiv=null,p--;else{m=v._accessibleDiv;let _=v.hitArea;const E=v.worldTransform;v.hitArea?(m.style.left=`${(E.tx+_.x*E.a)*c}px`,m.style.top=`${(E.ty+_.y*E.d)*f}px`,m.style.width=`${_.width*E.a*c}px`,m.style.height=`${_.height*E.d*f}px`):(_=v.getBounds(),this.capHitArea(_),m.style.left=`${_.x*c}px`,m.style.top=`${_.y*f}px`,m.style.width=`${_.width*c}px`,m.style.height=`${_.height*f}px`,m.title!==v.accessibleTitle&&v.accessibleTitle!==null&&(m.title=v.accessibleTitle),m.getAttribute("aria-label")!==v.accessibleHint&&v.accessibleHint!==null&&m.setAttribute("aria-label",v.accessibleHint)),(v.accessibleTitle!==m.title||v.tabIndex!==m.tabIndex)&&(m.title=v.accessibleTitle,m.tabIndex=v.tabIndex,this.debug&&this.updateDebugHTML(m))}}this.renderId++}updateDebugHTML(e){e.innerHTML=`type: ${e.type}</br> title : ${e.title}</br> tabIndex: ${e.tabIndex}`}capHitArea(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);const{width:r,height:n}=this.renderer;e.x+e.width>r&&(e.width=r-e.x),e.y+e.height>n&&(e.height=n-e.y)}addChild(e){let r=this.pool.pop();r||(r=document.createElement("button"),r.style.width=`${nd}px`,r.style.height=`${nd}px`,r.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",r.style.position="absolute",r.style.zIndex=sS.toString(),r.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?r.setAttribute("aria-live","off"):r.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?r.setAttribute("aria-relevant","additions"):r.setAttribute("aria-relevant","text"),r.addEventListener("click",this._onClick.bind(this)),r.addEventListener("focus",this._onFocus.bind(this)),r.addEventListener("focusout",this._onFocusOut.bind(this))),r.style.pointerEvents=e.accessiblePointerEvents,r.type=e.accessibleType,e.accessibleTitle&&e.accessibleTitle!==null?r.title=e.accessibleTitle:(!e.accessibleHint||e.accessibleHint===null)&&(r.title=`displayObject ${e.tabIndex}`),e.accessibleHint&&e.accessibleHint!==null&&r.setAttribute("aria-label",e.accessibleHint),this.debug&&this.updateDebugHTML(r),e._accessibleActive=!0,e._accessibleDiv=r,r.displayObject=e,this.children.push(e),this.div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex}_dispatchEvent(e,r){const{displayObject:n}=e.target,i=this.renderer.events.rootBoundary,s=Object.assign(new fh(i),{target:n});i.rootTarget=this.renderer.lastObjectRendered,r.forEach(o=>i.dispatchEvent(s,o))}_onClick(e){this._dispatchEvent(e,["click","pointertap","tap"])}_onFocus(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","assertive"),this._dispatchEvent(e,["mouseover"])}_onFocusOut(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","polite"),this._dispatchEvent(e,["mouseout"])}_onKeyDown(e){e.keyCode===nB&&this.activate()}_onMouseMove(e){e.movementX===0&&e.movementY===0||this.deactivate()}destroy(){this.destroyTouchHook(),this.div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null}}KC.extension={name:"accessibility",type:[ae.RendererPlugin,ae.CanvasRendererPlugin]};we.add(KC);var tr=(t=>(t[t.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",t[t.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",t[t.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",t[t.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",t[t.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",t[t.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",t[t.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",t[t.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",t[t.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",t[t.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",t[t.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",t[t.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",t[t.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",t[t.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",t[t.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",t[t.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",t[t.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",t[t.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",t[t.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",t[t.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",t[t.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",t[t.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35987]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",t[t.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",t[t.COMPRESSED_RGBA_ASTC_4x4_KHR=37808]="COMPRESSED_RGBA_ASTC_4x4_KHR",t[t.COMPRESSED_RGBA_BPTC_UNORM_EXT=36492]="COMPRESSED_RGBA_BPTC_UNORM_EXT",t[t.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=36493]="COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT",t[t.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT=36494]="COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT",t[t.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT=36495]="COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT",t))(tr||{});const Rf={33776:.5,33777:.5,33778:1,33779:1,35916:.5,35917:.5,35918:1,35919:1,37488:.5,37489:.5,37490:1,37491:1,37492:.5,37496:1,37493:.5,37497:1,37494:.5,37495:.5,35840:.5,35842:.5,35841:.25,35843:.25,36196:.5,35986:.5,35987:1,34798:1,37808:1,36492:1,36493:1,36494:1,36495:1};let pi,ba;function aS(){ba={bptc:pi.getExtension("EXT_texture_compression_bptc"),astc:pi.getExtension("WEBGL_compressed_texture_astc"),etc:pi.getExtension("WEBGL_compressed_texture_etc"),s3tc:pi.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:pi.getExtension("WEBGL_compressed_texture_s3tc_srgb"),pvrtc:pi.getExtension("WEBGL_compressed_texture_pvrtc")||pi.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),etc1:pi.getExtension("WEBGL_compressed_texture_etc1"),atc:pi.getExtension("WEBGL_compressed_texture_atc")}}const uB={extension:{type:ae.DetectionParser,priority:2},test:async()=>{const t=he.ADAPTER.createCanvas().getContext("webgl");return t?(pi=t,!0):(console.warn("WebGL not available for compressed textures."),!1)},add:async t=>{ba||aS();const e=[];for(const r in ba)ba[r]&&e.push(r);return[...e,...t]},remove:async t=>(ba||aS(),t.filter(e=>!(e in ba)))};we.add(uB);class hB extends np{constructor(e,r={width:1,height:1,autoLoad:!0}){let n,i;typeof e=="string"?(n=e,i=new Uint8Array):(n=null,i=e),super(i,r),this.origin=n,this.buffer=i?new mv(i):null,this._load=null,this.loaded=!1,this.origin!==null&&r.autoLoad!==!1&&this.load(),this.origin===null&&this.buffer&&(this._load=Promise.resolve(this),this.loaded=!0,this.onBlobLoaded(this.buffer.rawBinaryData))}onBlobLoaded(e){}load(){return this._load?this._load:(this._load=fetch(this.origin).then(e=>e.blob()).then(e=>e.arrayBuffer()).then(e=>(this.data=new Uint32Array(e),this.buffer=new mv(e),this.loaded=!0,this.onBlobLoaded(e),this.update(),this)),this._load)}}class Bo extends hB{constructor(e,r){super(e,r),this.format=r.format,this.levels=r.levels||1,this._width=r.width,this._height=r.height,this._extension=Bo._formatToExtension(this.format),(r.levelBuffers||this.buffer)&&(this._levelBuffers=r.levelBuffers||Bo._createLevelBuffers(e instanceof Uint8Array?e:this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height))}upload(e,r,n){const i=e.gl;if(!e.context.extensions[this._extension])throw new Error(`${this._extension} textures are not supported on the current machine`);if(!this._levelBuffers)return!1;i.pixelStorei(i.UNPACK_ALIGNMENT,4);for(let s=0,o=this.levels;s<o;s++){const{levelID:l,levelWidth:h,levelHeight:c,levelBuffer:f}=this._levelBuffers[s];i.compressedTexImage2D(i.TEXTURE_2D,l,this.format,h,c,0,f)}return!0}onBlobLoaded(){this._levelBuffers=Bo._createLevelBuffers(this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height)}static _formatToExtension(e){if(e>=33776&&e<=33779)return"s3tc";if(e>=35916&&e<=35919)return"s3tc_sRGB";if(e>=37488&&e<=37497)return"etc";if(e>=35840&&e<=35843)return"pvrtc";if(e===36196)return"etc1";if(e===35986||e===35987||e===34798)return"atc";if(e>=36492&&e<=36495)return"bptc";if(e===37808)return"astc";throw new Error(`Invalid (compressed) texture format given: ${e}`)}static _createLevelBuffers(e,r,n,i,s,o,l){const h=new Array(n);let c=e.byteOffset,f=o,m=l,p=f+i-1&~(i-1),v=m+s-1&~(s-1),_=p*v*Rf[r];for(let E=0;E<n;E++)h[E]={levelID:E,levelWidth:n>1?f:p,levelHeight:n>1?m:v,levelBuffer:new Uint8Array(e.buffer,c,_)},c+=_,f=f>>1||1,m=m>>1||1,p=f+i-1&~(i-1),v=m+s-1&~(s-1),_=p*v*Rf[r];return h}}const Jg=4,id=124,cB=32,lS=20,dB=542327876,sd={HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},fB={FOURCC:2},od={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3},pB=1,mB=2,gB=4,yB=64,vB=512,_B=131072,xB=827611204,wB=861165636,EB=894720068,SB=808540228,bB=4,TB={[xB]:tr.COMPRESSED_RGBA_S3TC_DXT1_EXT,[wB]:tr.COMPRESSED_RGBA_S3TC_DXT3_EXT,[EB]:tr.COMPRESSED_RGBA_S3TC_DXT5_EXT},AB={70:tr.COMPRESSED_RGBA_S3TC_DXT1_EXT,71:tr.COMPRESSED_RGBA_S3TC_DXT1_EXT,73:tr.COMPRESSED_RGBA_S3TC_DXT3_EXT,74:tr.COMPRESSED_RGBA_S3TC_DXT3_EXT,76:tr.COMPRESSED_RGBA_S3TC_DXT5_EXT,77:tr.COMPRESSED_RGBA_S3TC_DXT5_EXT,72:tr.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,75:tr.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,78:tr.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,96:tr.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT,95:tr.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT,98:tr.COMPRESSED_RGBA_BPTC_UNORM_EXT,99:tr.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT};function CB(t){const e=new Uint32Array(t);if(e[0]!==dB)throw new Error("Invalid DDS file magic word");const r=new Uint32Array(t,0,id/Uint32Array.BYTES_PER_ELEMENT),n=r[sd.HEIGHT],i=r[sd.WIDTH],s=r[sd.MIPMAP_COUNT],o=new Uint32Array(t,sd.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,cB/Uint32Array.BYTES_PER_ELEMENT),l=o[pB];if(l&gB){const h=o[fB.FOURCC];if(h!==SB){const b=TB[h],x=Jg+id,A=new Uint8Array(t,x);return[new Bo(A,{format:b,width:i,height:n,levels:s})]}const c=Jg+id,f=new Uint32Array(e.buffer,c,lS/Uint32Array.BYTES_PER_ELEMENT),m=f[od.DXGI_FORMAT],p=f[od.RESOURCE_DIMENSION],v=f[od.MISC_FLAG],_=f[od.ARRAY_SIZE],E=AB[m];if(E===void 0)throw new Error(`DDSParser cannot parse texture data with DXGI format ${m}`);if(v===bB)throw new Error("DDSParser does not support cubemap textures");if(p===6)throw new Error("DDSParser does not supported 3D texture data");const T=new Array,S=Jg+id+lS;if(_===1)T.push(new Uint8Array(t,S));else{const b=Rf[E];let x=0,A=i,R=n;for(let N=0;N<s;N++){const D=Math.max(1,A+3&-4),q=Math.max(1,R+3&-4),$=D*q*b;x+=$,A=A>>>1,R=R>>>1}let L=S;for(let N=0;N<_;N++)T.push(new Uint8Array(t,L,x)),L+=x}return T.map(b=>new Bo(b,{format:E,width:i,height:n,levels:s}))}throw l&yB?new Error("DDSParser does not support uncompressed texture data."):l&vB?new Error("DDSParser does not supported YUV uncompressed texture data."):l&_B?new Error("DDSParser does not support single-channel (lumninance) texture data!"):l&mB?new Error("DDSParser does not support single-channel (alpha) texture data!"):new Error("DDSParser failed to load a texture file due to an unknown reason!")}const uS=[171,75,84,88,32,49,49,187,13,10,26,10],PB=67305985,Fn={ENDIANNESS:12,GL_TYPE:16,GL_FORMAT:24,GL_INTERNAL_FORMAT:28,PIXEL_WIDTH:36,PIXEL_HEIGHT:40,PIXEL_DEPTH:44,NUMBER_OF_ARRAY_ELEMENTS:48,NUMBER_OF_FACES:52,NUMBER_OF_MIPMAP_LEVELS:56,BYTES_OF_KEY_VALUE_DATA:60},qv=64,hS={[Ae.UNSIGNED_BYTE]:1,[Ae.UNSIGNED_SHORT]:2,[Ae.INT]:4,[Ae.UNSIGNED_INT]:4,[Ae.FLOAT]:4,[Ae.HALF_FLOAT]:8},IB={[re.RGBA]:4,[re.RGB]:3,[re.RG]:2,[re.RED]:1,[re.LUMINANCE]:1,[re.LUMINANCE_ALPHA]:2,[re.ALPHA]:1},RB={[Ae.UNSIGNED_SHORT_4_4_4_4]:2,[Ae.UNSIGNED_SHORT_5_5_5_1]:2,[Ae.UNSIGNED_SHORT_5_6_5]:2};function MB(t,e,r=!1){const n=new DataView(e);if(!kB(t,n))return null;const i=n.getUint32(Fn.ENDIANNESS,!0)===PB,s=n.getUint32(Fn.GL_TYPE,i),o=n.getUint32(Fn.GL_FORMAT,i),l=n.getUint32(Fn.GL_INTERNAL_FORMAT,i),h=n.getUint32(Fn.PIXEL_WIDTH,i),c=n.getUint32(Fn.PIXEL_HEIGHT,i)||1,f=n.getUint32(Fn.PIXEL_DEPTH,i)||1,m=n.getUint32(Fn.NUMBER_OF_ARRAY_ELEMENTS,i)||1,p=n.getUint32(Fn.NUMBER_OF_FACES,i),v=n.getUint32(Fn.NUMBER_OF_MIPMAP_LEVELS,i),_=n.getUint32(Fn.BYTES_OF_KEY_VALUE_DATA,i);if(c===0||f!==1)throw new Error("Only 2D textures are supported");if(p!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(m!==1)throw new Error("WebGL does not support array textures");const E=4,T=4,S=h+3&-4,b=c+3&-4,x=new Array(m);let A=h*c;s===0&&(A=S*b);let R;if(s!==0?hS[s]?R=hS[s]*IB[o]:R=RB[s]:R=Rf[l],R===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");const L=r?DB(n,_,i):null;let N=A*R,D=h,q=c,$=S,me=b,ne=qv+_;for(let B=0;B<v;B++){const K=n.getUint32(ne,i);let ie=ne+4;for(let _e=0;_e<m;_e++){let fe=x[_e];fe||(fe=x[_e]=new Array(v)),fe[B]={levelID:B,levelWidth:v>1||s!==0?D:$,levelHeight:v>1||s!==0?q:me,levelBuffer:new Uint8Array(e,ie,N)},ie+=N}ne+=K+4,ne=ne%4!==0?ne+4-ne%4:ne,D=D>>1||1,q=q>>1||1,$=D+E-1&-4,me=q+T-1&-4,N=$*me*R}return s!==0?{uncompressed:x.map(B=>{let K=B[0].levelBuffer,ie=!1;return s===Ae.FLOAT?K=new Float32Array(B[0].levelBuffer.buffer,B[0].levelBuffer.byteOffset,B[0].levelBuffer.byteLength/4):s===Ae.UNSIGNED_INT?(ie=!0,K=new Uint32Array(B[0].levelBuffer.buffer,B[0].levelBuffer.byteOffset,B[0].levelBuffer.byteLength/4)):s===Ae.INT&&(ie=!0,K=new Int32Array(B[0].levelBuffer.buffer,B[0].levelBuffer.byteOffset,B[0].levelBuffer.byteLength/4)),{resource:new np(K,{width:B[0].levelWidth,height:B[0].levelHeight}),type:s,format:ie?NB(o):o}}),kvData:L}:{compressed:x.map(B=>new Bo(null,{format:l,width:h,height:c,levels:v,levelBuffers:B})),kvData:L}}function kB(t,e){for(let r=0;r<uS.length;r++)if(e.getUint8(r)!==uS[r])return console.error(`${t} is not a valid *.ktx file!`),!1;return!0}function NB(t){switch(t){case re.RGBA:return re.RGBA_INTEGER;case re.RGB:return re.RGB_INTEGER;case re.RG:return re.RG_INTEGER;case re.RED:return re.RED_INTEGER;default:return t}}function DB(t,e,r){const n=new Map;let i=0;for(;i<e;){const s=t.getUint32(qv+i,r),o=qv+i+4,l=3-(s+3)%4;if(s===0||s>e-i){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}let h=0;for(;h<s&&t.getUint8(o+h)!==0;h++);if(h===-1){console.error("KTXLoader: Failed to find null byte terminating kvData key");break}const c=new TextDecoder().decode(new Uint8Array(t.buffer,o,h)),f=new DataView(t.buffer,o+h+1,s-h-1);n.set(c,f),i+=4+s+l}return n}const OB={extension:{type:ae.LoadParser,priority:qn.High},name:"loadDDS",test(t){return to(t,".dds")},async load(t,e,r){const n=await(await he.ADAPTER.fetch(t)).arrayBuffer(),i=CB(n).map(s=>{const o=new Ne(s,{mipmap:Pi.OFF,alphaMode:Br.NO_PREMULTIPLIED_ALPHA,resolution:ns(t),...e.data});return dh(o,r,t)});return i.length===1?i[0]:i},unload(t){Array.isArray(t)?t.forEach(e=>e.destroy(!0)):t.destroy(!0)}};we.add(OB);const FB={extension:{type:ae.LoadParser,priority:qn.High},name:"loadKTX",test(t){return to(t,".ktx")},async load(t,e,r){const n=await(await he.ADAPTER.fetch(t)).arrayBuffer(),{compressed:i,uncompressed:s,kvData:o}=MB(t,n),l=i??s,h={mipmap:Pi.OFF,alphaMode:Br.NO_PREMULTIPLIED_ALPHA,resolution:ns(t),...e.data},c=l.map(f=>{l===s&&Object.assign(h,{type:f.type,format:f.format});const m=f.resource??f,p=new Ne(m,h);return p.ktxKeyValueData=o,dh(p,r,t)});return c.length===1?c[0]:c},unload(t){Array.isArray(t)?t.forEach(e=>e.destroy(!0)):t.destroy(!0)}};we.add(FB);const BB=["s3tc","s3tc_sRGB","etc","etc1","pvrtc","atc","astc","bptc"],LB={extension:ae.ResolveParser,test:t=>{const e=Kt.extname(t).slice(1);return["basis","ktx","dds"].includes(e)},parse:t=>{var n,i;const e=t.split("."),r=e.pop();if(["ktx","dds"].includes(r)){const s=e.pop();if(BB.includes(s))return{resolution:parseFloat(((n=he.RETINA_PREFIX.exec(t))==null?void 0:n[1])??"1"),format:s,src:t}}return{resolution:parseFloat(((i=he.RETINA_PREFIX.exec(t))==null?void 0:i[1])??"1"),format:r,src:t}}};we.add(LB);const ad=new De,UB=4,qC=class du{constructor(e){this.renderer=e,this._rendererPremultipliedAlpha=!1}contextChange(){var r;const e=(r=this.renderer)==null?void 0:r.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(e&&e.alpha&&e.premultipliedAlpha)}async image(e,r,n,i){const s=new Image;return s.src=await this.base64(e,r,n,i),s}async base64(e,r,n,i){const s=this.canvas(e,i);if(s.toBlob!==void 0)return new Promise((o,l)=>{s.toBlob(h=>{if(!h){l(new Error("ICanvas.toBlob failed!"));return}const c=new FileReader;c.onload=()=>o(c.result),c.onerror=l,c.readAsDataURL(h)},r,n)});if(s.toDataURL!==void 0)return s.toDataURL(r,n);if(s.convertToBlob!==void 0){const o=await s.convertToBlob({type:r,quality:n});return new Promise((l,h)=>{const c=new FileReader;c.onload=()=>l(c.result),c.onerror=h,c.readAsDataURL(o)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(e,r){const{pixels:n,width:i,height:s,flipY:o,premultipliedAlpha:l}=this._rawPixels(e,r);o&&du._flipY(n,i,s),l&&du._unpremultiplyAlpha(n);const h=new D4(i,s,1),c=new ImageData(new Uint8ClampedArray(n.buffer),i,s);return h.context.putImageData(c,0,0),h.canvas}pixels(e,r){const{pixels:n,width:i,height:s,flipY:o,premultipliedAlpha:l}=this._rawPixels(e,r);return o&&du._flipY(n,i,s),l&&du._unpremultiplyAlpha(n),n}_rawPixels(e,r){const n=this.renderer;if(!n)throw new Error("The Extract has already been destroyed");let i,s=!1,o=!1,l,h=!1;e&&(e instanceof Qo?l=e:(l=n.generateTexture(e,{region:r,resolution:n.resolution,multisample:n.multisample}),h=!0,r&&(ad.width=r.width,ad.height=r.height,r=ad)));const c=n.gl;if(l){if(i=l.baseTexture.resolution,r=r??l.frame,s=!1,o=l.baseTexture.alphaMode>0&&l.baseTexture.format===re.RGBA,!h){n.renderTexture.bind(l);const v=l.framebuffer.glFramebuffers[n.CONTEXT_UID];v.blitFramebuffer&&n.framebuffer.bind(v.blitFramebuffer)}}else i=n.resolution,r||(r=ad,r.width=n.width/i,r.height=n.height/i),s=!0,o=this._rendererPremultipliedAlpha,n.renderTexture.bind();const f=Math.max(Math.round(r.width*i),1),m=Math.max(Math.round(r.height*i),1),p=new Uint8Array(UB*f*m);return c.readPixels(Math.round(r.x*i),Math.round(r.y*i),f,m,c.RGBA,c.UNSIGNED_BYTE,p),h&&(l==null||l.destroy(!0)),{pixels:p,width:f,height:m,flipY:s,premultipliedAlpha:o}}destroy(){this.renderer=null}static _flipY(e,r,n){const i=r<<2,s=n>>1,o=new Uint8Array(i);for(let l=0;l<s;l++){const h=l*i,c=(n-l-1)*i;o.set(e.subarray(h,h+i)),e.copyWithin(h,c,c+i),e.set(o,c)}}static _unpremultiplyAlpha(e){e instanceof Uint8ClampedArray&&(e=new Uint8Array(e.buffer));const r=e.length;for(let n=0;n<r;n+=4){const i=e[n+3];if(i!==0){const s=255.001/i;e[n]=e[n]*s+.5,e[n+1]=e[n+1]*s+.5,e[n+2]=e[n+2]*s+.5}}}};qC.extension={name:"extract",type:ae.RendererSystem};let zB=qC;we.add(zB);class GB{constructor(e){this.maxItemsPerFrame=e,this.itemsLeft=0}beginFrame(){this.itemsLeft=this.maxItemsPerFrame}allowedToUpload(){return this.itemsLeft-- >0}}function HB(t,e){var n;let r=!1;if((n=t==null?void 0:t._textures)!=null&&n.length){for(let i=0;i<t._textures.length;i++)if(t._textures[i]instanceof se){const s=t._textures[i].baseTexture;e.includes(s)||(e.push(s),r=!0)}}return r}function jB(t,e){if(t.baseTexture instanceof Ne){const r=t.baseTexture;return e.includes(r)||e.push(r),!0}return!1}function $B(t,e){if(t._texture&&t._texture instanceof se){const r=t._texture.baseTexture;return e.includes(r)||e.push(r),!0}return!1}function WB(t,e){return e instanceof u_?(e.updateText(!0),!0):!1}function VB(t,e){if(e instanceof Or){const r=e.toFontString();return _n.measureFont(r),!0}return!1}function XB(t,e){if(t instanceof u_){e.includes(t.style)||e.push(t.style),e.includes(t)||e.push(t);const r=t._texture.baseTexture;return e.includes(r)||e.push(r),!0}return!1}function YB(t,e){return t instanceof Or?(e.includes(t)||e.push(t),!0):!1}const ZC=class JC{constructor(e){this.limiter=new GB(JC.uploadsPerFrame),this.renderer=e,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=()=>{this.queue&&this.prepareItems()},this.registerFindHook(XB),this.registerFindHook(YB),this.registerFindHook(HB),this.registerFindHook(jB),this.registerFindHook($B),this.registerUploadHook(WB),this.registerUploadHook(VB)}upload(e){return new Promise(r=>{e&&this.add(e),this.queue.length?(this.completes.push(r),this.ticking||(this.ticking=!0,Yt.system.addOnce(this.tick,this,Qs.UTILITY))):r()})}tick(){setTimeout(this.delayedTick,0)}prepareItems(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){const e=this.queue[0];let r=!1;if(e&&!e._destroyed){for(let n=0,i=this.uploadHooks.length;n<i;n++)if(this.uploadHooks[n](this.uploadHookHelper,e)){this.queue.shift(),r=!0;break}}r||this.queue.shift()}if(this.queue.length)Yt.system.addOnce(this.tick,this,Qs.UTILITY);else{this.ticking=!1;const e=this.completes.slice(0);this.completes.length=0;for(let r=0,n=e.length;r<n;r++)e[r]()}}registerFindHook(e){return e&&this.addHooks.push(e),this}registerUploadHook(e){return e&&this.uploadHooks.push(e),this}add(e){for(let r=0,n=this.addHooks.length;r<n&&!this.addHooks[r](e,this.queue);r++);if(e instanceof Tr)for(let r=e.children.length-1;r>=0;r--)this.add(e.children[r]);return this}destroy(){this.ticking&&Yt.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null}};ZC.uploadsPerFrame=4;let Zv=ZC;Object.defineProperties(he,{UPLOADS_PER_FRAME:{get(){return Zv.uploadsPerFrame},set(t){Ue("7.1.0","settings.UPLOADS_PER_FRAME is deprecated, use prepare.BasePrepare.uploadsPerFrame"),Zv.uploadsPerFrame=t}}});function e2(t,e){return e instanceof Ne?(e._glTextures[t.CONTEXT_UID]||t.texture.bind(e),!0):!1}function QB(t,e){if(!(e instanceof Iu))return!1;const{geometry:r}=e;e.finishPoly(),r.updateBatches();const{batches:n}=r;for(let i=0;i<n.length;i++){const{texture:s}=n[i].style;s&&e2(t,s.baseTexture)}return r.batchable||t.geometry.bind(r,e._resolveDirectShader(t)),!0}function KB(t,e){return t instanceof Iu?(e.push(t),!0):!1}class t2 extends Zv{constructor(e){super(e),this.uploadHookHelper=this.renderer,this.registerFindHook(KB),this.registerUploadHook(e2),this.registerUploadHook(QB)}}t2.extension={name:"prepare",type:ae.RendererSystem};we.add(t2);const r2=class fu{constructor(e,r,n){this.linkedSheets=[],(e instanceof Ne||e instanceof se)&&(e={texture:e,data:r,resolutionFilename:n});const{texture:i,data:s,resolutionFilename:o=null,cachePrefix:l=""}=e;this.cachePrefix=l,this._texture=i instanceof se?i:null,this.baseTexture=i instanceof Ne?i:this._texture.baseTexture,this.textures={},this.animations={},this.data=s;const h=this.baseTexture.resource;this.resolution=this._updateResolution(o||(h?h.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(e=null){const{scale:r}=this.data.meta;let n=ns(e,null);return n===null&&(n=typeof r=="number"?r:parseFloat(r??"1")),n!==1&&this.baseTexture.setResolution(n),n}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=fu.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let r=e;const n=fu.BATCH_SIZE;for(;r-e<n&&r<this._frameKeys.length;){const i=this._frameKeys[r],s=this._frames[i],o=s.frame;if(o){let l=null,h=null;const c=s.trimmed!==!1&&s.sourceSize?s.sourceSize:s.frame,f=new De(0,0,Math.floor(c.w)/this.resolution,Math.floor(c.h)/this.resolution);s.rotated?l=new De(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.h)/this.resolution,Math.floor(o.w)/this.resolution):l=new De(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution),s.trimmed!==!1&&s.spriteSourceSize&&(h=new De(Math.floor(s.spriteSourceSize.x)/this.resolution,Math.floor(s.spriteSourceSize.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution)),this.textures[i]=new se(this.baseTexture,l,f,h,s.rotated?2:0,s.anchor,s.borders),se.addToCache(this.textures[i],this.cachePrefix+i.toString())}r++}}_processAnimations(){const e=this.data.animations||{};for(const r in e){this.animations[r]=[];for(let n=0;n<e[r].length;n++){const i=e[r][n];this.animations[r].push(this.textures[i])}}}_parseComplete(){const e=this._callback;this._callback=null,this._batchIndex=0,e.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*fu.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*fu.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(e=!1){var r;for(const n in this.textures)this.textures[n].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,e&&((r=this._texture)==null||r.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null,this.linkedSheets=[]}};r2.BATCH_SIZE=1e3;let cS=r2;const qB=["jpg","png","jpeg","avif","webp","s3tc","s3tc_sRGB","etc","etc1","pvrtc","atc","astc","bptc"];function n2(t,e,r){const n={};if(t.forEach(i=>{n[i]=e}),Object.keys(e.textures).forEach(i=>{n[`${e.cachePrefix}${i}`]=e.textures[i]}),!r){const i=Kt.dirname(t[0]);e.linkedSheets.forEach((s,o)=>{Object.assign(n,n2([`${i}/${e.data.meta.related_multi_packs[o]}`],s,!0))})}return n}const ZB={extension:ae.Asset,cache:{test:t=>t instanceof cS,getCacheableAssets:(t,e)=>n2(t,e,!1)},resolver:{test:t=>{const e=t.split("?")[0].split("."),r=e.pop(),n=e.pop();return r==="json"&&qB.includes(n)},parse:t=>{var r;const e=t.split(".");return{resolution:parseFloat(((r=he.RETINA_PREFIX.exec(t))==null?void 0:r[1])??"1"),format:e[e.length-2],src:t}}},loader:{name:"spritesheetLoader",extension:{type:ae.LoadParser,priority:qn.Normal},async testParse(t,e){return Kt.extname(e.src).toLowerCase()===".json"&&!!t.frames},async parse(t,e,r){var f,m;const{texture:n,imageFilename:i,cachePrefix:s}=(e==null?void 0:e.data)??{};let o=Kt.dirname(e.src);o&&o.lastIndexOf("/")!==o.length-1&&(o+="/");let l;if(n&&n.baseTexture)l=n;else{const p=Ov(o+(i??t.meta.image),e.src);l=(await r.load([p]))[p]}const h=new cS({texture:l.baseTexture,data:t,resolutionFilename:e.src,cachePrefix:s});await h.parse();const c=(f=t==null?void 0:t.meta)==null?void 0:f.related_multi_packs;if(Array.isArray(c)){const p=[];for(const _ of c){if(typeof _!="string")continue;let E=o+_;(m=e.data)!=null&&m.ignoreMultiPack||(E=Ov(E,e.src),p.push(r.load({src:E,data:{ignoreMultiPack:!0}})))}const v=await Promise.all(p);h.linkedSheets=v,v.forEach(_=>{_.linkedSheets=[h].concat(h.linkedSheets.filter(E=>E!==_))})}return h},unload(t){t.destroy(!0)}}};we.add(ZB);const Jv=class Ta extends Or{constructor(){super(...arguments),this._fonts=[],this._overrides=[],this._stylesheet="",this.fontsDirty=!1}static from(e){return new Ta(Object.keys(Ta.defaultOptions).reduce((r,n)=>({...r,[n]:e[n]}),{}))}cleanFonts(){this._fonts.length>0&&(this._fonts.forEach(e=>{URL.revokeObjectURL(e.src),e.refs--,e.refs===0&&(e.fontFace&&document.fonts.delete(e.fontFace),delete Ta.availableFonts[e.originalUrl])}),this.fontFamily="Arial",this._fonts.length=0,this.styleID++,this.fontsDirty=!0)}loadFont(e,r={}){const{availableFonts:n}=Ta;if(n[e]){const i=n[e];return this._fonts.push(i),i.refs++,this.styleID++,this.fontsDirty=!0,Promise.resolve()}return he.ADAPTER.fetch(e).then(i=>i.blob()).then(async i=>new Promise((s,o)=>{const l=URL.createObjectURL(i),h=new FileReader;h.onload=()=>s([l,h.result]),h.onerror=o,h.readAsDataURL(i)})).then(async([i,s])=>{const o=Object.assign({family:Kt.basename(e,Kt.extname(e)),weight:"normal",style:"normal",display:"auto",src:i,dataSrc:s,refs:1,originalUrl:e,fontFace:null},r);n[e]=o,this._fonts.push(o),this.styleID++;const l=new FontFace(o.family,`url(${o.src})`,{weight:o.weight,style:o.style,display:o.display});o.fontFace=l,await l.load(),document.fonts.add(l),await document.fonts.ready,this.styleID++,this.fontsDirty=!0})}addOverride(...e){const r=e.filter(n=>!this._overrides.includes(n));r.length>0&&(this._overrides.push(...r),this.styleID++)}removeOverride(...e){const r=e.filter(n=>this._overrides.includes(n));r.length>0&&(this._overrides=this._overrides.filter(n=>!r.includes(n)),this.styleID++)}toCSS(e){return[`transform: scale(${e})`,"transform-origin: top left","display: inline-block",`color: ${this.normalizeColor(this.fill)}`,`font-size: ${this.fontSize}px`,`font-family: ${this.fontFamily}`,`font-weight: ${this.fontWeight}`,`font-style: ${this.fontStyle}`,`font-variant: ${this.fontVariant}`,`letter-spacing: ${this.letterSpacing}px`,`text-align: ${this.align}`,`padding: ${this.padding}px`,`white-space: ${this.whiteSpace}`,...this.lineHeight?[`line-height: ${this.lineHeight}px`]:[],...this.wordWrap?[`word-wrap: ${this.breakWords?"break-all":"break-word"}`,`max-width: ${this.wordWrapWidth}px`]:[],...this.strokeThickness?[`-webkit-text-stroke-width: ${this.strokeThickness}px`,`-webkit-text-stroke-color: ${this.normalizeColor(this.stroke)}`,`text-stroke-width: ${this.strokeThickness}px`,`text-stroke-color: ${this.normalizeColor(this.stroke)}`,"paint-order: stroke"]:[],...this.dropShadow?[this.dropShadowToCSS()]:[],...this._overrides].join(";")}toGlobalCSS(){return this._fonts.reduce((e,r)=>`${e}
1198
+ `;class YF extends Sr{constructor(e=.5,r=Math.random()){super(dC,XF,{uNoise:0,uSeed:0}),this.noise=e,this.seed=r}get noise(){return this.uniforms.uNoise}set noise(e){this.uniforms.uNoise=e}get seed(){return this.uniforms.uSeed}set seed(e){this.uniforms.uSeed=e}}const nS={AlphaFilter:NF,BlurFilter:UF,BlurFilterPass:Vv,ColorMatrixFilter:Xv,DisplacementFilter:jF,FXAAFilter:VF,NoiseFilter:YF};Object.entries(nS).forEach(([t,e])=>{Object.defineProperty(nS,t,{get(){return Ue("7.1.0",`filters.${t} has moved to ${t}`),e}})});class QF{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this.tickerAdded||!this.domElement||(Yt.system.add(this.tickerUpdate,this,Qs.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(Yt.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const e=this.events.rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:e.clientX,clientY:e.clientY}))}tickerUpdate(e){this._deltaTime+=e,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.update())}}const Rs=new QF;class fh{constructor(e){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=fh.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Ge,this.page=new Ge,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(e,r,n){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(e,r,n,i,s){throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}}class If extends fh{constructor(){super(...arguments),this.client=new Ge,this.movement=new Ge,this.offset=new Ge,this.global=new Ge,this.screen=new Ge}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(e,r,n){return e.worldTransform.applyInverse(n||this.global,r)}getModifierState(e){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(e)}initMouseEvent(e,r,n,i,s,o,l,h,c,f,m,p,v,_,E){throw new Error("Method not implemented.")}}class Ln extends If{constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1}getCoalescedEvents(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}getPredictedEvents(){throw new Error("getPredictedEvents is not supported!")}}class rl extends If{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}}rl.DOM_DELTA_PIXEL=0,rl.DOM_DELTA_LINE=1,rl.DOM_DELTA_PAGE=2;const KF=2048,qF=new Ge,Zg=new Ge;class ZF{constructor(e){this.dispatch=new lh,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=e,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mappingTable={},this.addEventMapping("pointerdown",this.mapPointerDown),this.addEventMapping("pointermove",this.mapPointerMove),this.addEventMapping("pointerout",this.mapPointerOut),this.addEventMapping("pointerleave",this.mapPointerOut),this.addEventMapping("pointerover",this.mapPointerOver),this.addEventMapping("pointerup",this.mapPointerUp),this.addEventMapping("pointerupoutside",this.mapPointerUpOutside),this.addEventMapping("wheel",this.mapWheel)}addEventMapping(e,r){this.mappingTable[e]||(this.mappingTable[e]=[]),this.mappingTable[e].push({fn:r,priority:0}),this.mappingTable[e].sort((n,i)=>n.priority-i.priority)}dispatchEvent(e,r){e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,r),this.dispatch.emit(r||e.type,e)}mapEvent(e){if(!this.rootTarget)return;const r=this.mappingTable[e.type];if(r)for(let n=0,i=r.length;n<i;n++)r[n].fn(e);else console.warn(`[EventBoundary]: Event mapping not defined for ${e.type}`)}hitTest(e,r){Rs.pauseUpdate=!0;const n=this._isPointerMoveEvent&&this.enableGlobalMoveEvents?"hitTestMoveRecursive":"hitTestRecursive",i=this[n](this.rootTarget,this.rootTarget.eventMode,qF.set(e,r),this.hitTestFn,this.hitPruneFn);return i&&i[0]}propagate(e,r){if(!e.target)return;const n=e.composedPath();e.eventPhase=e.CAPTURING_PHASE;for(let i=0,s=n.length-1;i<s;i++)if(e.currentTarget=n[i],this.notifyTarget(e,r),e.propagationStopped||e.propagationImmediatelyStopped)return;if(e.eventPhase=e.AT_TARGET,e.currentTarget=e.target,this.notifyTarget(e,r),!(e.propagationStopped||e.propagationImmediatelyStopped)){e.eventPhase=e.BUBBLING_PHASE;for(let i=n.length-2;i>=0;i--)if(e.currentTarget=n[i],this.notifyTarget(e,r),e.propagationStopped||e.propagationImmediatelyStopped)return}}all(e,r,n=this._allInteractiveElements){if(n.length===0)return;e.eventPhase=e.BUBBLING_PHASE;const i=Array.isArray(r)?r:[r];for(let s=n.length-1;s>=0;s--)i.forEach(o=>{e.currentTarget=n[s],this.notifyTarget(e,o)})}propagationPath(e){const r=[e];for(let n=0;n<KF&&e!==this.rootTarget;n++){if(!e.parent)throw new Error("Cannot find propagation path to disconnected target");r.push(e.parent),e=e.parent}return r.reverse(),r}hitTestMoveRecursive(e,r,n,i,s,o=!1){let l=!1;if(this._interactivePrune(e))return null;if((e.eventMode==="dynamic"||r==="dynamic")&&(Rs.pauseUpdate=!1),e.interactiveChildren&&e.children){const f=e.children;for(let m=f.length-1;m>=0;m--){const p=f[m],v=this.hitTestMoveRecursive(p,this._isInteractive(r)?r:p.eventMode,n,i,s,o||s(e,n));if(v){if(v.length>0&&!v[v.length-1].parent)continue;const _=e.isInteractive();(v.length>0||_)&&(_&&this._allInteractiveElements.push(e),v.push(e)),this._hitElements.length===0&&(this._hitElements=v),l=!0}}}const h=this._isInteractive(r),c=e.isInteractive();return h&&c&&this._allInteractiveElements.push(e),o||this._hitElements.length>0?null:l?this._hitElements:h&&!s(e,n)&&i(e,n)?c?[e]:[]:null}hitTestRecursive(e,r,n,i,s){if(this._interactivePrune(e)||s(e,n))return null;if((e.eventMode==="dynamic"||r==="dynamic")&&(Rs.pauseUpdate=!1),e.interactiveChildren&&e.children){const h=e.children;for(let c=h.length-1;c>=0;c--){const f=h[c],m=this.hitTestRecursive(f,this._isInteractive(r)?r:f.eventMode,n,i,s);if(m){if(m.length>0&&!m[m.length-1].parent)continue;const p=e.isInteractive();return(m.length>0||p)&&m.push(e),m}}}const o=this._isInteractive(r),l=e.isInteractive();return o&&i(e,n)?l?[e]:[]:null}_isInteractive(e){return e==="static"||e==="dynamic"}_interactivePrune(e){return!!(!e||e.isMask||!e.visible||!e.renderable||e.eventMode==="none"||e.eventMode==="passive"&&!e.interactiveChildren||e.isMask)}hitPruneFn(e,r){var n;if(e.hitArea&&(e.worldTransform.applyInverse(r,Zg),!e.hitArea.contains(Zg.x,Zg.y)))return!0;if(e._mask){const i=e._mask.isMaskData?e._mask.maskObject:e._mask;if(i&&!((n=i.containsPoint)!=null&&n.call(i,r)))return!0}return!1}hitTestFn(e,r){return e.eventMode==="passive"?!1:e.hitArea?!0:e.containsPoint?e.containsPoint(r):!1}notifyTarget(e,r){var s,o;r=r??e.type;const n=`on${r}`;(o=(s=e.currentTarget)[n])==null||o.call(s,e);const i=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?`${r}capture`:r;this.notifyListeners(e,i),e.eventPhase===e.AT_TARGET&&this.notifyListeners(e,r)}mapPointerDown(e){if(!(e instanceof Ln)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const r=this.createPointerEvent(e);if(this.dispatchEvent(r,"pointerdown"),r.pointerType==="touch")this.dispatchEvent(r,"touchstart");else if(r.pointerType==="mouse"||r.pointerType==="pen"){const i=r.button===2;this.dispatchEvent(r,i?"rightdown":"mousedown")}const n=this.trackingData(e.pointerId);n.pressTargetsByButton[e.button]=r.composedPath(),this.freeEvent(r)}mapPointerMove(e){var h,c;if(!(e instanceof Ln)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;const r=this.createPointerEvent(e);this._isPointerMoveEvent=!1;const n=r.pointerType==="mouse"||r.pointerType==="pen",i=this.trackingData(e.pointerId),s=this.findMountedTarget(i.overTargets);if(((h=i.overTargets)==null?void 0:h.length)>0&&s!==r.target){const f=e.type==="mousemove"?"mouseout":"pointerout",m=this.createPointerEvent(e,f,s);if(this.dispatchEvent(m,"pointerout"),n&&this.dispatchEvent(m,"mouseout"),!r.composedPath().includes(s)){const p=this.createPointerEvent(e,"pointerleave",s);for(p.eventPhase=p.AT_TARGET;p.target&&!r.composedPath().includes(p.target);)p.currentTarget=p.target,this.notifyTarget(p),n&&this.notifyTarget(p,"mouseleave"),p.target=p.target.parent;this.freeEvent(p)}this.freeEvent(m)}if(s!==r.target){const f=e.type==="mousemove"?"mouseover":"pointerover",m=this.clonePointerEvent(r,f);this.dispatchEvent(m,"pointerover"),n&&this.dispatchEvent(m,"mouseover");let p=s==null?void 0:s.parent;for(;p&&p!==this.rootTarget.parent&&p!==r.target;)p=p.parent;if(!p||p===this.rootTarget.parent){const v=this.clonePointerEvent(r,"pointerenter");for(v.eventPhase=v.AT_TARGET;v.target&&v.target!==s&&v.target!==this.rootTarget.parent;)v.currentTarget=v.target,this.notifyTarget(v),n&&this.notifyTarget(v,"mouseenter"),v.target=v.target.parent;this.freeEvent(v)}this.freeEvent(m)}const o=[],l=this.enableGlobalMoveEvents??!0;this.moveOnAll?o.push("pointermove"):this.dispatchEvent(r,"pointermove"),l&&o.push("globalpointermove"),r.pointerType==="touch"&&(this.moveOnAll?o.splice(1,0,"touchmove"):this.dispatchEvent(r,"touchmove"),l&&o.push("globaltouchmove")),n&&(this.moveOnAll?o.splice(1,0,"mousemove"):this.dispatchEvent(r,"mousemove"),l&&o.push("globalmousemove"),this.cursor=(c=r.target)==null?void 0:c.cursor),o.length>0&&this.all(r,o),this._allInteractiveElements.length=0,this._hitElements.length=0,i.overTargets=r.composedPath(),this.freeEvent(r)}mapPointerOver(e){var o;if(!(e instanceof Ln)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const r=this.trackingData(e.pointerId),n=this.createPointerEvent(e),i=n.pointerType==="mouse"||n.pointerType==="pen";this.dispatchEvent(n,"pointerover"),i&&this.dispatchEvent(n,"mouseover"),n.pointerType==="mouse"&&(this.cursor=(o=n.target)==null?void 0:o.cursor);const s=this.clonePointerEvent(n,"pointerenter");for(s.eventPhase=s.AT_TARGET;s.target&&s.target!==this.rootTarget.parent;)s.currentTarget=s.target,this.notifyTarget(s),i&&this.notifyTarget(s,"mouseenter"),s.target=s.target.parent;r.overTargets=n.composedPath(),this.freeEvent(n),this.freeEvent(s)}mapPointerOut(e){if(!(e instanceof Ln)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const r=this.trackingData(e.pointerId);if(r.overTargets){const n=e.pointerType==="mouse"||e.pointerType==="pen",i=this.findMountedTarget(r.overTargets),s=this.createPointerEvent(e,"pointerout",i);this.dispatchEvent(s),n&&this.dispatchEvent(s,"mouseout");const o=this.createPointerEvent(e,"pointerleave",i);for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==this.rootTarget.parent;)o.currentTarget=o.target,this.notifyTarget(o),n&&this.notifyTarget(o,"mouseleave"),o.target=o.target.parent;r.overTargets=null,this.freeEvent(s),this.freeEvent(o)}this.cursor=null}mapPointerUp(e){if(!(e instanceof Ln)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const r=performance.now(),n=this.createPointerEvent(e);if(this.dispatchEvent(n,"pointerup"),n.pointerType==="touch")this.dispatchEvent(n,"touchend");else if(n.pointerType==="mouse"||n.pointerType==="pen"){const l=n.button===2;this.dispatchEvent(n,l?"rightup":"mouseup")}const i=this.trackingData(e.pointerId),s=this.findMountedTarget(i.pressTargetsByButton[e.button]);let o=s;if(s&&!n.composedPath().includes(s)){let l=s;for(;l&&!n.composedPath().includes(l);){if(n.currentTarget=l,this.notifyTarget(n,"pointerupoutside"),n.pointerType==="touch")this.notifyTarget(n,"touchendoutside");else if(n.pointerType==="mouse"||n.pointerType==="pen"){const h=n.button===2;this.notifyTarget(n,h?"rightupoutside":"mouseupoutside")}l=l.parent}delete i.pressTargetsByButton[e.button],o=l}if(o){const l=this.clonePointerEvent(n,"click");l.target=o,l.path=null,i.clicksByButton[e.button]||(i.clicksByButton[e.button]={clickCount:0,target:l.target,timeStamp:r});const h=i.clicksByButton[e.button];if(h.target===l.target&&r-h.timeStamp<200?++h.clickCount:h.clickCount=1,h.target=l.target,h.timeStamp=r,l.detail=h.clickCount,l.pointerType==="mouse"){const c=l.button===2;this.dispatchEvent(l,c?"rightclick":"click")}else l.pointerType==="touch"&&this.dispatchEvent(l,"tap");this.dispatchEvent(l,"pointertap"),this.freeEvent(l)}this.freeEvent(n)}mapPointerUpOutside(e){if(!(e instanceof Ln)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const r=this.trackingData(e.pointerId),n=this.findMountedTarget(r.pressTargetsByButton[e.button]),i=this.createPointerEvent(e);if(n){let s=n;for(;s;)i.currentTarget=s,this.notifyTarget(i,"pointerupoutside"),i.pointerType==="touch"?this.notifyTarget(i,"touchendoutside"):(i.pointerType==="mouse"||i.pointerType==="pen")&&this.notifyTarget(i,i.button===2?"rightupoutside":"mouseupoutside"),s=s.parent;delete r.pressTargetsByButton[e.button]}this.freeEvent(i)}mapWheel(e){if(!(e instanceof rl)){console.warn("EventBoundary cannot map a non-wheel event as a wheel event");return}const r=this.createWheelEvent(e);this.dispatchEvent(r),this.freeEvent(r)}findMountedTarget(e){if(!e)return null;let r=e[0];for(let n=1;n<e.length&&e[n].parent===r;n++)r=e[n];return r}createPointerEvent(e,r,n){const i=this.allocateEvent(Ln);return this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.nativeEvent=e.nativeEvent,i.originalEvent=e,i.target=n??this.hitTest(i.global.x,i.global.y)??this._hitElements[0],typeof r=="string"&&(i.type=r),i}createWheelEvent(e){const r=this.allocateEvent(rl);return this.copyWheelData(e,r),this.copyMouseData(e,r),this.copyData(e,r),r.nativeEvent=e.nativeEvent,r.originalEvent=e,r.target=this.hitTest(r.global.x,r.global.y),r}clonePointerEvent(e,r){const n=this.allocateEvent(Ln);return n.nativeEvent=e.nativeEvent,n.originalEvent=e.originalEvent,this.copyPointerData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.target=e.target,n.path=e.composedPath().slice(),n.type=r??n.type,n}copyWheelData(e,r){r.deltaMode=e.deltaMode,r.deltaX=e.deltaX,r.deltaY=e.deltaY,r.deltaZ=e.deltaZ}copyPointerData(e,r){e instanceof Ln&&r instanceof Ln&&(r.pointerId=e.pointerId,r.width=e.width,r.height=e.height,r.isPrimary=e.isPrimary,r.pointerType=e.pointerType,r.pressure=e.pressure,r.tangentialPressure=e.tangentialPressure,r.tiltX=e.tiltX,r.tiltY=e.tiltY,r.twist=e.twist)}copyMouseData(e,r){e instanceof If&&r instanceof If&&(r.altKey=e.altKey,r.button=e.button,r.buttons=e.buttons,r.client.copyFrom(e.client),r.ctrlKey=e.ctrlKey,r.metaKey=e.metaKey,r.movement.copyFrom(e.movement),r.screen.copyFrom(e.screen),r.shiftKey=e.shiftKey,r.global.copyFrom(e.global))}copyData(e,r){r.isTrusted=e.isTrusted,r.srcElement=e.srcElement,r.timeStamp=performance.now(),r.type=e.type,r.detail=e.detail,r.view=e.view,r.which=e.which,r.layer.copyFrom(e.layer),r.page.copyFrom(e.page)}trackingData(e){return this.mappingState.trackingData[e]||(this.mappingState.trackingData[e]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[e]}allocateEvent(e){this.eventPool.has(e)||this.eventPool.set(e,[]);const r=this.eventPool.get(e).pop()||new e(this);return r.eventPhase=r.NONE,r.currentTarget=null,r.path=null,r.target=null,r}freeEvent(e){if(e.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");const r=e.constructor;this.eventPool.has(r)||this.eventPool.set(r,[]),this.eventPool.get(r).push(e)}notifyListeners(e,r){const n=e.currentTarget._events[r];if(n&&e.currentTarget.isInteractive())if("fn"in n)n.once&&e.currentTarget.removeListener(r,n.fn,void 0,!0),n.fn.call(n.context,e);else for(let i=0,s=n.length;i<s&&!e.propagationImmediatelyStopped;i++)n[i].once&&e.currentTarget.removeListener(r,n[i].fn,void 0,!0),n[i].fn.call(n[i].context,e)}}const JF=1,eB={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},Yv=class Qv{constructor(e){this.supportsTouchEvents="ontouchstart"in globalThis,this.supportsPointerEvents=!!globalThis.PointerEvent,this.domElement=null,this.resolution=1,this.renderer=e,this.rootBoundary=new ZF(null),Rs.init(this),this.autoPreventDefault=!0,this.eventsAdded=!1,this.rootPointerEvent=new Ln(null),this.rootWheelEvent=new rl(null),this.cursorStyles={default:"inherit",pointer:"pointer"},this.features=new Proxy({...Qv.defaultEventFeatures},{set:(r,n,i)=>(n==="globalMove"&&(this.rootBoundary.enableGlobalMoveEvents=i),r[n]=i,!0)}),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOverOut=this.onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(e){const{view:r,resolution:n}=this.renderer;this.setTargetElement(r),this.resolution=n,Qv._defaultEventMode=e.eventMode??"auto",Object.assign(this.features,e.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(e){this.resolution=e}destroy(){this.setTargetElement(null),this.renderer=null}setCursor(e){e=e||"default";let r=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(r=!1),this.currentCursor===e)return;this.currentCursor=e;const n=this.cursorStyles[e];if(n)switch(typeof n){case"string":r&&(this.domElement.style.cursor=n);break;case"function":n(e);break;case"object":r&&Object.assign(this.domElement.style,n);break}else r&&typeof e=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,e)&&(this.domElement.style.cursor=e)}get pointer(){return this.rootPointerEvent}onPointerDown(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;const r=this.normalizeToPointerData(e);this.autoPreventDefault&&r[0].isNormalized&&(e.cancelable||!("cancelable"in e))&&e.preventDefault();for(let n=0,i=r.length;n<i;n++){const s=r[n],o=this.bootstrapEvent(this.rootPointerEvent,s);this.rootBoundary.mapEvent(o)}this.setCursor(this.rootBoundary.cursor)}onPointerMove(e){if(!this.features.move)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,Rs.pointerMoved();const r=this.normalizeToPointerData(e);for(let n=0,i=r.length;n<i;n++){const s=this.bootstrapEvent(this.rootPointerEvent,r[n]);this.rootBoundary.mapEvent(s)}this.setCursor(this.rootBoundary.cursor)}onPointerUp(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let r=e.target;e.composedPath&&e.composedPath().length>0&&(r=e.composedPath()[0]);const n=r!==this.domElement?"outside":"",i=this.normalizeToPointerData(e);for(let s=0,o=i.length;s<o;s++){const l=this.bootstrapEvent(this.rootPointerEvent,i[s]);l.type+=n,this.rootBoundary.mapEvent(l)}this.setCursor(this.rootBoundary.cursor)}onPointerOverOut(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;const r=this.normalizeToPointerData(e);for(let n=0,i=r.length;n<i;n++){const s=this.bootstrapEvent(this.rootPointerEvent,r[n]);this.rootBoundary.mapEvent(s)}this.setCursor(this.rootBoundary.cursor)}onWheel(e){if(!this.features.wheel)return;const r=this.normalizeWheelEvent(e);this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.rootBoundary.mapEvent(r)}setTargetElement(e){this.removeEvents(),this.domElement=e,Rs.domElement=e,this.addEvents()}addEvents(){if(this.eventsAdded||!this.domElement)return;Rs.addTickerListener();const e=this.domElement.style;e&&(globalThis.navigator.msPointerEnabled?(e.msContentZooming="none",e.msTouchAction="none"):this.supportsPointerEvents&&(e.touchAction="none")),this.supportsPointerEvents?(globalThis.document.addEventListener("pointermove",this.onPointerMove,!0),this.domElement.addEventListener("pointerdown",this.onPointerDown,!0),this.domElement.addEventListener("pointerleave",this.onPointerOverOut,!0),this.domElement.addEventListener("pointerover",this.onPointerOverOut,!0),globalThis.addEventListener("pointerup",this.onPointerUp,!0)):(globalThis.document.addEventListener("mousemove",this.onPointerMove,!0),this.domElement.addEventListener("mousedown",this.onPointerDown,!0),this.domElement.addEventListener("mouseout",this.onPointerOverOut,!0),this.domElement.addEventListener("mouseover",this.onPointerOverOut,!0),globalThis.addEventListener("mouseup",this.onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.addEventListener("touchstart",this.onPointerDown,!0),this.domElement.addEventListener("touchend",this.onPointerUp,!0),this.domElement.addEventListener("touchmove",this.onPointerMove,!0))),this.domElement.addEventListener("wheel",this.onWheel,{passive:!0,capture:!0}),this.eventsAdded=!0}removeEvents(){if(!this.eventsAdded||!this.domElement)return;Rs.removeTickerListener();const e=this.domElement.style;globalThis.navigator.msPointerEnabled?(e.msContentZooming="",e.msTouchAction=""):this.supportsPointerEvents&&(e.touchAction=""),this.supportsPointerEvents?(globalThis.document.removeEventListener("pointermove",this.onPointerMove,!0),this.domElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.domElement.removeEventListener("pointerleave",this.onPointerOverOut,!0),this.domElement.removeEventListener("pointerover",this.onPointerOverOut,!0),globalThis.removeEventListener("pointerup",this.onPointerUp,!0)):(globalThis.document.removeEventListener("mousemove",this.onPointerMove,!0),this.domElement.removeEventListener("mousedown",this.onPointerDown,!0),this.domElement.removeEventListener("mouseout",this.onPointerOverOut,!0),this.domElement.removeEventListener("mouseover",this.onPointerOverOut,!0),globalThis.removeEventListener("mouseup",this.onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.removeEventListener("touchstart",this.onPointerDown,!0),this.domElement.removeEventListener("touchend",this.onPointerUp,!0),this.domElement.removeEventListener("touchmove",this.onPointerMove,!0))),this.domElement.removeEventListener("wheel",this.onWheel,!0),this.domElement=null,this.eventsAdded=!1}mapPositionToPoint(e,r,n){const i=this.domElement.isConnected?this.domElement.getBoundingClientRect():{width:this.domElement.width,height:this.domElement.height,left:0,top:0},s=1/this.resolution;e.x=(r-i.left)*(this.domElement.width/i.width)*s,e.y=(n-i.top)*(this.domElement.height/i.height)*s}normalizeToPointerData(e){const r=[];if(this.supportsTouchEvents&&e instanceof TouchEvent)for(let n=0,i=e.changedTouches.length;n<i;n++){const s=e.changedTouches[n];typeof s.button>"u"&&(s.button=0),typeof s.buttons>"u"&&(s.buttons=1),typeof s.isPrimary>"u"&&(s.isPrimary=e.touches.length===1&&e.type==="touchstart"),typeof s.width>"u"&&(s.width=s.radiusX||1),typeof s.height>"u"&&(s.height=s.radiusY||1),typeof s.tiltX>"u"&&(s.tiltX=0),typeof s.tiltY>"u"&&(s.tiltY=0),typeof s.pointerType>"u"&&(s.pointerType="touch"),typeof s.pointerId>"u"&&(s.pointerId=s.identifier||0),typeof s.pressure>"u"&&(s.pressure=s.force||.5),typeof s.twist>"u"&&(s.twist=0),typeof s.tangentialPressure>"u"&&(s.tangentialPressure=0),typeof s.layerX>"u"&&(s.layerX=s.offsetX=s.clientX),typeof s.layerY>"u"&&(s.layerY=s.offsetY=s.clientY),s.isNormalized=!0,s.type=e.type,r.push(s)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){const n=e;typeof n.isPrimary>"u"&&(n.isPrimary=!0),typeof n.width>"u"&&(n.width=1),typeof n.height>"u"&&(n.height=1),typeof n.tiltX>"u"&&(n.tiltX=0),typeof n.tiltY>"u"&&(n.tiltY=0),typeof n.pointerType>"u"&&(n.pointerType="mouse"),typeof n.pointerId>"u"&&(n.pointerId=JF),typeof n.pressure>"u"&&(n.pressure=.5),typeof n.twist>"u"&&(n.twist=0),typeof n.tangentialPressure>"u"&&(n.tangentialPressure=0),n.isNormalized=!0,r.push(n)}else r.push(e);return r}normalizeWheelEvent(e){const r=this.rootWheelEvent;return this.transferMouseData(r,e),r.deltaX=e.deltaX,r.deltaY=e.deltaY,r.deltaZ=e.deltaZ,r.deltaMode=e.deltaMode,this.mapPositionToPoint(r.screen,e.clientX,e.clientY),r.global.copyFrom(r.screen),r.offset.copyFrom(r.screen),r.nativeEvent=e,r.type=e.type,r}bootstrapEvent(e,r){return e.originalEvent=null,e.nativeEvent=r,e.pointerId=r.pointerId,e.width=r.width,e.height=r.height,e.isPrimary=r.isPrimary,e.pointerType=r.pointerType,e.pressure=r.pressure,e.tangentialPressure=r.tangentialPressure,e.tiltX=r.tiltX,e.tiltY=r.tiltY,e.twist=r.twist,this.transferMouseData(e,r),this.mapPositionToPoint(e.screen,r.clientX,r.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.isTrusted=r.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=eB[e.type]||e.type),e}transferMouseData(e,r){e.isTrusted=r.isTrusted,e.srcElement=r.srcElement,e.timeStamp=performance.now(),e.type=r.type,e.altKey=r.altKey,e.button=r.button,e.buttons=r.buttons,e.client.x=r.clientX,e.client.y=r.clientY,e.ctrlKey=r.ctrlKey,e.metaKey=r.metaKey,e.movement.x=r.movementX,e.movement.y=r.movementY,e.page.x=r.pageX,e.page.y=r.pageY,e.relatedTarget=null,e.shiftKey=r.shiftKey}};Yv.extension={name:"events",type:[ae.RendererSystem,ae.CanvasRendererSystem]},Yv.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};let Kv=Yv;we.add(Kv);function iS(t){return t==="dynamic"||t==="static"}const tB={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,_internalInteractive:void 0,get interactive(){return this._internalInteractive??iS(Kv.defaultEventMode)},set interactive(t){Ue("7.2.0","Setting interactive is deprecated, use eventMode = 'none'/'passive'/'auto'/'static'/'dynamic' instead."),this._internalInteractive=t,this.eventMode=t?"static":"auto"},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??Kv.defaultEventMode},set eventMode(t){this._internalInteractive=iS(t),this._internalEventMode=t},isInteractive(){return this.eventMode==="static"||this.eventMode==="dynamic"},interactiveChildren:!0,hitArea:null,addEventListener(t,e,r){const n=typeof r=="boolean"&&r||typeof r=="object"&&r.capture,i=typeof r=="object"?r.signal:void 0,s=typeof r=="object"?r.once===!0:!1,o=typeof e=="function"?void 0:e;t=n?`${t}capture`:t;const l=typeof e=="function"?e:e.handleEvent,h=this;i&&i.addEventListener("abort",()=>{h.off(t,l,o)}),s?h.once(t,l,o):h.on(t,l,o)},removeEventListener(t,e,r){const n=typeof r=="boolean"&&r||typeof r=="object"&&r.capture,i=typeof e=="function"?void 0:e;t=n?`${t}capture`:t,e=typeof e=="function"?e:e.handleEvent,this.off(t,e,i)},dispatchEvent(t){if(!(t instanceof fh))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");return t.defaultPrevented=!1,t.path=null,t.target=this,t.manager.dispatchEvent(t),!t.defaultPrevented}};ct.mixin(tB);const rB={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};ct.mixin(rB);const nB=9,nd=100,iB=0,sB=0,sS=2,oS=1,oB=-1e3,aB=-1e3,lB=2;class KC{constructor(e){this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this.pool=[],this.renderId=0,this.children=[],this.androidUpdateCount=0,this.androidUpdateFrequency=500,this._hookDiv=null,(Yi.tablet||Yi.phone)&&this.createTouchHook();const r=document.createElement("div");r.style.width=`${nd}px`,r.style.height=`${nd}px`,r.style.position="absolute",r.style.top=`${iB}px`,r.style.left=`${sB}px`,r.style.zIndex=sS.toString(),this.div=r,this.renderer=e,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}createTouchHook(){const e=document.createElement("button");e.style.width=`${oS}px`,e.style.height=`${oS}px`,e.style.position="absolute",e.style.top=`${oB}px`,e.style.left=`${aB}px`,e.style.zIndex=lB.toString(),e.style.backgroundColor="#FF0000",e.title="select to enable accessibility for this content",e.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this.activate(),this.destroyTouchHook()}),document.body.appendChild(e),this._hookDiv=e}destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}activate(){var e;this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),(e=this.renderer.view.parentNode)==null||e.appendChild(this.div))}deactivate(){var e;!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),(e=this.div.parentNode)==null||e.removeChild(this.div))}updateAccessibleObjects(e){if(!e.visible||!e.accessibleChildren)return;e.accessible&&e.isInteractive()&&(e._accessibleActive||this.addChild(e),e.renderId=this.renderId);const r=e.children;if(r)for(let n=0;n<r.length;n++)this.updateAccessibleObjects(r[n])}update(){const e=performance.now();if(Yi.android.device&&e<this.androidUpdateCount||(this.androidUpdateCount=e+this.androidUpdateFrequency,!this.renderer.renderingToScreen))return;this.renderer.lastObjectRendered&&this.updateAccessibleObjects(this.renderer.lastObjectRendered);const{x:r,y:n,width:i,height:s}=this.renderer.view.getBoundingClientRect(),{width:o,height:l,resolution:h}=this.renderer,c=i/o*h,f=s/l*h;let m=this.div;m.style.left=`${r}px`,m.style.top=`${n}px`,m.style.width=`${o}px`,m.style.height=`${l}px`;for(let p=0;p<this.children.length;p++){const v=this.children[p];if(v.renderId!==this.renderId)v._accessibleActive=!1,Za(this.children,p,1),this.div.removeChild(v._accessibleDiv),this.pool.push(v._accessibleDiv),v._accessibleDiv=null,p--;else{m=v._accessibleDiv;let _=v.hitArea;const E=v.worldTransform;v.hitArea?(m.style.left=`${(E.tx+_.x*E.a)*c}px`,m.style.top=`${(E.ty+_.y*E.d)*f}px`,m.style.width=`${_.width*E.a*c}px`,m.style.height=`${_.height*E.d*f}px`):(_=v.getBounds(),this.capHitArea(_),m.style.left=`${_.x*c}px`,m.style.top=`${_.y*f}px`,m.style.width=`${_.width*c}px`,m.style.height=`${_.height*f}px`,m.title!==v.accessibleTitle&&v.accessibleTitle!==null&&(m.title=v.accessibleTitle),m.getAttribute("aria-label")!==v.accessibleHint&&v.accessibleHint!==null&&m.setAttribute("aria-label",v.accessibleHint)),(v.accessibleTitle!==m.title||v.tabIndex!==m.tabIndex)&&(m.title=v.accessibleTitle,m.tabIndex=v.tabIndex,this.debug&&this.updateDebugHTML(m))}}this.renderId++}updateDebugHTML(e){e.innerHTML=`type: ${e.type}</br> title : ${e.title}</br> tabIndex: ${e.tabIndex}`}capHitArea(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);const{width:r,height:n}=this.renderer;e.x+e.width>r&&(e.width=r-e.x),e.y+e.height>n&&(e.height=n-e.y)}addChild(e){let r=this.pool.pop();r||(r=document.createElement("button"),r.style.width=`${nd}px`,r.style.height=`${nd}px`,r.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",r.style.position="absolute",r.style.zIndex=sS.toString(),r.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?r.setAttribute("aria-live","off"):r.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?r.setAttribute("aria-relevant","additions"):r.setAttribute("aria-relevant","text"),r.addEventListener("click",this._onClick.bind(this)),r.addEventListener("focus",this._onFocus.bind(this)),r.addEventListener("focusout",this._onFocusOut.bind(this))),r.style.pointerEvents=e.accessiblePointerEvents,r.type=e.accessibleType,e.accessibleTitle&&e.accessibleTitle!==null?r.title=e.accessibleTitle:(!e.accessibleHint||e.accessibleHint===null)&&(r.title=`displayObject ${e.tabIndex}`),e.accessibleHint&&e.accessibleHint!==null&&r.setAttribute("aria-label",e.accessibleHint),this.debug&&this.updateDebugHTML(r),e._accessibleActive=!0,e._accessibleDiv=r,r.displayObject=e,this.children.push(e),this.div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex}_dispatchEvent(e,r){const{displayObject:n}=e.target,i=this.renderer.events.rootBoundary,s=Object.assign(new fh(i),{target:n});i.rootTarget=this.renderer.lastObjectRendered,r.forEach(o=>i.dispatchEvent(s,o))}_onClick(e){this._dispatchEvent(e,["click","pointertap","tap"])}_onFocus(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","assertive"),this._dispatchEvent(e,["mouseover"])}_onFocusOut(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","polite"),this._dispatchEvent(e,["mouseout"])}_onKeyDown(e){e.keyCode===nB&&this.activate()}_onMouseMove(e){e.movementX===0&&e.movementY===0||this.deactivate()}destroy(){this.destroyTouchHook(),this.div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null}}KC.extension={name:"accessibility",type:[ae.RendererPlugin,ae.CanvasRendererPlugin]};we.add(KC);var tr=(t=>(t[t.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",t[t.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",t[t.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",t[t.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",t[t.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",t[t.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",t[t.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",t[t.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",t[t.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",t[t.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",t[t.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",t[t.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",t[t.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",t[t.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",t[t.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",t[t.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",t[t.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",t[t.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",t[t.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",t[t.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",t[t.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",t[t.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35987]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",t[t.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",t[t.COMPRESSED_RGBA_ASTC_4x4_KHR=37808]="COMPRESSED_RGBA_ASTC_4x4_KHR",t[t.COMPRESSED_RGBA_BPTC_UNORM_EXT=36492]="COMPRESSED_RGBA_BPTC_UNORM_EXT",t[t.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=36493]="COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT",t[t.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT=36494]="COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT",t[t.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT=36495]="COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT",t))(tr||{});const Rf={33776:.5,33777:.5,33778:1,33779:1,35916:.5,35917:.5,35918:1,35919:1,37488:.5,37489:.5,37490:1,37491:1,37492:.5,37496:1,37493:.5,37497:1,37494:.5,37495:.5,35840:.5,35842:.5,35841:.25,35843:.25,36196:.5,35986:.5,35987:1,34798:1,37808:1,36492:1,36493:1,36494:1,36495:1};let pi,ba;function aS(){ba={bptc:pi.getExtension("EXT_texture_compression_bptc"),astc:pi.getExtension("WEBGL_compressed_texture_astc"),etc:pi.getExtension("WEBGL_compressed_texture_etc"),s3tc:pi.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:pi.getExtension("WEBGL_compressed_texture_s3tc_srgb"),pvrtc:pi.getExtension("WEBGL_compressed_texture_pvrtc")||pi.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),etc1:pi.getExtension("WEBGL_compressed_texture_etc1"),atc:pi.getExtension("WEBGL_compressed_texture_atc")}}const uB={extension:{type:ae.DetectionParser,priority:2},test:async()=>{const t=he.ADAPTER.createCanvas().getContext("webgl");return t?(pi=t,!0):(console.warn("WebGL not available for compressed textures."),!1)},add:async t=>{ba||aS();const e=[];for(const r in ba)ba[r]&&e.push(r);return[...e,...t]},remove:async t=>(ba||aS(),t.filter(e=>!(e in ba)))};we.add(uB);class hB extends np{constructor(e,r={width:1,height:1,autoLoad:!0}){let n,i;typeof e=="string"?(n=e,i=new Uint8Array):(n=null,i=e),super(i,r),this.origin=n,this.buffer=i?new mv(i):null,this._load=null,this.loaded=!1,this.origin!==null&&r.autoLoad!==!1&&this.load(),this.origin===null&&this.buffer&&(this._load=Promise.resolve(this),this.loaded=!0,this.onBlobLoaded(this.buffer.rawBinaryData))}onBlobLoaded(e){}load(){return this._load?this._load:(this._load=fetch(this.origin).then(e=>e.blob()).then(e=>e.arrayBuffer()).then(e=>(this.data=new Uint32Array(e),this.buffer=new mv(e),this.loaded=!0,this.onBlobLoaded(e),this.update(),this)),this._load)}}class Bo extends hB{constructor(e,r){super(e,r),this.format=r.format,this.levels=r.levels||1,this._width=r.width,this._height=r.height,this._extension=Bo._formatToExtension(this.format),(r.levelBuffers||this.buffer)&&(this._levelBuffers=r.levelBuffers||Bo._createLevelBuffers(e instanceof Uint8Array?e:this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height))}upload(e,r,n){const i=e.gl;if(!e.context.extensions[this._extension])throw new Error(`${this._extension} textures are not supported on the current machine`);if(!this._levelBuffers)return!1;i.pixelStorei(i.UNPACK_ALIGNMENT,4);for(let s=0,o=this.levels;s<o;s++){const{levelID:l,levelWidth:h,levelHeight:c,levelBuffer:f}=this._levelBuffers[s];i.compressedTexImage2D(i.TEXTURE_2D,l,this.format,h,c,0,f)}return!0}onBlobLoaded(){this._levelBuffers=Bo._createLevelBuffers(this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height)}static _formatToExtension(e){if(e>=33776&&e<=33779)return"s3tc";if(e>=35916&&e<=35919)return"s3tc_sRGB";if(e>=37488&&e<=37497)return"etc";if(e>=35840&&e<=35843)return"pvrtc";if(e===36196)return"etc1";if(e===35986||e===35987||e===34798)return"atc";if(e>=36492&&e<=36495)return"bptc";if(e===37808)return"astc";throw new Error(`Invalid (compressed) texture format given: ${e}`)}static _createLevelBuffers(e,r,n,i,s,o,l){const h=new Array(n);let c=e.byteOffset,f=o,m=l,p=f+i-1&~(i-1),v=m+s-1&~(s-1),_=p*v*Rf[r];for(let E=0;E<n;E++)h[E]={levelID:E,levelWidth:n>1?f:p,levelHeight:n>1?m:v,levelBuffer:new Uint8Array(e.buffer,c,_)},c+=_,f=f>>1||1,m=m>>1||1,p=f+i-1&~(i-1),v=m+s-1&~(s-1),_=p*v*Rf[r];return h}}const Jg=4,id=124,cB=32,lS=20,dB=542327876,sd={HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},fB={FOURCC:2},od={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3},pB=1,mB=2,gB=4,yB=64,vB=512,_B=131072,xB=827611204,wB=861165636,EB=894720068,SB=808540228,bB=4,TB={[xB]:tr.COMPRESSED_RGBA_S3TC_DXT1_EXT,[wB]:tr.COMPRESSED_RGBA_S3TC_DXT3_EXT,[EB]:tr.COMPRESSED_RGBA_S3TC_DXT5_EXT},AB={70:tr.COMPRESSED_RGBA_S3TC_DXT1_EXT,71:tr.COMPRESSED_RGBA_S3TC_DXT1_EXT,73:tr.COMPRESSED_RGBA_S3TC_DXT3_EXT,74:tr.COMPRESSED_RGBA_S3TC_DXT3_EXT,76:tr.COMPRESSED_RGBA_S3TC_DXT5_EXT,77:tr.COMPRESSED_RGBA_S3TC_DXT5_EXT,72:tr.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,75:tr.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,78:tr.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,96:tr.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT,95:tr.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT,98:tr.COMPRESSED_RGBA_BPTC_UNORM_EXT,99:tr.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT};function CB(t){const e=new Uint32Array(t);if(e[0]!==dB)throw new Error("Invalid DDS file magic word");const r=new Uint32Array(t,0,id/Uint32Array.BYTES_PER_ELEMENT),n=r[sd.HEIGHT],i=r[sd.WIDTH],s=r[sd.MIPMAP_COUNT],o=new Uint32Array(t,sd.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,cB/Uint32Array.BYTES_PER_ELEMENT),l=o[pB];if(l&gB){const h=o[fB.FOURCC];if(h!==SB){const b=TB[h],x=Jg+id,A=new Uint8Array(t,x);return[new Bo(A,{format:b,width:i,height:n,levels:s})]}const c=Jg+id,f=new Uint32Array(e.buffer,c,lS/Uint32Array.BYTES_PER_ELEMENT),m=f[od.DXGI_FORMAT],p=f[od.RESOURCE_DIMENSION],v=f[od.MISC_FLAG],_=f[od.ARRAY_SIZE],E=AB[m];if(E===void 0)throw new Error(`DDSParser cannot parse texture data with DXGI format ${m}`);if(v===bB)throw new Error("DDSParser does not support cubemap textures");if(p===6)throw new Error("DDSParser does not supported 3D texture data");const T=new Array,S=Jg+id+lS;if(_===1)T.push(new Uint8Array(t,S));else{const b=Rf[E];let x=0,A=i,R=n;for(let k=0;k<s;k++){const D=Math.max(1,A+3&-4),Q=Math.max(1,R+3&-4),$=D*Q*b;x+=$,A=A>>>1,R=R>>>1}let L=S;for(let k=0;k<_;k++)T.push(new Uint8Array(t,L,x)),L+=x}return T.map(b=>new Bo(b,{format:E,width:i,height:n,levels:s}))}throw l&yB?new Error("DDSParser does not support uncompressed texture data."):l&vB?new Error("DDSParser does not supported YUV uncompressed texture data."):l&_B?new Error("DDSParser does not support single-channel (lumninance) texture data!"):l&mB?new Error("DDSParser does not support single-channel (alpha) texture data!"):new Error("DDSParser failed to load a texture file due to an unknown reason!")}const uS=[171,75,84,88,32,49,49,187,13,10,26,10],PB=67305985,Fn={ENDIANNESS:12,GL_TYPE:16,GL_FORMAT:24,GL_INTERNAL_FORMAT:28,PIXEL_WIDTH:36,PIXEL_HEIGHT:40,PIXEL_DEPTH:44,NUMBER_OF_ARRAY_ELEMENTS:48,NUMBER_OF_FACES:52,NUMBER_OF_MIPMAP_LEVELS:56,BYTES_OF_KEY_VALUE_DATA:60},qv=64,hS={[Ae.UNSIGNED_BYTE]:1,[Ae.UNSIGNED_SHORT]:2,[Ae.INT]:4,[Ae.UNSIGNED_INT]:4,[Ae.FLOAT]:4,[Ae.HALF_FLOAT]:8},IB={[ne.RGBA]:4,[ne.RGB]:3,[ne.RG]:2,[ne.RED]:1,[ne.LUMINANCE]:1,[ne.LUMINANCE_ALPHA]:2,[ne.ALPHA]:1},RB={[Ae.UNSIGNED_SHORT_4_4_4_4]:2,[Ae.UNSIGNED_SHORT_5_5_5_1]:2,[Ae.UNSIGNED_SHORT_5_6_5]:2};function MB(t,e,r=!1){const n=new DataView(e);if(!kB(t,n))return null;const i=n.getUint32(Fn.ENDIANNESS,!0)===PB,s=n.getUint32(Fn.GL_TYPE,i),o=n.getUint32(Fn.GL_FORMAT,i),l=n.getUint32(Fn.GL_INTERNAL_FORMAT,i),h=n.getUint32(Fn.PIXEL_WIDTH,i),c=n.getUint32(Fn.PIXEL_HEIGHT,i)||1,f=n.getUint32(Fn.PIXEL_DEPTH,i)||1,m=n.getUint32(Fn.NUMBER_OF_ARRAY_ELEMENTS,i)||1,p=n.getUint32(Fn.NUMBER_OF_FACES,i),v=n.getUint32(Fn.NUMBER_OF_MIPMAP_LEVELS,i),_=n.getUint32(Fn.BYTES_OF_KEY_VALUE_DATA,i);if(c===0||f!==1)throw new Error("Only 2D textures are supported");if(p!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(m!==1)throw new Error("WebGL does not support array textures");const E=4,T=4,S=h+3&-4,b=c+3&-4,x=new Array(m);let A=h*c;s===0&&(A=S*b);let R;if(s!==0?hS[s]?R=hS[s]*IB[o]:R=RB[s]:R=Rf[l],R===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");const L=r?DB(n,_,i):null;let k=A*R,D=h,Q=c,$=S,me=b,te=qv+_;for(let O=0;O<v;O++){const V=n.getUint32(te,i);let ie=te+4;for(let _e=0;_e<m;_e++){let fe=x[_e];fe||(fe=x[_e]=new Array(v)),fe[O]={levelID:O,levelWidth:v>1||s!==0?D:$,levelHeight:v>1||s!==0?Q:me,levelBuffer:new Uint8Array(e,ie,k)},ie+=k}te+=V+4,te=te%4!==0?te+4-te%4:te,D=D>>1||1,Q=Q>>1||1,$=D+E-1&-4,me=Q+T-1&-4,k=$*me*R}return s!==0?{uncompressed:x.map(O=>{let V=O[0].levelBuffer,ie=!1;return s===Ae.FLOAT?V=new Float32Array(O[0].levelBuffer.buffer,O[0].levelBuffer.byteOffset,O[0].levelBuffer.byteLength/4):s===Ae.UNSIGNED_INT?(ie=!0,V=new Uint32Array(O[0].levelBuffer.buffer,O[0].levelBuffer.byteOffset,O[0].levelBuffer.byteLength/4)):s===Ae.INT&&(ie=!0,V=new Int32Array(O[0].levelBuffer.buffer,O[0].levelBuffer.byteOffset,O[0].levelBuffer.byteLength/4)),{resource:new np(V,{width:O[0].levelWidth,height:O[0].levelHeight}),type:s,format:ie?NB(o):o}}),kvData:L}:{compressed:x.map(O=>new Bo(null,{format:l,width:h,height:c,levels:v,levelBuffers:O})),kvData:L}}function kB(t,e){for(let r=0;r<uS.length;r++)if(e.getUint8(r)!==uS[r])return console.error(`${t} is not a valid *.ktx file!`),!1;return!0}function NB(t){switch(t){case ne.RGBA:return ne.RGBA_INTEGER;case ne.RGB:return ne.RGB_INTEGER;case ne.RG:return ne.RG_INTEGER;case ne.RED:return ne.RED_INTEGER;default:return t}}function DB(t,e,r){const n=new Map;let i=0;for(;i<e;){const s=t.getUint32(qv+i,r),o=qv+i+4,l=3-(s+3)%4;if(s===0||s>e-i){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}let h=0;for(;h<s&&t.getUint8(o+h)!==0;h++);if(h===-1){console.error("KTXLoader: Failed to find null byte terminating kvData key");break}const c=new TextDecoder().decode(new Uint8Array(t.buffer,o,h)),f=new DataView(t.buffer,o+h+1,s-h-1);n.set(c,f),i+=4+s+l}return n}const OB={extension:{type:ae.LoadParser,priority:qn.High},name:"loadDDS",test(t){return to(t,".dds")},async load(t,e,r){const n=await(await he.ADAPTER.fetch(t)).arrayBuffer(),i=CB(n).map(s=>{const o=new Ne(s,{mipmap:Pi.OFF,alphaMode:Br.NO_PREMULTIPLIED_ALPHA,resolution:ns(t),...e.data});return dh(o,r,t)});return i.length===1?i[0]:i},unload(t){Array.isArray(t)?t.forEach(e=>e.destroy(!0)):t.destroy(!0)}};we.add(OB);const FB={extension:{type:ae.LoadParser,priority:qn.High},name:"loadKTX",test(t){return to(t,".ktx")},async load(t,e,r){const n=await(await he.ADAPTER.fetch(t)).arrayBuffer(),{compressed:i,uncompressed:s,kvData:o}=MB(t,n),l=i??s,h={mipmap:Pi.OFF,alphaMode:Br.NO_PREMULTIPLIED_ALPHA,resolution:ns(t),...e.data},c=l.map(f=>{l===s&&Object.assign(h,{type:f.type,format:f.format});const m=f.resource??f,p=new Ne(m,h);return p.ktxKeyValueData=o,dh(p,r,t)});return c.length===1?c[0]:c},unload(t){Array.isArray(t)?t.forEach(e=>e.destroy(!0)):t.destroy(!0)}};we.add(FB);const BB=["s3tc","s3tc_sRGB","etc","etc1","pvrtc","atc","astc","bptc"],LB={extension:ae.ResolveParser,test:t=>{const e=Kt.extname(t).slice(1);return["basis","ktx","dds"].includes(e)},parse:t=>{var n,i;const e=t.split("."),r=e.pop();if(["ktx","dds"].includes(r)){const s=e.pop();if(BB.includes(s))return{resolution:parseFloat(((n=he.RETINA_PREFIX.exec(t))==null?void 0:n[1])??"1"),format:s,src:t}}return{resolution:parseFloat(((i=he.RETINA_PREFIX.exec(t))==null?void 0:i[1])??"1"),format:r,src:t}}};we.add(LB);const ad=new De,UB=4,qC=class du{constructor(e){this.renderer=e,this._rendererPremultipliedAlpha=!1}contextChange(){var r;const e=(r=this.renderer)==null?void 0:r.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(e&&e.alpha&&e.premultipliedAlpha)}async image(e,r,n,i){const s=new Image;return s.src=await this.base64(e,r,n,i),s}async base64(e,r,n,i){const s=this.canvas(e,i);if(s.toBlob!==void 0)return new Promise((o,l)=>{s.toBlob(h=>{if(!h){l(new Error("ICanvas.toBlob failed!"));return}const c=new FileReader;c.onload=()=>o(c.result),c.onerror=l,c.readAsDataURL(h)},r,n)});if(s.toDataURL!==void 0)return s.toDataURL(r,n);if(s.convertToBlob!==void 0){const o=await s.convertToBlob({type:r,quality:n});return new Promise((l,h)=>{const c=new FileReader;c.onload=()=>l(c.result),c.onerror=h,c.readAsDataURL(o)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(e,r){const{pixels:n,width:i,height:s,flipY:o,premultipliedAlpha:l}=this._rawPixels(e,r);o&&du._flipY(n,i,s),l&&du._unpremultiplyAlpha(n);const h=new D4(i,s,1),c=new ImageData(new Uint8ClampedArray(n.buffer),i,s);return h.context.putImageData(c,0,0),h.canvas}pixels(e,r){const{pixels:n,width:i,height:s,flipY:o,premultipliedAlpha:l}=this._rawPixels(e,r);return o&&du._flipY(n,i,s),l&&du._unpremultiplyAlpha(n),n}_rawPixels(e,r){const n=this.renderer;if(!n)throw new Error("The Extract has already been destroyed");let i,s=!1,o=!1,l,h=!1;e&&(e instanceof Qo?l=e:(l=n.generateTexture(e,{region:r,resolution:n.resolution,multisample:n.multisample}),h=!0,r&&(ad.width=r.width,ad.height=r.height,r=ad)));const c=n.gl;if(l){if(i=l.baseTexture.resolution,r=r??l.frame,s=!1,o=l.baseTexture.alphaMode>0&&l.baseTexture.format===ne.RGBA,!h){n.renderTexture.bind(l);const v=l.framebuffer.glFramebuffers[n.CONTEXT_UID];v.blitFramebuffer&&n.framebuffer.bind(v.blitFramebuffer)}}else i=n.resolution,r||(r=ad,r.width=n.width/i,r.height=n.height/i),s=!0,o=this._rendererPremultipliedAlpha,n.renderTexture.bind();const f=Math.max(Math.round(r.width*i),1),m=Math.max(Math.round(r.height*i),1),p=new Uint8Array(UB*f*m);return c.readPixels(Math.round(r.x*i),Math.round(r.y*i),f,m,c.RGBA,c.UNSIGNED_BYTE,p),h&&(l==null||l.destroy(!0)),{pixels:p,width:f,height:m,flipY:s,premultipliedAlpha:o}}destroy(){this.renderer=null}static _flipY(e,r,n){const i=r<<2,s=n>>1,o=new Uint8Array(i);for(let l=0;l<s;l++){const h=l*i,c=(n-l-1)*i;o.set(e.subarray(h,h+i)),e.copyWithin(h,c,c+i),e.set(o,c)}}static _unpremultiplyAlpha(e){e instanceof Uint8ClampedArray&&(e=new Uint8Array(e.buffer));const r=e.length;for(let n=0;n<r;n+=4){const i=e[n+3];if(i!==0){const s=255.001/i;e[n]=e[n]*s+.5,e[n+1]=e[n+1]*s+.5,e[n+2]=e[n+2]*s+.5}}}};qC.extension={name:"extract",type:ae.RendererSystem};let zB=qC;we.add(zB);class GB{constructor(e){this.maxItemsPerFrame=e,this.itemsLeft=0}beginFrame(){this.itemsLeft=this.maxItemsPerFrame}allowedToUpload(){return this.itemsLeft-- >0}}function HB(t,e){var n;let r=!1;if((n=t==null?void 0:t._textures)!=null&&n.length){for(let i=0;i<t._textures.length;i++)if(t._textures[i]instanceof se){const s=t._textures[i].baseTexture;e.includes(s)||(e.push(s),r=!0)}}return r}function jB(t,e){if(t.baseTexture instanceof Ne){const r=t.baseTexture;return e.includes(r)||e.push(r),!0}return!1}function $B(t,e){if(t._texture&&t._texture instanceof se){const r=t._texture.baseTexture;return e.includes(r)||e.push(r),!0}return!1}function WB(t,e){return e instanceof u_?(e.updateText(!0),!0):!1}function VB(t,e){if(e instanceof Or){const r=e.toFontString();return _n.measureFont(r),!0}return!1}function XB(t,e){if(t instanceof u_){e.includes(t.style)||e.push(t.style),e.includes(t)||e.push(t);const r=t._texture.baseTexture;return e.includes(r)||e.push(r),!0}return!1}function YB(t,e){return t instanceof Or?(e.includes(t)||e.push(t),!0):!1}const ZC=class JC{constructor(e){this.limiter=new GB(JC.uploadsPerFrame),this.renderer=e,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=()=>{this.queue&&this.prepareItems()},this.registerFindHook(XB),this.registerFindHook(YB),this.registerFindHook(HB),this.registerFindHook(jB),this.registerFindHook($B),this.registerUploadHook(WB),this.registerUploadHook(VB)}upload(e){return new Promise(r=>{e&&this.add(e),this.queue.length?(this.completes.push(r),this.ticking||(this.ticking=!0,Yt.system.addOnce(this.tick,this,Qs.UTILITY))):r()})}tick(){setTimeout(this.delayedTick,0)}prepareItems(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){const e=this.queue[0];let r=!1;if(e&&!e._destroyed){for(let n=0,i=this.uploadHooks.length;n<i;n++)if(this.uploadHooks[n](this.uploadHookHelper,e)){this.queue.shift(),r=!0;break}}r||this.queue.shift()}if(this.queue.length)Yt.system.addOnce(this.tick,this,Qs.UTILITY);else{this.ticking=!1;const e=this.completes.slice(0);this.completes.length=0;for(let r=0,n=e.length;r<n;r++)e[r]()}}registerFindHook(e){return e&&this.addHooks.push(e),this}registerUploadHook(e){return e&&this.uploadHooks.push(e),this}add(e){for(let r=0,n=this.addHooks.length;r<n&&!this.addHooks[r](e,this.queue);r++);if(e instanceof Tr)for(let r=e.children.length-1;r>=0;r--)this.add(e.children[r]);return this}destroy(){this.ticking&&Yt.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null}};ZC.uploadsPerFrame=4;let Zv=ZC;Object.defineProperties(he,{UPLOADS_PER_FRAME:{get(){return Zv.uploadsPerFrame},set(t){Ue("7.1.0","settings.UPLOADS_PER_FRAME is deprecated, use prepare.BasePrepare.uploadsPerFrame"),Zv.uploadsPerFrame=t}}});function e2(t,e){return e instanceof Ne?(e._glTextures[t.CONTEXT_UID]||t.texture.bind(e),!0):!1}function QB(t,e){if(!(e instanceof Iu))return!1;const{geometry:r}=e;e.finishPoly(),r.updateBatches();const{batches:n}=r;for(let i=0;i<n.length;i++){const{texture:s}=n[i].style;s&&e2(t,s.baseTexture)}return r.batchable||t.geometry.bind(r,e._resolveDirectShader(t)),!0}function KB(t,e){return t instanceof Iu?(e.push(t),!0):!1}class t2 extends Zv{constructor(e){super(e),this.uploadHookHelper=this.renderer,this.registerFindHook(KB),this.registerUploadHook(e2),this.registerUploadHook(QB)}}t2.extension={name:"prepare",type:ae.RendererSystem};we.add(t2);const r2=class fu{constructor(e,r,n){this.linkedSheets=[],(e instanceof Ne||e instanceof se)&&(e={texture:e,data:r,resolutionFilename:n});const{texture:i,data:s,resolutionFilename:o=null,cachePrefix:l=""}=e;this.cachePrefix=l,this._texture=i instanceof se?i:null,this.baseTexture=i instanceof Ne?i:this._texture.baseTexture,this.textures={},this.animations={},this.data=s;const h=this.baseTexture.resource;this.resolution=this._updateResolution(o||(h?h.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(e=null){const{scale:r}=this.data.meta;let n=ns(e,null);return n===null&&(n=typeof r=="number"?r:parseFloat(r??"1")),n!==1&&this.baseTexture.setResolution(n),n}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=fu.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let r=e;const n=fu.BATCH_SIZE;for(;r-e<n&&r<this._frameKeys.length;){const i=this._frameKeys[r],s=this._frames[i],o=s.frame;if(o){let l=null,h=null;const c=s.trimmed!==!1&&s.sourceSize?s.sourceSize:s.frame,f=new De(0,0,Math.floor(c.w)/this.resolution,Math.floor(c.h)/this.resolution);s.rotated?l=new De(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.h)/this.resolution,Math.floor(o.w)/this.resolution):l=new De(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution),s.trimmed!==!1&&s.spriteSourceSize&&(h=new De(Math.floor(s.spriteSourceSize.x)/this.resolution,Math.floor(s.spriteSourceSize.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution)),this.textures[i]=new se(this.baseTexture,l,f,h,s.rotated?2:0,s.anchor,s.borders),se.addToCache(this.textures[i],this.cachePrefix+i.toString())}r++}}_processAnimations(){const e=this.data.animations||{};for(const r in e){this.animations[r]=[];for(let n=0;n<e[r].length;n++){const i=e[r][n];this.animations[r].push(this.textures[i])}}}_parseComplete(){const e=this._callback;this._callback=null,this._batchIndex=0,e.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*fu.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*fu.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(e=!1){var r;for(const n in this.textures)this.textures[n].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,e&&((r=this._texture)==null||r.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null,this.linkedSheets=[]}};r2.BATCH_SIZE=1e3;let cS=r2;const qB=["jpg","png","jpeg","avif","webp","s3tc","s3tc_sRGB","etc","etc1","pvrtc","atc","astc","bptc"];function n2(t,e,r){const n={};if(t.forEach(i=>{n[i]=e}),Object.keys(e.textures).forEach(i=>{n[`${e.cachePrefix}${i}`]=e.textures[i]}),!r){const i=Kt.dirname(t[0]);e.linkedSheets.forEach((s,o)=>{Object.assign(n,n2([`${i}/${e.data.meta.related_multi_packs[o]}`],s,!0))})}return n}const ZB={extension:ae.Asset,cache:{test:t=>t instanceof cS,getCacheableAssets:(t,e)=>n2(t,e,!1)},resolver:{test:t=>{const e=t.split("?")[0].split("."),r=e.pop(),n=e.pop();return r==="json"&&qB.includes(n)},parse:t=>{var r;const e=t.split(".");return{resolution:parseFloat(((r=he.RETINA_PREFIX.exec(t))==null?void 0:r[1])??"1"),format:e[e.length-2],src:t}}},loader:{name:"spritesheetLoader",extension:{type:ae.LoadParser,priority:qn.Normal},async testParse(t,e){return Kt.extname(e.src).toLowerCase()===".json"&&!!t.frames},async parse(t,e,r){var f,m;const{texture:n,imageFilename:i,cachePrefix:s}=(e==null?void 0:e.data)??{};let o=Kt.dirname(e.src);o&&o.lastIndexOf("/")!==o.length-1&&(o+="/");let l;if(n&&n.baseTexture)l=n;else{const p=Ov(o+(i??t.meta.image),e.src);l=(await r.load([p]))[p]}const h=new cS({texture:l.baseTexture,data:t,resolutionFilename:e.src,cachePrefix:s});await h.parse();const c=(f=t==null?void 0:t.meta)==null?void 0:f.related_multi_packs;if(Array.isArray(c)){const p=[];for(const _ of c){if(typeof _!="string")continue;let E=o+_;(m=e.data)!=null&&m.ignoreMultiPack||(E=Ov(E,e.src),p.push(r.load({src:E,data:{ignoreMultiPack:!0}})))}const v=await Promise.all(p);h.linkedSheets=v,v.forEach(_=>{_.linkedSheets=[h].concat(h.linkedSheets.filter(E=>E!==_))})}return h},unload(t){t.destroy(!0)}}};we.add(ZB);const Jv=class Ta extends Or{constructor(){super(...arguments),this._fonts=[],this._overrides=[],this._stylesheet="",this.fontsDirty=!1}static from(e){return new Ta(Object.keys(Ta.defaultOptions).reduce((r,n)=>({...r,[n]:e[n]}),{}))}cleanFonts(){this._fonts.length>0&&(this._fonts.forEach(e=>{URL.revokeObjectURL(e.src),e.refs--,e.refs===0&&(e.fontFace&&document.fonts.delete(e.fontFace),delete Ta.availableFonts[e.originalUrl])}),this.fontFamily="Arial",this._fonts.length=0,this.styleID++,this.fontsDirty=!0)}loadFont(e,r={}){const{availableFonts:n}=Ta;if(n[e]){const i=n[e];return this._fonts.push(i),i.refs++,this.styleID++,this.fontsDirty=!0,Promise.resolve()}return he.ADAPTER.fetch(e).then(i=>i.blob()).then(async i=>new Promise((s,o)=>{const l=URL.createObjectURL(i),h=new FileReader;h.onload=()=>s([l,h.result]),h.onerror=o,h.readAsDataURL(i)})).then(async([i,s])=>{const o=Object.assign({family:Kt.basename(e,Kt.extname(e)),weight:"normal",style:"normal",display:"auto",src:i,dataSrc:s,refs:1,originalUrl:e,fontFace:null},r);n[e]=o,this._fonts.push(o),this.styleID++;const l=new FontFace(o.family,`url(${o.src})`,{weight:o.weight,style:o.style,display:o.display});o.fontFace=l,await l.load(),document.fonts.add(l),await document.fonts.ready,this.styleID++,this.fontsDirty=!0})}addOverride(...e){const r=e.filter(n=>!this._overrides.includes(n));r.length>0&&(this._overrides.push(...r),this.styleID++)}removeOverride(...e){const r=e.filter(n=>this._overrides.includes(n));r.length>0&&(this._overrides=this._overrides.filter(n=>!r.includes(n)),this.styleID++)}toCSS(e){return[`transform: scale(${e})`,"transform-origin: top left","display: inline-block",`color: ${this.normalizeColor(this.fill)}`,`font-size: ${this.fontSize}px`,`font-family: ${this.fontFamily}`,`font-weight: ${this.fontWeight}`,`font-style: ${this.fontStyle}`,`font-variant: ${this.fontVariant}`,`letter-spacing: ${this.letterSpacing}px`,`text-align: ${this.align}`,`padding: ${this.padding}px`,`white-space: ${this.whiteSpace}`,...this.lineHeight?[`line-height: ${this.lineHeight}px`]:[],...this.wordWrap?[`word-wrap: ${this.breakWords?"break-all":"break-word"}`,`max-width: ${this.wordWrapWidth}px`]:[],...this.strokeThickness?[`-webkit-text-stroke-width: ${this.strokeThickness}px`,`-webkit-text-stroke-color: ${this.normalizeColor(this.stroke)}`,`text-stroke-width: ${this.strokeThickness}px`,`text-stroke-color: ${this.normalizeColor(this.stroke)}`,"paint-order: stroke"]:[],...this.dropShadow?[this.dropShadowToCSS()]:[],...this._overrides].join(";")}toGlobalCSS(){return this._fonts.reduce((e,r)=>`${e}
1199
1199
  @font-face {
1200
1200
  font-family: "${r.family}";
1201
1201
  src: url('${r.dataSrc}');
@@ -1203,4 +1203,4 @@ void main()
1203
1203
  font-style: ${r.style};
1204
1204
  font-display: ${r.display};
1205
1205
  }`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(e){this._stylesheet!==e&&(this._stylesheet=e,this.styleID++)}normalizeColor(e){return Array.isArray(e)&&(e=R4(e)),typeof e=="number"?I4(e):e}dropShadowToCSS(){let e=this.normalizeColor(this.dropShadowColor);const r=this.dropShadowAlpha,n=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),i=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);e.startsWith("#")&&r<1&&(e+=(r*255|0).toString(16).padStart(2,"0"));const s=`${n}px ${i}px`;return this.dropShadowBlur>0?`text-shadow: ${s} ${this.dropShadowBlur}px ${e}`:`text-shadow: ${s} ${e}`}reset(){Object.assign(this,Ta.defaultOptions)}onBeforeDraw(){const{fontsDirty:e}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&e?new Promise(r=>setTimeout(r,100)):Promise.resolve()}get isSafari(){const{userAgent:e}=he.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(e)}set fillGradientStops(e){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(e){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(e){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(e){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(e){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(e){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(e){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};Jv.availableFonts={},Jv.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};let ey=Jv;const ld=class Aa extends ki{constructor(e="",r={}){super(se.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this.localStyleID=-1,this.dirty=!1,this._updateID=0,this.ownsStyle=!1;const n=new Image,i=se.from(n,{scaleMode:he.SCALE_MODE,resourceOptions:{autoLoad:!1}});i.orig=new De,i.trim=new De,this.texture=i;const s="http://www.w3.org/2000/svg",o="http://www.w3.org/1999/xhtml",l=document.createElementNS(s,"svg"),h=document.createElementNS(s,"foreignObject"),c=document.createElementNS(o,"div"),f=document.createElementNS(o,"style");h.setAttribute("width","10000"),h.setAttribute("height","10000"),h.style.overflow="hidden",l.appendChild(h),this.maxWidth=Aa.defaultMaxWidth,this.maxHeight=Aa.defaultMaxHeight,this._domElement=c,this._styleElement=f,this._svgRoot=l,this._foreignObject=h,this._foreignObject.appendChild(f),this._foreignObject.appendChild(c),this._image=n,this._loadImage=new Image,this._autoResolution=Aa.defaultAutoResolution,this._resolution=Aa.defaultResolution??he.RESOLUTION,this.text=e,this.style=r}measureText(e){var f,m;const{text:r,style:n,resolution:i}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:r,style:n.toCSS(i)}),this._styleElement.textContent=n.toGlobalCSS(),document.body.appendChild(this._svgRoot);const s=this._domElement.getBoundingClientRect();this._svgRoot.remove();const{width:o,height:l}=s;(o>this.maxWidth||l>this.maxHeight)&&console.warn("[HTMLText] Large expanse of text, increase HTMLText.maxWidth or HTMLText.maxHeight property.");const h=Math.min(this.maxWidth,Math.ceil(o)),c=Math.min(this.maxHeight,Math.ceil(l));return this._svgRoot.setAttribute("width",h.toString()),this._svgRoot.setAttribute("height",c.toString()),r!==this._text&&(this._domElement.innerHTML=this._text),n!==this._style&&(Object.assign(this._domElement,{style:(f=this._style)==null?void 0:f.toCSS(i)}),this._styleElement.textContent=(m=this._style)==null?void 0:m.toGlobalCSS()),{width:h+n.padding*2,height:c+n.padding*2}}async updateText(e=!0){const{style:r,_image:n,_loadImage:i}=this;if(this.localStyleID!==r.styleID&&(this.dirty=!0,this.localStyleID=r.styleID),!this.dirty&&e)return;const{width:s,height:o}=this.measureText();n.width=i.width=Math.ceil(Math.max(1,s)),n.height=i.height=Math.ceil(Math.max(1,o)),this._updateID++;const l=this._updateID;await new Promise(h=>{i.onload=async()=>{if(l<this._updateID){h();return}await r.onBeforeDraw(),n.src=i.src,i.onload=null,i.src="",this.updateTexture(),h()};const c=new XMLSerializer().serializeToString(this._svgRoot);i.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(c)}`})}get source(){return this._image}updateTexture(){const{style:e,texture:r,_image:n,resolution:i}=this,{padding:s}=e,{baseTexture:o}=r;r.trim.width=r._frame.width=n.width/i,r.trim.height=r._frame.height=n.height/i,r.trim.x=-s,r.trim.y=-s,r.orig.width=r._frame.width-s*2,r.orig.height=r._frame.height-s*2,this._onTextureUpdate(),o.setRealSize(n.width,n.height,i),this.dirty=!1}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._render(e)}_renderCanvas(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._renderCanvas(e)}getLocalBounds(e){return this.updateText(!0),super.getLocalBounds(e)}_calculateBounds(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)}_onStyleChange(){this.dirty=!0}destroy(e){var n,i,s,o,l;typeof e=="boolean"&&(e={children:e}),e=Object.assign({},Aa.defaultDestroyOptions,e),super.destroy(e);const r=null;this.ownsStyle&&((n=this._style)==null||n.cleanFonts()),this._style=r,(i=this._svgRoot)==null||i.remove(),this._svgRoot=r,(s=this._domElement)==null||s.remove(),this._domElement=r,(o=this._foreignObject)==null||o.remove(),this._foreignObject=r,(l=this._styleElement)==null||l.remove(),this._styleElement=r,this._loadImage.src="",this._loadImage.onload=null,this._loadImage=r,this._image.src="",this._image=r}get width(){return this.updateText(!0),Math.abs(this.scale.x)*this._image.width/this.resolution}set width(e){this.updateText(!0);const r=Ds(this.scale.x)||1;this.scale.x=r*e/this._image.width/this.resolution,this._width=e}get height(){return this.updateText(!0),Math.abs(this.scale.y)*this._image.height/this.resolution}set height(e){this.updateText(!0);const r=Ds(this.scale.y)||1;this.scale.y=r*e/this._image.height/this.resolution,this._height=e}get style(){return this._style}set style(e){this._style!==e&&(e=e||{},e instanceof ey?(this.ownsStyle=!1,this._style=e):e instanceof Or?(console.warn("[HTMLText] Cloning TextStyle, if this is not what you want, use HTMLTextStyle"),this.ownsStyle=!0,this._style=ey.from(e)):(this.ownsStyle=!0,this._style=new ey(e)),this.localStyleID=-1,this.dirty=!0)}get text(){return this._text}set text(e){e=String(e===""||e===null||e===void 0?" ":e),e=this.sanitiseText(e),this._text!==e&&(this._text=e,this.dirty=!0)}get resolution(){return this._resolution}set resolution(e){this._autoResolution=!1,this._resolution!==e&&(this._resolution=e,this.dirty=!0)}sanitiseText(e){return e.replace(/<br>/gi,"<br/>").replace(/<hr>/gi,"<hr/>").replace(/&nbsp;/gi,"&#160;")}};ld.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0},ld.defaultMaxWidth=2024,ld.defaultMaxHeight=2024,ld.defaultAutoResolution=!0;const Ha=(t,e,r,n,i,s,o,l,h=1)=>{t.beginFill(o),t.drawRoundedRect(e,r,n,i,s),t.endFill(),l!==void 0&&(t.lineStyle(h,l,1),t.drawRoundedRect(e,r,n,i,s),t.lineStyle(0,0,0))},JB=({bubble:t,style:e})=>U.jsxs(U.Fragment,{children:[U.jsx(nr.Graphics,{draw:r=>{r.clear(),t.show&&Ha(r,t.x,t.y,t.size,t.size,6,15856639,5925536,1)}}),t.show&&U.jsx(nr.Text,{text:t.emoji,x:t.textX,y:t.textY,style:e})]}),eL=({bubble:t,style:e})=>U.jsxs(U.Fragment,{children:[U.jsx(nr.Graphics,{draw:r=>{r.clear(),t.show&&Ha(r,t.x,t.y,t.width,t.height,4,15859699,3824444,1.5)}}),t.show&&U.jsx(nr.Text,{text:t.lines.join(`
1206
- `),x:t.textX,y:t.textY,style:e})]}),tL=t=>[{row:t.row+1,col:t.col},{row:t.row-1,col:t.col},{row:t.row,col:t.col+1},{row:t.row,col:t.col-1}],dS=(t,e)=>Math.abs(t.row-e.row)+Math.abs(t.col-e.col),ud=t=>`${t.row},${t.col}`,ty=(t,e,r)=>{const n=t.length,i=n>0?t[0].length:0,s=p=>p.row>=0&&p.col>=0&&p.row<n&&p.col<i,o=p=>t[p.row][p.col]>0,l=new Set([ud(e)]),h=new Map,c=new Map([[ud(e),0]]),f=new Map([[ud(e),dS(e,r)]]),m=()=>{let p=null,v=Number.POSITIVE_INFINITY;return l.forEach(_=>{const E=f.get(_)??Number.POSITIVE_INFINITY;E<v&&(v=E,p=_)}),p};for(;l.size>0;){const p=m();if(p===null)break;const[v,_]=p.split(",").map(Number);if(v===r.row&&_===r.col){const E=[];let T=p;for(;T;){const[S,b]=T.split(",").map(Number);E.push({row:S,col:b}),T=h.get(T)}return E.reverse()}l.delete(p),tL({row:v,col:_}).forEach(E=>{if(!s(E)||!o(E))return;const T=ud(E),S=(c.get(p)??Number.POSITIVE_INFINITY)+1;S<(c.get(T)??Number.POSITIVE_INFINITY)&&(h.set(T,p),c.set(T,S),f.set(T,S+dS(E,r)),l.add(T))})}return[]};he.SCALE_MODE=wn.NEAREST;he.ROUND_PIXELS=!0;const ce=4,i2=0,s2=0,o2=960,a2=540,fS=Math.floor(o2/ce),pS=Math.floor(a2/ce),ry={text:16446173,shadow:1776171,link:10352064},mS=[15901297,8118258,12185996,16116064,11767284,15895714,9225727,16234872],rL=3e3,nL=800,gS=140,iL=48,sL=10,hd=6,oL=1400,ny=4e3,aL={"command.executed":15909198,"installation.updated":8036568,"lsp.client.diagnostics":15755882,"lsp.updated":8036568,"message.removed":10134450,"message.part.removed":10134450,"permission.asked":12819424,"permission.replied":8376218,"server.connected":7067073,"tui.prompt.append":8377343,"tui.command.execute":8377343,"tui.toast.show":8377343},yS=1400,lL=t=>{let e=0;for(let r=0;r<t.length;r+=1)e=(e*31+t.charCodeAt(r))%997;return e},vS=(t,e,r)=>!e||e.length===0?r:e[lL(t)%e.length],_S=(t,e)=>`${t},${e}`,uL=12,hL=-4,cd=2,xS=(t,e,r)=>{const n=(l,h)=>l>=0&&h>=0&&l<r.length&&h<r[0].length,i=(l,h)=>r[l][h]>0;let s=e[0]||t,o=Number.POSITIVE_INFINITY;return e.forEach(l=>{for(let h=-cd;h<=cd;h+=1)for(let c=-cd;c<=cd;c+=1){const f=l.row+h,m=l.col+c;if(!n(f,m)||!i(f,m))continue;const p=Math.abs(f-t.row)+Math.abs(m-t.col);p<o&&(o=p,s={row:f,col:m})}}),s},iy=t=>{if(t.length<=2)return t;const e=[t[0]];let r=t[0],n={row:t[1].row-r.row,col:t[1].col-r.col};for(let i=1;i<t.length-1;i+=1){const s=t[i],o=t[i+1],l={row:o.row-s.row,col:o.col-s.col};(l.row!==n.row||l.col!==n.col)&&(e.push(s),n=l),r=s}return e.push(t[t.length-1]),e},Ss=t=>({x:t.col*ce+ce/2+s2,y:t.row*ce+ce/2+i2}),Gi=(t,e)=>({col:Math.round((t-s2-ce/2)/ce),row:Math.round((e-i2-ce/2)/ce)}),wS=()=>({row:48*2,col:48*2}),cL=t=>{switch(t){case"idle":return .35;case"thinking":return .55;case"planning":return .5;case"error":return .35;case"working":default:return .7}},ES=t=>t==="working"||t==="thinking",dL=t=>{const e=t.id||"";let r=0;for(let n=0;n<e.length;n+=1)r=(r*31+e.charCodeAt(n))%997;return mS[r%mS.length]},fL=t=>{switch(t){case"idle":return"idle";case"thinking":return"thinking";case"planning":return"planning";case"working":return"working";case"error":return"error";default:return"working"}},pL=(t,e,r,n)=>{if(!t)return[""];const i=t.split(/\s+/),s=[];let o="";if(i.forEach(l=>{const h=o?`${o} ${l}`:l;_n.measureText(h,r).width<=e?o=h:(o&&s.push(o),o=l)}),o&&s.push(o),s.length>n){const l=s.slice(s.length-n);return l[0]=`...${l[0]}`,l}return s},mL=t=>{const e=document.createElement("canvas");e.width=ce,e.height=ce;const r=e.getContext("2d");if(!r)return null;const n=(s,o,l,h,c)=>{r.fillStyle=s,r.fillRect(o,l,h,c)};switch(t){case"grass":n("#a8d070",0,0,ce,ce),n("#b7de7c",0,0,ce,4),n("#8bb85f",0,ce-12,ce,12),n("#7aa44f",0,ce-4,ce,4),n("#96c86a",8,8,8,8),n("#96c86a",36,24,8,8);break;case"path":n("#d4c4a8",0,0,ce,ce),n("#e4d7bf",0,0,ce,4),n("#bfae94",0,ce-10,ce,10),n("#ac9b82",0,ce-4,ce,4),n("#c9b89e",12,12,8,8),n("#c9b89e",40,28,8,8);break;case"wall_face":n("#4a4a5c",0,0,ce,20),n("#5a5a6e",0,0,ce,4),n("#3a3a4a",0,16,ce,4),n("#6e6e82",0,20,ce,ce-28),n("#4a4a5c",0,ce-8,ce,8);break;case"partition_h":case"partition_h_top":t==="partition_h"?n("#e8dcc8",0,0,ce,ce):n("#121212",0,24,ce,ce-24);const s=24,o=t==="partition_h_top"?0:(ce-s)/2;n("#4a4a5c",0,o,ce,s),n("#5a5a6e",0,o+4,ce,s-8),n("#3a3a4a",0,o+s-4,ce,4);break;case"partition_v":case"partition_v_left":case"partition_v_right":const l=24;let h=(ce-l)/2;t==="partition_v_left"&&(h=0),t==="partition_v_right"&&(h=ce-l),t==="partition_v"?n("#e8dcc8",0,0,ce,ce):t==="partition_v_left"?n("#121212",24,0,ce-24,ce):t==="partition_v_right"&&n("#121212",0,0,ce-24,ce),n("#4a4a5c",h,0,l,ce),n("#5a5a6e",h+4,0,l-8,ce),n("#3a3a4a",h+l-4,0,4,ce);break;case"floor":n("#e8dcc8",0,0,ce,ce),n("#f3ead9",0,0,ce,4),n("#d9ccb5",0,ce-4,ce,4),n("#c7b59f",0,ce-2,ce,2),n("#f0e6d6",4,4,4,4),n("#f0e6d6",36,36,4,4);break;default:r.clearRect(0,0,ce,ce)}const i=se.from(e);return i.baseTexture.scaleMode=wn.NEAREST,i},gL=({x:t,y:e})=>{const r="OpenCode Office",n=ke.useMemo(()=>new Or({fill:16777215,fontFamily:"Courier New",fontSize:11,fontWeight:"bold",letterSpacing:1}),[]),i=_n.measureText(r,n).width,s=10,o=5,l=i+s*2,h=18;return U.jsxs(nr.Container,{x:t,y:e,children:[U.jsx(nr.Graphics,{draw:c=>{c.clear(),c.beginFill(1710638,.5),c.drawRoundedRect(2,2,l,h,4),c.endFill(),c.beginFill(2964047),c.drawRoundedRect(0,0,l,h,4),c.endFill(),c.beginFill(4016735),c.drawRoundedRect(0,0,l,6,4),c.endFill(),c.lineStyle(1,4872815),c.drawRoundedRect(0,0,l,h,4),c.lineStyle(0),c.beginFill(7321087),c.drawCircle(8,h/2,2),c.endFill()}}),U.jsx(nr.Text,{text:r,x:s+4,y:o-1,style:n})]})},yL=({agents:t,interactions:e,sessions:r,activeSessionId:n,lastTodoSummary:i,selectedAgentId:s,onSelectAgent:o,sceneWidth:l,sceneHeight:h,setDimensions:c})=>{var H;const[f,m]=ke.useState(0),p=ke.useRef(0),v=ke.useRef(new Map),_=ke.useRef(new Map),[E,T]=ke.useState({}),[S,b]=ke.useState(()=>Array.from({length:pS},()=>Array.from({length:fS},()=>""))),[x,A]=ke.useState(null),R=(z,X)=>x?z<0||X<0||z>=x.cols||X>=x.rows?!1:x.grid[X][z]>0:z>=0&&X>=0&&X<pS&&z<fS,L=z=>{if(!x)return{row:32,col:32};for(let X=0;X<80;X++){const J=Math.floor(Math.random()*x.rows),ve=Math.floor(Math.random()*x.cols),le=x.grid[J][ve];if(!(le<=0)&&le!==2)return{row:J,col:ve}}return{row:32,col:32}};ke.useEffect(()=>{const z=new Image;z.src="/office_floor.png",z.onload=()=>{const X=z.width,J=z.height;c({width:X,height:J});const ve=Math.floor(X/ce),le=Math.floor(J/ce),Te=document.createElement("canvas");Te.width=X,Te.height=J;const Ce=Te.getContext("2d");if(!Ce)return;Ce.drawImage(z,0,0);const pe=Ce.getImageData(0,0,X,J).data,P=[];for(let Oe=0;Oe<le;Oe++){const Me=[];for(let Xe=0;Xe<ve;Xe++){let Dt=0,yr=0,Pr=0,bt=0,qe=0;const zt=Xe*ce,Ir=Oe*ce;for(let qt=1;qt<ce;qt+=2)for(let At=1;At<ce;At+=2){const Cn=zt+At,Pn=Ir+qt;if(Cn<0||Cn>=X||Pn<0||Pn>=J){qe++;continue}const vr=(Math.floor(Pn)*X+Math.floor(Cn))*4;if(vr>=0&&vr<pe.length){const jr=pe[vr],_r=pe[vr+1],$r=pe[vr+2],sn=pe[vr+3];$r>200&&jr<50&&_r<50?yr++:_r>200&&jr<50&&$r<50?Pr++:jr>200&&_r<50&&$r<50?bt++:sn<50&&Dt++}qe++}const as=qe>0?yr/qe:0,rt=qe>0?Pr/qe:0,Tt=qe>0?bt/qe:0,Hr=qe>0?Dt/qe:0;let lr=0;Tt>.3?lr=5:rt>.3?lr=4:as>.3?lr=2:Hr>.6&&(lr=1),Me.push(lr)}P.push(Me)}const ue=[],Ee=[],Re=[],Ke=[];for(let Oe=0;Oe<le;Oe++)for(let Me=0;Me<ve;Me++){const Xe=P[Oe][Me];Xe===2&&ue.push({row:Oe,col:Me}),Xe===4&&Re.push({row:Oe,col:Me}),Xe===5&&Ke.push({row:Oe,col:Me})}const je=Array.from({length:le},()=>Array.from({length:ve},()=>!1)),vt=(Oe,Me)=>Oe>=0&&Me>=0&&Oe<le&&Me<ve,St=[{row:1,col:0},{row:-1,col:0},{row:0,col:1},{row:0,col:-1}];for(let Oe=0;Oe<le;Oe+=1)for(let Me=0;Me<ve;Me+=1){if(je[Oe][Me]||P[Oe][Me]!==2)continue;const Xe=[{row:Oe,col:Me}],Dt=[];for(je[Oe][Me]=!0;Xe.length>0;){const yr=Xe.pop();if(!yr)break;Dt.push(yr),St.forEach(Pr=>{const bt=yr.row+Pr.row,qe=yr.col+Pr.col;vt(bt,qe)&&(je[bt][qe]||P[bt][qe]===2&&(je[bt][qe]=!0,Xe.push({row:bt,col:qe})))})}if(Dt.length>0){const yr=Dt.reduce((zt,Ir)=>zt+Ir.row,0)/Dt.length,Pr=Dt.reduce((zt,Ir)=>zt+Ir.col,0)/Dt.length;let bt=Dt[0],qe=Number.POSITIVE_INFINITY;Dt.forEach(zt=>{const Ir=Math.abs(zt.row-yr)+Math.abs(zt.col-Pr);Ir<qe&&(qe=Ir,bt=zt)}),Ee.push(bt)}}b(()=>{const Oe=Array.from({length:le},()=>Array.from({length:ve},()=>""));return Re.forEach(Me=>{Me.row<Oe.length&&Me.col<Oe[0].length&&(Oe[Me.row][Me.col]="door_closed")}),Oe}),A({rows:le,cols:ve,grid:P,workNodes:ue,workCenters:Ee,doorNodes:Re,exitNodes:Ke}),console.log("Generated Collision Map",{width:X,height:J,rows:le,cols:ve})}},[]),ke.useMemo(()=>{const z=["floor"],X={};return z.forEach(J=>{X[J]=mL(J)}),X.door_open=X.floor,X.door_closed=null,X},[]);const N=ke.useMemo(()=>r.find(z=>z.id===n)||null,[r,n]),D=ke.useMemo(()=>new Or({fill:ry.text,fontFamily:"Courier New",fontSize:10}),[]),q=ke.useMemo(()=>new Or({fill:13694431,fontFamily:"Courier New",fontSize:10}),[]);ke.useMemo(()=>new Or({fill:2834268,fontFamily:"Courier New",fontSize:10}),[]);const $=ke.useMemo(()=>new Or({fill:3824444,fontFamily:"Courier New",fontSize:9}),[]),me=ke.useMemo(()=>new Or({fill:2834268,fontFamily:"Apple Color Emoji, Segoe UI Emoji, Noto Color Emoji",fontSize:12}),[]);ke.useEffect(()=>{const z=(J,ve)=>new Promise((le,Te)=>{const Ce=Ne.from(J);Ce.scaleMode=wn.NEAREST;const pe=()=>{const P=Math.floor(Ce.width/ve),ue=Math.floor(Ce.height/3),Ee=Re=>{const Ke=[];for(let je=0;je<ve;je+=1)Ke.push(new se(Ce,new De(je*P,Re*ue,P,ue)));return Ke};le({right:Ee(0),down:Ee(1),up:Ee(2)})};Ce.valid?pe():(Ce.once("loaded",pe),Ce.once("error",Te))});(async()=>{try{const[J,ve,le,Te]=await Promise.all([z("/idle.png",4),z("/walk.png",8),z("/run.png",8),z("/jump.png",6)]);T({idle:J,walk:ve,run:le,jump:Te})}catch{T({})}})()},[]),ke.useEffect(()=>{var Te;const z=v.current,X=_.current,J=Date.now(),ve=new Set(t.map(Ce=>Ce.id)),le=((Te=x==null?void 0:x.exitNodes)==null?void 0:Te[0])??wS();t.forEach(Ce=>{X.set(Ce.id,Ce)});for(const Ce of z.keys())if(!ve.has(Ce)){const pe=z.get(Ce);if(pe&&!pe.exiting){const P=x?xS(Gi(pe.x,pe.y),x.exitNodes,x.grid):le,ue=Ss(P),Ee={x:ue.x+uL,y:ue.y+hL};z.set(Ce,{...pe,exiting:!0,exitAt:J,goodbyeUntil:void 0,removeAt:void 0,targetX:Ee.x,targetY:Ee.y,targetKind:"exit",targetTile:P,path:x?iy(ty(x.grid,Gi(pe.x,pe.y),P)):[],pathIndex:1,direction:"front"})}}t.forEach(Ce=>{var Ee,Re;if(z.has(Ce.id))return;const pe={row:32,col:32},P=(Ee=x==null?void 0:x.workCenters)!=null&&Ee.length?vS(Ce.id,x.workCenters,pe):(Re=x==null?void 0:x.workNodes)!=null&&Re.length?vS(Ce.id,x.workNodes,pe):pe,ue=Ss(P);z.set(Ce.id,{x:ue.x,y:ue.y,targetX:ue.x,targetY:ue.y,homeTile:{row:P.row,col:P.col},direction:"front"})})},[t,x]),nr.useTick(z=>{var Ce;p.current+=z*16;const X=v.current,J=_.current,ve=new Set(t.map(pe=>pe.id)),le=new Map;t.forEach(pe=>{const P=X.get(pe.id);if(!P||P.exiting)return;const ue=Gi(P.x,P.y);le.set(_S(ue.row,ue.col),pe.id)}),t.forEach(pe=>{var as;const P=X.get(pe.id);if(!P)return;Ss(P.homeTile);const ue=Gi(P.x,P.y),Ee=ES(pe.status||"working"),Re=rt=>{const Tt=le.get(_S(rt.row,rt.col));return Tt&&Tt!==pe.id};let Ke=P.homeTile;const je=(as=x==null?void 0:x.workCenters)!=null&&as.length?x.workCenters:(x==null?void 0:x.workNodes)||[];if(je.length){let rt=null,Tt=Number.POSITIVE_INFINITY,Hr=null,lr=Number.POSITIVE_INFINITY;je.forEach(qt=>{const At=Math.abs(qt.row-ue.row)+Math.abs(qt.col-ue.col);At<lr&&(Hr=qt,lr=At),!Re(qt)&&At<Tt&&(rt=qt,Tt=At)}),Ke=rt||Hr||P.homeTile}const vt=L();let St=Ee?"work":"wander",Oe=Ee?Ke:vt;const Me=Date.now(),Xe=Math.hypot(P.targetX-P.x,P.targetY-P.y),Dt=Xe<.6,yr=P.idlePauseUntil&&Me<P.idlePauseUntil;if(!Ee){if(yr){P.targetX=P.x,P.targetY=P.y;return}P.idlePauseUntil&&Me>=P.idlePauseUntil&&(P.idlePauseUntil=void 0,P.wanderUntil=Me+3e3+Math.floor(Math.random()*2e3),P.path=[],P.pathIndex=void 0,P.targetTile=void 0,P.targetKind=void 0,P.retargetAt=0),P.wanderUntil||(P.idlePauseUntil=Me+2e3,P.path=[],P.pathIndex=void 0,P.targetTile=void 0,P.targetKind=void 0,P.retargetAt=0)}const Pr=P.workLockUntil&&Me<P.workLockUntil,bt=!P.targetTile||!Pr&&P.targetKind!==St||(Ee?Dt:!P.wanderUntil||Me>P.wanderUntil);if(x&&bt&&(!P.path||P.path.length===0)){P.targetKind=St,P.targetTile=Oe;let rt=ty(x.grid,ue,Oe);if(rt.length===0&&St==="work"){const Tt=Ss(Oe);P.x=Tt.x,P.y=Tt.y,P.targetX=Tt.x,P.targetY=Tt.y,P.path=[],P.pathIndex=void 0}else P.path=iy(rt);P.pathIndex=P.path.length>1?1:0,P.retargetAt=Me+1400,Ee&&(P.workLockUntil=Me+2200)}if(P.path&&P.path.length>0&&P.pathIndex!==void 0){const rt=Math.min(P.pathIndex,P.path.length-1),Tt=P.path[rt];Tt.row===ue.row&&Tt.col===ue.col&&P.pathIndex<P.path.length-1&&(P.pathIndex+=1);const Hr=Ss(Tt);P.targetX=Hr.x,P.targetY=Hr.y}const qe=P.targetX-P.x,zt=P.targetY-P.y,Ir=cL(pe.status||"working");if(Xe>.1){const rt=Math.min(Ir,Xe,.4),Tt=P.x+qe/Xe*rt,Hr=P.y+zt/Xe*rt,lr=Xe<2?.4:1,qt=P.x+(Tt-P.x)*lr,At=P.y+(Hr-P.y)*lr,Cn=Gi(qt,At);let Pn=!0;if(x!=null&&x.doorNodes){const vr=($r,sn)=>x.doorNodes.some(Ko=>Ko.col===$r&&Ko.row===sn),jr=Math.floor(P.x/ce),_r=Math.floor(P.y/ce);vr(jr,_r)&&S[_r][jr]!=="door_open"&&b($r=>{const sn=[...$r];return sn[_r]=[...$r[_r]],sn[_r][jr]="door_open",sn})}if(x&&!R(Cn.col,Cn.row)&&(Pn=!1),Pn){P.x=qt,P.y=At;const vr=P.lastPosX??P.x,jr=P.lastPosY??P.y;(P.lastPosX===void 0||Math.hypot(P.x-vr,P.y-jr)>.05)&&(P.lastPosX=P.x,P.lastPosY=P.y,P.lastMoveAt=Me),(!P.dirLockUntil||Me>P.dirLockUntil)&&Xe>3&&(Math.abs(qe)>Math.abs(zt)?Math.abs(qe)>4&&(P.direction=qe>0?"right":"left",P.dirLockUntil=Me+250):Math.abs(zt)>4&&(P.direction=zt>0?"front":"back",P.dirLockUntil=Me+250))}else P.targetX=P.x,P.targetY=P.y,P.direction="front"}else Xe<.2&&(ES(pe.status||"working")?P.direction="back":P.direction="front");if(Ee&&P.lastMoveAt&&Me-P.lastMoveAt>1500){const rt=Ss(Ke);P.x=rt.x,P.y=rt.y,P.targetX=rt.x,P.targetY=rt.y,P.path=[],P.pathIndex=void 0,P.lastMoveAt=Me}Xe<.2&&P.path&&P.pathIndex!==void 0&&(P.pathIndex<P.path.length-1?P.pathIndex+=1:(P.path=[],P.pathIndex=void 0,Ee||(P.idlePauseUntil=Me+2e3,P.wanderUntil=void 0)))}),x!=null&&x.doorNodes&&x.doorNodes.forEach(pe=>{!t.some(ue=>{const Ee=X.get(ue.id);if(!Ee)return!1;const Re=Math.floor(Ee.x/ce),Ke=Math.floor(Ee.y/ce);return Re===pe.col&&Ke===pe.row})&&S[pe.row][pe.col]==="door_open"&&b(ue=>{if(ue[pe.row][pe.col]!=="door_closed"){const Ee=[...ue];return Ee[pe.row]=[...ue[pe.row]],Ee[pe.row][pe.col]="door_closed",Ee}return ue})});const Te=((Ce=x==null?void 0:x.exitNodes)==null?void 0:Ce[0])??wS();for(const[pe,P]of X.entries()){if(!P.exiting||ve.has(pe))continue;const ue=x?xS(Gi(P.x,P.y),x.exitNodes,x.grid):Te,Ee=Ss(ue);if(x&&(!P.path||P.path.length===0)){const St=Gi(P.x,P.y);P.path=iy(ty(x.grid,St,ue)),P.pathIndex=P.path.length>1?1:0}if(P.path&&P.path.length>0&&P.pathIndex!==void 0){const St=Math.min(P.pathIndex,P.path.length-1),Oe=P.path[St],Me=Ss(Oe);P.targetX=Me.x,P.targetY=Me.y}else P.targetX=Ee.x,P.targetY=Ee.y;const Re=P.targetX-P.x,Ke=P.targetY-P.y,je=Math.hypot(Re,Ke),vt=Math.min(.85,je);if(je>.1){const St=P.x+Re/je*vt,Oe=P.y+Ke/je*vt,Me=Gi(St,Oe);(!x||R(Me.col,Me.row))&&(P.x=St,P.y=Oe)}if(P.direction=Ke>0?"front":"back",P.exitAt||(P.exitAt=Date.now()),je<.2&&!P.goodbyeUntil&&(!P.path||P.path.length===0)){const St=Date.now();P.goodbyeUntil=St+yS,P.removeAt=St+yS}je<.2&&P.path&&P.pathIndex!==void 0&&(P.pathIndex<P.path.length-1?P.pathIndex+=1:(P.path=[],P.pathIndex=void 0)),je<1&&(!P.goodbyeUntil||Date.now()>P.goodbyeUntil)&&P.removeAt&&Date.now()>P.removeAt&&(X.delete(pe),J.delete(pe))}m(pe=>pe+1)});const ne=p.current,B=N!=null&&N.status?N.status.toLowerCase():"",K=(N==null?void 0:N.updatedAt)||0,ie=K&&ne-K<ny,_e=B==="busy"||B==="working"?15906638:B==="idle"?7067035:B==="error"?15755882:8036568,fe=(i==null?void 0:i.updatedAt)&&ne-i.updatedAt<ny,M=n?(H=t.find(z=>z.sessionId===n))==null?void 0:H.id:void 0,W=[],O=new Map(t.map(z=>[z.id,z]));for(const[z,X]of v.current.entries())X&&(O.has(z)||X.exiting)&&W.push({type:"agent",id:z,y:X.y});return W.sort((z,X)=>z.y-X.y),U.jsxs(U.Fragment,{children:[U.jsx(nr.Container,{children:U.jsx(nr.Sprite,{texture:se.from("/office.png"),x:0,y:0})}),U.jsx(U.Fragment,{}),U.jsx(gL,{x:8,y:8}),U.jsx(nr.Graphics,{draw:z=>{if(z.clear(),N&&B){const X=l-26,J=10;z.lineStyle(2,4874086,1),z.beginFill(_e,ie?1:.6),z.drawRoundedRect(X,J,10,10,3),z.endFill(),ie&&(z.lineStyle(2,_e,.5),z.drawRoundedRect(X-3,J-3,16,16,4)),z.lineStyle(0,0,0)}}}),U.jsx(nr.Graphics,{draw:z=>{z.clear(),e.forEach(X=>{const J=v.current.get(X.from),ve=v.current.get(X.to);!J||!ve||(z.lineStyle(2,ry.link,1),z.moveTo(J.x,J.y-8),z.lineTo(ve.x,ve.y-8),z.lineStyle(0,0,0))})}}),W.map(z=>{var bh,Th;if(z.type!=="agent")return null;const X=t.find(Be=>Be.id===z.id)||_.current.get(z.id);if(!X)return null;const J=v.current.get(X.id);if(!J)return null;const ve=J.x-8,le=J.y-12,Te=0,Ce=J.direction||"front",pe=Math.hypot(J.targetX-J.x,J.targetY-J.y),P=pe>.8,ue=pe>.2,Ee=Gi(J.x,J.y),Re=!!((bh=x==null?void 0:x.workNodes)!=null&&bh.some(Be=>Be.row===Ee.row&&Be.col===Ee.col)),je=X.status==="thinking"&&Re?"jump":P?"run":ue?"walk":"idle",vt=E[je]||E.idle,St=(vt==null?void 0:vt.right.length)||1,Me=Math.floor(ne/(P?90:ue?120:200))%St,Xe=vt?Ce==="back"?vt.up:Ce==="front"?vt.down:vt.right:null,Dt=Xe?Xe[Me]:null,yr=Ce==="left"?-1:1,Pr=(X.alias||X.name||X.id||"Agent").slice(0,10).toUpperCase(),bt=(Th=X.lastEventType)!=null&&Th.startsWith("message.")&&X.lastEventAt||0,qe=X.lastMessageAt||bt||0,zt=qe&&Date.now()-qe<rL,Ir=X.lastStreamingAt&&Date.now()-X.lastStreamingAt<nL;fL(X.status||"working");const as=X.lastMessageSnippet||"",rt=!!(J.goodbyeUntil&&Date.now()<J.goodbyeUntil),Hr=rt?"bye":Ir?".".repeat(Math.max(1,Math.floor(ne/250)%4)):as,lr=Date.now(),qt=X.lastFileEditAt&&lr-X.lastFileEditAt<oL,At=X.lastEventType||"",Cn=X.lastEventAt||X.lastActivityAt||0,Pn=Cn&&lr-Cn<ny,vr=At==="message.updated"||At==="message.part.updated",jr=At.startsWith("session."),_r=Pn&&(At==="tool.execute.before"||At==="tool.execute.after"),$r=At==="tool.execute.before"?15906638:8036568,sn=aL[At],Ko=Pn&&!_r&&!qt&&!vr&&!jr&&sn!==void 0,ph=qt?"✏️":X.status==="thinking"?"💭":X.status==="working"?"🛠️":"",mh=!!ph,no=pL(Hr,gS,$,sL),gh=no.map(Be=>_n.measureText(Be,$).width),vl=gh.length?Math.max(...gh):0,_l=Math.max(iL,Math.min(vl,gS))+hd*2,yh=(Number($.fontSize)||9)+2,vh=no.length*yh+hd*2,_h=J.x-_l/2,xl=le-56+Te-(no.length-1)*6,xh=_h+hd,wl=xl+hd,mp=4,gp=12,io=le+34+Te,wh=18,Eh=J.x-wh/2,Ni={show:!!(rt||X.lastMessageSnippet&&zt),x:_h,y:xl,width:_l,height:vh,textX:xh,textY:wl,lines:no},Sh=Ni.show?xl+vh+4:le-28+Te,ls={show:mh,x:Eh,y:Sh,size:wh,emoji:ph,textX:Eh+3,textY:Sh+1};return U.jsxs(nr.Container,{eventMode:"static",cursor:"pointer",onpointerdown:()=>o(X.id),children:[U.jsx(nr.Graphics,{draw:Be=>{if(Be.clear(),Be.beginFill(ry.shadow),Be.drawRect(ve+2,le+18+Te,12,4),Be.endFill(),!Dt){const so=dL(X);Be.beginFill(so),Be.drawRect(ve-8,le+Te-8,32,28),Be.drawRect(ve-4,le-20+Te,24,16),Be.endFill(),Be.beginFill(1250074),Ce==="front"?(Be.drawRect(ve+4,le-12+Te,4,4),Be.drawRect(ve+16,le-12+Te,4,4)):Ce==="right"?Be.drawRect(ve+16,le-12+Te,4,4):Ce==="left"&&Be.drawRect(ve+4,le-12+Te,4,4),Be.endFill()}if(_r&&(Be.lineStyle(2,$r,.9),Be.drawCircle(J.x,le+Te+8,80),Be.lineStyle(0,0,0)),Ko){const qo=J.x+10,yp=le-26+Te;Ha(Be,qo,yp,8,8,2,15856639,sn,1)}const El=_n.measureText(Pr,D).width+mp*2,Ah=J.x-El/2;if(Ha(Be,Ah,io-10,El,gp,6,2841148,7590543),fe&&X.id===M){const so=Ah+El+6,qo=io-12;Be.beginFill(16249044),Be.lineStyle(2,4874086,1),Be.drawRoundedRect(so,qo+4,14,14,3),Be.endFill(),Be.beginFill(4874086),Be.drawRect(so+4,qo,6,6),Be.endFill(),Be.lineStyle(0,0,0)}Ni.show&&Ha(Be,Ni.x,Ni.y,Ni.width,Ni.height,4,15859699,3824444,1.5),ls.show&&Ha(Be,ls.x,ls.y,ls.size,ls.size,6,15856639,5925536,1)}}),Dt&&U.jsx(nr.Sprite,{texture:Dt,anchor:.5,x:J.x,y:J.y+Te,scale:{x:yr*2,y:2}}),U.jsx(nr.Text,{text:Pr,anchor:.5,x:ve+8,y:le+30+Te,style:q}),U.jsx(eL,{bubble:Ni,style:$}),U.jsx(JB,{bubble:ls,style:me})]},X.id)})]})},vL=t=>{const[e,r]=ke.useState({width:o2,height:a2});return U.jsx(nr.Stage,{width:e.width,height:e.height,style:{display:"block"},options:{antialias:!1,backgroundColor:1054229,preserveDrawingBuffer:!0},children:U.jsx(yL,{...t,sceneWidth:e.width,sceneHeight:e.height,setDimensions:r})})},_L=({message:t,status:e})=>U.jsxs("div",{className:"boss-message-box",children:[U.jsxs("div",{className:"flex justify-between items-baseline mb-2",children:[U.jsx("div",{className:"text-[9px] uppercase tracking-widest font-bold",children:"Boss Says"}),e?U.jsx("div",{className:"text-[8px] uppercase px-2 py-0.5 bg-amber-200/50 rounded border border-amber-700/30",children:e}):null]}),U.jsx("p",{className:"text-[10px] leading-relaxed",children:t})]}),xL=({bossMessageText:t,bossStatus:e,agents:r,interactions:n,sessions:i,activeSessionId:s,lastTodoSummary:o,selectedAgentId:l,onSelectAgent:h})=>U.jsxs("div",{className:"flex flex-col gap-4",children:[U.jsx(_L,{message:t,status:e}),U.jsx("div",{className:"pixi-wrapper",children:U.jsx("div",{className:"w-full flex justify-center bg-[#101615] rounded-lg overflow-hidden",children:U.jsx(vL,{agents:r,interactions:n,sessions:i,activeSessionId:s,lastTodoSummary:o,selectedAgentId:l,onSelectAgent:h})})})]}),wL=({sessions:t,activeLabel:e,version:r,todoSummary:n,selectedSessionId:i,selectedSession:s,onSelectSession:o})=>{const l=[...t].filter(h=>h.id).sort((h,c)=>{if(h.id===i)return-1;if(c.id===i)return 1;const f=(c.updatedAt||0)-(h.updatedAt||0);if(f!==0)return f;const m=h.title||h.slug||h.id,p=c.title||c.slug||c.id;return m.localeCompare(p)});return U.jsxs("div",{className:"data-panel",children:[U.jsx("div",{className:"gamish-panel-title",children:U.jsx("span",{children:"MISSION LOG"})}),U.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4 text-[10px] text-muted-foreground",children:[U.jsxs("div",{className:"flex flex-col",children:[U.jsx("span",{className:"text-[8px] uppercase tracking-wider text-slate-500",children:"Active Session"}),U.jsx("span",{className:"text-secondary-foreground font-bold",children:e})]}),U.jsxs("div",{className:"flex flex-col",children:[U.jsx("span",{className:"text-[8px] uppercase tracking-wider text-slate-500",children:"System Ver"}),U.jsx("span",{className:"text-secondary-foreground",children:r})]}),U.jsxs("div",{className:"flex flex-col",children:[U.jsx("span",{className:"text-[8px] uppercase tracking-wider text-slate-500",children:"Objectives"}),U.jsx("span",{className:"text-secondary-foreground",children:n})]})]}),U.jsxs("div",{className:"mb-4",children:[U.jsx("div",{className:"text-[8px] uppercase tracking-wider text-slate-500 mb-2",children:"Available Sessions"}),U.jsx("div",{className:"flex flex-col max-h-[220px] overflow-y-auto pr-1 space-y-1",children:l.length===0?U.jsx("span",{className:"text-muted-foreground text-[9px] italic",children:"No active signals..."}):l.map(h=>U.jsxs("button",{type:"button",className:`session-item ${h.id===i?"active":""}`,onClick:()=>o(h.id),children:[U.jsx("span",{className:"truncate",children:h.title||h.slug||h.id.slice(0,8)}),h.id===i&&U.jsx("div",{className:"w-1.5 h-1.5 bg-emerald-400 rounded-full animate-pulse"})]},h.id))})]}),U.jsxs("div",{className:"pt-4 border-t border-slate-700",children:[U.jsx("div",{className:"text-[8px] uppercase tracking-wider text-slate-500 mb-2",children:"Session Intel"}),s?U.jsxs("div",{className:"space-y-1.5",children:[U.jsxs("div",{className:"flex flex-col",children:[U.jsx("span",{className:"text-[8px] text-slate-500",children:"Identifier"}),U.jsx("span",{className:"text-[9px] text-slate-300 break-all",children:s.title||s.slug||"-"})]}),s.status&&U.jsxs("div",{className:"flex justify-between items-center",children:[U.jsx("span",{className:"text-[8px] text-slate-500",children:"Status"}),U.jsx("span",{className:"text-[9px] px-1.5 py-0.5 rounded bg-slate-800 border border-slate-600 inline-block",children:s.status})]}),s.version&&U.jsxs("div",{className:"flex justify-between",children:[U.jsx("span",{className:"text-[8px] text-slate-500",children:"Core Ver"}),U.jsx("span",{className:"text-[9px] text-slate-400",children:s.version})]}),s.directory&&U.jsxs("div",{className:"flex flex-col mt-1",children:[U.jsx("span",{className:"text-[8px] text-slate-500",children:"Path"}),U.jsx("span",{className:"text-[8px] font-mono text-slate-500 truncate",children:s.directory})]})]}):U.jsx("span",{className:"text-[9px] text-slate-600 italic",children:"No session selected"})]})]})},EL=({todos:t})=>U.jsxs("div",{className:"data-panel",children:[U.jsx("div",{className:"gamish-panel-title",children:U.jsx("span",{children:"QUEST LOG"})}),U.jsx("div",{className:"flex flex-col gap-1 max-h-[300px] overflow-y-auto pr-1",children:t.length===0?U.jsx("div",{className:"p-4 text-center border-2 border-dashed border-slate-700 rounded-lg",children:U.jsx("span",{className:"text-slate-600 text-[9px] uppercase",children:"No active quests"})}):t.map(e=>U.jsxs("div",{className:`todo-item text-[10px] ${e.status==="completed"?"done":""} ${e.status==="in_progress"?"active":""}`,children:[U.jsxs("div",{className:"flex justify-between items-start gap-2",children:[U.jsx("span",{className:"leading-snug",children:e.content}),e.priority&&e.priority!=="medium"&&U.jsx("span",{className:`text-[8px] uppercase font-bold px-1 rounded ${e.priority==="high"?"text-red-400 bg-red-900/30":e.priority==="low"?"text-emerald-400 bg-emerald-900/30":""}`,children:e.priority.slice(0,1)})]}),U.jsx("div",{className:"flex gap-2 mt-1",children:e.status==="in_progress"&&U.jsx("span",{className:"text-[8px] text-amber-500 animate-pulse",children:"▶ IN PROGRESS"})})]},e.id))})]}),SL=()=>`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/ws`,bL=()=>{const[t,e]=ke.useState([]),[r,n]=ke.useState([]),[i,s]=ke.useState([]),[o,l]=ke.useState([]),[h,c]=ke.useState(!1),[f,m]=ke.useState(null),[p,v]=ke.useState(null),[_,E]=ke.useState(null),[T,S]=ke.useState(null),[b,x]=ke.useState(null),[A,R]=ke.useState(null),[L,N]=ke.useState(null);ke.useEffect(()=>{let $=null,me=null;const ne=()=>{$=new WebSocket(SL()),$.addEventListener("open",()=>c(!0)),$.addEventListener("close",()=>{c(!1),me=window.setTimeout(ne,2e3)}),$.addEventListener("message",B=>{try{const K=JSON.parse(B.data);if(K.type==="state"&&K.state){const ie=K.state;if(e(ie.agents||[]),n(ie.sessions||[]),s(ie.todos||[]),l(ie.interactions||[]),m(ie.activeSessionId||null),S(ie.appVersion||null),x(ie.lastTodoSummary||null),R(ie.bossMessage||null),N(ie.networkIp||null),ie.activeSessionId){const _e=ie.activeSessionId??null;v(fe=>fe??_e)}}}catch(K){console.error("Failed to parse websocket message",K)}})};return ne(),()=>{$&&$.close(),me&&window.clearTimeout(me)}},[]),ke.useEffect(()=>{_&&(t.some(me=>me.id===_)||E(null))},[t,_]),ke.useEffect(()=>{p&&(r.some(me=>me.id===p)||v(null))},[r,p]);const D=ke.useMemo(()=>r.find($=>$.id===p)||null,[r,p]),q=ke.useMemo(()=>t.find($=>$.id===_)||null,[t,_]);return{agents:t,sessions:r,todos:i,interactions:o,connected:h,activeSessionId:f,selectedSessionId:p,selectedAgentId:_,selectedSession:D,selectedAgent:q,appVersion:T,lastTodoSummary:b,bossMessage:A,networkIp:L,setSelectedAgentId:E,setSelectedSessionId:v}},TL=()=>{const{agents:t,sessions:e,todos:r,interactions:n,connected:i,activeSessionId:s,selectedSessionId:o,selectedAgentId:l,selectedSession:h,selectedAgent:c,appVersion:f,lastTodoSummary:m,bossMessage:p,networkIp:v,setSelectedAgentId:_,setSelectedSessionId:E}=bL(),[T,S]=ke.useState(!1),b=s?s.slice(0,10):"N/A",x=f?`v${f}`:"v1.0.0",A=m?`${m.completed}/${m.total}`:"0/0",R=(p==null?void 0:p.text)||"Awaiting mission updates...",L=p!=null&&p.status?p.status.toUpperCase():"IDLE";return U.jsxs("div",{className:"app",children:[U.jsxs("header",{children:[U.jsx("div",{className:"gamish-card logo-card",children:U.jsxs("div",{className:"flex flex-col",children:[U.jsx("h1",{className:"text-sm text-primary mb-1 tracking-widest",children:"PIXEL OFFICE"}),U.jsxs("p",{className:"text-[9px] text-muted-foreground",children:["OPENCODE AGENT OPS // ",x]})]})}),U.jsxs("div",{className:`status-badge ${i?"live":""}`,children:[U.jsx("span",{className:"text-[8px] opacity-70 mb-1",children:"SYSTEM STATUS"}),U.jsx("span",{className:"font-bold",children:i?"ONLINE":"OFFLINE"}),v&&i&&U.jsxs("div",{className:"relative mt-2 border-t border-white/20 pt-1 flex flex-col items-center",children:[U.jsxs("button",{onClick:()=>S(!T),className:"text-[8px] font-normal opacity-80 hover:opacity-100 hover:text-accent cursor-pointer underline decoration-dotted",title:"Click to scan QR code",children:["http://",v,":5100"]}),T&&U.jsxs("div",{className:"absolute top-8 right-0 bg-white p-2 border-2 border-foreground shadow-[4px_4px_0_rgba(0,0,0,0.2)] z-50",children:[U.jsx("div",{style:{height:"auto",margin:"0 auto",maxWidth:128,width:"100%"},children:U.jsx(HR,{size:256,style:{height:"auto",maxWidth:"100%",width:"100%"},value:`http://${v}:5100`,viewBox:"0 0 256 256"})}),U.jsx("div",{className:"text-[8px] text-center mt-1 text-foreground font-bold",children:"SCAN ME"})]})]})]})]}),U.jsxs("main",{children:[U.jsx(xL,{bossMessageText:R,bossStatus:L,agents:t,interactions:n,sessions:e,activeSessionId:s,lastTodoSummary:m,selectedAgentId:l,onSelectAgent:_}),U.jsxs("aside",{className:"sidebar-stack",children:[U.jsx(wL,{sessions:e,activeLabel:b,version:x,todoSummary:A,selectedSessionId:o,selectedSession:h,onSelectSession:E}),U.jsx(EL,{todos:r}),U.jsx(jR,{selectedAgent:c})]})]})]})};sy.createRoot(document.getElementById("root")).render(U.jsx(Si.StrictMode,{children:U.jsx(TL,{})}));
1206
+ `),x:t.textX,y:t.textY,style:e})]}),tL=t=>[{row:t.row+1,col:t.col},{row:t.row-1,col:t.col},{row:t.row,col:t.col+1},{row:t.row,col:t.col-1}],dS=(t,e)=>Math.abs(t.row-e.row)+Math.abs(t.col-e.col),ud=t=>`${t.row},${t.col}`,ty=(t,e,r)=>{const n=t.length,i=n>0?t[0].length:0,s=p=>p.row>=0&&p.col>=0&&p.row<n&&p.col<i,o=p=>t[p.row][p.col]>0,l=new Set([ud(e)]),h=new Map,c=new Map([[ud(e),0]]),f=new Map([[ud(e),dS(e,r)]]),m=()=>{let p=null,v=Number.POSITIVE_INFINITY;return l.forEach(_=>{const E=f.get(_)??Number.POSITIVE_INFINITY;E<v&&(v=E,p=_)}),p};for(;l.size>0;){const p=m();if(p===null)break;const[v,_]=p.split(",").map(Number);if(v===r.row&&_===r.col){const E=[];let T=p;for(;T;){const[S,b]=T.split(",").map(Number);E.push({row:S,col:b}),T=h.get(T)}return E.reverse()}l.delete(p),tL({row:v,col:_}).forEach(E=>{if(!s(E)||!o(E))return;const T=ud(E),S=(c.get(p)??Number.POSITIVE_INFINITY)+1;S<(c.get(T)??Number.POSITIVE_INFINITY)&&(h.set(T,p),c.set(T,S),f.set(T,S+dS(E,r)),l.add(T))})}return[]};he.SCALE_MODE=wn.NEAREST;he.ROUND_PIXELS=!0;const ce=4,i2=0,s2=0,o2=960,a2=540,fS=Math.floor(o2/ce),pS=Math.floor(a2/ce),ry={text:16446173,shadow:1776171,link:10352064},mS=[15901297,8118258,12185996,16116064,11767284,15895714,9225727,16234872],rL=3e3,nL=800,gS=140,iL=48,sL=10,hd=6,oL=1400,ny=4e3,aL={"command.executed":15909198,"installation.updated":8036568,"lsp.client.diagnostics":15755882,"lsp.updated":8036568,"message.removed":10134450,"message.part.removed":10134450,"permission.asked":12819424,"permission.replied":8376218,"server.connected":7067073,"tui.prompt.append":8377343,"tui.command.execute":8377343,"tui.toast.show":8377343},yS=1400,lL=t=>{let e=0;for(let r=0;r<t.length;r+=1)e=(e*31+t.charCodeAt(r))%997;return e},vS=(t,e,r)=>!e||e.length===0?r:e[lL(t)%e.length],_S=(t,e)=>`${t},${e}`,uL=12,hL=-4,cd=2,xS=(t,e,r)=>{const n=(l,h)=>l>=0&&h>=0&&l<r.length&&h<r[0].length,i=(l,h)=>r[l][h]>0;let s=e[0]||t,o=Number.POSITIVE_INFINITY;return e.forEach(l=>{for(let h=-cd;h<=cd;h+=1)for(let c=-cd;c<=cd;c+=1){const f=l.row+h,m=l.col+c;if(!n(f,m)||!i(f,m))continue;const p=Math.abs(f-t.row)+Math.abs(m-t.col);p<o&&(o=p,s={row:f,col:m})}}),s},iy=t=>{if(t.length<=2)return t;const e=[t[0]];let r=t[0],n={row:t[1].row-r.row,col:t[1].col-r.col};for(let i=1;i<t.length-1;i+=1){const s=t[i],o=t[i+1],l={row:o.row-s.row,col:o.col-s.col};(l.row!==n.row||l.col!==n.col)&&(e.push(s),n=l),r=s}return e.push(t[t.length-1]),e},Ss=t=>({x:t.col*ce+ce/2+s2,y:t.row*ce+ce/2+i2}),Gi=(t,e)=>({col:Math.round((t-s2-ce/2)/ce),row:Math.round((e-i2-ce/2)/ce)}),wS=()=>({row:48*2,col:48*2}),cL=t=>{switch(t){case"idle":return .35;case"thinking":return .55;case"planning":return .5;case"error":return .35;case"working":default:return .7}},ES=t=>t==="working"||t==="thinking",dL=t=>{const e=t.id||"";let r=0;for(let n=0;n<e.length;n+=1)r=(r*31+e.charCodeAt(n))%997;return mS[r%mS.length]},fL=t=>{switch(t){case"idle":return"idle";case"thinking":return"thinking";case"planning":return"planning";case"working":return"working";case"error":return"error";default:return"working"}},pL=(t,e,r,n)=>{if(!t)return[""];const i=t.split(/\s+/),s=[];let o="";if(i.forEach(l=>{const h=o?`${o} ${l}`:l;_n.measureText(h,r).width<=e?o=h:(o&&s.push(o),o=l)}),o&&s.push(o),s.length>n){const l=s.slice(s.length-n);return l[0]=`...${l[0]}`,l}return s},mL=t=>{const e=document.createElement("canvas");e.width=ce,e.height=ce;const r=e.getContext("2d");if(!r)return null;const n=(s,o,l,h,c)=>{r.fillStyle=s,r.fillRect(o,l,h,c)};switch(t){case"grass":n("#a8d070",0,0,ce,ce),n("#b7de7c",0,0,ce,4),n("#8bb85f",0,ce-12,ce,12),n("#7aa44f",0,ce-4,ce,4),n("#96c86a",8,8,8,8),n("#96c86a",36,24,8,8);break;case"path":n("#d4c4a8",0,0,ce,ce),n("#e4d7bf",0,0,ce,4),n("#bfae94",0,ce-10,ce,10),n("#ac9b82",0,ce-4,ce,4),n("#c9b89e",12,12,8,8),n("#c9b89e",40,28,8,8);break;case"wall_face":n("#4a4a5c",0,0,ce,20),n("#5a5a6e",0,0,ce,4),n("#3a3a4a",0,16,ce,4),n("#6e6e82",0,20,ce,ce-28),n("#4a4a5c",0,ce-8,ce,8);break;case"partition_h":case"partition_h_top":t==="partition_h"?n("#e8dcc8",0,0,ce,ce):n("#121212",0,24,ce,ce-24);const s=24,o=t==="partition_h_top"?0:(ce-s)/2;n("#4a4a5c",0,o,ce,s),n("#5a5a6e",0,o+4,ce,s-8),n("#3a3a4a",0,o+s-4,ce,4);break;case"partition_v":case"partition_v_left":case"partition_v_right":const l=24;let h=(ce-l)/2;t==="partition_v_left"&&(h=0),t==="partition_v_right"&&(h=ce-l),t==="partition_v"?n("#e8dcc8",0,0,ce,ce):t==="partition_v_left"?n("#121212",24,0,ce-24,ce):t==="partition_v_right"&&n("#121212",0,0,ce-24,ce),n("#4a4a5c",h,0,l,ce),n("#5a5a6e",h+4,0,l-8,ce),n("#3a3a4a",h+l-4,0,4,ce);break;case"floor":n("#e8dcc8",0,0,ce,ce),n("#f3ead9",0,0,ce,4),n("#d9ccb5",0,ce-4,ce,4),n("#c7b59f",0,ce-2,ce,2),n("#f0e6d6",4,4,4,4),n("#f0e6d6",36,36,4,4);break;default:r.clearRect(0,0,ce,ce)}const i=se.from(e);return i.baseTexture.scaleMode=wn.NEAREST,i},gL=({x:t,y:e})=>{const r="OpenCode Office",n=Ce.useMemo(()=>new Or({fill:16777215,fontFamily:"Courier New",fontSize:11,fontWeight:"bold",letterSpacing:1}),[]),i=_n.measureText(r,n).width,s=10,o=5,l=i+s*2,h=18;return U.jsxs(nr.Container,{x:t,y:e,children:[U.jsx(nr.Graphics,{draw:c=>{c.clear(),c.beginFill(1710638,.5),c.drawRoundedRect(2,2,l,h,4),c.endFill(),c.beginFill(2964047),c.drawRoundedRect(0,0,l,h,4),c.endFill(),c.beginFill(4016735),c.drawRoundedRect(0,0,l,6,4),c.endFill(),c.lineStyle(1,4872815),c.drawRoundedRect(0,0,l,h,4),c.lineStyle(0),c.beginFill(7321087),c.drawCircle(8,h/2,2),c.endFill()}}),U.jsx(nr.Text,{text:r,x:s+4,y:o-1,style:n})]})},yL=({agents:t,interactions:e,sessions:r,activeSessionId:n,lastTodoSummary:i,selectedAgentId:s,onSelectAgent:o,sceneWidth:l,sceneHeight:h,setDimensions:c})=>{var H;const[f,m]=Ce.useState(0),p=Ce.useRef(0),v=Ce.useRef(new Map),_=Ce.useRef(new Map),[E,T]=Ce.useState({}),[S,b]=Ce.useState(()=>Array.from({length:pS},()=>Array.from({length:fS},()=>""))),[x,A]=Ce.useState(null),R=(z,Y)=>x?z<0||Y<0||z>=x.cols||Y>=x.rows?!1:x.grid[Y][z]>0:z>=0&&Y>=0&&Y<pS&&z<fS,L=z=>{if(!x)return{row:32,col:32};for(let Y=0;Y<80;Y++){const J=Math.floor(Math.random()*x.rows),ve=Math.floor(Math.random()*x.cols),le=x.grid[J][ve];if(!(le<=0)&&le!==2)return{row:J,col:ve}}return{row:32,col:32}};Ce.useEffect(()=>{const z=new Image;z.src="/office_floor.png",z.onload=()=>{const Y=z.width,J=z.height;c({width:Y,height:J});const ve=Math.floor(Y/ce),le=Math.floor(J/ce),Te=document.createElement("canvas");Te.width=Y,Te.height=J;const Pe=Te.getContext("2d");if(!Pe)return;Pe.drawImage(z,0,0);const pe=Pe.getImageData(0,0,Y,J).data,P=[];for(let Oe=0;Oe<le;Oe++){const ke=[];for(let Xe=0;Xe<ve;Xe++){let Dt=0,yr=0,Pr=0,bt=0,qe=0;const zt=Xe*ce,Ir=Oe*ce;for(let qt=1;qt<ce;qt+=2)for(let At=1;At<ce;At+=2){const Cn=zt+At,Pn=Ir+qt;if(Cn<0||Cn>=Y||Pn<0||Pn>=J){qe++;continue}const vr=(Math.floor(Pn)*Y+Math.floor(Cn))*4;if(vr>=0&&vr<pe.length){const jr=pe[vr],_r=pe[vr+1],$r=pe[vr+2],sn=pe[vr+3];$r>200&&jr<50&&_r<50?yr++:_r>200&&jr<50&&$r<50?Pr++:jr>200&&_r<50&&$r<50?bt++:sn<50&&Dt++}qe++}const as=qe>0?yr/qe:0,rt=qe>0?Pr/qe:0,Tt=qe>0?bt/qe:0,Hr=qe>0?Dt/qe:0;let lr=0;Tt>.3?lr=5:rt>.3?lr=4:as>.3?lr=2:Hr>.6&&(lr=1),ke.push(lr)}P.push(ke)}const ue=[],Ee=[],Me=[],Ke=[];for(let Oe=0;Oe<le;Oe++)for(let ke=0;ke<ve;ke++){const Xe=P[Oe][ke];Xe===2&&ue.push({row:Oe,col:ke}),Xe===4&&Me.push({row:Oe,col:ke}),Xe===5&&Ke.push({row:Oe,col:ke})}const je=Array.from({length:le},()=>Array.from({length:ve},()=>!1)),vt=(Oe,ke)=>Oe>=0&&ke>=0&&Oe<le&&ke<ve,St=[{row:1,col:0},{row:-1,col:0},{row:0,col:1},{row:0,col:-1}];for(let Oe=0;Oe<le;Oe+=1)for(let ke=0;ke<ve;ke+=1){if(je[Oe][ke]||P[Oe][ke]!==2)continue;const Xe=[{row:Oe,col:ke}],Dt=[];for(je[Oe][ke]=!0;Xe.length>0;){const yr=Xe.pop();if(!yr)break;Dt.push(yr),St.forEach(Pr=>{const bt=yr.row+Pr.row,qe=yr.col+Pr.col;vt(bt,qe)&&(je[bt][qe]||P[bt][qe]===2&&(je[bt][qe]=!0,Xe.push({row:bt,col:qe})))})}if(Dt.length>0){const yr=Dt.reduce((zt,Ir)=>zt+Ir.row,0)/Dt.length,Pr=Dt.reduce((zt,Ir)=>zt+Ir.col,0)/Dt.length;let bt=Dt[0],qe=Number.POSITIVE_INFINITY;Dt.forEach(zt=>{const Ir=Math.abs(zt.row-yr)+Math.abs(zt.col-Pr);Ir<qe&&(qe=Ir,bt=zt)}),Ee.push(bt)}}b(()=>{const Oe=Array.from({length:le},()=>Array.from({length:ve},()=>""));return Me.forEach(ke=>{ke.row<Oe.length&&ke.col<Oe[0].length&&(Oe[ke.row][ke.col]="door_closed")}),Oe}),A({rows:le,cols:ve,grid:P,workNodes:ue,workCenters:Ee,doorNodes:Me,exitNodes:Ke}),console.log("Generated Collision Map",{width:Y,height:J,rows:le,cols:ve})}},[]),Ce.useMemo(()=>{const z=["floor"],Y={};return z.forEach(J=>{Y[J]=mL(J)}),Y.door_open=Y.floor,Y.door_closed=null,Y},[]);const k=Ce.useMemo(()=>r.find(z=>z.id===n)||null,[r,n]),D=Ce.useMemo(()=>new Or({fill:ry.text,fontFamily:"Courier New",fontSize:10}),[]),Q=Ce.useMemo(()=>new Or({fill:13694431,fontFamily:"Courier New",fontSize:10}),[]);Ce.useMemo(()=>new Or({fill:2834268,fontFamily:"Courier New",fontSize:10}),[]);const $=Ce.useMemo(()=>new Or({fill:3824444,fontFamily:"Courier New",fontSize:9}),[]),me=Ce.useMemo(()=>new Or({fill:2834268,fontFamily:"Apple Color Emoji, Segoe UI Emoji, Noto Color Emoji",fontSize:12}),[]);Ce.useEffect(()=>{const z=(J,ve)=>new Promise((le,Te)=>{const Pe=Ne.from(J);Pe.scaleMode=wn.NEAREST;const pe=()=>{const P=Math.floor(Pe.width/ve),ue=Math.floor(Pe.height/3),Ee=Me=>{const Ke=[];for(let je=0;je<ve;je+=1)Ke.push(new se(Pe,new De(je*P,Me*ue,P,ue)));return Ke};le({right:Ee(0),down:Ee(1),up:Ee(2)})};Pe.valid?pe():(Pe.once("loaded",pe),Pe.once("error",Te))});(async()=>{try{const[J,ve,le,Te]=await Promise.all([z("/idle.png",4),z("/walk.png",8),z("/run.png",8),z("/jump.png",6)]);T({idle:J,walk:ve,run:le,jump:Te})}catch{T({})}})()},[]),Ce.useEffect(()=>{var Te;const z=v.current,Y=_.current,J=Date.now(),ve=new Set(t.map(Pe=>Pe.id)),le=((Te=x==null?void 0:x.exitNodes)==null?void 0:Te[0])??wS();t.forEach(Pe=>{Y.set(Pe.id,Pe)});for(const Pe of z.keys())if(!ve.has(Pe)){const pe=z.get(Pe);if(pe&&!pe.exiting){const P=x?xS(Gi(pe.x,pe.y),x.exitNodes,x.grid):le,ue=Ss(P),Ee={x:ue.x+uL,y:ue.y+hL};z.set(Pe,{...pe,exiting:!0,exitAt:J,goodbyeUntil:void 0,removeAt:void 0,targetX:Ee.x,targetY:Ee.y,targetKind:"exit",targetTile:P,path:x?iy(ty(x.grid,Gi(pe.x,pe.y),P)):[],pathIndex:1,direction:"front"})}}t.forEach(Pe=>{var Ee,Me;if(z.has(Pe.id))return;const pe={row:32,col:32},P=(Ee=x==null?void 0:x.workCenters)!=null&&Ee.length?vS(Pe.id,x.workCenters,pe):(Me=x==null?void 0:x.workNodes)!=null&&Me.length?vS(Pe.id,x.workNodes,pe):pe,ue=Ss(P);z.set(Pe.id,{x:ue.x,y:ue.y,targetX:ue.x,targetY:ue.y,homeTile:{row:P.row,col:P.col},direction:"front"})})},[t,x]),nr.useTick(z=>{var Pe;p.current+=z*16;const Y=v.current,J=_.current,ve=new Set(t.map(pe=>pe.id)),le=new Map;t.forEach(pe=>{const P=Y.get(pe.id);if(!P||P.exiting)return;const ue=Gi(P.x,P.y);le.set(_S(ue.row,ue.col),pe.id)}),t.forEach(pe=>{var as;const P=Y.get(pe.id);if(!P)return;Ss(P.homeTile);const ue=Gi(P.x,P.y),Ee=ES(pe.status||"working"),Me=rt=>{const Tt=le.get(_S(rt.row,rt.col));return Tt&&Tt!==pe.id};let Ke=P.homeTile;const je=(as=x==null?void 0:x.workCenters)!=null&&as.length?x.workCenters:(x==null?void 0:x.workNodes)||[];if(je.length){let rt=null,Tt=Number.POSITIVE_INFINITY,Hr=null,lr=Number.POSITIVE_INFINITY;je.forEach(qt=>{const At=Math.abs(qt.row-ue.row)+Math.abs(qt.col-ue.col);At<lr&&(Hr=qt,lr=At),!Me(qt)&&At<Tt&&(rt=qt,Tt=At)}),Ke=rt||Hr||P.homeTile}const vt=L();let St=Ee?"work":"wander",Oe=Ee?Ke:vt;const ke=Date.now(),Xe=Math.hypot(P.targetX-P.x,P.targetY-P.y),Dt=Xe<.6,yr=P.idlePauseUntil&&ke<P.idlePauseUntil;if(!Ee){if(yr){P.targetX=P.x,P.targetY=P.y;return}P.idlePauseUntil&&ke>=P.idlePauseUntil&&(P.idlePauseUntil=void 0,P.wanderUntil=ke+3e3+Math.floor(Math.random()*2e3),P.path=[],P.pathIndex=void 0,P.targetTile=void 0,P.targetKind=void 0,P.retargetAt=0),P.wanderUntil||(P.idlePauseUntil=ke+2e3,P.path=[],P.pathIndex=void 0,P.targetTile=void 0,P.targetKind=void 0,P.retargetAt=0)}const Pr=P.workLockUntil&&ke<P.workLockUntil,bt=!P.targetTile||!Pr&&P.targetKind!==St||(Ee?Dt:!P.wanderUntil||ke>P.wanderUntil);if(x&&bt&&(!P.path||P.path.length===0)){P.targetKind=St,P.targetTile=Oe;let rt=ty(x.grid,ue,Oe);if(rt.length===0&&St==="work"){const Tt=Ss(Oe);P.x=Tt.x,P.y=Tt.y,P.targetX=Tt.x,P.targetY=Tt.y,P.path=[],P.pathIndex=void 0}else P.path=iy(rt);P.pathIndex=P.path.length>1?1:0,P.retargetAt=ke+1400,Ee&&(P.workLockUntil=ke+2200)}if(P.path&&P.path.length>0&&P.pathIndex!==void 0){const rt=Math.min(P.pathIndex,P.path.length-1),Tt=P.path[rt];Tt.row===ue.row&&Tt.col===ue.col&&P.pathIndex<P.path.length-1&&(P.pathIndex+=1);const Hr=Ss(Tt);P.targetX=Hr.x,P.targetY=Hr.y}const qe=P.targetX-P.x,zt=P.targetY-P.y,Ir=cL(pe.status||"working");if(Xe>.1){const rt=Math.min(Ir,Xe,.4),Tt=P.x+qe/Xe*rt,Hr=P.y+zt/Xe*rt,lr=Xe<2?.4:1,qt=P.x+(Tt-P.x)*lr,At=P.y+(Hr-P.y)*lr,Cn=Gi(qt,At);let Pn=!0;if(x!=null&&x.doorNodes){const vr=($r,sn)=>x.doorNodes.some(Ko=>Ko.col===$r&&Ko.row===sn),jr=Math.floor(P.x/ce),_r=Math.floor(P.y/ce);vr(jr,_r)&&S[_r][jr]!=="door_open"&&b($r=>{const sn=[...$r];return sn[_r]=[...$r[_r]],sn[_r][jr]="door_open",sn})}if(x&&!R(Cn.col,Cn.row)&&(Pn=!1),Pn){P.x=qt,P.y=At;const vr=P.lastPosX??P.x,jr=P.lastPosY??P.y;(P.lastPosX===void 0||Math.hypot(P.x-vr,P.y-jr)>.05)&&(P.lastPosX=P.x,P.lastPosY=P.y,P.lastMoveAt=ke),(!P.dirLockUntil||ke>P.dirLockUntil)&&Xe>3&&(Math.abs(qe)>Math.abs(zt)?Math.abs(qe)>4&&(P.direction=qe>0?"right":"left",P.dirLockUntil=ke+250):Math.abs(zt)>4&&(P.direction=zt>0?"front":"back",P.dirLockUntil=ke+250))}else P.targetX=P.x,P.targetY=P.y,P.direction="front"}else Xe<.2&&(ES(pe.status||"working")?P.direction="back":P.direction="front");if(Ee&&P.lastMoveAt&&ke-P.lastMoveAt>1500){const rt=Ss(Ke);P.x=rt.x,P.y=rt.y,P.targetX=rt.x,P.targetY=rt.y,P.path=[],P.pathIndex=void 0,P.lastMoveAt=ke}Xe<.2&&P.path&&P.pathIndex!==void 0&&(P.pathIndex<P.path.length-1?P.pathIndex+=1:(P.path=[],P.pathIndex=void 0,Ee||(P.idlePauseUntil=ke+2e3,P.wanderUntil=void 0)))}),x!=null&&x.doorNodes&&x.doorNodes.forEach(pe=>{!t.some(ue=>{const Ee=Y.get(ue.id);if(!Ee)return!1;const Me=Math.floor(Ee.x/ce),Ke=Math.floor(Ee.y/ce);return Me===pe.col&&Ke===pe.row})&&S[pe.row][pe.col]==="door_open"&&b(ue=>{if(ue[pe.row][pe.col]!=="door_closed"){const Ee=[...ue];return Ee[pe.row]=[...ue[pe.row]],Ee[pe.row][pe.col]="door_closed",Ee}return ue})});const Te=((Pe=x==null?void 0:x.exitNodes)==null?void 0:Pe[0])??wS();for(const[pe,P]of Y.entries()){if(!P.exiting||ve.has(pe))continue;const ue=x?xS(Gi(P.x,P.y),x.exitNodes,x.grid):Te,Ee=Ss(ue);if(x&&(!P.path||P.path.length===0)){const St=Gi(P.x,P.y);P.path=iy(ty(x.grid,St,ue)),P.pathIndex=P.path.length>1?1:0}if(P.path&&P.path.length>0&&P.pathIndex!==void 0){const St=Math.min(P.pathIndex,P.path.length-1),Oe=P.path[St],ke=Ss(Oe);P.targetX=ke.x,P.targetY=ke.y}else P.targetX=Ee.x,P.targetY=Ee.y;const Me=P.targetX-P.x,Ke=P.targetY-P.y,je=Math.hypot(Me,Ke),vt=Math.min(.85,je);if(je>.1){const St=P.x+Me/je*vt,Oe=P.y+Ke/je*vt,ke=Gi(St,Oe);(!x||R(ke.col,ke.row))&&(P.x=St,P.y=Oe)}if(P.direction=Ke>0?"front":"back",P.exitAt||(P.exitAt=Date.now()),je<.2&&!P.goodbyeUntil&&(!P.path||P.path.length===0)){const St=Date.now();P.goodbyeUntil=St+yS,P.removeAt=St+yS}je<.2&&P.path&&P.pathIndex!==void 0&&(P.pathIndex<P.path.length-1?P.pathIndex+=1:(P.path=[],P.pathIndex=void 0)),je<1&&(!P.goodbyeUntil||Date.now()>P.goodbyeUntil)&&P.removeAt&&Date.now()>P.removeAt&&(Y.delete(pe),J.delete(pe))}m(pe=>pe+1)});const te=p.current,O=k!=null&&k.status?k.status.toLowerCase():"",V=(k==null?void 0:k.updatedAt)||0,ie=V&&te-V<ny,_e=O==="busy"||O==="working"?15906638:O==="idle"?7067035:O==="error"?15755882:8036568,fe=(i==null?void 0:i.updatedAt)&&te-i.updatedAt<ny,M=n?(H=t.find(z=>z.sessionId===n))==null?void 0:H.id:void 0,W=[],F=new Map(t.map(z=>[z.id,z]));for(const[z,Y]of v.current.entries())Y&&(F.has(z)||Y.exiting)&&W.push({type:"agent",id:z,y:Y.y});return W.sort((z,Y)=>z.y-Y.y),U.jsxs(U.Fragment,{children:[U.jsx(nr.Container,{children:U.jsx(nr.Sprite,{texture:se.from("/office.png"),x:0,y:0})}),U.jsx(U.Fragment,{}),U.jsx(gL,{x:8,y:8}),U.jsx(nr.Graphics,{draw:z=>{if(z.clear(),k&&O){const Y=l-26,J=10;z.lineStyle(2,4874086,1),z.beginFill(_e,ie?1:.6),z.drawRoundedRect(Y,J,10,10,3),z.endFill(),ie&&(z.lineStyle(2,_e,.5),z.drawRoundedRect(Y-3,J-3,16,16,4)),z.lineStyle(0,0,0)}}}),U.jsx(nr.Graphics,{draw:z=>{z.clear(),e.forEach(Y=>{const J=v.current.get(Y.from),ve=v.current.get(Y.to);!J||!ve||(z.lineStyle(2,ry.link,1),z.moveTo(J.x,J.y-8),z.lineTo(ve.x,ve.y-8),z.lineStyle(0,0,0))})}}),W.map(z=>{var bh,Th;if(z.type!=="agent")return null;const Y=t.find(Be=>Be.id===z.id)||_.current.get(z.id);if(!Y)return null;const J=v.current.get(Y.id);if(!J)return null;const ve=J.x-8,le=J.y-12,Te=0,Pe=J.direction||"front",pe=Math.hypot(J.targetX-J.x,J.targetY-J.y),P=pe>.8,ue=pe>.2,Ee=Gi(J.x,J.y),Me=!!((bh=x==null?void 0:x.workNodes)!=null&&bh.some(Be=>Be.row===Ee.row&&Be.col===Ee.col)),je=Y.status==="thinking"&&Me?"jump":P?"run":ue?"walk":"idle",vt=E[je]||E.idle,St=(vt==null?void 0:vt.right.length)||1,ke=Math.floor(te/(P?90:ue?120:200))%St,Xe=vt?Pe==="back"?vt.up:Pe==="front"?vt.down:vt.right:null,Dt=Xe?Xe[ke]:null,yr=Pe==="left"?-1:1,Pr=(Y.alias||Y.name||Y.id||"Agent").slice(0,10).toUpperCase(),bt=(Th=Y.lastEventType)!=null&&Th.startsWith("message.")&&Y.lastEventAt||0,qe=Y.lastMessageAt||bt||0,zt=qe&&Date.now()-qe<rL,Ir=Y.lastStreamingAt&&Date.now()-Y.lastStreamingAt<nL;fL(Y.status||"working");const as=Y.lastMessageSnippet||"",rt=!!(J.goodbyeUntil&&Date.now()<J.goodbyeUntil),Hr=rt?"bye":Ir?".".repeat(Math.max(1,Math.floor(te/250)%4)):as,lr=Date.now(),qt=Y.lastFileEditAt&&lr-Y.lastFileEditAt<oL,At=Y.lastEventType||"",Cn=Y.lastEventAt||Y.lastActivityAt||0,Pn=Cn&&lr-Cn<ny,vr=At==="message.updated"||At==="message.part.updated",jr=At.startsWith("session."),_r=Pn&&(At==="tool.execute.before"||At==="tool.execute.after"),$r=At==="tool.execute.before"?15906638:8036568,sn=aL[At],Ko=Pn&&!_r&&!qt&&!vr&&!jr&&sn!==void 0,ph=qt?"✏️":Y.status==="thinking"?"💭":Y.status==="working"?"🛠️":"",mh=!!ph,no=pL(Hr,gS,$,sL),gh=no.map(Be=>_n.measureText(Be,$).width),vl=gh.length?Math.max(...gh):0,_l=Math.max(iL,Math.min(vl,gS))+hd*2,yh=(Number($.fontSize)||9)+2,vh=no.length*yh+hd*2,_h=J.x-_l/2,xl=le-56+Te-(no.length-1)*6,xh=_h+hd,wl=xl+hd,mp=4,gp=12,io=le+34+Te,wh=18,Eh=J.x-wh/2,Ni={show:!!(rt||Y.lastMessageSnippet&&zt),x:_h,y:xl,width:_l,height:vh,textX:xh,textY:wl,lines:no},Sh=Ni.show?xl+vh+4:le-28+Te,ls={show:mh,x:Eh,y:Sh,size:wh,emoji:ph,textX:Eh+3,textY:Sh+1};return U.jsxs(nr.Container,{eventMode:"static",cursor:"pointer",onpointerdown:()=>o(Y.id),children:[U.jsx(nr.Graphics,{draw:Be=>{if(Be.clear(),Be.beginFill(ry.shadow),Be.drawRect(ve+2,le+18+Te,12,4),Be.endFill(),!Dt){const so=dL(Y);Be.beginFill(so),Be.drawRect(ve-8,le+Te-8,32,28),Be.drawRect(ve-4,le-20+Te,24,16),Be.endFill(),Be.beginFill(1250074),Pe==="front"?(Be.drawRect(ve+4,le-12+Te,4,4),Be.drawRect(ve+16,le-12+Te,4,4)):Pe==="right"?Be.drawRect(ve+16,le-12+Te,4,4):Pe==="left"&&Be.drawRect(ve+4,le-12+Te,4,4),Be.endFill()}if(_r&&(Be.lineStyle(2,$r,.9),Be.drawCircle(J.x,le+Te+8,80),Be.lineStyle(0,0,0)),Ko){const qo=J.x+10,yp=le-26+Te;Ha(Be,qo,yp,8,8,2,15856639,sn,1)}const El=_n.measureText(Pr,D).width+mp*2,Ah=J.x-El/2;if(Ha(Be,Ah,io-10,El,gp,6,2841148,7590543),fe&&Y.id===M){const so=Ah+El+6,qo=io-12;Be.beginFill(16249044),Be.lineStyle(2,4874086,1),Be.drawRoundedRect(so,qo+4,14,14,3),Be.endFill(),Be.beginFill(4874086),Be.drawRect(so+4,qo,6,6),Be.endFill(),Be.lineStyle(0,0,0)}Ni.show&&Ha(Be,Ni.x,Ni.y,Ni.width,Ni.height,4,15859699,3824444,1.5),ls.show&&Ha(Be,ls.x,ls.y,ls.size,ls.size,6,15856639,5925536,1)}}),Dt&&U.jsx(nr.Sprite,{texture:Dt,anchor:.5,x:J.x,y:J.y+Te,scale:{x:yr*2,y:2}}),U.jsx(nr.Text,{text:Pr,anchor:.5,x:ve+8,y:le+30+Te,style:Q}),U.jsx(eL,{bubble:Ni,style:$}),U.jsx(JB,{bubble:ls,style:me})]},Y.id)})]})},vL=t=>{const[e,r]=Ce.useState({width:o2,height:a2});return U.jsx(nr.Stage,{width:e.width,height:e.height,style:{display:"block"},options:{antialias:!1,backgroundColor:1054229,preserveDrawingBuffer:!0},children:U.jsx(yL,{...t,sceneWidth:e.width,sceneHeight:e.height,setDimensions:r})})},_L=({message:t,status:e})=>U.jsxs("div",{className:"boss-message-box",children:[U.jsxs("div",{className:"flex justify-between items-baseline mb-2",children:[U.jsx("div",{className:"text-[9px] uppercase tracking-widest font-bold",children:"Boss Says"}),e?U.jsx("div",{className:"text-[8px] uppercase px-2 py-0.5 bg-amber-200/50 rounded border border-amber-700/30",children:e}):null]}),U.jsx("p",{className:"text-[10px] leading-relaxed",children:t})]}),xL=({bossMessageText:t,bossStatus:e,agents:r,interactions:n,sessions:i,activeSessionId:s,lastTodoSummary:o,selectedAgentId:l,onSelectAgent:h,activeTab:c="opencode"})=>U.jsxs("div",{className:"flex flex-col gap-4",children:[U.jsx(_L,{message:t,status:e}),U.jsxs("div",{className:"pixi-wrapper",children:[U.jsx("div",{className:"office-label",children:c==="opencode"?"◈ OPENCODE OFFICE":"◇ CLAUDE OFFICE"}),U.jsx("div",{className:"w-full flex justify-center bg-[#101615] rounded-lg overflow-hidden",children:U.jsx(vL,{agents:r,interactions:n,sessions:i,activeSessionId:s,lastTodoSummary:o,selectedAgentId:l,onSelectAgent:h})})]})]}),wL=({sessions:t,activeLabel:e,version:r,todoSummary:n,selectedSessionId:i,selectedSession:s,onSelectSession:o})=>{const l=[...t].filter(h=>h.id).sort((h,c)=>{if(h.id===i)return-1;if(c.id===i)return 1;const f=(c.updatedAt||0)-(h.updatedAt||0);if(f!==0)return f;const m=h.title||h.slug||h.id,p=c.title||c.slug||c.id;return m.localeCompare(p)});return U.jsxs("div",{className:"data-panel",children:[U.jsx("div",{className:"gamish-panel-title",children:U.jsx("span",{children:"MISSION LOG"})}),U.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4 text-[10px] text-muted-foreground",children:[U.jsxs("div",{className:"flex flex-col",children:[U.jsx("span",{className:"text-[8px] uppercase tracking-wider text-slate-500",children:"Active Session"}),U.jsx("span",{className:"text-secondary-foreground font-bold",children:e})]}),U.jsxs("div",{className:"flex flex-col",children:[U.jsx("span",{className:"text-[8px] uppercase tracking-wider text-slate-500",children:"System Ver"}),U.jsx("span",{className:"text-secondary-foreground",children:r})]}),U.jsxs("div",{className:"flex flex-col",children:[U.jsx("span",{className:"text-[8px] uppercase tracking-wider text-slate-500",children:"Objectives"}),U.jsx("span",{className:"text-secondary-foreground",children:n})]})]}),U.jsxs("div",{className:"mb-4",children:[U.jsx("div",{className:"text-[8px] uppercase tracking-wider text-slate-500 mb-2",children:"Available Sessions"}),U.jsx("div",{className:"flex flex-col max-h-[220px] overflow-y-auto pr-1 space-y-1",children:l.length===0?U.jsx("span",{className:"text-muted-foreground text-[9px] italic",children:"No active signals..."}):l.map(h=>U.jsxs("button",{type:"button",className:`session-item ${h.id===i?"active":""}`,onClick:()=>o(h.id),children:[U.jsx("span",{className:"truncate",children:h.title||h.slug||h.id.slice(0,8)}),h.id===i&&U.jsx("div",{className:"w-1.5 h-1.5 bg-emerald-400 rounded-full animate-pulse"})]},h.id))})]}),U.jsxs("div",{className:"pt-4 border-t border-slate-700",children:[U.jsx("div",{className:"text-[8px] uppercase tracking-wider text-slate-500 mb-2",children:"Session Intel"}),s?U.jsxs("div",{className:"space-y-1.5",children:[U.jsxs("div",{className:"flex flex-col",children:[U.jsx("span",{className:"text-[8px] text-slate-500",children:"Identifier"}),U.jsx("span",{className:"text-[9px] text-slate-300 break-all",children:s.title||s.slug||"-"})]}),s.status&&U.jsxs("div",{className:"flex justify-between items-center",children:[U.jsx("span",{className:"text-[8px] text-slate-500",children:"Status"}),U.jsx("span",{className:"text-[9px] px-1.5 py-0.5 rounded bg-slate-800 border border-slate-600 inline-block",children:s.status})]}),s.version&&U.jsxs("div",{className:"flex justify-between",children:[U.jsx("span",{className:"text-[8px] text-slate-500",children:"Core Ver"}),U.jsx("span",{className:"text-[9px] text-slate-400",children:s.version})]}),s.directory&&U.jsxs("div",{className:"flex flex-col mt-1",children:[U.jsx("span",{className:"text-[8px] text-slate-500",children:"Path"}),U.jsx("span",{className:"text-[8px] font-mono text-slate-500 truncate",children:s.directory})]})]}):U.jsx("span",{className:"text-[9px] text-slate-600 italic",children:"No session selected"})]})]})},EL=({todos:t})=>U.jsxs("div",{className:"data-panel",children:[U.jsx("div",{className:"gamish-panel-title",children:U.jsx("span",{children:"QUEST LOG"})}),U.jsx("div",{className:"flex flex-col gap-1 max-h-[300px] overflow-y-auto pr-1",children:t.length===0?U.jsx("div",{className:"p-4 text-center border-2 border-dashed border-slate-700 rounded-lg",children:U.jsx("span",{className:"text-slate-600 text-[9px] uppercase",children:"No active quests"})}):t.map(e=>U.jsxs("div",{className:`todo-item text-[10px] ${e.status==="completed"?"done":""} ${e.status==="in_progress"?"active":""}`,children:[U.jsxs("div",{className:"flex justify-between items-start gap-2",children:[U.jsx("span",{className:"leading-snug",children:e.content}),e.priority&&e.priority!=="medium"&&U.jsx("span",{className:`text-[8px] uppercase font-bold px-1 rounded ${e.priority==="high"?"text-red-400 bg-red-900/30":e.priority==="low"?"text-emerald-400 bg-emerald-900/30":""}`,children:e.priority.slice(0,1)})]}),U.jsx("div",{className:"flex gap-2 mt-1",children:e.status==="in_progress"&&U.jsx("span",{className:"text-[8px] text-amber-500 animate-pulse",children:"▶ IN PROGRESS"})})]},e.id))})]}),SL=()=>`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/ws`,bL=()=>{const[t,e]=Ce.useState([]),[r,n]=Ce.useState([]),[i,s]=Ce.useState([]),[o,l]=Ce.useState([]),[h,c]=Ce.useState(!1),[f,m]=Ce.useState(null),[p,v]=Ce.useState(null),[_,E]=Ce.useState(null),[T,S]=Ce.useState(null),[b,x]=Ce.useState(null),[A,R]=Ce.useState(null),[L,k]=Ce.useState(null);Ce.useEffect(()=>{let $=null,me=null;const te=()=>{$=new WebSocket(SL()),$.addEventListener("open",()=>c(!0)),$.addEventListener("close",()=>{c(!1),me=window.setTimeout(te,2e3)}),$.addEventListener("message",O=>{try{const V=JSON.parse(O.data);if(V.type==="state"&&V.state){const ie=V.state;if(e(ie.agents||[]),n(ie.sessions||[]),s(ie.todos||[]),l(ie.interactions||[]),m(ie.activeSessionId||null),S(ie.appVersion||null),x(ie.lastTodoSummary||null),R(ie.bossMessage||null),k(ie.networkIp||null),ie.activeSessionId){const _e=ie.activeSessionId??null;v(fe=>fe??_e)}}}catch(V){console.error("Failed to parse websocket message",V)}})};return te(),()=>{$&&$.close(),me&&window.clearTimeout(me)}},[]),Ce.useEffect(()=>{_&&(t.some(me=>me.id===_)||E(null))},[t,_]),Ce.useEffect(()=>{p&&(r.some(me=>me.id===p)||v(null))},[r,p]);const D=Ce.useMemo(()=>r.find($=>$.id===p)||null,[r,p]),Q=Ce.useMemo(()=>t.find($=>$.id===_)||null,[t,_]);return{agents:t,sessions:r,todos:i,interactions:o,connected:h,activeSessionId:f,selectedSessionId:p,selectedAgentId:_,selectedSession:D,selectedAgent:Q,appVersion:T,lastTodoSummary:b,bossMessage:A,networkIp:L,setSelectedAgentId:E,setSelectedSessionId:v}},TL=()=>{const{agents:t,sessions:e,todos:r,interactions:n,connected:i,activeSessionId:s,selectedSessionId:o,selectedAgentId:l,selectedSession:h,selectedAgent:c,appVersion:f,lastTodoSummary:m,bossMessage:p,networkIp:v,setSelectedAgentId:_,setSelectedSessionId:E}=bL(),[T,S]=Ce.useState(!1),[b,x]=Ce.useState("opencode"),A=Ce.useMemo(()=>t.filter(O=>(O.source||"opencode")===b),[t,b]),R=Ce.useMemo(()=>{const O=new Set(A.map(V=>V.id));return n.filter(V=>O.has(V.from)||O.has(V.to))},[n,A]),L=Ce.useMemo(()=>t.filter(O=>(O.source||"opencode")==="opencode").length,[t]),k=Ce.useMemo(()=>t.filter(O=>O.source==="claude").length,[t]),D=s?s.slice(0,10):"N/A",Q=f?`v${f}`:"v1.0.0",$=m?`${m.completed}/${m.total}`:"0/0",me=(p==null?void 0:p.text)||"Awaiting mission updates...",te=p!=null&&p.status?p.status.toUpperCase():"IDLE";return U.jsxs("div",{className:"app",children:[U.jsxs("header",{children:[U.jsx("div",{className:"gamish-card logo-card",children:U.jsxs("div",{className:"flex flex-col",children:[U.jsx("h1",{className:"text-sm text-primary mb-1 tracking-widest",children:"PIXEL OFFICE"}),U.jsxs("p",{className:"text-[9px] text-muted-foreground",children:["AI AGENT OPS // ",Q]})]})}),U.jsxs("div",{className:"flex gap-1",children:[U.jsxs("button",{onClick:()=>x("opencode"),className:`office-tab ${b==="opencode"?"active":""}`,children:[U.jsx("span",{className:"tab-icon",children:"◈"}),U.jsx("span",{children:"OpenCode"}),L>0&&U.jsx("span",{className:"tab-badge",children:L})]}),U.jsxs("button",{onClick:()=>x("claude"),className:`office-tab ${b==="claude"?"active":""}`,children:[U.jsx("span",{className:"tab-icon",children:"◇"}),U.jsx("span",{children:"Claude"}),k>0&&U.jsx("span",{className:"tab-badge",children:k})]})]}),U.jsxs("div",{className:`status-badge ${i?"live":""}`,children:[U.jsx("span",{className:"text-[8px] opacity-70 mb-1",children:"SYSTEM STATUS"}),U.jsx("span",{className:"font-bold",children:i?"ONLINE":"OFFLINE"}),v&&i&&U.jsxs("div",{className:"relative mt-2 border-t border-white/20 pt-1 flex flex-col items-center",children:[U.jsxs("button",{onClick:()=>S(!T),className:"text-[8px] font-normal opacity-80 hover:opacity-100 hover:text-accent cursor-pointer underline decoration-dotted",title:"Click to scan QR code",children:["http://",v,":5100"]}),T&&U.jsxs("div",{className:"absolute top-8 right-0 bg-white p-2 border-2 border-foreground shadow-[4px_4px_0_rgba(0,0,0,0.2)] z-50",children:[U.jsx("div",{style:{height:"auto",margin:"0 auto",maxWidth:128,width:"100%"},children:U.jsx(HR,{size:256,style:{height:"auto",maxWidth:"100%",width:"100%"},value:`http://${v}:5100`,viewBox:"0 0 256 256"})}),U.jsx("div",{className:"text-[8px] text-center mt-1 text-foreground font-bold",children:"SCAN ME"})]})]})]})]}),U.jsxs("main",{children:[U.jsx(xL,{bossMessageText:me,bossStatus:te,agents:A,interactions:R,sessions:e,activeSessionId:s,lastTodoSummary:m,selectedAgentId:l,onSelectAgent:_,activeTab:b}),U.jsxs("aside",{className:"sidebar-stack",children:[U.jsx(wL,{sessions:e,activeLabel:D,version:Q,todoSummary:$,selectedSessionId:o,selectedSession:h,onSelectSession:E}),U.jsx(EL,{todos:r}),U.jsx(jR,{selectedAgent:c})]})]})]})};sy.createRoot(document.getElementById("root")).render(U.jsx(Si.StrictMode,{children:U.jsx(TL,{})}));