expxagents 0.11.2 → 0.12.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.
Files changed (94) hide show
  1. package/dist/dashboard/assets/{BufferResource-CR4DczHL.js → BufferResource-BcVsF5HP.js} +1 -1
  2. package/dist/dashboard/assets/{CanvasRenderer-DdWLm2t4.js → CanvasRenderer-kA1Maw0x.js} +1 -1
  3. package/dist/dashboard/assets/{JarvisView-yQv964kf.js → JarvisView-DBrCWArD.js} +1 -1
  4. package/dist/dashboard/assets/{RenderTargetSystem-DdTH8Un8.js → RenderTargetSystem-Bp9B4iP8.js} +1 -1
  5. package/dist/dashboard/assets/{WebGLRenderer-C6BYo_WV.js → WebGLRenderer-CNJyeb_W.js} +1 -1
  6. package/dist/dashboard/assets/{WebGPURenderer-C1UxCrJq.js → WebGPURenderer-DCbozzdc.js} +1 -1
  7. package/dist/dashboard/assets/{browserAll-BC0ycs7y.js → browserAll-Bu4cXbCn.js} +1 -1
  8. package/dist/dashboard/assets/index-zfHiMrG2.js +344 -0
  9. package/dist/dashboard/assets/{webworkerAll-D7SccyuO.js → webworkerAll-BFb9bpT-.js} +1 -1
  10. package/dist/dashboard/index.html +1 -1
  11. package/dist/data/opensquad.db +0 -0
  12. package/dist/server/app.d.ts.map +1 -1
  13. package/dist/server/app.js +30 -0
  14. package/dist/server/app.js.map +1 -1
  15. package/dist/server/config.d.ts +6 -0
  16. package/dist/server/config.d.ts.map +1 -1
  17. package/dist/server/config.js +14 -1
  18. package/dist/server/config.js.map +1 -1
  19. package/dist/server/db/__tests__/email-schema.test.d.ts +2 -0
  20. package/dist/server/db/__tests__/email-schema.test.d.ts.map +1 -0
  21. package/dist/server/db/__tests__/email-schema.test.js +53 -0
  22. package/dist/server/db/__tests__/email-schema.test.js.map +1 -0
  23. package/dist/server/db/schema.d.ts +1 -1
  24. package/dist/server/db/schema.d.ts.map +1 -1
  25. package/dist/server/db/schema.js +70 -0
  26. package/dist/server/db/schema.js.map +1 -1
  27. package/dist/server/email/__tests__/campaign-routes.test.d.ts +2 -0
  28. package/dist/server/email/__tests__/campaign-routes.test.d.ts.map +1 -0
  29. package/dist/server/email/__tests__/campaign-routes.test.js +216 -0
  30. package/dist/server/email/__tests__/campaign-routes.test.js.map +1 -0
  31. package/dist/server/email/__tests__/campaign-service.test.d.ts +2 -0
  32. package/dist/server/email/__tests__/campaign-service.test.d.ts.map +1 -0
  33. package/dist/server/email/__tests__/campaign-service.test.js +79 -0
  34. package/dist/server/email/__tests__/campaign-service.test.js.map +1 -0
  35. package/dist/server/email/__tests__/email-queue-worker.test.d.ts +2 -0
  36. package/dist/server/email/__tests__/email-queue-worker.test.d.ts.map +1 -0
  37. package/dist/server/email/__tests__/email-queue-worker.test.js +93 -0
  38. package/dist/server/email/__tests__/email-queue-worker.test.js.map +1 -0
  39. package/dist/server/email/__tests__/email-utils.test.d.ts +2 -0
  40. package/dist/server/email/__tests__/email-utils.test.d.ts.map +1 -0
  41. package/dist/server/email/__tests__/email-utils.test.js +36 -0
  42. package/dist/server/email/__tests__/email-utils.test.js.map +1 -0
  43. package/dist/server/email/__tests__/lead-routes.test.d.ts +2 -0
  44. package/dist/server/email/__tests__/lead-routes.test.d.ts.map +1 -0
  45. package/dist/server/email/__tests__/lead-routes.test.js +180 -0
  46. package/dist/server/email/__tests__/lead-routes.test.js.map +1 -0
  47. package/dist/server/email/__tests__/lead-service.test.d.ts +2 -0
  48. package/dist/server/email/__tests__/lead-service.test.d.ts.map +1 -0
  49. package/dist/server/email/__tests__/lead-service.test.js +113 -0
  50. package/dist/server/email/__tests__/lead-service.test.js.map +1 -0
  51. package/dist/server/email/__tests__/ses-client.test.d.ts +2 -0
  52. package/dist/server/email/__tests__/ses-client.test.d.ts.map +1 -0
  53. package/dist/server/email/__tests__/ses-client.test.js +48 -0
  54. package/dist/server/email/__tests__/ses-client.test.js.map +1 -0
  55. package/dist/server/email/__tests__/sns-webhook.test.d.ts +2 -0
  56. package/dist/server/email/__tests__/sns-webhook.test.d.ts.map +1 -0
  57. package/dist/server/email/__tests__/sns-webhook.test.js +40 -0
  58. package/dist/server/email/__tests__/sns-webhook.test.js.map +1 -0
  59. package/dist/server/email/campaign-routes.d.ts +8 -0
  60. package/dist/server/email/campaign-routes.d.ts.map +1 -0
  61. package/dist/server/email/campaign-routes.js +65 -0
  62. package/dist/server/email/campaign-routes.js.map +1 -0
  63. package/dist/server/email/campaign-service.d.ts +55 -0
  64. package/dist/server/email/campaign-service.d.ts.map +1 -0
  65. package/dist/server/email/campaign-service.js +89 -0
  66. package/dist/server/email/campaign-service.js.map +1 -0
  67. package/dist/server/email/email-queue-worker.d.ts +27 -0
  68. package/dist/server/email/email-queue-worker.d.ts.map +1 -0
  69. package/dist/server/email/email-queue-worker.js +119 -0
  70. package/dist/server/email/email-queue-worker.js.map +1 -0
  71. package/dist/server/email/email-utils.d.ts +5 -0
  72. package/dist/server/email/email-utils.d.ts.map +1 -0
  73. package/dist/server/email/email-utils.js +24 -0
  74. package/dist/server/email/email-utils.js.map +1 -0
  75. package/dist/server/email/lead-routes.d.ts +8 -0
  76. package/dist/server/email/lead-routes.d.ts.map +1 -0
  77. package/dist/server/email/lead-routes.js +56 -0
  78. package/dist/server/email/lead-routes.js.map +1 -0
  79. package/dist/server/email/lead-service.d.ts +66 -0
  80. package/dist/server/email/lead-service.d.ts.map +1 -0
  81. package/dist/server/email/lead-service.js +138 -0
  82. package/dist/server/email/lead-service.js.map +1 -0
  83. package/dist/server/email/ses-client.d.ts +27 -0
  84. package/dist/server/email/ses-client.d.ts.map +1 -0
  85. package/dist/server/email/ses-client.js +44 -0
  86. package/dist/server/email/ses-client.js.map +1 -0
  87. package/dist/server/email/sns-webhook.d.ts +10 -0
  88. package/dist/server/email/sns-webhook.d.ts.map +1 -0
  89. package/dist/server/email/sns-webhook.js +73 -0
  90. package/dist/server/email/sns-webhook.js.map +1 -0
  91. package/package.json +6 -2
  92. package/dist/dashboard/assets/index-3Noclaww.js +0 -344
  93. package/dist/data/opensquad.db-shm +0 -0
  94. package/dist/data/opensquad.db-wal +0 -0
@@ -1,344 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browserAll-BC0ycs7y.js","assets/webworkerAll-D7SccyuO.js","assets/WebGPURenderer-C1UxCrJq.js","assets/BufferResource-CR4DczHL.js","assets/RenderTargetSystem-DdTH8Un8.js","assets/WebGLRenderer-C6BYo_WV.js","assets/CanvasRenderer-DdWLm2t4.js"])))=>i.map(i=>d[i]);
2
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))l(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&l(d)}).observe(document,{childList:!0,subtree:!0});function a(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function l(o){if(o.ep)return;o.ep=!0;const c=a(o);fetch(o.href,c)}})();const US="modulepreload",HS=function(n){return"/"+n},xv={},Pc=function(t,a,l){let o=Promise.resolve();if(a&&a.length>0){let d=function(g){return Promise.all(g.map(x=>Promise.resolve(x).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const m=document.querySelector("meta[property=csp-nonce]"),p=(m==null?void 0:m.nonce)||(m==null?void 0:m.getAttribute("nonce"));o=d(a.map(g=>{if(g=HS(g),g in xv)return;xv[g]=!0;const x=g.endsWith(".css"),b=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${b}`))return;const E=document.createElement("link");if(E.rel=x?"stylesheet":US,x||(E.as="script"),E.crossOrigin="",E.href=g,p&&E.setAttribute("nonce",p),document.head.appendChild(E),x)return new Promise((C,M)=>{E.addEventListener("load",C),E.addEventListener("error",()=>M(new Error(`Unable to preload CSS for ${g}`)))})}))}function c(d){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=d,window.dispatchEvent(m),!m.defaultPrevented)throw d}return o.then(d=>{for(const m of d||[])m.status==="rejected"&&c(m.reason);return t().catch(c)})};function Hp(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var O0={exports:{}},Vh={};/**
3
- * @license React
4
- * react-jsx-runtime.production.js
5
- *
6
- * Copyright (c) Meta Platforms, Inc. and affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */var _v;function jS(){if(_v)return Vh;_v=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function a(l,o,c){var d=null;if(c!==void 0&&(d=""+c),o.key!==void 0&&(d=""+o.key),"key"in o){c={};for(var m in o)m!=="key"&&(c[m]=o[m])}else c=o;return o=c.ref,{$$typeof:n,type:l,key:d,ref:o!==void 0?o:null,props:c}}return Vh.Fragment=t,Vh.jsx=a,Vh.jsxs=a,Vh}var Sv;function GS(){return Sv||(Sv=1,O0.exports=jS()),O0.exports}var H=GS(),N0={exports:{}},Vt={};/**
11
- * @license React
12
- * react.production.js
13
- *
14
- * Copyright (c) Meta Platforms, Inc. and affiliates.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */var bv;function YS(){if(bv)return Vt;bv=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),E=Symbol.iterator;function C(B){return B===null||typeof B!="object"?null:(B=E&&B[E]||B["@@iterator"],typeof B=="function"?B:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,R={};function w(B,J,tt){this.props=B,this.context=J,this.refs=R,this.updater=tt||M}w.prototype.isReactComponent={},w.prototype.setState=function(B,J){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,J,"setState")},w.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function O(){}O.prototype=w.prototype;function U(B,J,tt){this.props=B,this.context=J,this.refs=R,this.updater=tt||M}var Y=U.prototype=new O;Y.constructor=U,z(Y,w.prototype),Y.isPureReactComponent=!0;var k=Array.isArray;function V(){}var Z={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function q(B,J,tt){var pt=tt.ref;return{$$typeof:n,type:B,key:J,ref:pt!==void 0?pt:null,props:tt}}function $(B,J){return q(B.type,J,B.props)}function et(B){return typeof B=="object"&&B!==null&&B.$$typeof===n}function ct(B){var J={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(tt){return J[tt]})}var vt=/\/+/g;function dt(B,J){return typeof B=="object"&&B!==null&&B.key!=null?ct(""+B.key):J.toString(36)}function St(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(V,V):(B.status="pending",B.then(function(J){B.status==="pending"&&(B.status="fulfilled",B.value=J)},function(J){B.status==="pending"&&(B.status="rejected",B.reason=J)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function j(B,J,tt,pt,bt){var At=typeof B;(At==="undefined"||At==="boolean")&&(B=null);var Ot=!1;if(B===null)Ot=!0;else switch(At){case"bigint":case"string":case"number":Ot=!0;break;case"object":switch(B.$$typeof){case n:case t:Ot=!0;break;case x:return Ot=B._init,j(Ot(B._payload),J,tt,pt,bt)}}if(Ot)return bt=bt(B),Ot=pt===""?"."+dt(B,0):pt,k(bt)?(tt="",Ot!=null&&(tt=Ot.replace(vt,"$&/")+"/"),j(bt,J,tt,"",function(ga){return ga})):bt!=null&&(et(bt)&&(bt=$(bt,tt+(bt.key==null||B&&B.key===bt.key?"":(""+bt.key).replace(vt,"$&/")+"/")+Ot)),J.push(bt)),1;Ot=0;var fe=pt===""?".":pt+":";if(k(B))for(var ce=0;ce<B.length;ce++)pt=B[ce],At=fe+dt(pt,ce),Ot+=j(pt,J,tt,At,bt);else if(ce=C(B),typeof ce=="function")for(B=ce.call(B),ce=0;!(pt=B.next()).done;)pt=pt.value,At=fe+dt(pt,ce++),Ot+=j(pt,J,tt,At,bt);else if(At==="object"){if(typeof B.then=="function")return j(St(B),J,tt,pt,bt);throw J=String(B),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.")}return Ot}function Q(B,J,tt){if(B==null)return B;var pt=[],bt=0;return j(B,pt,"","",function(At){return J.call(tt,At,bt++)}),pt}function ot(B){if(B._status===-1){var J=B._result;J=J(),J.then(function(tt){(B._status===0||B._status===-1)&&(B._status=1,B._result=tt)},function(tt){(B._status===0||B._status===-1)&&(B._status=2,B._result=tt)}),B._status===-1&&(B._status=0,B._result=J)}if(B._status===1)return B._result.default;throw B._result}var rt=typeof reportError=="function"?reportError:function(B){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var J=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof B=="object"&&B!==null&&typeof B.message=="string"?String(B.message):String(B),error:B});if(!window.dispatchEvent(J))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",B);return}console.error(B)},gt={map:Q,forEach:function(B,J,tt){Q(B,function(){J.apply(this,arguments)},tt)},count:function(B){var J=0;return Q(B,function(){J++}),J},toArray:function(B){return Q(B,function(J){return J})||[]},only:function(B){if(!et(B))throw Error("React.Children.only expected to receive a single React element child.");return B}};return Vt.Activity=b,Vt.Children=gt,Vt.Component=w,Vt.Fragment=a,Vt.Profiler=o,Vt.PureComponent=U,Vt.StrictMode=l,Vt.Suspense=p,Vt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,Vt.__COMPILER_RUNTIME={__proto__:null,c:function(B){return Z.H.useMemoCache(B)}},Vt.cache=function(B){return function(){return B.apply(null,arguments)}},Vt.cacheSignal=function(){return null},Vt.cloneElement=function(B,J,tt){if(B==null)throw Error("The argument must be a React element, but you passed "+B+".");var pt=z({},B.props),bt=B.key;if(J!=null)for(At in J.key!==void 0&&(bt=""+J.key),J)!F.call(J,At)||At==="key"||At==="__self"||At==="__source"||At==="ref"&&J.ref===void 0||(pt[At]=J[At]);var At=arguments.length-2;if(At===1)pt.children=tt;else if(1<At){for(var Ot=Array(At),fe=0;fe<At;fe++)Ot[fe]=arguments[fe+2];pt.children=Ot}return q(B.type,bt,pt)},Vt.createContext=function(B){return B={$$typeof:d,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null},B.Provider=B,B.Consumer={$$typeof:c,_context:B},B},Vt.createElement=function(B,J,tt){var pt,bt={},At=null;if(J!=null)for(pt in J.key!==void 0&&(At=""+J.key),J)F.call(J,pt)&&pt!=="key"&&pt!=="__self"&&pt!=="__source"&&(bt[pt]=J[pt]);var Ot=arguments.length-2;if(Ot===1)bt.children=tt;else if(1<Ot){for(var fe=Array(Ot),ce=0;ce<Ot;ce++)fe[ce]=arguments[ce+2];bt.children=fe}if(B&&B.defaultProps)for(pt in Ot=B.defaultProps,Ot)bt[pt]===void 0&&(bt[pt]=Ot[pt]);return q(B,At,bt)},Vt.createRef=function(){return{current:null}},Vt.forwardRef=function(B){return{$$typeof:m,render:B}},Vt.isValidElement=et,Vt.lazy=function(B){return{$$typeof:x,_payload:{_status:-1,_result:B},_init:ot}},Vt.memo=function(B,J){return{$$typeof:g,type:B,compare:J===void 0?null:J}},Vt.startTransition=function(B){var J=Z.T,tt={};Z.T=tt;try{var pt=B(),bt=Z.S;bt!==null&&bt(tt,pt),typeof pt=="object"&&pt!==null&&typeof pt.then=="function"&&pt.then(V,rt)}catch(At){rt(At)}finally{J!==null&&tt.types!==null&&(J.types=tt.types),Z.T=J}},Vt.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},Vt.use=function(B){return Z.H.use(B)},Vt.useActionState=function(B,J,tt){return Z.H.useActionState(B,J,tt)},Vt.useCallback=function(B,J){return Z.H.useCallback(B,J)},Vt.useContext=function(B){return Z.H.useContext(B)},Vt.useDebugValue=function(){},Vt.useDeferredValue=function(B,J){return Z.H.useDeferredValue(B,J)},Vt.useEffect=function(B,J){return Z.H.useEffect(B,J)},Vt.useEffectEvent=function(B){return Z.H.useEffectEvent(B)},Vt.useId=function(){return Z.H.useId()},Vt.useImperativeHandle=function(B,J,tt){return Z.H.useImperativeHandle(B,J,tt)},Vt.useInsertionEffect=function(B,J){return Z.H.useInsertionEffect(B,J)},Vt.useLayoutEffect=function(B,J){return Z.H.useLayoutEffect(B,J)},Vt.useMemo=function(B,J){return Z.H.useMemo(B,J)},Vt.useOptimistic=function(B,J){return Z.H.useOptimistic(B,J)},Vt.useReducer=function(B,J,tt){return Z.H.useReducer(B,J,tt)},Vt.useRef=function(B){return Z.H.useRef(B)},Vt.useState=function(B){return Z.H.useState(B)},Vt.useSyncExternalStore=function(B,J,tt){return Z.H.useSyncExternalStore(B,J,tt)},Vt.useTransition=function(){return Z.H.useTransition()},Vt.version="19.2.4",Vt}var Tv;function jp(){return Tv||(Tv=1,N0.exports=YS()),N0.exports}var G=jp();const tp=Hp(G);var B0={exports:{}},kh={},U0={exports:{}},H0={};/**
19
- * @license React
20
- * scheduler.production.js
21
- *
22
- * Copyright (c) Meta Platforms, Inc. and affiliates.
23
- *
24
- * This source code is licensed under the MIT license found in the
25
- * LICENSE file in the root directory of this source tree.
26
- */var Ev;function qS(){return Ev||(Ev=1,(function(n){function t(j,Q){var ot=j.length;j.push(Q);t:for(;0<ot;){var rt=ot-1>>>1,gt=j[rt];if(0<o(gt,Q))j[rt]=Q,j[ot]=gt,ot=rt;else break t}}function a(j){return j.length===0?null:j[0]}function l(j){if(j.length===0)return null;var Q=j[0],ot=j.pop();if(ot!==Q){j[0]=ot;t:for(var rt=0,gt=j.length,B=gt>>>1;rt<B;){var J=2*(rt+1)-1,tt=j[J],pt=J+1,bt=j[pt];if(0>o(tt,ot))pt<gt&&0>o(bt,tt)?(j[rt]=bt,j[pt]=ot,rt=pt):(j[rt]=tt,j[J]=ot,rt=J);else if(pt<gt&&0>o(bt,ot))j[rt]=bt,j[pt]=ot,rt=pt;else break t}}return Q}function o(j,Q){var ot=j.sortIndex-Q.sortIndex;return ot!==0?ot:j.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var p=[],g=[],x=1,b=null,E=3,C=!1,M=!1,z=!1,R=!1,w=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;function Y(j){for(var Q=a(g);Q!==null;){if(Q.callback===null)l(g);else if(Q.startTime<=j)l(g),Q.sortIndex=Q.expirationTime,t(p,Q);else break;Q=a(g)}}function k(j){if(z=!1,Y(j),!M)if(a(p)!==null)M=!0,V||(V=!0,ct());else{var Q=a(g);Q!==null&&St(k,Q.startTime-j)}}var V=!1,Z=-1,F=5,q=-1;function $(){return R?!0:!(n.unstable_now()-q<F)}function et(){if(R=!1,V){var j=n.unstable_now();q=j;var Q=!0;try{t:{M=!1,z&&(z=!1,O(Z),Z=-1),C=!0;var ot=E;try{e:{for(Y(j),b=a(p);b!==null&&!(b.expirationTime>j&&$());){var rt=b.callback;if(typeof rt=="function"){b.callback=null,E=b.priorityLevel;var gt=rt(b.expirationTime<=j);if(j=n.unstable_now(),typeof gt=="function"){b.callback=gt,Y(j),Q=!0;break e}b===a(p)&&l(p),Y(j)}else l(p);b=a(p)}if(b!==null)Q=!0;else{var B=a(g);B!==null&&St(k,B.startTime-j),Q=!1}}break t}finally{b=null,E=ot,C=!1}Q=void 0}}finally{Q?ct():V=!1}}}var ct;if(typeof U=="function")ct=function(){U(et)};else if(typeof MessageChannel<"u"){var vt=new MessageChannel,dt=vt.port2;vt.port1.onmessage=et,ct=function(){dt.postMessage(null)}}else ct=function(){w(et,0)};function St(j,Q){Z=w(function(){j(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(j){j.callback=null},n.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<j?Math.floor(1e3/j):5},n.unstable_getCurrentPriorityLevel=function(){return E},n.unstable_next=function(j){switch(E){case 1:case 2:case 3:var Q=3;break;default:Q=E}var ot=E;E=Q;try{return j()}finally{E=ot}},n.unstable_requestPaint=function(){R=!0},n.unstable_runWithPriority=function(j,Q){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var ot=E;E=j;try{return Q()}finally{E=ot}},n.unstable_scheduleCallback=function(j,Q,ot){var rt=n.unstable_now();switch(typeof ot=="object"&&ot!==null?(ot=ot.delay,ot=typeof ot=="number"&&0<ot?rt+ot:rt):ot=rt,j){case 1:var gt=-1;break;case 2:gt=250;break;case 5:gt=1073741823;break;case 4:gt=1e4;break;default:gt=5e3}return gt=ot+gt,j={id:x++,callback:Q,priorityLevel:j,startTime:ot,expirationTime:gt,sortIndex:-1},ot>rt?(j.sortIndex=ot,t(g,j),a(p)===null&&j===a(g)&&(z?(O(Z),Z=-1):z=!0,St(k,ot-rt))):(j.sortIndex=gt,t(p,j),M||C||(M=!0,V||(V=!0,ct()))),j},n.unstable_shouldYield=$,n.unstable_wrapCallback=function(j){var Q=E;return function(){var ot=E;E=Q;try{return j.apply(this,arguments)}finally{E=ot}}}})(H0)),H0}var Cv;function LS(){return Cv||(Cv=1,U0.exports=qS()),U0.exports}var j0={exports:{}},ma={};/**
27
- * @license React
28
- * react-dom.production.js
29
- *
30
- * Copyright (c) Meta Platforms, Inc. and affiliates.
31
- *
32
- * This source code is licensed under the MIT license found in the
33
- * LICENSE file in the root directory of this source tree.
34
- */var Av;function XS(){if(Av)return ma;Av=1;var n=jp();function t(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)g+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var l={d:{f:a,r:function(){throw Error(t(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(p,g,x){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:b==null?null:""+b,children:p,containerInfo:g,implementation:x}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return ma.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,ma.createPortal=function(p,g){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(t(299));return c(p,g,null,x)},ma.flushSync=function(p){var g=d.T,x=l.p;try{if(d.T=null,l.p=2,p)return p()}finally{d.T=g,l.p=x,l.d.f()}},ma.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,l.d.C(p,g))},ma.prefetchDNS=function(p){typeof p=="string"&&l.d.D(p)},ma.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var x=g.as,b=m(x,g.crossOrigin),E=typeof g.integrity=="string"?g.integrity:void 0,C=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;x==="style"?l.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:b,integrity:E,fetchPriority:C}):x==="script"&&l.d.X(p,{crossOrigin:b,integrity:E,fetchPriority:C,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},ma.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var x=m(g.as,g.crossOrigin);l.d.M(p,{crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&l.d.M(p)},ma.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var x=g.as,b=m(x,g.crossOrigin);l.d.L(p,x,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},ma.preloadModule=function(p,g){if(typeof p=="string")if(g){var x=m(g.as,g.crossOrigin);l.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else l.d.m(p)},ma.requestFormReset=function(p){l.d.r(p)},ma.unstable_batchedUpdates=function(p,g){return p(g)},ma.useFormState=function(p,g,x){return d.H.useFormState(p,g,x)},ma.useFormStatus=function(){return d.H.useHostTransitionStatus()},ma.version="19.2.4",ma}var Mv;function VS(){if(Mv)return j0.exports;Mv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),j0.exports=XS(),j0.exports}/**
35
- * @license React
36
- * react-dom-client.production.js
37
- *
38
- * Copyright (c) Meta Platforms, Inc. and affiliates.
39
- *
40
- * This source code is licensed under the MIT license found in the
41
- * LICENSE file in the root directory of this source tree.
42
- */var Rv;function kS(){if(Rv)return kh;Rv=1;var n=LS(),t=jp(),a=VS();function l(e){var i="https://react.dev/errors/"+e;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)i+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+e+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var i=e,u=e;if(e.alternate)for(;i.return;)i=i.return;else{e=i;do i=e,(i.flags&4098)!==0&&(u=i.return),e=i.return;while(e)}return i.tag===3?u:null}function d(e){if(e.tag===13){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function m(e){if(e.tag===31){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function p(e){if(c(e)!==e)throw Error(l(188))}function g(e){var i=e.alternate;if(!i){if(i=c(e),i===null)throw Error(l(188));return i!==e?null:e}for(var u=e,f=i;;){var y=u.return;if(y===null)break;var _=y.alternate;if(_===null){if(f=y.return,f!==null){u=f;continue}break}if(y.child===_.child){for(_=y.child;_;){if(_===u)return p(y),e;if(_===f)return p(y),i;_=_.sibling}throw Error(l(188))}if(u.return!==f.return)u=y,f=_;else{for(var A=!1,D=y.child;D;){if(D===u){A=!0,u=y,f=_;break}if(D===f){A=!0,f=y,u=_;break}D=D.sibling}if(!A){for(D=_.child;D;){if(D===u){A=!0,u=_,f=y;break}if(D===f){A=!0,f=_,u=y;break}D=D.sibling}if(!A)throw Error(l(189))}}if(u.alternate!==f)throw Error(l(190))}if(u.tag!==3)throw Error(l(188));return u.stateNode.current===u?e:i}function x(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e;for(e=e.child;e!==null;){if(i=x(e),i!==null)return i;e=e.sibling}return null}var b=Object.assign,E=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),U=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),et=Symbol.iterator;function ct(e){return e===null||typeof e!="object"?null:(e=et&&e[et]||e["@@iterator"],typeof e=="function"?e:null)}var vt=Symbol.for("react.client.reference");function dt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===vt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case z:return"Fragment";case w:return"Profiler";case R:return"StrictMode";case k:return"Suspense";case V:return"SuspenseList";case q:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case M:return"Portal";case U:return e.displayName||"Context";case O:return(e._context.displayName||"Context")+".Consumer";case Y:var i=e.render;return e=e.displayName,e||(e=i.displayName||i.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z:return i=e.displayName||null,i!==null?i:dt(e.type)||"Memo";case F:i=e._payload,e=e._init;try{return dt(e(i))}catch{}}return null}var St=Array.isArray,j=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ot={pending:!1,data:null,method:null,action:null},rt=[],gt=-1;function B(e){return{current:e}}function J(e){0>gt||(e.current=rt[gt],rt[gt]=null,gt--)}function tt(e,i){gt++,rt[gt]=e.current,e.current=i}var pt=B(null),bt=B(null),At=B(null),Ot=B(null);function fe(e,i){switch(tt(At,i),tt(bt,e),tt(pt,null),i.nodeType){case 9:case 11:e=(e=i.documentElement)&&(e=e.namespaceURI)?Xg(e):0;break;default:if(e=i.tagName,i=i.namespaceURI)i=Xg(i),e=Vg(i,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}J(pt),tt(pt,e)}function ce(){J(pt),J(bt),J(At)}function ga(e){e.memoizedState!==null&&tt(Ot,e);var i=pt.current,u=Vg(i,e.type);i!==u&&(tt(bt,e),tt(pt,u))}function qa(e){bt.current===e&&(J(pt),J(bt)),Ot.current===e&&(J(Ot),Yh._currentValue=ot)}var Xn,ta;function pn(e){if(Xn===void 0)try{throw Error()}catch(u){var i=u.stack.trim().match(/\n( *(at )?)/);Xn=i&&i[1]||"",ta=-1<u.stack.indexOf(`
43
- at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
44
- `+Xn+e+ta}var ea=!1;function Ss(e,i){if(!e||ea)return"";ea=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(i){var yt=function(){throw Error()};if(Object.defineProperty(yt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(yt,[])}catch(ut){var lt=ut}Reflect.construct(e,[],yt)}else{try{yt.call()}catch(ut){lt=ut}e.call(yt.prototype)}}else{try{throw Error()}catch(ut){lt=ut}(yt=e())&&typeof yt.catch=="function"&&yt.catch(function(){})}}catch(ut){if(ut&&lt&&typeof ut.stack=="string")return[ut.stack,lt.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _=f.DetermineComponentFrameRoot(),A=_[0],D=_[1];if(A&&D){var X=A.split(`
45
- `),at=D.split(`
46
- `);for(y=f=0;f<X.length&&!X[f].includes("DetermineComponentFrameRoot");)f++;for(;y<at.length&&!at[y].includes("DetermineComponentFrameRoot");)y++;if(f===X.length||y===at.length)for(f=X.length-1,y=at.length-1;1<=f&&0<=y&&X[f]!==at[y];)y--;for(;1<=f&&0<=y;f--,y--)if(X[f]!==at[y]){if(f!==1||y!==1)do if(f--,y--,0>y||X[f]!==at[y]){var ft=`
47
- `+X[f].replace(" at new "," at ");return e.displayName&&ft.includes("<anonymous>")&&(ft=ft.replace("<anonymous>",e.displayName)),ft}while(1<=f&&0<=y);break}}}finally{ea=!1,Error.prepareStackTrace=u}return(u=e?e.displayName||e.name:"")?pn(u):""}function ii(e,i){switch(e.tag){case 26:case 27:case 5:return pn(e.type);case 16:return pn("Lazy");case 13:return e.child!==i&&i!==null?pn("Suspense Fallback"):pn("Suspense");case 19:return pn("SuspenseList");case 0:case 15:return Ss(e.type,!1);case 11:return Ss(e.type.render,!1);case 1:return Ss(e.type,!0);case 31:return pn("Activity");default:return""}}function ru(e){try{var i="",u=null;do i+=ii(e,u),u=e,e=e.return;while(e);return i}catch(f){return`
48
- Error generating stack: `+f.message+`
49
- `+f.stack}}var bs=Object.prototype.hasOwnProperty,La=n.unstable_scheduleCallback,Nl=n.unstable_cancelCallback,Fp=n.unstable_shouldYield,bd=n.unstable_requestPaint,na=n.unstable_now,Td=n.unstable_getCurrentPriorityLevel,Ed=n.unstable_ImmediatePriority,To=n.unstable_UserBlockingPriority,Eo=n.unstable_NormalPriority,Cd=n.unstable_LowPriority,Ad=n.unstable_IdlePriority,ff=n.log,hf=n.unstable_setDisableYieldValue,Xa=null,$e=null;function Va(e){if(typeof ff=="function"&&hf(e),$e&&typeof $e.setStrictMode=="function")try{$e.setStrictMode(Xa,e)}catch{}}var Vn=Math.clz32?Math.clz32:Md,uu=Math.log,ou=Math.LN2;function Md(e){return e>>>=0,e===0?32:31-(uu(e)/ou|0)|0}var cu=256,Ts=262144,fu=4194304;function Ei(e){var i=e&42;if(i!==0)return i;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function hu(e,i,u){var f=e.pendingLanes;if(f===0)return 0;var y=0,_=e.suspendedLanes,A=e.pingedLanes;e=e.warmLanes;var D=f&134217727;return D!==0?(f=D&~_,f!==0?y=Ei(f):(A&=D,A!==0?y=Ei(A):u||(u=D&~e,u!==0&&(y=Ei(u))))):(D=f&~_,D!==0?y=Ei(D):A!==0?y=Ei(A):u||(u=f&~e,u!==0&&(y=Ei(u)))),y===0?0:i!==0&&i!==y&&(i&_)===0&&(_=y&-y,u=i&-i,_>=u||_===32&&(u&4194048)!==0)?i:y}function hr(e,i){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&i)===0}function Co(e,i){switch(e){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dr(){var e=fu;return fu<<=1,(fu&62914560)===0&&(fu=4194304),e}function mr(e){for(var i=[],u=0;31>u;u++)i.push(e);return i}function pr(e,i){e.pendingLanes|=i,i!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Rd(e,i,u,f,y,_){var A=e.pendingLanes;e.pendingLanes=u,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=u,e.entangledLanes&=u,e.errorRecoveryDisabledLanes&=u,e.shellSuspendCounter=0;var D=e.entanglements,X=e.expirationTimes,at=e.hiddenUpdates;for(u=A&~u;0<u;){var ft=31-Vn(u),yt=1<<ft;D[ft]=0,X[ft]=-1;var lt=at[ft];if(lt!==null)for(at[ft]=null,ft=0;ft<lt.length;ft++){var ut=lt[ft];ut!==null&&(ut.lane&=-536870913)}u&=~yt}f!==0&&df(e,f,0),_!==0&&y===0&&e.tag!==0&&(e.suspendedLanes|=_&~(A&~i))}function df(e,i,u){e.pendingLanes|=i,e.suspendedLanes&=~i;var f=31-Vn(i);e.entangledLanes|=i,e.entanglements[f]=e.entanglements[f]|1073741824|u&261930}function Ao(e,i){var u=e.entangledLanes|=i;for(e=e.entanglements;u;){var f=31-Vn(u),y=1<<f;y&i|e[f]&i&&(e[f]|=i),u&=~y}}function Mo(e,i){var u=i&-i;return u=(u&42)!==0?1:Ci(u),(u&(e.suspendedLanes|i))!==0?0:u}function Ci(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ro(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function tl(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:hv(e.type))}function Ai(e,i){var u=Q.p;try{return Q.p=e,i()}finally{Q.p=u}}var li=Math.random().toString(36).slice(2),Pt="__reactFiber$"+li,wn="__reactProps$"+li,Bl="__reactContainer$"+li,zo="__reactEvents$"+li,zd="__reactListeners$"+li,Wp="__reactHandles$"+li,wo="__reactResources$"+li,Es="__reactMarker$"+li;function du(e){delete e[Pt],delete e[wn],delete e[zo],delete e[zd],delete e[Wp]}function cn(e){var i=e[Pt];if(i)return i;for(var u=e.parentNode;u;){if(i=u[Bl]||u[Pt]){if(u=i.alternate,i.child!==null||u!==null&&u.child!==null)for(e=Wg(e);e!==null;){if(u=e[Pt])return u;e=Wg(e)}return i}e=u,u=e.parentNode}return null}function we(e){if(e=e[Pt]||e[Bl]){var i=e.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return e}return null}function el(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e.stateNode;throw Error(l(33))}function nl(e){var i=e[wo];return i||(i=e[wo]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function tn(e){e[Es]=!0}var Mi=new Set,mu={};function al(e,i){Ul(e,i),Ul(e+"Capture",i)}function Ul(e,i){for(mu[e]=i,e=0;e<i.length;e++)Mi.add(i[e])}var wd=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),mf={},pf={};function Dd(e){return bs.call(pf,e)?!0:bs.call(mf,e)?!1:wd.test(e)?pf[e]=!0:(mf[e]=!0,!1)}function pu(e,i,u){if(Dd(i))if(u===null)e.removeAttribute(i);else{switch(typeof u){case"undefined":case"function":case"symbol":e.removeAttribute(i);return;case"boolean":var f=i.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){e.removeAttribute(i);return}}e.setAttribute(i,""+u)}}function yu(e,i,u){if(u===null)e.removeAttribute(i);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttribute(i,""+u)}}function si(e,i,u,f){if(f===null)e.removeAttribute(u);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(u);return}e.setAttributeNS(i,u,""+f)}}function va(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Od(e){var i=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Nd(e,i,u){var f=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);if(!e.hasOwnProperty(i)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var y=f.get,_=f.set;return Object.defineProperty(e,i,{configurable:!0,get:function(){return y.call(this)},set:function(A){u=""+A,_.call(this,A)}}),Object.defineProperty(e,i,{enumerable:f.enumerable}),{getValue:function(){return u},setValue:function(A){u=""+A},stopTracking:function(){e._valueTracker=null,delete e[i]}}}}function Do(e){if(!e._valueTracker){var i=Od(e)?"checked":"value";e._valueTracker=Nd(e,i,""+e[i])}}function yf(e){if(!e)return!1;var i=e._valueTracker;if(!i)return!0;var u=i.getValue(),f="";return e&&(f=Od(e)?e.checked?"true":"false":e.value),e=f,e!==u?(i.setValue(e),!0):!1}function yr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Bd=/[\n"\\]/g;function xa(e){return e.replace(Bd,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Oo(e,i,u,f,y,_,A,D){e.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?e.type=A:e.removeAttribute("type"),i!=null?A==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+va(i)):e.value!==""+va(i)&&(e.value=""+va(i)):A!=="submit"&&A!=="reset"||e.removeAttribute("value"),i!=null?No(e,A,va(i)):u!=null?No(e,A,va(u)):f!=null&&e.removeAttribute("value"),y==null&&_!=null&&(e.defaultChecked=!!_),y!=null&&(e.checked=y&&typeof y!="function"&&typeof y!="symbol"),D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?e.name=""+va(D):e.removeAttribute("name")}function gf(e,i,u,f,y,_,A,D){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(e.type=_),i!=null||u!=null){if(!(_!=="submit"&&_!=="reset"||i!=null)){Do(e);return}u=u!=null?""+va(u):"",i=i!=null?""+va(i):u,D||i===e.value||(e.value=i),e.defaultValue=i}f=f??y,f=typeof f!="function"&&typeof f!="symbol"&&!!f,e.checked=D?e.checked:!!f,e.defaultChecked=!!f,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(e.name=A),Do(e)}function No(e,i,u){i==="number"&&yr(e.ownerDocument)===e||e.defaultValue===""+u||(e.defaultValue=""+u)}function gr(e,i,u,f){if(e=e.options,i){i={};for(var y=0;y<u.length;y++)i["$"+u[y]]=!0;for(u=0;u<e.length;u++)y=i.hasOwnProperty("$"+e[u].value),e[u].selected!==y&&(e[u].selected=y),y&&f&&(e[u].defaultSelected=!0)}else{for(u=""+va(u),i=null,y=0;y<e.length;y++){if(e[y].value===u){e[y].selected=!0,f&&(e[y].defaultSelected=!0);return}i!==null||e[y].disabled||(i=e[y])}i!==null&&(i.selected=!0)}}function vf(e,i,u){if(i!=null&&(i=""+va(i),i!==e.value&&(e.value=i),u==null)){e.defaultValue!==i&&(e.defaultValue=i);return}e.defaultValue=u!=null?""+va(u):""}function Cs(e,i,u,f){if(i==null){if(f!=null){if(u!=null)throw Error(l(92));if(St(f)){if(1<f.length)throw Error(l(93));f=f[0]}u=f}u==null&&(u=""),i=u}u=va(i),e.defaultValue=u,f=e.textContent,f===u&&f!==""&&f!==null&&(e.value=f),Do(e)}function As(e,i){if(i){var u=e.firstChild;if(u&&u===e.lastChild&&u.nodeType===3){u.nodeValue=i;return}}e.textContent=i}var Bo=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function gu(e,i,u){var f=i.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?f?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="":f?e.setProperty(i,u):typeof u!="number"||u===0||Bo.has(i)?i==="float"?e.cssFloat=u:e[i]=(""+u).trim():e[i]=u+"px"}function xf(e,i,u){if(i!=null&&typeof i!="object")throw Error(l(62));if(e=e.style,u!=null){for(var f in u)!u.hasOwnProperty(f)||i!=null&&i.hasOwnProperty(f)||(f.indexOf("--")===0?e.setProperty(f,""):f==="float"?e.cssFloat="":e[f]="");for(var y in i)f=i[y],i.hasOwnProperty(y)&&u[y]!==f&&gu(e,y,f)}else for(var _ in i)i.hasOwnProperty(_)&&gu(e,_,i[_])}function vu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ud=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Hd=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function xu(e){return Hd.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ri(){}var _u=null;function Uo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ms=null,Hl=null;function _f(e){var i=we(e);if(i&&(e=i.stateNode)){var u=e[wn]||null;t:switch(e=i.stateNode,i.type){case"input":if(Oo(e,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),i=u.name,u.type==="radio"&&i!=null){for(u=e;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+xa(""+i)+'"][type="radio"]'),i=0;i<u.length;i++){var f=u[i];if(f!==e&&f.form===e.form){var y=f[wn]||null;if(!y)throw Error(l(90));Oo(f,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(i=0;i<u.length;i++)f=u[i],f.form===e.form&&yf(f)}break t;case"textarea":vf(e,u.value,u.defaultValue);break t;case"select":i=u.value,i!=null&&gr(e,!!u.multiple,i,!1)}}}var Ho=!1;function Sf(e,i,u){if(Ho)return e(i,u);Ho=!0;try{var f=e(i);return f}finally{if(Ho=!1,(Ms!==null||Hl!==null)&&(N(),Ms&&(i=Ms,e=Hl,Hl=Ms=null,_f(i),e)))for(i=0;i<e.length;i++)_f(e[i])}}function Rs(e,i){var u=e.stateNode;if(u===null)return null;var f=u[wn]||null;if(f===null)return null;u=f[i];t:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(e=e.type,f=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!f;break t;default:e=!1}if(e)return null;if(u&&typeof u!="function")throw Error(l(231,i,typeof u));return u}var zi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jo=!1;if(zi)try{var Su={};Object.defineProperty(Su,"passive",{get:function(){jo=!0}}),window.addEventListener("test",Su,Su),window.removeEventListener("test",Su,Su)}catch{jo=!1}var jl=null,Go=null,Gl=null;function Yo(){if(Gl)return Gl;var e,i=Go,u=i.length,f,y="value"in jl?jl.value:jl.textContent,_=y.length;for(e=0;e<u&&i[e]===y[e];e++);var A=u-e;for(f=1;f<=A&&i[u-f]===y[_-f];f++);return Gl=y.slice(e,1<f?1-f:void 0)}function zs(e){var i=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&i===13&&(e=13)):e=i,e===10&&(e=13),32<=e||e===13?e:0}function bu(){return!0}function bf(){return!1}function Dn(e){function i(u,f,y,_,A){this._reactName=u,this._targetInst=y,this.type=f,this.nativeEvent=_,this.target=A,this.currentTarget=null;for(var D in e)e.hasOwnProperty(D)&&(u=e[D],this[D]=u?u(_):_[D]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?bu:bf,this.isPropagationStopped=bf,this}return b(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=bu)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=bu)},persist:function(){},isPersistent:bu}),i}var Yl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tu=Dn(Yl),ri=b({},Yl,{view:0,detail:0}),qo=Dn(ri),Lo,Eu,vr,Cu=b({},ri,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==vr&&(vr&&e.type==="mousemove"?(Lo=e.screenX-vr.screenX,Eu=e.screenY-vr.screenY):Eu=Lo=0,vr=e),Lo)},movementY:function(e){return"movementY"in e?e.movementY:Eu}}),jd=Dn(Cu),Sn=b({},Cu,{dataTransfer:0}),Gd=Dn(Sn),Yd=b({},ri,{relatedTarget:0}),Xo=Dn(Yd),qd=b({},Yl,{animationName:0,elapsedTime:0,pseudoElement:0}),Ld=Dn(qd),Au=b({},Yl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Tf=Dn(Au),Xd=b({},Yl,{data:0}),Ef=Dn(Xd),Vd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cf={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"},Af={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kd(e){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(e):(e=Af[e])?!!i[e]:!1}function Mu(){return kd}var Mf=b({},ri,{key:function(e){if(e.key){var i=Vd[e.key]||e.key;if(i!=="Unidentified")return i}return e.type==="keypress"?(e=zs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Cf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mu,charCode:function(e){return e.type==="keypress"?zs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?zs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Rf=Dn(Mf),Qd=b({},Cu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vo=Dn(Qd),Kd=b({},ri,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mu}),il=Dn(Kd),zf=b({},Yl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Pp=Dn(zf),Zd=b({},Cu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),ql=Dn(Zd),ll=b({},Yl,{newState:0,oldState:0}),wf=Dn(ll),Df=[9,13,27,32],ws=zi&&"CompositionEvent"in window,Ll=null;zi&&"documentMode"in document&&(Ll=document.documentMode);var Ds=zi&&"TextEvent"in window&&!Ll,bn=zi&&(!ws||Ll&&8<Ll&&11>=Ll),Ru=" ",Of=!1;function ko(e,i){switch(e){case"keyup":return Df.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xr(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xl=!1;function Qo(e,i){switch(e){case"compositionend":return xr(i);case"keypress":return i.which!==32?null:(Of=!0,Ru);case"textInput":return e=i.data,e===Ru&&Of?null:e;default:return null}}function Jd(e,i){if(Xl)return e==="compositionend"||!ws&&ko(e,i)?(e=Yo(),Gl=Go=jl=null,Xl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return bn&&i.locale!=="ko"?null:i.data;default:return null}}var _a={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Nf(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i==="input"?!!_a[e.type]:i==="textarea"}function Ko(e,i,u,f){Ms?Hl?Hl.push(f):Hl=[f]:Ms=f,i=Ym(i,"onChange"),0<i.length&&(u=new Tu("onChange","change",null,u,f),e.push({event:u,listeners:i}))}var _r=null,Sr=null;function Bf(e){Hg(e,0)}function br(e){var i=el(e);if(yf(i))return e}function Uf(e,i){if(e==="change")return i}var zu=!1;if(zi){var Os;if(zi){var De="oninput"in document;if(!De){var Fd=document.createElement("div");Fd.setAttribute("oninput","return;"),De=typeof Fd.oninput=="function"}Os=De}else Os=!1;zu=Os&&(!document.documentMode||9<document.documentMode)}function Wd(){_r&&(_r.detachEvent("onpropertychange",Hf),Sr=_r=null)}function Hf(e){if(e.propertyName==="value"&&br(Sr)){var i=[];Ko(i,Sr,e,Uo(e)),Sf(Bf,i)}}function wu(e,i,u){e==="focusin"?(Wd(),_r=i,Sr=u,_r.attachEvent("onpropertychange",Hf)):e==="focusout"&&Wd()}function Vl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return br(Sr)}function Pd(e,i){if(e==="click")return br(i)}function Id(e,i){if(e==="input"||e==="change")return br(i)}function Ns(e,i){return e===i&&(e!==0||1/e===1/i)||e!==e&&i!==i}var Oe=typeof Object.is=="function"?Object.is:Ns;function Tr(e,i){if(Oe(e,i))return!0;if(typeof e!="object"||e===null||typeof i!="object"||i===null)return!1;var u=Object.keys(e),f=Object.keys(i);if(u.length!==f.length)return!1;for(f=0;f<u.length;f++){var y=u[f];if(!bs.call(i,y)||!Oe(e[y],i[y]))return!1}return!0}function jf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Gf(e,i){var u=jf(e);e=0;for(var f;u;){if(u.nodeType===3){if(f=e+u.textContent.length,e<=i&&f>=i)return{node:u,offset:i-e};e=f}t:{for(;u;){if(u.nextSibling){u=u.nextSibling;break t}u=u.parentNode}u=void 0}u=jf(u)}}function Zo(e,i){return e&&i?e===i?!0:e&&e.nodeType===3?!1:i&&i.nodeType===3?Zo(e,i.parentNode):"contains"in e?e.contains(i):e.compareDocumentPosition?!!(e.compareDocumentPosition(i)&16):!1:!1}function Jo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var i=yr(e.document);i instanceof e.HTMLIFrameElement;){try{var u=typeof i.contentWindow.location.href=="string"}catch{u=!1}if(u)e=i.contentWindow;else break;i=yr(e.document)}return i}function Er(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i&&(i==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||i==="textarea"||e.contentEditable==="true")}var $d=zi&&"documentMode"in document&&11>=document.documentMode,Cr=null,Fo=null,Ar=null,Sa=!1;function Wo(e,i,u){var f=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Sa||Cr==null||Cr!==yr(f)||(f=Cr,"selectionStart"in f&&Er(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),Ar&&Tr(Ar,f)||(Ar=f,f=Ym(Fo,"onSelect"),0<f.length&&(i=new Tu("onSelect","select",null,i,u),e.push({event:i,listeners:f}),i.target=Cr)))}function kl(e,i){var u={};return u[e.toLowerCase()]=i.toLowerCase(),u["Webkit"+e]="webkit"+i,u["Moz"+e]="moz"+i,u}var Mr={animationend:kl("Animation","AnimationEnd"),animationiteration:kl("Animation","AnimationIteration"),animationstart:kl("Animation","AnimationStart"),transitionrun:kl("Transition","TransitionRun"),transitionstart:kl("Transition","TransitionStart"),transitioncancel:kl("Transition","TransitionCancel"),transitionend:kl("Transition","TransitionEnd")},Du={},kn={};zi&&(kn=document.createElement("div").style,"AnimationEvent"in window||(delete Mr.animationend.animation,delete Mr.animationiteration.animation,delete Mr.animationstart.animation),"TransitionEvent"in window||delete Mr.transitionend.transition);function Ql(e){if(Du[e])return Du[e];if(!Mr[e])return e;var i=Mr[e],u;for(u in i)if(i.hasOwnProperty(u)&&u in kn)return Du[e]=i[u];return e}var aa=Ql("animationend"),Yf=Ql("animationiteration"),wi=Ql("animationstart"),Rr=Ql("transitionrun"),Kl=Ql("transitionstart"),qf=Ql("transitioncancel"),Po=Ql("transitionend"),sl=new Map,Io="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Io.push("scrollEnd");function On(e,i){sl.set(e,i),al(i,[e])}var Zl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},yn=[],Bs=0,$o=0;function Jl(){for(var e=Bs,i=$o=Bs=0;i<e;){var u=yn[i];yn[i++]=null;var f=yn[i];yn[i++]=null;var y=yn[i];yn[i++]=null;var _=yn[i];if(yn[i++]=null,f!==null&&y!==null){var A=f.pending;A===null?y.next=y:(y.next=A.next,A.next=y),f.pending=y}_!==0&&tc(u,y,_)}}function Ou(e,i,u,f){yn[Bs++]=e,yn[Bs++]=i,yn[Bs++]=u,yn[Bs++]=f,$o|=f,e.lanes|=f,e=e.alternate,e!==null&&(e.lanes|=f)}function zr(e,i,u,f){return Ou(e,i,u,f),wr(e)}function Fl(e,i){return Ou(e,null,null,i),wr(e)}function tc(e,i,u){e.lanes|=u;var f=e.alternate;f!==null&&(f.lanes|=u);for(var y=!1,_=e.return;_!==null;)_.childLanes|=u,f=_.alternate,f!==null&&(f.childLanes|=u),_.tag===22&&(e=_.stateNode,e===null||e._visibility&1||(y=!0)),e=_,_=_.return;return e.tag===3?(_=e.stateNode,y&&i!==null&&(y=31-Vn(u),e=_.hiddenUpdates,f=e[y],f===null?e[y]=[i]:f.push(i),i.lane=u|536870912),_):null}function wr(e){if(50<Ps)throw Ps=0,Is=null,Error(l(185));for(var i=e.return;i!==null;)e=i,i=e.return;return e.tag===3?e.stateNode:null}var Wl={};function tm(e,i,u,f){this.tag=e,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qn(e,i,u,f){return new tm(e,i,u,f)}function Kn(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Di(e,i){var u=e.alternate;return u===null?(u=Qn(e.tag,i,e.key,e.mode),u.elementType=e.elementType,u.type=e.type,u.stateNode=e.stateNode,u.alternate=e,e.alternate=u):(u.pendingProps=i,u.type=e.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=e.flags&65011712,u.childLanes=e.childLanes,u.lanes=e.lanes,u.child=e.child,u.memoizedProps=e.memoizedProps,u.memoizedState=e.memoizedState,u.updateQueue=e.updateQueue,i=e.dependencies,u.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},u.sibling=e.sibling,u.index=e.index,u.ref=e.ref,u.refCleanup=e.refCleanup,u}function Nn(e,i){e.flags&=65011714;var u=e.alternate;return u===null?(e.childLanes=0,e.lanes=i,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=u.childLanes,e.lanes=u.lanes,e.child=u.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=u.memoizedProps,e.memoizedState=u.memoizedState,e.updateQueue=u.updateQueue,e.type=u.type,i=u.dependencies,e.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),e}function Nu(e,i,u,f,y,_){var A=0;if(f=e,typeof e=="function")Kn(e)&&(A=1);else if(typeof e=="string")A=TS(e,u,pt.current)?26:e==="html"||e==="head"||e==="body"?27:5;else t:switch(e){case q:return e=Qn(31,u,i,y),e.elementType=q,e.lanes=_,e;case z:return rl(u.children,y,_,i);case R:A=8,y|=24;break;case w:return e=Qn(12,u,i,y|2),e.elementType=w,e.lanes=_,e;case k:return e=Qn(13,u,i,y),e.elementType=k,e.lanes=_,e;case V:return e=Qn(19,u,i,y),e.elementType=V,e.lanes=_,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case U:A=10;break t;case O:A=9;break t;case Y:A=11;break t;case Z:A=14;break t;case F:A=16,f=null;break t}A=29,u=Error(l(130,e===null?"null":typeof e,"")),f=null}return i=Qn(A,u,i,y),i.elementType=e,i.type=f,i.lanes=_,i}function rl(e,i,u,f){return e=Qn(7,e,f,i),e.lanes=u,e}function ec(e,i,u){return e=Qn(6,e,null,i),e.lanes=u,e}function em(e){var i=Qn(18,null,null,0);return i.stateNode=e,i}function ui(e,i,u){return i=Qn(4,e.children!==null?e.children:[],e.key,i),i.lanes=u,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},i}var Lf=new WeakMap;function ia(e,i){if(typeof e=="object"&&e!==null){var u=Lf.get(e);return u!==void 0?u:(i={value:e,source:i,stack:ru(i)},Lf.set(e,i),i)}return{value:e,source:i,stack:ru(i)}}var oi=[],Us=0,Bu=null,Dr=0,ba=[],la=0,Oi=null,Ni=1,Bi="";function ul(e,i){oi[Us++]=Dr,oi[Us++]=Bu,Bu=e,Dr=i}function Xf(e,i,u){ba[la++]=Ni,ba[la++]=Bi,ba[la++]=Oi,Oi=e;var f=Ni;e=Bi;var y=32-Vn(f)-1;f&=~(1<<y),u+=1;var _=32-Vn(i)+y;if(30<_){var A=y-y%5;_=(f&(1<<A)-1).toString(32),f>>=A,y-=A,Ni=1<<32-Vn(i)+y|u<<y|f,Bi=_+e}else Ni=1<<_|u<<y|f,Bi=e}function nc(e){e.return!==null&&(ul(e,1),Xf(e,1,0))}function Pl(e){for(;e===Bu;)Bu=oi[--Us],oi[Us]=null,Dr=oi[--Us],oi[Us]=null;for(;e===Oi;)Oi=ba[--la],ba[la]=null,Bi=ba[--la],ba[la]=null,Ni=ba[--la],ba[la]=null}function Uu(e,i){ba[la++]=Ni,ba[la++]=Bi,ba[la++]=Oi,Ni=i.id,Bi=i.overflow,Oi=e}var gn=null,Ce=null,te=!1,ol=null,vn=!1,ac=Error(l(519));function It(e){var i=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Hu(ia(i,e)),ac}function ic(e){var i=e.stateNode,u=e.type,f=e.memoizedProps;switch(i[Pt]=e,i[wn]=f,u){case"dialog":ee("cancel",i),ee("close",i);break;case"iframe":case"object":case"embed":ee("load",i);break;case"video":case"audio":for(u=0;u<Bh.length;u++)ee(Bh[u],i);break;case"source":ee("error",i);break;case"img":case"image":case"link":ee("error",i),ee("load",i);break;case"details":ee("toggle",i);break;case"input":ee("invalid",i),gf(i,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0);break;case"select":ee("invalid",i);break;case"textarea":ee("invalid",i),Cs(i,f.value,f.defaultValue,f.children)}u=f.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||i.textContent===""+u||f.suppressHydrationWarning===!0||qg(i.textContent,u)?(f.popover!=null&&(ee("beforetoggle",i),ee("toggle",i)),f.onScroll!=null&&ee("scroll",i),f.onScrollEnd!=null&&ee("scrollend",i),f.onClick!=null&&(i.onclick=Ri),i=!0):i=!1,i||It(e,!0)}function nm(e){for(gn=e.return;gn;)switch(gn.tag){case 5:case 31:case 13:vn=!1;return;case 27:case 3:vn=!0;return;default:gn=gn.return}}function Hs(e){if(e!==gn)return!1;if(!te)return nm(e),te=!0,!1;var i=e.tag,u;if((u=i!==3&&i!==27)&&((u=i===5)&&(u=e.type,u=!(u!=="form"&&u!=="button")||g0(e.type,e.memoizedProps)),u=!u),u&&Ce&&It(e),nm(e),i===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Ce=Fg(e)}else if(i===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Ce=Fg(e)}else i===27?(i=Ce,Wr(e.type)?(e=b0,b0=null,Ce=e):Ce=i):Ce=gn?Qi(e.stateNode.nextSibling):null;return!0}function js(){Ce=gn=null,te=!1}function Vf(){var e=ol;return e!==null&&(Yn===null?Yn=e:Yn.push.apply(Yn,e),ol=null),e}function Hu(e){ol===null?ol=[e]:ol.push(e)}var kf=B(null),cl=null,Bn=null;function fl(e,i,u){tt(kf,i._currentValue),i._currentValue=u}function ka(e){e._currentValue=kf.current,J(kf)}function hl(e,i,u){for(;e!==null;){var f=e.alternate;if((e.childLanes&i)!==i?(e.childLanes|=i,f!==null&&(f.childLanes|=i)):f!==null&&(f.childLanes&i)!==i&&(f.childLanes|=i),e===u)break;e=e.return}}function lc(e,i,u,f){var y=e.child;for(y!==null&&(y.return=e);y!==null;){var _=y.dependencies;if(_!==null){var A=y.child;_=_.firstContext;t:for(;_!==null;){var D=_;_=y;for(var X=0;X<i.length;X++)if(D.context===i[X]){_.lanes|=u,D=_.alternate,D!==null&&(D.lanes|=u),hl(_.return,u,e),f||(A=null);break t}_=D.next}}else if(y.tag===18){if(A=y.return,A===null)throw Error(l(341));A.lanes|=u,_=A.alternate,_!==null&&(_.lanes|=u),hl(A,u,e),A=null}else A=y.child;if(A!==null)A.return=y;else for(A=y;A!==null;){if(A===e){A=null;break}if(y=A.sibling,y!==null){y.return=A.return,A=y;break}A=A.return}y=A}}function Il(e,i,u,f){e=null;for(var y=i,_=!1;y!==null;){if(!_){if((y.flags&524288)!==0)_=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var A=y.alternate;if(A===null)throw Error(l(387));if(A=A.memoizedProps,A!==null){var D=y.type;Oe(y.pendingProps.value,A.value)||(e!==null?e.push(D):e=[D])}}else if(y===Ot.current){if(A=y.alternate,A===null)throw Error(l(387));A.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(e!==null?e.push(Yh):e=[Yh])}y=y.return}e!==null&&lc(i,e,u,f),i.flags|=262144}function Or(e){for(e=e.firstContext;e!==null;){if(!Oe(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Gs(e){cl=e,Bn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xn(e){return Qf(cl,e)}function ju(e,i){return cl===null&&Gs(e),Qf(e,i)}function Qf(e,i){var u=i._currentValue;if(i={context:i,memoizedValue:u,next:null},Bn===null){if(e===null)throw Error(l(308));Bn=i,e.dependencies={lanes:0,firstContext:i},e.flags|=524288}else Bn=Bn.next=i;return u}var am=typeof AbortController<"u"?AbortController:function(){var e=[],i=this.signal={aborted:!1,addEventListener:function(u,f){e.push(f)}};this.abort=function(){i.aborted=!0,e.forEach(function(u){return u()})}},im=n.unstable_scheduleCallback,Kf=n.unstable_NormalPriority,zt={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Zf(){return{controller:new am,data:new Map,refCount:0}}function Tn(e){e.refCount--,e.refCount===0&&im(Kf,function(){e.controller.abort()})}var Ys=null,Jf=0,dl=0,ci=null;function Nr(e,i){if(Ys===null){var u=Ys=[];Jf=0,dl=u0(),ci={status:"pending",value:void 0,then:function(f){u.push(f)}}}return Jf++,i.then(Ff,Ff),i}function Ff(){if(--Jf===0&&Ys!==null){ci!==null&&(ci.status="fulfilled");var e=Ys;Ys=null,dl=0,ci=null;for(var i=0;i<e.length;i++)(0,e[i])()}}function Wf(e,i){var u=[],f={status:"pending",value:null,reason:null,then:function(y){u.push(y)}};return e.then(function(){f.status="fulfilled",f.value=i;for(var y=0;y<u.length;y++)(0,u[y])(i)},function(y){for(f.status="rejected",f.reason=y,y=0;y<u.length;y++)(0,u[y])(void 0)}),f}var lm=j.S;j.S=function(e,i){Zr=na(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&Nr(e,i),lm!==null&&lm(e,i)};var $l=B(null);function Ui(){var e=$l.current;return e!==null?e:pe.pooledCache}function Br(e,i){i===null?tt($l,$l.current):tt($l,i.pool)}function sc(){var e=Ui();return e===null?null:{parent:zt._currentValue,pool:e}}var ts=Error(l(460)),Gu=Error(l(474)),fi=Error(l(542)),Yu={then:function(){}};function sm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Pf(e,i,u){switch(u=e[u],u===void 0?e.push(i):u!==i&&(i.then(Ri,Ri),i=u),i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,If(e),e;default:if(typeof i.status=="string")i.then(Ri,Ri);else{if(e=pe,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=i,e.status="pending",e.then(function(f){if(i.status==="pending"){var y=i;y.status="fulfilled",y.value=f}},function(f){if(i.status==="pending"){var y=i;y.status="rejected",y.reason=f}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,If(e),e}throw Nt=i,ts}}function qs(e){try{var i=e._init;return i(e._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Nt=u,ts):u}}var Nt=null;function rc(){if(Nt===null)throw Error(l(459));var e=Nt;return Nt=null,e}function If(e){if(e===ts||e===fi)throw Error(l(483))}var es=null,ns=0;function uc(e){var i=ns;return ns+=1,es===null&&(es=[]),Pf(es,e,i)}function qu(e,i){i=i.props.ref,e.ref=i!==void 0?i:null}function Lu(e,i){throw i.$$typeof===E?Error(l(525)):(e=Object.prototype.toString.call(i),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e)))}function Ur(e){function i(P,K){if(e){var nt=P.deletions;nt===null?(P.deletions=[K],P.flags|=16):nt.push(K)}}function u(P,K){if(!e)return null;for(;K!==null;)i(P,K),K=K.sibling;return null}function f(P){for(var K=new Map;P!==null;)P.key!==null?K.set(P.key,P):K.set(P.index,P),P=P.sibling;return K}function y(P,K){return P=Di(P,K),P.index=0,P.sibling=null,P}function _(P,K,nt){return P.index=nt,e?(nt=P.alternate,nt!==null?(nt=nt.index,nt<K?(P.flags|=67108866,K):nt):(P.flags|=67108866,K)):(P.flags|=1048576,K)}function A(P){return e&&P.alternate===null&&(P.flags|=67108866),P}function D(P,K,nt,mt){return K===null||K.tag!==6?(K=ec(nt,P.mode,mt),K.return=P,K):(K=y(K,nt),K.return=P,K)}function X(P,K,nt,mt){var Dt=nt.type;return Dt===z?ft(P,K,nt.props.children,mt,nt.key):K!==null&&(K.elementType===Dt||typeof Dt=="object"&&Dt!==null&&Dt.$$typeof===F&&qs(Dt)===K.type)?(K=y(K,nt.props),qu(K,nt),K.return=P,K):(K=Nu(nt.type,nt.key,nt.props,null,P.mode,mt),qu(K,nt),K.return=P,K)}function at(P,K,nt,mt){return K===null||K.tag!==4||K.stateNode.containerInfo!==nt.containerInfo||K.stateNode.implementation!==nt.implementation?(K=ui(nt,P.mode,mt),K.return=P,K):(K=y(K,nt.children||[]),K.return=P,K)}function ft(P,K,nt,mt,Dt){return K===null||K.tag!==7?(K=rl(nt,P.mode,mt,Dt),K.return=P,K):(K=y(K,nt),K.return=P,K)}function yt(P,K,nt){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return K=ec(""+K,P.mode,nt),K.return=P,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case C:return nt=Nu(K.type,K.key,K.props,null,P.mode,nt),qu(nt,K),nt.return=P,nt;case M:return K=ui(K,P.mode,nt),K.return=P,K;case F:return K=qs(K),yt(P,K,nt)}if(St(K)||ct(K))return K=rl(K,P.mode,nt,null),K.return=P,K;if(typeof K.then=="function")return yt(P,uc(K),nt);if(K.$$typeof===U)return yt(P,ju(P,K),nt);Lu(P,K)}return null}function lt(P,K,nt,mt){var Dt=K!==null?K.key:null;if(typeof nt=="string"&&nt!==""||typeof nt=="number"||typeof nt=="bigint")return Dt!==null?null:D(P,K,""+nt,mt);if(typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case C:return nt.key===Dt?X(P,K,nt,mt):null;case M:return nt.key===Dt?at(P,K,nt,mt):null;case F:return nt=qs(nt),lt(P,K,nt,mt)}if(St(nt)||ct(nt))return Dt!==null?null:ft(P,K,nt,mt,null);if(typeof nt.then=="function")return lt(P,K,uc(nt),mt);if(nt.$$typeof===U)return lt(P,K,ju(P,nt),mt);Lu(P,nt)}return null}function ut(P,K,nt,mt,Dt){if(typeof mt=="string"&&mt!==""||typeof mt=="number"||typeof mt=="bigint")return P=P.get(nt)||null,D(K,P,""+mt,Dt);if(typeof mt=="object"&&mt!==null){switch(mt.$$typeof){case C:return P=P.get(mt.key===null?nt:mt.key)||null,X(K,P,mt,Dt);case M:return P=P.get(mt.key===null?nt:mt.key)||null,at(K,P,mt,Dt);case F:return mt=qs(mt),ut(P,K,nt,mt,Dt)}if(St(mt)||ct(mt))return P=P.get(nt)||null,ft(K,P,mt,Dt,null);if(typeof mt.then=="function")return ut(P,K,nt,uc(mt),Dt);if(mt.$$typeof===U)return ut(P,K,nt,ju(K,mt),Dt);Lu(K,mt)}return null}function Ct(P,K,nt,mt){for(var Dt=null,ge=null,Mt=K,Zt=K=0,ie=null;Mt!==null&&Zt<nt.length;Zt++){Mt.index>Zt?(ie=Mt,Mt=null):ie=Mt.sibling;var ve=lt(P,Mt,nt[Zt],mt);if(ve===null){Mt===null&&(Mt=ie);break}e&&Mt&&ve.alternate===null&&i(P,Mt),K=_(ve,K,Zt),ge===null?Dt=ve:ge.sibling=ve,ge=ve,Mt=ie}if(Zt===nt.length)return u(P,Mt),te&&ul(P,Zt),Dt;if(Mt===null){for(;Zt<nt.length;Zt++)Mt=yt(P,nt[Zt],mt),Mt!==null&&(K=_(Mt,K,Zt),ge===null?Dt=Mt:ge.sibling=Mt,ge=Mt);return te&&ul(P,Zt),Dt}for(Mt=f(Mt);Zt<nt.length;Zt++)ie=ut(Mt,P,Zt,nt[Zt],mt),ie!==null&&(e&&ie.alternate!==null&&Mt.delete(ie.key===null?Zt:ie.key),K=_(ie,K,Zt),ge===null?Dt=ie:ge.sibling=ie,ge=ie);return e&&Mt.forEach(function(eu){return i(P,eu)}),te&&ul(P,Zt),Dt}function Ut(P,K,nt,mt){if(nt==null)throw Error(l(151));for(var Dt=null,ge=null,Mt=K,Zt=K=0,ie=null,ve=nt.next();Mt!==null&&!ve.done;Zt++,ve=nt.next()){Mt.index>Zt?(ie=Mt,Mt=null):ie=Mt.sibling;var eu=lt(P,Mt,ve.value,mt);if(eu===null){Mt===null&&(Mt=ie);break}e&&Mt&&eu.alternate===null&&i(P,Mt),K=_(eu,K,Zt),ge===null?Dt=eu:ge.sibling=eu,ge=eu,Mt=ie}if(ve.done)return u(P,Mt),te&&ul(P,Zt),Dt;if(Mt===null){for(;!ve.done;Zt++,ve=nt.next())ve=yt(P,ve.value,mt),ve!==null&&(K=_(ve,K,Zt),ge===null?Dt=ve:ge.sibling=ve,ge=ve);return te&&ul(P,Zt),Dt}for(Mt=f(Mt);!ve.done;Zt++,ve=nt.next())ve=ut(Mt,P,Zt,ve.value,mt),ve!==null&&(e&&ve.alternate!==null&&Mt.delete(ve.key===null?Zt:ve.key),K=_(ve,K,Zt),ge===null?Dt=ve:ge.sibling=ve,ge=ve);return e&&Mt.forEach(function(BS){return i(P,BS)}),te&&ul(P,Zt),Dt}function Re(P,K,nt,mt){if(typeof nt=="object"&&nt!==null&&nt.type===z&&nt.key===null&&(nt=nt.props.children),typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case C:t:{for(var Dt=nt.key;K!==null;){if(K.key===Dt){if(Dt=nt.type,Dt===z){if(K.tag===7){u(P,K.sibling),mt=y(K,nt.props.children),mt.return=P,P=mt;break t}}else if(K.elementType===Dt||typeof Dt=="object"&&Dt!==null&&Dt.$$typeof===F&&qs(Dt)===K.type){u(P,K.sibling),mt=y(K,nt.props),qu(mt,nt),mt.return=P,P=mt;break t}u(P,K);break}else i(P,K);K=K.sibling}nt.type===z?(mt=rl(nt.props.children,P.mode,mt,nt.key),mt.return=P,P=mt):(mt=Nu(nt.type,nt.key,nt.props,null,P.mode,mt),qu(mt,nt),mt.return=P,P=mt)}return A(P);case M:t:{for(Dt=nt.key;K!==null;){if(K.key===Dt)if(K.tag===4&&K.stateNode.containerInfo===nt.containerInfo&&K.stateNode.implementation===nt.implementation){u(P,K.sibling),mt=y(K,nt.children||[]),mt.return=P,P=mt;break t}else{u(P,K);break}else i(P,K);K=K.sibling}mt=ui(nt,P.mode,mt),mt.return=P,P=mt}return A(P);case F:return nt=qs(nt),Re(P,K,nt,mt)}if(St(nt))return Ct(P,K,nt,mt);if(ct(nt)){if(Dt=ct(nt),typeof Dt!="function")throw Error(l(150));return nt=Dt.call(nt),Ut(P,K,nt,mt)}if(typeof nt.then=="function")return Re(P,K,uc(nt),mt);if(nt.$$typeof===U)return Re(P,K,ju(P,nt),mt);Lu(P,nt)}return typeof nt=="string"&&nt!==""||typeof nt=="number"||typeof nt=="bigint"?(nt=""+nt,K!==null&&K.tag===6?(u(P,K.sibling),mt=y(K,nt),mt.return=P,P=mt):(u(P,K),mt=ec(nt,P.mode,mt),mt.return=P,P=mt),A(P)):u(P,K)}return function(P,K,nt,mt){try{ns=0;var Dt=Re(P,K,nt,mt);return es=null,Dt}catch(Mt){if(Mt===ts||Mt===fi)throw Mt;var ge=Qn(29,Mt,null,P.mode);return ge.lanes=mt,ge.return=P,ge}finally{}}}var Ls=Ur(!0),rm=Ur(!1),as=!1;function $f(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function th(e,i){e=e.updateQueue,i.updateQueue===e&&(i.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Hi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ml(e,i,u){var f=e.updateQueue;if(f===null)return null;if(f=f.shared,(ne&2)!==0){var y=f.pending;return y===null?i.next=i:(i.next=y.next,y.next=i),f.pending=i,i=wr(e),tc(e,null,u),i}return Ou(e,f,i,u),wr(e)}function is(e,i,u){if(i=i.updateQueue,i!==null&&(i=i.shared,(u&4194048)!==0)){var f=i.lanes;f&=e.pendingLanes,u|=f,i.lanes=u,Ao(e,u)}}function oc(e,i){var u=e.updateQueue,f=e.alternate;if(f!==null&&(f=f.updateQueue,u===f)){var y=null,_=null;if(u=u.firstBaseUpdate,u!==null){do{var A={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};_===null?y=_=A:_=_.next=A,u=u.next}while(u!==null);_===null?y=_=i:_=_.next=i}else y=_=i;u={baseState:f.baseState,firstBaseUpdate:y,lastBaseUpdate:_,shared:f.shared,callbacks:f.callbacks},e.updateQueue=u;return}e=u.lastBaseUpdate,e===null?u.firstBaseUpdate=i:e.next=i,u.lastBaseUpdate=i}var eh=!1;function Xu(){if(eh){var e=ci;if(e!==null)throw e}}function Xs(e,i,u,f){eh=!1;var y=e.updateQueue;as=!1;var _=y.firstBaseUpdate,A=y.lastBaseUpdate,D=y.shared.pending;if(D!==null){y.shared.pending=null;var X=D,at=X.next;X.next=null,A===null?_=at:A.next=at,A=X;var ft=e.alternate;ft!==null&&(ft=ft.updateQueue,D=ft.lastBaseUpdate,D!==A&&(D===null?ft.firstBaseUpdate=at:D.next=at,ft.lastBaseUpdate=X))}if(_!==null){var yt=y.baseState;A=0,ft=at=X=null,D=_;do{var lt=D.lane&-536870913,ut=lt!==D.lane;if(ut?($t&lt)===lt:(f&lt)===lt){lt!==0&&lt===dl&&(eh=!0),ft!==null&&(ft=ft.next={lane:0,tag:D.tag,payload:D.payload,callback:null,next:null});t:{var Ct=e,Ut=D;lt=i;var Re=u;switch(Ut.tag){case 1:if(Ct=Ut.payload,typeof Ct=="function"){yt=Ct.call(Re,yt,lt);break t}yt=Ct;break t;case 3:Ct.flags=Ct.flags&-65537|128;case 0:if(Ct=Ut.payload,lt=typeof Ct=="function"?Ct.call(Re,yt,lt):Ct,lt==null)break t;yt=b({},yt,lt);break t;case 2:as=!0}}lt=D.callback,lt!==null&&(e.flags|=64,ut&&(e.flags|=8192),ut=y.callbacks,ut===null?y.callbacks=[lt]:ut.push(lt))}else ut={lane:lt,tag:D.tag,payload:D.payload,callback:D.callback,next:null},ft===null?(at=ft=ut,X=yt):ft=ft.next=ut,A|=lt;if(D=D.next,D===null){if(D=y.shared.pending,D===null)break;ut=D,D=ut.next,ut.next=null,y.lastBaseUpdate=ut,y.shared.pending=null}}while(!0);ft===null&&(X=yt),y.baseState=X,y.firstBaseUpdate=at,y.lastBaseUpdate=ft,_===null&&(y.shared.lanes=0),Na|=A,e.lanes=A,e.memoizedState=yt}}function ji(e,i){if(typeof e!="function")throw Error(l(191,e));e.call(i)}function En(e,i){var u=e.callbacks;if(u!==null)for(e.callbacks=null,e=0;e<u.length;e++)ji(u[e],i)}var Ta=B(null),Zn=B(0);function nh(e,i){e=Fe,tt(Zn,e),tt(Ta,i),Fe=e|i.baseLanes}function ah(){tt(Zn,Fe),tt(Ta,Ta.current)}function Un(){Fe=Zn.current,J(Ta),J(Zn)}var fn=B(null),Qa=null;function ls(e){var i=e.alternate;tt(Ge,Ge.current&1),tt(fn,e),Qa===null&&(i===null||Ta.current!==null||i.memoizedState!==null)&&(Qa=e)}function ih(e){tt(Ge,Ge.current),tt(fn,e),Qa===null&&(Qa=e)}function um(e){e.tag===22?(tt(Ge,Ge.current),tt(fn,e),Qa===null&&(Qa=e)):pl()}function pl(){tt(Ge,Ge.current),tt(fn,fn.current)}function Ea(e){J(fn),Qa===e&&(Qa=null),J(Ge)}var Ge=B(0);function cc(e){for(var i=e;i!==null;){if(i.tag===13){var u=i.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||_0(u)||S0(u)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var sa=0,Ht=null,Se=null,en=null,fc=!1,Gi=!1,Vs=!1,hc=0,Vu=0,Yi=null,Ip=0;function Ye(){throw Error(l(321))}function lh(e,i){if(i===null)return!1;for(var u=0;u<i.length&&u<e.length;u++)if(!Oe(e[u],i[u]))return!1;return!0}function sh(e,i,u,f,y,_){return sa=_,Ht=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,j.H=e===null||e.memoizedState===null?Rm:Gr,Vs=!1,_=u(f,y),Vs=!1,Gi&&(_=cm(i,u,f,y)),om(e),_}function om(e){j.H=Ju;var i=Se!==null&&Se.next!==null;if(sa=0,en=Se=Ht=null,fc=!1,Vu=0,Yi=null,i)throw Error(l(300));e===null||Ne||(e=e.dependencies,e!==null&&Or(e)&&(Ne=!0))}function cm(e,i,u,f){Ht=e;var y=0;do{if(Gi&&(Yi=null),Vu=0,Gi=!1,25<=y)throw Error(l(301));if(y+=1,en=Se=null,e.updateQueue!=null){var _=e.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}j.H=Fu,_=i(u,f)}while(Gi);return _}function $p(){var e=j.H,i=e.useState()[0];return i=typeof i.then=="function"?Qu(i):i,e=e.useState()[0],(Se!==null?Se.memoizedState:null)!==e&&(Ht.flags|=1024),i}function rh(){var e=hc!==0;return hc=0,e}function uh(e,i,u){i.updateQueue=e.updateQueue,i.flags&=-2053,e.lanes&=~u}function oh(e){if(fc){for(e=e.memoizedState;e!==null;){var i=e.queue;i!==null&&(i.pending=null),e=e.next}fc=!1}sa=0,en=Se=Ht=null,Gi=!1,Vu=hc=0,Yi=null}function Jn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return en===null?Ht.memoizedState=en=e:en=en.next=e,en}function Qe(){if(Se===null){var e=Ht.alternate;e=e!==null?e.memoizedState:null}else e=Se.next;var i=en===null?Ht.memoizedState:en.next;if(i!==null)en=i,Se=e;else{if(e===null)throw Ht.alternate===null?Error(l(467)):Error(l(310));Se=e,e={memoizedState:Se.memoizedState,baseState:Se.baseState,baseQueue:Se.baseQueue,queue:Se.queue,next:null},en===null?Ht.memoizedState=en=e:en=en.next=e}return en}function ku(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Qu(e){var i=Vu;return Vu+=1,Yi===null&&(Yi=[]),e=Pf(Yi,e,i),i=Ht,(en===null?i.memoizedState:en.next)===null&&(i=i.alternate,j.H=i===null||i.memoizedState===null?Rm:Gr),e}function dc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Qu(e);if(e.$$typeof===U)return xn(e)}throw Error(l(438,String(e)))}function ch(e){var i=null,u=Ht.updateQueue;if(u!==null&&(i=u.memoCache),i==null){var f=Ht.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(i={data:f.data.map(function(y){return y.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),u===null&&(u=ku(),Ht.updateQueue=u),u.memoCache=i,u=i.data[i.index],u===void 0)for(u=i.data[i.index]=Array(e),f=0;f<e;f++)u[f]=$;return i.index++,u}function yl(e,i){return typeof i=="function"?i(e):i}function mc(e){var i=Qe();return fh(i,Se,e)}function fh(e,i,u){var f=e.queue;if(f===null)throw Error(l(311));f.lastRenderedReducer=u;var y=e.baseQueue,_=f.pending;if(_!==null){if(y!==null){var A=y.next;y.next=_.next,_.next=A}i.baseQueue=y=_,f.pending=null}if(_=e.baseState,y===null)e.memoizedState=_;else{i=y.next;var D=A=null,X=null,at=i,ft=!1;do{var yt=at.lane&-536870913;if(yt!==at.lane?($t&yt)===yt:(sa&yt)===yt){var lt=at.revertLane;if(lt===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:at.action,hasEagerState:at.hasEagerState,eagerState:at.eagerState,next:null}),yt===dl&&(ft=!0);else if((sa&lt)===lt){at=at.next,lt===dl&&(ft=!0);continue}else yt={lane:0,revertLane:at.revertLane,gesture:null,action:at.action,hasEagerState:at.hasEagerState,eagerState:at.eagerState,next:null},X===null?(D=X=yt,A=_):X=X.next=yt,Ht.lanes|=lt,Na|=lt;yt=at.action,Vs&&u(_,yt),_=at.hasEagerState?at.eagerState:u(_,yt)}else lt={lane:yt,revertLane:at.revertLane,gesture:at.gesture,action:at.action,hasEagerState:at.hasEagerState,eagerState:at.eagerState,next:null},X===null?(D=X=lt,A=_):X=X.next=lt,Ht.lanes|=yt,Na|=yt;at=at.next}while(at!==null&&at!==i);if(X===null?A=_:X.next=D,!Oe(_,e.memoizedState)&&(Ne=!0,ft&&(u=ci,u!==null)))throw u;e.memoizedState=_,e.baseState=A,e.baseQueue=X,f.lastRenderedState=_}return y===null&&(f.lanes=0),[e.memoizedState,f.dispatch]}function pc(e){var i=Qe(),u=i.queue;if(u===null)throw Error(l(311));u.lastRenderedReducer=e;var f=u.dispatch,y=u.pending,_=i.memoizedState;if(y!==null){u.pending=null;var A=y=y.next;do _=e(_,A.action),A=A.next;while(A!==y);Oe(_,i.memoizedState)||(Ne=!0),i.memoizedState=_,i.baseQueue===null&&(i.baseState=_),u.lastRenderedState=_}return[_,f]}function hh(e,i,u){var f=Ht,y=Qe(),_=te;if(_){if(u===void 0)throw Error(l(407));u=u()}else u=i();var A=!Oe((Se||y).memoizedState,u);if(A&&(y.memoizedState=u,Ne=!0),y=y.queue,gh(mh.bind(null,f,y,e),[e]),y.getSnapshot!==i||A||en!==null&&en.memoizedState.tag&1){if(f.flags|=2048,Hr(9,{destroy:void 0},dh.bind(null,f,y,u,i),null),pe===null)throw Error(l(349));_||(sa&127)!==0||fm(f,i,u)}return u}function fm(e,i,u){e.flags|=16384,e={getSnapshot:i,value:u},i=Ht.updateQueue,i===null?(i=ku(),Ht.updateQueue=i,i.stores=[e]):(u=i.stores,u===null?i.stores=[e]:u.push(e))}function dh(e,i,u,f){i.value=u,i.getSnapshot=f,ph(i)&&yc(e)}function mh(e,i,u){return u(function(){ph(i)&&yc(e)})}function ph(e){var i=e.getSnapshot;e=e.value;try{var u=i();return!Oe(e,u)}catch{return!0}}function yc(e){var i=Fl(e,2);i!==null&&r(i,e,2)}function Ku(e){var i=Jn();if(typeof e=="function"){var u=e;if(e=u(),Vs){Va(!0);try{u()}finally{Va(!1)}}}return i.memoizedState=i.baseState=e,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yl,lastRenderedState:e},i}function hm(e,i,u,f){return e.baseState=u,fh(e,Se,typeof f=="function"?f:yl)}function t0(e,i,u,f,y){if(gl(e))throw Error(l(485));if(e=i.action,e!==null){var _={payload:y,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(A){_.listeners.push(A)}};j.T!==null?u(!0):_.isTransition=!1,f(_),u=i.pending,u===null?(_.next=i.pending=_,dm(i,_)):(_.next=u.next,i.pending=u.next=_)}}function dm(e,i){var u=i.action,f=i.payload,y=e.state;if(i.isTransition){var _=j.T,A={};j.T=A;try{var D=u(y,f),X=j.S;X!==null&&X(A,D),mm(e,i,D)}catch(at){gc(e,i,at)}finally{_!==null&&A.types!==null&&(_.types=A.types),j.T=_}}else try{_=u(y,f),mm(e,i,_)}catch(at){gc(e,i,at)}}function mm(e,i,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(f){yh(e,i,f)},function(f){return gc(e,i,f)}):yh(e,i,u)}function yh(e,i,u){i.status="fulfilled",i.value=u,pm(i),e.state=u,i=e.pending,i!==null&&(u=i.next,u===i?e.pending=null:(u=u.next,i.next=u,dm(e,u)))}function gc(e,i,u){var f=e.pending;if(e.pending=null,f!==null){f=f.next;do i.status="rejected",i.reason=u,pm(i),i=i.next;while(i!==f)}e.action=null}function pm(e){e=e.listeners;for(var i=0;i<e.length;i++)(0,e[i])()}function ym(e,i){return i}function gm(e,i){if(te){var u=pe.formState;if(u!==null){t:{var f=Ht;if(te){if(Ce){e:{for(var y=Ce,_=vn;y.nodeType!==8;){if(!_){y=null;break e}if(y=Qi(y.nextSibling),y===null){y=null;break e}}_=y.data,y=_==="F!"||_==="F"?y:null}if(y){Ce=Qi(y.nextSibling),f=y.data==="F!";break t}}It(f)}f=!1}f&&(i=u[0])}}return u=Jn(),u.memoizedState=u.baseState=i,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ym,lastRenderedState:i},u.queue=f,u=Mm.bind(null,Ht,f),f.dispatch=u,f=Ku(!1),_=Zu.bind(null,Ht,!1,f.queue),f=Jn(),y={state:i,dispatch:null,action:e,pending:null},f.queue=y,u=t0.bind(null,Ht,y,_,u),y.dispatch=u,f.memoizedState=e,[i,u,!1]}function vm(e){var i=Qe();return xm(i,Se,e)}function xm(e,i,u){if(i=fh(e,i,ym)[0],e=mc(yl)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var f=Qu(i)}catch(A){throw A===ts?fi:A}else f=i;i=Qe();var y=i.queue,_=y.dispatch;return u!==i.memoizedState&&(Ht.flags|=2048,Hr(9,{destroy:void 0},e0.bind(null,y,u),null)),[f,_,e]}function e0(e,i){e.action=i}function _m(e){var i=Qe(),u=Se;if(u!==null)return xm(i,u,e);Qe(),i=i.memoizedState,u=Qe();var f=u.queue.dispatch;return u.memoizedState=e,[i,f,!1]}function Hr(e,i,u,f){return e={tag:e,create:u,deps:f,inst:i,next:null},i=Ht.updateQueue,i===null&&(i=ku(),Ht.updateQueue=i),u=i.lastEffect,u===null?i.lastEffect=e.next=e:(f=u.next,u.next=e,e.next=f,i.lastEffect=e),e}function Sm(){return Qe().memoizedState}function vc(e,i,u,f){var y=Jn();Ht.flags|=e,y.memoizedState=Hr(1|i,{destroy:void 0},u,f===void 0?null:f)}function xc(e,i,u,f){var y=Qe();f=f===void 0?null:f;var _=y.memoizedState.inst;Se!==null&&f!==null&&lh(f,Se.memoizedState.deps)?y.memoizedState=Hr(i,_,u,f):(Ht.flags|=e,y.memoizedState=Hr(1|i,_,u,f))}function bm(e,i){vc(8390656,8,e,i)}function gh(e,i){xc(2048,8,e,i)}function Tm(e){Ht.flags|=4;var i=Ht.updateQueue;if(i===null)i=ku(),Ht.updateQueue=i,i.events=[e];else{var u=i.events;u===null?i.events=[e]:u.push(e)}}function Em(e){var i=Qe().memoizedState;return Tm({ref:i,nextImpl:e}),function(){if((ne&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}function Cm(e,i){return xc(4,2,e,i)}function Ca(e,i){return xc(4,4,e,i)}function vh(e,i){if(typeof i=="function"){e=e();var u=i(e);return function(){typeof u=="function"?u():i(null)}}if(i!=null)return e=e(),i.current=e,function(){i.current=null}}function _c(e,i,u){u=u!=null?u.concat([e]):null,xc(4,4,vh.bind(null,i,e),u)}function Sc(){}function xh(e,i){var u=Qe();i=i===void 0?null:i;var f=u.memoizedState;return i!==null&&lh(i,f[1])?f[0]:(u.memoizedState=[e,i],e)}function _h(e,i){var u=Qe();i=i===void 0?null:i;var f=u.memoizedState;if(i!==null&&lh(i,f[1]))return f[0];if(f=e(),Vs){Va(!0);try{e()}finally{Va(!1)}}return u.memoizedState=[f,i],f}function Sh(e,i,u){return u===void 0||(sa&1073741824)!==0&&($t&261930)===0?e.memoizedState=i:(e.memoizedState=u,e=s(),Ht.lanes|=e,Na|=e,u)}function bh(e,i,u,f){return Oe(u,i)?u:Ta.current!==null?(e=Sh(e,u,f),Oe(e,i)||(Ne=!0),e):(sa&42)===0||(sa&1073741824)!==0&&($t&261930)===0?(Ne=!0,e.memoizedState=u):(e=s(),Ht.lanes|=e,Na|=e,i)}function Th(e,i,u,f,y){var _=Q.p;Q.p=_!==0&&8>_?_:8;var A=j.T,D={};j.T=D,Zu(e,!1,i,u);try{var X=y(),at=j.S;if(at!==null&&at(D,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var ft=Wf(X,f);jr(e,i,ft,Wn(e))}else jr(e,i,f,Wn(e))}catch(yt){jr(e,i,{then:function(){},status:"rejected",reason:yt},Wn())}finally{Q.p=_,A!==null&&D.types!==null&&(A.types=D.types),j.T=A}}function n0(){}function Eh(e,i,u,f){if(e.tag!==5)throw Error(l(476));var y=Am(e).queue;Th(e,y,i,ot,u===null?n0:function(){return Ch(e),u(f)})}function Am(e){var i=e.memoizedState;if(i!==null)return i;i={memoizedState:ot,baseState:ot,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yl,lastRenderedState:ot},next:null};var u={};return i.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yl,lastRenderedState:u},next:null},e.memoizedState=i,e=e.alternate,e!==null&&(e.memoizedState=i),i}function Ch(e){var i=Am(e);i.next===null&&(i=e.alternate.memoizedState),jr(e,i.next.queue,{},Wn())}function Ah(){return xn(Yh)}function Cn(){return Qe().memoizedState}function Mh(){return Qe().memoizedState}function a0(e){for(var i=e.return;i!==null;){switch(i.tag){case 24:case 3:var u=Wn();e=Hi(u);var f=ml(i,e,u);f!==null&&(r(f,i,u),is(f,i,u)),i={cache:Zf()},e.payload=i;return}i=i.return}}function i0(e,i,u){var f=Wn();u={lane:f,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},gl(e)?ks(i,u):(u=zr(e,i,u,f),u!==null&&(r(u,e,f),ra(u,i,f)))}function Mm(e,i,u){var f=Wn();jr(e,i,u,f)}function jr(e,i,u,f){var y={lane:f,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(gl(e))ks(i,y);else{var _=e.alternate;if(e.lanes===0&&(_===null||_.lanes===0)&&(_=i.lastRenderedReducer,_!==null))try{var A=i.lastRenderedState,D=_(A,u);if(y.hasEagerState=!0,y.eagerState=D,Oe(D,A))return Ou(e,i,y,0),pe===null&&Jl(),!1}catch{}finally{}if(u=zr(e,i,y,f),u!==null)return r(u,e,f),ra(u,i,f),!0}return!1}function Zu(e,i,u,f){if(f={lane:2,revertLane:u0(),gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},gl(e)){if(i)throw Error(l(479))}else i=zr(e,u,f,2),i!==null&&r(i,e,2)}function gl(e){var i=e.alternate;return e===Ht||i!==null&&i===Ht}function ks(e,i){Gi=fc=!0;var u=e.pending;u===null?i.next=i:(i.next=u.next,u.next=i),e.pending=i}function ra(e,i,u){if((u&4194048)!==0){var f=i.lanes;f&=e.pendingLanes,u|=f,i.lanes=u,Ao(e,u)}}var Ju={readContext:xn,use:dc,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useLayoutEffect:Ye,useInsertionEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useSyncExternalStore:Ye,useId:Ye,useHostTransitionStatus:Ye,useFormState:Ye,useActionState:Ye,useOptimistic:Ye,useMemoCache:Ye,useCacheRefresh:Ye};Ju.useEffectEvent=Ye;var Rm={readContext:xn,use:dc,useCallback:function(e,i){return Jn().memoizedState=[e,i===void 0?null:i],e},useContext:xn,useEffect:bm,useImperativeHandle:function(e,i,u){u=u!=null?u.concat([e]):null,vc(4194308,4,vh.bind(null,i,e),u)},useLayoutEffect:function(e,i){return vc(4194308,4,e,i)},useInsertionEffect:function(e,i){vc(4,2,e,i)},useMemo:function(e,i){var u=Jn();i=i===void 0?null:i;var f=e();if(Vs){Va(!0);try{e()}finally{Va(!1)}}return u.memoizedState=[f,i],f},useReducer:function(e,i,u){var f=Jn();if(u!==void 0){var y=u(i);if(Vs){Va(!0);try{u(i)}finally{Va(!1)}}}else y=i;return f.memoizedState=f.baseState=y,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:y},f.queue=e,e=e.dispatch=i0.bind(null,Ht,e),[f.memoizedState,e]},useRef:function(e){var i=Jn();return e={current:e},i.memoizedState=e},useState:function(e){e=Ku(e);var i=e.queue,u=Mm.bind(null,Ht,i);return i.dispatch=u,[e.memoizedState,u]},useDebugValue:Sc,useDeferredValue:function(e,i){var u=Jn();return Sh(u,e,i)},useTransition:function(){var e=Ku(!1);return e=Th.bind(null,Ht,e.queue,!0,!1),Jn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,i,u){var f=Ht,y=Jn();if(te){if(u===void 0)throw Error(l(407));u=u()}else{if(u=i(),pe===null)throw Error(l(349));($t&127)!==0||fm(f,i,u)}y.memoizedState=u;var _={value:u,getSnapshot:i};return y.queue=_,bm(mh.bind(null,f,_,e),[e]),f.flags|=2048,Hr(9,{destroy:void 0},dh.bind(null,f,_,u,i),null),u},useId:function(){var e=Jn(),i=pe.identifierPrefix;if(te){var u=Bi,f=Ni;u=(f&~(1<<32-Vn(f)-1)).toString(32)+u,i="_"+i+"R_"+u,u=hc++,0<u&&(i+="H"+u.toString(32)),i+="_"}else u=Ip++,i="_"+i+"r_"+u.toString(32)+"_";return e.memoizedState=i},useHostTransitionStatus:Ah,useFormState:gm,useActionState:gm,useOptimistic:function(e){var i=Jn();i.memoizedState=i.baseState=e;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=u,i=Zu.bind(null,Ht,!0,u),u.dispatch=i,[e,i]},useMemoCache:ch,useCacheRefresh:function(){return Jn().memoizedState=a0.bind(null,Ht)},useEffectEvent:function(e){var i=Jn(),u={impl:e};return i.memoizedState=u,function(){if((ne&2)!==0)throw Error(l(440));return u.impl.apply(void 0,arguments)}}},Gr={readContext:xn,use:dc,useCallback:xh,useContext:xn,useEffect:gh,useImperativeHandle:_c,useInsertionEffect:Cm,useLayoutEffect:Ca,useMemo:_h,useReducer:mc,useRef:Sm,useState:function(){return mc(yl)},useDebugValue:Sc,useDeferredValue:function(e,i){var u=Qe();return bh(u,Se.memoizedState,e,i)},useTransition:function(){var e=mc(yl)[0],i=Qe().memoizedState;return[typeof e=="boolean"?e:Qu(e),i]},useSyncExternalStore:hh,useId:Cn,useHostTransitionStatus:Ah,useFormState:vm,useActionState:vm,useOptimistic:function(e,i){var u=Qe();return hm(u,Se,e,i)},useMemoCache:ch,useCacheRefresh:Mh};Gr.useEffectEvent=Em;var Fu={readContext:xn,use:dc,useCallback:xh,useContext:xn,useEffect:gh,useImperativeHandle:_c,useInsertionEffect:Cm,useLayoutEffect:Ca,useMemo:_h,useReducer:pc,useRef:Sm,useState:function(){return pc(yl)},useDebugValue:Sc,useDeferredValue:function(e,i){var u=Qe();return Se===null?Sh(u,e,i):bh(u,Se.memoizedState,e,i)},useTransition:function(){var e=pc(yl)[0],i=Qe().memoizedState;return[typeof e=="boolean"?e:Qu(e),i]},useSyncExternalStore:hh,useId:Cn,useHostTransitionStatus:Ah,useFormState:_m,useActionState:_m,useOptimistic:function(e,i){var u=Qe();return Se!==null?hm(u,Se,e,i):(u.baseState=e,[e,u.queue.dispatch])},useMemoCache:ch,useCacheRefresh:Mh};Fu.useEffectEvent=Em;function Yr(e,i,u,f){i=e.memoizedState,u=u(f,i),u=u==null?i:b({},i,u),e.memoizedState=u,e.lanes===0&&(e.updateQueue.baseState=u)}var Wu={enqueueSetState:function(e,i,u){e=e._reactInternals;var f=Wn(),y=Hi(f);y.payload=i,u!=null&&(y.callback=u),i=ml(e,y,f),i!==null&&(r(i,e,f),is(i,e,f))},enqueueReplaceState:function(e,i,u){e=e._reactInternals;var f=Wn(),y=Hi(f);y.tag=1,y.payload=i,u!=null&&(y.callback=u),i=ml(e,y,f),i!==null&&(r(i,e,f),is(i,e,f))},enqueueForceUpdate:function(e,i){e=e._reactInternals;var u=Wn(),f=Hi(u);f.tag=2,i!=null&&(f.callback=i),i=ml(e,f,u),i!==null&&(r(i,e,u),is(i,e,u))}};function zm(e,i,u,f,y,_,A){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(f,_,A):i.prototype&&i.prototype.isPureReactComponent?!Tr(u,f)||!Tr(y,_):!0}function wm(e,i,u,f){e=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(u,f),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(u,f),i.state!==e&&Wu.enqueueReplaceState(i,i.state,null)}function An(e,i){var u=i;if("ref"in i){u={};for(var f in i)f!=="ref"&&(u[f]=i[f])}if(e=e.defaultProps){u===i&&(u=b({},u));for(var y in e)u[y]===void 0&&(u[y]=e[y])}return u}function Rh(e){Zl(e)}function Dm(e){console.error(e)}function bc(e){Zl(e)}function Tc(e,i){try{var u=e.onUncaughtError;u(i.value,{componentStack:i.stack})}catch(f){setTimeout(function(){throw f})}}function Om(e,i,u){try{var f=e.onCaughtError;f(u.value,{componentStack:u.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function zh(e,i,u){return u=Hi(u),u.tag=3,u.payload={element:null},u.callback=function(){Tc(e,i)},u}function qr(e){return e=Hi(e),e.tag=3,e}function ua(e,i,u,f){var y=u.type.getDerivedStateFromError;if(typeof y=="function"){var _=f.value;e.payload=function(){return y(_)},e.callback=function(){Om(i,u,f)}}var A=u.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(e.callback=function(){Om(i,u,f),typeof y!="function"&&(ki===null?ki=new Set([this]):ki.add(this));var D=f.stack;this.componentDidCatch(f.value,{componentStack:D!==null?D:""})})}function Aa(e,i,u,f,y){if(u.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(i=u.alternate,i!==null&&Il(i,u,y,!0),u=fn.current,u!==null){switch(u.tag){case 31:case 13:return Qa===null?qt():u.alternate===null&&ye===0&&(ye=3),u.flags&=-257,u.flags|=65536,u.lanes=y,f===Yu?u.flags|=16384:(i=u.updateQueue,i===null?u.updateQueue=new Set([f]):i.add(f),l0(e,f,y)),!1;case 22:return u.flags|=65536,f===Yu?u.flags|=16384:(i=u.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([f])},u.updateQueue=i):(u=i.retryQueue,u===null?i.retryQueue=new Set([f]):u.add(f)),l0(e,f,y)),!1}throw Error(l(435,u.tag))}return l0(e,f,y),qt(),!1}if(te)return i=fn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=y,f!==ac&&(e=Error(l(422),{cause:f}),Hu(ia(e,u)))):(f!==ac&&(i=Error(l(423),{cause:f}),Hu(ia(i,u))),e=e.current.alternate,e.flags|=65536,y&=-y,e.lanes|=y,f=ia(f,u),y=zh(e.stateNode,f,y),oc(e,y),ye!==4&&(ye=2)),!1;var _=Error(l(520),{cause:f});if(_=ia(_,u),yi===null?yi=[_]:yi.push(_),ye!==4&&(ye=2),i===null)return!0;f=ia(f,u),u=i;do{switch(u.tag){case 3:return u.flags|=65536,e=y&-y,u.lanes|=e,e=zh(u.stateNode,f,e),oc(u,e),!1;case 1:if(i=u.type,_=u.stateNode,(u.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(ki===null||!ki.has(_))))return u.flags|=65536,y&=-y,u.lanes|=y,y=qr(y),ua(y,e,u,f),oc(u,y),!1}u=u.return}while(u!==null);return!1}var Ec=Error(l(461)),Ne=!1;function qe(e,i,u,f){i.child=e===null?rm(i,null,u,f):Ls(i,e.child,u,f)}function Pu(e,i,u,f,y){u=u.render;var _=i.ref;if("ref"in f){var A={};for(var D in f)D!=="ref"&&(A[D]=f[D])}else A=f;return Gs(i),f=sh(e,i,u,A,_,y),D=rh(),e!==null&&!Ne?(uh(e,i,y),mi(e,i,y)):(te&&D&&nc(i),i.flags|=1,qe(e,i,f,y),i.child)}function Iu(e,i,u,f,y){if(e===null){var _=u.type;return typeof _=="function"&&!Kn(_)&&_.defaultProps===void 0&&u.compare===null?(i.tag=15,i.type=_,Ma(e,i,_,f,y)):(e=Nu(u.type,null,f,i,i.mode,y),e.ref=i.ref,e.return=i,i.child=e)}if(_=e.child,!rs(e,y)){var A=_.memoizedProps;if(u=u.compare,u=u!==null?u:Tr,u(A,f)&&e.ref===i.ref)return mi(e,i,y)}return i.flags|=1,e=Di(_,f),e.ref=i.ref,e.return=i,i.child=e}function Ma(e,i,u,f,y){if(e!==null){var _=e.memoizedProps;if(Tr(_,f)&&e.ref===i.ref)if(Ne=!1,i.pendingProps=f=_,rs(e,y))(e.flags&131072)!==0&&(Ne=!0);else return i.lanes=e.lanes,mi(e,i,y)}return Lr(e,i,u,f,y)}function Ra(e,i,u,f){var y=f.children,_=e!==null?e.memoizedState:null;if(e===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),f.mode==="hidden"){if((i.flags&128)!==0){if(_=_!==null?_.baseLanes|u:u,e!==null){for(f=i.child=e.child,y=0;f!==null;)y=y|f.lanes|f.childLanes,f=f.sibling;f=y&~_}else f=0,i.child=null;return qi(e,i,_,u,f)}if((u&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},e!==null&&Br(i,_!==null?_.cachePool:null),_!==null?nh(i,_):ah(),um(i);else return f=i.lanes=536870912,qi(e,i,_!==null?_.baseLanes|u:u,u,f)}else _!==null?(Br(i,_.cachePool),nh(i,_),pl(),i.memoizedState=null):(e!==null&&Br(i,null),ah(),pl());return qe(e,i,y,u),i.child}function hi(e,i){return e!==null&&e.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function qi(e,i,u,f,y){var _=Ui();return _=_===null?null:{parent:zt._currentValue,pool:_},i.memoizedState={baseLanes:u,cachePool:_},e!==null&&Br(i,null),ah(),um(i),e!==null&&Il(e,i,f,!0),i.childLanes=y,null}function Ka(e,i){return i=Xr({mode:i.mode,children:i.children},e.mode),i.ref=e.ref,e.child=i,i.return=e,i}function _n(e,i,u){return Ls(i,e.child,null,u),e=Ka(i,i.pendingProps),e.flags|=2,Ea(i),i.memoizedState=null,e}function $u(e,i,u){var f=i.pendingProps,y=(i.flags&128)!==0;if(i.flags&=-129,e===null){if(te){if(f.mode==="hidden")return e=Ka(i,f),i.lanes=536870912,hi(null,e);if(ih(i),(e=Ce)?(e=Jg(e,vn),e=e!==null&&e.data==="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:Oi!==null?{id:Ni,overflow:Bi}:null,retryLane:536870912,hydrationErrors:null},u=em(e),u.return=i,i.child=u,gn=i,Ce=null)):e=null,e===null)throw It(i);return i.lanes=536870912,null}return Ka(i,f)}var _=e.memoizedState;if(_!==null){var A=_.dehydrated;if(ih(i),y)if(i.flags&256)i.flags&=-257,i=_n(e,i,u);else if(i.memoizedState!==null)i.child=e.child,i.flags|=128,i=null;else throw Error(l(558));else if(Ne||Il(e,i,u,!1),y=(u&e.childLanes)!==0,Ne||y){if(f=pe,f!==null&&(A=Mo(f,u),A!==0&&A!==_.retryLane))throw _.retryLane=A,Fl(e,A),r(f,e,A),Ec;qt(),i=_n(e,i,u)}else e=_.treeContext,Ce=Qi(A.nextSibling),gn=i,te=!0,ol=null,vn=!1,e!==null&&Uu(i,e),i=Ka(i,f),i.flags|=4096;return i}return e=Di(e.child,{mode:f.mode,children:f.children}),e.ref=i.ref,i.child=e,e.return=i,e}function di(e,i){var u=i.ref;if(u===null)e!==null&&e.ref!==null&&(i.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(l(284));(e===null||e.ref!==u)&&(i.flags|=4194816)}}function Lr(e,i,u,f,y){return Gs(i),u=sh(e,i,u,f,void 0,y),f=rh(),e!==null&&!Ne?(uh(e,i,y),mi(e,i,y)):(te&&f&&nc(i),i.flags|=1,qe(e,i,u,y),i.child)}function Hn(e,i,u,f,y,_){return Gs(i),i.updateQueue=null,u=cm(i,f,u,y),om(e),f=rh(),e!==null&&!Ne?(uh(e,i,_),mi(e,i,_)):(te&&f&&nc(i),i.flags|=1,qe(e,i,u,_),i.child)}function Mn(e,i,u,f,y){if(Gs(i),i.stateNode===null){var _=Wl,A=u.contextType;typeof A=="object"&&A!==null&&(_=xn(A)),_=new u(f,_),i.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=Wu,i.stateNode=_,_._reactInternals=i,_=i.stateNode,_.props=f,_.state=i.memoizedState,_.refs={},$f(i),A=u.contextType,_.context=typeof A=="object"&&A!==null?xn(A):Wl,_.state=i.memoizedState,A=u.getDerivedStateFromProps,typeof A=="function"&&(Yr(i,u,A,f),_.state=i.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(A=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),A!==_.state&&Wu.enqueueReplaceState(_,_.state,null),Xs(i,f,_,y),Xu(),_.state=i.memoizedState),typeof _.componentDidMount=="function"&&(i.flags|=4194308),f=!0}else if(e===null){_=i.stateNode;var D=i.memoizedProps,X=An(u,D);_.props=X;var at=_.context,ft=u.contextType;A=Wl,typeof ft=="object"&&ft!==null&&(A=xn(ft));var yt=u.getDerivedStateFromProps;ft=typeof yt=="function"||typeof _.getSnapshotBeforeUpdate=="function",D=i.pendingProps!==D,ft||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(D||at!==A)&&wm(i,_,f,A),as=!1;var lt=i.memoizedState;_.state=lt,Xs(i,f,_,y),Xu(),at=i.memoizedState,D||lt!==at||as?(typeof yt=="function"&&(Yr(i,u,yt,f),at=i.memoizedState),(X=as||zm(i,u,X,f,lt,at,A))?(ft||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(i.flags|=4194308)):(typeof _.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=f,i.memoizedState=at),_.props=f,_.state=at,_.context=A,f=X):(typeof _.componentDidMount=="function"&&(i.flags|=4194308),f=!1)}else{_=i.stateNode,th(e,i),A=i.memoizedProps,ft=An(u,A),_.props=ft,yt=i.pendingProps,lt=_.context,at=u.contextType,X=Wl,typeof at=="object"&&at!==null&&(X=xn(at)),D=u.getDerivedStateFromProps,(at=typeof D=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(A!==yt||lt!==X)&&wm(i,_,f,X),as=!1,lt=i.memoizedState,_.state=lt,Xs(i,f,_,y),Xu();var ut=i.memoizedState;A!==yt||lt!==ut||as||e!==null&&e.dependencies!==null&&Or(e.dependencies)?(typeof D=="function"&&(Yr(i,u,D,f),ut=i.memoizedState),(ft=as||zm(i,u,ft,f,lt,ut,X)||e!==null&&e.dependencies!==null&&Or(e.dependencies))?(at||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(f,ut,X),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(f,ut,X)),typeof _.componentDidUpdate=="function"&&(i.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof _.componentDidUpdate!="function"||A===e.memoizedProps&&lt===e.memoizedState||(i.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||A===e.memoizedProps&&lt===e.memoizedState||(i.flags|=1024),i.memoizedProps=f,i.memoizedState=ut),_.props=f,_.state=ut,_.context=X,f=ft):(typeof _.componentDidUpdate!="function"||A===e.memoizedProps&&lt===e.memoizedState||(i.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||A===e.memoizedProps&&lt===e.memoizedState||(i.flags|=1024),f=!1)}return _=f,di(e,i),f=(i.flags&128)!==0,_||f?(_=i.stateNode,u=f&&typeof u.getDerivedStateFromError!="function"?null:_.render(),i.flags|=1,e!==null&&f?(i.child=Ls(i,e.child,null,y),i.child=Ls(i,null,u,y)):qe(e,i,u,y),i.memoizedState=_.state,e=i.child):e=mi(e,i,y),e}function se(e,i,u,f){return js(),i.flags|=256,qe(e,i,u,f),i.child}var za={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Za(e){return{baseLanes:e,cachePool:sc()}}function to(e,i,u){return e=e!==null?e.childLanes&~u:0,i&&(e|=ae),e}function wa(e,i,u){var f=i.pendingProps,y=!1,_=(i.flags&128)!==0,A;if((A=_)||(A=e!==null&&e.memoizedState===null?!1:(Ge.current&2)!==0),A&&(y=!0,i.flags&=-129),A=(i.flags&32)!==0,i.flags&=-33,e===null){if(te){if(y?ls(i):pl(),(e=Ce)?(e=Jg(e,vn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:Oi!==null?{id:Ni,overflow:Bi}:null,retryLane:536870912,hydrationErrors:null},u=em(e),u.return=i,i.child=u,gn=i,Ce=null)):e=null,e===null)throw It(i);return S0(e)?i.lanes=32:i.lanes=536870912,null}var D=f.children;return f=f.fallback,y?(pl(),y=i.mode,D=Xr({mode:"hidden",children:D},y),f=rl(f,y,u,null),D.return=i,f.return=i,D.sibling=f,i.child=D,f=i.child,f.memoizedState=Za(u),f.childLanes=to(e,A,u),i.memoizedState=za,hi(null,f)):(ls(i),ss(i,D))}var X=e.memoizedState;if(X!==null&&(D=X.dehydrated,D!==null)){if(_)i.flags&256?(ls(i),i.flags&=-257,i=Vr(e,i,u)):i.memoizedState!==null?(pl(),i.child=e.child,i.flags|=128,i=null):(pl(),D=f.fallback,y=i.mode,f=Xr({mode:"visible",children:f.children},y),D=rl(D,y,u,null),D.flags|=2,f.return=i,D.return=i,f.sibling=D,i.child=f,Ls(i,e.child,null,u),f=i.child,f.memoizedState=Za(u),f.childLanes=to(e,A,u),i.memoizedState=za,i=hi(null,f));else if(ls(i),S0(D)){if(A=D.nextSibling&&D.nextSibling.dataset,A)var at=A.dgst;A=at,f=Error(l(419)),f.stack="",f.digest=A,Hu({value:f,source:null,stack:null}),i=Vr(e,i,u)}else if(Ne||Il(e,i,u,!1),A=(u&e.childLanes)!==0,Ne||A){if(A=pe,A!==null&&(f=Mo(A,u),f!==0&&f!==X.retryLane))throw X.retryLane=f,Fl(e,f),r(A,e,f),Ec;_0(D)||qt(),i=Vr(e,i,u)}else _0(D)?(i.flags|=192,i.child=e.child,i=null):(e=X.treeContext,Ce=Qi(D.nextSibling),gn=i,te=!0,ol=null,vn=!1,e!==null&&Uu(i,e),i=ss(i,f.children),i.flags|=4096);return i}return y?(pl(),D=f.fallback,y=i.mode,X=e.child,at=X.sibling,f=Di(X,{mode:"hidden",children:f.children}),f.subtreeFlags=X.subtreeFlags&65011712,at!==null?D=Di(at,D):(D=rl(D,y,u,null),D.flags|=2),D.return=i,f.return=i,f.sibling=D,i.child=f,hi(null,f),f=i.child,D=e.child.memoizedState,D===null?D=Za(u):(y=D.cachePool,y!==null?(X=zt._currentValue,y=y.parent!==X?{parent:X,pool:X}:y):y=sc(),D={baseLanes:D.baseLanes|u,cachePool:y}),f.memoizedState=D,f.childLanes=to(e,A,u),i.memoizedState=za,hi(e.child,f)):(ls(i),u=e.child,e=u.sibling,u=Di(u,{mode:"visible",children:f.children}),u.return=i,u.sibling=null,e!==null&&(A=i.deletions,A===null?(i.deletions=[e],i.flags|=16):A.push(e)),i.child=u,i.memoizedState=null,u)}function ss(e,i){return i=Xr({mode:"visible",children:i},e.mode),i.return=e,e.child=i}function Xr(e,i){return e=Qn(22,e,null,i),e.lanes=0,e}function Vr(e,i,u){return Ls(i,e.child,null,u),e=ss(i,i.pendingProps.children),e.flags|=2,i.memoizedState=null,e}function Qs(e,i,u){e.lanes|=i;var f=e.alternate;f!==null&&(f.lanes|=i),hl(e.return,i,u)}function eo(e,i,u,f,y,_){var A=e.memoizedState;A===null?e.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:f,tail:u,tailMode:y,treeForkCount:_}:(A.isBackwards=i,A.rendering=null,A.renderingStartTime=0,A.last=f,A.tail=u,A.tailMode=y,A.treeForkCount=_)}function no(e,i,u){var f=i.pendingProps,y=f.revealOrder,_=f.tail;f=f.children;var A=Ge.current,D=(A&2)!==0;if(D?(A=A&1|2,i.flags|=128):A&=1,tt(Ge,A),qe(e,i,f,u),f=te?Dr:0,!D&&e!==null&&(e.flags&128)!==0)t:for(e=i.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Qs(e,u,i);else if(e.tag===19)Qs(e,u,i);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===i)break t;for(;e.sibling===null;){if(e.return===null||e.return===i)break t;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(y){case"forwards":for(u=i.child,y=null;u!==null;)e=u.alternate,e!==null&&cc(e)===null&&(y=u),u=u.sibling;u=y,u===null?(y=i.child,i.child=null):(y=u.sibling,u.sibling=null),eo(i,!1,y,u,_,f);break;case"backwards":case"unstable_legacy-backwards":for(u=null,y=i.child,i.child=null;y!==null;){if(e=y.alternate,e!==null&&cc(e)===null){i.child=y;break}e=y.sibling,y.sibling=u,u=y,y=e}eo(i,!0,u,null,_,f);break;case"together":eo(i,!1,null,null,void 0,f);break;default:i.memoizedState=null}return i.child}function mi(e,i,u){if(e!==null&&(i.dependencies=e.dependencies),Na|=i.lanes,(u&i.childLanes)===0)if(e!==null){if(Il(e,i,u,!1),(u&i.childLanes)===0)return null}else return null;if(e!==null&&i.child!==e.child)throw Error(l(153));if(i.child!==null){for(e=i.child,u=Di(e,e.pendingProps),i.child=u,u.return=i;e.sibling!==null;)e=e.sibling,u=u.sibling=Di(e,e.pendingProps),u.return=i;u.sibling=null}return i.child}function rs(e,i){return(e.lanes&i)!==0?!0:(e=e.dependencies,!!(e!==null&&Or(e)))}function ao(e,i,u){switch(i.tag){case 3:fe(i,i.stateNode.containerInfo),fl(i,zt,e.memoizedState.cache),js();break;case 27:case 5:ga(i);break;case 4:fe(i,i.stateNode.containerInfo);break;case 10:fl(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,ih(i),null;break;case 13:var f=i.memoizedState;if(f!==null)return f.dehydrated!==null?(ls(i),i.flags|=128,null):(u&i.child.childLanes)!==0?wa(e,i,u):(ls(i),e=mi(e,i,u),e!==null?e.sibling:null);ls(i);break;case 19:var y=(e.flags&128)!==0;if(f=(u&i.childLanes)!==0,f||(Il(e,i,u,!1),f=(u&i.childLanes)!==0),y){if(f)return no(e,i,u);i.flags|=128}if(y=i.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),tt(Ge,Ge.current),f)break;return null;case 22:return i.lanes=0,Ra(e,i,u,i.pendingProps);case 24:fl(i,zt,e.memoizedState.cache)}return mi(e,i,u)}function Cc(e,i,u){if(e!==null)if(e.memoizedProps!==i.pendingProps)Ne=!0;else{if(!rs(e,u)&&(i.flags&128)===0)return Ne=!1,ao(e,i,u);Ne=(e.flags&131072)!==0}else Ne=!1,te&&(i.flags&1048576)!==0&&Xf(i,Dr,i.index);switch(i.lanes=0,i.tag){case 16:t:{var f=i.pendingProps;if(e=qs(i.elementType),i.type=e,typeof e=="function")Kn(e)?(f=An(e,f),i.tag=1,i=Mn(null,i,e,f,u)):(i.tag=0,i=Lr(null,i,e,f,u));else{if(e!=null){var y=e.$$typeof;if(y===Y){i.tag=11,i=Pu(null,i,e,f,u);break t}else if(y===Z){i.tag=14,i=Iu(null,i,e,f,u);break t}}throw i=dt(e)||e,Error(l(306,i,""))}}return i;case 0:return Lr(e,i,i.type,i.pendingProps,u);case 1:return f=i.type,y=An(f,i.pendingProps),Mn(e,i,f,y,u);case 3:t:{if(fe(i,i.stateNode.containerInfo),e===null)throw Error(l(387));f=i.pendingProps;var _=i.memoizedState;y=_.element,th(e,i),Xs(i,f,null,u);var A=i.memoizedState;if(f=A.cache,fl(i,zt,f),f!==_.cache&&lc(i,[zt],u,!0),Xu(),f=A.element,_.isDehydrated)if(_={element:f,isDehydrated:!1,cache:A.cache},i.updateQueue.baseState=_,i.memoizedState=_,i.flags&256){i=se(e,i,f,u);break t}else if(f!==y){y=ia(Error(l(424)),i),Hu(y),i=se(e,i,f,u);break t}else{switch(e=i.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ce=Qi(e.firstChild),gn=i,te=!0,ol=null,vn=!0,u=rm(i,null,f,u),i.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(js(),f===y){i=mi(e,i,u);break t}qe(e,i,f,u)}i=i.child}return i;case 26:return di(e,i),e===null?(u=tv(i.type,null,i.pendingProps,null))?i.memoizedState=u:te||(u=i.type,e=i.pendingProps,f=qm(At.current).createElement(u),f[Pt]=i,f[wn]=e,Pn(f,u,e),tn(f),i.stateNode=f):i.memoizedState=tv(i.type,e.memoizedProps,i.pendingProps,e.memoizedState),null;case 27:return ga(i),e===null&&te&&(f=i.stateNode=Pg(i.type,i.pendingProps,At.current),gn=i,vn=!0,y=Ce,Wr(i.type)?(b0=y,Ce=Qi(f.firstChild)):Ce=y),qe(e,i,i.pendingProps.children,u),di(e,i),e===null&&(i.flags|=4194304),i.child;case 5:return e===null&&te&&((y=f=Ce)&&(f=cS(f,i.type,i.pendingProps,vn),f!==null?(i.stateNode=f,gn=i,Ce=Qi(f.firstChild),vn=!1,y=!0):y=!1),y||It(i)),ga(i),y=i.type,_=i.pendingProps,A=e!==null?e.memoizedProps:null,f=_.children,g0(y,_)?f=null:A!==null&&g0(y,A)&&(i.flags|=32),i.memoizedState!==null&&(y=sh(e,i,$p,null,null,u),Yh._currentValue=y),di(e,i),qe(e,i,f,u),i.child;case 6:return e===null&&te&&((e=u=Ce)&&(u=fS(u,i.pendingProps,vn),u!==null?(i.stateNode=u,gn=i,Ce=null,e=!0):e=!1),e||It(i)),null;case 13:return wa(e,i,u);case 4:return fe(i,i.stateNode.containerInfo),f=i.pendingProps,e===null?i.child=Ls(i,null,f,u):qe(e,i,f,u),i.child;case 11:return Pu(e,i,i.type,i.pendingProps,u);case 7:return qe(e,i,i.pendingProps,u),i.child;case 8:return qe(e,i,i.pendingProps.children,u),i.child;case 12:return qe(e,i,i.pendingProps.children,u),i.child;case 10:return f=i.pendingProps,fl(i,i.type,f.value),qe(e,i,f.children,u),i.child;case 9:return y=i.type._context,f=i.pendingProps.children,Gs(i),y=xn(y),f=f(y),i.flags|=1,qe(e,i,f,u),i.child;case 14:return Iu(e,i,i.type,i.pendingProps,u);case 15:return Ma(e,i,i.type,i.pendingProps,u);case 19:return no(e,i,u);case 31:return $u(e,i,u);case 22:return Ra(e,i,u,i.pendingProps);case 24:return Gs(i),f=xn(zt),e===null?(y=Ui(),y===null&&(y=pe,_=Zf(),y.pooledCache=_,_.refCount++,_!==null&&(y.pooledCacheLanes|=u),y=_),i.memoizedState={parent:f,cache:y},$f(i),fl(i,zt,y)):((e.lanes&u)!==0&&(th(e,i),Xs(i,null,null,u),Xu()),y=e.memoizedState,_=i.memoizedState,y.parent!==f?(y={parent:f,cache:f},i.memoizedState=y,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=y),fl(i,zt,f)):(f=_.cache,fl(i,zt,f),f!==y.cache&&lc(i,[zt],u,!0))),qe(e,i,i.pendingProps.children,u),i.child;case 29:throw i.pendingProps}throw Error(l(156,i.tag))}function oa(e){e.flags|=4}function us(e,i,u,f,y){if((i=(e.mode&32)!==0)&&(i=!1),i){if(e.flags|=16777216,(y&335544128)===y)if(e.stateNode.complete)e.flags|=8192;else if(_t())e.flags|=8192;else throw Nt=Yu,Gu}else e.flags&=-16777217}function vl(e,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!lv(i))if(_t())e.flags|=8192;else throw Nt=Yu,Gu}function kr(e,i){i!==null&&(e.flags|=4),e.flags&16384&&(i=e.tag!==22?dr():536870912,e.lanes|=i,Ba|=i)}function io(e,i){if(!te)switch(e.tailMode){case"hidden":i=e.tail;for(var u=null;i!==null;)i.alternate!==null&&(u=i),i=i.sibling;u===null?e.tail=null:u.sibling=null;break;case"collapsed":u=e.tail;for(var f=null;u!==null;)u.alternate!==null&&(f=u),u=u.sibling;f===null?i||e.tail===null?e.tail=null:e.tail.sibling=null:f.sibling=null}}function xe(e){var i=e.alternate!==null&&e.alternate.child===e.child,u=0,f=0;if(i)for(var y=e.child;y!==null;)u|=y.lanes|y.childLanes,f|=y.subtreeFlags&65011712,f|=y.flags&65011712,y.return=e,y=y.sibling;else for(y=e.child;y!==null;)u|=y.lanes|y.childLanes,f|=y.subtreeFlags,f|=y.flags,y.return=e,y=y.sibling;return e.subtreeFlags|=f,e.childLanes=u,i}function wh(e,i,u){var f=i.pendingProps;switch(Pl(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xe(i),null;case 1:return xe(i),null;case 3:return u=i.stateNode,f=null,e!==null&&(f=e.memoizedState.cache),i.memoizedState.cache!==f&&(i.flags|=2048),ka(zt),ce(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(e===null||e.child===null)&&(Hs(i)?oa(i):e===null||e.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Vf())),xe(i),null;case 26:var y=i.type,_=i.memoizedState;return e===null?(oa(i),_!==null?(xe(i),vl(i,_)):(xe(i),us(i,y,null,f,u))):_?_!==e.memoizedState?(oa(i),xe(i),vl(i,_)):(xe(i),i.flags&=-16777217):(e=e.memoizedProps,e!==f&&oa(i),xe(i),us(i,y,e,f,u)),null;case 27:if(qa(i),u=At.current,y=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==f&&oa(i);else{if(!f){if(i.stateNode===null)throw Error(l(166));return xe(i),null}e=pt.current,Hs(i)?ic(i):(e=Pg(y,f,u),i.stateNode=e,oa(i))}return xe(i),null;case 5:if(qa(i),y=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==f&&oa(i);else{if(!f){if(i.stateNode===null)throw Error(l(166));return xe(i),null}if(_=pt.current,Hs(i))ic(i);else{var A=qm(At.current);switch(_){case 1:_=A.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:_=A.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":_=A.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":_=A.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":_=A.createElement("div"),_.innerHTML="<script><\/script>",_=_.removeChild(_.firstChild);break;case"select":_=typeof f.is=="string"?A.createElement("select",{is:f.is}):A.createElement("select"),f.multiple?_.multiple=!0:f.size&&(_.size=f.size);break;default:_=typeof f.is=="string"?A.createElement(y,{is:f.is}):A.createElement(y)}}_[Pt]=i,_[wn]=f;t:for(A=i.child;A!==null;){if(A.tag===5||A.tag===6)_.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===i)break t;for(;A.sibling===null;){if(A.return===null||A.return===i)break t;A=A.return}A.sibling.return=A.return,A=A.sibling}i.stateNode=_;t:switch(Pn(_,y,f),y){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break t;case"img":f=!0;break t;default:f=!1}f&&oa(i)}}return xe(i),us(i,i.type,e===null?null:e.memoizedProps,i.pendingProps,u),null;case 6:if(e&&i.stateNode!=null)e.memoizedProps!==f&&oa(i);else{if(typeof f!="string"&&i.stateNode===null)throw Error(l(166));if(e=At.current,Hs(i)){if(e=i.stateNode,u=i.memoizedProps,f=null,y=gn,y!==null)switch(y.tag){case 27:case 5:f=y.memoizedProps}e[Pt]=i,e=!!(e.nodeValue===u||f!==null&&f.suppressHydrationWarning===!0||qg(e.nodeValue,u)),e||It(i,!0)}else e=qm(e).createTextNode(f),e[Pt]=i,i.stateNode=e}return xe(i),null;case 31:if(u=i.memoizedState,e===null||e.memoizedState!==null){if(f=Hs(i),u!==null){if(e===null){if(!f)throw Error(l(318));if(e=i.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[Pt]=i}else js(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;xe(i),e=!1}else u=Vf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),e=!0;if(!e)return i.flags&256?(Ea(i),i):(Ea(i),null);if((i.flags&128)!==0)throw Error(l(558))}return xe(i),null;case 13:if(f=i.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(y=Hs(i),f!==null&&f.dehydrated!==null){if(e===null){if(!y)throw Error(l(318));if(y=i.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(l(317));y[Pt]=i}else js(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;xe(i),y=!1}else y=Vf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=y),y=!0;if(!y)return i.flags&256?(Ea(i),i):(Ea(i),null)}return Ea(i),(i.flags&128)!==0?(i.lanes=u,i):(u=f!==null,e=e!==null&&e.memoizedState!==null,u&&(f=i.child,y=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(y=f.alternate.memoizedState.cachePool.pool),_=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(_=f.memoizedState.cachePool.pool),_!==y&&(f.flags|=2048)),u!==e&&u&&(i.child.flags|=8192),kr(i,i.updateQueue),xe(i),null);case 4:return ce(),e===null&&h0(i.stateNode.containerInfo),xe(i),null;case 10:return ka(i.type),xe(i),null;case 19:if(J(Ge),f=i.memoizedState,f===null)return xe(i),null;if(y=(i.flags&128)!==0,_=f.rendering,_===null)if(y)io(f,!1);else{if(ye!==0||e!==null&&(e.flags&128)!==0)for(e=i.child;e!==null;){if(_=cc(e),_!==null){for(i.flags|=128,io(f,!1),e=_.updateQueue,i.updateQueue=e,kr(i,e),i.subtreeFlags=0,e=u,u=i.child;u!==null;)Nn(u,e),u=u.sibling;return tt(Ge,Ge.current&1|2),te&&ul(i,f.treeForkCount),i.child}e=e.sibling}f.tail!==null&&na()>Ua&&(i.flags|=128,y=!0,io(f,!1),i.lanes=4194304)}else{if(!y)if(e=cc(_),e!==null){if(i.flags|=128,y=!0,e=e.updateQueue,i.updateQueue=e,kr(i,e),io(f,!0),f.tail===null&&f.tailMode==="hidden"&&!_.alternate&&!te)return xe(i),null}else 2*na()-f.renderingStartTime>Ua&&u!==536870912&&(i.flags|=128,y=!0,io(f,!1),i.lanes=4194304);f.isBackwards?(_.sibling=i.child,i.child=_):(e=f.last,e!==null?e.sibling=_:i.child=_,f.last=_)}return f.tail!==null?(e=f.tail,f.rendering=e,f.tail=e.sibling,f.renderingStartTime=na(),e.sibling=null,u=Ge.current,tt(Ge,y?u&1|2:u&1),te&&ul(i,f.treeForkCount),e):(xe(i),null);case 22:case 23:return Ea(i),Un(),f=i.memoizedState!==null,e!==null?e.memoizedState!==null!==f&&(i.flags|=8192):f&&(i.flags|=8192),f?(u&536870912)!==0&&(i.flags&128)===0&&(xe(i),i.subtreeFlags&6&&(i.flags|=8192)):xe(i),u=i.updateQueue,u!==null&&kr(i,u.retryQueue),u=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(u=e.memoizedState.cachePool.pool),f=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),f!==u&&(i.flags|=2048),e!==null&&J($l),null;case 24:return u=null,e!==null&&(u=e.memoizedState.cache),i.memoizedState.cache!==u&&(i.flags|=2048),ka(zt),xe(i),null;case 25:return null;case 30:return null}throw Error(l(156,i.tag))}function Ac(e,i){switch(Pl(i),i.tag){case 1:return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 3:return ka(zt),ce(),e=i.flags,(e&65536)!==0&&(e&128)===0?(i.flags=e&-65537|128,i):null;case 26:case 27:case 5:return qa(i),null;case 31:if(i.memoizedState!==null){if(Ea(i),i.alternate===null)throw Error(l(340));js()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 13:if(Ea(i),e=i.memoizedState,e!==null&&e.dehydrated!==null){if(i.alternate===null)throw Error(l(340));js()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 19:return J(Ge),null;case 4:return ce(),null;case 10:return ka(i.type),null;case 22:case 23:return Ea(i),Un(),e!==null&&J($l),e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 24:return ka(zt),null;case 25:return null;default:return null}}function Ks(e,i){switch(Pl(i),i.tag){case 3:ka(zt),ce();break;case 26:case 27:case 5:qa(i);break;case 4:ce();break;case 31:i.memoizedState!==null&&Ea(i);break;case 13:Ea(i);break;case 19:J(Ge);break;case 10:ka(i.type);break;case 22:case 23:Ea(i),Un(),e!==null&&J($l);break;case 24:ka(zt)}}function Li(e,i){try{var u=i.updateQueue,f=u!==null?u.lastEffect:null;if(f!==null){var y=f.next;u=y;do{if((u.tag&e)===e){f=void 0;var _=u.create,A=u.inst;f=_(),A.destroy=f}u=u.next}while(u!==y)}}catch(D){Ee(i,i.return,D)}}function Ja(e,i,u){try{var f=i.updateQueue,y=f!==null?f.lastEffect:null;if(y!==null){var _=y.next;f=_;do{if((f.tag&e)===e){var A=f.inst,D=A.destroy;if(D!==void 0){A.destroy=void 0,y=i;var X=u,at=D;try{at()}catch(ft){Ee(y,X,ft)}}}f=f.next}while(f!==_)}}catch(ft){Ee(i,i.return,ft)}}function os(e){var i=e.updateQueue;if(i!==null){var u=e.stateNode;try{En(i,u)}catch(f){Ee(e,e.return,f)}}}function Dh(e,i,u){u.props=An(e.type,e.memoizedProps),u.state=e.memoizedState;try{u.componentWillUnmount()}catch(f){Ee(e,i,f)}}function Xi(e,i){try{var u=e.ref;if(u!==null){switch(e.tag){case 26:case 27:case 5:var f=e.stateNode;break;case 30:f=e.stateNode;break;default:f=e.stateNode}typeof u=="function"?e.refCleanup=u(f):u.current=f}}catch(y){Ee(e,i,y)}}function Da(e,i){var u=e.ref,f=e.refCleanup;if(u!==null)if(typeof f=="function")try{f()}catch(y){Ee(e,i,y)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(y){Ee(e,i,y)}else u.current=null}function Oa(e){var i=e.type,u=e.memoizedProps,f=e.stateNode;try{t:switch(i){case"button":case"input":case"select":case"textarea":u.autoFocus&&f.focus();break t;case"img":u.src?f.src=u.src:u.srcSet&&(f.srcset=u.srcSet)}}catch(y){Ee(e,e.return,y)}}function Fa(e,i,u){try{var f=e.stateNode;iS(f,e.type,u,i),f[wn]=i}catch(y){Ee(e,e.return,y)}}function nn(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Wr(e.type)||e.tag===4}function Vi(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||nn(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Wr(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function kt(e,i,u){var f=e.tag;if(f===5||f===6)e=e.stateNode,i?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(e,i):(i=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,i.appendChild(e),u=u._reactRootContainer,u!=null||i.onclick!==null||(i.onclick=Ri));else if(f!==4&&(f===27&&Wr(e.type)&&(u=e.stateNode,i=null),e=e.child,e!==null))for(kt(e,i,u),e=e.sibling;e!==null;)kt(e,i,u),e=e.sibling}function he(e,i,u){var f=e.tag;if(f===5||f===6)e=e.stateNode,i?u.insertBefore(e,i):u.appendChild(e);else if(f!==4&&(f===27&&Wr(e.type)&&(u=e.stateNode),e=e.child,e!==null))for(he(e,i,u),e=e.sibling;e!==null;)he(e,i,u),e=e.sibling}function Ke(e){var i=e.stateNode,u=e.memoizedProps;try{for(var f=e.type,y=i.attributes;y.length;)i.removeAttributeNode(y[0]);Pn(i,f,u),i[Pt]=e,i[wn]=u}catch(_){Ee(e,e.return,_)}}var Wa=!1,Be=!1,xl=!1,lo=typeof WeakSet=="function"?WeakSet:Set,Le=null;function Qr(e,i){if(e=e.containerInfo,p0=Zm,e=Jo(e),Er(e)){if("selectionStart"in e)var u={start:e.selectionStart,end:e.selectionEnd};else t:{u=(u=e.ownerDocument)&&u.defaultView||window;var f=u.getSelection&&u.getSelection();if(f&&f.rangeCount!==0){u=f.anchorNode;var y=f.anchorOffset,_=f.focusNode;f=f.focusOffset;try{u.nodeType,_.nodeType}catch{u=null;break t}var A=0,D=-1,X=-1,at=0,ft=0,yt=e,lt=null;e:for(;;){for(var ut;yt!==u||y!==0&&yt.nodeType!==3||(D=A+y),yt!==_||f!==0&&yt.nodeType!==3||(X=A+f),yt.nodeType===3&&(A+=yt.nodeValue.length),(ut=yt.firstChild)!==null;)lt=yt,yt=ut;for(;;){if(yt===e)break e;if(lt===u&&++at===y&&(D=A),lt===_&&++ft===f&&(X=A),(ut=yt.nextSibling)!==null)break;yt=lt,lt=yt.parentNode}yt=ut}u=D===-1||X===-1?null:{start:D,end:X}}else u=null}u=u||{start:0,end:0}}else u=null;for(y0={focusedElem:e,selectionRange:u},Zm=!1,Le=i;Le!==null;)if(i=Le,e=i.child,(i.subtreeFlags&1028)!==0&&e!==null)e.return=i,Le=e;else for(;Le!==null;){switch(i=Le,_=i.alternate,e=i.flags,i.tag){case 0:if((e&4)!==0&&(e=i.updateQueue,e=e!==null?e.events:null,e!==null))for(u=0;u<e.length;u++)y=e[u],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&_!==null){e=void 0,u=i,y=_.memoizedProps,_=_.memoizedState,f=u.stateNode;try{var Ct=An(u.type,y);e=f.getSnapshotBeforeUpdate(Ct,_),f.__reactInternalSnapshotBeforeUpdate=e}catch(Ut){Ee(u,u.return,Ut)}}break;case 3:if((e&1024)!==0){if(e=i.stateNode.containerInfo,u=e.nodeType,u===9)x0(e);else if(u===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":x0(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(l(163))}if(e=i.sibling,e!==null){e.return=i.return,Le=e;break}Le=i.return}}function Nm(e,i,u){var f=u.flags;switch(u.tag){case 0:case 11:case 15:_l(e,u),f&4&&Li(5,u);break;case 1:if(_l(e,u),f&4)if(e=u.stateNode,i===null)try{e.componentDidMount()}catch(A){Ee(u,u.return,A)}else{var y=An(u.type,i.memoizedProps);i=i.memoizedState;try{e.componentDidUpdate(y,i,e.__reactInternalSnapshotBeforeUpdate)}catch(A){Ee(u,u.return,A)}}f&64&&os(u),f&512&&Xi(u,u.return);break;case 3:if(_l(e,u),f&64&&(e=u.updateQueue,e!==null)){if(i=null,u.child!==null)switch(u.child.tag){case 27:case 5:i=u.child.stateNode;break;case 1:i=u.child.stateNode}try{En(e,i)}catch(A){Ee(u,u.return,A)}}break;case 27:i===null&&f&4&&Ke(u);case 26:case 5:_l(e,u),i===null&&f&4&&Oa(u),f&512&&Xi(u,u.return);break;case 12:_l(e,u);break;case 31:_l(e,u),f&4&&Rc(e,u);break;case 13:_l(e,u),f&4&&Oh(e,u),f&64&&(e=u.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(u=K2.bind(null,u),hS(e,u))));break;case 22:if(f=u.memoizedState!==null||Wa,!f){i=i!==null&&i.memoizedState!==null||Be,y=Wa;var _=Be;Wa=f,(Be=i)&&!_?me(e,u,(u.subtreeFlags&8772)!==0):_l(e,u),Wa=y,Be=_}break;case 30:break;default:_l(e,u)}}function Mc(e){var i=e.alternate;i!==null&&(e.alternate=null,Mc(i)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(i=e.stateNode,i!==null&&du(i)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var re=null,an=!1;function jn(e,i,u){for(u=u.child;u!==null;)cs(e,i,u),u=u.sibling}function cs(e,i,u){if($e&&typeof $e.onCommitFiberUnmount=="function")try{$e.onCommitFiberUnmount(Xa,u)}catch{}switch(u.tag){case 26:Be||Da(u,i),jn(e,i,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Be||Da(u,i);var f=re,y=an;Wr(u.type)&&(re=u.stateNode,an=!1),jn(e,i,u),Hh(u.stateNode),re=f,an=y;break;case 5:Be||Da(u,i);case 6:if(f=re,y=an,re=null,jn(e,i,u),re=f,an=y,re!==null)if(an)try{(re.nodeType===9?re.body:re.nodeName==="HTML"?re.ownerDocument.body:re).removeChild(u.stateNode)}catch(_){Ee(u,i,_)}else try{re.removeChild(u.stateNode)}catch(_){Ee(u,i,_)}break;case 18:re!==null&&(an?(e=re,Kg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,u.stateNode),Yc(e)):Kg(re,u.stateNode));break;case 4:f=re,y=an,re=u.stateNode.containerInfo,an=!0,jn(e,i,u),re=f,an=y;break;case 0:case 11:case 14:case 15:Ja(2,u,i),Be||Ja(4,u,i),jn(e,i,u);break;case 1:Be||(Da(u,i),f=u.stateNode,typeof f.componentWillUnmount=="function"&&Dh(u,i,f)),jn(e,i,u);break;case 21:jn(e,i,u);break;case 22:Be=(f=Be)||u.memoizedState!==null,jn(e,i,u),Be=f;break;default:jn(e,i,u)}}function Rc(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Yc(e)}catch(u){Ee(i,i.return,u)}}}function Oh(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Yc(e)}catch(u){Ee(i,i.return,u)}}function Bm(e){switch(e.tag){case 31:case 13:case 19:var i=e.stateNode;return i===null&&(i=e.stateNode=new lo),i;case 22:return e=e.stateNode,i=e._retryCache,i===null&&(i=e._retryCache=new lo),i;default:throw Error(l(435,e.tag))}}function Ze(e,i){var u=Bm(e);i.forEach(function(f){if(!u.has(f)){u.add(f);var y=Z2.bind(null,e,f);f.then(y,y)}})}function Gn(e,i){var u=i.deletions;if(u!==null)for(var f=0;f<u.length;f++){var y=u[f],_=e,A=i,D=A;t:for(;D!==null;){switch(D.tag){case 27:if(Wr(D.type)){re=D.stateNode,an=!1;break t}break;case 5:re=D.stateNode,an=!1;break t;case 3:case 4:re=D.stateNode.containerInfo,an=!0;break t}D=D.return}if(re===null)throw Error(l(160));cs(_,A,y),re=null,an=!1,_=y.alternate,_!==null&&(_.return=null),y.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)fs(i,e),i=i.sibling}var ca=null;function fs(e,i){var u=e.alternate,f=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Gn(i,e),Xe(e),f&4&&(Ja(3,e,e.return),Li(3,e),Ja(5,e,e.return));break;case 1:Gn(i,e),Xe(e),f&512&&(Be||u===null||Da(u,u.return)),f&64&&Wa&&(e=e.updateQueue,e!==null&&(f=e.callbacks,f!==null&&(u=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=u===null?f:u.concat(f))));break;case 26:var y=ca;if(Gn(i,e),Xe(e),f&512&&(Be||u===null||Da(u,u.return)),f&4){var _=u!==null?u.memoizedState:null;if(f=e.memoizedState,u===null)if(f===null)if(e.stateNode===null){t:{f=e.type,u=e.memoizedProps,y=y.ownerDocument||y;e:switch(f){case"title":_=y.getElementsByTagName("title")[0],(!_||_[Es]||_[Pt]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=y.createElement(f),y.head.insertBefore(_,y.querySelector("head > title"))),Pn(_,f,u),_[Pt]=e,tn(_),f=_;break t;case"link":var A=av("link","href",y).get(f+(u.href||""));if(A){for(var D=0;D<A.length;D++)if(_=A[D],_.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&_.getAttribute("rel")===(u.rel==null?null:u.rel)&&_.getAttribute("title")===(u.title==null?null:u.title)&&_.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){A.splice(D,1);break e}}_=y.createElement(f),Pn(_,f,u),y.head.appendChild(_);break;case"meta":if(A=av("meta","content",y).get(f+(u.content||""))){for(D=0;D<A.length;D++)if(_=A[D],_.getAttribute("content")===(u.content==null?null:""+u.content)&&_.getAttribute("name")===(u.name==null?null:u.name)&&_.getAttribute("property")===(u.property==null?null:u.property)&&_.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&_.getAttribute("charset")===(u.charSet==null?null:u.charSet)){A.splice(D,1);break e}}_=y.createElement(f),Pn(_,f,u),y.head.appendChild(_);break;default:throw Error(l(468,f))}_[Pt]=e,tn(_),f=_}e.stateNode=f}else iv(y,e.type,e.stateNode);else e.stateNode=nv(y,f,e.memoizedProps);else _!==f?(_===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):_.count--,f===null?iv(y,e.type,e.stateNode):nv(y,f,e.memoizedProps)):f===null&&e.stateNode!==null&&Fa(e,e.memoizedProps,u.memoizedProps)}break;case 27:Gn(i,e),Xe(e),f&512&&(Be||u===null||Da(u,u.return)),u!==null&&f&4&&Fa(e,e.memoizedProps,u.memoizedProps);break;case 5:if(Gn(i,e),Xe(e),f&512&&(Be||u===null||Da(u,u.return)),e.flags&32){y=e.stateNode;try{As(y,"")}catch(Ct){Ee(e,e.return,Ct)}}f&4&&e.stateNode!=null&&(y=e.memoizedProps,Fa(e,y,u!==null?u.memoizedProps:y)),f&1024&&(xl=!0);break;case 6:if(Gn(i,e),Xe(e),f&4){if(e.stateNode===null)throw Error(l(162));f=e.memoizedProps,u=e.stateNode;try{u.nodeValue=f}catch(Ct){Ee(e,e.return,Ct)}}break;case 3:if(Vm=null,y=ca,ca=Lm(i.containerInfo),Gn(i,e),ca=y,Xe(e),f&4&&u!==null&&u.memoizedState.isDehydrated)try{Yc(i.containerInfo)}catch(Ct){Ee(e,e.return,Ct)}xl&&(xl=!1,Um(e));break;case 4:f=ca,ca=Lm(e.stateNode.containerInfo),Gn(i,e),Xe(e),ca=f;break;case 12:Gn(i,e),Xe(e);break;case 31:Gn(i,e),Xe(e),f&4&&(f=e.updateQueue,f!==null&&(e.updateQueue=null,Ze(e,f)));break;case 13:Gn(i,e),Xe(e),e.child.flags&8192&&e.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Tl=na()),f&4&&(f=e.updateQueue,f!==null&&(e.updateQueue=null,Ze(e,f)));break;case 22:y=e.memoizedState!==null;var X=u!==null&&u.memoizedState!==null,at=Wa,ft=Be;if(Wa=at||y,Be=ft||X,Gn(i,e),Be=ft,Wa=at,Xe(e),f&8192)t:for(i=e.stateNode,i._visibility=y?i._visibility&-2:i._visibility|1,y&&(u===null||X||Wa||Be||Zs(e)),u=null,i=e;;){if(i.tag===5||i.tag===26){if(u===null){X=u=i;try{if(_=X.stateNode,y)A=_.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none";else{D=X.stateNode;var yt=X.memoizedProps.style,lt=yt!=null&&yt.hasOwnProperty("display")?yt.display:null;D.style.display=lt==null||typeof lt=="boolean"?"":(""+lt).trim()}}catch(Ct){Ee(X,X.return,Ct)}}}else if(i.tag===6){if(u===null){X=i;try{X.stateNode.nodeValue=y?"":X.memoizedProps}catch(Ct){Ee(X,X.return,Ct)}}}else if(i.tag===18){if(u===null){X=i;try{var ut=X.stateNode;y?Zg(ut,!0):Zg(X.stateNode,!1)}catch(Ct){Ee(X,X.return,Ct)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===e)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break t;for(;i.sibling===null;){if(i.return===null||i.return===e)break t;u===i&&(u=null),i=i.return}u===i&&(u=null),i.sibling.return=i.return,i=i.sibling}f&4&&(f=e.updateQueue,f!==null&&(u=f.retryQueue,u!==null&&(f.retryQueue=null,Ze(e,u))));break;case 19:Gn(i,e),Xe(e),f&4&&(f=e.updateQueue,f!==null&&(e.updateQueue=null,Ze(e,f)));break;case 30:break;case 21:break;default:Gn(i,e),Xe(e)}}function Xe(e){var i=e.flags;if(i&2){try{for(var u,f=e.return;f!==null;){if(nn(f)){u=f;break}f=f.return}if(u==null)throw Error(l(160));switch(u.tag){case 27:var y=u.stateNode,_=Vi(e);he(e,_,y);break;case 5:var A=u.stateNode;u.flags&32&&(As(A,""),u.flags&=-33);var D=Vi(e);he(e,D,A);break;case 3:case 4:var X=u.stateNode.containerInfo,at=Vi(e);kt(e,at,X);break;default:throw Error(l(161))}}catch(ft){Ee(e,e.return,ft)}e.flags&=-3}i&4096&&(e.flags&=-4097)}function Um(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var i=e;Um(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),e=e.sibling}}function _l(e,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Nm(e,i.alternate,i),i=i.sibling}function Zs(e){for(e=e.child;e!==null;){var i=e;switch(i.tag){case 0:case 11:case 14:case 15:Ja(4,i,i.return),Zs(i);break;case 1:Da(i,i.return);var u=i.stateNode;typeof u.componentWillUnmount=="function"&&Dh(i,i.return,u),Zs(i);break;case 27:Hh(i.stateNode);case 26:case 5:Da(i,i.return),Zs(i);break;case 22:i.memoizedState===null&&Zs(i);break;case 30:Zs(i);break;default:Zs(i)}e=e.sibling}}function me(e,i,u){for(u=u&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var f=i.alternate,y=e,_=i,A=_.flags;switch(_.tag){case 0:case 11:case 15:me(y,_,u),Li(4,_);break;case 1:if(me(y,_,u),f=_,y=f.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(at){Ee(f,f.return,at)}if(f=_,y=f.updateQueue,y!==null){var D=f.stateNode;try{var X=y.shared.hiddenCallbacks;if(X!==null)for(y.shared.hiddenCallbacks=null,y=0;y<X.length;y++)ji(X[y],D)}catch(at){Ee(f,f.return,at)}}u&&A&64&&os(_),Xi(_,_.return);break;case 27:Ke(_);case 26:case 5:me(y,_,u),u&&f===null&&A&4&&Oa(_),Xi(_,_.return);break;case 12:me(y,_,u);break;case 31:me(y,_,u),u&&A&4&&Rc(y,_);break;case 13:me(y,_,u),u&&A&4&&Oh(y,_);break;case 22:_.memoizedState===null&&me(y,_,u),Xi(_,_.return);break;case 30:break;default:me(y,_,u)}i=i.sibling}}function zc(e,i){var u=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(u=e.memoizedState.cachePool.pool),e=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(e=i.memoizedState.cachePool.pool),e!==u&&(e!=null&&e.refCount++,u!=null&&Tn(u))}function Sl(e,i){e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&Tn(e))}function hn(e,i,u,f){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)He(e,i,u,f),i=i.sibling}function He(e,i,u,f){var y=i.flags;switch(i.tag){case 0:case 11:case 15:hn(e,i,u,f),y&2048&&Li(9,i);break;case 1:hn(e,i,u,f);break;case 3:hn(e,i,u,f),y&2048&&(e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&Tn(e)));break;case 12:if(y&2048){hn(e,i,u,f),e=i.stateNode;try{var _=i.memoizedProps,A=_.id,D=_.onPostCommit;typeof D=="function"&&D(A,i.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(X){Ee(i,i.return,X)}}else hn(e,i,u,f);break;case 31:hn(e,i,u,f);break;case 13:hn(e,i,u,f);break;case 23:break;case 22:_=i.stateNode,A=i.alternate,i.memoizedState!==null?_._visibility&2?hn(e,i,u,f):Kr(e,i):_._visibility&2?hn(e,i,u,f):(_._visibility|=2,hs(e,i,u,f,(i.subtreeFlags&10256)!==0||!1)),y&2048&&zc(A,i);break;case 24:hn(e,i,u,f),y&2048&&Sl(i.alternate,i);break;default:hn(e,i,u,f)}}function hs(e,i,u,f,y){for(y=y&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var _=e,A=i,D=u,X=f,at=A.flags;switch(A.tag){case 0:case 11:case 15:hs(_,A,D,X,y),Li(8,A);break;case 23:break;case 22:var ft=A.stateNode;A.memoizedState!==null?ft._visibility&2?hs(_,A,D,X,y):Kr(_,A):(ft._visibility|=2,hs(_,A,D,X,y)),y&&at&2048&&zc(A.alternate,A);break;case 24:hs(_,A,D,X,y),y&&at&2048&&Sl(A.alternate,A);break;default:hs(_,A,D,X,y)}i=i.sibling}}function Kr(e,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var u=e,f=i,y=f.flags;switch(f.tag){case 22:Kr(u,f),y&2048&&zc(f.alternate,f);break;case 24:Kr(u,f),y&2048&&Sl(f.alternate,f);break;default:Kr(u,f)}i=i.sibling}}var Ve=8192;function Js(e,i,u){if(e.subtreeFlags&Ve)for(e=e.child;e!==null;)Je(e,i,u),e=e.sibling}function Je(e,i,u){switch(e.tag){case 26:Js(e,i,u),e.flags&Ve&&e.memoizedState!==null&&ES(u,ca,e.memoizedState,e.memoizedProps);break;case 5:Js(e,i,u);break;case 3:case 4:var f=ca;ca=Lm(e.stateNode.containerInfo),Js(e,i,u),ca=f;break;case 22:e.memoizedState===null&&(f=e.alternate,f!==null&&f.memoizedState!==null?(f=Ve,Ve=16777216,Js(e,i,u),Ve=f):Js(e,i,u));break;default:Js(e,i,u)}}function fa(e){var i=e.alternate;if(i!==null&&(e=i.child,e!==null)){i.child=null;do i=e.sibling,e.sibling=null,e=i;while(e!==null)}}function Fn(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var u=0;u<i.length;u++){var f=i[u];Le=f,so(f,e)}fa(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fs(e),e=e.sibling}function Fs(e){switch(e.tag){case 0:case 11:case 15:Fn(e),e.flags&2048&&Ja(9,e,e.return);break;case 3:Fn(e);break;case 12:Fn(e);break;case 22:var i=e.stateNode;e.memoizedState!==null&&i._visibility&2&&(e.return===null||e.return.tag!==13)?(i._visibility&=-3,wc(e)):Fn(e);break;default:Fn(e)}}function wc(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var u=0;u<i.length;u++){var f=i[u];Le=f,so(f,e)}fa(e)}for(e=e.child;e!==null;){switch(i=e,i.tag){case 0:case 11:case 15:Ja(8,i,i.return),wc(i);break;case 22:u=i.stateNode,u._visibility&2&&(u._visibility&=-3,wc(i));break;default:wc(i)}e=e.sibling}}function so(e,i){for(;Le!==null;){var u=Le;switch(u.tag){case 0:case 11:case 15:Ja(8,u,i);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var f=u.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:Tn(u.memoizedState.cache)}if(f=u.child,f!==null)f.return=u,Le=f;else t:for(u=e;Le!==null;){f=Le;var y=f.sibling,_=f.return;if(Mc(f),f===u){Le=null;break t}if(y!==null){y.return=_,Le=y;break t}Le=_}}}var Dc={getCacheForType:function(e){var i=xn(zt),u=i.data.get(e);return u===void 0&&(u=e(),i.data.set(e,u)),u},cacheSignal:function(){return xn(zt).controller.signal}},Oc=typeof WeakMap=="function"?WeakMap:Map,ne=0,pe=null,Qt=null,$t=0,wt=0,Ft=null,Xt=!1,Kt=!1,be=!1,Fe=0,ye=0,Na=0,bl=0,pi=0,ae=0,Ba=0,yi=null,Yn=null,ha=!1,Tl=0,Zr=0,Ua=1/0,Jr=null,ki=null,je=0,gi=null,Ha=null,Pa=0,El=0,Ws=null,Nc=null,Ps=0,Is=null;function Wn(){return(ne&2)!==0&&$t!==0?$t&-$t:j.T!==null?u0():tl()}function s(){if(ae===0)if(($t&536870912)===0||te){var e=Ts;Ts<<=1,(Ts&3932160)===0&&(Ts=262144),ae=e}else ae=536870912;return e=fn.current,e!==null&&(e.flags|=32),ae}function r(e,i,u){(e===pe&&(wt===2||wt===9)||e.cancelPendingCommit!==null)&&(I(e,0),T(e,$t,ae,!1)),pr(e,u),((ne&2)===0||e!==pe)&&(e===pe&&((ne&2)===0&&(bl|=u),ye===4&&T(e,$t,ae,!1)),ds(e))}function h(e,i,u){if((ne&6)!==0)throw Error(l(327));var f=!u&&(i&127)===0&&(i&e.expiredLanes)===0||hr(e,i),y=f?$s(e,i):da(e,i,!0),_=f;do{if(y===0){Kt&&!f&&T(e,i,0,!1);break}else{if(u=e.current.alternate,_&&!S(u)){y=da(e,i,!1),_=!1;continue}if(y===2){if(_=i,e.errorRecoveryDisabledLanes&_)var A=0;else A=e.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){i=A;t:{var D=e;y=yi;var X=D.current.memoizedState.isDehydrated;if(X&&(I(D,A).flags|=256),A=da(D,A,!1),A!==2){if(be&&!X){D.errorRecoveryDisabledLanes|=_,bl|=_,y=4;break t}_=Yn,Yn=y,_!==null&&(Yn===null?Yn=_:Yn.push.apply(Yn,_))}y=A}if(_=!1,y!==2)continue}}if(y===1){I(e,0),T(e,i,0,!0);break}t:{switch(f=e,_=y,_){case 0:case 1:throw Error(l(345));case 4:if((i&4194048)!==i)break;case 6:T(f,i,ae,!Xt);break t;case 2:Yn=null;break;case 3:case 5:break;default:throw Error(l(329))}if((i&62914560)===i&&(y=Tl+300-na(),10<y)){if(T(f,i,ae,!Xt),hu(f,0,!0)!==0)break t;Pa=i,f.timeoutHandle=kg(v.bind(null,f,u,Yn,Jr,ha,i,ae,bl,Ba,Xt,_,"Throttled",-0,0),y);break t}v(f,u,Yn,Jr,ha,i,ae,bl,Ba,Xt,_,null,-0,0)}}break}while(!0);ds(e)}function v(e,i,u,f,y,_,A,D,X,at,ft,yt,lt,ut){if(e.timeoutHandle=-1,yt=i.subtreeFlags,yt&8192||(yt&16785408)===16785408){yt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ri},Je(i,_,yt);var Ct=(_&62914560)===_?Tl-na():(_&4194048)===_?Zr-na():0;if(Ct=CS(yt,Ct),Ct!==null){Pa=_,e.cancelPendingCommit=Ct(jt.bind(null,e,i,_,u,f,y,A,D,X,ft,yt,null,lt,ut)),T(e,_,A,!at);return}}jt(e,i,_,u,f,y,A,D,X)}function S(e){for(var i=e;;){var u=i.tag;if((u===0||u===11||u===15)&&i.flags&16384&&(u=i.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var f=0;f<u.length;f++){var y=u[f],_=y.getSnapshot;y=y.value;try{if(!Oe(_(),y))return!1}catch{return!1}}if(u=i.child,i.subtreeFlags&16384&&u!==null)u.return=i,i=u;else{if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function T(e,i,u,f){i&=~pi,i&=~bl,e.suspendedLanes|=i,e.pingedLanes&=~i,f&&(e.warmLanes|=i),f=e.expirationTimes;for(var y=i;0<y;){var _=31-Vn(y),A=1<<_;f[_]=-1,y&=~A}u!==0&&df(e,u,i)}function N(){return(ne&6)===0?(Nh(0),!1):!0}function L(){if(Qt!==null){if(wt===0)var e=Qt.return;else e=Qt,Bn=cl=null,oh(e),es=null,ns=0,e=Qt;for(;e!==null;)Ks(e.alternate,e),e=e.return;Qt=null}}function I(e,i){var u=e.timeoutHandle;u!==-1&&(e.timeoutHandle=-1,rS(u)),u=e.cancelPendingCommit,u!==null&&(e.cancelPendingCommit=null,u()),Pa=0,L(),pe=e,Qt=u=Di(e.current,null),$t=i,wt=0,Ft=null,Xt=!1,Kt=hr(e,i),be=!1,Ba=ae=pi=bl=Na=ye=0,Yn=yi=null,ha=!1,(i&8)!==0&&(i|=i&32);var f=e.entangledLanes;if(f!==0)for(e=e.entanglements,f&=i;0<f;){var y=31-Vn(f),_=1<<y;i|=e[y],f&=~_}return Fe=i,Jl(),u}function ht(e,i){Ht=null,j.H=Ju,i===ts||i===fi?(i=rc(),wt=3):i===Gu?(i=rc(),wt=4):wt=i===Ec?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Ft=i,Qt===null&&(ye=1,Tc(e,ia(i,e.current)))}function _t(){var e=fn.current;return e===null?!0:($t&4194048)===$t?Qa===null:($t&62914560)===$t||($t&536870912)!==0?e===Qa:!1}function Tt(){var e=j.H;return j.H=Ju,e===null?Ju:e}function Et(){var e=j.A;return j.A=Dc,e}function qt(){ye=4,Xt||($t&4194048)!==$t&&fn.current!==null||(Kt=!0),(Na&134217727)===0&&(bl&134217727)===0||pe===null||T(pe,$t,ae,!1)}function da(e,i,u){var f=ne;ne|=2;var y=Tt(),_=Et();(pe!==e||$t!==i)&&(Jr=null,I(e,i)),i=!1;var A=ye;t:do try{if(wt!==0&&Qt!==null){var D=Qt,X=Ft;switch(wt){case 8:L(),A=6;break t;case 3:case 2:case 9:case 6:fn.current===null&&(i=!0);var at=wt;if(wt=0,Ft=null,xt(e,D,X,at),u&&Kt){A=0;break t}break;default:at=wt,wt=0,Ft=null,xt(e,D,X,at)}}ro(),A=ye;break}catch(ft){ht(e,ft)}while(!0);return i&&e.shellSuspendCounter++,Bn=cl=null,ne=f,j.H=y,j.A=_,Qt===null&&(pe=null,$t=0,Jl()),A}function ro(){for(;Qt!==null;)W(Qt)}function $s(e,i){var u=ne;ne|=2;var f=Tt(),y=Et();pe!==e||$t!==i?(Jr=null,Ua=na()+500,I(e,i)):Kt=hr(e,i);t:do try{if(wt!==0&&Qt!==null){i=Qt;var _=Ft;e:switch(wt){case 1:wt=0,Ft=null,xt(e,i,_,1);break;case 2:case 9:if(sm(_)){wt=0,Ft=null,st(i);break}i=function(){wt!==2&&wt!==9||pe!==e||(wt=7),ds(e)},_.then(i,i);break t;case 3:wt=7;break t;case 4:wt=5;break t;case 7:sm(_)?(wt=0,Ft=null,st(i)):(wt=0,Ft=null,xt(e,i,_,7));break;case 5:var A=null;switch(Qt.tag){case 26:A=Qt.memoizedState;case 5:case 27:var D=Qt;if(A?lv(A):D.stateNode.complete){wt=0,Ft=null;var X=D.sibling;if(X!==null)Qt=X;else{var at=D.return;at!==null?(Qt=at,Rt(at)):Qt=null}break e}}wt=0,Ft=null,xt(e,i,_,5);break;case 6:wt=0,Ft=null,xt(e,i,_,6);break;case 8:L(),ye=6;break t;default:throw Error(l(462))}}it();break}catch(ft){ht(e,ft)}while(!0);return Bn=cl=null,j.H=f,j.A=y,ne=u,Qt!==null?0:(pe=null,$t=0,Jl(),ye)}function it(){for(;Qt!==null&&!Fp();)W(Qt)}function W(e){var i=Cc(e.alternate,e,Fe);e.memoizedProps=e.pendingProps,i===null?Rt(e):Qt=i}function st(e){var i=e,u=i.alternate;switch(i.tag){case 15:case 0:i=Hn(u,i,i.pendingProps,i.type,void 0,$t);break;case 11:i=Hn(u,i,i.pendingProps,i.type.render,i.ref,$t);break;case 5:oh(i);default:Ks(u,i),i=Qt=Nn(i,Fe),i=Cc(u,i,Fe)}e.memoizedProps=e.pendingProps,i===null?Rt(e):Qt=i}function xt(e,i,u,f){Bn=cl=null,oh(i),es=null,ns=0;var y=i.return;try{if(Aa(e,y,i,u,$t)){ye=1,Tc(e,ia(u,e.current)),Qt=null;return}}catch(_){if(y!==null)throw Qt=y,_;ye=1,Tc(e,ia(u,e.current)),Qt=null;return}i.flags&32768?(te||f===1?e=!0:Kt||($t&536870912)!==0?e=!1:(Xt=e=!0,(f===2||f===9||f===3||f===6)&&(f=fn.current,f!==null&&f.tag===13&&(f.flags|=16384))),Ae(i,e)):Rt(i)}function Rt(e){var i=e;do{if((i.flags&32768)!==0){Ae(i,Xt);return}e=i.return;var u=wh(i.alternate,i,Fe);if(u!==null){Qt=u;return}if(i=i.sibling,i!==null){Qt=i;return}Qt=i=e}while(i!==null);ye===0&&(ye=5)}function Ae(e,i){do{var u=Ac(e.alternate,e);if(u!==null){u.flags&=32767,Qt=u;return}if(u=e.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!i&&(e=e.sibling,e!==null)){Qt=e;return}Qt=e=u}while(e!==null);ye=6,Qt=null}function jt(e,i,u,f,y,_,A,D,X){e.cancelPendingCommit=null;do Bc();while(je!==0);if((ne&6)!==0)throw Error(l(327));if(i!==null){if(i===e.current)throw Error(l(177));if(_=i.lanes|i.childLanes,_|=$o,Rd(e,u,_,A,D,X),e===pe&&(Qt=pe=null,$t=0),Ha=i,gi=e,Pa=u,El=_,Ws=y,Nc=f,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,J2(Eo,function(){return Mg(),null})):(e.callbackNode=null,e.callbackPriority=0),f=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||f){f=j.T,j.T=null,y=Q.p,Q.p=2,A=ne,ne|=4;try{Qr(e,i,u)}finally{ne=A,Q.p=y,j.T=f}}je=1,ue(),dn(),oe()}}function ue(){if(je===1){je=0;var e=gi,i=Ha,u=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||u){u=j.T,j.T=null;var f=Q.p;Q.p=2;var y=ne;ne|=4;try{fs(i,e);var _=y0,A=Jo(e.containerInfo),D=_.focusedElem,X=_.selectionRange;if(A!==D&&D&&D.ownerDocument&&Zo(D.ownerDocument.documentElement,D)){if(X!==null&&Er(D)){var at=X.start,ft=X.end;if(ft===void 0&&(ft=at),"selectionStart"in D)D.selectionStart=at,D.selectionEnd=Math.min(ft,D.value.length);else{var yt=D.ownerDocument||document,lt=yt&&yt.defaultView||window;if(lt.getSelection){var ut=lt.getSelection(),Ct=D.textContent.length,Ut=Math.min(X.start,Ct),Re=X.end===void 0?Ut:Math.min(X.end,Ct);!ut.extend&&Ut>Re&&(A=Re,Re=Ut,Ut=A);var P=Gf(D,Ut),K=Gf(D,Re);if(P&&K&&(ut.rangeCount!==1||ut.anchorNode!==P.node||ut.anchorOffset!==P.offset||ut.focusNode!==K.node||ut.focusOffset!==K.offset)){var nt=yt.createRange();nt.setStart(P.node,P.offset),ut.removeAllRanges(),Ut>Re?(ut.addRange(nt),ut.extend(K.node,K.offset)):(nt.setEnd(K.node,K.offset),ut.addRange(nt))}}}}for(yt=[],ut=D;ut=ut.parentNode;)ut.nodeType===1&&yt.push({element:ut,left:ut.scrollLeft,top:ut.scrollTop});for(typeof D.focus=="function"&&D.focus(),D=0;D<yt.length;D++){var mt=yt[D];mt.element.scrollLeft=mt.left,mt.element.scrollTop=mt.top}}Zm=!!p0,y0=p0=null}finally{ne=y,Q.p=f,j.T=u}}e.current=i,je=2}}function dn(){if(je===2){je=0;var e=gi,i=Ha,u=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||u){u=j.T,j.T=null;var f=Q.p;Q.p=2;var y=ne;ne|=4;try{Nm(e,i.alternate,i)}finally{ne=y,Q.p=f,j.T=u}}je=3}}function oe(){if(je===4||je===3){je=0,bd();var e=gi,i=Ha,u=Pa,f=Nc;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?je=5:(je=0,Ha=gi=null,Cl(e,e.pendingLanes));var y=e.pendingLanes;if(y===0&&(ki=null),Ro(u),i=i.stateNode,$e&&typeof $e.onCommitFiberRoot=="function")try{$e.onCommitFiberRoot(Xa,i,void 0,(i.current.flags&128)===128)}catch{}if(f!==null){i=j.T,y=Q.p,Q.p=2,j.T=null;try{for(var _=e.onRecoverableError,A=0;A<f.length;A++){var D=f[A];_(D.value,{componentStack:D.stack})}}finally{j.T=i,Q.p=y}}(Pa&3)!==0&&Bc(),ds(e),y=e.pendingLanes,(u&261930)!==0&&(y&42)!==0?e===Is?Ps++:(Ps=0,Is=e):Ps=0,Nh(0)}}function Cl(e,i){(e.pooledCacheLanes&=i)===0&&(i=e.pooledCache,i!=null&&(e.pooledCache=null,Tn(i)))}function Bc(){return ue(),dn(),oe(),Mg()}function Mg(){if(je!==5)return!1;var e=gi,i=El;El=0;var u=Ro(Pa),f=j.T,y=Q.p;try{Q.p=32>u?32:u,j.T=null,u=Ws,Ws=null;var _=gi,A=Pa;if(je=0,Ha=gi=null,Pa=0,(ne&6)!==0)throw Error(l(331));var D=ne;if(ne|=4,Fs(_.current),He(_,_.current,A,u),ne=D,Nh(0,!1),$e&&typeof $e.onPostCommitFiberRoot=="function")try{$e.onPostCommitFiberRoot(Xa,_)}catch{}return!0}finally{Q.p=y,j.T=f,Cl(e,i)}}function Rg(e,i,u){i=ia(u,i),i=zh(e.stateNode,i,2),e=ml(e,i,2),e!==null&&(pr(e,2),ds(e))}function Ee(e,i,u){if(e.tag===3)Rg(e,e,u);else for(;i!==null;){if(i.tag===3){Rg(i,e,u);break}else if(i.tag===1){var f=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(ki===null||!ki.has(f))){e=ia(u,e),u=qr(2),f=ml(i,u,2),f!==null&&(ua(u,f,i,e),pr(f,2),ds(f));break}}i=i.return}}function l0(e,i,u){var f=e.pingCache;if(f===null){f=e.pingCache=new Oc;var y=new Set;f.set(i,y)}else y=f.get(i),y===void 0&&(y=new Set,f.set(i,y));y.has(u)||(be=!0,y.add(u),e=Q2.bind(null,e,i,u),i.then(e,e))}function Q2(e,i,u){var f=e.pingCache;f!==null&&f.delete(i),e.pingedLanes|=e.suspendedLanes&u,e.warmLanes&=~u,pe===e&&($t&u)===u&&(ye===4||ye===3&&($t&62914560)===$t&&300>na()-Tl?(ne&2)===0&&I(e,0):pi|=u,Ba===$t&&(Ba=0)),ds(e)}function zg(e,i){i===0&&(i=dr()),e=Fl(e,i),e!==null&&(pr(e,i),ds(e))}function K2(e){var i=e.memoizedState,u=0;i!==null&&(u=i.retryLane),zg(e,u)}function Z2(e,i){var u=0;switch(e.tag){case 31:case 13:var f=e.stateNode,y=e.memoizedState;y!==null&&(u=y.retryLane);break;case 19:f=e.stateNode;break;case 22:f=e.stateNode._retryCache;break;default:throw Error(l(314))}f!==null&&f.delete(i),zg(e,u)}function J2(e,i){return La(e,i)}var Hm=null,Uc=null,s0=!1,jm=!1,r0=!1,Fr=0;function ds(e){e!==Uc&&e.next===null&&(Uc===null?Hm=Uc=e:Uc=Uc.next=e),jm=!0,s0||(s0=!0,W2())}function Nh(e,i){if(!r0&&jm){r0=!0;do for(var u=!1,f=Hm;f!==null;){if(e!==0){var y=f.pendingLanes;if(y===0)var _=0;else{var A=f.suspendedLanes,D=f.pingedLanes;_=(1<<31-Vn(42|e)+1)-1,_&=y&~(A&~D),_=_&201326741?_&201326741|1:_?_|2:0}_!==0&&(u=!0,Ng(f,_))}else _=$t,_=hu(f,f===pe?_:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(_&3)===0||hr(f,_)||(u=!0,Ng(f,_));f=f.next}while(u);r0=!1}}function F2(){wg()}function wg(){jm=s0=!1;var e=0;Fr!==0&&sS()&&(e=Fr);for(var i=na(),u=null,f=Hm;f!==null;){var y=f.next,_=Dg(f,i);_===0?(f.next=null,u===null?Hm=y:u.next=y,y===null&&(Uc=u)):(u=f,(e!==0||(_&3)!==0)&&(jm=!0)),f=y}je!==0&&je!==5||Nh(e),Fr!==0&&(Fr=0)}function Dg(e,i){for(var u=e.suspendedLanes,f=e.pingedLanes,y=e.expirationTimes,_=e.pendingLanes&-62914561;0<_;){var A=31-Vn(_),D=1<<A,X=y[A];X===-1?((D&u)===0||(D&f)!==0)&&(y[A]=Co(D,i)):X<=i&&(e.expiredLanes|=D),_&=~D}if(i=pe,u=$t,u=hu(e,e===i?u:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),f=e.callbackNode,u===0||e===i&&(wt===2||wt===9)||e.cancelPendingCommit!==null)return f!==null&&f!==null&&Nl(f),e.callbackNode=null,e.callbackPriority=0;if((u&3)===0||hr(e,u)){if(i=u&-u,i===e.callbackPriority)return i;switch(f!==null&&Nl(f),Ro(u)){case 2:case 8:u=To;break;case 32:u=Eo;break;case 268435456:u=Ad;break;default:u=Eo}return f=Og.bind(null,e),u=La(u,f),e.callbackPriority=i,e.callbackNode=u,i}return f!==null&&f!==null&&Nl(f),e.callbackPriority=2,e.callbackNode=null,2}function Og(e,i){if(je!==0&&je!==5)return e.callbackNode=null,e.callbackPriority=0,null;var u=e.callbackNode;if(Bc()&&e.callbackNode!==u)return null;var f=$t;return f=hu(e,e===pe?f:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),f===0?null:(h(e,f,i),Dg(e,na()),e.callbackNode!=null&&e.callbackNode===u?Og.bind(null,e):null)}function Ng(e,i){if(Bc())return null;h(e,i,!0)}function W2(){uS(function(){(ne&6)!==0?La(Ed,F2):wg()})}function u0(){if(Fr===0){var e=dl;e===0&&(e=cu,cu<<=1,(cu&261888)===0&&(cu=256)),Fr=e}return Fr}function Bg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:xu(""+e)}function Ug(e,i){var u=i.ownerDocument.createElement("input");return u.name=i.name,u.value=i.value,e.id&&u.setAttribute("form",e.id),i.parentNode.insertBefore(u,i),e=new FormData(e),u.parentNode.removeChild(u),e}function P2(e,i,u,f,y){if(i==="submit"&&u&&u.stateNode===y){var _=Bg((y[wn]||null).action),A=f.submitter;A&&(i=(i=A[wn]||null)?Bg(i.formAction):A.getAttribute("formAction"),i!==null&&(_=i,A=null));var D=new Tu("action","action",null,f,y);e.push({event:D,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(Fr!==0){var X=A?Ug(y,A):new FormData(y);Eh(u,{pending:!0,data:X,method:y.method,action:_},null,X)}}else typeof _=="function"&&(D.preventDefault(),X=A?Ug(y,A):new FormData(y),Eh(u,{pending:!0,data:X,method:y.method,action:_},_,X))},currentTarget:y}]})}}for(var o0=0;o0<Io.length;o0++){var c0=Io[o0],I2=c0.toLowerCase(),$2=c0[0].toUpperCase()+c0.slice(1);On(I2,"on"+$2)}On(aa,"onAnimationEnd"),On(Yf,"onAnimationIteration"),On(wi,"onAnimationStart"),On("dblclick","onDoubleClick"),On("focusin","onFocus"),On("focusout","onBlur"),On(Rr,"onTransitionRun"),On(Kl,"onTransitionStart"),On(qf,"onTransitionCancel"),On(Po,"onTransitionEnd"),Ul("onMouseEnter",["mouseout","mouseover"]),Ul("onMouseLeave",["mouseout","mouseover"]),Ul("onPointerEnter",["pointerout","pointerover"]),Ul("onPointerLeave",["pointerout","pointerover"]),al("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),al("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),al("onBeforeInput",["compositionend","keypress","textInput","paste"]),al("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),al("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),al("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Bh="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(" "),tS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Bh));function Hg(e,i){i=(i&4)!==0;for(var u=0;u<e.length;u++){var f=e[u],y=f.event;f=f.listeners;t:{var _=void 0;if(i)for(var A=f.length-1;0<=A;A--){var D=f[A],X=D.instance,at=D.currentTarget;if(D=D.listener,X!==_&&y.isPropagationStopped())break t;_=D,y.currentTarget=at;try{_(y)}catch(ft){Zl(ft)}y.currentTarget=null,_=X}else for(A=0;A<f.length;A++){if(D=f[A],X=D.instance,at=D.currentTarget,D=D.listener,X!==_&&y.isPropagationStopped())break t;_=D,y.currentTarget=at;try{_(y)}catch(ft){Zl(ft)}y.currentTarget=null,_=X}}}}function ee(e,i){var u=i[zo];u===void 0&&(u=i[zo]=new Set);var f=e+"__bubble";u.has(f)||(jg(i,e,2,!1),u.add(f))}function f0(e,i,u){var f=0;i&&(f|=4),jg(u,e,f,i)}var Gm="_reactListening"+Math.random().toString(36).slice(2);function h0(e){if(!e[Gm]){e[Gm]=!0,Mi.forEach(function(u){u!=="selectionchange"&&(tS.has(u)||f0(u,!1,e),f0(u,!0,e))});var i=e.nodeType===9?e:e.ownerDocument;i===null||i[Gm]||(i[Gm]=!0,f0("selectionchange",!1,i))}}function jg(e,i,u,f){switch(hv(i)){case 2:var y=RS;break;case 8:y=zS;break;default:y=M0}u=y.bind(null,i,u,e),y=void 0,!jo||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(y=!0),f?y!==void 0?e.addEventListener(i,u,{capture:!0,passive:y}):e.addEventListener(i,u,!0):y!==void 0?e.addEventListener(i,u,{passive:y}):e.addEventListener(i,u,!1)}function d0(e,i,u,f,y){var _=f;if((i&1)===0&&(i&2)===0&&f!==null)t:for(;;){if(f===null)return;var A=f.tag;if(A===3||A===4){var D=f.stateNode.containerInfo;if(D===y)break;if(A===4)for(A=f.return;A!==null;){var X=A.tag;if((X===3||X===4)&&A.stateNode.containerInfo===y)return;A=A.return}for(;D!==null;){if(A=cn(D),A===null)return;if(X=A.tag,X===5||X===6||X===26||X===27){f=_=A;continue t}D=D.parentNode}}f=f.return}Sf(function(){var at=_,ft=Uo(u),yt=[];t:{var lt=sl.get(e);if(lt!==void 0){var ut=Tu,Ct=e;switch(e){case"keypress":if(zs(u)===0)break t;case"keydown":case"keyup":ut=Rf;break;case"focusin":Ct="focus",ut=Xo;break;case"focusout":Ct="blur",ut=Xo;break;case"beforeblur":case"afterblur":ut=Xo;break;case"click":if(u.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ut=jd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ut=Gd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ut=il;break;case aa:case Yf:case wi:ut=Ld;break;case Po:ut=Pp;break;case"scroll":case"scrollend":ut=qo;break;case"wheel":ut=ql;break;case"copy":case"cut":case"paste":ut=Tf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ut=Vo;break;case"toggle":case"beforetoggle":ut=wf}var Ut=(i&4)!==0,Re=!Ut&&(e==="scroll"||e==="scrollend"),P=Ut?lt!==null?lt+"Capture":null:lt;Ut=[];for(var K=at,nt;K!==null;){var mt=K;if(nt=mt.stateNode,mt=mt.tag,mt!==5&&mt!==26&&mt!==27||nt===null||P===null||(mt=Rs(K,P),mt!=null&&Ut.push(Uh(K,mt,nt))),Re)break;K=K.return}0<Ut.length&&(lt=new ut(lt,Ct,null,u,ft),yt.push({event:lt,listeners:Ut}))}}if((i&7)===0){t:{if(lt=e==="mouseover"||e==="pointerover",ut=e==="mouseout"||e==="pointerout",lt&&u!==_u&&(Ct=u.relatedTarget||u.fromElement)&&(cn(Ct)||Ct[Bl]))break t;if((ut||lt)&&(lt=ft.window===ft?ft:(lt=ft.ownerDocument)?lt.defaultView||lt.parentWindow:window,ut?(Ct=u.relatedTarget||u.toElement,ut=at,Ct=Ct?cn(Ct):null,Ct!==null&&(Re=c(Ct),Ut=Ct.tag,Ct!==Re||Ut!==5&&Ut!==27&&Ut!==6)&&(Ct=null)):(ut=null,Ct=at),ut!==Ct)){if(Ut=jd,mt="onMouseLeave",P="onMouseEnter",K="mouse",(e==="pointerout"||e==="pointerover")&&(Ut=Vo,mt="onPointerLeave",P="onPointerEnter",K="pointer"),Re=ut==null?lt:el(ut),nt=Ct==null?lt:el(Ct),lt=new Ut(mt,K+"leave",ut,u,ft),lt.target=Re,lt.relatedTarget=nt,mt=null,cn(ft)===at&&(Ut=new Ut(P,K+"enter",Ct,u,ft),Ut.target=nt,Ut.relatedTarget=Re,mt=Ut),Re=mt,ut&&Ct)e:{for(Ut=eS,P=ut,K=Ct,nt=0,mt=P;mt;mt=Ut(mt))nt++;mt=0;for(var Dt=K;Dt;Dt=Ut(Dt))mt++;for(;0<nt-mt;)P=Ut(P),nt--;for(;0<mt-nt;)K=Ut(K),mt--;for(;nt--;){if(P===K||K!==null&&P===K.alternate){Ut=P;break e}P=Ut(P),K=Ut(K)}Ut=null}else Ut=null;ut!==null&&Gg(yt,lt,ut,Ut,!1),Ct!==null&&Re!==null&&Gg(yt,Re,Ct,Ut,!0)}}t:{if(lt=at?el(at):window,ut=lt.nodeName&&lt.nodeName.toLowerCase(),ut==="select"||ut==="input"&&lt.type==="file")var ge=Uf;else if(Nf(lt))if(zu)ge=Id;else{ge=Vl;var Mt=wu}else ut=lt.nodeName,!ut||ut.toLowerCase()!=="input"||lt.type!=="checkbox"&&lt.type!=="radio"?at&&vu(at.elementType)&&(ge=Uf):ge=Pd;if(ge&&(ge=ge(e,at))){Ko(yt,ge,u,ft);break t}Mt&&Mt(e,lt,at),e==="focusout"&&at&&lt.type==="number"&&at.memoizedProps.value!=null&&No(lt,"number",lt.value)}switch(Mt=at?el(at):window,e){case"focusin":(Nf(Mt)||Mt.contentEditable==="true")&&(Cr=Mt,Fo=at,Ar=null);break;case"focusout":Ar=Fo=Cr=null;break;case"mousedown":Sa=!0;break;case"contextmenu":case"mouseup":case"dragend":Sa=!1,Wo(yt,u,ft);break;case"selectionchange":if($d)break;case"keydown":case"keyup":Wo(yt,u,ft)}var Zt;if(ws)t:{switch(e){case"compositionstart":var ie="onCompositionStart";break t;case"compositionend":ie="onCompositionEnd";break t;case"compositionupdate":ie="onCompositionUpdate";break t}ie=void 0}else Xl?ko(e,u)&&(ie="onCompositionEnd"):e==="keydown"&&u.keyCode===229&&(ie="onCompositionStart");ie&&(bn&&u.locale!=="ko"&&(Xl||ie!=="onCompositionStart"?ie==="onCompositionEnd"&&Xl&&(Zt=Yo()):(jl=ft,Go="value"in jl?jl.value:jl.textContent,Xl=!0)),Mt=Ym(at,ie),0<Mt.length&&(ie=new Ef(ie,e,null,u,ft),yt.push({event:ie,listeners:Mt}),Zt?ie.data=Zt:(Zt=xr(u),Zt!==null&&(ie.data=Zt)))),(Zt=Ds?Qo(e,u):Jd(e,u))&&(ie=Ym(at,"onBeforeInput"),0<ie.length&&(Mt=new Ef("onBeforeInput","beforeinput",null,u,ft),yt.push({event:Mt,listeners:ie}),Mt.data=Zt)),P2(yt,e,at,u,ft)}Hg(yt,i)})}function Uh(e,i,u){return{instance:e,listener:i,currentTarget:u}}function Ym(e,i){for(var u=i+"Capture",f=[];e!==null;){var y=e,_=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||_===null||(y=Rs(e,u),y!=null&&f.unshift(Uh(e,y,_)),y=Rs(e,i),y!=null&&f.push(Uh(e,y,_))),e.tag===3)return f;e=e.return}return[]}function eS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Gg(e,i,u,f,y){for(var _=i._reactName,A=[];u!==null&&u!==f;){var D=u,X=D.alternate,at=D.stateNode;if(D=D.tag,X!==null&&X===f)break;D!==5&&D!==26&&D!==27||at===null||(X=at,y?(at=Rs(u,_),at!=null&&A.unshift(Uh(u,at,X))):y||(at=Rs(u,_),at!=null&&A.push(Uh(u,at,X)))),u=u.return}A.length!==0&&e.push({event:i,listeners:A})}var nS=/\r\n?/g,aS=/\u0000|\uFFFD/g;function Yg(e){return(typeof e=="string"?e:""+e).replace(nS,`
50
- `).replace(aS,"")}function qg(e,i){return i=Yg(i),Yg(e)===i}function Me(e,i,u,f,y,_){switch(u){case"children":typeof f=="string"?i==="body"||i==="textarea"&&f===""||As(e,f):(typeof f=="number"||typeof f=="bigint")&&i!=="body"&&As(e,""+f);break;case"className":yu(e,"class",f);break;case"tabIndex":yu(e,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":yu(e,u,f);break;case"style":xf(e,f,_);break;case"data":if(i!=="object"){yu(e,"data",f);break}case"src":case"href":if(f===""&&(i!=="a"||u!=="href")){e.removeAttribute(u);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){e.removeAttribute(u);break}f=xu(""+f),e.setAttribute(u,f);break;case"action":case"formAction":if(typeof f=="function"){e.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof _=="function"&&(u==="formAction"?(i!=="input"&&Me(e,i,"name",y.name,y,null),Me(e,i,"formEncType",y.formEncType,y,null),Me(e,i,"formMethod",y.formMethod,y,null),Me(e,i,"formTarget",y.formTarget,y,null)):(Me(e,i,"encType",y.encType,y,null),Me(e,i,"method",y.method,y,null),Me(e,i,"target",y.target,y,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){e.removeAttribute(u);break}f=xu(""+f),e.setAttribute(u,f);break;case"onClick":f!=null&&(e.onclick=Ri);break;case"onScroll":f!=null&&ee("scroll",e);break;case"onScrollEnd":f!=null&&ee("scrollend",e);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(l(61));if(u=f.__html,u!=null){if(y.children!=null)throw Error(l(60));e.innerHTML=u}}break;case"multiple":e.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":e.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){e.removeAttribute("xlink:href");break}u=xu(""+f),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":f!=null&&typeof f!="function"&&typeof f!="symbol"?e.setAttribute(u,""+f):e.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":f&&typeof f!="function"&&typeof f!="symbol"?e.setAttribute(u,""):e.removeAttribute(u);break;case"capture":case"download":f===!0?e.setAttribute(u,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?e.setAttribute(u,f):e.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?e.setAttribute(u,f):e.removeAttribute(u);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?e.removeAttribute(u):e.setAttribute(u,f);break;case"popover":ee("beforetoggle",e),ee("toggle",e),pu(e,"popover",f);break;case"xlinkActuate":si(e,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":si(e,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":si(e,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":si(e,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":si(e,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":si(e,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":si(e,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":si(e,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":si(e,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":pu(e,"is",f);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=Ud.get(u)||u,pu(e,u,f))}}function m0(e,i,u,f,y,_){switch(u){case"style":xf(e,f,_);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(l(61));if(u=f.__html,u!=null){if(y.children!=null)throw Error(l(60));e.innerHTML=u}}break;case"children":typeof f=="string"?As(e,f):(typeof f=="number"||typeof f=="bigint")&&As(e,""+f);break;case"onScroll":f!=null&&ee("scroll",e);break;case"onScrollEnd":f!=null&&ee("scrollend",e);break;case"onClick":f!=null&&(e.onclick=Ri);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!mu.hasOwnProperty(u))t:{if(u[0]==="o"&&u[1]==="n"&&(y=u.endsWith("Capture"),i=u.slice(2,y?u.length-7:void 0),_=e[wn]||null,_=_!=null?_[u]:null,typeof _=="function"&&e.removeEventListener(i,_,y),typeof f=="function")){typeof _!="function"&&_!==null&&(u in e?e[u]=null:e.hasAttribute(u)&&e.removeAttribute(u)),e.addEventListener(i,f,y);break t}u in e?e[u]=f:f===!0?e.setAttribute(u,""):pu(e,u,f)}}}function Pn(e,i,u){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ee("error",e),ee("load",e);var f=!1,y=!1,_;for(_ in u)if(u.hasOwnProperty(_)){var A=u[_];if(A!=null)switch(_){case"src":f=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:Me(e,i,_,A,u,null)}}y&&Me(e,i,"srcSet",u.srcSet,u,null),f&&Me(e,i,"src",u.src,u,null);return;case"input":ee("invalid",e);var D=_=A=y=null,X=null,at=null;for(f in u)if(u.hasOwnProperty(f)){var ft=u[f];if(ft!=null)switch(f){case"name":y=ft;break;case"type":A=ft;break;case"checked":X=ft;break;case"defaultChecked":at=ft;break;case"value":_=ft;break;case"defaultValue":D=ft;break;case"children":case"dangerouslySetInnerHTML":if(ft!=null)throw Error(l(137,i));break;default:Me(e,i,f,ft,u,null)}}gf(e,_,D,X,at,A,y,!1);return;case"select":ee("invalid",e),f=A=_=null;for(y in u)if(u.hasOwnProperty(y)&&(D=u[y],D!=null))switch(y){case"value":_=D;break;case"defaultValue":A=D;break;case"multiple":f=D;default:Me(e,i,y,D,u,null)}i=_,u=A,e.multiple=!!f,i!=null?gr(e,!!f,i,!1):u!=null&&gr(e,!!f,u,!0);return;case"textarea":ee("invalid",e),_=y=f=null;for(A in u)if(u.hasOwnProperty(A)&&(D=u[A],D!=null))switch(A){case"value":f=D;break;case"defaultValue":y=D;break;case"children":_=D;break;case"dangerouslySetInnerHTML":if(D!=null)throw Error(l(91));break;default:Me(e,i,A,D,u,null)}Cs(e,f,y,_);return;case"option":for(X in u)if(u.hasOwnProperty(X)&&(f=u[X],f!=null))switch(X){case"selected":e.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:Me(e,i,X,f,u,null)}return;case"dialog":ee("beforetoggle",e),ee("toggle",e),ee("cancel",e),ee("close",e);break;case"iframe":case"object":ee("load",e);break;case"video":case"audio":for(f=0;f<Bh.length;f++)ee(Bh[f],e);break;case"image":ee("error",e),ee("load",e);break;case"details":ee("toggle",e);break;case"embed":case"source":case"link":ee("error",e),ee("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(at in u)if(u.hasOwnProperty(at)&&(f=u[at],f!=null))switch(at){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:Me(e,i,at,f,u,null)}return;default:if(vu(i)){for(ft in u)u.hasOwnProperty(ft)&&(f=u[ft],f!==void 0&&m0(e,i,ft,f,u,void 0));return}}for(D in u)u.hasOwnProperty(D)&&(f=u[D],f!=null&&Me(e,i,D,f,u,null))}function iS(e,i,u,f){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,_=null,A=null,D=null,X=null,at=null,ft=null;for(ut in u){var yt=u[ut];if(u.hasOwnProperty(ut)&&yt!=null)switch(ut){case"checked":break;case"value":break;case"defaultValue":X=yt;default:f.hasOwnProperty(ut)||Me(e,i,ut,null,f,yt)}}for(var lt in f){var ut=f[lt];if(yt=u[lt],f.hasOwnProperty(lt)&&(ut!=null||yt!=null))switch(lt){case"type":_=ut;break;case"name":y=ut;break;case"checked":at=ut;break;case"defaultChecked":ft=ut;break;case"value":A=ut;break;case"defaultValue":D=ut;break;case"children":case"dangerouslySetInnerHTML":if(ut!=null)throw Error(l(137,i));break;default:ut!==yt&&Me(e,i,lt,ut,f,yt)}}Oo(e,A,D,X,at,ft,_,y);return;case"select":ut=A=D=lt=null;for(_ in u)if(X=u[_],u.hasOwnProperty(_)&&X!=null)switch(_){case"value":break;case"multiple":ut=X;default:f.hasOwnProperty(_)||Me(e,i,_,null,f,X)}for(y in f)if(_=f[y],X=u[y],f.hasOwnProperty(y)&&(_!=null||X!=null))switch(y){case"value":lt=_;break;case"defaultValue":D=_;break;case"multiple":A=_;default:_!==X&&Me(e,i,y,_,f,X)}i=D,u=A,f=ut,lt!=null?gr(e,!!u,lt,!1):!!f!=!!u&&(i!=null?gr(e,!!u,i,!0):gr(e,!!u,u?[]:"",!1));return;case"textarea":ut=lt=null;for(D in u)if(y=u[D],u.hasOwnProperty(D)&&y!=null&&!f.hasOwnProperty(D))switch(D){case"value":break;case"children":break;default:Me(e,i,D,null,f,y)}for(A in f)if(y=f[A],_=u[A],f.hasOwnProperty(A)&&(y!=null||_!=null))switch(A){case"value":lt=y;break;case"defaultValue":ut=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(l(91));break;default:y!==_&&Me(e,i,A,y,f,_)}vf(e,lt,ut);return;case"option":for(var Ct in u)if(lt=u[Ct],u.hasOwnProperty(Ct)&&lt!=null&&!f.hasOwnProperty(Ct))switch(Ct){case"selected":e.selected=!1;break;default:Me(e,i,Ct,null,f,lt)}for(X in f)if(lt=f[X],ut=u[X],f.hasOwnProperty(X)&&lt!==ut&&(lt!=null||ut!=null))switch(X){case"selected":e.selected=lt&&typeof lt!="function"&&typeof lt!="symbol";break;default:Me(e,i,X,lt,f,ut)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ut in u)lt=u[Ut],u.hasOwnProperty(Ut)&&lt!=null&&!f.hasOwnProperty(Ut)&&Me(e,i,Ut,null,f,lt);for(at in f)if(lt=f[at],ut=u[at],f.hasOwnProperty(at)&&lt!==ut&&(lt!=null||ut!=null))switch(at){case"children":case"dangerouslySetInnerHTML":if(lt!=null)throw Error(l(137,i));break;default:Me(e,i,at,lt,f,ut)}return;default:if(vu(i)){for(var Re in u)lt=u[Re],u.hasOwnProperty(Re)&&lt!==void 0&&!f.hasOwnProperty(Re)&&m0(e,i,Re,void 0,f,lt);for(ft in f)lt=f[ft],ut=u[ft],!f.hasOwnProperty(ft)||lt===ut||lt===void 0&&ut===void 0||m0(e,i,ft,lt,f,ut);return}}for(var P in u)lt=u[P],u.hasOwnProperty(P)&&lt!=null&&!f.hasOwnProperty(P)&&Me(e,i,P,null,f,lt);for(yt in f)lt=f[yt],ut=u[yt],!f.hasOwnProperty(yt)||lt===ut||lt==null&&ut==null||Me(e,i,yt,lt,f,ut)}function Lg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function lS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,i=0,u=performance.getEntriesByType("resource"),f=0;f<u.length;f++){var y=u[f],_=y.transferSize,A=y.initiatorType,D=y.duration;if(_&&D&&Lg(A)){for(A=0,D=y.responseEnd,f+=1;f<u.length;f++){var X=u[f],at=X.startTime;if(at>D)break;var ft=X.transferSize,yt=X.initiatorType;ft&&Lg(yt)&&(X=X.responseEnd,A+=ft*(X<D?1:(D-at)/(X-at)))}if(--f,i+=8*(_+A)/(y.duration/1e3),e++,10<e)break}}if(0<e)return i/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var p0=null,y0=null;function qm(e){return e.nodeType===9?e:e.ownerDocument}function Xg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Vg(e,i){if(e===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&i==="foreignObject"?0:e}function g0(e,i){return e==="textarea"||e==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var v0=null;function sS(){var e=window.event;return e&&e.type==="popstate"?e===v0?!1:(v0=e,!0):(v0=null,!1)}var kg=typeof setTimeout=="function"?setTimeout:void 0,rS=typeof clearTimeout=="function"?clearTimeout:void 0,Qg=typeof Promise=="function"?Promise:void 0,uS=typeof queueMicrotask=="function"?queueMicrotask:typeof Qg<"u"?function(e){return Qg.resolve(null).then(e).catch(oS)}:kg;function oS(e){setTimeout(function(){throw e})}function Wr(e){return e==="head"}function Kg(e,i){var u=i,f=0;do{var y=u.nextSibling;if(e.removeChild(u),y&&y.nodeType===8)if(u=y.data,u==="/$"||u==="/&"){if(f===0){e.removeChild(y),Yc(i);return}f--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")f++;else if(u==="html")Hh(e.ownerDocument.documentElement);else if(u==="head"){u=e.ownerDocument.head,Hh(u);for(var _=u.firstChild;_;){var A=_.nextSibling,D=_.nodeName;_[Es]||D==="SCRIPT"||D==="STYLE"||D==="LINK"&&_.rel.toLowerCase()==="stylesheet"||u.removeChild(_),_=A}}else u==="body"&&Hh(e.ownerDocument.body);u=y}while(u);Yc(i)}function Zg(e,i){var u=e;e=0;do{var f=u.nextSibling;if(u.nodeType===1?i?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(i?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),f&&f.nodeType===8)if(u=f.data,u==="/$"){if(e===0)break;e--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||e++;u=f}while(u)}function x0(e){var i=e.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var u=i;switch(i=i.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":x0(u),du(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}e.removeChild(u)}}function cS(e,i,u,f){for(;e.nodeType===1;){var y=u;if(e.nodeName.toLowerCase()!==i.toLowerCase()){if(!f&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(f){if(!e[Es])switch(i){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(_=e.getAttribute("rel"),_==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(_!==y.rel||e.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||e.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||e.getAttribute("title")!==(y.title==null?null:y.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(_=e.getAttribute("src"),(_!==(y.src==null?null:y.src)||e.getAttribute("type")!==(y.type==null?null:y.type)||e.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&_&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(i==="input"&&e.type==="hidden"){var _=y.name==null?null:""+y.name;if(y.type==="hidden"&&e.getAttribute("name")===_)return e}else return e;if(e=Qi(e.nextSibling),e===null)break}return null}function fS(e,i,u){if(i==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!u||(e=Qi(e.nextSibling),e===null))return null;return e}function Jg(e,i){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Qi(e.nextSibling),e===null))return null;return e}function _0(e){return e.data==="$?"||e.data==="$~"}function S0(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function hS(e,i){var u=e.ownerDocument;if(e.data==="$~")e._reactRetry=i;else if(e.data!=="$?"||u.readyState!=="loading")i();else{var f=function(){i(),u.removeEventListener("DOMContentLoaded",f)};u.addEventListener("DOMContentLoaded",f),e._reactRetry=f}}function Qi(e){for(;e!=null;e=e.nextSibling){var i=e.nodeType;if(i===1||i===3)break;if(i===8){if(i=e.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return e}var b0=null;function Fg(e){e=e.nextSibling;for(var i=0;e;){if(e.nodeType===8){var u=e.data;if(u==="/$"||u==="/&"){if(i===0)return Qi(e.nextSibling);i--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||i++}e=e.nextSibling}return null}function Wg(e){e=e.previousSibling;for(var i=0;e;){if(e.nodeType===8){var u=e.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(i===0)return e;i--}else u!=="/$"&&u!=="/&"||i++}e=e.previousSibling}return null}function Pg(e,i,u){switch(i=qm(u),e){case"html":if(e=i.documentElement,!e)throw Error(l(452));return e;case"head":if(e=i.head,!e)throw Error(l(453));return e;case"body":if(e=i.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function Hh(e){for(var i=e.attributes;i.length;)e.removeAttributeNode(i[0]);du(e)}var Ki=new Map,Ig=new Set;function Lm(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var tr=Q.d;Q.d={f:dS,r:mS,D:pS,C:yS,L:gS,m:vS,X:_S,S:xS,M:SS};function dS(){var e=tr.f(),i=N();return e||i}function mS(e){var i=we(e);i!==null&&i.tag===5&&i.type==="form"?Ch(i):tr.r(e)}var Hc=typeof document>"u"?null:document;function $g(e,i,u){var f=Hc;if(f&&typeof i=="string"&&i){var y=xa(i);y='link[rel="'+e+'"][href="'+y+'"]',typeof u=="string"&&(y+='[crossorigin="'+u+'"]'),Ig.has(y)||(Ig.add(y),e={rel:e,crossOrigin:u,href:i},f.querySelector(y)===null&&(i=f.createElement("link"),Pn(i,"link",e),tn(i),f.head.appendChild(i)))}}function pS(e){tr.D(e),$g("dns-prefetch",e,null)}function yS(e,i){tr.C(e,i),$g("preconnect",e,i)}function gS(e,i,u){tr.L(e,i,u);var f=Hc;if(f&&e&&i){var y='link[rel="preload"][as="'+xa(i)+'"]';i==="image"&&u&&u.imageSrcSet?(y+='[imagesrcset="'+xa(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(y+='[imagesizes="'+xa(u.imageSizes)+'"]')):y+='[href="'+xa(e)+'"]';var _=y;switch(i){case"style":_=jc(e);break;case"script":_=Gc(e)}Ki.has(_)||(e=b({rel:"preload",href:i==="image"&&u&&u.imageSrcSet?void 0:e,as:i},u),Ki.set(_,e),f.querySelector(y)!==null||i==="style"&&f.querySelector(jh(_))||i==="script"&&f.querySelector(Gh(_))||(i=f.createElement("link"),Pn(i,"link",e),tn(i),f.head.appendChild(i)))}}function vS(e,i){tr.m(e,i);var u=Hc;if(u&&e){var f=i&&typeof i.as=="string"?i.as:"script",y='link[rel="modulepreload"][as="'+xa(f)+'"][href="'+xa(e)+'"]',_=y;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=Gc(e)}if(!Ki.has(_)&&(e=b({rel:"modulepreload",href:e},i),Ki.set(_,e),u.querySelector(y)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Gh(_)))return}f=u.createElement("link"),Pn(f,"link",e),tn(f),u.head.appendChild(f)}}}function xS(e,i,u){tr.S(e,i,u);var f=Hc;if(f&&e){var y=nl(f).hoistableStyles,_=jc(e);i=i||"default";var A=y.get(_);if(!A){var D={loading:0,preload:null};if(A=f.querySelector(jh(_)))D.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":i},u),(u=Ki.get(_))&&T0(e,u);var X=A=f.createElement("link");tn(X),Pn(X,"link",e),X._p=new Promise(function(at,ft){X.onload=at,X.onerror=ft}),X.addEventListener("load",function(){D.loading|=1}),X.addEventListener("error",function(){D.loading|=2}),D.loading|=4,Xm(A,i,f)}A={type:"stylesheet",instance:A,count:1,state:D},y.set(_,A)}}}function _S(e,i){tr.X(e,i);var u=Hc;if(u&&e){var f=nl(u).hoistableScripts,y=Gc(e),_=f.get(y);_||(_=u.querySelector(Gh(y)),_||(e=b({src:e,async:!0},i),(i=Ki.get(y))&&E0(e,i),_=u.createElement("script"),tn(_),Pn(_,"link",e),u.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},f.set(y,_))}}function SS(e,i){tr.M(e,i);var u=Hc;if(u&&e){var f=nl(u).hoistableScripts,y=Gc(e),_=f.get(y);_||(_=u.querySelector(Gh(y)),_||(e=b({src:e,async:!0,type:"module"},i),(i=Ki.get(y))&&E0(e,i),_=u.createElement("script"),tn(_),Pn(_,"link",e),u.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},f.set(y,_))}}function tv(e,i,u,f){var y=(y=At.current)?Lm(y):null;if(!y)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(i=jc(u.href),u=nl(y).hoistableStyles,f=u.get(i),f||(f={type:"style",instance:null,count:0,state:null},u.set(i,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){e=jc(u.href);var _=nl(y).hoistableStyles,A=_.get(e);if(A||(y=y.ownerDocument||y,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(e,A),(_=y.querySelector(jh(e)))&&!_._p&&(A.instance=_,A.state.loading=5),Ki.has(e)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Ki.set(e,u),_||bS(y,e,u,A.state))),i&&f===null)throw Error(l(528,""));return A}if(i&&f!==null)throw Error(l(529,""));return null;case"script":return i=u.async,u=u.src,typeof u=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Gc(u),u=nl(y).hoistableScripts,f=u.get(i),f||(f={type:"script",instance:null,count:0,state:null},u.set(i,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function jc(e){return'href="'+xa(e)+'"'}function jh(e){return'link[rel="stylesheet"]['+e+"]"}function ev(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function bS(e,i,u,f){e.querySelector('link[rel="preload"][as="style"]['+i+"]")?f.loading=1:(i=e.createElement("link"),f.preload=i,i.addEventListener("load",function(){return f.loading|=1}),i.addEventListener("error",function(){return f.loading|=2}),Pn(i,"link",u),tn(i),e.head.appendChild(i))}function Gc(e){return'[src="'+xa(e)+'"]'}function Gh(e){return"script[async]"+e}function nv(e,i,u){if(i.count++,i.instance===null)switch(i.type){case"style":var f=e.querySelector('style[data-href~="'+xa(u.href)+'"]');if(f)return i.instance=f,tn(f),f;var y=b({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return f=(e.ownerDocument||e).createElement("style"),tn(f),Pn(f,"style",y),Xm(f,u.precedence,e),i.instance=f;case"stylesheet":y=jc(u.href);var _=e.querySelector(jh(y));if(_)return i.state.loading|=4,i.instance=_,tn(_),_;f=ev(u),(y=Ki.get(y))&&T0(f,y),_=(e.ownerDocument||e).createElement("link"),tn(_);var A=_;return A._p=new Promise(function(D,X){A.onload=D,A.onerror=X}),Pn(_,"link",f),i.state.loading|=4,Xm(_,u.precedence,e),i.instance=_;case"script":return _=Gc(u.src),(y=e.querySelector(Gh(_)))?(i.instance=y,tn(y),y):(f=u,(y=Ki.get(_))&&(f=b({},u),E0(f,y)),e=e.ownerDocument||e,y=e.createElement("script"),tn(y),Pn(y,"link",f),e.head.appendChild(y),i.instance=y);case"void":return null;default:throw Error(l(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(f=i.instance,i.state.loading|=4,Xm(f,u.precedence,e));return i.instance}function Xm(e,i,u){for(var f=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=f.length?f[f.length-1]:null,_=y,A=0;A<f.length;A++){var D=f[A];if(D.dataset.precedence===i)_=D;else if(_!==y)break}_?_.parentNode.insertBefore(e,_.nextSibling):(i=u.nodeType===9?u.head:u,i.insertBefore(e,i.firstChild))}function T0(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.title==null&&(e.title=i.title)}function E0(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.integrity==null&&(e.integrity=i.integrity)}var Vm=null;function av(e,i,u){if(Vm===null){var f=new Map,y=Vm=new Map;y.set(u,f)}else y=Vm,f=y.get(u),f||(f=new Map,y.set(u,f));if(f.has(e))return f;for(f.set(e,null),u=u.getElementsByTagName(e),y=0;y<u.length;y++){var _=u[y];if(!(_[Es]||_[Pt]||e==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var A=_.getAttribute(i)||"";A=e+A;var D=f.get(A);D?D.push(_):f.set(A,[_])}}return f}function iv(e,i,u){e=e.ownerDocument||e,e.head.insertBefore(u,i==="title"?e.querySelector("head > title"):null)}function TS(e,i,u){if(u===1||i.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return e=i.disabled,typeof i.precedence=="string"&&e==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function lv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function ES(e,i,u,f){if(u.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var y=jc(f.href),_=i.querySelector(jh(y));if(_){i=_._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(e.count++,e=km.bind(e),i.then(e,e)),u.state.loading|=4,u.instance=_,tn(_);return}_=i.ownerDocument||i,f=ev(f),(y=Ki.get(y))&&T0(f,y),_=_.createElement("link"),tn(_);var A=_;A._p=new Promise(function(D,X){A.onload=D,A.onerror=X}),Pn(_,"link",f),u.instance=_}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(u,i),(i=u.state.preload)&&(u.state.loading&3)===0&&(e.count++,u=km.bind(e),i.addEventListener("load",u),i.addEventListener("error",u))}}var C0=0;function CS(e,i){return e.stylesheets&&e.count===0&&Km(e,e.stylesheets),0<e.count||0<e.imgCount?function(u){var f=setTimeout(function(){if(e.stylesheets&&Km(e,e.stylesheets),e.unsuspend){var _=e.unsuspend;e.unsuspend=null,_()}},6e4+i);0<e.imgBytes&&C0===0&&(C0=62500*lS());var y=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Km(e,e.stylesheets),e.unsuspend)){var _=e.unsuspend;e.unsuspend=null,_()}},(e.imgBytes>C0?50:800)+i);return e.unsuspend=u,function(){e.unsuspend=null,clearTimeout(f),clearTimeout(y)}}:null}function km(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Km(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qm=null;function Km(e,i){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qm=new Map,i.forEach(AS,e),Qm=null,km.call(e))}function AS(e,i){if(!(i.state.loading&4)){var u=Qm.get(e);if(u)var f=u.get(null);else{u=new Map,Qm.set(e,u);for(var y=e.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<y.length;_++){var A=y[_];(A.nodeName==="LINK"||A.getAttribute("media")!=="not all")&&(u.set(A.dataset.precedence,A),f=A)}f&&u.set(null,f)}y=i.instance,A=y.getAttribute("data-precedence"),_=u.get(A)||f,_===f&&u.set(null,y),u.set(A,y),this.count++,f=km.bind(this),y.addEventListener("load",f),y.addEventListener("error",f),_?_.parentNode.insertBefore(y,_.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(y,e.firstChild)),i.state.loading|=4}}var Yh={$$typeof:U,Provider:null,Consumer:null,_currentValue:ot,_currentValue2:ot,_threadCount:0};function MS(e,i,u,f,y,_,A,D,X){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=mr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mr(0),this.hiddenUpdates=mr(null),this.identifierPrefix=f,this.onUncaughtError=y,this.onCaughtError=_,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function sv(e,i,u,f,y,_,A,D,X,at,ft,yt){return e=new MS(e,i,u,A,X,at,ft,yt,D),i=1,_===!0&&(i|=24),_=Qn(3,null,null,i),e.current=_,_.stateNode=e,i=Zf(),i.refCount++,e.pooledCache=i,i.refCount++,_.memoizedState={element:f,isDehydrated:u,cache:i},$f(_),e}function rv(e){return e?(e=Wl,e):Wl}function uv(e,i,u,f,y,_){y=rv(y),f.context===null?f.context=y:f.pendingContext=y,f=Hi(i),f.payload={element:u},_=_===void 0?null:_,_!==null&&(f.callback=_),u=ml(e,f,i),u!==null&&(r(u,e,i),is(u,e,i))}function ov(e,i){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var u=e.retryLane;e.retryLane=u!==0&&u<i?u:i}}function A0(e,i){ov(e,i),(e=e.alternate)&&ov(e,i)}function cv(e){if(e.tag===13||e.tag===31){var i=Fl(e,67108864);i!==null&&r(i,e,67108864),A0(e,67108864)}}function fv(e){if(e.tag===13||e.tag===31){var i=Wn();i=Ci(i);var u=Fl(e,i);u!==null&&r(u,e,i),A0(e,i)}}var Zm=!0;function RS(e,i,u,f){var y=j.T;j.T=null;var _=Q.p;try{Q.p=2,M0(e,i,u,f)}finally{Q.p=_,j.T=y}}function zS(e,i,u,f){var y=j.T;j.T=null;var _=Q.p;try{Q.p=8,M0(e,i,u,f)}finally{Q.p=_,j.T=y}}function M0(e,i,u,f){if(Zm){var y=R0(f);if(y===null)d0(e,i,f,Jm,u),dv(e,f);else if(DS(y,e,i,u,f))f.stopPropagation();else if(dv(e,f),i&4&&-1<wS.indexOf(e)){for(;y!==null;){var _=we(y);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var A=Ei(_.pendingLanes);if(A!==0){var D=_;for(D.pendingLanes|=2,D.entangledLanes|=2;A;){var X=1<<31-Vn(A);D.entanglements[1]|=X,A&=~X}ds(_),(ne&6)===0&&(Ua=na()+500,Nh(0))}}break;case 31:case 13:D=Fl(_,2),D!==null&&r(D,_,2),N(),A0(_,2)}if(_=R0(f),_===null&&d0(e,i,f,Jm,u),_===y)break;y=_}y!==null&&f.stopPropagation()}else d0(e,i,f,null,u)}}function R0(e){return e=Uo(e),z0(e)}var Jm=null;function z0(e){if(Jm=null,e=cn(e),e!==null){var i=c(e);if(i===null)e=null;else{var u=i.tag;if(u===13){if(e=d(i),e!==null)return e;e=null}else if(u===31){if(e=m(i),e!==null)return e;e=null}else if(u===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;e=null}else i!==e&&(e=null)}}return Jm=e,null}function hv(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Td()){case Ed:return 2;case To:return 8;case Eo:case Cd:return 32;case Ad:return 268435456;default:return 32}default:return 32}}var w0=!1,Pr=null,Ir=null,$r=null,qh=new Map,Lh=new Map,tu=[],wS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function dv(e,i){switch(e){case"focusin":case"focusout":Pr=null;break;case"dragenter":case"dragleave":Ir=null;break;case"mouseover":case"mouseout":$r=null;break;case"pointerover":case"pointerout":qh.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lh.delete(i.pointerId)}}function Xh(e,i,u,f,y,_){return e===null||e.nativeEvent!==_?(e={blockedOn:i,domEventName:u,eventSystemFlags:f,nativeEvent:_,targetContainers:[y]},i!==null&&(i=we(i),i!==null&&cv(i)),e):(e.eventSystemFlags|=f,i=e.targetContainers,y!==null&&i.indexOf(y)===-1&&i.push(y),e)}function DS(e,i,u,f,y){switch(i){case"focusin":return Pr=Xh(Pr,e,i,u,f,y),!0;case"dragenter":return Ir=Xh(Ir,e,i,u,f,y),!0;case"mouseover":return $r=Xh($r,e,i,u,f,y),!0;case"pointerover":var _=y.pointerId;return qh.set(_,Xh(qh.get(_)||null,e,i,u,f,y)),!0;case"gotpointercapture":return _=y.pointerId,Lh.set(_,Xh(Lh.get(_)||null,e,i,u,f,y)),!0}return!1}function mv(e){var i=cn(e.target);if(i!==null){var u=c(i);if(u!==null){if(i=u.tag,i===13){if(i=d(u),i!==null){e.blockedOn=i,Ai(e.priority,function(){fv(u)});return}}else if(i===31){if(i=m(u),i!==null){e.blockedOn=i,Ai(e.priority,function(){fv(u)});return}}else if(i===3&&u.stateNode.current.memoizedState.isDehydrated){e.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Fm(e){if(e.blockedOn!==null)return!1;for(var i=e.targetContainers;0<i.length;){var u=R0(e.nativeEvent);if(u===null){u=e.nativeEvent;var f=new u.constructor(u.type,u);_u=f,u.target.dispatchEvent(f),_u=null}else return i=we(u),i!==null&&cv(i),e.blockedOn=u,!1;i.shift()}return!0}function pv(e,i,u){Fm(e)&&u.delete(i)}function OS(){w0=!1,Pr!==null&&Fm(Pr)&&(Pr=null),Ir!==null&&Fm(Ir)&&(Ir=null),$r!==null&&Fm($r)&&($r=null),qh.forEach(pv),Lh.forEach(pv)}function Wm(e,i){e.blockedOn===i&&(e.blockedOn=null,w0||(w0=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,OS)))}var Pm=null;function yv(e){Pm!==e&&(Pm=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Pm===e&&(Pm=null);for(var i=0;i<e.length;i+=3){var u=e[i],f=e[i+1],y=e[i+2];if(typeof f!="function"){if(z0(f||u)===null)continue;break}var _=we(u);_!==null&&(e.splice(i,3),i-=3,Eh(_,{pending:!0,data:y,method:u.method,action:f},f,y))}}))}function Yc(e){function i(X){return Wm(X,e)}Pr!==null&&Wm(Pr,e),Ir!==null&&Wm(Ir,e),$r!==null&&Wm($r,e),qh.forEach(i),Lh.forEach(i);for(var u=0;u<tu.length;u++){var f=tu[u];f.blockedOn===e&&(f.blockedOn=null)}for(;0<tu.length&&(u=tu[0],u.blockedOn===null);)mv(u),u.blockedOn===null&&tu.shift();if(u=(e.ownerDocument||e).$$reactFormReplay,u!=null)for(f=0;f<u.length;f+=3){var y=u[f],_=u[f+1],A=y[wn]||null;if(typeof _=="function")A||yv(u);else if(A){var D=null;if(_&&_.hasAttribute("formAction")){if(y=_,A=_[wn]||null)D=A.formAction;else if(z0(y)!==null)continue}else D=A.action;typeof D=="function"?u[f+1]=D:(u.splice(f,3),f-=3),yv(u)}}}function gv(){function e(_){_.canIntercept&&_.info==="react-transition"&&_.intercept({handler:function(){return new Promise(function(A){return y=A})},focusReset:"manual",scroll:"manual"})}function i(){y!==null&&(y(),y=null),f||setTimeout(u,20)}function u(){if(!f&&!navigation.transition){var _=navigation.currentEntry;_&&_.url!=null&&navigation.navigate(_.url,{state:_.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var f=!1,y=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(u,100),function(){f=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),y!==null&&(y(),y=null)}}}function D0(e){this._internalRoot=e}Im.prototype.render=D0.prototype.render=function(e){var i=this._internalRoot;if(i===null)throw Error(l(409));var u=i.current,f=Wn();uv(u,f,e,i,null,null)},Im.prototype.unmount=D0.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var i=e.containerInfo;uv(e.current,2,null,e,null,null),N(),i[Bl]=null}};function Im(e){this._internalRoot=e}Im.prototype.unstable_scheduleHydration=function(e){if(e){var i=tl();e={blockedOn:null,target:e,priority:i};for(var u=0;u<tu.length&&i!==0&&i<tu[u].priority;u++);tu.splice(u,0,e),u===0&&mv(e)}};var vv=t.version;if(vv!=="19.2.4")throw Error(l(527,vv,"19.2.4"));Q.findDOMNode=function(e){var i=e._reactInternals;if(i===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=g(i),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var NS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $m=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$m.isDisabled&&$m.supportsFiber)try{Xa=$m.inject(NS),$e=$m}catch{}}return kh.createRoot=function(e,i){if(!o(e))throw Error(l(299));var u=!1,f="",y=Rh,_=Dm,A=bc;return i!=null&&(i.unstable_strictMode===!0&&(u=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(y=i.onUncaughtError),i.onCaughtError!==void 0&&(_=i.onCaughtError),i.onRecoverableError!==void 0&&(A=i.onRecoverableError)),i=sv(e,1,!1,null,null,u,f,null,y,_,A,gv),e[Bl]=i.current,h0(e),new D0(i)},kh.hydrateRoot=function(e,i,u){if(!o(e))throw Error(l(299));var f=!1,y="",_=Rh,A=Dm,D=bc,X=null;return u!=null&&(u.unstable_strictMode===!0&&(f=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onUncaughtError!==void 0&&(_=u.onUncaughtError),u.onCaughtError!==void 0&&(A=u.onCaughtError),u.onRecoverableError!==void 0&&(D=u.onRecoverableError),u.formState!==void 0&&(X=u.formState)),i=sv(e,1,!0,i,u??null,f,y,X,_,A,D,gv),i.context=rv(null),u=i.current,f=Wn(),f=Ci(f),y=Hi(f),y.callback=null,ml(u,y,f),u=f,i.current.lanes=u,pr(i,u),ds(i),e[Bl]=i.current,h0(e),new Im(i)},kh.version="19.2.4",kh}var zv;function QS(){if(zv)return B0.exports;zv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),B0.exports=kS(),B0.exports}var KS=QS();/**
51
- * react-router v7.13.1
52
- *
53
- * Copyright (c) Remix Software Inc.
54
- *
55
- * This source code is licensed under the MIT license found in the
56
- * LICENSE.md file in the root directory of this source tree.
57
- *
58
- * @license MIT
59
- */var wv="popstate";function Dv(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function ZS(n={}){function t(l,o){var g;let c=(g=o.state)==null?void 0:g.masked,{pathname:d,search:m,hash:p}=c||l.location;return Cy("",{pathname:d,search:m,hash:p},o.state&&o.state.usr||null,o.state&&o.state.key||"default",c?{pathname:l.location.pathname,search:l.location.search,hash:l.location.hash}:void 0)}function a(l,o){return typeof o=="string"?o:cd(o)}return FS(t,a,null,n)}function ke(n,t){if(n===!1||n===null||typeof n>"u")throw new Error(t)}function wl(n,t){if(!n){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function JS(){return Math.random().toString(36).substring(2,10)}function Ov(n,t){return{usr:n.state,key:n.key,idx:t,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function Cy(n,t,a=null,l,o){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof t=="string"?rf(t):t,state:a,key:t&&t.key||l||JS(),unstable_mask:o}}function cd({pathname:n="/",search:t="",hash:a=""}){return t&&t!=="?"&&(n+=t.charAt(0)==="?"?t:"?"+t),a&&a!=="#"&&(n+=a.charAt(0)==="#"?a:"#"+a),n}function rf(n){let t={};if(n){let a=n.indexOf("#");a>=0&&(t.hash=n.substring(a),n=n.substring(0,a));let l=n.indexOf("?");l>=0&&(t.search=n.substring(l),n=n.substring(0,l)),n&&(t.pathname=n)}return t}function FS(n,t,a,l={}){let{window:o=document.defaultView,v5Compat:c=!1}=l,d=o.history,m="POP",p=null,g=x();g==null&&(g=0,d.replaceState({...d.state,idx:g},""));function x(){return(d.state||{idx:null}).idx}function b(){m="POP";let R=x(),w=R==null?null:R-g;g=R,p&&p({action:m,location:z.location,delta:w})}function E(R,w){m="PUSH";let O=Dv(R)?R:Cy(z.location,R,w);g=x()+1;let U=Ov(O,g),Y=z.createHref(O.unstable_mask||O);try{d.pushState(U,"",Y)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;o.location.assign(Y)}c&&p&&p({action:m,location:z.location,delta:1})}function C(R,w){m="REPLACE";let O=Dv(R)?R:Cy(z.location,R,w);g=x();let U=Ov(O,g),Y=z.createHref(O.unstable_mask||O);d.replaceState(U,"",Y),c&&p&&p({action:m,location:z.location,delta:0})}function M(R){return WS(R)}let z={get action(){return m},get location(){return n(o,d)},listen(R){if(p)throw new Error("A history only accepts one active listener");return o.addEventListener(wv,b),p=R,()=>{o.removeEventListener(wv,b),p=null}},createHref(R){return t(o,R)},createURL:M,encodeLocation(R){let w=M(R);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:E,replace:C,go(R){return d.go(R)}};return z}function WS(n,t=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),ke(a,"No window.location.(origin|href) available to create URL");let l=typeof n=="string"?n:cd(n);return l=l.replace(/ $/,"%20"),!t&&l.startsWith("//")&&(l=a+l),new URL(l,a)}function Hx(n,t,a="/"){return PS(n,t,a,!1)}function PS(n,t,a,l){let o=typeof t=="string"?rf(t):t,c=or(o.pathname||"/",a);if(c==null)return null;let d=jx(n);IS(d);let m=null;for(let p=0;m==null&&p<d.length;++p){let g=ob(c);m=rb(d[p],g,l)}return m}function jx(n,t=[],a=[],l="",o=!1){let c=(d,m,p=o,g)=>{let x={relativePath:g===void 0?d.path||"":g,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(l)&&p)return;ke(x.relativePath.startsWith(l),`Absolute route path "${x.relativePath}" nested under path "${l}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(l.length)}let b=xs([l,x.relativePath]),E=a.concat(x);d.children&&d.children.length>0&&(ke(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),jx(d.children,t,E,b,p)),!(d.path==null&&!d.index)&&t.push({path:b,score:lb(b,d.index),routesMeta:E})};return n.forEach((d,m)=>{var p;if(d.path===""||!((p=d.path)!=null&&p.includes("?")))c(d,m);else for(let g of Gx(d.path))c(d,m,!0,g)}),t}function Gx(n){let t=n.split("/");if(t.length===0)return[];let[a,...l]=t,o=a.endsWith("?"),c=a.replace(/\?$/,"");if(l.length===0)return o?[c,""]:[c];let d=Gx(l.join("/")),m=[];return m.push(...d.map(p=>p===""?c:[c,p].join("/"))),o&&m.push(...d),m.map(p=>n.startsWith("/")&&p===""?"/":p)}function IS(n){n.sort((t,a)=>t.score!==a.score?a.score-t.score:sb(t.routesMeta.map(l=>l.childrenIndex),a.routesMeta.map(l=>l.childrenIndex)))}var $S=/^:[\w-]+$/,tb=3,eb=2,nb=1,ab=10,ib=-2,Nv=n=>n==="*";function lb(n,t){let a=n.split("/"),l=a.length;return a.some(Nv)&&(l+=ib),t&&(l+=eb),a.filter(o=>!Nv(o)).reduce((o,c)=>o+($S.test(c)?tb:c===""?nb:ab),l)}function sb(n,t){return n.length===t.length&&n.slice(0,-1).every((l,o)=>l===t[o])?n[n.length-1]-t[t.length-1]:0}function rb(n,t,a=!1){let{routesMeta:l}=n,o={},c="/",d=[];for(let m=0;m<l.length;++m){let p=l[m],g=m===l.length-1,x=c==="/"?t:t.slice(c.length)||"/",b=Mp({path:p.relativePath,caseSensitive:p.caseSensitive,end:g},x),E=p.route;if(!b&&g&&a&&!l[l.length-1].route.index&&(b=Mp({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},x)),!b)return null;Object.assign(o,b.params),d.push({params:o,pathname:xs([c,b.pathname]),pathnameBase:db(xs([c,b.pathnameBase])),route:E}),b.pathnameBase!=="/"&&(c=xs([c,b.pathnameBase]))}return d}function Mp(n,t){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[a,l]=ub(n.path,n.caseSensitive,n.end),o=t.match(a);if(!o)return null;let c=o[0],d=c.replace(/(.)\/+$/,"$1"),m=o.slice(1);return{params:l.reduce((g,{paramName:x,isOptional:b},E)=>{if(x==="*"){let M=m[E]||"";d=c.slice(0,c.length-M.length).replace(/(.)\/+$/,"$1")}const C=m[E];return b&&!C?g[x]=void 0:g[x]=(C||"").replace(/%2F/g,"/"),g},{}),pathname:c,pathnameBase:d,pattern:n}}function ub(n,t=!1,a=!0){wl(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let l=[],o="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,p,g,x)=>{if(l.push({paramName:m,isOptional:p!=null}),p){let b=x.charAt(g+d.length);return b&&b!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(l.push({paramName:"*"}),o+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?o+="\\/*$":n!==""&&n!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),l]}function ob(n){try{return n.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return wl(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),n}}function or(n,t){if(t==="/")return n;if(!n.toLowerCase().startsWith(t.toLowerCase()))return null;let a=t.endsWith("/")?t.length-1:t.length,l=n.charAt(a);return l&&l!=="/"?null:n.slice(a)||"/"}var cb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function fb(n,t="/"){let{pathname:a,search:l="",hash:o=""}=typeof n=="string"?rf(n):n,c;return a?(a=a.replace(/\/\/+/g,"/"),a.startsWith("/")?c=Bv(a.substring(1),"/"):c=Bv(a,t)):c=t,{pathname:c,search:mb(l),hash:pb(o)}}function Bv(n,t){let a=t.replace(/\/+$/,"").split("/");return n.split("/").forEach(o=>{o===".."?a.length>1&&a.pop():o!=="."&&a.push(o)}),a.length>1?a.join("/"):"/"}function G0(n,t,a,l){return`Cannot include a '${n}' character in a manually specified \`to.${t}\` field [${JSON.stringify(l)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function hb(n){return n.filter((t,a)=>a===0||t.route.path&&t.route.path.length>0)}function tg(n){let t=hb(n);return t.map((a,l)=>l===t.length-1?a.pathname:a.pathnameBase)}function Gp(n,t,a,l=!1){let o;typeof n=="string"?o=rf(n):(o={...n},ke(!o.pathname||!o.pathname.includes("?"),G0("?","pathname","search",o)),ke(!o.pathname||!o.pathname.includes("#"),G0("#","pathname","hash",o)),ke(!o.search||!o.search.includes("#"),G0("#","search","hash",o)));let c=n===""||o.pathname==="",d=c?"/":o.pathname,m;if(d==null)m=a;else{let b=t.length-1;if(!l&&d.startsWith("..")){let E=d.split("/");for(;E[0]==="..";)E.shift(),b-=1;o.pathname=E.join("/")}m=b>=0?t[b]:"/"}let p=fb(o,m),g=d&&d!=="/"&&d.endsWith("/"),x=(c||d===".")&&a.endsWith("/");return!p.pathname.endsWith("/")&&(g||x)&&(p.pathname+="/"),p}var xs=n=>n.join("/").replace(/\/\/+/g,"/"),db=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),mb=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,pb=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,yb=class{constructor(n,t,a,l=!1){this.status=n,this.statusText=t||"",this.internal=l,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function gb(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function vb(n){return n.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Yx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function qx(n,t){let a=n;if(typeof a!="string"||!cb.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let l=a,o=!1;if(Yx)try{let c=new URL(window.location.href),d=a.startsWith("//")?new URL(c.protocol+a):new URL(a),m=or(d.pathname,t);d.origin===c.origin&&m!=null?a=m+d.search+d.hash:o=!0}catch{wl(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:l,isExternal:o,to:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Lx=["POST","PUT","PATCH","DELETE"];new Set(Lx);var xb=["GET",...Lx];new Set(xb);var uf=G.createContext(null);uf.displayName="DataRouter";var Yp=G.createContext(null);Yp.displayName="DataRouterState";var _b=G.createContext(!1),Xx=G.createContext({isTransitioning:!1});Xx.displayName="ViewTransition";var Sb=G.createContext(new Map);Sb.displayName="Fetchers";var bb=G.createContext(null);bb.displayName="Await";var Ti=G.createContext(null);Ti.displayName="Navigation";var gd=G.createContext(null);gd.displayName="Location";var Dl=G.createContext({outlet:null,matches:[],isDataRoute:!1});Dl.displayName="Route";var eg=G.createContext(null);eg.displayName="RouteError";var Vx="REACT_ROUTER_ERROR",Tb="REDIRECT",Eb="ROUTE_ERROR_RESPONSE";function Cb(n){if(n.startsWith(`${Vx}:${Tb}:{`))try{let t=JSON.parse(n.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function Ab(n){if(n.startsWith(`${Vx}:${Eb}:{`))try{let t=JSON.parse(n.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new yb(t.status,t.statusText,t.data)}catch{}}function Mb(n,{relative:t}={}){ke(of(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:l}=G.useContext(Ti),{hash:o,pathname:c,search:d}=vd(n,{relative:t}),m=c;return a!=="/"&&(m=c==="/"?a:xs([a,c])),l.createHref({pathname:m,search:d,hash:o})}function of(){return G.useContext(gd)!=null}function Ol(){return ke(of(),"useLocation() may be used only in the context of a <Router> component."),G.useContext(gd).location}var kx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Qx(n){G.useContext(Ti).static||G.useLayoutEffect(n)}function qp(){let{isDataRoute:n}=G.useContext(Dl);return n?Xb():Rb()}function Rb(){ke(of(),"useNavigate() may be used only in the context of a <Router> component.");let n=G.useContext(uf),{basename:t,navigator:a}=G.useContext(Ti),{matches:l}=G.useContext(Dl),{pathname:o}=Ol(),c=JSON.stringify(tg(l)),d=G.useRef(!1);return Qx(()=>{d.current=!0}),G.useCallback((p,g={})=>{if(wl(d.current,kx),!d.current)return;if(typeof p=="number"){a.go(p);return}let x=Gp(p,JSON.parse(c),o,g.relative==="path");n==null&&t!=="/"&&(x.pathname=x.pathname==="/"?t:xs([t,x.pathname])),(g.replace?a.replace:a.push)(x,g.state,g)},[t,a,c,o,n])}var zb=G.createContext(null);function wb(n){let t=G.useContext(Dl).outlet;return G.useMemo(()=>t&&G.createElement(zb.Provider,{value:n},t),[t,n])}function vd(n,{relative:t}={}){let{matches:a}=G.useContext(Dl),{pathname:l}=Ol(),o=JSON.stringify(tg(a));return G.useMemo(()=>Gp(n,JSON.parse(o),l,t==="path"),[n,o,l,t])}function Db(n,t){return Kx(n,t)}function Kx(n,t,a){var R;ke(of(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:l}=G.useContext(Ti),{matches:o}=G.useContext(Dl),c=o[o.length-1],d=c?c.params:{},m=c?c.pathname:"/",p=c?c.pathnameBase:"/",g=c&&c.route;{let w=g&&g.path||"";Jx(m,!g||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${w}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
60
-
61
- Please change the parent <Route path="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let x=Ol(),b;if(t){let w=typeof t=="string"?rf(t):t;ke(p==="/"||((R=w.pathname)==null?void 0:R.startsWith(p)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${w.pathname}" was given in the \`location\` prop.`),b=w}else b=x;let E=b.pathname||"/",C=E;if(p!=="/"){let w=p.replace(/^\//,"").split("/");C="/"+E.replace(/^\//,"").split("/").slice(w.length).join("/")}let M=Hx(n,{pathname:C});wl(g||M!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),wl(M==null||M[M.length-1].route.element!==void 0||M[M.length-1].route.Component!==void 0||M[M.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let z=Hb(M&&M.map(w=>Object.assign({},w,{params:Object.assign({},d,w.params),pathname:xs([p,l.encodeLocation?l.encodeLocation(w.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?p:xs([p,l.encodeLocation?l.encodeLocation(w.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathnameBase])})),o,a);return t&&z?G.createElement(gd.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...b},navigationType:"POP"}},z):z}function Ob(){let n=Lb(),t=gb(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),a=n instanceof Error?n.stack:null,l="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:l},c={padding:"2px 4px",backgroundColor:l},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=G.createElement(G.Fragment,null,G.createElement("p",null,"💿 Hey developer 👋"),G.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",G.createElement("code",{style:c},"ErrorBoundary")," or"," ",G.createElement("code",{style:c},"errorElement")," prop on your route.")),G.createElement(G.Fragment,null,G.createElement("h2",null,"Unexpected Application Error!"),G.createElement("h3",{style:{fontStyle:"italic"}},t),a?G.createElement("pre",{style:o},a):null,d)}var Nb=G.createElement(Ob,null),Zx=class extends G.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,t){return t.location!==n.location||t.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:t.error,location:t.location,revalidation:n.revalidation||t.revalidation}}componentDidCatch(n,t){this.props.onError?this.props.onError(n,t):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const a=Ab(n.digest);a&&(n=a)}let t=n!==void 0?G.createElement(Dl.Provider,{value:this.props.routeContext},G.createElement(eg.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?G.createElement(Bb,{error:n},t):t}};Zx.contextType=_b;var Y0=new WeakMap;function Bb({children:n,error:t}){let{basename:a}=G.useContext(Ti);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let l=Cb(t.digest);if(l){let o=Y0.get(t);if(o)throw o;let c=qx(l.location,a);if(Yx&&!Y0.get(t))if(c.isExternal||l.reloadDocument)window.location.href=c.absoluteURL||c.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:l.replace}));throw Y0.set(t,d),d}return G.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c.absoluteURL||c.to}`})}}return n}function Ub({routeContext:n,match:t,children:a}){let l=G.useContext(uf);return l&&l.static&&l.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=t.route.id),G.createElement(Dl.Provider,{value:n},a)}function Hb(n,t=[],a){let l=a==null?void 0:a.state;if(n==null){if(!l)return null;if(l.errors)n=l.matches;else if(t.length===0&&!l.initialized&&l.matches.length>0)n=l.matches;else return null}let o=n,c=l==null?void 0:l.errors;if(c!=null){let x=o.findIndex(b=>b.route.id&&(c==null?void 0:c[b.route.id])!==void 0);ke(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),o=o.slice(0,Math.min(o.length,x+1))}let d=!1,m=-1;if(a&&l){d=l.renderFallback;for(let x=0;x<o.length;x++){let b=o[x];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(m=x),b.route.id){let{loaderData:E,errors:C}=l,M=b.route.loader&&!E.hasOwnProperty(b.route.id)&&(!C||C[b.route.id]===void 0);if(b.route.lazy||M){a.isStatic&&(d=!0),m>=0?o=o.slice(0,m+1):o=[o[0]];break}}}}let p=a==null?void 0:a.onError,g=l&&p?(x,b)=>{var E,C;p(x,{location:l.location,params:((C=(E=l.matches)==null?void 0:E[0])==null?void 0:C.params)??{},unstable_pattern:vb(l.matches),errorInfo:b})}:void 0;return o.reduceRight((x,b,E)=>{let C,M=!1,z=null,R=null;l&&(C=c&&b.route.id?c[b.route.id]:void 0,z=b.route.errorElement||Nb,d&&(m<0&&E===0?(Jx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),M=!0,R=null):m===E&&(M=!0,R=b.route.hydrateFallbackElement||null)));let w=t.concat(o.slice(0,E+1)),O=()=>{let U;return C?U=z:M?U=R:b.route.Component?U=G.createElement(b.route.Component,null):b.route.element?U=b.route.element:U=x,G.createElement(Ub,{match:b,routeContext:{outlet:x,matches:w,isDataRoute:l!=null},children:U})};return l&&(b.route.ErrorBoundary||b.route.errorElement||E===0)?G.createElement(Zx,{location:l.location,revalidation:l.revalidation,component:z,error:C,children:O(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:g}):O()},null)}function ng(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jb(n){let t=G.useContext(uf);return ke(t,ng(n)),t}function Gb(n){let t=G.useContext(Yp);return ke(t,ng(n)),t}function Yb(n){let t=G.useContext(Dl);return ke(t,ng(n)),t}function ag(n){let t=Yb(n),a=t.matches[t.matches.length-1];return ke(a.route.id,`${n} can only be used on routes that contain a unique "id"`),a.route.id}function qb(){return ag("useRouteId")}function Lb(){var l;let n=G.useContext(eg),t=Gb("useRouteError"),a=ag("useRouteError");return n!==void 0?n:(l=t.errors)==null?void 0:l[a]}function Xb(){let{router:n}=jb("useNavigate"),t=ag("useNavigate"),a=G.useRef(!1);return Qx(()=>{a.current=!0}),G.useCallback(async(o,c={})=>{wl(a.current,kx),a.current&&(typeof o=="number"?await n.navigate(o):await n.navigate(o,{fromRouteId:t,...c}))},[n,t])}var Uv={};function Jx(n,t,a){!t&&!Uv[n]&&(Uv[n]=!0,wl(!1,a))}G.memo(Vb);function Vb({routes:n,future:t,state:a,isStatic:l,onError:o}){return Kx(n,void 0,{state:a,isStatic:l,onError:o})}function kb({to:n,replace:t,state:a,relative:l}){ke(of(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=G.useContext(Ti);wl(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:c}=G.useContext(Dl),{pathname:d}=Ol(),m=qp(),p=Gp(n,tg(c),d,l==="path"),g=JSON.stringify(p);return G.useEffect(()=>{m(JSON.parse(g),{replace:t,state:a,relative:l})},[m,g,l,t,a]),null}function Hv(n){return wb(n.context)}function ps(n){ke(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Qb({basename:n="/",children:t=null,location:a,navigationType:l="POP",navigator:o,static:c=!1,unstable_useTransitions:d}){ke(!of(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=n.replace(/^\/*/,"/"),p=G.useMemo(()=>({basename:m,navigator:o,static:c,unstable_useTransitions:d,future:{}}),[m,o,c,d]);typeof a=="string"&&(a=rf(a));let{pathname:g="/",search:x="",hash:b="",state:E=null,key:C="default",unstable_mask:M}=a,z=G.useMemo(()=>{let R=or(g,m);return R==null?null:{location:{pathname:R,search:x,hash:b,state:E,key:C,unstable_mask:M},navigationType:l}},[m,g,x,b,E,C,l,M]);return wl(z!=null,`<Router basename="${m}"> is not able to match the URL "${g}${x}${b}" because it does not start with the basename, so the <Router> won't render anything.`),z==null?null:G.createElement(Ti.Provider,{value:p},G.createElement(gd.Provider,{children:t,value:z}))}function Kb({children:n,location:t}){return Db(Ay(n),t)}function Ay(n,t=[]){let a=[];return G.Children.forEach(n,(l,o)=>{if(!G.isValidElement(l))return;let c=[...t,o];if(l.type===G.Fragment){a.push.apply(a,Ay(l.props.children,c));return}ke(l.type===ps,`[${typeof l.type=="string"?l.type:l.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ke(!l.props.index||!l.props.children,"An index route cannot have child routes.");let d={id:l.props.id||c.join("-"),caseSensitive:l.props.caseSensitive,element:l.props.element,Component:l.props.Component,index:l.props.index,path:l.props.path,middleware:l.props.middleware,loader:l.props.loader,action:l.props.action,hydrateFallbackElement:l.props.hydrateFallbackElement,HydrateFallback:l.props.HydrateFallback,errorElement:l.props.errorElement,ErrorBoundary:l.props.ErrorBoundary,hasErrorBoundary:l.props.hasErrorBoundary===!0||l.props.ErrorBoundary!=null||l.props.errorElement!=null,shouldRevalidate:l.props.shouldRevalidate,handle:l.props.handle,lazy:l.props.lazy};l.props.children&&(d.children=Ay(l.props.children,c)),a.push(d)}),a}var bp="get",Tp="application/x-www-form-urlencoded";function Lp(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Zb(n){return Lp(n)&&n.tagName.toLowerCase()==="button"}function Jb(n){return Lp(n)&&n.tagName.toLowerCase()==="form"}function Fb(n){return Lp(n)&&n.tagName.toLowerCase()==="input"}function Wb(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Pb(n,t){return n.button===0&&(!t||t==="_self")&&!Wb(n)}var ep=null;function Ib(){if(ep===null)try{new FormData(document.createElement("form"),0),ep=!1}catch{ep=!0}return ep}var $b=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function q0(n){return n!=null&&!$b.has(n)?(wl(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Tp}"`),null):n}function tT(n,t){let a,l,o,c,d;if(Jb(n)){let m=n.getAttribute("action");l=m?or(m,t):null,a=n.getAttribute("method")||bp,o=q0(n.getAttribute("enctype"))||Tp,c=new FormData(n)}else if(Zb(n)||Fb(n)&&(n.type==="submit"||n.type==="image")){let m=n.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=n.getAttribute("formaction")||m.getAttribute("action");if(l=p?or(p,t):null,a=n.getAttribute("formmethod")||m.getAttribute("method")||bp,o=q0(n.getAttribute("formenctype"))||q0(m.getAttribute("enctype"))||Tp,c=new FormData(m,n),!Ib()){let{name:g,type:x,value:b}=n;if(x==="image"){let E=g?`${g}.`:"";c.append(`${E}x`,"0"),c.append(`${E}y`,"0")}else g&&c.append(g,b)}}else{if(Lp(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=bp,l=null,o=Tp,d=n}return c&&o==="text/plain"&&(d=c,c=void 0),{action:l,method:a.toLowerCase(),encType:o,formData:c,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ig(n,t){if(n===!1||n===null||typeof n>"u")throw new Error(t)}function eT(n,t,a,l){let o=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return a?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${l}`:o.pathname=`${o.pathname}.${l}`:o.pathname==="/"?o.pathname=`_root.${l}`:t&&or(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${l}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${l}`,o}async function nT(n,t){if(n.id in t)return t[n.id];try{let a=await import(n.module);return t[n.id]=a,a}catch(a){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function aT(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function iT(n,t,a){let l=await Promise.all(n.map(async o=>{let c=t.routes[o.route.id];if(c){let d=await nT(c,a);return d.links?d.links():[]}return[]}));return uT(l.flat(1).filter(aT).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function jv(n,t,a,l,o,c){let d=(p,g)=>a[g]?p.route.id!==a[g].route.id:!0,m=(p,g)=>{var x;return a[g].pathname!==p.pathname||((x=a[g].route.path)==null?void 0:x.endsWith("*"))&&a[g].params["*"]!==p.params["*"]};return c==="assets"?t.filter((p,g)=>d(p,g)||m(p,g)):c==="data"?t.filter((p,g)=>{var b;let x=l.routes[p.route.id];if(!x||!x.hasLoader)return!1;if(d(p,g)||m(p,g))return!0;if(p.route.shouldRevalidate){let E=p.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((b=a[0])==null?void 0:b.params)||{},nextUrl:new URL(n,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof E=="boolean")return E}return!0}):[]}function lT(n,t,{includeHydrateFallback:a}={}){return sT(n.map(l=>{let o=t.routes[l.route.id];if(!o)return[];let c=[o.module];return o.clientActionModule&&(c=c.concat(o.clientActionModule)),o.clientLoaderModule&&(c=c.concat(o.clientLoaderModule)),a&&o.hydrateFallbackModule&&(c=c.concat(o.hydrateFallbackModule)),o.imports&&(c=c.concat(o.imports)),c}).flat(1))}function sT(n){return[...new Set(n)]}function rT(n){let t={},a=Object.keys(n).sort();for(let l of a)t[l]=n[l];return t}function uT(n,t){let a=new Set;return new Set(t),n.reduce((l,o)=>{let c=JSON.stringify(rT(o));return a.has(c)||(a.add(c),l.push({key:c,link:o})),l},[])}function Fx(){let n=G.useContext(uf);return ig(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function oT(){let n=G.useContext(Yp);return ig(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var lg=G.createContext(void 0);lg.displayName="FrameworkContext";function Wx(){let n=G.useContext(lg);return ig(n,"You must render this element inside a <HydratedRouter> element"),n}function cT(n,t){let a=G.useContext(lg),[l,o]=G.useState(!1),[c,d]=G.useState(!1),{onFocus:m,onBlur:p,onMouseEnter:g,onMouseLeave:x,onTouchStart:b}=t,E=G.useRef(null);G.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let z=w=>{w.forEach(O=>{d(O.isIntersecting)})},R=new IntersectionObserver(z,{threshold:.5});return E.current&&R.observe(E.current),()=>{R.disconnect()}}},[n]),G.useEffect(()=>{if(l){let z=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(z)}}},[l]);let C=()=>{o(!0)},M=()=>{o(!1),d(!1)};return a?n!=="intent"?[c,E,{}]:[c,E,{onFocus:Qh(m,C),onBlur:Qh(p,M),onMouseEnter:Qh(g,C),onMouseLeave:Qh(x,M),onTouchStart:Qh(b,C)}]:[!1,E,{}]}function Qh(n,t){return a=>{n&&n(a),a.defaultPrevented||t(a)}}function fT({page:n,...t}){let{router:a}=Fx(),l=G.useMemo(()=>Hx(a.routes,n,a.basename),[a.routes,n,a.basename]);return l?G.createElement(dT,{page:n,matches:l,...t}):null}function hT(n){let{manifest:t,routeModules:a}=Wx(),[l,o]=G.useState([]);return G.useEffect(()=>{let c=!1;return iT(n,t,a).then(d=>{c||o(d)}),()=>{c=!0}},[n,t,a]),l}function dT({page:n,matches:t,...a}){let l=Ol(),{future:o,manifest:c,routeModules:d}=Wx(),{basename:m}=Fx(),{loaderData:p,matches:g}=oT(),x=G.useMemo(()=>jv(n,t,g,c,l,"data"),[n,t,g,c,l]),b=G.useMemo(()=>jv(n,t,g,c,l,"assets"),[n,t,g,c,l]),E=G.useMemo(()=>{if(n===l.pathname+l.search+l.hash)return[];let z=new Set,R=!1;if(t.forEach(O=>{var Y;let U=c.routes[O.route.id];!U||!U.hasLoader||(!x.some(k=>k.route.id===O.route.id)&&O.route.id in p&&((Y=d[O.route.id])!=null&&Y.shouldRevalidate)||U.hasClientLoader?R=!0:z.add(O.route.id))}),z.size===0)return[];let w=eT(n,m,o.unstable_trailingSlashAwareDataRequests,"data");return R&&z.size>0&&w.searchParams.set("_routes",t.filter(O=>z.has(O.route.id)).map(O=>O.route.id).join(",")),[w.pathname+w.search]},[m,o.unstable_trailingSlashAwareDataRequests,p,l,c,x,t,n,d]),C=G.useMemo(()=>lT(b,c),[b,c]),M=hT(b);return G.createElement(G.Fragment,null,E.map(z=>G.createElement("link",{key:z,rel:"prefetch",as:"fetch",href:z,...a})),C.map(z=>G.createElement("link",{key:z,rel:"modulepreload",href:z,...a})),M.map(({key:z,link:R})=>G.createElement("link",{key:z,nonce:a.nonce,...R,crossOrigin:R.crossOrigin??a.crossOrigin})))}function mT(...n){return t=>{n.forEach(a=>{typeof a=="function"?a(t):a!=null&&(a.current=t)})}}var pT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{pT&&(window.__reactRouterVersion="7.13.1")}catch{}function yT({basename:n,children:t,unstable_useTransitions:a,window:l}){let o=G.useRef();o.current==null&&(o.current=ZS({window:l,v5Compat:!0}));let c=o.current,[d,m]=G.useState({action:c.action,location:c.location}),p=G.useCallback(g=>{a===!1?m(g):G.startTransition(()=>m(g))},[a]);return G.useLayoutEffect(()=>c.listen(p),[c,p]),G.createElement(Qb,{basename:n,children:t,location:d.location,navigationType:d.action,navigator:c,unstable_useTransitions:a})}var Px=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ix=G.forwardRef(function({onClick:t,discover:a="render",prefetch:l="none",relative:o,reloadDocument:c,replace:d,unstable_mask:m,state:p,target:g,to:x,preventScrollReset:b,viewTransition:E,unstable_defaultShouldRevalidate:C,...M},z){let{basename:R,navigator:w,unstable_useTransitions:O}=G.useContext(Ti),U=typeof x=="string"&&Px.test(x),Y=qx(x,R);x=Y.to;let k=Mb(x,{relative:o}),V=Ol(),Z=null;if(m){let St=Gp(m,[],V.unstable_mask?V.unstable_mask.pathname:"/",!0);R!=="/"&&(St.pathname=St.pathname==="/"?R:xs([R,St.pathname])),Z=w.createHref(St)}let[F,q,$]=cT(l,M),et=xT(x,{replace:d,unstable_mask:m,state:p,target:g,preventScrollReset:b,relative:o,viewTransition:E,unstable_defaultShouldRevalidate:C,unstable_useTransitions:O});function ct(St){t&&t(St),St.defaultPrevented||et(St)}let vt=!(Y.isExternal||c),dt=G.createElement("a",{...M,...$,href:(vt?Z:void 0)||Y.absoluteURL||k,onClick:vt?ct:t,ref:mT(z,q),target:g,"data-discover":!U&&a==="render"?"true":void 0});return F&&!U?G.createElement(G.Fragment,null,dt,G.createElement(fT,{page:k})):dt});Ix.displayName="Link";var $x=G.forwardRef(function({"aria-current":t="page",caseSensitive:a=!1,className:l="",end:o=!1,style:c,to:d,viewTransition:m,children:p,...g},x){let b=vd(d,{relative:g.relative}),E=Ol(),C=G.useContext(Yp),{navigator:M,basename:z}=G.useContext(Ti),R=C!=null&&ET(b)&&m===!0,w=M.encodeLocation?M.encodeLocation(b).pathname:b.pathname,O=E.pathname,U=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;a||(O=O.toLowerCase(),U=U?U.toLowerCase():null,w=w.toLowerCase()),U&&z&&(U=or(U,z)||U);const Y=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let k=O===w||!o&&O.startsWith(w)&&O.charAt(Y)==="/",V=U!=null&&(U===w||!o&&U.startsWith(w)&&U.charAt(w.length)==="/"),Z={isActive:k,isPending:V,isTransitioning:R},F=k?t:void 0,q;typeof l=="function"?q=l(Z):q=[l,k?"active":null,V?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let $=typeof c=="function"?c(Z):c;return G.createElement(Ix,{...g,"aria-current":F,className:q,ref:x,style:$,to:d,viewTransition:m},typeof p=="function"?p(Z):p)});$x.displayName="NavLink";var gT=G.forwardRef(({discover:n="render",fetcherKey:t,navigate:a,reloadDocument:l,replace:o,state:c,method:d=bp,action:m,onSubmit:p,relative:g,preventScrollReset:x,viewTransition:b,unstable_defaultShouldRevalidate:E,...C},M)=>{let{unstable_useTransitions:z}=G.useContext(Ti),R=bT(),w=TT(m,{relative:g}),O=d.toLowerCase()==="get"?"get":"post",U=typeof m=="string"&&Px.test(m),Y=k=>{if(p&&p(k),k.defaultPrevented)return;k.preventDefault();let V=k.nativeEvent.submitter,Z=(V==null?void 0:V.getAttribute("formmethod"))||d,F=()=>R(V||k.currentTarget,{fetcherKey:t,method:Z,navigate:a,replace:o,state:c,relative:g,preventScrollReset:x,viewTransition:b,unstable_defaultShouldRevalidate:E});z&&a!==!1?G.startTransition(()=>F()):F()};return G.createElement("form",{ref:M,method:O,action:w,onSubmit:l?p:Y,...C,"data-discover":!U&&n==="render"?"true":void 0})});gT.displayName="Form";function vT(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function t_(n){let t=G.useContext(uf);return ke(t,vT(n)),t}function xT(n,{target:t,replace:a,unstable_mask:l,state:o,preventScrollReset:c,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:p,unstable_useTransitions:g}={}){let x=qp(),b=Ol(),E=vd(n,{relative:d});return G.useCallback(C=>{if(Pb(C,t)){C.preventDefault();let M=a!==void 0?a:cd(b)===cd(E),z=()=>x(n,{replace:M,unstable_mask:l,state:o,preventScrollReset:c,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:p});g?G.startTransition(()=>z()):z()}},[b,x,E,a,l,o,t,n,c,d,m,p,g])}var _T=0,ST=()=>`__${String(++_T)}__`;function bT(){let{router:n}=t_("useSubmit"),{basename:t}=G.useContext(Ti),a=qb(),l=n.fetch,o=n.navigate;return G.useCallback(async(c,d={})=>{let{action:m,method:p,encType:g,formData:x,body:b}=tT(c,t);if(d.navigate===!1){let E=d.fetcherKey||ST();await l(E,a,d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:x,body:b,formMethod:d.method||p,formEncType:d.encType||g,flushSync:d.flushSync})}else await o(d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:x,body:b,formMethod:d.method||p,formEncType:d.encType||g,replace:d.replace,state:d.state,fromRouteId:a,flushSync:d.flushSync,viewTransition:d.viewTransition})},[l,o,t,a])}function TT(n,{relative:t}={}){let{basename:a}=G.useContext(Ti),l=G.useContext(Dl);ke(l,"useFormAction must be used inside a RouteContext");let[o]=l.matches.slice(-1),c={...vd(n||".",{relative:t})},d=Ol();if(n==null){c.search=d.search;let m=new URLSearchParams(c.search),p=m.getAll("index");if(p.some(x=>x==="")){m.delete("index"),p.filter(b=>b).forEach(b=>m.append("index",b));let x=m.toString();c.search=x?`?${x}`:""}}return(!n||n===".")&&o.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(c.pathname=c.pathname==="/"?a:xs([a,c.pathname])),cd(c)}function ET(n,{relative:t}={}){let a=G.useContext(Xx);ke(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:l}=t_("useViewTransitionState"),o=vd(n,{relative:t});if(!a.isTransitioning)return!1;let c=or(a.currentLocation.pathname,l)||a.currentLocation.pathname,d=or(a.nextLocation.pathname,l)||a.nextLocation.pathname;return Mp(o.pathname,d)!=null||Mp(o.pathname,c)!=null}const Gv=n=>{let t;const a=new Set,l=(g,x)=>{const b=typeof g=="function"?g(t):g;if(!Object.is(b,t)){const E=t;t=x??(typeof b!="object"||b===null)?b:Object.assign({},t,b),a.forEach(C=>C(t,E))}},o=()=>t,m={setState:l,getState:o,getInitialState:()=>p,subscribe:g=>(a.add(g),()=>a.delete(g))},p=t=n(l,o,m);return m},CT=(n=>n?Gv(n):Gv),AT=n=>n;function MT(n,t=AT){const a=tp.useSyncExternalStore(n.subscribe,tp.useCallback(()=>t(n.getState()),[n,t]),tp.useCallback(()=>t(n.getInitialState()),[n,t]));return tp.useDebugValue(a),a}const Yv=n=>{const t=CT(n),a=l=>MT(t,l);return Object.assign(a,t),a},cf=(n=>n?Yv(n):Yv),zl=cf(n=>({user:null,isAuthenticated:!1,loading:!1,error:null,login:async(t,a)=>{n({loading:!0,error:null});try{const l=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t,password:a}),credentials:"include"}),o=await l.json();if(!l.ok){n({loading:!1,error:o.error||"Login failed"});return}n({user:o.user,isAuthenticated:!0,loading:!1,error:null})}catch{n({loading:!1,error:"Network error"})}},logout:async()=>{try{await fetch("/api/auth/logout",{method:"POST",credentials:"include"})}catch{}n({user:null,isAuthenticated:!1,error:null})},checkAuth:async()=>{n({loading:!0});try{const t=await fetch("/api/auth/me",{credentials:"include"});if(t.ok){const a=await t.json();n({user:a.user,isAuthenticated:!0,loading:!1})}else n({user:null,isAuthenticated:!1,loading:!1})}catch{n({user:null,isAuthenticated:!1,loading:!1})}},reset:()=>n({user:null,isAuthenticated:!1,loading:!1,error:null})})),ti=cf((n,t)=>({squads:[],selectedSquad:null,activeStates:{},fetchSquads:async()=>{try{const a=await fetch("/api/squads",{credentials:"include"});if(a.ok){const l=await a.json();n({squads:l.squads})}}catch{}},selectSquad:a=>n({selectedSquad:a}),setSquadState:(a,l)=>n(o=>({activeStates:{...o.activeStates,[a]:l}})),clearSquadState:a=>n(l=>{const{[a]:o,...c}=l.activeStates;return{activeStates:c}}),reset:()=>n({squads:[],selectedSquad:null,activeStates:{}})}));let RT=0;function qv(){return`local-${Date.now()}-${++RT}`}const Fi=cf((n,t)=>({messages:[],conversationId:null,streaming:!1,streamingText:"",error:null,addUserMessage:a=>{const l={id:qv(),role:"user",content:a,createdAt:new Date().toISOString()};n(o=>({messages:[...o.messages,l],error:null}))},setConversationId:a=>{n({conversationId:a})},startStreaming:()=>{n({streaming:!0,streamingText:"",error:null})},appendChunk:a=>{n(l=>({streamingText:l.streamingText+a}))},finishStreaming:a=>{const{streamingText:l}=t(),o={id:a,role:"assistant",content:l,createdAt:new Date().toISOString()};n(c=>({messages:[...c.messages,o],streaming:!1,streamingText:""}))},addAgentDm:a=>{const l={id:qv(),role:"agent_dm",content:a.content,agentId:a.agentId,agentName:a.agentName,createdAt:new Date().toISOString()};n(o=>({messages:[...o.messages,l]}))},setError:a=>{n({error:a,streaming:!1,streamingText:""})},loadHistory:async a=>{try{const l=await fetch(`/api/squads/${a}/conversations`,{credentials:"include"});if(!l.ok)return;const o=await l.json();if(!o.data||o.data.length===0){n({conversationId:null,messages:[]});return}const c=o.data[0];n({conversationId:c.id});const d=await fetch(`/api/conversations/${c.id}/messages`,{credentials:"include"});if(!d.ok)return;const p=((await d.json()).data||[]).map(g=>({id:g.id,role:g.role,content:g.content,agentId:g.agent_id??void 0,agentName:g.agent_name??void 0,createdAt:g.created_at}));n({messages:p})}catch{}},reset:()=>n({messages:[],conversationId:null,streaming:!1,streamingText:"",error:null})}));function zT(n){const a=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`,l=new WebSocket(a),o=[];let c=!0;function d(m){l.readyState===WebSocket.OPEN?l.send(JSON.stringify(m)):l.readyState===WebSocket.CONNECTING&&o.push(m)}return l.onopen=()=>{var m,p;c||(p=(m=n.current).onReconnect)==null||p.call(m),c=!1;for(const g of o)l.send(JSON.stringify(g));o.length=0},l.onmessage=m=>{var p,g,x,b,E,C,M,z,R,w,O,U,Y,k,V,Z;try{const F=JSON.parse(m.data),q=n.current;switch(F.type){case"squad:state":(p=q.onSquadState)==null||p.call(q,F.squadName,F.state);break;case"squad:inactive":(g=q.onSquadInactive)==null||g.call(q,F.squadName,F.reason);break;case"chat:chunk":(x=q.onChatChunk)==null||x.call(q,F.squadName,F.conversationId,F.delta);break;case"chat:done":(b=q.onChatDone)==null||b.call(q,F.squadName,F.conversationId,F.messageId);break;case"chat:error":(E=q.onChatError)==null||E.call(q,F.squadName,F.error);break;case"chat:agent_dm":(C=q.onChatAgentDm)==null||C.call(q,F.squadName,F.conversationId,F.agentId,F.agentName,F.message);break;case"chat:conversation_created":(M=q.onChatConversationCreated)==null||M.call(q,F.squadName,F.conversationId);break;case"agent:output_chunk":(z=q.onAgentOutputChunk)==null||z.call(q,F.squadName,F.agentId,F.agentName,F.delta);break;case"agent:step_start":(R=q.onAgentStepStart)==null||R.call(q,F.squadName,F.agentId,F.agentName,F.stepIndex,F.stepLabel);break;case"agent:step_complete":(w=q.onAgentStepComplete)==null||w.call(q,F.squadName,F.agentId,F.agentName,F.stepIndex,F.stepLabel);break;case"squad:checkpoint":(O=q.onSquadCheckpoint)==null||O.call(q,F.squadName,F.agentId,F.agentName,F.question);break;case"schedule:started":(U=q.onScheduleStarted)==null||U.call(q,F.squadName,F.jobId,F.attempt);break;case"schedule:chunk":(Y=q.onScheduleChunk)==null||Y.call(q,F.squadName,F.jobId,F.delta);break;case"schedule:done":(k=q.onScheduleDone)==null||k.call(q,F.squadName,F.jobId,F.summary,F.attempt);break;case"schedule:error":(V=q.onScheduleError)==null||V.call(q,F.squadName,F.jobId,F.error,F.attempt,F.willRetry);break;case"schedule:status_changed":(Z=q.onScheduleStatusChanged)==null||Z.call(q,F.squadName,F.status);break}}catch{}},{subscribe:m=>{d({type:"squad:subscribe",squadName:m})},unsubscribe:m=>{d({type:"squad:unsubscribe",squadName:m})},sendChat:(m,p)=>{d({type:"chat:send",squadName:m,message:p})},newConversation:m=>{d({type:"chat:new_conversation",squadName:m})},sendCheckpointResponse:(m,p)=>{d({type:"squad:checkpoint_response",squadName:m,answer:p})},disconnect:()=>{l.close()}}}function wT(n={}){const t=G.useRef(null),a=G.useRef(n),l=G.useRef(new Set);a.current=n,G.useEffect(()=>{const p=zT(a);t.current=p;for(const g of l.current)p.subscribe(g);return()=>{p.disconnect()}},[]);const o=G.useCallback(p=>{var g;l.current.add(p),(g=t.current)==null||g.subscribe(p)},[]),c=G.useCallback(p=>{var g;l.current.delete(p),(g=t.current)==null||g.unsubscribe(p)},[]),d=G.useCallback((p,g)=>{var x;(x=t.current)==null||x.sendChat(p,g)},[]),m=G.useCallback((p,g)=>{var x;(x=t.current)==null||x.sendCheckpointResponse(p,g)},[]);return{subscribe:o,unsubscribe:c,sendChat:d,sendCheckpointResponse:m}}const DT={idle:{color:"var(--status-idle)",glow:"none",icon:"○"},working:{color:"var(--status-active)",glow:"0 0 6px var(--status-active-glow)",icon:"●"},delivering:{color:"var(--accent)",glow:"0 0 6px var(--accent-glow)",icon:"→"},done:{color:"var(--status-active)",glow:"none",icon:"✓"},checkpoint:{color:"var(--status-warning)",glow:"0 0 6px var(--status-warning-glow)",icon:"◆"},running:{color:"var(--status-active)",glow:"0 0 6px var(--status-active-glow)",icon:"●"},completed:{color:"var(--status-active)",glow:"none",icon:"✓"}},OT={color:"var(--status-idle)",glow:"none"};function NT({status:n}){if(!n)return null;const t=DT[n]||OT;return H.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,fontFamily:"var(--font-mono)",fontSize:"0.68rem",color:t.color,letterSpacing:"0.02em"},children:[H.jsx("span",{style:{display:"inline-block",width:6,height:6,borderRadius:"50%",background:t.color,boxShadow:t.glow,animation:n==="working"||n==="running"?"statusPulse 2s ease-in-out infinite":"none"}}),n]})}function BT({squad:n,selected:t,onClick:a}){return H.jsxs("div",{onClick:a,style:{padding:"8px 10px",cursor:"pointer",borderRadius:"var(--radius-sm)",background:t?"var(--accent-glow)":"transparent",borderLeft:t?"2px solid var(--accent)":"2px solid transparent",marginBottom:2,transition:"all var(--duration-fast) var(--ease-out)"},children:[H.jsx("div",{style:{fontSize:"0.82rem",fontWeight:t?600:400,color:t?"var(--text-primary)":"var(--text-secondary)",marginBottom:2},children:n.name}),H.jsx(NT,{status:n.status})]})}function UT({squads:n,selectedSquad:t,onSelect:a}){return H.jsxs("div",{style:{padding:"var(--sp-3)"},children:[H.jsx("div",{style:{fontFamily:"var(--font-mono)",fontSize:"0.6rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.1em",padding:"0 var(--sp-2)",marginBottom:"var(--sp-2)"},children:"Squads"}),n.length===0&&H.jsx("div",{style:{padding:"8px 10px",color:"var(--text-muted)",fontSize:"0.75rem",fontStyle:"italic"},children:"No squads found"}),n.map(l=>H.jsx(BT,{squad:l,selected:l.code===t,onClick:()=>a(l.code)},l.code))]})}function HT(n){const t=Math.floor(n/3600),a=Math.floor(n%3600/60),l=n%60,o=c=>c.toString().padStart(2,"0");return t>0?`${t}h ${o(a)}m ${o(l)}s`:`${a}m ${o(l)}s`}function jT({state:n}){const[t,a]=G.useState(0);return G.useEffect(()=>{if(!(n!=null&&n.startedAt)||n.status!=="running"){a(0);return}const l=new Date(n.startedAt).getTime(),o=()=>a(Math.floor((Date.now()-l)/1e3));o();const c=setInterval(o,1e3);return()=>clearInterval(c)},[n==null?void 0:n.startedAt,n==null?void 0:n.status]),H.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:"var(--statusbar-height)",padding:"0 var(--sp-4)",background:"var(--surface-1)",borderTop:"1px solid var(--border-subtle)",fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-muted)"},children:n?H.jsxs(H.Fragment,{children:[H.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-3)"},children:[H.jsx("span",{style:{display:"inline-block",width:6,height:6,borderRadius:"50%",background:n.status==="running"?"var(--status-active)":n.status==="checkpoint"?"var(--status-warning)":"var(--status-idle)",boxShadow:n.status==="running"?"0 0 8px var(--status-active-glow)":"none",animation:n.status==="running"?"statusPulse 2s ease-in-out infinite":"none"}}),H.jsxs("span",{style:{color:"var(--text-secondary)"},children:["Step ",n.step.current,"/",n.step.total]}),H.jsx("span",{style:{color:"var(--border-strong)"},children:"│"}),H.jsx("span",{children:n.step.label})]}),H.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-3)"},children:[n.handoff&&H.jsxs("span",{style:{color:"var(--accent)"},children:[n.handoff.from," → ",n.handoff.to]}),n.status==="running"&&H.jsx("span",{style:{color:"var(--text-secondary)"},children:HT(t)})]})]}):H.jsxs(H.Fragment,{children:[H.jsx("span",{children:"Ready"}),H.jsx("span",{children:"ExpxAgents Mission Control"})]})})}let My=null;function GT(n){My=n}function YT(n,t){My&&My(n,t)}let Ry=null;function qT(n){Ry=n}function LT(n,t){Ry&&Ry(n,t)}const Ep=32,Ml=96,nu=64,Yt={floor:13158600,floorHighlight:14211288,floorGrout:12105912,wall:15261904,wallTrim:11577496,baseboard:7035464,desk:15263976,deskTop:16119285,deskShadow:13684944,deskLeg:1710618,deskEdge:14737632,monitor:2236976,monitorScreen:1981020,monitorScreenGlow:2773120,monitorStand:3355456,keyboard:3355456,keyboardKey:4473941,chairSeat:2899536,chairBack:3426654,chairBase:4473924,chairWheel:3355443,plant:5025616,plantDark:3706428,plantLight:6732650,pot:9133628,potRim:10515018,soil:4863264,bookshelf:8020808,bookshelfEdge:9139029,bookColors:[15022389,2001125,4431943,16750592,9315498,35195,16635957],rug:6044974,rugPattern:8016448,rugBorder:4861472},zy=[5227511,5025616,16750592,15022389,9315498,16771899],XT={idle:8947848,working:5025616,delivering:5227511,done:5025616,checkpoint:16750592},pa={counter:4073251,counterTop:6111287,machine:3622735,machineTop:4545124,machineLight:5025616,cup:14142664,cupShadow:12364452,saucer:14735052,sink:7901340,faucet:11583173,menu:5125166},vi={table:6111287,tableTop:7162945,tableEdge:5125166,tableLeg:4073251,chair:3622735,chairSeat:4545124,chairBack:5533306,carpet:2503224,carpetPattern:3030340,whiteboard:15527921,whiteboardFrame:7901340},vo={background:1713022,backgroundGlow:2635155,statusRunning:5025616,statusIdle:8947848,statusCheckpoint:16750592,statusCompleted:5025616},iu={floor:11579568,tile:11053224,grout:10066329,stripe:12632256},ja={floor:14477552,tile:12966120,tileGrout:11453652,wall:14740208,stall:11583173,stallDoor:9479342,sink:15527921,sinkBowl:16777215,mirror:11789820,mirrorFrame:7901340,toilet:16448250,toiletSeat:15658734,pipe:9479342},Ia={floor:6111287,carpet:5125166,carpetBorder:4073251,desk:4073251,deskTop:6111287,deskEdge:2890510,chair:1713022,chairSeat:2635155,window:8508666,windowFrame:5533306,windowSill:7901340,bookshelf:7162945,globe:4367861,nameplate:16766720},$c={wall:7901340,wallHighlight:10795204,doorFrame:6111287},qn={floor:16115411,tile:15259072,tileGrout:13942952,counter:6111287,counterTop:7951688,fridge:15527921,fridgeDoor:14737632,fridgeHandle:10395294,table:9268835,tableTop:10586239,chair:7162945,coffeeMaker:3622735,coffeeMakerLight:5025616,lamp:16766287},$a={floor:14142664,carpet:6323595,carpetBorder:4545124,sofa:5533306,sofaCushion:6323595,sofaArm:4545124,tv:2171169,tvScreen:2503224,tvStand:4342338,sideTable:7951688,magazine:15684432,magazineAlt:4367861},ir=480,_i=360,uo=400,Rn=60,xi=120,L0=120,Lv=160,Xv=120,Vv=160,VT=64,kT=80,QT=Ml+32,KT=nu+48,kv=2,e_=10,er=80;function np(n,t,a){const l=Math.max(0,Math.min(1,a));return n+(t-n)*l}function ZT(n){return n<.5?2*n*n:1-Math.pow(-2*n+2,2)/2}const JT=["nw","ne","sw","se"],FT={nw:"right",ne:"left",sw:"top",se:"top"};function Rp(n){const t=e_,a=Math.max(1,n),l={nw:0,ne:0,sw:0,se:0},o=[];for(let rt=0;rt<a;rt++){const gt=JT[rt%4];o.push({quadrant:gt,slot:l[gt]}),l[gt]++}const c=Math.max(1,l.nw),d=Math.max(1,l.ne),m=Math.max(1,l.sw),p=Math.max(1,l.se),g=Math.max(uo,xi),x=c*(_i+t),b=d*(_i+t),E=Math.max(x+g,b+xi),C=m*(_i+t),M=p*(_i+t),z=Math.max(Lv,Vv),R=Math.max(C+z+t,M+z+t),w=Math.max(ir,xi+t+uo),O=Math.max(ir,xi),U=Math.max(ir,L0),Y=Math.max(ir,Xv),k=Math.max(w,U),V=Math.max(O,Y),Z=t+k+t+Rn+t+V+t,F=t+E+t+Rn+t+R+t,q={x:t+k+t,y:t,width:Rn,height:F-2*t},$={x:t,y:t+E+t,width:Z-2*t,height:Rn},et={x:q.x+q.width/2,y:$.y+$.height/2},ct={x:q.x-t-uo,y:$.y-t-uo,width:uo,height:uo},vt={x:ct.x-t-xi,y:$.y-t-xi,width:xi,height:xi},dt={x:q.x+Rn+t,y:$.y-t-xi,width:xi,height:xi},St={x:q.x-t-L0,y:$.y+Rn+t+m*(_i+t),width:L0,height:Lv},j={x:q.x+Rn+t,y:$.y+Rn+t+p*(_i+t),width:Xv,height:Vv},Q=[],ot={};for(let rt=0;rt<a;rt++){const{quadrant:gt,slot:B}=o[rt],J=FT[gt];let tt;gt==="nw"?tt={x:q.x-t-ir,y:ct.y-t-(B+1)*_i-B*t}:gt==="ne"?tt={x:q.x+Rn+t,y:dt.y-t-(B+1)*_i-B*t}:gt==="sw"?tt={x:q.x-t-ir,y:$.y+Rn+t+B*(_i+t)}:tt={x:q.x+Rn+t,y:$.y+Rn+t+B*(_i+t)},Q.push({origin:tt,width:ir,height:_i,quadrant:gt,doorSide:J}),J==="right"||J==="left"?ot[`squad-${rt}`]={x:q.x+Rn/2,y:tt.y+_i/2}:ot[`squad-${rt}`]={x:tt.x+ir/2,y:$.y+Rn/2}}return ot.ceo={x:q.x+Rn/2,y:ct.y+uo/2},ot["bathroom-male"]={x:vt.x+xi/2,y:$.y+Rn/2},ot["bathroom-female"]={x:dt.x+xi/2,y:$.y+Rn/2},ot.kitchen={x:q.x+Rn/2,y:St.y+St.height/2},ot["rest-area"]={x:q.x+Rn/2,y:j.y+j.height/2},{totalWidth:Z,totalHeight:F,squadOrigins:Q,ceoOffice:ct,corridorH:$,corridorV:q,bathroomMale:vt,bathroomFemale:dt,kitchen:St,restArea:j,doorPoints:ot,corridorHub:et}}function Ic(n,t,a,l){const o=n%kv,c=Math.floor(n/kv);return{x:t.x+VT+o*QT,y:t.y+kT+c*KT}}function id(n,t,a){return{x:n.x+t-80,y:n.y+a-80}}function n_(n,t,a){return{x:n.x+t-160,y:n.y+Math.floor(a/2)}}function WT(n,t){const a=t==="male"?n.bathroomMale:n.bathroomFemale;return{x:a.x+a.width/2,y:a.y+a.height/2}}function PT(n){return{x:n.kitchen.x+n.kitchen.width/2,y:n.kitchen.y+n.kitchen.height/2}}function IT(n){return{x:n.restArea.x+n.restArea.width/2,y:n.restArea.y+n.restArea.height/2}}function $T(n){const t=n.corridorV;if(t.height>0&&Math.random()<.5)return{x:t.x+10+Math.random()*Math.max(0,t.width-20),y:t.y+10+Math.random()*Math.max(0,t.height-20)};const a=n.corridorH;return{x:a.x+20+Math.random()*Math.max(0,a.width-40),y:a.y+10+Math.random()*Math.max(0,a.height-20)}}function Qv(n,t){const a=t.corridorH;return n.x>=a.x&&n.x<=a.x+a.width&&n.y>=a.y&&n.y<=a.y+a.height}function Kv(n,t){const a=t.corridorV;return n.x>=a.x&&n.x<=a.x+a.width&&n.y>=a.y&&n.y<=a.y+a.height}function t3(n,t){if(n==="ceo"){const l=t.ceoOffice;return{x:l.x+l.width/2,y:l.y+l.height/2}}if(n==="bathroom-male"){const l=t.bathroomMale;return{x:l.x+l.width/2,y:l.y+l.height/2}}if(n==="bathroom-female"){const l=t.bathroomFemale;return{x:l.x+l.width/2,y:l.y+l.height/2}}if(n==="kitchen"){const l=t.kitchen;return{x:l.x+l.width/2,y:l.y+l.height/2}}if(n==="rest-area"){const l=t.restArea;return{x:l.x+l.width/2,y:l.y+l.height/2}}const a=n.match(/^squad-(\d+)$/);if(a){const l=parseInt(a[1],10),o=t.squadOrigins[l];if(o)return{x:o.origin.x+o.width/2,y:o.origin.y+o.height/2}}return t.corridorHub}function ld(n,t,a,l){const o=l.doorPoints[t],c=l.doorPoints[a];if(!o||!c)return[n];const d=l.corridorHub,m=t3(a,l),p=Qv(o,l)&&Qv(c,l),g=Kv(o,l)&&Kv(c,l);return p||g?[n,o,c,m]:[n,o,d,c,m]}function ap(n,t){const a=n.x-t.x,l=n.y-t.y;return Math.sqrt(a*a+l*l)}const Zv=500,Jv=50;let Fv=0;function Wv(n){return{idle:"idle",working:"working",delivering:"walking",done:"idle",checkpoint:"checkpoint"}[n]??"idle"}const We=cf(n=>({rooms:[],activeRoom:null,bubbles:{},activityLog:{},checkpoints:{},agentVisuals:{},appendBubble:(t,a,l)=>{const o=`${t}:${a}`;n(c=>{var p;let m=(((p=c.bubbles[o])==null?void 0:p.text)??"")+l;return m.length>Zv&&(m=m.slice(m.length-Zv)),{bubbles:{...c.bubbles,[o]:{text:m,updatedAt:Date.now()}}}})},clearBubble:(t,a)=>{const l=`${t}:${a}`;n(o=>{const{[l]:c,...d}=o.bubbles;return{bubbles:d}})},clearAllBubbles:()=>n({bubbles:{}}),addActivity:(t,a,l)=>{const c={id:++Fv,agentName:a,action:l,timestamp:Date.now()};n(d=>{var x;const p=[...((x=d.activityLog[t])==null?void 0:x.entries)??[],c],g=p.length>Jv?p.slice(p.length-Jv):p;return{activityLog:{...d.activityLog,[t]:{entries:g}}}})},setCheckpoint:(t,a,l,o)=>n(c=>({checkpoints:{...c.checkpoints,[t]:{agentId:a,agentName:l,question:o}}})),clearCheckpoint:t=>n(a=>{const{[t]:l,...o}=a.checkpoints;return{checkpoints:o}}),setActiveRoom:t=>n({activeRoom:t}),syncRooms:t=>n(a=>{const l=t;let o;return l.length===0?o=null:a.activeRoom===null||!l.includes(a.activeRoom)?o=l[0]:o=a.activeRoom,{rooms:l,activeRoom:o}}),setAgents:(t,a)=>n(l=>{const o=l.agentVisuals[t]??[],c=new Map(o.map(C=>[C.id,C])),d={x:0,y:0},m=Rp(l.rooms.length),p=l.rooms.indexOf(t),g=m.squadOrigins[p],x=(g==null?void 0:g.width)??480,b=(g==null?void 0:g.height)??360,E=a.map((C,M)=>{const z=c.get(C.id);if(z){const O=C.status?Wv(C.status):z.status,U=O!==z.status;let Y=z.targetPosition;return U&&(O==="working"||O==="checkpoint"?Y=Ic(M,d):Y=id(d,x,b)),{...z,name:C.name,deskIndex:M,status:O,targetPosition:Y}}const R=C.status?Wv(C.status):"idle",w=R==="working"||R==="checkpoint"?Ic(M,d):id(d,x,b);return{id:C.id,name:C.name,colorIndex:M%6,status:R,deskIndex:M,position:w,targetPosition:null}});return{agentVisuals:{...l.agentVisuals,[t]:E}}}),setAgentStatus:(t,a,l)=>n(o=>{const c=o.agentVisuals[t];if(!c)return o;const d={x:0,y:0},m=Rp(o.rooms.length),p=o.rooms.indexOf(t),g=m.squadOrigins[p],x=(g==null?void 0:g.width)??480,b=(g==null?void 0:g.height)??360,E=c.map(C=>{if(C.id!==a)return C;let M;return l==="working"||l==="checkpoint"?M=Ic(C.deskIndex,d):M=id(d,x,b),{...C,status:l,targetPosition:M}});return{agentVisuals:{...o.agentVisuals,[t]:E}}}),reset:()=>{Fv=0,n({rooms:[],activeRoom:null,bubbles:{},activityLog:{},checkpoints:{},agentVisuals:{}})}})),kM={background:"#0a0a0f",grid:"rgba(0, 200, 255, 0.06)",orbStandby:"#1a3a5c",orbListening:"#00c8ff",orbProcessing:"#ff8c00",orbSpeaking:"#00ff88",panelBg:"rgba(0, 200, 255, 0.08)",panelBorder:"rgba(0, 200, 255, 0.25)",textPrimary:"#e0e8f0",textAccent:"#00c8ff",textJarvis:"#00ff88",particleStart:"#00c8ff"},e3={orbRadius:60,orbRingWidth:3,gridSpacing:40,particleCount:65,particleMinRadius:1,particleMaxRadius:3,waveformBars:32,waveformMaxHeight:40,panelWidth:180,panelPadding:12,transcriptLineHeight:20,standbyTimeoutMs:15e3,ttsSplitLength:300};let a_=0;function n3(){return`jarvis-${Date.now()}-${++a_}`}let ms=null;const X0=cf((n,t)=>({mode:"STANDBY",messages:[],streamingText:"",selectedSquad:null,userName:"",setMode:a=>n({mode:a}),addMessage:(a,l)=>{const o={id:n3(),role:a,content:l,createdAt:new Date().toISOString()};n(c=>({messages:[...c.messages,o]}))},appendChunk:a=>{n(l=>({streamingText:l.streamingText+a}))},finalizeMessage:a=>{const{streamingText:l}=t(),o={id:a,role:"assistant",content:l,createdAt:new Date().toISOString()};n(c=>({messages:[...c.messages,o],streamingText:""}))},selectSquad:a=>n({selectedSquad:a}),setUserName:a=>n({userName:a}),startStandbyTimer:()=>{ms&&clearTimeout(ms),ms=setTimeout(()=>{n({mode:"STANDBY"}),ms=null},e3.standbyTimeoutMs)},resetStandbyTimer:()=>{t().startStandbyTimer()},clearStandbyTimer:()=>{ms&&(clearTimeout(ms),ms=null)},reset:()=>{ms&&(clearTimeout(ms),ms=null),a_=0,n({mode:"STANDBY",messages:[],streamingText:"",selectedSquad:null,userName:""})}})),vs=cf((n,t)=>({jobs:[],loading:!1,fetchJobs:async()=>{n({loading:!0});try{const a=await fetch("/api/scheduler",{credentials:"include"});if(a.ok){const l=await a.json();n({jobs:l.data,loading:!1})}else n({loading:!1})}catch{n({loading:!1})}},pauseJob:async a=>{await fetch(`/api/scheduler/${a}/pause`,{method:"POST",credentials:"include"}),t().fetchJobs()},resumeJob:async a=>{await fetch(`/api/scheduler/${a}/resume`,{method:"POST",credentials:"include"}),t().fetchJobs()},triggerJob:async a=>{await fetch(`/api/scheduler/${a}/trigger`,{method:"POST",credentials:"include"})},updateJobStatus:(a,l)=>{n(o=>({jobs:o.jobs.map(c=>c.squad_name===a?{...c,status:l}:c)}))}})),a3=[{to:"/office",label:"Office",icon:"⬡"},{to:"/chat",label:"Chat",icon:"◈"},{to:"/kanban",label:"Kanban",icon:"▦"},{to:"/scheduler",label:"Scheduler",icon:"⏣"},{to:"/settings",label:"Settings",icon:"⚙"}];function i3(){const n=zl(B=>B.user),t=zl(B=>B.isAuthenticated),a=zl(B=>B.loading),l=zl(B=>B.logout),o=zl(B=>B.checkAuth),c=qp(),d=Ol(),m=d.pathname==="/office"||d.pathname==="/",p=d.pathname==="/jarvis",g=ti(B=>B.squads),x=ti(B=>B.selectedSquad),b=ti(B=>x?B.activeStates[x]:null),E=ti(B=>B.fetchSquads),C=ti(B=>B.selectSquad),M=ti(B=>B.setSquadState),z=ti(B=>B.clearSquadState),R=G.useCallback((B,J)=>{M(B,J);const tt=We.getState();tt.rooms.includes(B)||tt.syncRooms([...tt.rooms,B]),J.status!=="checkpoint"&&tt.clearCheckpoint(B),J.agents&&tt.setAgents(B,J.agents.map(pt=>({id:pt.id,name:pt.name,status:pt.status})))},[M]),w=G.useCallback(B=>{z(B);const J=We.getState(),tt=J.agentVisuals[B];if(tt)for(const pt of tt)J.setAgentStatus(B,pt.id,"idle")},[z]),O=G.useCallback((B,J)=>{Fi.getState().setConversationId(J)},[]),U=G.useCallback((B,J,tt)=>{if(B==="_jarvis"){X0.getState().appendChunk(tt);return}const pt=Fi.getState();pt.streaming||pt.startStreaming(),pt.appendChunk(tt)},[]),Y=G.useCallback((B,J,tt)=>{if(B==="_jarvis"){X0.getState().finalizeMessage(tt);return}Fi.getState().finishStreaming(tt)},[]),k=G.useCallback((B,J)=>{if(B==="_jarvis"){X0.getState().setMode("LISTENING");return}Fi.getState().setError(J)},[]),V=G.useCallback((B,J,tt,pt,bt)=>{Fi.getState().addAgentDm({agentId:tt,agentName:pt,content:bt})},[]),Z=G.useCallback((B,J,tt,pt)=>{We.getState().appendBubble(B,J,pt)},[]),F=G.useCallback((B,J,tt,pt,bt)=>{We.getState().addActivity(B,tt,`started "${bt}"`),We.getState().setAgentStatus(B,J,"working")},[]),q=G.useCallback((B,J,tt,pt,bt)=>{We.getState().addActivity(B,tt,`completed "${bt}"`),We.getState().setAgentStatus(B,J,"idle")},[]),$=G.useCallback((B,J,tt,pt)=>{We.getState().setCheckpoint(B,J,tt,pt),We.getState().setAgentStatus(B,J,"checkpoint")},[]),et=G.useCallback(()=>{We.getState().clearAllBubbles()},[]),ct=G.useCallback((B,J,tt)=>{vs.getState().fetchJobs()},[]),vt=G.useCallback((B,J,tt,pt)=>{vs.getState().fetchJobs()},[]),dt=G.useCallback((B,J,tt,pt,bt)=>{vs.getState().fetchJobs()},[]),St=G.useCallback((B,J)=>{vs.getState().updateJobStatus(B,J)},[]),{subscribe:j,unsubscribe:Q,sendChat:ot,sendCheckpointResponse:rt}=wT({onSquadState:R,onSquadInactive:w,onChatConversationCreated:O,onChatChunk:U,onChatDone:Y,onChatError:k,onChatAgentDm:V,onAgentOutputChunk:Z,onAgentStepStart:F,onAgentStepComplete:q,onSquadCheckpoint:$,onReconnect:et,onScheduleStarted:ct,onScheduleDone:vt,onScheduleError:dt,onScheduleStatusChanged:St});G.useEffect(()=>{GT(ot)},[ot]),G.useEffect(()=>{qT(rt)},[rt]),G.useEffect(()=>{E().then(()=>{const{squads:B}=ti.getState();if(B.length>0){const J=We.getState(),tt=B.map(At=>At.code),pt=J.rooms,bt=[...new Set([...pt,...tt])];J.syncRooms(bt);for(const At of B)!J.agentVisuals[At.code]&&At.agents&&At.agents.length>0&&J.setAgents(At.code,At.agents.map(Ot=>({id:Ot.id,name:Ot.name,status:"idle"})))}})},[E]);const gt=We(B=>B.rooms);return G.useEffect(()=>{for(const B of gt)j(B);return()=>{for(const B of gt)Q(B)}},[gt,j,Q]),G.useEffect(()=>{if(p)return j("_jarvis"),()=>Q("_jarvis")},[p,j,Q]),G.useEffect(()=>{t||o()},[]),G.useEffect(()=>{!a&&!t&&c("/login",{state:{from:d.pathname}})},[a,t,c,d.pathname]),p?H.jsx(Hv,{}):H.jsxs("div",{className:"noise-bg",style:{display:"flex",flexDirection:"column",height:"100vh",background:"var(--surface-0)",color:"var(--text-primary)"},children:[H.jsxs("header",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:"var(--header-height)",padding:"0 var(--sp-4)",background:"var(--surface-1)",borderBottom:"1px solid var(--border-subtle)",position:"relative",zIndex:10},children:[H.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-3)"},children:[H.jsx("div",{style:{width:28,height:28,borderRadius:"var(--radius-sm)",background:"linear-gradient(135deg, var(--accent), var(--accent-dim))",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"0.8rem",fontWeight:700,color:"var(--text-inverse)",boxShadow:"0 0 12px var(--accent-glow-strong)"},children:"EX"}),H.jsx("span",{style:{fontFamily:"var(--font-display)",fontWeight:700,fontSize:"0.95rem",color:"var(--text-primary)",letterSpacing:"-0.02em"},children:"ExpxAgents"}),H.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.6rem",color:"var(--text-muted)",background:"var(--surface-3)",padding:"2px 6px",borderRadius:"var(--radius-xs)",letterSpacing:"0.05em"},children:"MISSION CONTROL"})]}),H.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-4)"},children:[H.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",fontFamily:"var(--font-mono)",fontSize:"0.75rem",color:"var(--text-secondary)"},children:[H.jsx("span",{style:{display:"inline-block",width:6,height:6,borderRadius:"50%",background:"var(--status-active)",boxShadow:"0 0 8px var(--status-active-glow)",animation:"statusPulse 2s ease-in-out infinite"}}),H.jsx("span",{children:n==null?void 0:n.username})]}),H.jsx("button",{onClick:l,className:"btn-ghost",style:{background:"none",border:"none",color:"var(--text-muted)",cursor:"pointer",fontFamily:"var(--font-display)",fontSize:"0.75rem",padding:"4px 8px",borderRadius:"var(--radius-xs)",transition:"color var(--duration-fast) var(--ease-out)"},onMouseEnter:B=>B.currentTarget.style.color="var(--status-error)",onMouseLeave:B=>B.currentTarget.style.color="var(--text-muted)",children:"Logout"})]})]}),H.jsxs("div",{style:{display:"flex",flex:1,overflow:"hidden"},children:[H.jsxs("aside",{style:{width:"var(--sidebar-width)",background:"var(--surface-1)",borderRight:"1px solid var(--border-subtle)",display:"flex",flexDirection:"column",overflowY:"auto"},children:[!m&&H.jsxs(H.Fragment,{children:[H.jsx(UT,{squads:g,selectedSquad:x,onSelect:C}),H.jsx("div",{style:{height:1,margin:"0 var(--sp-3)",background:"var(--border-subtle)"}})]}),H.jsxs("nav",{style:{padding:"var(--sp-3)",display:"flex",flexDirection:"column",gap:"var(--sp-1)",flex:1},children:[H.jsx("div",{style:{fontFamily:"var(--font-mono)",fontSize:"0.6rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.1em",padding:"0 var(--sp-2)",marginBottom:"var(--sp-1)"},children:"Navigation"}),a3.map(B=>H.jsxs($x,{to:B.to,style:({isActive:J})=>({display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"8px 10px",borderRadius:"var(--radius-sm)",textDecoration:"none",fontSize:"0.82rem",fontWeight:J?600:400,color:J?"var(--accent)":"var(--text-secondary)",background:J?"var(--accent-glow)":"transparent",border:J?"1px solid rgba(0, 200, 255, 0.12)":"1px solid transparent",transition:"all var(--duration-fast) var(--ease-out)"}),children:[H.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.85rem",width:20,textAlign:"center",opacity:.7},children:B.icon}),B.label]},B.to)),H.jsx("div",{style:{height:1,margin:"var(--sp-2) var(--sp-2)",background:"var(--border-subtle)"}}),H.jsxs("a",{href:"/jarvis",target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"8px 10px",borderRadius:"var(--radius-sm)",textDecoration:"none",fontSize:"0.82rem",fontWeight:500,color:"var(--status-active)",background:"var(--status-active-glow)",border:"1px solid rgba(0, 230, 138, 0.12)",transition:"all var(--duration-fast) var(--ease-out)"},children:[H.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.85rem",width:20,textAlign:"center",opacity:.7},children:"◉"}),"Jarvis",H.jsx("span",{style:{marginLeft:"auto",fontFamily:"var(--font-mono)",fontSize:"0.55rem",opacity:.6},children:"↗"})]})]}),H.jsxs("div",{style:{padding:"var(--sp-3)",borderTop:"1px solid var(--border-subtle)",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",display:"flex",justifyContent:"space-between"},children:[H.jsxs("span",{children:[g.length," squad",g.length!==1?"s":""]}),H.jsx("span",{children:"v0.1.0"})]})]}),H.jsx("main",{className:"grid-bg",style:{flex:1,overflow:"auto",position:"relative"},children:H.jsx(Hv,{})})]}),H.jsx(jT,{state:b})]})}function l3(){var E;const[n,t]=G.useState(""),[a,l]=G.useState(""),o=zl(C=>C.login),c=zl(C=>C.loading),d=zl(C=>C.error),m=zl(C=>C.isAuthenticated),p=qp(),x=((E=Ol().state)==null?void 0:E.from)||"/";G.useEffect(()=>{m&&p(x,{replace:!0})},[m,p,x]);const b=C=>{C.preventDefault(),o(n,a)};return H.jsx("div",{className:"noise-bg grid-bg",style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",background:"var(--surface-0)"},children:H.jsxs("div",{style:{animation:"fadeInUp 0.6s var(--ease-out) both",width:360},children:[H.jsxs("div",{style:{textAlign:"center",marginBottom:"var(--sp-8)"},children:[H.jsx("div",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:48,height:48,borderRadius:"var(--radius-md)",background:"linear-gradient(135deg, var(--accent), var(--accent-dim))",fontSize:"1.1rem",fontWeight:800,color:"var(--text-inverse)",boxShadow:"var(--shadow-glow-strong)",marginBottom:"var(--sp-4)"},children:"EX"}),H.jsx("h1",{style:{fontFamily:"var(--font-display)",fontWeight:700,fontSize:"1.4rem",color:"var(--text-primary)",letterSpacing:"-0.02em",marginBottom:"var(--sp-1)"},children:"ExpxAgents"}),H.jsx("p",{style:{fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.15em"},children:"Mission Control"})]}),H.jsxs("form",{onSubmit:b,className:"glass",style:{padding:"var(--sp-6)",borderRadius:"var(--radius-lg)",boxShadow:"var(--shadow-lg)"},children:[d&&H.jsx("div",{style:{padding:"var(--sp-2) var(--sp-3)",marginBottom:"var(--sp-4)",borderRadius:"var(--radius-sm)",background:"var(--status-error-glow)",border:"1px solid rgba(255, 64, 112, 0.2)",color:"var(--status-error)",fontSize:"0.8rem",fontFamily:"var(--font-mono)"},children:d}),H.jsxs("div",{style:{marginBottom:"var(--sp-3)"},children:[H.jsx("label",{style:{display:"block",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:"var(--sp-1)"},children:"Username"}),H.jsx("input",{type:"text",className:"input",placeholder:"Enter username",value:n,onChange:C=>t(C.target.value),autoFocus:!0})]}),H.jsxs("div",{style:{marginBottom:"var(--sp-5)"},children:[H.jsx("label",{style:{display:"block",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:"var(--sp-1)"},children:"Password"}),H.jsx("input",{type:"password",className:"input",placeholder:"Enter password",value:a,onChange:C=>l(C.target.value)})]}),H.jsx("button",{type:"submit",disabled:c,className:"btn btn-accent",style:{width:"100%",padding:"var(--sp-3)",fontSize:"0.85rem",cursor:c?"wait":"pointer",opacity:c?.7:1},children:c?"Authenticating...":"Access Mission Control"})]}),H.jsx("p",{style:{textAlign:"center",marginTop:"var(--sp-4)",fontFamily:"var(--font-mono)",fontSize:"0.6rem",color:"var(--text-muted)"},children:"AI Squad Orchestration Platform"})]})})}function i_(n,t,a){if(!n)return;if(a(n)===!0)return n;let l=n.child;for(;l;){const o=i_(l,t,a);if(o)return o;l=l.sibling}}function l_(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const sg=l_(G.createContext(null));let s_=class extends G.Component{render(){return G.createElement(sg.Provider,{value:this._reactInternals},this.props.children)}};function s3(){const n=G.useContext(sg);if(n===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=G.useId();return G.useMemo(()=>{for(const a of[n,n==null?void 0:n.alternate]){if(!a)continue;const l=i_(a,!1,o=>{let c=o.memoizedState;for(;c;){if(c.memoizedState===t)return!0;c=c.next}});if(l)return l}},[n,t])}const r3=Symbol.for("react.context"),u3=n=>n!==null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===r3;function o3(){const n=s3(),[t]=G.useState(()=>new Map);t.clear();let a=n;for(;a;){const l=a.type;u3(l)&&l!==sg&&!t.has(l)&&t.set(l,G.use(l_(l))),a=a.return}return t}function c3(){const n=o3();return G.useMemo(()=>Array.from(n.keys()).reduce((t,a)=>l=>G.createElement(t,null,G.createElement(a.Provider,{...l,value:n.get(a)})),t=>G.createElement(s_,{...t})),[n])}var Wt=(n=>(n.Application="application",n.WebGLPipes="webgl-pipes",n.WebGLPipesAdaptor="webgl-pipes-adaptor",n.WebGLSystem="webgl-system",n.WebGPUPipes="webgpu-pipes",n.WebGPUPipesAdaptor="webgpu-pipes-adaptor",n.WebGPUSystem="webgpu-system",n.CanvasSystem="canvas-system",n.CanvasPipesAdaptor="canvas-pipes-adaptor",n.CanvasPipes="canvas-pipes",n.Asset="asset",n.LoadParser="load-parser",n.ResolveParser="resolve-parser",n.CacheParser="cache-parser",n.DetectionParser="detection-parser",n.MaskEffect="mask-effect",n.BlendMode="blend-mode",n.TextureSource="texture-source",n.Environment="environment",n.ShapeBuilder="shape-builder",n.Batcher="batcher",n))(Wt||{});const wy=n=>{if(typeof n=="function"||typeof n=="object"&&n.extension){if(!n.extension)throw new Error("Extension class must have an extension object");n={...typeof n.extension!="object"?{type:n.extension}:n.extension,ref:n}}if(typeof n=="object")n={...n};else throw new Error("Invalid extension type");return typeof n.type=="string"&&(n.type=[n.type]),n},ip=(n,t)=>wy(n).priority??t,Ie={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...n){return n.map(wy).forEach(t=>{t.type.forEach(a=>{var l,o;return(o=(l=this._removeHandlers)[a])==null?void 0:o.call(l,t)})}),this},add(...n){return n.map(wy).forEach(t=>{t.type.forEach(a=>{var c,d;const l=this._addHandlers,o=this._queue;l[a]?(d=l[a])==null||d.call(l,t):(o[a]=o[a]||[],(c=o[a])==null||c.push(t))})}),this},handle(n,t,a){var d;const l=this._addHandlers,o=this._removeHandlers;if(l[n]||o[n])throw new Error(`Extension type ${n} already has a handler`);l[n]=t,o[n]=a;const c=this._queue;return c[n]&&((d=c[n])==null||d.forEach(m=>t(m)),delete c[n]),this},handleByMap(n,t){return this.handle(n,a=>{a.name&&(t[a.name]=a.ref)},a=>{a.name&&delete t[a.name]})},handleByNamedList(n,t,a=-1){return this.handle(n,l=>{t.findIndex(c=>c.name===l.name)>=0||(t.push({name:l.name,value:l.ref}),t.sort((c,d)=>ip(d.value,a)-ip(c.value,a)))},l=>{const o=t.findIndex(c=>c.name===l.name);o!==-1&&t.splice(o,1)})},handleByList(n,t,a=-1){return this.handle(n,l=>{t.includes(l.ref)||(t.push(l.ref),t.sort((o,c)=>ip(c,a)-ip(o,a)))},l=>{const o=t.indexOf(l.ref);o!==-1&&t.splice(o,1)})},mixin(n,...t){for(const a of t)Object.defineProperties(n.prototype,Object.getOwnPropertyDescriptors(a))}},f3={extension:{type:Wt.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await Pc(()=>import("./browserAll-BC0ycs7y.js"),__vite__mapDeps([0,1]))}},h3={extension:{type:Wt.Environment,name:"webworker",priority:0},test:()=>typeof self<"u"&&self.WorkerGlobalScope!==void 0,load:async()=>{await Pc(()=>import("./webworkerAll-D7SccyuO.js"),[])}};class In{constructor(t,a,l){this._x=a||0,this._y=l||0,this._observer=t}clone(t){return new In(t??this._observer,this._x,this._y)}set(t=0,a=t){return(this._x!==t||this._y!==a)&&(this._x=t,this._y=a,this._observer._onUpdate(this)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this._observer._onUpdate(this)),this}copyTo(t){return t.set(this._x,this._y),t}equals(t){return t.x===this._x&&t.y===this._y}toString(){return`[pixi.js/math:ObservablePoint x=${this._x} y=${this._y} scope=${this._observer}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this._observer._onUpdate(this))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this._observer._onUpdate(this))}}var V0={exports:{}},Pv;function d3(){return Pv||(Pv=1,(function(n){var t=Object.prototype.hasOwnProperty,a="~";function l(){}Object.create&&(l.prototype=Object.create(null),new l().__proto__||(a=!1));function o(p,g,x){this.fn=p,this.context=g,this.once=x||!1}function c(p,g,x,b,E){if(typeof x!="function")throw new TypeError("The listener must be a function");var C=new o(x,b||p,E),M=a?a+g:g;return p._events[M]?p._events[M].fn?p._events[M]=[p._events[M],C]:p._events[M].push(C):(p._events[M]=C,p._eventsCount++),p}function d(p,g){--p._eventsCount===0?p._events=new l:delete p._events[g]}function m(){this._events=new l,this._eventsCount=0}m.prototype.eventNames=function(){var g=[],x,b;if(this._eventsCount===0)return g;for(b in x=this._events)t.call(x,b)&&g.push(a?b.slice(1):b);return Object.getOwnPropertySymbols?g.concat(Object.getOwnPropertySymbols(x)):g},m.prototype.listeners=function(g){var x=a?a+g:g,b=this._events[x];if(!b)return[];if(b.fn)return[b.fn];for(var E=0,C=b.length,M=new Array(C);E<C;E++)M[E]=b[E].fn;return M},m.prototype.listenerCount=function(g){var x=a?a+g:g,b=this._events[x];return b?b.fn?1:b.length:0},m.prototype.emit=function(g,x,b,E,C,M){var z=a?a+g:g;if(!this._events[z])return!1;var R=this._events[z],w=arguments.length,O,U;if(R.fn){switch(R.once&&this.removeListener(g,R.fn,void 0,!0),w){case 1:return R.fn.call(R.context),!0;case 2:return R.fn.call(R.context,x),!0;case 3:return R.fn.call(R.context,x,b),!0;case 4:return R.fn.call(R.context,x,b,E),!0;case 5:return R.fn.call(R.context,x,b,E,C),!0;case 6:return R.fn.call(R.context,x,b,E,C,M),!0}for(U=1,O=new Array(w-1);U<w;U++)O[U-1]=arguments[U];R.fn.apply(R.context,O)}else{var Y=R.length,k;for(U=0;U<Y;U++)switch(R[U].once&&this.removeListener(g,R[U].fn,void 0,!0),w){case 1:R[U].fn.call(R[U].context);break;case 2:R[U].fn.call(R[U].context,x);break;case 3:R[U].fn.call(R[U].context,x,b);break;case 4:R[U].fn.call(R[U].context,x,b,E);break;default:if(!O)for(k=1,O=new Array(w-1);k<w;k++)O[k-1]=arguments[k];R[U].fn.apply(R[U].context,O)}}return!0},m.prototype.on=function(g,x,b){return c(this,g,x,b,!1)},m.prototype.once=function(g,x,b){return c(this,g,x,b,!0)},m.prototype.removeListener=function(g,x,b,E){var C=a?a+g:g;if(!this._events[C])return this;if(!x)return d(this,C),this;var M=this._events[C];if(M.fn)M.fn===x&&(!E||M.once)&&(!b||M.context===b)&&d(this,C);else{for(var z=0,R=[],w=M.length;z<w;z++)(M[z].fn!==x||E&&!M[z].once||b&&M[z].context!==b)&&R.push(M[z]);R.length?this._events[C]=R.length===1?R[0]:R:d(this,C)}return this},m.prototype.removeAllListeners=function(g){var x;return g?(x=a?a+g:g,this._events[x]&&d(this,x)):(this._events=new l,this._eventsCount=0),this},m.prototype.off=m.prototype.removeListener,m.prototype.addListener=m.prototype.on,m.prefixed=a,m.EventEmitter=m,n.exports=m})(V0)),V0.exports}var m3=d3();const _s=Hp(m3),p3=Math.PI*2,y3=180/Math.PI,g3=Math.PI/180;class ya{constructor(t=0,a=0){this.x=0,this.y=0,this.x=t,this.y=a}clone(){return new ya(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,a=t){return this.x=t,this.y=a,this}toString(){return`[pixi.js/math:Point x=${this.x} y=${this.y}]`}static get shared(){return k0.x=0,k0.y=0,k0}}const k0=new ya;class le{constructor(t=1,a=0,l=0,o=1,c=0,d=0){this.array=null,this.a=t,this.b=a,this.c=l,this.d=o,this.tx=c,this.ty=d}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,a,l,o,c,d){return this.a=t,this.b=a,this.c=l,this.d=o,this.tx=c,this.ty=d,this}toArray(t,a){this.array||(this.array=new Float32Array(9));const l=a||this.array;return t?(l[0]=this.a,l[1]=this.b,l[2]=0,l[3]=this.c,l[4]=this.d,l[5]=0,l[6]=this.tx,l[7]=this.ty,l[8]=1):(l[0]=this.a,l[1]=this.c,l[2]=this.tx,l[3]=this.b,l[4]=this.d,l[5]=this.ty,l[6]=0,l[7]=0,l[8]=1),l}apply(t,a){a=a||new ya;const l=t.x,o=t.y;return a.x=this.a*l+this.c*o+this.tx,a.y=this.b*l+this.d*o+this.ty,a}applyInverse(t,a){a=a||new ya;const l=this.a,o=this.b,c=this.c,d=this.d,m=this.tx,p=this.ty,g=1/(l*d+c*-o),x=t.x,b=t.y;return a.x=d*g*x+-c*g*b+(p*c-m*d)*g,a.y=l*g*b+-o*g*x+(-p*l+m*o)*g,a}translate(t,a){return this.tx+=t,this.ty+=a,this}scale(t,a){return this.a*=t,this.d*=a,this.c*=t,this.b*=a,this.tx*=t,this.ty*=a,this}rotate(t){const a=Math.cos(t),l=Math.sin(t),o=this.a,c=this.c,d=this.tx;return this.a=o*a-this.b*l,this.b=o*l+this.b*a,this.c=c*a-this.d*l,this.d=c*l+this.d*a,this.tx=d*a-this.ty*l,this.ty=d*l+this.ty*a,this}append(t){const a=this.a,l=this.b,o=this.c,c=this.d;return this.a=t.a*a+t.b*o,this.b=t.a*l+t.b*c,this.c=t.c*a+t.d*o,this.d=t.c*l+t.d*c,this.tx=t.tx*a+t.ty*o+this.tx,this.ty=t.tx*l+t.ty*c+this.ty,this}appendFrom(t,a){const l=t.a,o=t.b,c=t.c,d=t.d,m=t.tx,p=t.ty,g=a.a,x=a.b,b=a.c,E=a.d;return this.a=l*g+o*b,this.b=l*x+o*E,this.c=c*g+d*b,this.d=c*x+d*E,this.tx=m*g+p*b+a.tx,this.ty=m*x+p*E+a.ty,this}setTransform(t,a,l,o,c,d,m,p,g){return this.a=Math.cos(m+g)*c,this.b=Math.sin(m+g)*c,this.c=-Math.sin(m-p)*d,this.d=Math.cos(m-p)*d,this.tx=t-(l*this.a+o*this.c),this.ty=a-(l*this.b+o*this.d),this}prepend(t){const a=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const l=this.a,o=this.c;this.a=l*t.a+this.b*t.c,this.b=l*t.b+this.b*t.d,this.c=o*t.a+this.d*t.c,this.d=o*t.b+this.d*t.d}return this.tx=a*t.a+this.ty*t.c+t.tx,this.ty=a*t.b+this.ty*t.d+t.ty,this}decompose(t){const a=this.a,l=this.b,o=this.c,c=this.d,d=t.pivot,m=-Math.atan2(-o,c),p=Math.atan2(l,a),g=Math.abs(m+p);return g<1e-5||Math.abs(p3-g)<1e-5?(t.rotation=p,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=m,t.skew.y=p),t.scale.x=Math.sqrt(a*a+l*l),t.scale.y=Math.sqrt(o*o+c*c),t.position.x=this.tx+(d.x*a+d.y*o),t.position.y=this.ty+(d.x*l+d.y*c),t}invert(){const t=this.a,a=this.b,l=this.c,o=this.d,c=this.tx,d=t*o-a*l;return this.a=o/d,this.b=-a/d,this.c=-l/d,this.d=t/d,this.tx=(l*this.ty-o*c)/d,this.ty=-(t*this.ty-a*c)/d,this}isIdentity(){return this.a===1&&this.b===0&&this.c===0&&this.d===1&&this.tx===0&&this.ty===0}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const t=new le;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}equals(t){return t.a===this.a&&t.b===this.b&&t.c===this.c&&t.d===this.d&&t.tx===this.tx&&t.ty===this.ty}toString(){return`[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return x3.identity()}static get shared(){return v3.identity()}}const v3=new le,x3=new le,fo=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],ho=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],mo=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],po=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Dy=[],r_=[],lp=Math.sign;function _3(){for(let n=0;n<16;n++){const t=[];Dy.push(t);for(let a=0;a<16;a++){const l=lp(fo[n]*fo[a]+mo[n]*ho[a]),o=lp(ho[n]*fo[a]+po[n]*ho[a]),c=lp(fo[n]*mo[a]+mo[n]*po[a]),d=lp(ho[n]*mo[a]+po[n]*po[a]);for(let m=0;m<16;m++)if(fo[m]===l&&ho[m]===o&&mo[m]===c&&po[m]===d){t.push(m);break}}}for(let n=0;n<16;n++){const t=new le;t.set(fo[n],ho[n],mo[n],po[n],0,0),r_.push(t)}}_3();const Ue={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:n=>fo[n],uY:n=>ho[n],vX:n=>mo[n],vY:n=>po[n],inv:n=>n&8?n&15:-n&7,add:(n,t)=>Dy[n][t],sub:(n,t)=>Dy[n][Ue.inv(t)],rotate180:n=>n^4,isVertical:n=>(n&3)===2,byDirection:(n,t)=>Math.abs(n)*2<=Math.abs(t)?t>=0?Ue.S:Ue.N:Math.abs(t)*2<=Math.abs(n)?n>0?Ue.E:Ue.W:t>0?n>0?Ue.SE:Ue.SW:n>0?Ue.NE:Ue.NW,matrixAppendRotationInv:(n,t,a=0,l=0,o=0,c=0)=>{const d=r_[Ue.inv(t)],m=d.a,p=d.b,g=d.c,x=d.d,b=a-Math.min(0,m*o,g*c,m*o+g*c),E=l-Math.min(0,p*o,x*c,p*o+x*c),C=n.a,M=n.b,z=n.c,R=n.d;n.a=m*C+p*z,n.b=m*M+p*R,n.c=g*C+x*z,n.d=g*M+x*R,n.tx=b*C+E*z+n.tx,n.ty=b*M+E*R+n.ty},transformRectCoords:(n,t,a,l)=>{const{x:o,y:c,width:d,height:m}=n,{x:p,y:g,width:x,height:b}=t;return a===Ue.E?(l.set(o+p,c+g,d,m),l):a===Ue.S?l.set(x-c-m+p,o+g,m,d):a===Ue.W?l.set(x-o-d+p,b-c-m+g,d,m):a===Ue.N?l.set(c+p,b-o-d+g,m,d):l.set(o+p,c+g,d,m)}},sp=[new ya,new ya,new ya,new ya];class mn{constructor(t=0,a=0,l=0,o=0){this.type="rectangle",this.x=Number(t),this.y=Number(a),this.width=Number(l),this.height=Number(o)}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}isEmpty(){return this.left===this.right||this.top===this.bottom}static get EMPTY(){return new mn(0,0,0,0)}clone(){return new mn(this.x,this.y,this.width,this.height)}copyFromBounds(t){return this.x=t.minX,this.y=t.minY,this.width=t.maxX-t.minX,this.height=t.maxY-t.minY,this}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.copyFrom(this),t}contains(t,a){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&a>=this.y&&a<this.y+this.height}strokeContains(t,a,l,o=.5){const{width:c,height:d}=this;if(c<=0||d<=0)return!1;const m=this.x,p=this.y,g=l*(1-o),x=l-g,b=m-g,E=m+c+g,C=p-g,M=p+d+g,z=m+x,R=m+c-x,w=p+x,O=p+d-x;return t>=b&&t<=E&&a>=C&&a<=M&&!(t>z&&t<R&&a>w&&a<O)}intersects(t,a){if(!a){const F=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=F)return!1;const $=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>$}const l=this.left,o=this.right,c=this.top,d=this.bottom;if(o<=l||d<=c)return!1;const m=sp[0].set(t.left,t.top),p=sp[1].set(t.left,t.bottom),g=sp[2].set(t.right,t.top),x=sp[3].set(t.right,t.bottom);if(g.x<=m.x||p.y<=m.y)return!1;const b=Math.sign(a.a*a.d-a.b*a.c);if(b===0||(a.apply(m,m),a.apply(p,p),a.apply(g,g),a.apply(x,x),Math.max(m.x,p.x,g.x,x.x)<=l||Math.min(m.x,p.x,g.x,x.x)>=o||Math.max(m.y,p.y,g.y,x.y)<=c||Math.min(m.y,p.y,g.y,x.y)>=d))return!1;const E=b*(p.y-m.y),C=b*(m.x-p.x),M=E*l+C*c,z=E*o+C*c,R=E*l+C*d,w=E*o+C*d;if(Math.max(M,z,R,w)<=E*m.x+C*m.y||Math.min(M,z,R,w)>=E*x.x+C*x.y)return!1;const O=b*(m.y-g.y),U=b*(g.x-m.x),Y=O*l+U*c,k=O*o+U*c,V=O*l+U*d,Z=O*o+U*d;return!(Math.max(Y,k,V,Z)<=O*m.x+U*m.y||Math.min(Y,k,V,Z)>=O*x.x+U*x.y)}pad(t=0,a=t){return this.x-=t,this.y-=a,this.width+=t*2,this.height+=a*2,this}fit(t){const a=Math.max(this.x,t.x),l=Math.min(this.x+this.width,t.x+t.width),o=Math.max(this.y,t.y),c=Math.min(this.y+this.height,t.y+t.height);return this.x=a,this.width=Math.max(l-a,0),this.y=o,this.height=Math.max(c-o,0),this}ceil(t=1,a=.001){const l=Math.ceil((this.x+this.width-a)*t)/t,o=Math.ceil((this.y+this.height-a)*t)/t;return this.x=Math.floor((this.x+a)*t)/t,this.y=Math.floor((this.y+a)*t)/t,this.width=l-this.x,this.height=o-this.y,this}scale(t,a=t){return this.x*=t,this.y*=a,this.width*=t,this.height*=a,this}enlarge(t){const a=Math.min(this.x,t.x),l=Math.max(this.x+this.width,t.x+t.width),o=Math.min(this.y,t.y),c=Math.max(this.y+this.height,t.y+t.height);return this.x=a,this.width=l-a,this.y=o,this.height=c-o,this}getBounds(t){return t||(t=new mn),t.copyFrom(this),t}containsRect(t){if(this.width<=0||this.height<=0)return!1;const a=t.x,l=t.y,o=t.x+t.width,c=t.y+t.height;return a>=this.x&&a<this.x+this.width&&l>=this.y&&l<this.y+this.height&&o>=this.x&&o<this.x+this.width&&c>=this.y&&c<this.y+this.height}set(t,a,l,o){return this.x=t,this.y=a,this.width=l,this.height=o,this}toString(){return`[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}const Q0={default:-1};function on(n="default"){return Q0[n]===void 0&&(Q0[n]=-1),++Q0[n]}const Iv=new Set,un="8.0.0",S3="8.3.4",Zc={quiet:!1,noColor:!1},de=((n,t,a=3)=>{if(Zc.quiet||Iv.has(t))return;let l=new Error().stack;const o=`${t}
62
- Deprecated since v${n}`,c=typeof console.groupCollapsed=="function"&&!Zc.noColor;typeof l>"u"?console.warn("PixiJS Deprecation Warning: ",o):(l=l.split(`
63
- `).splice(a).join(`
64
- `),c?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",o),console.warn(l),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",o),console.warn(l))),Iv.add(t)});Object.defineProperties(de,{quiet:{get:()=>Zc.quiet,set:n=>{Zc.quiet=n},enumerable:!0,configurable:!1},noColor:{get:()=>Zc.noColor,set:n=>{Zc.noColor=n},enumerable:!0,configurable:!1}});const u_=()=>{};function tf(n){return n+=n===0?1:0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1}function $v(n){return!(n&n-1)&&!!n}function o_(n){const t={};for(const a in n)n[a]!==void 0&&(t[a]=n[a]);return t}const t1=Object.create(null);function b3(n){const t=t1[n];return t===void 0&&(t1[n]=on("resource")),t}const c_=class f_ extends _s{constructor(t={}){super(),this._resourceType="textureSampler",this._touched=0,this._maxAnisotropy=1,this.destroyed=!1,t={...f_.defaultOptions,...t},this.addressMode=t.addressMode,this.addressModeU=t.addressModeU??this.addressModeU,this.addressModeV=t.addressModeV??this.addressModeV,this.addressModeW=t.addressModeW??this.addressModeW,this.scaleMode=t.scaleMode,this.magFilter=t.magFilter??this.magFilter,this.minFilter=t.minFilter??this.minFilter,this.mipmapFilter=t.mipmapFilter??this.mipmapFilter,this.lodMinClamp=t.lodMinClamp,this.lodMaxClamp=t.lodMaxClamp,this.compare=t.compare,this.maxAnisotropy=t.maxAnisotropy??1}set addressMode(t){this.addressModeU=t,this.addressModeV=t,this.addressModeW=t}get addressMode(){return this.addressModeU}set wrapMode(t){de(un,"TextureStyle.wrapMode is now TextureStyle.addressMode"),this.addressMode=t}get wrapMode(){return this.addressMode}set scaleMode(t){this.magFilter=t,this.minFilter=t,this.mipmapFilter=t}get scaleMode(){return this.magFilter}set maxAnisotropy(t){this._maxAnisotropy=Math.min(t,16),this._maxAnisotropy>1&&(this.scaleMode="linear")}get maxAnisotropy(){return this._maxAnisotropy}get _resourceId(){return this._sharedResourceId||this._generateResourceId()}update(){this._sharedResourceId=null,this.emit("change",this)}_generateResourceId(){const t=`${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.minFilter}-${this.mipmapFilter}-${this.lodMinClamp}-${this.lodMaxClamp}-${this.compare}-${this._maxAnisotropy}`;return this._sharedResourceId=b3(t),this._resourceId}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this.removeAllListeners()}};c_.defaultOptions={addressMode:"clamp-to-edge",scaleMode:"linear"};let ef=c_;const h_=class d_ extends _s{constructor(t={}){super(),this.options=t,this._gpuData=Object.create(null),this._gcLastUsed=-1,this.uid=on("textureSource"),this._resourceType="textureSource",this._resourceId=on("resource"),this.uploadMethodId="unknown",this._resolution=1,this.pixelWidth=1,this.pixelHeight=1,this.width=1,this.height=1,this.sampleCount=1,this.mipLevelCount=1,this.autoGenerateMipmaps=!1,this.format="rgba8unorm",this.dimension="2d",this.viewDimension="2d",this.arrayLayerCount=1,this.antialias=!1,this._touched=0,this._batchTick=-1,this._textureBindLocation=-1,t={...d_.defaultOptions,...t},this.label=t.label??"",this.resource=t.resource,this.autoGarbageCollect=t.autoGarbageCollect,this._resolution=t.resolution,t.width?this.pixelWidth=t.width*this._resolution:this.pixelWidth=this.resource?this.resourceWidth??1:1,t.height?this.pixelHeight=t.height*this._resolution:this.pixelHeight=this.resource?this.resourceHeight??1:1,this.width=this.pixelWidth/this._resolution,this.height=this.pixelHeight/this._resolution,this.format=t.format,this.dimension=t.dimensions,this.viewDimension=t.viewDimension??t.dimensions,this.arrayLayerCount=t.arrayLayerCount,this.mipLevelCount=t.mipLevelCount,this.autoGenerateMipmaps=t.autoGenerateMipmaps,this.sampleCount=t.sampleCount,this.antialias=t.antialias,this.alphaMode=t.alphaMode,this.style=new ef(o_(t)),this.destroyed=!1,this._refreshPOT()}get source(){return this}get style(){return this._style}set style(t){var a,l;this.style!==t&&((a=this._style)==null||a.off("change",this._onStyleChange,this),this._style=t,(l=this._style)==null||l.on("change",this._onStyleChange,this),this._onStyleChange())}set maxAnisotropy(t){this._style.maxAnisotropy=t}get maxAnisotropy(){return this._style.maxAnisotropy}get addressMode(){return this._style.addressMode}set addressMode(t){this._style.addressMode=t}get repeatMode(){return this._style.addressMode}set repeatMode(t){this._style.addressMode=t}get magFilter(){return this._style.magFilter}set magFilter(t){this._style.magFilter=t}get minFilter(){return this._style.minFilter}set minFilter(t){this._style.minFilter=t}get mipmapFilter(){return this._style.mipmapFilter}set mipmapFilter(t){this._style.mipmapFilter=t}get lodMinClamp(){return this._style.lodMinClamp}set lodMinClamp(t){this._style.lodMinClamp=t}get lodMaxClamp(){return this._style.lodMaxClamp}set lodMaxClamp(t){this._style.lodMaxClamp=t}_onStyleChange(){this.emit("styleChange",this)}update(){if(this.resource){const t=this._resolution;if(this.resize(this.resourceWidth/t,this.resourceHeight/t))return}this.emit("update",this)}destroy(){this.destroyed=!0,this.unload(),this.emit("destroy",this),this._style&&(this._style.destroy(),this._style=null),this.uploadMethodId=null,this.resource=null,this.removeAllListeners()}unload(){var t,a;this._resourceId=on("resource"),this.emit("change",this),this.emit("unload",this);for(const l in this._gpuData)(a=(t=this._gpuData[l])==null?void 0:t.destroy)==null||a.call(t);this._gpuData=Object.create(null)}get resourceWidth(){const{resource:t}=this;return t.naturalWidth||t.videoWidth||t.displayWidth||t.width}get resourceHeight(){const{resource:t}=this;return t.naturalHeight||t.videoHeight||t.displayHeight||t.height}get resolution(){return this._resolution}set resolution(t){this._resolution!==t&&(this._resolution=t,this.width=this.pixelWidth/t,this.height=this.pixelHeight/t)}resize(t,a,l){l||(l=this._resolution),t||(t=this.width),a||(a=this.height);const o=Math.round(t*l),c=Math.round(a*l);return this.width=o/l,this.height=c/l,this._resolution=l,this.pixelWidth===o&&this.pixelHeight===c?!1:(this._refreshPOT(),this.pixelWidth=o,this.pixelHeight=c,this.emit("resize",this),this._resourceId=on("resource"),this.emit("change",this),!0)}updateMipmaps(){this.autoGenerateMipmaps&&this.mipLevelCount>1&&this.emit("updateMipmaps",this)}set wrapMode(t){this._style.wrapMode=t}get wrapMode(){return this._style.wrapMode}set scaleMode(t){this._style.scaleMode=t}get scaleMode(){return this._style.scaleMode}_refreshPOT(){this.isPowerOfTwo=$v(this.pixelWidth)&&$v(this.pixelHeight)}static test(t){throw new Error("Unimplemented")}};h_.defaultOptions={resolution:1,format:"bgra8unorm",alphaMode:"premultiply-alpha-on-upload",dimensions:"2d",viewDimension:"2d",arrayLayerCount:1,mipLevelCount:1,autoGenerateMipmaps:!1,sampleCount:1,antialias:!1,autoGarbageCollect:!1};let $i=h_;class rg extends $i{constructor(t){const a=t.resource||new Float32Array(t.width*t.height*4);let l=t.format;l||(a instanceof Float32Array?l="rgba32float":a instanceof Int32Array||a instanceof Uint32Array?l="rgba32uint":a instanceof Int16Array||a instanceof Uint16Array?l="rgba16uint":(a instanceof Int8Array,l="bgra8unorm")),super({...t,resource:a,format:l}),this.uploadMethodId="buffer"}static test(t){return t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array}}rg.extension=Wt.TextureSource;const e1=new le;class T3{constructor(t,a){this.mapCoord=new le,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,typeof a>"u"?this.clampMargin=t.width<10?0:.5:this.clampMargin=a,this.isSimple=!1,this.texture=t}get texture(){return this._texture}set texture(t){var a;this.texture!==t&&((a=this._texture)==null||a.removeListener("update",this.update,this),this._texture=t,this._texture.addListener("update",this.update,this),this.update())}multiplyUvs(t,a){a===void 0&&(a=t);const l=this.mapCoord;for(let o=0;o<t.length;o+=2){const c=t[o],d=t[o+1];a[o]=c*l.a+d*l.c+l.tx,a[o+1]=c*l.b+d*l.d+l.ty}return a}update(){const t=this._texture;this._updateID++;const a=t.uvs;this.mapCoord.set(a.x1-a.x0,a.y1-a.y0,a.x3-a.x0,a.y3-a.y0,a.x0,a.y0);const l=t.orig,o=t.trim;o&&(e1.set(l.width/o.width,0,0,l.height/o.height,-o.x/o.width,-o.y/o.height),this.mapCoord.append(e1));const c=t.source,d=this.uClampFrame,m=this.clampMargin/c._resolution,p=this.clampOffset/c._resolution;return d[0]=(t.frame.x+m+p)/c.width,d[1]=(t.frame.y+m+p)/c.height,d[2]=(t.frame.x+t.frame.width-m+p)/c.width,d[3]=(t.frame.y+t.frame.height-m+p)/c.height,this.uClampOffset[0]=this.clampOffset/c.pixelWidth,this.uClampOffset[1]=this.clampOffset/c.pixelHeight,this.isSimple=t.frame.width===c.width&&t.frame.height===c.height&&t.rotate===0,!0}}class ze extends _s{constructor({source:t,label:a,frame:l,orig:o,trim:c,defaultAnchor:d,defaultBorders:m,rotate:p,dynamic:g}={}){if(super(),this.uid=on("texture"),this.uvs={x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},this.frame=new mn,this.noFrame=!1,this.dynamic=!1,this.isTexture=!0,this.label=a,this.source=(t==null?void 0:t.source)??new $i,this.noFrame=!l,l)this.frame.copyFrom(l);else{const{width:x,height:b}=this._source;this.frame.width=x,this.frame.height=b}this.orig=o||this.frame,this.trim=c,this.rotate=p??0,this.defaultAnchor=d,this.defaultBorders=m,this.destroyed=!1,this.dynamic=g||!1,this.updateUvs()}set source(t){this._source&&this._source.off("resize",this.update,this),this._source=t,t.on("resize",this.update,this),this.emit("update",this)}get source(){return this._source}get textureMatrix(){return this._textureMatrix||(this._textureMatrix=new T3(this)),this._textureMatrix}get width(){return this.orig.width}get height(){return this.orig.height}updateUvs(){const{uvs:t,frame:a}=this,{width:l,height:o}=this._source,c=a.x/l,d=a.y/o,m=a.width/l,p=a.height/o;let g=this.rotate;if(g){const x=m/2,b=p/2,E=c+x,C=d+b;g=Ue.add(g,Ue.NW),t.x0=E+x*Ue.uX(g),t.y0=C+b*Ue.uY(g),g=Ue.add(g,2),t.x1=E+x*Ue.uX(g),t.y1=C+b*Ue.uY(g),g=Ue.add(g,2),t.x2=E+x*Ue.uX(g),t.y2=C+b*Ue.uY(g),g=Ue.add(g,2),t.x3=E+x*Ue.uX(g),t.y3=C+b*Ue.uY(g)}else t.x0=c,t.y0=d,t.x1=c+m,t.y1=d,t.x2=c+m,t.y2=d+p,t.x3=c,t.y3=d+p}destroy(t=!1){this._source&&(this._source.off("resize",this.update,this),t&&(this._source.destroy(),this._source=null)),this._textureMatrix=null,this.destroyed=!0,this.emit("destroy",this),this.removeAllListeners()}update(){this.noFrame&&(this.frame.width=this._source.width,this.frame.height=this._source.height),this.updateUvs(),this.emit("update",this)}get baseTexture(){return de(un,"Texture.baseTexture is now Texture.source"),this._source}}ze.EMPTY=new ze({label:"EMPTY",source:new $i({label:"EMPTY"})});ze.EMPTY.destroy=u_;ze.WHITE=new ze({source:new rg({resource:new Uint8Array([255,255,255,255]),width:1,height:1,alphaMode:"premultiply-alpha-on-upload",label:"WHITE"}),label:"WHITE"});ze.WHITE.destroy=u_;function m_(n,t,a){const{width:l,height:o}=a.orig,c=a.trim;if(c){const d=c.width,m=c.height;n.minX=c.x-t._x*l,n.maxX=n.minX+d,n.minY=c.y-t._y*o,n.maxY=n.minY+m}else n.minX=-t._x*l,n.maxX=n.minX+l,n.minY=-t._y*o,n.maxY=n.minY+o}const n1=new le;class Ii{constructor(t=1/0,a=1/0,l=-1/0,o=-1/0){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=n1,this.minX=t,this.minY=a,this.maxX=l,this.maxY=o}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}get rectangle(){this._rectangle||(this._rectangle=new mn);const t=this._rectangle;return this.minX>this.maxX||this.minY>this.maxY?(t.x=0,t.y=0,t.width=0,t.height=0):t.copyFromBounds(this),t}clear(){return this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=n1,this}set(t,a,l,o){this.minX=t,this.minY=a,this.maxX=l,this.maxY=o}addFrame(t,a,l,o,c){c||(c=this.matrix);const d=c.a,m=c.b,p=c.c,g=c.d,x=c.tx,b=c.ty;let E=this.minX,C=this.minY,M=this.maxX,z=this.maxY,R=d*t+p*a+x,w=m*t+g*a+b;R<E&&(E=R),w<C&&(C=w),R>M&&(M=R),w>z&&(z=w),R=d*l+p*a+x,w=m*l+g*a+b,R<E&&(E=R),w<C&&(C=w),R>M&&(M=R),w>z&&(z=w),R=d*t+p*o+x,w=m*t+g*o+b,R<E&&(E=R),w<C&&(C=w),R>M&&(M=R),w>z&&(z=w),R=d*l+p*o+x,w=m*l+g*o+b,R<E&&(E=R),w<C&&(C=w),R>M&&(M=R),w>z&&(z=w),this.minX=E,this.minY=C,this.maxX=M,this.maxY=z}addRect(t,a){this.addFrame(t.x,t.y,t.x+t.width,t.y+t.height,a)}addBounds(t,a){this.addFrame(t.minX,t.minY,t.maxX,t.maxY,a)}addBoundsMask(t){this.minX=this.minX>t.minX?this.minX:t.minX,this.minY=this.minY>t.minY?this.minY:t.minY,this.maxX=this.maxX<t.maxX?this.maxX:t.maxX,this.maxY=this.maxY<t.maxY?this.maxY:t.maxY}applyMatrix(t){const a=this.minX,l=this.minY,o=this.maxX,c=this.maxY,{a:d,b:m,c:p,d:g,tx:x,ty:b}=t;let E=d*a+p*l+x,C=m*a+g*l+b;this.minX=E,this.minY=C,this.maxX=E,this.maxY=C,E=d*o+p*l+x,C=m*o+g*l+b,this.minX=E<this.minX?E:this.minX,this.minY=C<this.minY?C:this.minY,this.maxX=E>this.maxX?E:this.maxX,this.maxY=C>this.maxY?C:this.maxY,E=d*a+p*c+x,C=m*a+g*c+b,this.minX=E<this.minX?E:this.minX,this.minY=C<this.minY?C:this.minY,this.maxX=E>this.maxX?E:this.maxX,this.maxY=C>this.maxY?C:this.maxY,E=d*o+p*c+x,C=m*o+g*c+b,this.minX=E<this.minX?E:this.minX,this.minY=C<this.minY?C:this.minY,this.maxX=E>this.maxX?E:this.maxX,this.maxY=C>this.maxY?C:this.maxY}fit(t){return this.minX<t.left&&(this.minX=t.left),this.maxX>t.right&&(this.maxX=t.right),this.minY<t.top&&(this.minY=t.top),this.maxY>t.bottom&&(this.maxY=t.bottom),this}fitBounds(t,a,l,o){return this.minX<t&&(this.minX=t),this.maxX>a&&(this.maxX=a),this.minY<l&&(this.minY=l),this.maxY>o&&(this.maxY=o),this}pad(t,a=t){return this.minX-=t,this.maxX+=t,this.minY-=a,this.maxY+=a,this}ceil(){return this.minX=Math.floor(this.minX),this.minY=Math.floor(this.minY),this.maxX=Math.ceil(this.maxX),this.maxY=Math.ceil(this.maxY),this}clone(){return new Ii(this.minX,this.minY,this.maxX,this.maxY)}scale(t,a=t){return this.minX*=t,this.minY*=a,this.maxX*=t,this.maxY*=a,this}get x(){return this.minX}set x(t){const a=this.maxX-this.minX;this.minX=t,this.maxX=t+a}get y(){return this.minY}set y(t){const a=this.maxY-this.minY;this.minY=t,this.maxY=t+a}get width(){return this.maxX-this.minX}set width(t){this.maxX=this.minX+t}get height(){return this.maxY-this.minY}set height(t){this.maxY=this.minY+t}get left(){return this.minX}get right(){return this.maxX}get top(){return this.minY}get bottom(){return this.maxY}get isPositive(){return this.maxX-this.minX>0&&this.maxY-this.minY>0}get isValid(){return this.minX+this.minY!==1/0}addVertexData(t,a,l,o){let c=this.minX,d=this.minY,m=this.maxX,p=this.maxY;o||(o=this.matrix);const g=o.a,x=o.b,b=o.c,E=o.d,C=o.tx,M=o.ty;for(let z=a;z<l;z+=2){const R=t[z],w=t[z+1],O=g*R+b*w+C,U=x*R+E*w+M;c=O<c?O:c,d=U<d?U:d,m=O>m?O:m,p=U>p?U:p}this.minX=c,this.minY=d,this.maxX=m,this.maxY=p}containsPoint(t,a){return this.minX<=t&&this.minY<=a&&this.maxX>=t&&this.maxY>=a}toString(){return`[pixi.js:Bounds minX=${this.minX} minY=${this.minY} maxX=${this.maxX} maxY=${this.maxY} width=${this.width} height=${this.height}]`}copyFrom(t){return this.minX=t.minX,this.minY=t.minY,this.maxX=t.maxX,this.maxY=t.maxY,this}}var E3={grad:.9,turn:360,rad:360/(2*Math.PI)},nr=function(n){return typeof n=="string"?n.length>0:typeof n=="number"},Ln=function(n,t,a){return t===void 0&&(t=0),a===void 0&&(a=Math.pow(10,t)),Math.round(a*n)/a+0},Wi=function(n,t,a){return t===void 0&&(t=0),a===void 0&&(a=1),n>a?a:n>t?n:t},p_=function(n){return(n=isFinite(n)?n%360:0)>0?n:n+360},a1=function(n){return{r:Wi(n.r,0,255),g:Wi(n.g,0,255),b:Wi(n.b,0,255),a:Wi(n.a)}},K0=function(n){return{r:Ln(n.r),g:Ln(n.g),b:Ln(n.b),a:Ln(n.a,3)}},C3=/^#([0-9a-f]{3,8})$/i,rp=function(n){var t=n.toString(16);return t.length<2?"0"+t:t},y_=function(n){var t=n.r,a=n.g,l=n.b,o=n.a,c=Math.max(t,a,l),d=c-Math.min(t,a,l),m=d?c===t?(a-l)/d:c===a?2+(l-t)/d:4+(t-a)/d:0;return{h:60*(m<0?m+6:m),s:c?d/c*100:0,v:c/255*100,a:o}},g_=function(n){var t=n.h,a=n.s,l=n.v,o=n.a;t=t/360*6,a/=100,l/=100;var c=Math.floor(t),d=l*(1-a),m=l*(1-(t-c)*a),p=l*(1-(1-t+c)*a),g=c%6;return{r:255*[l,m,d,d,p,l][g],g:255*[p,l,l,m,d,d][g],b:255*[d,d,p,l,l,m][g],a:o}},i1=function(n){return{h:p_(n.h),s:Wi(n.s,0,100),l:Wi(n.l,0,100),a:Wi(n.a)}},l1=function(n){return{h:Ln(n.h),s:Ln(n.s),l:Ln(n.l),a:Ln(n.a,3)}},s1=function(n){return g_((a=(t=n).s,{h:t.h,s:(a*=((l=t.l)<50?l:100-l)/100)>0?2*a/(l+a)*100:0,v:l+a,a:t.a}));var t,a,l},sd=function(n){return{h:(t=y_(n)).h,s:(o=(200-(a=t.s))*(l=t.v)/100)>0&&o<200?a*l/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,a,l,o},A3=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,M3=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,R3=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,z3=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Oy={string:[[function(n){var t=C3.exec(n);return t?(n=t[1]).length<=4?{r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:n.length===4?Ln(parseInt(n[3]+n[3],16)/255,2):1}:n.length===6||n.length===8?{r:parseInt(n.substr(0,2),16),g:parseInt(n.substr(2,2),16),b:parseInt(n.substr(4,2),16),a:n.length===8?Ln(parseInt(n.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(n){var t=R3.exec(n)||z3.exec(n);return t?t[2]!==t[4]||t[4]!==t[6]?null:a1({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(n){var t=A3.exec(n)||M3.exec(n);if(!t)return null;var a,l,o=i1({h:(a=t[1],l=t[2],l===void 0&&(l="deg"),Number(a)*(E3[l]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return s1(o)},"hsl"]],object:[[function(n){var t=n.r,a=n.g,l=n.b,o=n.a,c=o===void 0?1:o;return nr(t)&&nr(a)&&nr(l)?a1({r:Number(t),g:Number(a),b:Number(l),a:Number(c)}):null},"rgb"],[function(n){var t=n.h,a=n.s,l=n.l,o=n.a,c=o===void 0?1:o;if(!nr(t)||!nr(a)||!nr(l))return null;var d=i1({h:Number(t),s:Number(a),l:Number(l),a:Number(c)});return s1(d)},"hsl"],[function(n){var t=n.h,a=n.s,l=n.v,o=n.a,c=o===void 0?1:o;if(!nr(t)||!nr(a)||!nr(l))return null;var d=(function(m){return{h:p_(m.h),s:Wi(m.s,0,100),v:Wi(m.v,0,100),a:Wi(m.a)}})({h:Number(t),s:Number(a),v:Number(l),a:Number(c)});return g_(d)},"hsv"]]},r1=function(n,t){for(var a=0;a<t.length;a++){var l=t[a][0](n);if(l)return[l,t[a][1]]}return[null,void 0]},w3=function(n){return typeof n=="string"?r1(n.trim(),Oy.string):typeof n=="object"&&n!==null?r1(n,Oy.object):[null,void 0]},Z0=function(n,t){var a=sd(n);return{h:a.h,s:Wi(a.s+100*t,0,100),l:a.l,a:a.a}},J0=function(n){return(299*n.r+587*n.g+114*n.b)/1e3/255},u1=function(n,t){var a=sd(n);return{h:a.h,s:a.s,l:Wi(a.l+100*t,0,100),a:a.a}},Ny=(function(){function n(t){this.parsed=w3(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return n.prototype.isValid=function(){return this.parsed!==null},n.prototype.brightness=function(){return Ln(J0(this.rgba),2)},n.prototype.isDark=function(){return J0(this.rgba)<.5},n.prototype.isLight=function(){return J0(this.rgba)>=.5},n.prototype.toHex=function(){return t=K0(this.rgba),a=t.r,l=t.g,o=t.b,d=(c=t.a)<1?rp(Ln(255*c)):"","#"+rp(a)+rp(l)+rp(o)+d;var t,a,l,o,c,d},n.prototype.toRgb=function(){return K0(this.rgba)},n.prototype.toRgbString=function(){return t=K0(this.rgba),a=t.r,l=t.g,o=t.b,(c=t.a)<1?"rgba("+a+", "+l+", "+o+", "+c+")":"rgb("+a+", "+l+", "+o+")";var t,a,l,o,c},n.prototype.toHsl=function(){return l1(sd(this.rgba))},n.prototype.toHslString=function(){return t=l1(sd(this.rgba)),a=t.h,l=t.s,o=t.l,(c=t.a)<1?"hsla("+a+", "+l+"%, "+o+"%, "+c+")":"hsl("+a+", "+l+"%, "+o+"%)";var t,a,l,o,c},n.prototype.toHsv=function(){return t=y_(this.rgba),{h:Ln(t.h),s:Ln(t.s),v:Ln(t.v),a:Ln(t.a,3)};var t},n.prototype.invert=function(){return ys({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},n.prototype.saturate=function(t){return t===void 0&&(t=.1),ys(Z0(this.rgba,t))},n.prototype.desaturate=function(t){return t===void 0&&(t=.1),ys(Z0(this.rgba,-t))},n.prototype.grayscale=function(){return ys(Z0(this.rgba,-1))},n.prototype.lighten=function(t){return t===void 0&&(t=.1),ys(u1(this.rgba,t))},n.prototype.darken=function(t){return t===void 0&&(t=.1),ys(u1(this.rgba,-t))},n.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},n.prototype.alpha=function(t){return typeof t=="number"?ys({r:(a=this.rgba).r,g:a.g,b:a.b,a:t}):Ln(this.rgba.a,3);var a},n.prototype.hue=function(t){var a=sd(this.rgba);return typeof t=="number"?ys({h:t,s:a.s,l:a.l,a:a.a}):Ln(a.h)},n.prototype.isEqual=function(t){return this.toHex()===ys(t).toHex()},n})(),ys=function(n){return n instanceof Ny?n:new Ny(n)},o1=[],D3=function(n){n.forEach(function(t){o1.indexOf(t)<0&&(t(Ny,Oy),o1.push(t))})};function O3(n,t){var a={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},l={};for(var o in a)l[a[o]]=o;var c={};n.prototype.toName=function(d){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var m,p,g=l[this.toHex()];if(g)return g;if(d!=null&&d.closest){var x=this.toRgb(),b=1/0,E="black";if(!c.length)for(var C in a)c[C]=new n(a[C]).toRgb();for(var M in a){var z=(m=x,p=c[M],Math.pow(m.r-p.r,2)+Math.pow(m.g-p.g,2)+Math.pow(m.b-p.b,2));z<b&&(b=z,E=M)}return E}},t.string.push([function(d){var m=d.toLowerCase(),p=m==="transparent"?"#0000":a[m];return p?new n(p).toRgb():null},"name"])}D3([O3]);const nf=class ed{constructor(t=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=t}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(t){return this.value=t,this}set value(t){if(t instanceof ed)this._value=this._cloneSource(t._value),this._int=t._int,this._components.set(t._components);else{if(t===null)throw new Error("Cannot set Color#value to null");(this._value===null||!this._isSourceEqual(this._value,t))&&(this._value=this._cloneSource(t),this._normalize(this._value))}}get value(){return this._value}_cloneSource(t){return typeof t=="string"||typeof t=="number"||t instanceof Number||t===null?t:Array.isArray(t)||ArrayBuffer.isView(t)?t.slice(0):typeof t=="object"&&t!==null?{...t}:t}_isSourceEqual(t,a){const l=typeof t;if(l!==typeof a)return!1;if(l==="number"||l==="string"||t instanceof Number)return t===a;if(Array.isArray(t)&&Array.isArray(a)||ArrayBuffer.isView(t)&&ArrayBuffer.isView(a))return t.length!==a.length?!1:t.every((c,d)=>c===a[d]);if(t!==null&&a!==null){const c=Object.keys(t),d=Object.keys(a);return c.length!==d.length?!1:c.every(m=>t[m]===a[m])}return t===a}toRgba(){const[t,a,l,o]=this._components;return{r:t,g:a,b:l,a:o}}toRgb(){const[t,a,l]=this._components;return{r:t,g:a,b:l}}toRgbaString(){const[t,a,l]=this.toUint8RgbArray();return`rgba(${t},${a},${l},${this.alpha})`}toUint8RgbArray(t){const[a,l,o]=this._components;return this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb),t[0]=Math.round(a*255),t[1]=Math.round(l*255),t[2]=Math.round(o*255),t}toArray(t){this._arrayRgba||(this._arrayRgba=[]),t||(t=this._arrayRgba);const[a,l,o,c]=this._components;return t[0]=a,t[1]=l,t[2]=o,t[3]=c,t}toRgbArray(t){this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb);const[a,l,o]=this._components;return t[0]=a,t[1]=l,t[2]=o,t}toNumber(){return this._int}toBgrNumber(){const[t,a,l]=this.toUint8RgbArray();return(l<<16)+(a<<8)+t}toLittleEndianNumber(){const t=this._int;return(t>>16)+(t&65280)+((t&255)<<16)}multiply(t){const[a,l,o,c]=ed._temp.setValue(t)._components;return this._components[0]*=a,this._components[1]*=l,this._components[2]*=o,this._components[3]*=c,this._refreshInt(),this._value=null,this}premultiply(t,a=!0){return a&&(this._components[0]*=t,this._components[1]*=t,this._components[2]*=t),this._components[3]=t,this._refreshInt(),this._value=null,this}toPremultiplied(t,a=!0){if(t===1)return(255<<24)+this._int;if(t===0)return a?0:this._int;let l=this._int>>16&255,o=this._int>>8&255,c=this._int&255;return a&&(l=l*t+.5|0,o=o*t+.5|0,c=c*t+.5|0),(t*255<<24)+(l<<16)+(o<<8)+c}toHex(){const t=this._int.toString(16);return`#${"000000".substring(0,6-t.length)+t}`}toHexa(){const a=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-a.length)+a}setAlpha(t){return this._components[3]=this._clamp(t),this._value=null,this}_normalize(t){let a,l,o,c;if((typeof t=="number"||t instanceof Number)&&t>=0&&t<=16777215){const d=t;a=(d>>16&255)/255,l=(d>>8&255)/255,o=(d&255)/255,c=1}else if((Array.isArray(t)||t instanceof Float32Array)&&t.length>=3&&t.length<=4)t=this._clamp(t),[a,l,o,c=1]=t;else if((t instanceof Uint8Array||t instanceof Uint8ClampedArray)&&t.length>=3&&t.length<=4)t=this._clamp(t,0,255),[a,l,o,c=255]=t,a/=255,l/=255,o/=255,c/=255;else if(typeof t=="string"||typeof t=="object"){if(typeof t=="string"){const m=ed.HEX_PATTERN.exec(t);m&&(t=`#${m[2]}`)}const d=ys(t);d.isValid()&&({r:a,g:l,b:o,a:c}=d.rgba,a/=255,l/=255,o/=255)}if(a!==void 0)this._components[0]=a,this._components[1]=l,this._components[2]=o,this._components[3]=c,this._refreshInt();else throw new Error(`Unable to convert color ${t}`)}_refreshInt(){this._clamp(this._components);const[t,a,l]=this._components;this._int=(t*255<<16)+(a*255<<8)+(l*255|0)}_clamp(t,a=0,l=1){return typeof t=="number"?Math.min(Math.max(t,a),l):(t.forEach((o,c)=>{t[c]=Math.min(Math.max(o,a),l)}),t)}static isColorLike(t){return typeof t=="number"||typeof t=="string"||t instanceof Number||t instanceof ed||Array.isArray(t)||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Float32Array||t.r!==void 0&&t.g!==void 0&&t.b!==void 0||t.r!==void 0&&t.g!==void 0&&t.b!==void 0&&t.a!==void 0||t.h!==void 0&&t.s!==void 0&&t.l!==void 0||t.h!==void 0&&t.s!==void 0&&t.l!==void 0&&t.a!==void 0||t.h!==void 0&&t.s!==void 0&&t.v!==void 0||t.h!==void 0&&t.s!==void 0&&t.v!==void 0&&t.a!==void 0}};nf.shared=new nf;nf._temp=new nf;nf.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let zn=nf;const N3={cullArea:null,cullable:!1,cullableChildren:!0};let F0=0;const c1=500;function Ya(...n){F0!==c1&&(F0++,F0===c1?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...n))}const xd={_registeredResources:new Set,register(n){this._registeredResources.add(n)},unregister(n){this._registeredResources.delete(n)},release(){this._registeredResources.forEach(n=>n.clear())},get registeredCount(){return this._registeredResources.size},isRegistered(n){return this._registeredResources.has(n)},reset(){this._registeredResources.clear()}};class B3{constructor(t,a){this._pool=[],this._count=0,this._index=0,this._classType=t,a&&this.prepopulate(a)}prepopulate(t){for(let a=0;a<t;a++)this._pool[this._index++]=new this._classType;this._count+=t}get(t){var l;let a;return this._index>0?a=this._pool[--this._index]:(a=new this._classType,this._count++),(l=a.init)==null||l.call(a,t),a}return(t){var a;(a=t.reset)==null||a.call(t),this._pool[this._index++]=t}get totalSize(){return this._count}get totalFree(){return this._index}get totalUsed(){return this._count-this._index}clear(){if(this._pool.length>0&&this._pool[0].destroy)for(let t=0;t<this._index;t++)this._pool[t].destroy();this._pool.length=0,this._count=0,this._index=0}}class U3{constructor(){this._poolsByClass=new Map}prepopulate(t,a){this.getPool(t).prepopulate(a)}get(t,a){return this.getPool(t).get(a)}return(t){this.getPool(t.constructor).return(t)}getPool(t){return this._poolsByClass.has(t)||this._poolsByClass.set(t,new B3(t)),this._poolsByClass.get(t)}stats(){const t={};return this._poolsByClass.forEach(a=>{const l=t[a._classType.name]?a._classType.name+a._classType.ID:a._classType.name;t[l]={free:a.totalFree,used:a.totalUsed,size:a.totalSize}}),t}clear(){this._poolsByClass.forEach(t=>t.clear()),this._poolsByClass.clear()}}const ai=new U3;xd.register(ai);const H3={get isCachedAsTexture(){var n;return!!((n=this.renderGroup)!=null&&n.isCachedAsTexture)},cacheAsTexture(n){typeof n=="boolean"&&n===!1?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(n===!0?{}:n))},updateCacheTexture(){var n;(n=this.renderGroup)==null||n.updateCacheTexture()},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(n){de("v8.6.0","cacheAsBitmap is deprecated, use cacheAsTexture instead."),this.cacheAsTexture(n)}};function j3(n,t,a){const l=n.length;let o;if(t>=l||a===0)return;a=t+a>l?l-t:a;const c=l-a;for(o=t;o<c;++o)n[o]=n[o+a];n.length=c}const G3={allowChildren:!0,removeChildren(n=0,t){var c;const a=t??this.children.length,l=a-n,o=[];if(l>0&&l<=a){for(let m=a-1;m>=n;m--){const p=this.children[m];p&&(o.push(p),p.parent=null)}j3(this.children,n,a);const d=this.renderGroup||this.parentRenderGroup;d&&d.removeChildren(o);for(let m=0;m<o.length;++m){const p=o[m];(c=p.parentRenderLayer)==null||c.detach(p),this.emit("childRemoved",p,this,m),o[m].emit("removed",this)}return o.length>0&&this._didViewChangeTick++,o}else if(l===0&&this.children.length===0)return o;throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},removeChildAt(n){const t=this.getChildAt(n);return this.removeChild(t)},getChildAt(n){if(n<0||n>=this.children.length)throw new Error(`getChildAt: Index (${n}) does not exist.`);return this.children[n]},setChildIndex(n,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);this.getChildIndex(n),this.addChildAt(n,t)},getChildIndex(n){const t=this.children.indexOf(n);if(t===-1)throw new Error("The supplied Container must be a child of the caller");return t},addChildAt(n,t){this.allowChildren||de(un,"addChildAt: Only Containers will be allowed to add children in v8.0.0");const{children:a}=this;if(t<0||t>a.length)throw new Error(`${n}addChildAt: The index ${t} supplied is out of bounds ${a.length}`);const l=n.parent===this;if(n.parent){const c=n.parent.children.indexOf(n);if(l){if(c===t)return n;n.parent.children.splice(c,1)}else n.removeFromParent()}t===a.length?a.push(n):a.splice(t,0,n),n.parent=this,n.didChange=!0,n._updateFlags=15;const o=this.renderGroup||this.parentRenderGroup;return o&&o.addChild(n),this.sortableChildren&&(this.sortDirty=!0),l||(this.emit("childAdded",n,this,t),n.emit("added",this)),n},swapChildren(n,t){if(n===t)return;const a=this.getChildIndex(n),l=this.getChildIndex(t);this.children[a]=t,this.children[l]=n;const o=this.renderGroup||this.parentRenderGroup;o&&(o.structureDidChange=!0),this._didContainerChangeTick++},removeFromParent(){var n;(n=this.parent)==null||n.removeChild(this)},reparentChild(...n){return n.length===1?this.reparentChildAt(n[0],this.children.length):(n.forEach(t=>this.reparentChildAt(t,this.children.length)),n[0])},reparentChildAt(n,t){if(n.parent===this)return this.setChildIndex(n,t),n;const a=n.worldTransform.clone();n.removeFromParent(),this.addChildAt(n,t);const l=this.worldTransform.clone();return l.invert(),a.prepend(l),n.setFromMatrix(a),n},replaceChild(n,t){n.updateLocalTransform(),this.addChildAt(t,this.getChildIndex(n)),t.setFromMatrix(n.localTransform),t.updateLocalTransform(),this.removeChild(n)}},Y3={collectRenderables(n,t,a){this.parentRenderLayer&&this.parentRenderLayer!==a||this.globalDisplayStatus<7||!this.includeInBuild||(this.sortableChildren&&this.sortChildren(),this.isSimple?this.collectRenderablesSimple(n,t,a):this.renderGroup?t.renderPipes.renderGroup.addRenderGroup(this.renderGroup,n):this.collectRenderablesWithEffects(n,t,a))},collectRenderablesSimple(n,t,a){const l=this.children,o=l.length;for(let c=0;c<o;c++)l[c].collectRenderables(n,t,a)},collectRenderablesWithEffects(n,t,a){const{renderPipes:l}=t;for(let o=0;o<this.effects.length;o++){const c=this.effects[o];l[c.pipe].push(c,this,n)}this.collectRenderablesSimple(n,t,a);for(let o=this.effects.length-1;o>=0;o--){const c=this.effects[o];l[c.pipe].pop(c,this,n)}}};class f1{constructor(){this.pipe="filter",this.priority=1}destroy(){for(let t=0;t<this.filters.length;t++)this.filters[t].destroy();this.filters=null,this.filterArea=null}}class q3{constructor(){this._effectClasses=[],this._tests=[],this._initialized=!1}init(){this._initialized||(this._initialized=!0,this._effectClasses.forEach(t=>{this.add({test:t.test,maskClass:t})}))}add(t){this._tests.push(t)}getMaskEffect(t){this._initialized||this.init();for(let a=0;a<this._tests.length;a++){const l=this._tests[a];if(l.test(t))return ai.get(l.maskClass,t)}return t}returnMaskEffect(t){ai.return(t)}}const By=new q3;Ie.handleByList(Wt.MaskEffect,By._effectClasses);const L3={_maskEffect:null,_maskOptions:{inverse:!1},_filterEffect:null,effects:[],_markStructureAsChanged(){const n=this.renderGroup||this.parentRenderGroup;n&&(n.structureDidChange=!0)},addEffect(n){this.effects.indexOf(n)===-1&&(this.effects.push(n),this.effects.sort((a,l)=>a.priority-l.priority),this._markStructureAsChanged(),this._updateIsSimple())},removeEffect(n){const t=this.effects.indexOf(n);t!==-1&&(this.effects.splice(t,1),this._markStructureAsChanged(),this._updateIsSimple())},set mask(n){const t=this._maskEffect;(t==null?void 0:t.mask)!==n&&(t&&(this.removeEffect(t),By.returnMaskEffect(t),this._maskEffect=null),n!=null&&(this._maskEffect=By.getMaskEffect(n),this.addEffect(this._maskEffect)))},get mask(){var n;return(n=this._maskEffect)==null?void 0:n.mask},setMask(n){this._maskOptions={...this._maskOptions,...n},n.mask&&(this.mask=n.mask),this._markStructureAsChanged()},set filters(n){var c;!Array.isArray(n)&&n&&(n=[n]);const t=this._filterEffect||(this._filterEffect=new f1);n=n;const a=(n==null?void 0:n.length)>0,l=((c=t.filters)==null?void 0:c.length)>0,o=a!==l;n=Array.isArray(n)?n.slice(0):n,t.filters=Object.freeze(n),o&&(a?this.addEffect(t):(this.removeEffect(t),t.filters=n??null))},get filters(){var n;return(n=this._filterEffect)==null?void 0:n.filters},set filterArea(n){this._filterEffect||(this._filterEffect=new f1),this._filterEffect.filterArea=n},get filterArea(){var n;return(n=this._filterEffect)==null?void 0:n.filterArea}},X3={label:null,get name(){return de(un,"Container.name property has been removed, use Container.label instead"),this.label},set name(n){de(un,"Container.name property has been removed, use Container.label instead"),this.label=n},getChildByName(n,t=!1){return this.getChildByLabel(n,t)},getChildByLabel(n,t=!1){const a=this.children;for(let l=0;l<a.length;l++){const o=a[l];if(o.label===n||n instanceof RegExp&&n.test(o.label))return o}if(t)for(let l=0;l<a.length;l++){const c=a[l].getChildByLabel(n,!0);if(c)return c}return null},getChildrenByLabel(n,t=!1,a=[]){const l=this.children;for(let o=0;o<l.length;o++){const c=l[o];(c.label===n||n instanceof RegExp&&n.test(c.label))&&a.push(c)}if(t)for(let o=0;o<l.length;o++)l[o].getChildrenByLabel(n,!0,a);return a}},Ga=ai.getPool(le),rr=ai.getPool(Ii),V3=new le,k3={getFastGlobalBounds(n,t){t||(t=new Ii),t.clear(),this._getGlobalBoundsRecursive(!!n,t,this.parentRenderLayer),t.isValid||t.set(0,0,0,0);const a=this.renderGroup||this.parentRenderGroup;return t.applyMatrix(a.worldTransform),t},_getGlobalBoundsRecursive(n,t,a){let l=t;if(n&&this.parentRenderLayer&&this.parentRenderLayer!==a||this.localDisplayStatus!==7||!this.measurable)return;const o=!!this.effects.length;if((this.renderGroup||o)&&(l=rr.get().clear()),this.boundsArea)t.addRect(this.boundsArea,this.worldTransform);else{if(this.renderPipeId){const d=this.bounds;l.addFrame(d.minX,d.minY,d.maxX,d.maxY,this.groupTransform)}const c=this.children;for(let d=0;d<c.length;d++)c[d]._getGlobalBoundsRecursive(n,l,a)}if(o){let c=!1;const d=this.renderGroup||this.parentRenderGroup;for(let m=0;m<this.effects.length;m++)this.effects[m].addBounds&&(c||(c=!0,l.applyMatrix(d.worldTransform)),this.effects[m].addBounds(l,!0));c&&l.applyMatrix(d.worldTransform.copyTo(V3).invert()),t.addBounds(l),rr.return(l)}else this.renderGroup&&(t.addBounds(l,this.relativeGroupTransform),rr.return(l))}};function v_(n,t,a){a.clear();let l,o;return n.parent?t?l=n.parent.worldTransform:(o=Ga.get().identity(),l=ug(n,o)):l=le.IDENTITY,x_(n,a,l,t),o&&Ga.return(o),a.isValid||a.set(0,0,0,0),a}function x_(n,t,a,l){var m,p;if(!n.visible||!n.measurable)return;let o;l?o=n.worldTransform:(n.updateLocalTransform(),o=Ga.get(),o.appendFrom(n.localTransform,a));const c=t,d=!!n.effects.length;if(d&&(t=rr.get().clear()),n.boundsArea)t.addRect(n.boundsArea,o);else{const g=n.bounds;g&&!g.isEmpty()&&(t.matrix=o,t.addBounds(g));for(let x=0;x<n.children.length;x++)x_(n.children[x],t,o,l)}if(d){for(let g=0;g<n.effects.length;g++)(p=(m=n.effects[g]).addBounds)==null||p.call(m,t);c.addBounds(t,le.IDENTITY),rr.return(t)}l||Ga.return(o)}function ug(n,t){const a=n.parent;return a&&(ug(a,t),a.updateLocalTransform(),t.append(a.localTransform)),t}function __(n,t){if(n===16777215||!t)return t;if(t===16777215||!n)return n;const a=n>>16&255,l=n>>8&255,o=n&255,c=t>>16&255,d=t>>8&255,m=t&255,p=a*c/255|0,g=l*d/255|0,x=o*m/255|0;return(p<<16)+(g<<8)+x}const h1=16777215;function d1(n,t){return n===h1?t:t===h1?n:__(n,t)}function Cp(n){return((n&255)<<16)+(n&65280)+(n>>16&255)}const Q3={getGlobalAlpha(n){if(n)return this.renderGroup?this.renderGroup.worldAlpha:this.parentRenderGroup?this.parentRenderGroup.worldAlpha*this.alpha:this.alpha;let t=this.alpha,a=this.parent;for(;a;)t*=a.alpha,a=a.parent;return t},getGlobalTransform(n=new le,t){if(t)return n.copyFrom(this.worldTransform);this.updateLocalTransform();const a=ug(this,Ga.get().identity());return n.appendFrom(this.localTransform,a),Ga.return(a),n},getGlobalTint(n){if(n)return this.renderGroup?Cp(this.renderGroup.worldColor):this.parentRenderGroup?Cp(d1(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let t=this.localColor,a=this.parent;for(;a;)t=d1(t,a.localColor),a=a.parent;return Cp(t)}};function S_(n,t,a){return t.clear(),a||(a=le.IDENTITY),b_(n,t,a,n,!0),t.isValid||t.set(0,0,0,0),t}function b_(n,t,a,l,o){var p,g;let c;if(o)c=Ga.get(),c=a.copyTo(c);else{if(!n.visible||!n.measurable)return;n.updateLocalTransform();const x=n.localTransform;c=Ga.get(),c.appendFrom(x,a)}const d=t,m=!!n.effects.length;if(m&&(t=rr.get().clear()),n.boundsArea)t.addRect(n.boundsArea,c);else{n.renderPipeId&&(t.matrix=c,t.addBounds(n.bounds));const x=n.children;for(let b=0;b<x.length;b++)b_(x[b],t,c,l,!1)}if(m){for(let x=0;x<n.effects.length;x++)(g=(p=n.effects[x]).addLocalBounds)==null||g.call(p,t,l);d.addBounds(t,le.IDENTITY),rr.return(t)}Ga.return(c)}function T_(n,t){const a=n.children;for(let l=0;l<a.length;l++){const o=a[l],c=o.uid,d=(o._didViewChangeTick&65535)<<16|o._didContainerChangeTick&65535,m=t.index;(t.data[m]!==c||t.data[m+1]!==d)&&(t.data[t.index]=c,t.data[t.index+1]=d,t.didChange=!0),t.index=m+2,o.children.length&&T_(o,t)}return t.didChange}const K3=new le,Z3={_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(n,t){const a=Math.sign(this.scale.x)||1;t!==0?this.scale.x=n/t*a:this.scale.x=a},_setHeight(n,t){const a=Math.sign(this.scale.y)||1;t!==0?this.scale.y=n/t*a:this.scale.y=a},getLocalBounds(){this._localBoundsCacheData||(this._localBoundsCacheData={data:[],index:1,didChange:!1,localBounds:new Ii});const n=this._localBoundsCacheData;return n.index=1,n.didChange=!1,n.data[0]!==this._didViewChangeTick&&(n.didChange=!0,n.data[0]=this._didViewChangeTick),T_(this,n),n.didChange&&S_(this,n.localBounds,K3),n.localBounds},getBounds(n,t){return v_(this,n,t||new Ii)}},J3={_onRender:null,set onRender(n){const t=this.renderGroup||this.parentRenderGroup;if(!n){this._onRender&&(t==null||t.removeOnRender(this)),this._onRender=null;return}this._onRender||t==null||t.addOnRender(this),this._onRender=n},get onRender(){return this._onRender}},F3={_zIndex:0,sortDirty:!1,sortableChildren:!1,get zIndex(){return this._zIndex},set zIndex(n){this._zIndex!==n&&(this._zIndex=n,this.depthOfChildModified())},depthOfChildModified(){this.parent&&(this.parent.sortableChildren=!0,this.parent.sortDirty=!0),this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0)},sortChildren(){this.sortDirty&&(this.sortDirty=!1,this.children.sort(W3))}};function W3(n,t){return n._zIndex-t._zIndex}const P3={getGlobalPosition(n=new ya,t=!1){return this.parent?this.parent.toGlobal(this._position,n,t):(n.x=this._position.x,n.y=this._position.y),n},toGlobal(n,t,a=!1){const l=this.getGlobalTransform(Ga.get(),a);return t=l.apply(n,t),Ga.return(l),t},toLocal(n,t,a,l){t&&(n=t.toGlobal(n,a,l));const o=this.getGlobalTransform(Ga.get(),l);return a=o.applyInverse(n,a),Ga.return(o),a}};class og{constructor(){this.uid=on("instructionSet"),this.instructions=[],this.instructionSize=0,this.renderables=[],this.gcTick=0}reset(){this.instructionSize=0}destroy(){this.instructions.length=0,this.renderables.length=0,this.renderPipes=null,this.gcTick=0}add(t){this.instructions[this.instructionSize++]=t}log(){this.instructions.length=this.instructionSize,console.table(this.instructions,["type","action"])}}let I3=0;class $3{constructor(t){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this.textureStyle=new ef(this.textureOptions)}createTexture(t,a,l,o){const c=new $i({...this.textureOptions,width:t,height:a,resolution:1,antialias:l,autoGarbageCollect:!1,autoGenerateMipmaps:o});return new ze({source:c,label:`texturePool_${I3++}`})}getOptimalTexture(t,a,l=1,o,c=!1){let d=Math.ceil(t*l-1e-6),m=Math.ceil(a*l-1e-6);d=tf(d),m=tf(m);const p=o?1:0,g=c?1:0,x=(d<<17)+(m<<2)+(g<<1)+p;this._texturePool[x]||(this._texturePool[x]=[]);let b=this._texturePool[x].pop();return b||(b=this.createTexture(d,m,o,c)),b.source._resolution=l,b.source.width=d/l,b.source.height=m/l,b.source.pixelWidth=d,b.source.pixelHeight=m,b.frame.x=0,b.frame.y=0,b.frame.width=t,b.frame.height=a,b.updateUvs(),this._poolKeyHash[b.uid]=x,b}getSameSizeTexture(t,a=!1){const l=t.source;return this.getOptimalTexture(t.width,t.height,l._resolution,a)}returnTexture(t,a=!1){const l=this._poolKeyHash[t.uid];a&&(t.source.style=this.textureStyle),this._texturePool[l].push(t)}clear(t){if(t=t!==!1,t)for(const a in this._texturePool){const l=this._texturePool[a];if(l)for(let o=0;o<l.length;o++)l[o].destroy(!0)}this._texturePool={}}}const Xp=new $3;xd.register(Xp);class tE{constructor(){this.renderPipeId="renderGroup",this.root=null,this.canBundle=!1,this.renderGroupParent=null,this.renderGroupChildren=[],this.worldTransform=new le,this.worldColorAlpha=4294967295,this.worldColor=16777215,this.worldAlpha=1,this.childrenToUpdate=Object.create(null),this.updateTick=0,this.gcTick=0,this.childrenRenderablesToUpdate={list:[],index:0},this.structureDidChange=!0,this.instructionSet=new og,this._onRenderContainers=[],this.textureNeedsUpdate=!0,this.isCachedAsTexture=!1,this._matrixDirty=7}init(t){this.root=t,t._onRender&&this.addOnRender(t),t.didChange=!0;const a=t.children;for(let l=0;l<a.length;l++){const o=a[l];o._updateFlags=15,this.addChild(o)}}enableCacheAsTexture(t={}){this.textureOptions=t,this.isCachedAsTexture=!0,this.textureNeedsUpdate=!0}disableCacheAsTexture(){this.isCachedAsTexture=!1,this.texture&&(Xp.returnTexture(this.texture,!0),this.texture=null)}updateCacheTexture(){this.textureNeedsUpdate=!0;const t=this._parentCacheAsTextureRenderGroup;t&&!t.textureNeedsUpdate&&t.updateCacheTexture()}reset(){this.renderGroupChildren.length=0;for(const t in this.childrenToUpdate){const a=this.childrenToUpdate[t];a.list.fill(null),a.index=0}this.childrenRenderablesToUpdate.index=0,this.childrenRenderablesToUpdate.list.fill(null),this.root=null,this.updateTick=0,this.structureDidChange=!0,this._onRenderContainers.length=0,this.renderGroupParent=null,this.disableCacheAsTexture()}get localTransform(){return this.root.localTransform}addRenderGroupChild(t){t.renderGroupParent&&t.renderGroupParent._removeRenderGroupChild(t),t.renderGroupParent=this,this.renderGroupChildren.push(t)}_removeRenderGroupChild(t){const a=this.renderGroupChildren.indexOf(t);a>-1&&this.renderGroupChildren.splice(a,1),t.renderGroupParent=null}addChild(t){if(this.structureDidChange=!0,t.parentRenderGroup=this,t.updateTick=-1,t.parent===this.root?t.relativeRenderGroupDepth=1:t.relativeRenderGroupDepth=t.parent.relativeRenderGroupDepth+1,t.didChange=!0,this.onChildUpdate(t),t.renderGroup){this.addRenderGroupChild(t.renderGroup);return}t._onRender&&this.addOnRender(t);const a=t.children;for(let l=0;l<a.length;l++)this.addChild(a[l])}removeChild(t){if(this.structureDidChange=!0,t._onRender&&(t.renderGroup||this.removeOnRender(t)),t.parentRenderGroup=null,t.renderGroup){this._removeRenderGroupChild(t.renderGroup);return}const a=t.children;for(let l=0;l<a.length;l++)this.removeChild(a[l])}removeChildren(t){for(let a=0;a<t.length;a++)this.removeChild(t[a])}onChildUpdate(t){let a=this.childrenToUpdate[t.relativeRenderGroupDepth];a||(a=this.childrenToUpdate[t.relativeRenderGroupDepth]={index:0,list:[]}),a.list[a.index++]=t}updateRenderable(t){t.globalDisplayStatus<7||(this.instructionSet.renderPipes[t.renderPipeId].updateRenderable(t),t.didViewUpdate=!1)}onChildViewUpdate(t){this.childrenRenderablesToUpdate.list[this.childrenRenderablesToUpdate.index++]=t}get isRenderable(){return this.root.localDisplayStatus===7&&this.worldAlpha>0}addOnRender(t){this._onRenderContainers.push(t)}removeOnRender(t){this._onRenderContainers.splice(this._onRenderContainers.indexOf(t),1)}runOnRender(t){for(let a=0;a<this._onRenderContainers.length;a++)this._onRenderContainers[a]._onRender(t)}destroy(){this.disableCacheAsTexture(),this.renderGroupParent=null,this.root=null,this.childrenRenderablesToUpdate=null,this.childrenToUpdate=null,this.renderGroupChildren=null,this._onRenderContainers=null,this.instructionSet=null}getChildren(t=[]){const a=this.root.children;for(let l=0;l<a.length;l++)this._getChildren(a[l],t);return t}_getChildren(t,a=[]){if(a.push(t),t.renderGroup)return a;const l=t.children;for(let o=0;o<l.length;o++)this._getChildren(l[o],a);return a}invalidateMatrices(){this._matrixDirty=7}get inverseWorldTransform(){return(this._matrixDirty&1)===0?this._inverseWorldTransform:(this._matrixDirty&=-2,this._inverseWorldTransform||(this._inverseWorldTransform=new le),this._inverseWorldTransform.copyFrom(this.worldTransform).invert())}get textureOffsetInverseTransform(){return(this._matrixDirty&2)===0?this._textureOffsetInverseTransform:(this._matrixDirty&=-3,this._textureOffsetInverseTransform||(this._textureOffsetInverseTransform=new le),this._textureOffsetInverseTransform.copyFrom(this.inverseWorldTransform).translate(-this._textureBounds.x,-this._textureBounds.y))}get inverseParentTextureTransform(){if((this._matrixDirty&4)===0)return this._inverseParentTextureTransform;this._matrixDirty&=-5;const t=this._parentCacheAsTextureRenderGroup;return t?(this._inverseParentTextureTransform||(this._inverseParentTextureTransform=new le),this._inverseParentTextureTransform.copyFrom(this.worldTransform).prepend(t.inverseWorldTransform).translate(-t._textureBounds.x,-t._textureBounds.y)):this.worldTransform}get cacheToLocalTransform(){return this.isCachedAsTexture?this.textureOffsetInverseTransform:this._parentCacheAsTextureRenderGroup?this._parentCacheAsTextureRenderGroup.textureOffsetInverseTransform:null}}function eE(n,t,a={}){for(const l in t)!a[l]&&t[l]!==void 0&&(n[l]=t[l])}const W0=new In(null),up=new In(null),P0=new In(null,1,1),op=new In(null),m1=1,nE=2,I0=4;class $n extends _s{constructor(t={}){var a,l;super(),this.uid=on("renderable"),this._updateFlags=15,this.renderGroup=null,this.parentRenderGroup=null,this.parentRenderGroupIndex=0,this.didChange=!1,this.didViewUpdate=!1,this.relativeRenderGroupDepth=0,this.children=[],this.parent=null,this.includeInBuild=!0,this.measurable=!0,this.isSimple=!0,this.parentRenderLayer=null,this.updateTick=-1,this.localTransform=new le,this.relativeGroupTransform=new le,this.groupTransform=this.relativeGroupTransform,this.destroyed=!1,this._position=new In(this,0,0),this._scale=P0,this._pivot=up,this._origin=op,this._skew=W0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._rotation=0,this.localColor=16777215,this.localAlpha=1,this.groupAlpha=1,this.groupColor=16777215,this.groupColorAlpha=4294967295,this.localBlendMode="inherit",this.groupBlendMode="normal",this.localDisplayStatus=7,this.globalDisplayStatus=7,this._didContainerChangeTick=0,this._didViewChangeTick=0,this._didLocalTransformChangeId=-1,this.effects=[],eE(this,t,{children:!0,parent:!0,effects:!0}),(a=t.children)==null||a.forEach(o=>this.addChild(o)),(l=t.parent)==null||l.addChild(this)}static mixin(t){de("8.8.0","Container.mixin is deprecated, please use extensions.mixin instead."),Ie.mixin($n,t)}set _didChangeId(t){this._didViewChangeTick=t>>12&4095,this._didContainerChangeTick=t&4095}get _didChangeId(){return this._didContainerChangeTick&4095|(this._didViewChangeTick&4095)<<12}addChild(...t){if(this.allowChildren||de(un,"addChild: Only Containers will be allowed to add children in v8.0.0"),t.length>1){for(let o=0;o<t.length;o++)this.addChild(t[o]);return t[0]}const a=t[0],l=this.renderGroup||this.parentRenderGroup;return a.parent===this?(this.children.splice(this.children.indexOf(a),1),this.children.push(a),l&&(l.structureDidChange=!0),a):(a.parent&&a.parent.removeChild(a),this.children.push(a),this.sortableChildren&&(this.sortDirty=!0),a.parent=this,a.didChange=!0,a._updateFlags=15,l&&l.addChild(a),this.emit("childAdded",a,this,this.children.length-1),a.emit("added",this),this._didViewChangeTick++,a._zIndex!==0&&a.depthOfChildModified(),a)}removeChild(...t){if(t.length>1){for(let o=0;o<t.length;o++)this.removeChild(t[o]);return t[0]}const a=t[0],l=this.children.indexOf(a);return l>-1&&(this._didViewChangeTick++,this.children.splice(l,1),this.renderGroup?this.renderGroup.removeChild(a):this.parentRenderGroup&&this.parentRenderGroup.removeChild(a),a.parentRenderLayer&&a.parentRenderLayer.detach(a),a.parent=null,this.emit("childRemoved",a,this,l),a.emit("removed",this)),a}_onUpdate(t){t&&t===this._skew&&this._updateSkew(),this._didContainerChangeTick++,!this.didChange&&(this.didChange=!0,this.parentRenderGroup&&this.parentRenderGroup.onChildUpdate(this))}set isRenderGroup(t){!!this.renderGroup!==t&&(t?this.enableRenderGroup():this.disableRenderGroup())}get isRenderGroup(){return!!this.renderGroup}enableRenderGroup(){if(this.renderGroup)return;const t=this.parentRenderGroup;t==null||t.removeChild(this),this.renderGroup=ai.get(tE,this),this.groupTransform=le.IDENTITY,t==null||t.addChild(this),this._updateIsSimple()}disableRenderGroup(){if(!this.renderGroup)return;const t=this.parentRenderGroup;t==null||t.removeChild(this),ai.return(this.renderGroup),this.renderGroup=null,this.groupTransform=this.relativeGroupTransform,t==null||t.addChild(this),this._updateIsSimple()}_updateIsSimple(){this.isSimple=!this.renderGroup&&this.effects.length===0}get worldTransform(){return this._worldTransform||(this._worldTransform=new le),this.renderGroup?this._worldTransform.copyFrom(this.renderGroup.worldTransform):this.parentRenderGroup&&this._worldTransform.appendFrom(this.relativeGroupTransform,this.parentRenderGroup.worldTransform),this._worldTransform}get x(){return this._position.x}set x(t){this._position.x=t}get y(){return this._position.y}set y(t){this._position.y=t}get position(){return this._position}set position(t){this._position.copyFrom(t)}get rotation(){return this._rotation}set rotation(t){this._rotation!==t&&(this._rotation=t,this._onUpdate(this._skew))}get angle(){return this.rotation*y3}set angle(t){this.rotation=t*g3}get pivot(){return this._pivot===up&&(this._pivot=new In(this,0,0)),this._pivot}set pivot(t){this._pivot===up&&(this._pivot=new In(this,0,0),this._origin!==op&&Ya("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),typeof t=="number"?this._pivot.set(t):this._pivot.copyFrom(t)}get skew(){return this._skew===W0&&(this._skew=new In(this,0,0)),this._skew}set skew(t){this._skew===W0&&(this._skew=new In(this,0,0)),this._skew.copyFrom(t)}get scale(){return this._scale===P0&&(this._scale=new In(this,1,1)),this._scale}set scale(t){this._scale===P0&&(this._scale=new In(this,0,0)),typeof t=="string"&&(t=parseFloat(t)),typeof t=="number"?this._scale.set(t):this._scale.copyFrom(t)}get origin(){return this._origin===op&&(this._origin=new In(this,0,0)),this._origin}set origin(t){this._origin===op&&(this._origin=new In(this,0,0),this._pivot!==up&&Ya("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),typeof t=="number"?this._origin.set(t):this._origin.copyFrom(t)}get width(){return Math.abs(this.scale.x*this.getLocalBounds().width)}set width(t){const a=this.getLocalBounds().width;this._setWidth(t,a)}get height(){return Math.abs(this.scale.y*this.getLocalBounds().height)}set height(t){const a=this.getLocalBounds().height;this._setHeight(t,a)}getSize(t){t||(t={});const a=this.getLocalBounds();return t.width=Math.abs(this.scale.x*a.width),t.height=Math.abs(this.scale.y*a.height),t}setSize(t,a){const l=this.getLocalBounds();typeof t=="object"?(a=t.height??t.width,t=t.width):a??(a=t),t!==void 0&&this._setWidth(t,l.width),a!==void 0&&this._setHeight(a,l.height)}_updateSkew(){const t=this._rotation,a=this._skew;this._cx=Math.cos(t+a._y),this._sx=Math.sin(t+a._y),this._cy=-Math.sin(t-a._x),this._sy=Math.cos(t-a._x)}updateTransform(t){return this.position.set(typeof t.x=="number"?t.x:this.position.x,typeof t.y=="number"?t.y:this.position.y),this.scale.set(typeof t.scaleX=="number"?t.scaleX||1:this.scale.x,typeof t.scaleY=="number"?t.scaleY||1:this.scale.y),this.rotation=typeof t.rotation=="number"?t.rotation:this.rotation,this.skew.set(typeof t.skewX=="number"?t.skewX:this.skew.x,typeof t.skewY=="number"?t.skewY:this.skew.y),this.pivot.set(typeof t.pivotX=="number"?t.pivotX:this.pivot.x,typeof t.pivotY=="number"?t.pivotY:this.pivot.y),this.origin.set(typeof t.originX=="number"?t.originX:this.origin.x,typeof t.originY=="number"?t.originY:this.origin.y),this}setFromMatrix(t){t.decompose(this)}updateLocalTransform(){const t=this._didContainerChangeTick;if(this._didLocalTransformChangeId===t)return;this._didLocalTransformChangeId=t;const a=this.localTransform,l=this._scale,o=this._pivot,c=this._origin,d=this._position,m=l._x,p=l._y,g=o._x,x=o._y,b=-c._x,E=-c._y;a.a=this._cx*m,a.b=this._sx*m,a.c=this._cy*p,a.d=this._sy*p,a.tx=d._x-(g*a.a+x*a.c)+(b*a.a+E*a.c)-b,a.ty=d._y-(g*a.b+x*a.d)+(b*a.b+E*a.d)-E}set alpha(t){t!==this.localAlpha&&(this.localAlpha=t,this._updateFlags|=m1,this._onUpdate())}get alpha(){return this.localAlpha}set tint(t){const l=zn.shared.setValue(t??16777215).toBgrNumber();l!==this.localColor&&(this.localColor=l,this._updateFlags|=m1,this._onUpdate())}get tint(){return Cp(this.localColor)}set blendMode(t){this.localBlendMode!==t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=nE,this.localBlendMode=t,this._onUpdate())}get blendMode(){return this.localBlendMode}get visible(){return!!(this.localDisplayStatus&2)}set visible(t){const a=t?2:0;(this.localDisplayStatus&2)!==a&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=I0,this.localDisplayStatus^=2,this._onUpdate(),this.emit("visibleChanged",t))}get culled(){return!(this.localDisplayStatus&4)}set culled(t){const a=t?0:4;(this.localDisplayStatus&4)!==a&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=I0,this.localDisplayStatus^=4,this._onUpdate())}get renderable(){return!!(this.localDisplayStatus&1)}set renderable(t){const a=t?1:0;(this.localDisplayStatus&1)!==a&&(this._updateFlags|=I0,this.localDisplayStatus^=1,this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._onUpdate())}get isRenderable(){return this.localDisplayStatus===7&&this.groupAlpha>0}destroy(t=!1){var o;if(this.destroyed)return;this.destroyed=!0;let a;if(this.children.length&&(a=this.removeChildren(0,this.children.length)),this.removeFromParent(),this.parent=null,this._maskEffect=null,this._filterEffect=null,this.effects=null,this._position=null,this._scale=null,this._pivot=null,this._origin=null,this._skew=null,this.emit("destroyed",this),this.removeAllListeners(),(typeof t=="boolean"?t:t==null?void 0:t.children)&&a)for(let c=0;c<a.length;++c)a[c].destroy(t);(o=this.renderGroup)==null||o.destroy(),this.renderGroup=null}}Ie.mixin($n,G3,k3,P3,J3,Z3,L3,X3,F3,N3,H3,Q3,Y3);class cg extends $n{constructor(t){super(t),this.canBundle=!0,this.allowChildren=!1,this._roundPixels=0,this._lastUsed=-1,this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this._bounds=new Ii(0,1,0,0),this._boundsDirty=!0,this.autoGarbageCollect=t.autoGarbageCollect??!0}get bounds(){return this._boundsDirty?(this.updateBounds(),this._boundsDirty=!1,this._bounds):this._bounds}get roundPixels(){return!!this._roundPixels}set roundPixels(t){this._roundPixels=t?1:0}containsPoint(t){const a=this.bounds,{x:l,y:o}=t;return l>=a.minX&&l<=a.maxX&&o>=a.minY&&o<=a.maxY}onViewUpdate(){if(this._didViewChangeTick++,this._boundsDirty=!0,this.didViewUpdate)return;this.didViewUpdate=!0;const t=this.renderGroup||this.parentRenderGroup;t&&t.onChildViewUpdate(this)}unload(){var t;this.emit("unload",this);for(const a in this._gpuData)(t=this._gpuData[a])==null||t.destroy();this._gpuData=Object.create(null),this.onViewUpdate()}destroy(t){this.unload(),super.destroy(t),this._bounds=null}collectRenderablesSimple(t,a,l){const{renderPipes:o}=a;o.blendMode.pushBlendMode(this,this.groupBlendMode,t);const d=o[this.renderPipeId];d!=null&&d.addRenderable&&d.addRenderable(this,t),this.didViewUpdate=!1;const m=this.children,p=m.length;for(let g=0;g<p;g++)m[g].collectRenderables(t,a,l);o.blendMode.popBlendMode(t)}}class af extends cg{constructor(t=ze.EMPTY){t instanceof ze&&(t={texture:t});const{texture:a=ze.EMPTY,anchor:l,roundPixels:o,width:c,height:d,...m}=t;super({label:"Sprite",...m}),this.renderPipeId="sprite",this.batched=!0,this._visualBounds={minX:0,maxX:1,minY:0,maxY:0},this._anchor=new In({_onUpdate:()=>{this.onViewUpdate()}}),l?this.anchor=l:a.defaultAnchor&&(this.anchor=a.defaultAnchor),this.texture=a,this.allowChildren=!1,this.roundPixels=o??!1,c!==void 0&&(this.width=c),d!==void 0&&(this.height=d)}static from(t,a=!1){return t instanceof ze?new af(t):new af(ze.from(t,a))}set texture(t){t||(t=ze.EMPTY);const a=this._texture;a!==t&&(a&&a.dynamic&&a.off("update",this.onViewUpdate,this),t.dynamic&&t.on("update",this.onViewUpdate,this),this._texture=t,this._width&&this._setWidth(this._width,this._texture.orig.width),this._height&&this._setHeight(this._height,this._texture.orig.height),this.onViewUpdate())}get texture(){return this._texture}get visualBounds(){return m_(this._visualBounds,this._anchor,this._texture),this._visualBounds}get sourceBounds(){return de("8.6.1","Sprite.sourceBounds is deprecated, use visualBounds instead."),this.visualBounds}updateBounds(){const t=this._anchor,a=this._texture,l=this._bounds,{width:o,height:c}=a.orig;l.minX=-t._x*o,l.maxX=l.minX+o,l.minY=-t._y*c,l.maxY=l.minY+c}destroy(t=!1){if(super.destroy(t),typeof t=="boolean"?t:t==null?void 0:t.texture){const l=typeof t=="boolean"?t:t==null?void 0:t.textureSource;this._texture.destroy(l)}this._texture=null,this._visualBounds=null,this._bounds=null,this._anchor=null}get anchor(){return this._anchor}set anchor(t){typeof t=="number"?this._anchor.set(t):this._anchor.copyFrom(t)}get width(){return Math.abs(this.scale.x)*this._texture.orig.width}set width(t){this._setWidth(t,this._texture.orig.width),this._width=t}get height(){return Math.abs(this.scale.y)*this._texture.orig.height}set height(t){this._setHeight(t,this._texture.orig.height),this._height=t}getSize(t){return t||(t={}),t.width=Math.abs(this.scale.x)*this._texture.orig.width,t.height=Math.abs(this.scale.y)*this._texture.orig.height,t}setSize(t,a){typeof t=="object"?(a=t.height??t.width,t=t.width):a??(a=t),t!==void 0&&this._setWidth(t,this._texture.orig.width),a!==void 0&&this._setHeight(a,this._texture.orig.height)}}const aE=new Ii;function E_(n,t,a){const l=aE;n.measurable=!0,v_(n,a,l),t.addBoundsMask(l),n.measurable=!1}function C_(n,t,a){const l=rr.get();n.measurable=!0;const o=Ga.get().identity(),c=A_(n,a,o);S_(n,l,c),n.measurable=!1,t.addBoundsMask(l),Ga.return(o),rr.return(l)}function A_(n,t,a){return n?(n!==t&&(A_(n.parent,t,a),n.updateLocalTransform(),a.append(n.localTransform)),a):(Ya("Mask bounds, renderable is not inside the root container"),a)}class M_{constructor(t){this.priority=0,this.inverse=!1,this.pipe="alphaMask",t!=null&&t.mask&&this.init(t.mask)}init(t){this.mask=t,this.renderMaskToTexture=!(t instanceof af),this.mask.renderable=this.renderMaskToTexture,this.mask.includeInBuild=!this.renderMaskToTexture,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask=null)}addBounds(t,a){this.inverse||E_(this.mask,t,a)}addLocalBounds(t,a){C_(this.mask,t,a)}containsPoint(t,a){const l=this.mask;return a(l,t)}destroy(){this.reset()}static test(t){return t instanceof af}}M_.extension=Wt.MaskEffect;class R_{constructor(t){this.priority=0,this.pipe="colorMask",t!=null&&t.mask&&this.init(t.mask)}init(t){this.mask=t}destroy(){}static test(t){return typeof t=="number"}}R_.extension=Wt.MaskEffect;class z_{constructor(t){this.priority=0,this.pipe="stencilMask",t!=null&&t.mask&&this.init(t.mask)}init(t){this.mask=t,this.mask.includeInBuild=!1,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask.includeInBuild=!0,this.mask=null)}addBounds(t,a){E_(this.mask,t,a)}addLocalBounds(t,a){C_(this.mask,t,a)}containsPoint(t,a){const l=this.mask;return a(l,t)}destroy(){this.reset()}static test(t){return t instanceof $n}}z_.extension=Wt.MaskEffect;const iE={createCanvas:(n,t)=>{const a=document.createElement("canvas");return a.width=n,a.height=t,a},createImage:()=>new Image,getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(n,t)=>fetch(n,t),parseXML:n=>new DOMParser().parseFromString(n,"text/xml")};let p1=iE;const bi={get(){return p1},set(n){p1=n}};class w_ extends $i{constructor(t){t.resource||(t.resource=bi.get().createCanvas()),t.width||(t.width=t.resource.width,t.autoDensity||(t.width/=t.resolution)),t.height||(t.height=t.resource.height,t.autoDensity||(t.height/=t.resolution)),super(t),this.uploadMethodId="image",this.autoDensity=t.autoDensity,this.resizeCanvas(),this.transparent=!!t.transparent}resizeCanvas(){this.autoDensity&&"style"in this.resource&&(this.resource.style.width=`${this.width}px`,this.resource.style.height=`${this.height}px`),(this.resource.width!==this.pixelWidth||this.resource.height!==this.pixelHeight)&&(this.resource.width=this.pixelWidth,this.resource.height=this.pixelHeight)}resize(t=this.width,a=this.height,l=this._resolution){const o=super.resize(t,a,l);return o&&this.resizeCanvas(),o}static test(t){return globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement||globalThis.OffscreenCanvas&&t instanceof OffscreenCanvas}get context2D(){return this._context2D||(this._context2D=this.resource.getContext("2d"))}}w_.extension=Wt.TextureSource;class zp extends $i{constructor(t){super(t),this.uploadMethodId="image",this.autoGarbageCollect=!0}static test(t){return globalThis.HTMLImageElement&&t instanceof HTMLImageElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap||globalThis.VideoFrame&&t instanceof VideoFrame}}zp.extension=Wt.TextureSource;var wp=(n=>(n[n.INTERACTION=50]="INTERACTION",n[n.HIGH=25]="HIGH",n[n.NORMAL=0]="NORMAL",n[n.LOW=-25]="LOW",n[n.UTILITY=-50]="UTILITY",n))(wp||{});class $0{constructor(t,a=null,l=0,o=!1){this.next=null,this.previous=null,this._destroyed=!1,this._fn=t,this._context=a,this.priority=l,this._once=o}match(t,a=null){return this._fn===t&&this._context===a}emit(t){this._fn&&(this._context?this._fn.call(this._context,t):this._fn(t));const a=this.next;return this._once&&this.destroy(!0),this._destroyed&&(this.next=null),a}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!1){this._destroyed=!0,this._fn=null,this._context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const a=this.next;return this.next=t?null:a,this.previous=null,a}}const D_=class Si{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 $0(null,null,1/0),this.deltaMS=1/Si.targetFPMS,this.elapsedMS=1/Si.targetFPMS,this._tick=t=>{this._requestId=null,this.started&&(this.update(t),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(t,a,l=wp.NORMAL){return this._addListener(new $0(t,a,l))}addOnce(t,a,l=wp.NORMAL){return this._addListener(new $0(t,a,l,!0))}_addListener(t){let a=this._head.next,l=this._head;if(!a)t.connect(l);else{for(;a;){if(t.priority>a.priority){t.connect(l);break}l=a,a=a.next}t.previous||t.connect(l)}return this._startIfPossible(),this}remove(t,a){let l=this._head.next;for(;l;)l.match(t,a)?l=l.destroy():l=l.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let t=0,a=this._head;for(;a=a.next;)t++;return t}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let t=this._head.next;for(;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}}update(t=performance.now()){let a;if(t>this.lastTime){if(a=this.elapsedMS=t-this.lastTime,a>this._maxElapsedMS&&(a=this._maxElapsedMS),a*=this.speed,this._minElapsedMS){const c=t-this._lastFrame|0;if(c<this._minElapsedMS)return;this._lastFrame=t-c%this._minElapsedMS}this.deltaMS=a,this.deltaTime=this.deltaMS*Si.targetFPMS;const l=this._head;let o=l.next;for(;o;)o=o.emit(this);l.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(t){const a=Math.min(Math.max(0,t)/1e3,Si.targetFPMS);this._maxElapsedMS=1/a,this._minElapsedMS&&t>this.maxFPS&&(this.maxFPS=t)}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(t){t===0?this._minElapsedMS=0:(t<this.minFPS&&(this.minFPS=t),this._minElapsedMS=1/(t/1e3))}static get shared(){if(!Si._shared){const t=Si._shared=new Si;t.autoStart=!0,t._protected=!0}return Si._shared}static get system(){if(!Si._system){const t=Si._system=new Si;t.autoStart=!0,t._protected=!0}return Si._system}};D_.targetFPMS=.06;let Jc=D_,ty;async function lE(){return ty??(ty=(async()=>{var d;const t=bi.get().createCanvas(1,1).getContext("webgl");if(!t)return"premultiply-alpha-on-upload";const a=await new Promise(m=>{const p=document.createElement("video");p.onloadeddata=()=>m(p),p.onerror=()=>m(null),p.autoplay=!1,p.crossOrigin="anonymous",p.preload="auto",p.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",p.load()});if(!a)return"premultiply-alpha-on-upload";const l=t.createTexture();t.bindTexture(t.TEXTURE_2D,l);const o=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,o),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,l,0),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,t.NONE),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,a);const c=new Uint8Array(4);return t.readPixels(0,0,1,1,t.RGBA,t.UNSIGNED_BYTE,c),t.deleteFramebuffer(o),t.deleteTexture(l),(d=t.getExtension("WEBGL_lose_context"))==null||d.loseContext(),c[0]<=c[3]?"premultiplied-alpha":"premultiply-alpha-on-upload"})()),ty}const Vp=class O_ extends $i{constructor(t){super(t),this.isReady=!1,this.uploadMethodId="video",t={...O_.defaultOptions,...t},this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this.alphaMode=t.alphaMode??"premultiply-alpha-on-upload",this._videoFrameRequestCallback=this._videoFrameRequestCallback.bind(this),this._videoFrameRequestCallbackHandle=null,this._load=null,this._resolve=null,this._reject=null,this._onCanPlay=this._onCanPlay.bind(this),this._onCanPlayThrough=this._onCanPlayThrough.bind(this),this._onError=this._onError.bind(this),this._onPlayStart=this._onPlayStart.bind(this),this._onPlayStop=this._onPlayStop.bind(this),this._onSeeked=this._onSeeked.bind(this),t.autoLoad!==!1&&this.load()}updateFrame(){if(!this.destroyed){if(this._updateFPS){const t=Jc.shared.elapsedMS*this.resource.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-t)}(!this._updateFPS||this._msToNextUpdate<=0)&&(this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0),this.isValid&&this.update()}}_videoFrameRequestCallback(){this.updateFrame(),this.destroyed?this._videoFrameRequestCallbackHandle=null:this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback)}get isValid(){return!!this.resource.videoWidth&&!!this.resource.videoHeight}async load(){if(this._load)return this._load;const t=this.resource,a=this.options;return(t.readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),t.addEventListener("play",this._onPlayStart),t.addEventListener("pause",this._onPlayStop),t.addEventListener("seeked",this._onSeeked),this._isSourceReady()?this._mediaReady():(a.preload||t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlayThrough),t.addEventListener("error",this._onError,!0)),this.alphaMode=await lE(),this._load=new Promise((l,o)=>{this.isValid?l(this):(this._resolve=l,this._reject=o,a.preloadTimeoutMs!==void 0&&(this._preloadTimeout=setTimeout(()=>{this._onError(new ErrorEvent(`Preload exceeded timeout of ${a.preloadTimeoutMs}ms`))})),t.load())}),this._load}_onError(t){this.resource.removeEventListener("error",this._onError,!0),this.emit("error",t),this._reject&&(this._reject(t),this._reject=null,this._resolve=null)}_isSourcePlaying(){const t=this.resource;return!t.paused&&!t.ended}_isSourceReady(){return this.resource.readyState>2}_onPlayStart(){this.isValid||this._mediaReady(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0)}_onCanPlay(){this.resource.removeEventListener("canplay",this._onCanPlay),this._mediaReady()}_onCanPlayThrough(){this.resource.removeEventListener("canplaythrough",this._onCanPlay),this._preloadTimeout&&(clearTimeout(this._preloadTimeout),this._preloadTimeout=void 0),this._mediaReady()}_mediaReady(){const t=this.resource;this.isValid&&(this.isReady=!0,this.resize(t.videoWidth,t.videoHeight)),this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0,this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.resource.play()}destroy(){this._configureAutoUpdate();const t=this.resource;t&&(t.removeEventListener("play",this._onPlayStart),t.removeEventListener("pause",this._onPlayStop),t.removeEventListener("seeked",this._onSeeked),t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlayThrough),t.removeEventListener("error",this._onError,!0),t.pause(),t.src="",t.load()),super.destroy()}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(t){t!==this._updateFPS&&(this._updateFPS=t,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.resource.requestVideoFrameCallback?(this._isConnectedToTicker&&(Jc.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(Jc.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(Jc.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(t){return globalThis.HTMLVideoElement&&t instanceof HTMLVideoElement}};Vp.extension=Wt.TextureSource;Vp.defaultOptions={...$i.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1};Vp.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let sE=Vp;const Qc=(n,t,a=!1)=>(Array.isArray(n)||(n=[n]),t?n.map(l=>typeof l=="string"||a?t(l):l):n);class rE{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(t){return this._cache.has(t)}get(t){const a=this._cache.get(t);return a||Ya(`[Assets] Asset id ${t} was not found in the Cache`),a}set(t,a){const l=Qc(t);let o;for(let p=0;p<this.parsers.length;p++){const g=this.parsers[p];if(g.test(a)){o=g.getCacheableAssets(l,a);break}}const c=new Map(Object.entries(o||{}));o||l.forEach(p=>{c.set(p,a)});const d=[...c.keys()],m={cacheKeys:d,keys:l};l.forEach(p=>{this._cacheMap.set(p,m)}),d.forEach(p=>{const g=o?o[p]:a;this._cache.has(p)&&this._cache.get(p)!==g&&Ya("[Cache] already has key:",p),this._cache.set(p,c.get(p))})}remove(t){if(!this._cacheMap.has(t)){Ya(`[Assets] Asset id ${t} was not found in the Cache`);return}const a=this._cacheMap.get(t);a.cacheKeys.forEach(o=>{this._cache.delete(o)}),a.keys.forEach(o=>{this._cacheMap.delete(o)})}get parsers(){return this._parsers}}const Kc=new rE,Uy=[];Ie.handleByList(Wt.TextureSource,Uy);function N_(n={}){const t=n&&n.resource,a=t?n.resource:n,l=t?n:{resource:n};for(let o=0;o<Uy.length;o++){const c=Uy[o];if(c.test(a))return new c(l)}throw new Error(`Could not find a source type for resource: ${l.resource}`)}function uE(n={},t=!1){const a=n&&n.resource,l=a?n.resource:n,o=a?n:{resource:n};if(!t&&Kc.has(l))return Kc.get(l);const c=new ze({source:N_(o)});return c.on("destroy",()=>{Kc.has(l)&&Kc.remove(l)}),t||Kc.set(l,c),c}function oE(n,t=!1){return typeof n=="string"?Kc.get(n):n instanceof $i?new ze({source:n}):uE(n,t)}ze.from=oE;$i.from=N_;Ie.add(M_,R_,z_,sE,zp,w_,rg);var B_=(n=>(n[n.Low=0]="Low",n[n.Normal=1]="Normal",n[n.High=2]="High",n))(B_||{});function Al(n){if(typeof n!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(n)}`)}function Kh(n){return n.split("?")[0].split("#")[0]}function cE(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fE(n,t,a){return n.replace(new RegExp(cE(t),"g"),a)}function hE(n,t){let a="",l=0,o=-1,c=0,d=-1;for(let m=0;m<=n.length;++m){if(m<n.length)d=n.charCodeAt(m);else{if(d===47)break;d=47}if(d===47){if(!(o===m-1||c===1))if(o!==m-1&&c===2){if(a.length<2||l!==2||a.charCodeAt(a.length-1)!==46||a.charCodeAt(a.length-2)!==46){if(a.length>2){const p=a.lastIndexOf("/");if(p!==a.length-1){p===-1?(a="",l=0):(a=a.slice(0,p),l=a.length-1-a.lastIndexOf("/")),o=m,c=0;continue}}else if(a.length===2||a.length===1){a="",l=0,o=m,c=0;continue}}}else a.length>0?a+=`/${n.slice(o+1,m)}`:a=n.slice(o+1,m),l=m-o-1;o=m,c=0}else d===46&&c!==-1?++c:c=-1}return a}const fd={toPosix(n){return fE(n,"\\","/")},isUrl(n){return/^https?:/.test(this.toPosix(n))},isDataUrl(n){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(n)},isBlobUrl(n){return n.startsWith("blob:")},hasProtocol(n){return/^[^/:]+:/.test(this.toPosix(n))},getProtocol(n){Al(n),n=this.toPosix(n);const t=/^file:\/\/\//.exec(n);if(t)return t[0];const a=/^[^/:]+:\/{0,2}/.exec(n);return a?a[0]:""},toAbsolute(n,t,a){if(Al(n),this.isDataUrl(n)||this.isBlobUrl(n))return n;const l=Kh(this.toPosix(t??bi.get().getBaseUrl())),o=Kh(this.toPosix(a??this.rootname(l)));return n=this.toPosix(n),n.startsWith("/")?fd.join(o,n.slice(1)):this.isAbsolute(n)?n:this.join(l,n)},normalize(n){if(Al(n),n.length===0)return".";if(this.isDataUrl(n)||this.isBlobUrl(n))return n;n=this.toPosix(n);let t="";const a=n.startsWith("/");this.hasProtocol(n)&&(t=this.rootname(n),n=n.slice(t.length));const l=n.endsWith("/");return n=hE(n),n.length>0&&l&&(n+="/"),a?`/${n}`:t+n},isAbsolute(n){return Al(n),n=this.toPosix(n),this.hasProtocol(n)?!0:n.startsWith("/")},join(...n){if(n.length===0)return".";let t;for(let a=0;a<n.length;++a){const l=n[a];if(Al(l),l.length>0)if(t===void 0)t=l;else{const o=n[a-1]??"";this.joinExtensions.includes(this.extname(o).toLowerCase())?t+=`/../${l}`:t+=`/${l}`}}return t===void 0?".":this.normalize(t)},dirname(n){if(Al(n),n.length===0)return".";n=this.toPosix(n);let t=n.charCodeAt(0);const a=t===47;let l=-1,o=!0;const c=this.getProtocol(n),d=n;n=n.slice(c.length);for(let m=n.length-1;m>=1;--m)if(t=n.charCodeAt(m),t===47){if(!o){l=m;break}}else o=!1;return l===-1?a?"/":this.isUrl(d)?c+n:c:a&&l===1?"//":c+n.slice(0,l)},rootname(n){Al(n),n=this.toPosix(n);let t="";if(n.startsWith("/")?t="/":t=this.getProtocol(n),this.isUrl(n)){const a=n.indexOf("/",t.length);a!==-1?t=n.slice(0,a):t=n,t.endsWith("/")||(t+="/")}return t},basename(n,t){Al(n),t&&Al(t),n=Kh(this.toPosix(n));let a=0,l=-1,o=!0,c;if(t!==void 0&&t.length>0&&t.length<=n.length){if(t.length===n.length&&t===n)return"";let d=t.length-1,m=-1;for(c=n.length-1;c>=0;--c){const p=n.charCodeAt(c);if(p===47){if(!o){a=c+1;break}}else m===-1&&(o=!1,m=c+1),d>=0&&(p===t.charCodeAt(d)?--d===-1&&(l=c):(d=-1,l=m))}return a===l?l=m:l===-1&&(l=n.length),n.slice(a,l)}for(c=n.length-1;c>=0;--c)if(n.charCodeAt(c)===47){if(!o){a=c+1;break}}else l===-1&&(o=!1,l=c+1);return l===-1?"":n.slice(a,l)},extname(n){Al(n),n=Kh(this.toPosix(n));let t=-1,a=0,l=-1,o=!0,c=0;for(let d=n.length-1;d>=0;--d){const m=n.charCodeAt(d);if(m===47){if(!o){a=d+1;break}continue}l===-1&&(o=!1,l=d+1),m===46?t===-1?t=d:c!==1&&(c=1):t!==-1&&(c=-1)}return t===-1||l===-1||c===0||c===1&&t===l-1&&t===a+1?"":n.slice(t,l)},parse(n){Al(n);const t={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return t;n=Kh(this.toPosix(n));let a=n.charCodeAt(0);const l=this.isAbsolute(n);let o;t.root=this.rootname(n),l||this.hasProtocol(n)?o=1:o=0;let c=-1,d=0,m=-1,p=!0,g=n.length-1,x=0;for(;g>=o;--g){if(a=n.charCodeAt(g),a===47){if(!p){d=g+1;break}continue}m===-1&&(p=!1,m=g+1),a===46?c===-1?c=g:x!==1&&(x=1):c!==-1&&(x=-1)}return c===-1||m===-1||x===0||x===1&&c===m-1&&c===d+1?m!==-1&&(d===0&&l?t.base=t.name=n.slice(1,m):t.base=t.name=n.slice(d,m)):(d===0&&l?(t.name=n.slice(1,c),t.base=n.slice(1,m)):(t.name=n.slice(d,c),t.base=n.slice(d,m)),t.ext=n.slice(c,m)),t.dir=this.dirname(n),t},sep:"/",delimiter:":",joinExtensions:[".html"]};function U_(n,t,a,l,o){const c=t[a];for(let d=0;d<c.length;d++){const m=c[d];a<t.length-1?U_(n.replace(l[a],m),t,a+1,l,o):o.push(n.replace(l[a],m))}}function dE(n){const t=/\{(.*?)\}/g,a=n.match(t),l=[];if(a){const o=[];a.forEach(c=>{const d=c.substring(1,c.length-1).split(",");o.push(d)}),U_(n,o,0,a,l)}else l.push(n);return l}const y1=n=>!Array.isArray(n);class H_{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(t,a)=>`${t}${this._bundleIdConnector}${a}`,extractAssetIdFromBundle:(t,a)=>a.replace(`${t}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(t){if(this._bundleIdConnector=t.connector??this._bundleIdConnector,this._createBundleAssetId=t.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=t.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...t){t.forEach(a=>{this._preferredOrder.push(a),a.priority||(a.priority=Object.keys(a.params))}),this._resolverHash={}}set basePath(t){this._basePath=t}get basePath(){return this._basePath}set rootPath(t){this._rootPath=t}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(t){if(typeof t=="string")this._defaultSearchParams=t;else{const a=t;this._defaultSearchParams=Object.keys(a).map(l=>`${encodeURIComponent(l)}=${encodeURIComponent(a[l])}`).join("&")}}getAlias(t){const{alias:a,src:l}=t;return Qc(a||l,c=>typeof c=="string"?c:Array.isArray(c)?c.map(d=>(d==null?void 0:d.src)??d):c!=null&&c.src?c.src:c,!0)}removeAlias(t,a){this._assetMap[t]&&(a&&a!==this._resolverHash[t]||(delete this._resolverHash[t],delete this._assetMap[t]))}addManifest(t){this._manifest&&Ya("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=t,t.bundles.forEach(a=>{this.addBundle(a.name,a.assets)})}addBundle(t,a){const l=[];let o=a;Array.isArray(a)||(o=Object.entries(a).map(([c,d])=>typeof d=="string"||Array.isArray(d)?{alias:c,src:d}:{alias:c,...d})),o.forEach(c=>{const d=c.src,m=c.alias;let p;if(typeof m=="string"){const g=this._createBundleAssetId(t,m);l.push(g),p=[m,g]}else{const g=m.map(x=>this._createBundleAssetId(t,x));l.push(...g),p=[...m,...g]}this.add({...c,alias:p,src:d})}),this._bundles[t]=l}add(t){const a=[];Array.isArray(t)?a.push(...t):a.push(t);let l;l=c=>{this.hasKey(c)&&Ya(`[Resolver] already has key: ${c} overwriting`)},Qc(a).forEach(c=>{const{src:d}=c;let{data:m,format:p,loadParser:g,parser:x}=c;const b=Qc(d).map(z=>typeof z=="string"?dE(z):Array.isArray(z)?z:[z]),E=this.getAlias(c);Array.isArray(E)?E.forEach(l):l(E);const C=[],M=z=>{const R=this._parsers.find(w=>w.test(z));return{src:z,...R==null?void 0:R.parse(z)}};b.forEach(z=>{z.forEach(R=>{let w={};if(typeof R!="object"?w=M(R):(m=R.data??m,p=R.format??p,(R.loadParser||R.parser)&&(g=R.loadParser??g,x=R.parser??x),w={...M(R.src),...R}),!E)throw new Error(`[Resolver] alias is undefined for this asset: ${w.src}`);w=this._buildResolvedAsset(w,{aliases:E,data:m,format:p,loadParser:g,parser:x,progressSize:c.progressSize}),C.push(w)})}),E.forEach(z=>{this._assetMap[z]=C})})}resolveBundle(t){const a=y1(t);t=Qc(t);const l={};return t.forEach(o=>{const c=this._bundles[o];if(c){const d=this.resolve(c),m={};for(const p in d){const g=d[p];m[this._extractAssetIdFromBundle(o,p)]=g}l[o]=m}}),a?l[t[0]]:l}resolveUrl(t){const a=this.resolve(t);if(typeof t!="string"){const l={};for(const o in a)l[o]=a[o].src;return l}return a.src}resolve(t){const a=y1(t);t=Qc(t);const l={};return t.forEach(o=>{if(!this._resolverHash[o])if(this._assetMap[o]){let c=this._assetMap[o];const d=this._getPreferredOrder(c);d==null||d.priority.forEach(m=>{d.params[m].forEach(p=>{const g=c.filter(x=>x[m]?x[m]===p:!1);g.length&&(c=g)})}),this._resolverHash[o]=c[0]}else this._resolverHash[o]=this._buildResolvedAsset({alias:[o],src:o},{});l[o]=this._resolverHash[o]}),a?l[t[0]]:l}hasKey(t){return!!this._assetMap[t]}hasBundle(t){return!!this._bundles[t]}_getPreferredOrder(t){for(let a=0;a<t.length;a++){const l=t[a],o=this._preferredOrder.find(c=>c.params.format.includes(l.format));if(o)return o}return this._preferredOrder[0]}_appendDefaultSearchParams(t){if(!this._defaultSearchParams)return t;const a=/\?/.test(t)?"&":"?";return`${t}${a}${this._defaultSearchParams}`}_buildResolvedAsset(t,a){const{aliases:l,data:o,loadParser:c,parser:d,format:m,progressSize:p}=a;return(this._basePath||this._rootPath)&&(t.src=fd.toAbsolute(t.src,this._basePath,this._rootPath)),t.alias=l??t.alias??[t.src],t.src=this._appendDefaultSearchParams(t.src),t.data={...o||{},...t.data},t.loadParser=c??t.loadParser,t.parser=d??t.parser,t.format=m??t.format??mE(t.src),p!==void 0&&(t.progressSize=p),t}}H_.RETINA_PREFIX=/@([0-9\.]+)x/;function mE(n){return n.split(".").pop().split("?").shift().split("#").shift()}const g1=(n,t)=>{const a=t.split("?")[1];return a&&(n+=`?${a}`),n},j_=class nd{constructor(t,a){this.linkedSheets=[];let l=t;(t==null?void 0:t.source)instanceof $i&&(l={texture:t,data:a});const{texture:o,data:c,cachePrefix:d=""}=l;this.cachePrefix=d,this._texture=o instanceof ze?o:null,this.textureSource=o.source,this.textures={},this.animations={},this.data=c;const m=parseFloat(c.meta.scale);m?(this.resolution=m,o.source.resolution=this.resolution):this.resolution=o.source._resolution,this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}parse(){return new Promise(t=>{this._callback=t,this._batchIndex=0,this._frameKeys.length<=nd.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}parseSync(){return this._processFrames(0,!0),this._processAnimations(),this.textures}_processFrames(t,a=!1){let l=t;const o=a?1/0:nd.BATCH_SIZE;for(;l-t<o&&l<this._frameKeys.length;){const c=this._frameKeys[l],d=this._frames[c],m=d.frame;if(m){let p=null,g=null;const x=d.trimmed!==!1&&d.sourceSize?d.sourceSize:d.frame,b=new mn(0,0,Math.floor(x.w)/this.resolution,Math.floor(x.h)/this.resolution);d.rotated?p=new mn(Math.floor(m.x)/this.resolution,Math.floor(m.y)/this.resolution,Math.floor(m.h)/this.resolution,Math.floor(m.w)/this.resolution):p=new mn(Math.floor(m.x)/this.resolution,Math.floor(m.y)/this.resolution,Math.floor(m.w)/this.resolution,Math.floor(m.h)/this.resolution),d.trimmed!==!1&&d.spriteSourceSize&&(g=new mn(Math.floor(d.spriteSourceSize.x)/this.resolution,Math.floor(d.spriteSourceSize.y)/this.resolution,Math.floor(m.w)/this.resolution,Math.floor(m.h)/this.resolution)),this.textures[c]=new ze({source:this.textureSource,frame:p,orig:b,trim:g,rotate:d.rotated?2:0,defaultAnchor:d.anchor,defaultBorders:d.borders,label:c.toString()})}l++}}_processAnimations(){const t=this.data.animations||{};for(const a in t){this.animations[a]=[];for(let l=0;l<t[a].length;l++){const o=t[a][l];this.animations[a].push(this.textures[o])}}}_parseComplete(){const t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*nd.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*nd.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(t=!1){var a;for(const l in this.textures)this.textures[l].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&((a=this._texture)==null||a.destroy(),this.textureSource.destroy()),this._texture=null,this.textureSource=null,this.linkedSheets=[]}};j_.BATCH_SIZE=1e3;let v1=j_;const pE=["jpg","png","jpeg","avif","webp","basis","etc2","bc7","bc6h","bc5","bc4","bc3","bc2","bc1","eac","astc"];function G_(n,t,a){const l={};if(n.forEach(o=>{l[o]=t}),Object.keys(t.textures).forEach(o=>{l[`${t.cachePrefix}${o}`]=t.textures[o]}),!a){const o=fd.dirname(n[0]);t.linkedSheets.forEach((c,d)=>{const m=G_([`${o}/${t.data.meta.related_multi_packs[d]}`],c,!0);Object.assign(l,m)})}return l}const yE={extension:Wt.Asset,cache:{test:n=>n instanceof v1,getCacheableAssets:(n,t)=>G_(n,t,!1)},resolver:{extension:{type:Wt.ResolveParser,name:"resolveSpritesheet"},test:n=>{const a=n.split("?")[0].split("."),l=a.pop(),o=a.pop();return l==="json"&&pE.includes(o)},parse:n=>{var a;const t=n.split(".");return{resolution:parseFloat(((a=H_.RETINA_PREFIX.exec(n))==null?void 0:a[1])??"1"),format:t[t.length-2],src:n}}},loader:{name:"spritesheetLoader",id:"spritesheet",extension:{type:Wt.LoadParser,priority:B_.Normal,name:"spritesheetLoader"},async testParse(n,t){return fd.extname(t.src).toLowerCase()===".json"&&!!n.frames},async parse(n,t,a){var b,E;const{texture:l,imageFilename:o,textureOptions:c,cachePrefix:d}=(t==null?void 0:t.data)??{};let m=fd.dirname(t.src);m&&m.lastIndexOf("/")!==m.length-1&&(m+="/");let p;if(l instanceof ze)p=l;else{const C=g1(m+(o??n.meta.image),t.src);p=(await a.load([{src:C,data:c}]))[C]}const g=new v1({texture:p.source,data:n,cachePrefix:d});await g.parse();const x=(b=n==null?void 0:n.meta)==null?void 0:b.related_multi_packs;if(Array.isArray(x)){const C=[];for(const z of x){if(typeof z!="string")continue;let R=m+z;(E=t.data)!=null&&E.ignoreMultiPack||(R=g1(R,t.src),C.push(a.load({src:R,data:{textureOptions:c,ignoreMultiPack:!0}})))}const M=await Promise.all(C);g.linkedSheets=M,M.forEach(z=>{z.linkedSheets=[g].concat(g.linkedSheets.filter(R=>R!==z))})}return g},async unload(n,t,a){await a.unload(n.textureSource._sourceOrigin),n.destroy(!1)}}};Ie.add(yE);const ey=Object.create(null),x1=Object.create(null);function fg(n,t){let a=x1[n];return a===void 0&&(ey[t]===void 0&&(ey[t]=1),x1[n]=a=ey[t]++),a}let qc;function Y_(){return(!qc||qc!=null&&qc.isContextLost())&&(qc=bi.get().createCanvas().getContext("webgl",{})),qc}let cp;function gE(){if(!cp){cp="mediump";const n=Y_();n&&n.getShaderPrecisionFormat&&(cp=n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision?"highp":"mediump")}return cp}function vE(n,t,a){return t?n:a?(n=n.replace("out vec4 finalColor;",""),`
65
-
66
- #ifdef GL_ES // This checks if it is WebGL1
67
- #define in varying
68
- #define finalColor gl_FragColor
69
- #define texture texture2D
70
- #endif
71
- ${n}
72
- `):`
73
-
74
- #ifdef GL_ES // This checks if it is WebGL1
75
- #define in attribute
76
- #define out varying
77
- #endif
78
- ${n}
79
- `}function xE(n,t,a){const l=a?t.maxSupportedFragmentPrecision:t.maxSupportedVertexPrecision;if(n.substring(0,9)!=="precision"){let o=a?t.requestedFragmentPrecision:t.requestedVertexPrecision;return o==="highp"&&l!=="highp"&&(o="mediump"),`precision ${o} float;
80
- ${n}`}else if(l!=="highp"&&n.substring(0,15)==="precision highp")return n.replace("precision highp","precision mediump");return n}function _E(n,t){return t?`#version 300 es
81
- ${n}`:n}const SE={},bE={};function TE(n,{name:t="pixi-program"},a=!0){t=t.replace(/\s+/g,"-"),t+=a?"-fragment":"-vertex";const l=a?SE:bE;return l[t]?(l[t]++,t+=`-${l[t]}`):l[t]=1,n.indexOf("#define SHADER_NAME")!==-1?n:`${`#define SHADER_NAME ${t}`}
82
- ${n}`}function EE(n,t){return t?n.replace("#version 300 es",""):n}const ny={stripVersion:EE,ensurePrecision:xE,addProgramDefines:vE,setProgramName:TE,insertVersion:_E},Zh=Object.create(null),q_=class Hy{constructor(t){t={...Hy.defaultOptions,...t};const a=t.fragment.indexOf("#version 300 es")!==-1,l={stripVersion:a,ensurePrecision:{requestedFragmentPrecision:t.preferredFragmentPrecision,requestedVertexPrecision:t.preferredVertexPrecision,maxSupportedVertexPrecision:"highp",maxSupportedFragmentPrecision:gE()},setProgramName:{name:t.name},addProgramDefines:a,insertVersion:a};let o=t.fragment,c=t.vertex;Object.keys(ny).forEach(d=>{const m=l[d];o=ny[d](o,m,!0),c=ny[d](c,m,!1)}),this.fragment=o,this.vertex=c,this.transformFeedbackVaryings=t.transformFeedbackVaryings,this._key=fg(`${this.vertex}:${this.fragment}`,"gl-program")}destroy(){this.fragment=null,this.vertex=null,this._attributeData=null,this._uniformData=null,this._uniformBlockData=null,this.transformFeedbackVaryings=null,Zh[this._cacheKey]=null}static from(t){const a=`${t.vertex}:${t.fragment}`;return Zh[a]||(Zh[a]=new Hy(t),Zh[a]._cacheKey=a),Zh[a]}};q_.defaultOptions={preferredVertexPrecision:"highp",preferredFragmentPrecision:"mediump"};let hg=q_;const _1={uint8x2:{size:2,stride:2,normalised:!1},uint8x4:{size:4,stride:4,normalised:!1},sint8x2:{size:2,stride:2,normalised:!1},sint8x4:{size:4,stride:4,normalised:!1},unorm8x2:{size:2,stride:2,normalised:!0},unorm8x4:{size:4,stride:4,normalised:!0},snorm8x2:{size:2,stride:2,normalised:!0},snorm8x4:{size:4,stride:4,normalised:!0},uint16x2:{size:2,stride:4,normalised:!1},uint16x4:{size:4,stride:8,normalised:!1},sint16x2:{size:2,stride:4,normalised:!1},sint16x4:{size:4,stride:8,normalised:!1},unorm16x2:{size:2,stride:4,normalised:!0},unorm16x4:{size:4,stride:8,normalised:!0},snorm16x2:{size:2,stride:4,normalised:!0},snorm16x4:{size:4,stride:8,normalised:!0},float16x2:{size:2,stride:4,normalised:!1},float16x4:{size:4,stride:8,normalised:!1},float32:{size:1,stride:4,normalised:!1},float32x2:{size:2,stride:8,normalised:!1},float32x3:{size:3,stride:12,normalised:!1},float32x4:{size:4,stride:16,normalised:!1},uint32:{size:1,stride:4,normalised:!1},uint32x2:{size:2,stride:8,normalised:!1},uint32x3:{size:3,stride:12,normalised:!1},uint32x4:{size:4,stride:16,normalised:!1},sint32:{size:1,stride:4,normalised:!1},sint32x2:{size:2,stride:8,normalised:!1},sint32x3:{size:3,stride:12,normalised:!1},sint32x4:{size:4,stride:16,normalised:!1}};function CE(n){return _1[n]??_1.float32}const AE={f32:"float32","vec2<f32>":"float32x2","vec3<f32>":"float32x3","vec4<f32>":"float32x4",vec2f:"float32x2",vec3f:"float32x3",vec4f:"float32x4",i32:"sint32","vec2<i32>":"sint32x2","vec3<i32>":"sint32x3","vec4<i32>":"sint32x4",vec2i:"sint32x2",vec3i:"sint32x3",vec4i:"sint32x4",u32:"uint32","vec2<u32>":"uint32x2","vec3<u32>":"uint32x3","vec4<u32>":"uint32x4",vec2u:"uint32x2",vec3u:"uint32x3",vec4u:"uint32x4",bool:"uint32","vec2<bool>":"uint32x2","vec3<bool>":"uint32x3","vec4<bool>":"uint32x4"},S1=/@location\((\d+)\)\s+([a-zA-Z0-9_]+)\s*:\s*([a-zA-Z0-9_<>]+)(?:,|\s|\)|$)/g;function b1(n,t){let a;for(;(a=S1.exec(n))!==null;){const l=AE[a[3]]??"float32";t[a[2]]={location:parseInt(a[1],10),format:l,stride:CE(l).stride,offset:0,instance:!1,start:0}}S1.lastIndex=0}function ME(n){return n.replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"")}function RE({source:n,entryPoint:t}){const a={},l=ME(n),o=l.indexOf(`fn ${t}(`);if(o===-1)return a;const c=l.indexOf("->",o);if(c===-1)return a;const d=l.substring(o,c);if(b1(d,a),Object.keys(a).length===0){const m=d.match(/\(\s*\w+\s*:\s*(\w+)/);if(m){const p=m[1],g=new RegExp(`struct\\s+${p}\\s*\\{([^}]+)\\}`,"s"),x=l.match(g);x&&b1(x[1],a)}}return a}function ay(n){var b,E;const t=/(^|[^/])@(group|binding)\(\d+\)[^;]+;/g,a=/@group\((\d+)\)/,l=/@binding\((\d+)\)/,o=/var(<[^>]+>)? (\w+)/,c=/:\s*([\w<>]+)/,d=/struct\s+(\w+)\s*{([^}]+)}/g,m=/(\w+)\s*:\s*([\w\<\>]+)/g,p=/struct\s+(\w+)/,g=(b=n.match(t))==null?void 0:b.map(C=>({group:parseInt(C.match(a)[1],10),binding:parseInt(C.match(l)[1],10),name:C.match(o)[2],isUniform:C.match(o)[1]==="<uniform>",type:C.match(c)[1]}));if(!g)return{groups:[],structs:[]};const x=((E=n.match(d))==null?void 0:E.map(C=>{const M=C.match(p)[1],z=C.match(m).reduce((R,w)=>{const[O,U]=w.split(":");return R[O.trim()]=U.trim(),R},{});return z?{name:M,members:z}:null}).filter(({name:C})=>g.some(M=>M.type===C||M.type.includes(`<${C}>`))))??[];return{groups:g,structs:x}}var yo=(n=>(n[n.VERTEX=1]="VERTEX",n[n.FRAGMENT=2]="FRAGMENT",n[n.COMPUTE=4]="COMPUTE",n))(yo||{});function zE({groups:n}){const t=[];for(let a=0;a<n.length;a++){const l=n[a];t[l.group]||(t[l.group]=[]),l.isUniform?t[l.group].push({binding:l.binding,visibility:yo.VERTEX|yo.FRAGMENT,buffer:{type:"uniform"}}):l.type==="sampler"?t[l.group].push({binding:l.binding,visibility:yo.FRAGMENT,sampler:{type:"filtering"}}):l.type==="texture_2d"||l.type.startsWith("texture_2d<")?t[l.group].push({binding:l.binding,visibility:yo.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d",multisampled:!1}}):l.type==="texture_2d_array"||l.type.startsWith("texture_2d_array<")?t[l.group].push({binding:l.binding,visibility:yo.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d-array",multisampled:!1}}):(l.type==="texture_cube"||l.type.startsWith("texture_cube<"))&&t[l.group].push({binding:l.binding,visibility:yo.FRAGMENT,texture:{sampleType:"float",viewDimension:"cube",multisampled:!1}})}for(let a=0;a<t.length;a++)t[a]||(t[a]=[]);return t}function wE({groups:n}){const t=[];for(let a=0;a<n.length;a++){const l=n[a];t[l.group]||(t[l.group]={}),t[l.group][l.name]=l.binding}return t}function DE(n,t){const a=new Set,l=new Set,o=[...n.structs,...t.structs].filter(d=>a.has(d.name)?!1:(a.add(d.name),!0)),c=[...n.groups,...t.groups].filter(d=>{const m=`${d.name}-${d.binding}`;return l.has(m)?!1:(l.add(m),!0)});return{structs:o,groups:c}}const Jh=Object.create(null);class _d{constructor(t){var m,p;this._layoutKey=0,this._attributeLocationsKey=0;const{fragment:a,vertex:l,layout:o,gpuLayout:c,name:d}=t;if(this.name=d,this.fragment=a,this.vertex=l,a.source===l.source){const g=ay(a.source);this.structsAndGroups=g}else{const g=ay(l.source),x=ay(a.source);this.structsAndGroups=DE(g,x)}this.layout=o??wE(this.structsAndGroups),this.gpuLayout=c??zE(this.structsAndGroups),this.autoAssignGlobalUniforms=((m=this.layout[0])==null?void 0:m.globalUniforms)!==void 0,this.autoAssignLocalUniforms=((p=this.layout[1])==null?void 0:p.localUniforms)!==void 0,this._generateProgramKey()}_generateProgramKey(){const{vertex:t,fragment:a}=this,l=t.source+a.source+t.entryPoint+a.entryPoint;this._layoutKey=fg(l,"program")}get attributeData(){return this._attributeData??(this._attributeData=RE(this.vertex)),this._attributeData}destroy(){this.gpuLayout=null,this.layout=null,this.structsAndGroups=null,this.fragment=null,this.vertex=null,Jh[this._cacheKey]=null}static from(t){const a=`${t.vertex.source}:${t.fragment.source}:${t.fragment.entryPoint}:${t.vertex.entryPoint}`;return Jh[a]||(Jh[a]=new _d(t),Jh[a]._cacheKey=a),Jh[a]}}const L_=["f32","i32","vec2<f32>","vec3<f32>","vec4<f32>","mat2x2<f32>","mat3x3<f32>","mat4x4<f32>","mat3x2<f32>","mat4x2<f32>","mat2x3<f32>","mat4x3<f32>","mat2x4<f32>","mat3x4<f32>","vec2<i32>","vec3<i32>","vec4<i32>"],OE=L_.reduce((n,t)=>(n[t]=!0,n),{});function NE(n,t){switch(n){case"f32":return 0;case"vec2<f32>":return new Float32Array(2*t);case"vec3<f32>":return new Float32Array(3*t);case"vec4<f32>":return new Float32Array(4*t);case"mat2x2<f32>":return new Float32Array([1,0,0,1]);case"mat3x3<f32>":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4x4<f32>":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const X_=class V_{constructor(t,a){this._touched=0,this.uid=on("uniform"),this._resourceType="uniformGroup",this._resourceId=on("resource"),this.isUniformGroup=!0,this._dirtyId=0,this.destroyed=!1,a={...V_.defaultOptions,...a},this.uniformStructures=t;const l={};for(const o in t){const c=t[o];if(c.name=o,c.size=c.size??1,!OE[c.type]){const d=c.type.match(/^array<(\w+(?:<\w+>)?),\s*(\d+)>$/);if(d){const[,m,p]=d;throw new Error(`Uniform type ${c.type} is not supported. Use type: '${m}', size: ${p} instead.`)}throw new Error(`Uniform type ${c.type} is not supported. Supported uniform types are: ${L_.join(", ")}`)}c.value??(c.value=NE(c.type,c.size)),l[o]=c.value}this.uniforms=l,this._dirtyId=1,this.ubo=a.ubo,this.isStatic=a.isStatic,this._signature=fg(Object.keys(l).map(o=>`${o}-${t[o].type}`).join("-"),"uniform-group")}update(){this._dirtyId++}};X_.defaultOptions={ubo:!1,isStatic:!1};let k_=X_;class Ap{constructor(t){this.resources=Object.create(null),this._dirty=!0;let a=0;for(const l in t){const o=t[l];this.setResource(o,a++)}this._updateKey()}_updateKey(){if(!this._dirty)return;this._dirty=!1;const t=[];let a=0;for(const l in this.resources)t[a++]=this.resources[l]._resourceId;this._key=t.join("|")}setResource(t,a){var o,c;const l=this.resources[a];t!==l&&((o=l==null?void 0:l.off)==null||o.call(l,"change",this.onResourceChange,this),(c=t.on)==null||c.call(t,"change",this.onResourceChange,this),this.resources[a]=t,this._dirty=!0)}getResource(t){return this.resources[t]}_touch(t,a){const l=this.resources;for(const o in l)l[o]._gcLastUsed=t,l[o]._touched=a}destroy(){var a;const t=this.resources;for(const l in t){const o=t[l];(a=o==null?void 0:o.off)==null||a.call(o,"change",this.onResourceChange,this)}this.resources=null}onResourceChange(t){this._dirty=!0,t.destroyed?this.destroy():this._updateKey()}}var jy=(n=>(n[n.WEBGL=1]="WEBGL",n[n.WEBGPU=2]="WEBGPU",n[n.CANVAS=4]="CANVAS",n[n.BOTH=3]="BOTH",n))(jy||{});class kp extends _s{constructor(t){super(),this.uid=on("shader"),this._uniformBindMap=Object.create(null),this._ownedBindGroups=[],this._destroyed=!1;let{gpuProgram:a,glProgram:l,groups:o,resources:c,compatibleRenderers:d,groupMap:m}=t;this.gpuProgram=a,this.glProgram=l,d===void 0&&(d=0,a&&(d|=jy.WEBGPU),l&&(d|=jy.WEBGL)),this.compatibleRenderers=d;const p={};if(!c&&!o&&(c={}),c&&o)throw new Error("[Shader] Cannot have both resources and groups");if(!a&&o&&!m)throw new Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");if(!a&&o&&m)for(const g in m)for(const x in m[g]){const b=m[g][x];p[b]={group:g,binding:x,name:b}}else if(a&&o&&!m){const g=a.structsAndGroups.groups;m={},g.forEach(x=>{m[x.group]=m[x.group]||{},m[x.group][x.binding]=x.name,p[x.name]=x})}else if(c){o={},m={},a&&a.structsAndGroups.groups.forEach(b=>{m[b.group]=m[b.group]||{},m[b.group][b.binding]=b.name,p[b.name]=b});let g=0;for(const x in c)p[x]||(o[99]||(o[99]=new Ap,this._ownedBindGroups.push(o[99])),p[x]={group:99,binding:g,name:x},m[99]=m[99]||{},m[99][g]=x,g++);for(const x in c){const b=x;let E=c[x];!E.source&&!E._resourceType&&(E=new k_(E));const C=p[b];C&&(o[C.group]||(o[C.group]=new Ap,this._ownedBindGroups.push(o[C.group])),o[C.group].setResource(E,C.binding))}}this.groups=o,this._uniformBindMap=m,this.resources=this._buildResourceAccessor(o,p)}addResource(t,a,l){var o,c;(o=this._uniformBindMap)[a]||(o[a]={}),(c=this._uniformBindMap[a])[l]||(c[l]=t),this.groups[a]||(this.groups[a]=new Ap,this._ownedBindGroups.push(this.groups[a]))}_buildResourceAccessor(t,a){const l={};for(const o in a){const c=a[o];Object.defineProperty(l,c.name,{get(){return t[c.group].getResource(c.binding)},set(d){t[c.group].setResource(d,c.binding)}})}return l}destroy(t=!1){var a,l;this._destroyed||(this._destroyed=!0,this.emit("destroy",this),t&&((a=this.gpuProgram)==null||a.destroy(),(l=this.glProgram)==null||l.destroy()),this.gpuProgram=null,this.glProgram=null,this.removeAllListeners(),this._uniformBindMap=null,this._ownedBindGroups.forEach(o=>{o.destroy()}),this._ownedBindGroups=null,this.resources=null,this.groups=null)}static from(t){const{gpu:a,gl:l,...o}=t;let c,d;return a&&(c=_d.from(a)),l&&(d=hg.from(l)),new kp({gpuProgram:c,glProgram:d,...o})}}const BE={normal:0,add:1,multiply:2,screen:3,overlay:4,erase:5,"normal-npm":6,"add-npm":7,"screen-npm":8,min:9,max:10},iy=0,ly=1,sy=2,ry=3,uy=4,oy=5,Gy=class Q_{constructor(){this.data=0,this.blendMode="normal",this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<iy)}set blend(t){!!(this.data&1<<iy)!==t&&(this.data^=1<<iy)}get offsets(){return!!(this.data&1<<ly)}set offsets(t){!!(this.data&1<<ly)!==t&&(this.data^=1<<ly)}set cullMode(t){if(t==="none"){this.culling=!1;return}this.culling=!0,this.clockwiseFrontFace=t==="front"}get cullMode(){return this.culling?this.clockwiseFrontFace?"front":"back":"none"}get culling(){return!!(this.data&1<<sy)}set culling(t){!!(this.data&1<<sy)!==t&&(this.data^=1<<sy)}get depthTest(){return!!(this.data&1<<ry)}set depthTest(t){!!(this.data&1<<ry)!==t&&(this.data^=1<<ry)}get depthMask(){return!!(this.data&1<<oy)}set depthMask(t){!!(this.data&1<<oy)!==t&&(this.data^=1<<oy)}get clockwiseFrontFace(){return!!(this.data&1<<uy)}set clockwiseFrontFace(t){!!(this.data&1<<uy)!==t&&(this.data^=1<<uy)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!=="none",this._blendMode=t,this._blendModeId=BE[t]||0}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}toString(){return`[pixi.js/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const t=new Q_;return t.depthTest=!1,t.blend=!0,t}};Gy.default2d=Gy.for2d();let dg=Gy;const K_=class Yy extends kp{constructor(t){t={...Yy.defaultOptions,...t},super(t),this.enabled=!0,this._state=dg.for2d(),this.blendMode=t.blendMode,this.padding=t.padding,typeof t.antialias=="boolean"?this.antialias=t.antialias?"on":"off":this.antialias=t.antialias,this.resolution=t.resolution,this.blendRequired=t.blendRequired,this.clipToViewport=t.clipToViewport,this.addResource("uTexture",0,1),t.blendRequired&&this.addResource("uBackTexture",0,3)}apply(t,a,l,o){t.applyFilter(this,a,l,o)}get blendMode(){return this._state.blendMode}set blendMode(t){this._state.blendMode=t}static from(t){const{gpu:a,gl:l,...o}=t;let c,d;return a&&(c=_d.from(a)),l&&(d=hg.from(l)),new Yy({gpuProgram:c,glProgram:d,...o})}};K_.defaultOptions={blendMode:"normal",resolution:1,padding:0,antialias:"off",blendRequired:!1,clipToViewport:!0};let bo=K_;const qy=[];Ie.handleByNamedList(Wt.Environment,qy);async function UE(n){if(!n)for(let t=0;t<qy.length;t++){const a=qy[t];if(a.value.test()){await a.value.load();return}}}let Fh;function HE(){if(typeof Fh=="boolean")return Fh;try{Fh=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{Fh=!1}return Fh}function T1(n,t,a=2){const l=t&&t.length,o=l?t[0]*a:n.length;let c=Z_(n,0,o,a,!0);const d=[];if(!c||c.next===c.prev)return d;let m,p,g;if(l&&(c=LE(n,t,c,a)),n.length>80*a){m=n[0],p=n[1];let x=m,b=p;for(let E=a;E<o;E+=a){const C=n[E],M=n[E+1];C<m&&(m=C),M<p&&(p=M),C>x&&(x=C),M>b&&(b=M)}g=Math.max(x-m,b-p),g=g!==0?32767/g:0}return hd(c,d,a,m,p,g,0),d}function Z_(n,t,a,l,o){let c;if(o===IE(n,t,a,l)>0)for(let d=t;d<a;d+=l)c=E1(d/l|0,n[d],n[d+1],c);else for(let d=a-l;d>=t;d-=l)c=E1(d/l|0,n[d],n[d+1],c);return c&&lf(c,c.next)&&(md(c),c=c.next),c}function _o(n,t){if(!n)return n;t||(t=n);let a=n,l;do if(l=!1,!a.steiner&&(lf(a,a.next)||Pe(a.prev,a,a.next)===0)){if(md(a),a=t=a.prev,a===a.next)break;l=!0}else a=a.next;while(l||a!==t);return t}function hd(n,t,a,l,o,c,d){if(!n)return;!d&&c&&KE(n,l,o,c);let m=n;for(;n.prev!==n.next;){const p=n.prev,g=n.next;if(c?GE(n,l,o,c):jE(n)){t.push(p.i,n.i,g.i),md(n),n=g.next,m=g.next;continue}if(n=g,n===m){d?d===1?(n=YE(_o(n),t),hd(n,t,a,l,o,c,2)):d===2&&qE(n,t,a,l,o,c):hd(_o(n),t,a,l,o,c,1);break}}}function jE(n){const t=n.prev,a=n,l=n.next;if(Pe(t,a,l)>=0)return!1;const o=t.x,c=a.x,d=l.x,m=t.y,p=a.y,g=l.y,x=Math.min(o,c,d),b=Math.min(m,p,g),E=Math.max(o,c,d),C=Math.max(m,p,g);let M=l.next;for(;M!==t;){if(M.x>=x&&M.x<=E&&M.y>=b&&M.y<=C&&ad(o,m,c,p,d,g,M.x,M.y)&&Pe(M.prev,M,M.next)>=0)return!1;M=M.next}return!0}function GE(n,t,a,l){const o=n.prev,c=n,d=n.next;if(Pe(o,c,d)>=0)return!1;const m=o.x,p=c.x,g=d.x,x=o.y,b=c.y,E=d.y,C=Math.min(m,p,g),M=Math.min(x,b,E),z=Math.max(m,p,g),R=Math.max(x,b,E),w=Ly(C,M,t,a,l),O=Ly(z,R,t,a,l);let U=n.prevZ,Y=n.nextZ;for(;U&&U.z>=w&&Y&&Y.z<=O;){if(U.x>=C&&U.x<=z&&U.y>=M&&U.y<=R&&U!==o&&U!==d&&ad(m,x,p,b,g,E,U.x,U.y)&&Pe(U.prev,U,U.next)>=0||(U=U.prevZ,Y.x>=C&&Y.x<=z&&Y.y>=M&&Y.y<=R&&Y!==o&&Y!==d&&ad(m,x,p,b,g,E,Y.x,Y.y)&&Pe(Y.prev,Y,Y.next)>=0))return!1;Y=Y.nextZ}for(;U&&U.z>=w;){if(U.x>=C&&U.x<=z&&U.y>=M&&U.y<=R&&U!==o&&U!==d&&ad(m,x,p,b,g,E,U.x,U.y)&&Pe(U.prev,U,U.next)>=0)return!1;U=U.prevZ}for(;Y&&Y.z<=O;){if(Y.x>=C&&Y.x<=z&&Y.y>=M&&Y.y<=R&&Y!==o&&Y!==d&&ad(m,x,p,b,g,E,Y.x,Y.y)&&Pe(Y.prev,Y,Y.next)>=0)return!1;Y=Y.nextZ}return!0}function YE(n,t){let a=n;do{const l=a.prev,o=a.next.next;!lf(l,o)&&F_(l,a,a.next,o)&&dd(l,o)&&dd(o,l)&&(t.push(l.i,a.i,o.i),md(a),md(a.next),a=n=o),a=a.next}while(a!==n);return _o(a)}function qE(n,t,a,l,o,c){let d=n;do{let m=d.next.next;for(;m!==d.prev;){if(d.i!==m.i&&FE(d,m)){let p=W_(d,m);d=_o(d,d.next),p=_o(p,p.next),hd(d,t,a,l,o,c,0),hd(p,t,a,l,o,c,0);return}m=m.next}d=d.next}while(d!==n)}function LE(n,t,a,l){const o=[];for(let c=0,d=t.length;c<d;c++){const m=t[c]*l,p=c<d-1?t[c+1]*l:n.length,g=Z_(n,m,p,l,!1);g===g.next&&(g.steiner=!0),o.push(JE(g))}o.sort(XE);for(let c=0;c<o.length;c++)a=VE(o[c],a);return a}function XE(n,t){let a=n.x-t.x;if(a===0&&(a=n.y-t.y,a===0)){const l=(n.next.y-n.y)/(n.next.x-n.x),o=(t.next.y-t.y)/(t.next.x-t.x);a=l-o}return a}function VE(n,t){const a=kE(n,t);if(!a)return t;const l=W_(a,n);return _o(l,l.next),_o(a,a.next)}function kE(n,t){let a=t;const l=n.x,o=n.y;let c=-1/0,d;if(lf(n,a))return a;do{if(lf(n,a.next))return a.next;if(o<=a.y&&o>=a.next.y&&a.next.y!==a.y){const b=a.x+(o-a.y)*(a.next.x-a.x)/(a.next.y-a.y);if(b<=l&&b>c&&(c=b,d=a.x<a.next.x?a:a.next,b===l))return d}a=a.next}while(a!==t);if(!d)return null;const m=d,p=d.x,g=d.y;let x=1/0;a=d;do{if(l>=a.x&&a.x>=p&&l!==a.x&&J_(o<g?l:c,o,p,g,o<g?c:l,o,a.x,a.y)){const b=Math.abs(o-a.y)/(l-a.x);dd(a,n)&&(b<x||b===x&&(a.x>d.x||a.x===d.x&&QE(d,a)))&&(d=a,x=b)}a=a.next}while(a!==m);return d}function QE(n,t){return Pe(n.prev,n,t.prev)<0&&Pe(t.next,n,n.next)<0}function KE(n,t,a,l){let o=n;do o.z===0&&(o.z=Ly(o.x,o.y,t,a,l)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next;while(o!==n);o.prevZ.nextZ=null,o.prevZ=null,ZE(o)}function ZE(n){let t,a=1;do{let l=n,o;n=null;let c=null;for(t=0;l;){t++;let d=l,m=0;for(let g=0;g<a&&(m++,d=d.nextZ,!!d);g++);let p=a;for(;m>0||p>0&&d;)m!==0&&(p===0||!d||l.z<=d.z)?(o=l,l=l.nextZ,m--):(o=d,d=d.nextZ,p--),c?c.nextZ=o:n=o,o.prevZ=c,c=o;l=d}c.nextZ=null,a*=2}while(t>1);return n}function Ly(n,t,a,l,o){return n=(n-a)*o|0,t=(t-l)*o|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,n|t<<1}function JE(n){let t=n,a=n;do(t.x<a.x||t.x===a.x&&t.y<a.y)&&(a=t),t=t.next;while(t!==n);return a}function J_(n,t,a,l,o,c,d,m){return(o-d)*(t-m)>=(n-d)*(c-m)&&(n-d)*(l-m)>=(a-d)*(t-m)&&(a-d)*(c-m)>=(o-d)*(l-m)}function ad(n,t,a,l,o,c,d,m){return!(n===d&&t===m)&&J_(n,t,a,l,o,c,d,m)}function FE(n,t){return n.next.i!==t.i&&n.prev.i!==t.i&&!WE(n,t)&&(dd(n,t)&&dd(t,n)&&PE(n,t)&&(Pe(n.prev,n,t.prev)||Pe(n,t.prev,t))||lf(n,t)&&Pe(n.prev,n,n.next)>0&&Pe(t.prev,t,t.next)>0)}function Pe(n,t,a){return(t.y-n.y)*(a.x-t.x)-(t.x-n.x)*(a.y-t.y)}function lf(n,t){return n.x===t.x&&n.y===t.y}function F_(n,t,a,l){const o=hp(Pe(n,t,a)),c=hp(Pe(n,t,l)),d=hp(Pe(a,l,n)),m=hp(Pe(a,l,t));return!!(o!==c&&d!==m||o===0&&fp(n,a,t)||c===0&&fp(n,l,t)||d===0&&fp(a,n,l)||m===0&&fp(a,t,l))}function fp(n,t,a){return t.x<=Math.max(n.x,a.x)&&t.x>=Math.min(n.x,a.x)&&t.y<=Math.max(n.y,a.y)&&t.y>=Math.min(n.y,a.y)}function hp(n){return n>0?1:n<0?-1:0}function WE(n,t){let a=n;do{if(a.i!==n.i&&a.next.i!==n.i&&a.i!==t.i&&a.next.i!==t.i&&F_(a,a.next,n,t))return!0;a=a.next}while(a!==n);return!1}function dd(n,t){return Pe(n.prev,n,n.next)<0?Pe(n,t,n.next)>=0&&Pe(n,n.prev,t)>=0:Pe(n,t,n.prev)<0||Pe(n,n.next,t)<0}function PE(n,t){let a=n,l=!1;const o=(n.x+t.x)/2,c=(n.y+t.y)/2;do a.y>c!=a.next.y>c&&a.next.y!==a.y&&o<(a.next.x-a.x)*(c-a.y)/(a.next.y-a.y)+a.x&&(l=!l),a=a.next;while(a!==n);return l}function W_(n,t){const a=Xy(n.i,n.x,n.y),l=Xy(t.i,t.x,t.y),o=n.next,c=t.prev;return n.next=t,t.prev=n,a.next=o,o.prev=a,l.next=a,a.prev=l,c.next=l,l.prev=c,l}function E1(n,t,a,l){const o=Xy(n,t,a);return l?(o.next=l.next,o.prev=l,l.next.prev=o,l.next=o):(o.prev=o,o.next=o),o}function md(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function Xy(n,t,a){return{i:n,x:t,y:a,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function IE(n,t,a,l){let o=0;for(let c=t,d=a-l;c<a;c+=l)o+=(n[d]-n[c])*(n[c+1]+n[d+1]),d=c;return o}const $E=T1.default||T1;var P_=(n=>(n[n.NONE=0]="NONE",n[n.COLOR=16384]="COLOR",n[n.STENCIL=1024]="STENCIL",n[n.DEPTH=256]="DEPTH",n[n.COLOR_DEPTH=16640]="COLOR_DEPTH",n[n.COLOR_STENCIL=17408]="COLOR_STENCIL",n[n.DEPTH_STENCIL=1280]="DEPTH_STENCIL",n[n.ALL=17664]="ALL",n))(P_||{});class t4{constructor(t){this.items=[],this._name=t}emit(t,a,l,o,c,d,m,p){const{name:g,items:x}=this;for(let b=0,E=x.length;b<E;b++)x[b][g](t,a,l,o,c,d,m,p);return this}add(t){return t[this._name]&&(this.remove(t),this.items.push(t)),this}remove(t){const a=this.items.indexOf(t);return a!==-1&&this.items.splice(a,1),this}contains(t){return this.items.indexOf(t)!==-1}removeAll(){return this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}const e4=["init","destroy","contextChange","resolutionChange","resetState","renderEnd","renderStart","render","update","postrender","prerender"],I_=class $_ extends _s{constructor(t){super(),this.tick=0,this.uid=on("renderer"),this.runners=Object.create(null),this.renderPipes=Object.create(null),this._initOptions={},this._systemsHash=Object.create(null),this.type=t.type,this.name=t.name,this.config=t;const a=[...e4,...this.config.runners??[]];this._addRunners(...a),this._unsafeEvalCheck()}async init(t={}){const a=t.skipExtensionImports===!0?!0:t.manageImports===!1;await UE(a),this._addSystems(this.config.systems),this._addPipes(this.config.renderPipes,this.config.renderPipeAdaptors);for(const l in this._systemsHash)t={...this._systemsHash[l].constructor.defaultOptions,...t};t={...$_.defaultOptions,...t},this._roundPixels=t.roundPixels?1:0;for(let l=0;l<this.runners.init.items.length;l++)await this.runners.init.items[l].init(t);this._initOptions=t}render(t,a){this.tick++;let l=t;if(l instanceof $n&&(l={container:l},a&&(de(un,"passing a second argument is deprecated, please use render options instead"),l.target=a.renderTexture)),l.target||(l.target=this.view.renderTarget),l.target===this.view.renderTarget&&(this._lastObjectRendered=l.container,l.clearColor??(l.clearColor=this.background.colorRgba),l.clear??(l.clear=this.background.clearBeforeRender)),l.clearColor){const o=Array.isArray(l.clearColor)&&l.clearColor.length===4;l.clearColor=o?l.clearColor:zn.shared.setValue(l.clearColor).toArray()}l.transform||(l.container.updateLocalTransform(),l.transform=l.container.localTransform),l.container.visible&&(l.container.enableRenderGroup(),this.runners.prerender.emit(l),this.runners.renderStart.emit(l),this.runners.render.emit(l),this.runners.renderEnd.emit(l),this.runners.postrender.emit(l))}resize(t,a,l){const o=this.view.resolution;this.view.resize(t,a,l),this.emit("resize",this.view.screen.width,this.view.screen.height,this.view.resolution),l!==void 0&&l!==o&&this.runners.resolutionChange.emit(l)}clear(t={}){const a=this;t.target||(t.target=a.renderTarget.renderTarget),t.clearColor||(t.clearColor=this.background.colorRgba),t.clear??(t.clear=P_.ALL);const{clear:l,clearColor:o,target:c,mipLevel:d,layer:m}=t;zn.shared.setValue(o??this.background.colorRgba),a.renderTarget.clear(c,l,zn.shared.toArray(),d??0,m??0)}get resolution(){return this.view.resolution}set resolution(t){this.view.resolution=t,this.runners.resolutionChange.emit(t)}get width(){return this.view.texture.frame.width}get height(){return this.view.texture.frame.height}get canvas(){return this.view.canvas}get lastObjectRendered(){return this._lastObjectRendered}get renderingToScreen(){return this.renderTarget.renderingToScreen}get screen(){return this.view.screen}_addRunners(...t){t.forEach(a=>{this.runners[a]=new t4(a)})}_addSystems(t){let a;for(a in t){const l=t[a];this._addSystem(l.value,l.name)}}_addSystem(t,a){const l=new t(this);if(this[a])throw new Error(`Whoops! The name "${a}" is already in use`);this[a]=l,this._systemsHash[a]=l;for(const o in this.runners)this.runners[o].add(l);return this}_addPipes(t,a){const l=a.reduce((o,c)=>(o[c.name]=c.value,o),{});t.forEach(o=>{const c=o.value,d=o.name,m=l[d];this.renderPipes[d]=new c(this,m?new m:null),this.runners.destroy.add(this.renderPipes[d])})}destroy(t=!1){this.runners.destroy.items.reverse(),this.runners.destroy.emit(t),(t===!0||typeof t=="object"&&t.releaseGlobalResources)&&xd.release(),Object.values(this.runners).forEach(a=>{a.destroy()}),this._systemsHash=null,this.renderPipes=null,this.removeAllListeners()}generateTexture(t){return this.textureGenerator.generateTexture(t)}get roundPixels(){return!!this._roundPixels}_unsafeEvalCheck(){if(!HE())throw new Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.")}resetState(){this.runners.resetState.emit()}};I_.defaultOptions={resolution:1,failIfMajorPerformanceCaveat:!1,roundPixels:!1};let t2=I_,dp;function n4(n){return dp!==void 0||(dp=(()=>{var a;const t={stencil:!0,failIfMajorPerformanceCaveat:n??t2.defaultOptions.failIfMajorPerformanceCaveat};try{if(!bi.get().getWebGLRenderingContext())return!1;let o=bi.get().createCanvas().getContext("webgl",t);const c=!!((a=o==null?void 0:o.getContextAttributes())!=null&&a.stencil);if(o){const d=o.getExtension("WEBGL_lose_context");d&&d.loseContext()}return o=null,c}catch{return!1}})()),dp}let mp;async function a4(n={}){return mp!==void 0||(mp=await(async()=>{const t=bi.get().getNavigator().gpu;if(!t)return!1;try{return await(await t.requestAdapter(n)).requestDevice(),!0}catch{return!1}})()),mp}const C1=["webgl","webgpu","canvas"];async function i4(n){let t=[];n.preference?(t.push(n.preference),C1.forEach(c=>{c!==n.preference&&t.push(c)})):t=C1.slice();let a,l={};for(let c=0;c<t.length;c++){const d=t[c];if(d==="webgpu"&&await a4()){const{WebGPURenderer:m}=await Pc(async()=>{const{WebGPURenderer:p}=await import("./WebGPURenderer-C1UxCrJq.js");return{WebGPURenderer:p}},__vite__mapDeps([2,3,4]));a=m,l={...n,...n.webgpu};break}else if(d==="webgl"&&n4(n.failIfMajorPerformanceCaveat??t2.defaultOptions.failIfMajorPerformanceCaveat)){const{WebGLRenderer:m}=await Pc(async()=>{const{WebGLRenderer:p}=await import("./WebGLRenderer-C6BYo_WV.js");return{WebGLRenderer:p}},__vite__mapDeps([5,3,4]));a=m,l={...n,...n.webgl};break}else if(d==="canvas"){const{CanvasRenderer:m}=await Pc(async()=>{const{CanvasRenderer:p}=await import("./CanvasRenderer-DdWLm2t4.js");return{CanvasRenderer:p}},__vite__mapDeps([6,4]));a=m,l={...n,...n.canvasOptions};break}}if(delete l.webgpu,delete l.webgl,delete l.canvasOptions,!a)throw new Error("No available renderer for the current environment");const o=new a;return await o.init(l),o}const e2="8.17.0";class n2{static init(){var t;(t=globalThis.__PIXI_APP_INIT__)==null||t.call(globalThis,this,e2)}static destroy(){}}n2.extension=Wt.Application;class l4{constructor(t){this._renderer=t}init(){var t;(t=globalThis.__PIXI_RENDERER_INIT__)==null||t.call(globalThis,this._renderer,e2)}destroy(){this._renderer=null}}l4.extension={type:[Wt.WebGLSystem,Wt.WebGPUSystem],name:"initHook",priority:-10};class a2{static init(t){Object.defineProperty(this,"resizeTo",{configurable:!0,set(a){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=a,a&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this._cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this._cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this._cancelResize();let a,l;if(this._resizeTo===globalThis.window)a=globalThis.innerWidth,l=globalThis.innerHeight;else{const{clientWidth:o,clientHeight:c}=this._resizeTo;a=o,l=c}this.renderer.resize(a,l),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=t.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this._cancelResize(),this._cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}a2.extension=Wt.Application;class i2{static init(t){t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{configurable:!0,set(a){this._ticker&&this._ticker.remove(this.render,this),this._ticker=a,a&&a.add(this.render,this,wp.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?Jc.shared:new Jc,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}i2.extension=Wt.Application;Ie.add(a2);Ie.add(i2);const l2=class Vy{constructor(...t){this.stage=new $n,t[0]!==void 0&&de(un,"Application constructor options are deprecated, please use Application.init() instead.")}async init(t){t={...t},this.stage||(this.stage=new $n),this.renderer=await i4(t),Vy._plugins.forEach(a=>{a.init.call(this,t)})}render(){this.renderer.render({container:this.stage})}get canvas(){return this.renderer.canvas}get view(){return de(un,"Application.view is deprecated, please use Application.canvas instead."),this.renderer.canvas}get screen(){return this.renderer.screen}destroy(t=!1,a=!1){const l=Vy._plugins.slice(0);l.reverse(),l.forEach(o=>{o.destroy.call(this)}),this.stage.destroy(a),this.stage=null,this.renderer.destroy(t),this.renderer=null}};l2._plugins=[];let mg=l2;Ie.handleByList(Wt.Application,mg._plugins);Ie.add(n2);var cy,A1;function s4(){if(A1)return cy;A1=1,cy=a;var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},t=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function a(c){var d=[];return c.replace(t,function(m,p,g){var x=p.toLowerCase();for(g=o(g),x=="m"&&g.length>2&&(d.push([p].concat(g.splice(0,2))),x="l",p=p=="m"?"l":"L");;){if(g.length==n[x])return g.unshift(p),d.push(g);if(g.length<n[x])throw new Error("malformed path data");d.push([p].concat(g.splice(0,n[x])))}}),d}var l=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function o(c){var d=c.match(l);return d?d.map(Number):[]}return cy}var r4=s4();const u4=Hp(r4);function o4(n,t){const a=u4(n),l=[];let o=null,c=0,d=0;for(let m=0;m<a.length;m++){const p=a[m],g=p[0],x=p;switch(g){case"M":c=x[1],d=x[2],t.moveTo(c,d);break;case"m":c+=x[1],d+=x[2],t.moveTo(c,d);break;case"H":c=x[1],t.lineTo(c,d);break;case"h":c+=x[1],t.lineTo(c,d);break;case"V":d=x[1],t.lineTo(c,d);break;case"v":d+=x[1],t.lineTo(c,d);break;case"L":c=x[1],d=x[2],t.lineTo(c,d);break;case"l":c+=x[1],d+=x[2],t.lineTo(c,d);break;case"C":c=x[5],d=x[6],t.bezierCurveTo(x[1],x[2],x[3],x[4],c,d);break;case"c":t.bezierCurveTo(c+x[1],d+x[2],c+x[3],d+x[4],c+x[5],d+x[6]),c+=x[5],d+=x[6];break;case"S":c=x[3],d=x[4],t.bezierCurveToShort(x[1],x[2],c,d);break;case"s":t.bezierCurveToShort(c+x[1],d+x[2],c+x[3],d+x[4]),c+=x[3],d+=x[4];break;case"Q":c=x[3],d=x[4],t.quadraticCurveTo(x[1],x[2],c,d);break;case"q":t.quadraticCurveTo(c+x[1],d+x[2],c+x[3],d+x[4]),c+=x[3],d+=x[4];break;case"T":c=x[1],d=x[2],t.quadraticCurveToShort(c,d);break;case"t":c+=x[1],d+=x[2],t.quadraticCurveToShort(c,d);break;case"A":c=x[6],d=x[7],t.arcToSvg(x[1],x[2],x[3],x[4],x[5],c,d);break;case"a":c+=x[6],d+=x[7],t.arcToSvg(x[1],x[2],x[3],x[4],x[5],c,d);break;case"Z":case"z":t.closePath(),l.length>0&&(o=l.pop(),o?(c=o.startX,d=o.startY):(c=0,d=0)),o=null;break;default:Ya(`Unknown SVG path command: ${g}`)}g!=="Z"&&g!=="z"&&o===null&&(o={startX:c,startY:d},l.push(o))}return t}class pg{constructor(t=0,a=0,l=0){this.type="circle",this.x=t,this.y=a,this.radius=l}clone(){return new pg(this.x,this.y,this.radius)}contains(t,a){if(this.radius<=0)return!1;const l=this.radius*this.radius;let o=this.x-t,c=this.y-a;return o*=o,c*=c,o+c<=l}strokeContains(t,a,l,o=.5){if(this.radius===0)return!1;const c=this.x-t,d=this.y-a,m=this.radius,p=(1-o)*l,g=Math.sqrt(c*c+d*d);return g<=m+p&&g>m-(l-p)}getBounds(t){return t||(t=new mn),t.x=this.x-this.radius,t.y=this.y-this.radius,t.width=this.radius*2,t.height=this.radius*2,t}copyFrom(t){return this.x=t.x,this.y=t.y,this.radius=t.radius,this}copyTo(t){return t.copyFrom(this),t}toString(){return`[pixi.js/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}class yg{constructor(t=0,a=0,l=0,o=0){this.type="ellipse",this.x=t,this.y=a,this.halfWidth=l,this.halfHeight=o}clone(){return new yg(this.x,this.y,this.halfWidth,this.halfHeight)}contains(t,a){if(this.halfWidth<=0||this.halfHeight<=0)return!1;let l=(t-this.x)/this.halfWidth,o=(a-this.y)/this.halfHeight;return l*=l,o*=o,l+o<=1}strokeContains(t,a,l,o=.5){const{halfWidth:c,halfHeight:d}=this;if(c<=0||d<=0)return!1;const m=l*(1-o),p=l-m,g=c-p,x=d-p,b=c+m,E=d+m,C=t-this.x,M=a-this.y,z=C*C/(g*g)+M*M/(x*x),R=C*C/(b*b)+M*M/(E*E);return z>1&&R<=1}getBounds(t){return t||(t=new mn),t.x=this.x-this.halfWidth,t.y=this.y-this.halfHeight,t.width=this.halfWidth*2,t.height=this.halfHeight*2,t}copyFrom(t){return this.x=t.x,this.y=t.y,this.halfWidth=t.halfWidth,this.halfHeight=t.halfHeight,this}copyTo(t){return t.copyFrom(this),t}toString(){return`[pixi.js/math:Ellipse x=${this.x} y=${this.y} halfWidth=${this.halfWidth} halfHeight=${this.halfHeight}]`}}function c4(n,t,a,l,o,c){const d=n-a,m=t-l,p=o-a,g=c-l,x=d*p+m*g,b=p*p+g*g;let E=-1;b!==0&&(E=x/b);let C,M;E<0?(C=a,M=l):E>1?(C=o,M=c):(C=a+E*p,M=l+E*g);const z=n-C,R=t-M;return z*z+R*R}let f4,h4;class rd{constructor(...t){this.type="polygon";let a=Array.isArray(t[0])?t[0]:t;if(typeof a[0]!="number"){const l=[];for(let o=0,c=a.length;o<c;o++)l.push(a[o].x,a[o].y);a=l}this.points=a,this.closePath=!0}isClockwise(){let t=0;const a=this.points,l=a.length;for(let o=0;o<l;o+=2){const c=a[o],d=a[o+1],m=a[(o+2)%l],p=a[(o+3)%l];t+=(m-c)*(p+d)}return t<0}containsPolygon(t){const a=this.getBounds(f4),l=t.getBounds(h4);if(!a.containsRect(l))return!1;const o=t.points;for(let c=0;c<o.length;c+=2){const d=o[c],m=o[c+1];if(!this.contains(d,m))return!1}return!0}clone(){const t=this.points.slice(),a=new rd(t);return a.closePath=this.closePath,a}contains(t,a){let l=!1;const o=this.points.length/2;for(let c=0,d=o-1;c<o;d=c++){const m=this.points[c*2],p=this.points[c*2+1],g=this.points[d*2],x=this.points[d*2+1];p>a!=x>a&&t<(g-m)*((a-p)/(x-p))+m&&(l=!l)}return l}strokeContains(t,a,l,o=.5){const c=l*l,d=c*(1-o),m=c-d,{points:p}=this,g=p.length-(this.closePath?0:2);for(let x=0;x<g;x+=2){const b=p[x],E=p[x+1],C=p[(x+2)%p.length],M=p[(x+3)%p.length],z=c4(t,a,b,E,C,M),R=Math.sign((C-b)*(a-E)-(M-E)*(t-b));if(z<=(R<0?m:d))return!0}return!1}getBounds(t){t||(t=new mn);const a=this.points;let l=1/0,o=-1/0,c=1/0,d=-1/0;for(let m=0,p=a.length;m<p;m+=2){const g=a[m],x=a[m+1];l=g<l?g:l,o=g>o?g:o,c=x<c?x:c,d=x>d?x:d}return t.x=l,t.width=o-l,t.y=c,t.height=d-c,t}copyFrom(t){return this.points=t.points.slice(),this.closePath=t.closePath,this}copyTo(t){return t.copyFrom(this),t}toString(){return`[pixi.js/math:PolygoncloseStroke=${this.closePath}points=${this.points.reduce((t,a)=>`${t}, ${a}`,"")}]`}get lastX(){return this.points[this.points.length-2]}get lastY(){return this.points[this.points.length-1]}get x(){return de("8.11.0","Polygon.lastX is deprecated, please use Polygon.lastX instead."),this.points[this.points.length-2]}get y(){return de("8.11.0","Polygon.y is deprecated, please use Polygon.lastY instead."),this.points[this.points.length-1]}get startX(){return this.points[0]}get startY(){return this.points[1]}}const pp=(n,t,a,l,o,c,d)=>{const m=n-a,p=t-l,g=Math.sqrt(m*m+p*p);return g>=o-c&&g<=o+d};class gg{constructor(t=0,a=0,l=0,o=0,c=20){this.type="roundedRectangle",this.x=t,this.y=a,this.width=l,this.height=o,this.radius=c}getBounds(t){return t||(t=new mn),t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}clone(){return new gg(this.x,this.y,this.width,this.height,this.radius)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.copyFrom(this),t}contains(t,a){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&a>=this.y&&a<=this.y+this.height){const l=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(a>=this.y+l&&a<=this.y+this.height-l||t>=this.x+l&&t<=this.x+this.width-l)return!0;let o=t-(this.x+l),c=a-(this.y+l);const d=l*l;if(o*o+c*c<=d||(o=t-(this.x+this.width-l),o*o+c*c<=d)||(c=a-(this.y+this.height-l),o*o+c*c<=d)||(o=t-(this.x+l),o*o+c*c<=d))return!0}return!1}strokeContains(t,a,l,o=.5){const{x:c,y:d,width:m,height:p,radius:g}=this,x=l*(1-o),b=l-x,E=c+g,C=d+g,M=m-g*2,z=p-g*2,R=c+m,w=d+p;return(t>=c-x&&t<=c+b||t>=R-b&&t<=R+x)&&a>=C&&a<=C+z||(a>=d-x&&a<=d+b||a>=w-b&&a<=w+x)&&t>=E&&t<=E+M?!0:t<E&&a<C&&pp(t,a,E,C,g,b,x)||t>R-g&&a<C&&pp(t,a,R-g,C,g,b,x)||t>R-g&&a>w-g&&pp(t,a,R-g,w-g,g,b,x)||t<E&&a>w-g&&pp(t,a,E,w-g,g,b,x)}toString(){return`[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}const s2={};function d4(n,t,a){let l=2166136261;for(let o=0;o<t;o++)l^=n[o].uid,l=Math.imul(l,16777619),l>>>=0;return s2[l]||m4(n,t,l,a)}function m4(n,t,a,l){const o={};let c=0;for(let m=0;m<l;m++){const p=m<t?n[m]:ze.EMPTY.source;o[c++]=p.source,o[c++]=p.style}const d=new Ap(o);return s2[a]=d,d}class M1{constructor(t){typeof t=="number"?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData),this.size=this.rawBinaryData.byteLength}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}get float64View(){return this._float64Array||(this._float64Array=new Float64Array(this.rawBinaryData)),this._float64Array}get bigUint64View(){return this._bigUint64Array||(this._bigUint64Array=new BigUint64Array(this.rawBinaryData)),this._bigUint64Array}view(t){return this[`${t}View`]}destroy(){this.rawBinaryData=null,this.uint32View=null,this.float32View=null,this.uint16View=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._int32View=null,this._float64Array=null,this._bigUint64Array=null}static sizeOf(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${t} isn't a valid view type`)}}}function R1(n,t,a,l){if(a??(a=0),l??(l=Math.min(n.byteLength-a,t.byteLength)),!(a&7)&&!(l&7)){const o=l/8;new Float64Array(t,0,o).set(new Float64Array(n,a,o))}else if(!(a&3)&&!(l&3)){const o=l/4;new Float32Array(t,0,o).set(new Float32Array(n,a,o))}else new Uint8Array(t).set(new Uint8Array(n,a,l))}const p4={normal:"normal-npm",add:"add-npm",screen:"screen-npm"};var y4=(n=>(n[n.DISABLED=0]="DISABLED",n[n.RENDERING_MASK_ADD=1]="RENDERING_MASK_ADD",n[n.MASK_ACTIVE=2]="MASK_ACTIVE",n[n.INVERSE_MASK_ACTIVE=3]="INVERSE_MASK_ACTIVE",n[n.RENDERING_MASK_REMOVE=4]="RENDERING_MASK_REMOVE",n[n.NONE=5]="NONE",n))(y4||{});function z1(n,t){return t.alphaMode==="no-premultiply-alpha"&&p4[n]||n}const g4=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
83
- `);function v4(n){let t="";for(let a=0;a<n;++a)a>0&&(t+=`
84
- else `),a<n-1&&(t+=`if(test == ${a}.0){}`);return t}function x4(n,t){if(n===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const a=t.createShader(t.FRAGMENT_SHADER);try{for(;;){const l=g4.replace(/%forloop%/gi,v4(n));if(t.shaderSource(a,l),t.compileShader(a),!t.getShaderParameter(a,t.COMPILE_STATUS))n=n/2|0;else break}}finally{t.deleteShader(a)}return n}let Lc=null;function _4(){var t;if(Lc)return Lc;const n=Y_();return Lc=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),Lc=x4(Lc,n),(t=n.getExtension("WEBGL_lose_context"))==null||t.loseContext(),Lc}class S4{constructor(){this.ids=Object.create(null),this.textures=[],this.count=0}clear(){for(let t=0;t<this.count;t++){const a=this.textures[t];this.textures[t]=null,this.ids[a.uid]=null}this.count=0}}class b4{constructor(){this.renderPipeId="batch",this.action="startBatch",this.start=0,this.size=0,this.textures=new S4,this.blendMode="normal",this.topology="triangle-strip",this.canBundle=!0}destroy(){this.textures=null,this.gpuBindGroup=null,this.bindGroup=null,this.batcher=null,this.elements=null}}const ud=[];let Dp=0;xd.register({clear:()=>{if(ud.length>0)for(const n of ud)n&&n.destroy();ud.length=0,Dp=0}});function w1(){return Dp>0?ud[--Dp]:new b4}function D1(n){n.elements=null,ud[Dp++]=n}let Wh=0;const r2=class u2{constructor(t){this.uid=on("batcher"),this.dirty=!0,this.batchIndex=0,this.batches=[],this._elements=[],t={...u2.defaultOptions,...t},t.maxTextures||(de("v8.8.0","maxTextures is a required option for Batcher now, please pass it in the options"),t.maxTextures=_4());const{maxTextures:a,attributesInitialSize:l,indicesInitialSize:o}=t;this.attributeBuffer=new M1(l*4),this.indexBuffer=new Uint16Array(o),this.maxTextures=a}begin(){this.elementSize=0,this.elementStart=0,this.indexSize=0,this.attributeSize=0;for(let t=0;t<this.batchIndex;t++)D1(this.batches[t]);this.batchIndex=0,this._batchIndexStart=0,this._batchIndexSize=0,this.dirty=!0}add(t){this._elements[this.elementSize++]=t,t._indexStart=this.indexSize,t._attributeStart=this.attributeSize,t._batcher=this,this.indexSize+=t.indexSize,this.attributeSize+=t.attributeSize*this.vertexSize}checkAndUpdateTexture(t,a){const l=t._batch.textures.ids[a._source.uid];return!l&&l!==0?!1:(t._textureId=l,t.texture=a,!0)}updateElement(t){this.dirty=!0;const a=this.attributeBuffer;t.packAsQuad?this.packQuadAttributes(t,a.float32View,a.uint32View,t._attributeStart,t._textureId):this.packAttributes(t,a.float32View,a.uint32View,t._attributeStart,t._textureId)}break(t){const a=this._elements;if(!a[this.elementStart])return;let l=w1(),o=l.textures;o.clear();const c=a[this.elementStart];let d=z1(c.blendMode,c.texture._source),m=c.topology;this.attributeSize*4>this.attributeBuffer.size&&this._resizeAttributeBuffer(this.attributeSize*4),this.indexSize>this.indexBuffer.length&&this._resizeIndexBuffer(this.indexSize);const p=this.attributeBuffer.float32View,g=this.attributeBuffer.uint32View,x=this.indexBuffer;let b=this._batchIndexSize,E=this._batchIndexStart,C="startBatch",M=[];const z=this.maxTextures;for(let R=this.elementStart;R<this.elementSize;++R){const w=a[R];a[R]=null;const U=w.texture._source,Y=z1(w.blendMode,U),k=d!==Y||m!==w.topology;if(U._batchTick===Wh&&!k){w._textureId=U._textureBindLocation,b+=w.indexSize,w.packAsQuad?(this.packQuadAttributes(w,p,g,w._attributeStart,w._textureId),this.packQuadIndex(x,w._indexStart,w._attributeStart/this.vertexSize)):(this.packAttributes(w,p,g,w._attributeStart,w._textureId),this.packIndex(w,x,w._indexStart,w._attributeStart/this.vertexSize)),w._batch=l,M.push(w);continue}U._batchTick=Wh,(o.count>=z||k)&&(this._finishBatch(l,E,b-E,o,d,m,t,C,M),C="renderBatch",E=b,d=Y,m=w.topology,l=w1(),o=l.textures,o.clear(),M=[],++Wh),w._textureId=U._textureBindLocation=o.count,o.ids[U.uid]=o.count,o.textures[o.count++]=U,w._batch=l,M.push(w),b+=w.indexSize,w.packAsQuad?(this.packQuadAttributes(w,p,g,w._attributeStart,w._textureId),this.packQuadIndex(x,w._indexStart,w._attributeStart/this.vertexSize)):(this.packAttributes(w,p,g,w._attributeStart,w._textureId),this.packIndex(w,x,w._indexStart,w._attributeStart/this.vertexSize))}o.count>0&&(this._finishBatch(l,E,b-E,o,d,m,t,C,M),E=b,++Wh),this.elementStart=this.elementSize,this._batchIndexStart=E,this._batchIndexSize=b}_finishBatch(t,a,l,o,c,d,m,p,g){t.gpuBindGroup=null,t.bindGroup=null,t.action=p,t.batcher=this,t.textures=o,t.blendMode=c,t.topology=d,t.start=a,t.size=l,t.elements=g,++Wh,this.batches[this.batchIndex++]=t,m.add(t)}finish(t){this.break(t)}ensureAttributeBuffer(t){t*4<=this.attributeBuffer.size||this._resizeAttributeBuffer(t*4)}ensureIndexBuffer(t){t<=this.indexBuffer.length||this._resizeIndexBuffer(t)}_resizeAttributeBuffer(t){const a=Math.max(t,this.attributeBuffer.size*2),l=new M1(a);R1(this.attributeBuffer.rawBinaryData,l.rawBinaryData),this.attributeBuffer=l}_resizeIndexBuffer(t){const a=this.indexBuffer;let l=Math.max(t,a.length*1.5);l+=l%2;const o=l>65535?new Uint32Array(l):new Uint16Array(l);if(o.BYTES_PER_ELEMENT!==a.BYTES_PER_ELEMENT)for(let c=0;c<a.length;c++)o[c]=a[c];else R1(a.buffer,o.buffer);this.indexBuffer=o}packQuadIndex(t,a,l){t[a]=l+0,t[a+1]=l+1,t[a+2]=l+2,t[a+3]=l+0,t[a+4]=l+2,t[a+5]=l+3}packIndex(t,a,l,o){const c=t.indices,d=t.indexSize,m=t.indexOffset,p=t.attributeOffset;for(let g=0;g<d;g++)a[l++]=o+c[g+m]-p}destroy(t={}){var a;if(this.batches!==null){for(let l=0;l<this.batchIndex;l++)D1(this.batches[l]);this.batches=null,this.geometry.destroy(!0),this.geometry=null,t.shader&&((a=this.shader)==null||a.destroy(),this.shader=null);for(let l=0;l<this._elements.length;l++)this._elements[l]&&(this._elements[l]._batch=null);this._elements=null,this.indexBuffer=null,this.attributeBuffer.destroy(),this.attributeBuffer=null}}};r2.defaultOptions={maxTextures:null,attributesInitialSize:4,indicesInitialSize:6};let T4=r2;var ei=(n=>(n[n.MAP_READ=1]="MAP_READ",n[n.MAP_WRITE=2]="MAP_WRITE",n[n.COPY_SRC=4]="COPY_SRC",n[n.COPY_DST=8]="COPY_DST",n[n.INDEX=16]="INDEX",n[n.VERTEX=32]="VERTEX",n[n.UNIFORM=64]="UNIFORM",n[n.STORAGE=128]="STORAGE",n[n.INDIRECT=256]="INDIRECT",n[n.QUERY_RESOLVE=512]="QUERY_RESOLVE",n[n.STATIC=1024]="STATIC",n))(ei||{});class pd extends _s{constructor(t){let{data:a,size:l}=t;const{usage:o,label:c,shrinkToFit:d}=t;super(),this._gpuData=Object.create(null),this._gcLastUsed=-1,this.autoGarbageCollect=!0,this.uid=on("buffer"),this._resourceType="buffer",this._resourceId=on("resource"),this._touched=0,this._updateID=1,this._dataInt32=null,this.shrinkToFit=!0,this.destroyed=!1,a instanceof Array&&(a=new Float32Array(a)),this._data=a,l??(l=a==null?void 0:a.byteLength);const m=!!a;this.descriptor={size:l,usage:o,mappedAtCreation:m,label:c},this.shrinkToFit=d??!0}get data(){return this._data}set data(t){this.setDataWithSize(t,t.length,!0)}get dataInt32(){return this._dataInt32||(this._dataInt32=new Int32Array(this.data.buffer)),this._dataInt32}get static(){return!!(this.descriptor.usage&ei.STATIC)}set static(t){t?this.descriptor.usage|=ei.STATIC:this.descriptor.usage&=~ei.STATIC}setDataWithSize(t,a,l){if(this._updateID++,this._updateSize=a*t.BYTES_PER_ELEMENT,this._data===t){l&&this.emit("update",this);return}const o=this._data;if(this._data=t,this._dataInt32=null,!o||o.length!==t.length){!this.shrinkToFit&&o&&t.byteLength<o.byteLength?l&&this.emit("update",this):(this.descriptor.size=t.byteLength,this._resourceId=on("resource"),this.emit("change",this));return}l&&this.emit("update",this)}update(t){this._updateSize=t??this._updateSize,this._updateID++,this.emit("update",this)}unload(){var t;this.emit("unload",this);for(const a in this._gpuData)(t=this._gpuData[a])==null||t.destroy();this._gpuData=Object.create(null)}destroy(){this.destroyed=!0,this.unload(),this.emit("destroy",this),this.emit("change",this),this._data=null,this.descriptor=null,this.removeAllListeners()}}function o2(n,t){if(!(n instanceof pd)){let a=t?ei.INDEX:ei.VERTEX;n instanceof Array&&(t?(n=new Uint32Array(n),a=ei.INDEX|ei.COPY_DST):(n=new Float32Array(n),a=ei.VERTEX|ei.COPY_DST)),n=new pd({data:n,label:t?"index-mesh-buffer":"vertex-mesh-buffer",usage:a})}return n}function E4(n,t,a){const l=n.getAttribute(t);if(!l)return a.minX=0,a.minY=0,a.maxX=0,a.maxY=0,a;const o=l.buffer.data;let c=1/0,d=1/0,m=-1/0,p=-1/0;const g=o.BYTES_PER_ELEMENT,x=(l.offset||0)/g,b=(l.stride||8)/g;for(let E=x;E<o.length;E+=b){const C=o[E],M=o[E+1];C>m&&(m=C),M>p&&(p=M),C<c&&(c=C),M<d&&(d=M)}return a.minX=c,a.minY=d,a.maxX=m,a.maxY=p,a}function C4(n){return(n instanceof pd||Array.isArray(n)||n.BYTES_PER_ELEMENT)&&(n={buffer:n}),n.buffer=o2(n.buffer,!1),n}class A4 extends _s{constructor(t={}){super(),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=on("geometry"),this._layoutKey=0,this.instanceCount=1,this._bounds=new Ii,this._boundsDirty=!0;const{attributes:a,indexBuffer:l,topology:o}=t;if(this.buffers=[],this.attributes={},a)for(const c in a)this.addAttribute(c,a[c]);this.instanceCount=t.instanceCount??1,l&&this.addIndex(l),this.topology=o||"triangle-list"}onBufferUpdate(){this._boundsDirty=!0,this.emit("update",this)}getAttribute(t){return this.attributes[t]}getIndex(){return this.indexBuffer}getBuffer(t){return this.getAttribute(t).buffer}getSize(){for(const t in this.attributes){const a=this.attributes[t];return a.buffer.data.length/(a.stride/4||a.size)}return 0}addAttribute(t,a){const l=C4(a);this.buffers.indexOf(l.buffer)===-1&&(this.buffers.push(l.buffer),l.buffer.on("update",this.onBufferUpdate,this),l.buffer.on("change",this.onBufferUpdate,this)),this.attributes[t]=l}addIndex(t){this.indexBuffer=o2(t,!0),this.buffers.push(this.indexBuffer)}get bounds(){return this._boundsDirty?(this._boundsDirty=!1,E4(this,"aPosition",this._bounds)):this._bounds}unload(){var t;this.emit("unload",this);for(const a in this._gpuData)(t=this._gpuData[a])==null||t.destroy();this._gpuData=Object.create(null)}destroy(t=!1){var a;this.emit("destroy",this),this.removeAllListeners(),t&&this.buffers.forEach(l=>l.destroy()),this.unload(),(a=this.indexBuffer)==null||a.destroy(),this.attributes=null,this.buffers=null,this.indexBuffer=null,this._bounds=null}}const M4=new Float32Array(1),R4=new Uint32Array(1);class z4 extends A4{constructor(){const a=new pd({data:M4,label:"attribute-batch-buffer",usage:ei.VERTEX|ei.COPY_DST,shrinkToFit:!1}),l=new pd({data:R4,label:"index-batch-buffer",usage:ei.INDEX|ei.COPY_DST,shrinkToFit:!1}),o=24;super({attributes:{aPosition:{buffer:a,format:"float32x2",stride:o,offset:0},aUV:{buffer:a,format:"float32x2",stride:o,offset:8},aColor:{buffer:a,format:"unorm8x4",stride:o,offset:16},aTextureIdAndRound:{buffer:a,format:"uint16x2",stride:o,offset:20}},indexBuffer:l})}}function O1(n,t,a){if(n)for(const l in n){const o=l.toLocaleLowerCase(),c=t[o];if(c){let d=n[l];l==="header"&&(d=d.replace(/@in\s+[^;]+;\s*/g,"").replace(/@out\s+[^;]+;\s*/g,"")),a&&c.push(`//----${a}----//`),c.push(d)}else Ya(`${l} placement hook does not exist in shader`)}}const w4=/\{\{(.*?)\}\}/g;function N1(n){var l;const t={};return(((l=n.match(w4))==null?void 0:l.map(o=>o.replace(/[{()}]/g,"")))??[]).forEach(o=>{t[o]=[]}),t}function B1(n,t){let a;const l=/@in\s+([^;]+);/g;for(;(a=l.exec(n))!==null;)t.push(a[1])}function U1(n,t,a=!1){const l=[];B1(t,l),n.forEach(m=>{m.header&&B1(m.header,l)});const o=l;a&&o.sort();const c=o.map((m,p)=>` @location(${p}) ${m},`).join(`
85
- `);let d=t.replace(/@in\s+[^;]+;\s*/g,"");return d=d.replace("{{in}}",`
86
- ${c}
87
- `),d}function H1(n,t){let a;const l=/@out\s+([^;]+);/g;for(;(a=l.exec(n))!==null;)t.push(a[1])}function D4(n){const a=/\b(\w+)\s*:/g.exec(n);return a?a[1]:""}function O4(n){const t=/@.*?\s+/g;return n.replace(t,"")}function N4(n,t){const a=[];H1(t,a),n.forEach(p=>{p.header&&H1(p.header,a)});let l=0;const o=a.sort().map(p=>p.indexOf("builtin")>-1?p:`@location(${l++}) ${p}`).join(`,
88
- `),c=a.sort().map(p=>` var ${O4(p)};`).join(`
89
- `),d=`return VSOutput(
90
- ${a.sort().map(p=>` ${D4(p)}`).join(`,
91
- `)});`;let m=t.replace(/@out\s+[^;]+;\s*/g,"");return m=m.replace("{{struct}}",`
92
- ${o}
93
- `),m=m.replace("{{start}}",`
94
- ${c}
95
- `),m=m.replace("{{return}}",`
96
- ${d}
97
- `),m}function j1(n,t){let a=n;for(const l in t){const o=t[l];o.join(`
98
- `).length?a=a.replace(`{{${l}}}`,`//-----${l} START-----//
99
- ${o.join(`
100
- `)}
101
- //----${l} FINISH----//`):a=a.replace(`{{${l}}}`,"")}return a}const lu=Object.create(null),fy=new Map;let B4=0;function U4({template:n,bits:t}){const a=c2(n,t);if(lu[a])return lu[a];const{vertex:l,fragment:o}=j4(n,t);return lu[a]=f2(l,o,t),lu[a]}function H4({template:n,bits:t}){const a=c2(n,t);return lu[a]||(lu[a]=f2(n.vertex,n.fragment,t)),lu[a]}function j4(n,t){const a=t.map(d=>d.vertex).filter(d=>!!d),l=t.map(d=>d.fragment).filter(d=>!!d);let o=U1(a,n.vertex,!0);o=N4(a,o);const c=U1(l,n.fragment,!0);return{vertex:o,fragment:c}}function c2(n,t){return t.map(a=>(fy.has(a)||fy.set(a,B4++),fy.get(a))).sort((a,l)=>a-l).join("-")+n.vertex+n.fragment}function f2(n,t,a){const l=N1(n),o=N1(t);return a.forEach(c=>{O1(c.vertex,l,c.name),O1(c.fragment,o,c.name)}),{vertex:j1(n,l),fragment:j1(t,o)}}const G4=`
102
- @in aPosition: vec2<f32>;
103
- @in aUV: vec2<f32>;
104
-
105
- @out @builtin(position) vPosition: vec4<f32>;
106
- @out vUV : vec2<f32>;
107
- @out vColor : vec4<f32>;
108
-
109
- {{header}}
110
-
111
- struct VSOutput {
112
- {{struct}}
113
- };
114
-
115
- @vertex
116
- fn main( {{in}} ) -> VSOutput {
117
-
118
- var worldTransformMatrix = globalUniforms.uWorldTransformMatrix;
119
- var modelMatrix = mat3x3<f32>(
120
- 1.0, 0.0, 0.0,
121
- 0.0, 1.0, 0.0,
122
- 0.0, 0.0, 1.0
123
- );
124
- var position = aPosition;
125
- var uv = aUV;
126
-
127
- {{start}}
128
-
129
- vColor = vec4<f32>(1., 1., 1., 1.);
130
-
131
- {{main}}
132
-
133
- vUV = uv;
134
-
135
- var modelViewProjectionMatrix = globalUniforms.uProjectionMatrix * worldTransformMatrix * modelMatrix;
136
-
137
- vPosition = vec4<f32>((modelViewProjectionMatrix * vec3<f32>(position, 1.0)).xy, 0.0, 1.0);
138
-
139
- vColor *= globalUniforms.uWorldColorAlpha;
140
-
141
- {{end}}
142
-
143
- {{return}}
144
- };
145
- `,Y4=`
146
- @in vUV : vec2<f32>;
147
- @in vColor : vec4<f32>;
148
-
149
- {{header}}
150
-
151
- @fragment
152
- fn main(
153
- {{in}}
154
- ) -> @location(0) vec4<f32> {
155
-
156
- {{start}}
157
-
158
- var outColor:vec4<f32>;
159
-
160
- {{main}}
161
-
162
- var finalColor:vec4<f32> = outColor * vColor;
163
-
164
- {{end}}
165
-
166
- return finalColor;
167
- };
168
- `,q4=`
169
- in vec2 aPosition;
170
- in vec2 aUV;
171
-
172
- out vec4 vColor;
173
- out vec2 vUV;
174
-
175
- {{header}}
176
-
177
- void main(void){
178
-
179
- mat3 worldTransformMatrix = uWorldTransformMatrix;
180
- mat3 modelMatrix = mat3(
181
- 1.0, 0.0, 0.0,
182
- 0.0, 1.0, 0.0,
183
- 0.0, 0.0, 1.0
184
- );
185
- vec2 position = aPosition;
186
- vec2 uv = aUV;
187
-
188
- {{start}}
189
-
190
- vColor = vec4(1.);
191
-
192
- {{main}}
193
-
194
- vUV = uv;
195
-
196
- mat3 modelViewProjectionMatrix = uProjectionMatrix * worldTransformMatrix * modelMatrix;
197
-
198
- gl_Position = vec4((modelViewProjectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
199
-
200
- vColor *= uWorldColorAlpha;
201
-
202
- {{end}}
203
- }
204
- `,L4=`
205
-
206
- in vec4 vColor;
207
- in vec2 vUV;
208
-
209
- out vec4 finalColor;
210
-
211
- {{header}}
212
-
213
- void main(void) {
214
-
215
- {{start}}
216
-
217
- vec4 outColor;
218
-
219
- {{main}}
220
-
221
- finalColor = outColor * vColor;
222
-
223
- {{end}}
224
- }
225
- `,X4={name:"global-uniforms-bit",vertex:{header:`
226
- struct GlobalUniforms {
227
- uProjectionMatrix:mat3x3<f32>,
228
- uWorldTransformMatrix:mat3x3<f32>,
229
- uWorldColorAlpha: vec4<f32>,
230
- uResolution: vec2<f32>,
231
- }
232
-
233
- @group(0) @binding(0) var<uniform> globalUniforms : GlobalUniforms;
234
- `}},V4={name:"global-uniforms-bit",vertex:{header:`
235
- uniform mat3 uProjectionMatrix;
236
- uniform mat3 uWorldTransformMatrix;
237
- uniform vec4 uWorldColorAlpha;
238
- uniform vec2 uResolution;
239
- `}};function k4({bits:n,name:t}){const a=U4({template:{fragment:Y4,vertex:G4},bits:[X4,...n]});return _d.from({name:t,vertex:{source:a.vertex,entryPoint:"main"},fragment:{source:a.fragment,entryPoint:"main"}})}function Q4({bits:n,name:t}){return new hg({name:t,...H4({template:{vertex:q4,fragment:L4},bits:[V4,...n]})})}const K4={name:"color-bit",vertex:{header:`
240
- @in aColor: vec4<f32>;
241
- `,main:`
242
- vColor *= vec4<f32>(aColor.rgb * aColor.a, aColor.a);
243
- `}},Z4={name:"color-bit",vertex:{header:`
244
- in vec4 aColor;
245
- `,main:`
246
- vColor *= vec4(aColor.rgb * aColor.a, aColor.a);
247
- `}},hy={};function J4(n){const t=[];if(n===1)t.push("@group(1) @binding(0) var textureSource1: texture_2d<f32>;"),t.push("@group(1) @binding(1) var textureSampler1: sampler;");else{let a=0;for(let l=0;l<n;l++)t.push(`@group(1) @binding(${a++}) var textureSource${l+1}: texture_2d<f32>;`),t.push(`@group(1) @binding(${a++}) var textureSampler${l+1}: sampler;`)}return t.join(`
248
- `)}function F4(n){const t=[];if(n===1)t.push("outColor = textureSampleGrad(textureSource1, textureSampler1, vUV, uvDx, uvDy);");else{t.push("switch vTextureId {");for(let a=0;a<n;a++)a===n-1?t.push(" default:{"):t.push(` case ${a}:{`),t.push(` outColor = textureSampleGrad(textureSource${a+1}, textureSampler${a+1}, vUV, uvDx, uvDy);`),t.push(" break;}");t.push("}")}return t.join(`
249
- `)}function W4(n){return hy[n]||(hy[n]={name:"texture-batch-bit",vertex:{header:`
250
- @in aTextureIdAndRound: vec2<u32>;
251
- @out @interpolate(flat) vTextureId : u32;
252
- `,main:`
253
- vTextureId = aTextureIdAndRound.y;
254
- `,end:`
255
- if(aTextureIdAndRound.x == 1)
256
- {
257
- vPosition = vec4<f32>(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
258
- }
259
- `},fragment:{header:`
260
- @in @interpolate(flat) vTextureId: u32;
261
-
262
- ${J4(n)}
263
- `,main:`
264
- var uvDx = dpdx(vUV);
265
- var uvDy = dpdy(vUV);
266
-
267
- ${F4(n)}
268
- `}}),hy[n]}const dy={};function P4(n){const t=[];for(let a=0;a<n;a++)a>0&&t.push("else"),a<n-1&&t.push(`if(vTextureId < ${a}.5)`),t.push("{"),t.push(` outColor = texture(uTextures[${a}], vUV);`),t.push("}");return t.join(`
269
- `)}function I4(n){return dy[n]||(dy[n]={name:"texture-batch-bit",vertex:{header:`
270
- in vec2 aTextureIdAndRound;
271
- out float vTextureId;
272
-
273
- `,main:`
274
- vTextureId = aTextureIdAndRound.y;
275
- `,end:`
276
- if(aTextureIdAndRound.x == 1.)
277
- {
278
- gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
279
- }
280
- `},fragment:{header:`
281
- in float vTextureId;
282
-
283
- uniform sampler2D uTextures[${n}];
284
-
285
- `,main:`
286
-
287
- ${P4(n)}
288
- `}}),dy[n]}const $4={name:"round-pixels-bit",vertex:{header:`
289
- fn roundPixels(position: vec2<f32>, targetSize: vec2<f32>) -> vec2<f32>
290
- {
291
- return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
292
- }
293
- `}},tC={name:"round-pixels-bit",vertex:{header:`
294
- vec2 roundPixels(vec2 position, vec2 targetSize)
295
- {
296
- return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
297
- }
298
- `}},G1={};function eC(n){let t=G1[n];if(t)return t;const a=new Int32Array(n);for(let l=0;l<n;l++)a[l]=l;return t=G1[n]=new k_({uTextures:{value:a,type:"i32",size:n}},{isStatic:!0}),t}class Y1 extends kp{constructor(t){const a=Q4({name:"batch",bits:[Z4,I4(t),tC]}),l=k4({name:"batch",bits:[K4,W4(t),$4]});super({glProgram:a,gpuProgram:l,resources:{batchSamplers:eC(t)}}),this.maxTextures=t}}let Ph=null;const h2=class d2 extends T4{constructor(t){super(t),this.geometry=new z4,this.name=d2.extension.name,this.vertexSize=6,Ph??(Ph=new Y1(t.maxTextures)),this.shader=Ph}packAttributes(t,a,l,o,c){const d=c<<16|t.roundPixels&65535,m=t.transform,p=m.a,g=m.b,x=m.c,b=m.d,E=m.tx,C=m.ty,{positions:M,uvs:z}=t,R=t.color,w=t.attributeOffset,O=w+t.attributeSize;for(let U=w;U<O;U++){const Y=U*2,k=M[Y],V=M[Y+1];a[o++]=p*k+x*V+E,a[o++]=b*V+g*k+C,a[o++]=z[Y],a[o++]=z[Y+1],l[o++]=R,l[o++]=d}}packQuadAttributes(t,a,l,o,c){const d=t.texture,m=t.transform,p=m.a,g=m.b,x=m.c,b=m.d,E=m.tx,C=m.ty,M=t.bounds,z=M.maxX,R=M.minX,w=M.maxY,O=M.minY,U=d.uvs,Y=t.color,k=c<<16|t.roundPixels&65535;a[o+0]=p*R+x*O+E,a[o+1]=b*O+g*R+C,a[o+2]=U.x0,a[o+3]=U.y0,l[o+4]=Y,l[o+5]=k,a[o+6]=p*z+x*O+E,a[o+7]=b*O+g*z+C,a[o+8]=U.x1,a[o+9]=U.y1,l[o+10]=Y,l[o+11]=k,a[o+12]=p*z+x*w+E,a[o+13]=b*w+g*z+C,a[o+14]=U.x2,a[o+15]=U.y2,l[o+16]=Y,l[o+17]=k,a[o+18]=p*R+x*w+E,a[o+19]=b*w+g*R+C,a[o+20]=U.x3,a[o+21]=U.y3,l[o+22]=Y,l[o+23]=k}_updateMaxTextures(t){this.shader.maxTextures!==t&&(Ph=new Y1(t),this.shader=Ph)}destroy(){this.shader=null,super.destroy()}};h2.extension={type:[Wt.Batcher],name:"default"};let nC=h2;class Sd{constructor(t){this.items=Object.create(null);const{renderer:a,type:l,onUnload:o,priority:c,name:d}=t;this._renderer=a,a.gc.addResourceHash(this,"items",l,c??0),this._onUnload=o,this.name=d}add(t){return this.items[t.uid]?!1:(this.items[t.uid]=t,t.once("unload",this.remove,this),t._gcLastUsed=this._renderer.gc.now,!0)}remove(t,...a){var o;if(!this.items[t.uid])return;const l=t._gpuData[this._renderer.uid];l&&((o=this._onUnload)==null||o.call(this,t,...a),l.destroy(),t._gpuData[this._renderer.uid]=null,this.items[t.uid]=null)}removeAll(...t){Object.values(this.items).forEach(a=>a&&this.remove(a,...t))}destroy(...t){this.removeAll(...t),this.items=Object.create(null),this._renderer=null,this._onUnload=null}}function aC(n,t,a,l,o,c,d,m=null){let p=0;a*=t,o*=c;const g=m.a,x=m.b,b=m.c,E=m.d,C=m.tx,M=m.ty;for(;p<d;){const z=n[a],R=n[a+1];l[o]=g*z+b*R+C,l[o+1]=x*z+E*R+M,o+=c,a+=t,p++}}function iC(n,t,a,l){let o=0;for(t*=a;o<l;)n[t]=0,n[t+1]=0,t+=a,o++}function m2(n,t,a,l,o){const c=t.a,d=t.b,m=t.c,p=t.d,g=t.tx,x=t.ty;a||(a=0),l||(l=2),o||(o=n.length/l-a);let b=a*l;for(let E=0;E<o;E++){const C=n[b],M=n[b+1];n[b]=c*C+m*M+g,n[b+1]=d*C+p*M+x,b+=l}}const lC=new le;class vg{constructor(){this.packAsQuad=!1,this.batcherName="default",this.topology="triangle-list",this.applyTransform=!0,this.roundPixels=0,this._batcher=null,this._batch=null}get uvs(){return this.geometryData.uvs}get positions(){return this.geometryData.vertices}get indices(){return this.geometryData.indices}get blendMode(){return this.renderable&&this.applyTransform?this.renderable.groupBlendMode:"normal"}get color(){const t=this.baseColor,a=t>>16|t&65280|(t&255)<<16,l=this.renderable;return l?__(a,l.groupColor)+(this.alpha*l.groupAlpha*255<<24):a+(this.alpha*255<<24)}get transform(){var t;return((t=this.renderable)==null?void 0:t.groupTransform)||lC}copyTo(t){t.indexOffset=this.indexOffset,t.indexSize=this.indexSize,t.attributeOffset=this.attributeOffset,t.attributeSize=this.attributeSize,t.baseColor=this.baseColor,t.alpha=this.alpha,t.texture=this.texture,t.geometryData=this.geometryData,t.topology=this.topology}reset(){this.applyTransform=!0,this.renderable=null,this.topology="triangle-list"}destroy(){this.renderable=null,this.texture=null,this.geometryData=null,this._batcher=null,this._batch=null}}const yd={extension:{type:Wt.ShapeBuilder,name:"circle"},build(n,t){let a,l,o,c,d,m;if(n.type==="circle"){const Y=n;if(d=m=Y.radius,d<=0)return!1;a=Y.x,l=Y.y,o=c=0}else if(n.type==="ellipse"){const Y=n;if(d=Y.halfWidth,m=Y.halfHeight,d<=0||m<=0)return!1;a=Y.x,l=Y.y,o=c=0}else{const Y=n,k=Y.width/2,V=Y.height/2;a=Y.x+k,l=Y.y+V,d=m=Math.max(0,Math.min(Y.radius,Math.min(k,V))),o=k-d,c=V-m}if(o<0||c<0)return!1;const p=Math.ceil(2.3*Math.sqrt(d+m)),g=p*8+(o?4:0)+(c?4:0);if(g===0)return!1;if(p===0)return t[0]=t[6]=a+o,t[1]=t[3]=l+c,t[2]=t[4]=a-o,t[5]=t[7]=l-c,!0;let x=0,b=p*4+(o?2:0)+2,E=b,C=g,M=o+d,z=c,R=a+M,w=a-M,O=l+z;if(t[x++]=R,t[x++]=O,t[--b]=O,t[--b]=w,c){const Y=l-z;t[E++]=w,t[E++]=Y,t[--C]=Y,t[--C]=R}for(let Y=1;Y<p;Y++){const k=Math.PI/2*(Y/p),V=o+Math.cos(k)*d,Z=c+Math.sin(k)*m,F=a+V,q=a-V,$=l+Z,et=l-Z;t[x++]=F,t[x++]=$,t[--b]=$,t[--b]=q,t[E++]=q,t[E++]=et,t[--C]=et,t[--C]=F}M=o,z=c+m,R=a+M,w=a-M,O=l+z;const U=l-z;return t[x++]=R,t[x++]=O,t[--C]=U,t[--C]=R,o&&(t[x++]=w,t[x++]=O,t[--C]=U,t[--C]=w),!0},triangulate(n,t,a,l,o,c){if(n.length===0)return;let d=0,m=0;for(let x=0;x<n.length;x+=2)d+=n[x],m+=n[x+1];d/=n.length/2,m/=n.length/2;let p=l;t[p*a]=d,t[p*a+1]=m;const g=p++;for(let x=0;x<n.length;x+=2)t[p*a]=n[x],t[p*a+1]=n[x+1],x>0&&(o[c++]=p,o[c++]=g,o[c++]=p-1),p++;o[c++]=g+1,o[c++]=g,o[c++]=p-1}},sC={...yd,extension:{...yd.extension,name:"ellipse"}},rC={...yd,extension:{...yd.extension,name:"roundedRectangle"}},p2=1e-4,q1=1e-4;function uC(n){const t=n.length;if(t<6)return 1;let a=0;for(let l=0,o=n[t-2],c=n[t-1];l<t;l+=2){const d=n[l],m=n[l+1];a+=(d-o)*(m+c),o=d,c=m}return a<0?-1:1}function L1(n,t,a,l,o,c,d,m){const p=n-a*o,g=t-l*o,x=n+a*c,b=t+l*c;let E,C;d?(E=l,C=-a):(E=-l,C=a);const M=p+E,z=g+C,R=x+E,w=b+C;return m.push(M,z),m.push(R,w),2}function oo(n,t,a,l,o,c,d,m){const p=a-n,g=l-t;let x=Math.atan2(p,g),b=Math.atan2(o-n,c-t);m&&x<b?x+=Math.PI*2:!m&&x>b&&(b+=Math.PI*2);let E=x;const C=b-x,M=Math.abs(C),z=Math.sqrt(p*p+g*g),R=(15*M*Math.sqrt(z)/Math.PI>>0)+1,w=C/R;if(E+=w,m){d.push(n,t),d.push(a,l);for(let O=1,U=E;O<R;O++,U+=w)d.push(n,t),d.push(n+Math.sin(U)*z,t+Math.cos(U)*z);d.push(n,t),d.push(o,c)}else{d.push(a,l),d.push(n,t);for(let O=1,U=E;O<R;O++,U+=w)d.push(n+Math.sin(U)*z,t+Math.cos(U)*z),d.push(n,t);d.push(o,c),d.push(n,t)}return R*2}function oC(n,t,a,l,o,c){const d=p2;if(n.length===0)return;const m=t;let p=m.alignment;if(t.alignment!==.5){let rt=uC(n);p=(p-.5)*rt+.5}const g=new ya(n[0],n[1]),x=new ya(n[n.length-2],n[n.length-1]),b=l,E=Math.abs(g.x-x.x)<d&&Math.abs(g.y-x.y)<d;if(b){n=n.slice(),E&&(n.pop(),n.pop(),x.set(n[n.length-2],n[n.length-1]));const rt=(g.x+x.x)*.5,gt=(x.y+g.y)*.5;n.unshift(rt,gt),n.push(rt,gt)}const C=o,M=n.length/2;let z=n.length;const R=C.length/2,w=m.width/2,O=w*w,U=m.miterLimit*m.miterLimit;let Y=n[0],k=n[1],V=n[2],Z=n[3],F=0,q=0,$=-(k-Z),et=Y-V,ct=0,vt=0,dt=Math.sqrt($*$+et*et);$/=dt,et/=dt,$*=w,et*=w;const St=p,j=(1-St)*2,Q=St*2;b||(m.cap==="round"?z+=oo(Y-$*(j-Q)*.5,k-et*(j-Q)*.5,Y-$*j,k-et*j,Y+$*Q,k+et*Q,C,!0)+2:m.cap==="square"&&(z+=L1(Y,k,$,et,j,Q,!0,C))),C.push(Y-$*j,k-et*j),C.push(Y+$*Q,k+et*Q);for(let rt=1;rt<M-1;++rt){Y=n[(rt-1)*2],k=n[(rt-1)*2+1],V=n[rt*2],Z=n[rt*2+1],F=n[(rt+1)*2],q=n[(rt+1)*2+1],$=-(k-Z),et=Y-V,dt=Math.sqrt($*$+et*et),$/=dt,et/=dt,$*=w,et*=w,ct=-(Z-q),vt=V-F,dt=Math.sqrt(ct*ct+vt*vt),ct/=dt,vt/=dt,ct*=w,vt*=w;const gt=V-Y,B=k-Z,J=V-F,tt=q-Z,pt=gt*J+B*tt,bt=B*J-tt*gt,At=bt<0;if(Math.abs(bt)<.001*Math.abs(pt)){C.push(V-$*j,Z-et*j),C.push(V+$*Q,Z+et*Q),pt>=0&&(m.join==="round"?z+=oo(V,Z,V-$*j,Z-et*j,V-ct*j,Z-vt*j,C,!1)+4:z+=2,C.push(V-ct*Q,Z-vt*Q),C.push(V+ct*j,Z+vt*j));continue}const Ot=(-$+Y)*(-et+Z)-(-$+V)*(-et+k),fe=(-ct+F)*(-vt+Z)-(-ct+V)*(-vt+q),ce=(gt*fe-J*Ot)/bt,ga=(tt*Ot-B*fe)/bt,qa=(ce-V)*(ce-V)+(ga-Z)*(ga-Z),Xn=V+(ce-V)*j,ta=Z+(ga-Z)*j,pn=V-(ce-V)*Q,ea=Z-(ga-Z)*Q,Ss=Math.min(gt*gt+B*B,J*J+tt*tt),ii=At?j:Q,ru=Ss+ii*ii*O;qa<=ru?m.join==="bevel"||qa/O>U?(At?(C.push(Xn,ta),C.push(V+$*Q,Z+et*Q),C.push(Xn,ta),C.push(V+ct*Q,Z+vt*Q)):(C.push(V-$*j,Z-et*j),C.push(pn,ea),C.push(V-ct*j,Z-vt*j),C.push(pn,ea)),z+=2):m.join==="round"?At?(C.push(Xn,ta),C.push(V+$*Q,Z+et*Q),z+=oo(V,Z,V+$*Q,Z+et*Q,V+ct*Q,Z+vt*Q,C,!0)+4,C.push(Xn,ta),C.push(V+ct*Q,Z+vt*Q)):(C.push(V-$*j,Z-et*j),C.push(pn,ea),z+=oo(V,Z,V-$*j,Z-et*j,V-ct*j,Z-vt*j,C,!1)+4,C.push(V-ct*j,Z-vt*j),C.push(pn,ea)):(C.push(Xn,ta),C.push(pn,ea)):(C.push(V-$*j,Z-et*j),C.push(V+$*Q,Z+et*Q),m.join==="round"?At?z+=oo(V,Z,V+$*Q,Z+et*Q,V+ct*Q,Z+vt*Q,C,!0)+2:z+=oo(V,Z,V-$*j,Z-et*j,V-ct*j,Z-vt*j,C,!1)+2:m.join==="miter"&&qa/O<=U&&(At?(C.push(pn,ea),C.push(pn,ea)):(C.push(Xn,ta),C.push(Xn,ta)),z+=2),C.push(V-ct*j,Z-vt*j),C.push(V+ct*Q,Z+vt*Q),z+=2)}Y=n[(M-2)*2],k=n[(M-2)*2+1],V=n[(M-1)*2],Z=n[(M-1)*2+1],$=-(k-Z),et=Y-V,dt=Math.sqrt($*$+et*et),$/=dt,et/=dt,$*=w,et*=w,C.push(V-$*j,Z-et*j),C.push(V+$*Q,Z+et*Q),b||(m.cap==="round"?z+=oo(V-$*(j-Q)*.5,Z-et*(j-Q)*.5,V-$*j,Z-et*j,V+$*Q,Z+et*Q,C,!1)+2:m.cap==="square"&&(z+=L1(V,Z,$,et,j,Q,!1,C)));const ot=q1*q1;for(let rt=R;rt<z+R-2;++rt)Y=C[rt*2],k=C[rt*2+1],V=C[(rt+1)*2],Z=C[(rt+1)*2+1],F=C[(rt+2)*2],q=C[(rt+2)*2+1],!(Math.abs(Y*(Z-q)+V*(q-k)+F*(k-Z))<ot)&&c.push(rt,rt+1,rt+2)}function cC(n,t,a,l){const o=p2;if(n.length===0)return;const c=n[0],d=n[1],m=n[n.length-2],p=n[n.length-1],g=t||Math.abs(c-m)<o&&Math.abs(d-p)<o,x=a,b=n.length/2,E=x.length/2;for(let C=0;C<b;C++)x.push(n[C*2]),x.push(n[C*2+1]);for(let C=0;C<b-1;C++)l.push(E+C,E+C+1);g&&l.push(E+b-1,E)}function y2(n,t,a,l,o,c,d){const m=$E(n,t,2);if(!m)return;for(let g=0;g<m.length;g+=3)c[d++]=m[g]+o,c[d++]=m[g+1]+o,c[d++]=m[g+2]+o;let p=o*l;for(let g=0;g<n.length;g+=2)a[p]=n[g],a[p+1]=n[g+1],p+=l}const fC=[],hC={extension:{type:Wt.ShapeBuilder,name:"polygon"},build(n,t){for(let a=0;a<n.points.length;a++)t[a]=n.points[a];return!0},triangulate(n,t,a,l,o,c){y2(n,fC,t,a,l,o,c)}},dC={extension:{type:Wt.ShapeBuilder,name:"rectangle"},build(n,t){const a=n,l=a.x,o=a.y,c=a.width,d=a.height;return c>0&&d>0?(t[0]=l,t[1]=o,t[2]=l+c,t[3]=o,t[4]=l+c,t[5]=o+d,t[6]=l,t[7]=o+d,!0):!1},triangulate(n,t,a,l,o,c){let d=0;l*=a,t[l+d]=n[0],t[l+d+1]=n[1],d+=a,t[l+d]=n[2],t[l+d+1]=n[3],d+=a,t[l+d]=n[6],t[l+d+1]=n[7],d+=a,t[l+d]=n[4],t[l+d+1]=n[5],d+=a;const m=l/a;o[c++]=m,o[c++]=m+1,o[c++]=m+2,o[c++]=m+1,o[c++]=m+3,o[c++]=m+2}},mC={extension:{type:Wt.ShapeBuilder,name:"triangle"},build(n,t){return t[0]=n.x,t[1]=n.y,t[2]=n.x2,t[3]=n.y2,t[4]=n.x3,t[5]=n.y3,!0},triangulate(n,t,a,l,o,c){let d=0;l*=a,t[l+d]=n[0],t[l+d+1]=n[1],d+=a,t[l+d]=n[2],t[l+d+1]=n[3],d+=a,t[l+d]=n[4],t[l+d+1]=n[5];const m=l/a;o[c++]=m,o[c++]=m+1,o[c++]=m+2}},X1=[{offset:0,color:"white"},{offset:1,color:"black"}],xg=class ky{constructor(...t){this.uid=on("fillGradient"),this._tick=0,this.type="linear",this.colorStops=[];let a=pC(t);a={...a.type==="radial"?ky.defaultRadialOptions:ky.defaultLinearOptions,...o_(a)},this._textureSize=a.textureSize,this._wrapMode=a.wrapMode,a.type==="radial"?(this.center=a.center,this.outerCenter=a.outerCenter??this.center,this.innerRadius=a.innerRadius,this.outerRadius=a.outerRadius,this.scale=a.scale,this.rotation=a.rotation):(this.start=a.start,this.end=a.end),this.textureSpace=a.textureSpace,this.type=a.type,a.colorStops.forEach(o=>{this.addColorStop(o.offset,o.color)})}addColorStop(t,a){return this.colorStops.push({offset:t,color:zn.shared.setValue(a).toHexa()}),this}buildLinearGradient(){if(this.texture)return;let{x:t,y:a}=this.start,{x:l,y:o}=this.end,c=l-t,d=o-a;const m=c<0||d<0;if(this._wrapMode==="clamp-to-edge"){if(c<0){const R=t;t=l,l=R,c*=-1}if(d<0){const R=a;a=o,o=R,d*=-1}}const p=this.colorStops.length?this.colorStops:X1,g=this._textureSize,{canvas:x,context:b}=k1(g,1),E=m?b.createLinearGradient(this._textureSize,0,0,0):b.createLinearGradient(0,0,this._textureSize,0);V1(E,p),b.fillStyle=E,b.fillRect(0,0,g,1),this.texture=new ze({source:new zp({resource:x,addressMode:this._wrapMode})});const C=Math.sqrt(c*c+d*d),M=Math.atan2(d,c),z=new le;z.scale(C/g,1),z.rotate(M),z.translate(t,a),this.textureSpace==="local"&&z.scale(g,g),this.transform=z}buildGradient(){this.texture||this._tick++,this.type==="linear"?this.buildLinearGradient():this.buildRadialGradient()}buildRadialGradient(){if(this.texture)return;const t=this.colorStops.length?this.colorStops:X1,a=this._textureSize,{canvas:l,context:o}=k1(a,a),{x:c,y:d}=this.center,{x:m,y:p}=this.outerCenter,g=this.innerRadius,x=this.outerRadius,b=m-x,E=p-x,C=a/(x*2),M=(c-b)*C,z=(d-E)*C,R=o.createRadialGradient(M,z,g*C,(m-b)*C,(p-E)*C,x*C);V1(R,t),o.fillStyle=t[t.length-1].color,o.fillRect(0,0,a,a),o.fillStyle=R,o.translate(M,z),o.rotate(this.rotation),o.scale(1,this.scale),o.translate(-M,-z),o.fillRect(0,0,a,a),this.texture=new ze({source:new zp({resource:l,addressMode:this._wrapMode})});const w=new le;w.scale(1/C,1/C),w.translate(b,E),this.textureSpace==="local"&&w.scale(a,a),this.transform=w}destroy(){var t;(t=this.texture)==null||t.destroy(!0),this.texture=null,this.transform=null,this.colorStops=[],this.start=null,this.end=null,this.center=null,this.outerCenter=null}get styleKey(){return`fill-gradient-${this.uid}-${this._tick}`}};xg.defaultLinearOptions={start:{x:0,y:0},end:{x:0,y:1},colorStops:[],textureSpace:"local",type:"linear",textureSize:256,wrapMode:"clamp-to-edge"};xg.defaultRadialOptions={center:{x:.5,y:.5},innerRadius:0,outerRadius:.5,colorStops:[],scale:1,textureSpace:"local",type:"radial",textureSize:256,wrapMode:"clamp-to-edge"};let cr=xg;function V1(n,t){for(let a=0;a<t.length;a++){const l=t[a];n.addColorStop(l.offset,l.color)}}function k1(n,t){const a=bi.get().createCanvas(n,t),l=a.getContext("2d");return{canvas:a,context:l}}function pC(n){let t=n[0]??{};return(typeof t=="number"||n[1])&&(de("8.5.2","use options object instead"),t={type:"linear",start:{x:n[0],y:n[1]},end:{x:n[2],y:n[3]},textureSpace:n[4],textureSize:n[5]??cr.defaultLinearOptions.textureSize}),t}const yC=new le,gC=new mn;function vC(n,t,a,l){const o=t.matrix?n.copyFrom(t.matrix).invert():n.identity();if(t.textureSpace==="local"){const d=a.getBounds(gC);t.width&&d.pad(t.width);const{x:m,y:p}=d,g=1/d.width,x=1/d.height,b=-m*g,E=-p*x,C=o.a,M=o.b,z=o.c,R=o.d;o.a*=g,o.b*=g,o.c*=x,o.d*=x,o.tx=b*C+E*z+o.tx,o.ty=b*M+E*R+o.ty}else o.translate(t.texture.frame.x,t.texture.frame.y),o.scale(1/t.texture.source.width,1/t.texture.source.height);const c=t.texture.source.style;return!(t.fill instanceof cr)&&c.addressMode==="clamp-to-edge"&&(c.addressMode="repeat",c.update()),l&&o.append(yC.copyFrom(l).invert()),o}const Qp={};Ie.handleByMap(Wt.ShapeBuilder,Qp);Ie.add(dC,hC,mC,yd,sC,rC);const xC=new mn,_C=new le;function SC(n,t){const{geometryData:a,batches:l}=t;l.length=0,a.indices.length=0,a.vertices.length=0,a.uvs.length=0;for(let o=0;o<n.instructions.length;o++){const c=n.instructions[o];if(c.action==="texture")bC(c.data,l,a);else if(c.action==="fill"||c.action==="stroke"){const d=c.action==="stroke",m=c.data.path.shapePath,p=c.data.style,g=c.data.hole;d&&g&&Q1(g.shapePath,p,!0,l,a),g&&(m.shapePrimitives[m.shapePrimitives.length-1].holes=g.shapePath.shapePrimitives),Q1(m,p,d,l,a)}}}function bC(n,t,a){const l=[],o=Qp.rectangle,c=xC;c.x=n.dx,c.y=n.dy,c.width=n.dw,c.height=n.dh;const d=n.transform;if(!o.build(c,l))return;const{vertices:m,uvs:p,indices:g}=a,x=g.length,b=m.length/2;d&&m2(l,d),o.triangulate(l,m,2,b,g,x);const E=n.image,C=E.uvs;p.push(C.x0,C.y0,C.x1,C.y1,C.x3,C.y3,C.x2,C.y2);const M=ai.get(vg);M.indexOffset=x,M.indexSize=g.length-x,M.attributeOffset=b,M.attributeSize=m.length/2-b,M.baseColor=n.style,M.alpha=n.alpha,M.texture=E,M.geometryData=a,t.push(M)}function Q1(n,t,a,l,o){const{vertices:c,uvs:d,indices:m}=o;n.shapePrimitives.forEach(({shape:p,transform:g,holes:x})=>{const b=[],E=Qp[p.type];if(!E.build(p,b))return;const C=m.length,M=c.length/2;let z="triangle-list";if(g&&m2(b,g),a){const U=p.closePath??!0,Y=t;Y.pixelLine?(cC(b,U,c,m),z="line-list"):oC(b,Y,!1,U,c,m)}else if(x){const U=[],Y=b.slice();TC(x).forEach(V=>{U.push(Y.length/2),Y.push(...V)}),y2(Y,U,c,2,M,m,C)}else E.triangulate(b,c,2,M,m,C);const R=d.length/2,w=t.texture;if(w!==ze.WHITE){const U=vC(_C,t,p,g);aC(c,2,M,d,R,2,c.length/2-M,U)}else iC(d,R,2,c.length/2-M);const O=ai.get(vg);O.indexOffset=C,O.indexSize=m.length-C,O.attributeOffset=M,O.attributeSize=c.length/2-M,O.baseColor=t.color,O.alpha=t.alpha,O.texture=w,O.geometryData=o,O.topology=z,l.push(O)})}function TC(n){const t=[];for(let a=0;a<n.length;a++){const l=n[a].shape,o=[];Qp[l.type].build(l,o)&&t.push(o)}return t}class EC{constructor(){this.batches=[],this.geometryData={vertices:[],uvs:[],indices:[]}}reset(){this.batches&&this.batches.forEach(t=>{ai.return(t)}),this.graphicsData&&ai.return(this.graphicsData),this.isBatchable=!1,this.context=null,this.batches.length=0,this.geometryData.indices.length=0,this.geometryData.vertices.length=0,this.geometryData.uvs.length=0,this.graphicsData=null}destroy(){this.reset(),this.batches=null,this.geometryData=null}}class CC{constructor(){this.instructions=new og}init(t){const a=t.maxTextures;this.batcher?this.batcher._updateMaxTextures(a):this.batcher=new nC({maxTextures:a}),this.instructions.reset()}get geometry(){return de(S3,"GraphicsContextRenderData#geometry is deprecated, please use batcher.geometry instead."),this.batcher.geometry}destroy(){this.batcher.destroy(),this.instructions.destroy(),this.batcher=null,this.instructions=null}}const _g=class Qy{constructor(t){this._renderer=t,this._managedContexts=new Sd({renderer:t,type:"resource",name:"graphicsContext"})}init(t){Qy.defaultOptions.bezierSmoothness=(t==null?void 0:t.bezierSmoothness)??Qy.defaultOptions.bezierSmoothness}getContextRenderData(t){return t._gpuData[this._renderer.uid].graphicsData||this._initContextRenderData(t)}updateGpuContext(t){const a=!!t._gpuData[this._renderer.uid],l=t._gpuData[this._renderer.uid]||this._initContext(t);if(t.dirty||!a){a&&l.reset(),SC(t,l);const o=t.batchMode;t.customShader||o==="no-batch"?l.isBatchable=!1:o==="auto"?l.isBatchable=l.geometryData.vertices.length<400:l.isBatchable=!0,t.dirty=!1}return l}getGpuContext(t){return t._gpuData[this._renderer.uid]||this._initContext(t)}_initContextRenderData(t){const a=ai.get(CC,{maxTextures:this._renderer.limits.maxBatchableTextures}),l=t._gpuData[this._renderer.uid],{batches:o,geometryData:c}=l;l.graphicsData=a;const d=c.vertices.length,m=c.indices.length;for(let b=0;b<o.length;b++)o[b].applyTransform=!1;const p=a.batcher;p.ensureAttributeBuffer(d),p.ensureIndexBuffer(m),p.begin();for(let b=0;b<o.length;b++){const E=o[b];p.add(E)}p.finish(a.instructions);const g=p.geometry;g.indexBuffer.setDataWithSize(p.indexBuffer,p.indexSize,!0),g.buffers[0].setDataWithSize(p.attributeBuffer.float32View,p.attributeSize,!0);const x=p.batches;for(let b=0;b<x.length;b++){const E=x[b];E.bindGroup=d4(E.textures.textures,E.textures.count,this._renderer.limits.maxBatchableTextures)}return a}_initContext(t){const a=new EC;return a.context=t,t._gpuData[this._renderer.uid]=a,this._managedContexts.add(t),a}destroy(){this._managedContexts.destroy(),this._renderer=null}};_g.extension={type:[Wt.WebGLSystem,Wt.WebGPUSystem],name:"graphicsContext"};_g.defaultOptions={bezierSmoothness:.5};let Sg=_g;const AC=8,yp=11920929e-14,MC=1;function g2(n,t,a,l,o,c,d,m,p,g){const b=Math.min(.99,Math.max(0,g??Sg.defaultOptions.bezierSmoothness));let E=(MC-b)/1;return E*=E,RC(t,a,l,o,c,d,m,p,n,E),n}function RC(n,t,a,l,o,c,d,m,p,g){Ky(n,t,a,l,o,c,d,m,p,g,0),p.push(d,m)}function Ky(n,t,a,l,o,c,d,m,p,g,x){if(x>AC)return;const b=(n+a)/2,E=(t+l)/2,C=(a+o)/2,M=(l+c)/2,z=(o+d)/2,R=(c+m)/2,w=(b+C)/2,O=(E+M)/2,U=(C+z)/2,Y=(M+R)/2,k=(w+U)/2,V=(O+Y)/2;if(x>0){let Z=d-n,F=m-t;const q=Math.abs((a-d)*F-(l-m)*Z),$=Math.abs((o-d)*F-(c-m)*Z);if(q>yp&&$>yp){if((q+$)*(q+$)<=g*(Z*Z+F*F)){p.push(k,V);return}}else if(q>yp){if(q*q<=g*(Z*Z+F*F)){p.push(k,V);return}}else if($>yp){if($*$<=g*(Z*Z+F*F)){p.push(k,V);return}}else if(Z=k-(n+d)/2,F=V-(t+m)/2,Z*Z+F*F<=g){p.push(k,V);return}}Ky(n,t,b,E,w,O,k,V,p,g,x+1),Ky(k,V,U,Y,z,R,d,m,p,g,x+1)}const zC=8,wC=11920929e-14,DC=1;function OC(n,t,a,l,o,c,d,m){const g=Math.min(.99,Math.max(0,m??Sg.defaultOptions.bezierSmoothness));let x=(DC-g)/1;return x*=x,NC(t,a,l,o,c,d,n,x),n}function NC(n,t,a,l,o,c,d,m){Zy(d,n,t,a,l,o,c,m,0),d.push(o,c)}function Zy(n,t,a,l,o,c,d,m,p){if(p>zC)return;const g=(t+l)/2,x=(a+o)/2,b=(l+c)/2,E=(o+d)/2,C=(g+b)/2,M=(x+E)/2;let z=c-t,R=d-a;const w=Math.abs((l-c)*R-(o-d)*z);if(w>wC){if(w*w<=m*(z*z+R*R)){n.push(C,M);return}}else if(z=C-(t+c)/2,R=M-(a+d)/2,z*z+R*R<=m){n.push(C,M);return}Zy(n,t,a,g,x,C,M,m,p+1),Zy(n,C,M,b,E,c,d,m,p+1)}function v2(n,t,a,l,o,c,d,m){let p=Math.abs(o-c);(!d&&o>c||d&&c>o)&&(p=2*Math.PI-p),m||(m=Math.max(6,Math.floor(6*Math.pow(l,1/3)*(p/Math.PI)))),m=Math.max(m,3);let g=p/m,x=o;g*=d?-1:1;for(let b=0;b<m+1;b++){const E=Math.cos(x),C=Math.sin(x),M=t+E*l,z=a+C*l;n.push(M,z),x+=g}}function BC(n,t,a,l,o,c){const d=n[n.length-2],p=n[n.length-1]-a,g=d-t,x=o-a,b=l-t,E=Math.abs(p*b-g*x);if(E<1e-8||c===0){(n[n.length-2]!==t||n[n.length-1]!==a)&&n.push(t,a);return}const C=p*p+g*g,M=x*x+b*b,z=p*x+g*b,R=c*Math.sqrt(C)/E,w=c*Math.sqrt(M)/E,O=R*z/C,U=w*z/M,Y=R*b+w*g,k=R*x+w*p,V=g*(w+O),Z=p*(w+O),F=b*(R+U),q=x*(R+U),$=Math.atan2(Z-k,V-Y),et=Math.atan2(q-k,F-Y);v2(n,Y+t,k+a,c,$,et,g*x>b*p)}const od=Math.PI*2,my={centerX:0,centerY:0,ang1:0,ang2:0},py=({x:n,y:t},a,l,o,c,d,m,p)=>{n*=a,t*=l;const g=o*n-c*t,x=c*n+o*t;return p.x=g+d,p.y=x+m,p};function UC(n,t){const a=t===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(t/4),l=t===1.5707963267948966?.551915024494:a,o=Math.cos(n),c=Math.sin(n),d=Math.cos(n+t),m=Math.sin(n+t);return[{x:o-c*l,y:c+o*l},{x:d+m*l,y:m-d*l},{x:d,y:m}]}const K1=(n,t,a,l)=>{const o=n*l-t*a<0?-1:1;let c=n*a+t*l;return c>1&&(c=1),c<-1&&(c=-1),o*Math.acos(c)},HC=(n,t,a,l,o,c,d,m,p,g,x,b,E)=>{const C=Math.pow(o,2),M=Math.pow(c,2),z=Math.pow(x,2),R=Math.pow(b,2);let w=C*M-C*R-M*z;w<0&&(w=0),w/=C*R+M*z,w=Math.sqrt(w)*(d===m?-1:1);const O=w*o/c*b,U=w*-c/o*x,Y=g*O-p*U+(n+a)/2,k=p*O+g*U+(t+l)/2,V=(x-O)/o,Z=(b-U)/c,F=(-x-O)/o,q=(-b-U)/c,$=K1(1,0,V,Z);let et=K1(V,Z,F,q);m===0&&et>0&&(et-=od),m===1&&et<0&&(et+=od),E.centerX=Y,E.centerY=k,E.ang1=$,E.ang2=et};function jC(n,t,a,l,o,c,d,m=0,p=0,g=0){if(c===0||d===0)return;const x=Math.sin(m*od/360),b=Math.cos(m*od/360),E=b*(t-l)/2+x*(a-o)/2,C=-x*(t-l)/2+b*(a-o)/2;if(E===0&&C===0)return;c=Math.abs(c),d=Math.abs(d);const M=Math.pow(E,2)/Math.pow(c,2)+Math.pow(C,2)/Math.pow(d,2);M>1&&(c*=Math.sqrt(M),d*=Math.sqrt(M)),HC(t,a,l,o,c,d,p,g,x,b,E,C,my);let{ang1:z,ang2:R}=my;const{centerX:w,centerY:O}=my;let U=Math.abs(R)/(od/4);Math.abs(1-U)<1e-7&&(U=1);const Y=Math.max(Math.ceil(U),1);R/=Y;let k=n[n.length-2],V=n[n.length-1];const Z={x:0,y:0};for(let F=0;F<Y;F++){const q=UC(z,R),{x:$,y:et}=py(q[0],c,d,b,x,w,O,Z),{x:ct,y:vt}=py(q[1],c,d,b,x,w,O,Z),{x:dt,y:St}=py(q[2],c,d,b,x,w,O,Z);g2(n,k,V,$,et,ct,vt,dt,St),k=dt,V=St,z+=R}}function GC(n,t,a){const l=(d,m)=>{const p=m.x-d.x,g=m.y-d.y,x=Math.sqrt(p*p+g*g),b=p/x,E=g/x;return{len:x,nx:b,ny:E}},o=(d,m)=>{d===0?n.moveTo(m.x,m.y):n.lineTo(m.x,m.y)};let c=t[t.length-1];for(let d=0;d<t.length;d++){const m=t[d%t.length],p=m.radius??a;if(p<=0){o(d,m),c=m;continue}const g=t[(d+1)%t.length],x=l(m,c),b=l(m,g);if(x.len<1e-4||b.len<1e-4){o(d,m),c=m;continue}let E=Math.asin(x.nx*b.ny-x.ny*b.nx),C=1,M=!1;x.nx*b.nx-x.ny*-b.ny<0?E<0?E=Math.PI+E:(E=Math.PI-E,C=-1,M=!0):E>0&&(C=-1,M=!0);const z=E/2;let R,w=Math.abs(Math.cos(z)*p/Math.sin(z));w>Math.min(x.len/2,b.len/2)?(w=Math.min(x.len/2,b.len/2),R=Math.abs(w*Math.sin(z)/Math.cos(z))):R=p;const O=m.x+b.nx*w+-b.ny*R*C,U=m.y+b.ny*w+b.nx*R*C,Y=Math.atan2(x.ny,x.nx)+Math.PI/2*C,k=Math.atan2(b.ny,b.nx)-Math.PI/2*C;d===0&&n.moveTo(O+Math.cos(Y)*R,U+Math.sin(Y)*R),n.arc(O,U,R,Y,k,M),c=m}}function YC(n,t,a,l){const o=(m,p)=>Math.sqrt((m.x-p.x)**2+(m.y-p.y)**2),c=(m,p,g)=>({x:m.x+(p.x-m.x)*g,y:m.y+(p.y-m.y)*g}),d=t.length;for(let m=0;m<d;m++){const p=t[(m+1)%d],g=p.radius??a;if(g<=0){m===0?n.moveTo(p.x,p.y):n.lineTo(p.x,p.y);continue}const x=t[m],b=t[(m+2)%d],E=o(x,p);let C;if(E<1e-4)C=p;else{const R=Math.min(E/2,g);C=c(p,x,R/E)}const M=o(b,p);let z;if(M<1e-4)z=p;else{const R=Math.min(M/2,g);z=c(p,b,R/M)}m===0?n.moveTo(C.x,C.y):n.lineTo(C.x,C.y),n.quadraticCurveTo(p.x,p.y,z.x,z.y,l)}}const qC=new mn;class LC{constructor(t){this.shapePrimitives=[],this._currentPoly=null,this._bounds=new Ii,this._graphicsPath2D=t,this.signed=t.checkForHoles}moveTo(t,a){return this.startPoly(t,a),this}lineTo(t,a){this._ensurePoly();const l=this._currentPoly.points,o=l[l.length-2],c=l[l.length-1];return(o!==t||c!==a)&&l.push(t,a),this}arc(t,a,l,o,c,d){this._ensurePoly(!1);const m=this._currentPoly.points;return v2(m,t,a,l,o,c,d),this}arcTo(t,a,l,o,c){this._ensurePoly();const d=this._currentPoly.points;return BC(d,t,a,l,o,c),this}arcToSvg(t,a,l,o,c,d,m){const p=this._currentPoly.points;return jC(p,this._currentPoly.lastX,this._currentPoly.lastY,d,m,t,a,l,o,c),this}bezierCurveTo(t,a,l,o,c,d,m){this._ensurePoly();const p=this._currentPoly;return g2(this._currentPoly.points,p.lastX,p.lastY,t,a,l,o,c,d,m),this}quadraticCurveTo(t,a,l,o,c){this._ensurePoly();const d=this._currentPoly;return OC(this._currentPoly.points,d.lastX,d.lastY,t,a,l,o,c),this}closePath(){return this.endPoly(!0),this}addPath(t,a){this.endPoly(),a&&!a.isIdentity()&&(t=t.clone(!0),t.transform(a));const l=this.shapePrimitives,o=l.length;for(let c=0;c<t.instructions.length;c++){const d=t.instructions[c];this[d.action](...d.data)}if(t.checkForHoles&&l.length-o>1){let c=null;for(let d=o;d<l.length;d++){const m=l[d];if(m.shape.type==="polygon"){const p=m.shape,g=c==null?void 0:c.shape;g&&g.containsPolygon(p)?(c.holes||(c.holes=[]),c.holes.push(m),l.copyWithin(d,d+1),l.length--,d--):c=m}}}return this}finish(t=!1){this.endPoly(t)}rect(t,a,l,o,c){return this.drawShape(new mn(t,a,l,o),c),this}circle(t,a,l,o){return this.drawShape(new pg(t,a,l),o),this}poly(t,a,l){const o=new rd(t);return o.closePath=a,this.drawShape(o,l),this}regularPoly(t,a,l,o,c=0,d){o=Math.max(o|0,3);const m=-1*Math.PI/2+c,p=Math.PI*2/o,g=[];for(let x=0;x<o;x++){const b=m-x*p;g.push(t+l*Math.cos(b),a+l*Math.sin(b))}return this.poly(g,!0,d),this}roundPoly(t,a,l,o,c,d=0,m){if(o=Math.max(o|0,3),c<=0)return this.regularPoly(t,a,l,o,d);const p=l*Math.sin(Math.PI/o)-.001;c=Math.min(c,p);const g=-1*Math.PI/2+d,x=Math.PI*2/o,b=(o-2)*Math.PI/o/2;for(let E=0;E<o;E++){const C=E*x+g,M=t+l*Math.cos(C),z=a+l*Math.sin(C),R=C+Math.PI+b,w=C-Math.PI-b,O=M+c*Math.cos(R),U=z+c*Math.sin(R),Y=M+c*Math.cos(w),k=z+c*Math.sin(w);E===0?this.moveTo(O,U):this.lineTo(O,U),this.quadraticCurveTo(M,z,Y,k,m)}return this.closePath()}roundShape(t,a,l=!1,o){return t.length<3?this:(l?YC(this,t,a,o):GC(this,t,a),this.closePath())}filletRect(t,a,l,o,c){if(c===0)return this.rect(t,a,l,o);const d=Math.min(l,o)/2,m=Math.min(d,Math.max(-d,c)),p=t+l,g=a+o,x=m<0?-m:0,b=Math.abs(m);return this.moveTo(t,a+b).arcTo(t+x,a+x,t+b,a,b).lineTo(p-b,a).arcTo(p-x,a+x,p,a+b,b).lineTo(p,g-b).arcTo(p-x,g-x,t+l-b,g,b).lineTo(t+b,g).arcTo(t+x,g-x,t,g-b,b).closePath()}chamferRect(t,a,l,o,c,d){if(c<=0)return this.rect(t,a,l,o);const m=Math.min(c,Math.min(l,o)/2),p=t+l,g=a+o,x=[t+m,a,p-m,a,p,a+m,p,g-m,p-m,g,t+m,g,t,g-m,t,a+m];for(let b=x.length-1;b>=2;b-=2)x[b]===x[b-2]&&x[b-1]===x[b-3]&&x.splice(b-1,2);return this.poly(x,!0,d)}ellipse(t,a,l,o,c){return this.drawShape(new yg(t,a,l,o),c),this}roundRect(t,a,l,o,c,d){return this.drawShape(new gg(t,a,l,o,c),d),this}drawShape(t,a){return this.endPoly(),this.shapePrimitives.push({shape:t,transform:a}),this}startPoly(t,a){let l=this._currentPoly;return l&&this.endPoly(),l=new rd,l.points.push(t,a),this._currentPoly=l,this}endPoly(t=!1){const a=this._currentPoly;return a&&a.points.length>2&&(a.closePath=t,this.shapePrimitives.push({shape:a})),this._currentPoly=null,this}_ensurePoly(t=!0){if(!this._currentPoly&&(this._currentPoly=new rd,t)){const a=this.shapePrimitives[this.shapePrimitives.length-1];if(a){let l=a.shape.x,o=a.shape.y;if(a.transform&&!a.transform.isIdentity()){const c=a.transform,d=l;l=c.a*l+c.c*o+c.tx,o=c.b*d+c.d*o+c.ty}this._currentPoly.points.push(l,o)}else this._currentPoly.points.push(0,0)}}buildPath(){const t=this._graphicsPath2D;this.shapePrimitives.length=0,this._currentPoly=null;for(let a=0;a<t.instructions.length;a++){const l=t.instructions[a];this[l.action](...l.data)}this.finish()}get bounds(){const t=this._bounds;t.clear();const a=this.shapePrimitives;for(let l=0;l<a.length;l++){const o=a[l],c=o.shape.getBounds(qC);o.transform?t.addRect(c,o.transform):t.addRect(c)}return t}}class ur{constructor(t,a=!1){this.instructions=[],this.uid=on("graphicsPath"),this._dirty=!0,this.checkForHoles=a,typeof t=="string"?o4(t,this):this.instructions=(t==null?void 0:t.slice())??[]}get shapePath(){return this._shapePath||(this._shapePath=new LC(this)),this._dirty&&(this._dirty=!1,this._shapePath.buildPath()),this._shapePath}addPath(t,a){return t=t.clone(),this.instructions.push({action:"addPath",data:[t,a]}),this._dirty=!0,this}arc(...t){return this.instructions.push({action:"arc",data:t}),this._dirty=!0,this}arcTo(...t){return this.instructions.push({action:"arcTo",data:t}),this._dirty=!0,this}arcToSvg(...t){return this.instructions.push({action:"arcToSvg",data:t}),this._dirty=!0,this}bezierCurveTo(...t){return this.instructions.push({action:"bezierCurveTo",data:t}),this._dirty=!0,this}bezierCurveToShort(t,a,l,o,c){const d=this.instructions[this.instructions.length-1],m=this.getLastPoint(ya.shared);let p=0,g=0;if(!d||d.action!=="bezierCurveTo")p=m.x,g=m.y;else{p=d.data[2],g=d.data[3];const x=m.x,b=m.y;p=x+(x-p),g=b+(b-g)}return this.instructions.push({action:"bezierCurveTo",data:[p,g,t,a,l,o,c]}),this._dirty=!0,this}closePath(){return this.instructions.push({action:"closePath",data:[]}),this._dirty=!0,this}ellipse(...t){return this.instructions.push({action:"ellipse",data:t}),this._dirty=!0,this}lineTo(...t){return this.instructions.push({action:"lineTo",data:t}),this._dirty=!0,this}moveTo(...t){return this.instructions.push({action:"moveTo",data:t}),this}quadraticCurveTo(...t){return this.instructions.push({action:"quadraticCurveTo",data:t}),this._dirty=!0,this}quadraticCurveToShort(t,a,l){const o=this.instructions[this.instructions.length-1],c=this.getLastPoint(ya.shared);let d=0,m=0;if(!o||o.action!=="quadraticCurveTo")d=c.x,m=c.y;else{d=o.data[0],m=o.data[1];const p=c.x,g=c.y;d=p+(p-d),m=g+(g-m)}return this.instructions.push({action:"quadraticCurveTo",data:[d,m,t,a,l]}),this._dirty=!0,this}rect(t,a,l,o,c){return this.instructions.push({action:"rect",data:[t,a,l,o,c]}),this._dirty=!0,this}circle(t,a,l,o){return this.instructions.push({action:"circle",data:[t,a,l,o]}),this._dirty=!0,this}roundRect(...t){return this.instructions.push({action:"roundRect",data:t}),this._dirty=!0,this}poly(...t){return this.instructions.push({action:"poly",data:t}),this._dirty=!0,this}regularPoly(...t){return this.instructions.push({action:"regularPoly",data:t}),this._dirty=!0,this}roundPoly(...t){return this.instructions.push({action:"roundPoly",data:t}),this._dirty=!0,this}roundShape(...t){return this.instructions.push({action:"roundShape",data:t}),this._dirty=!0,this}filletRect(...t){return this.instructions.push({action:"filletRect",data:t}),this._dirty=!0,this}chamferRect(...t){return this.instructions.push({action:"chamferRect",data:t}),this._dirty=!0,this}star(t,a,l,o,c,d,m){c||(c=o/2);const p=-1*Math.PI/2+d,g=l*2,x=Math.PI*2/g,b=[];for(let E=0;E<g;E++){const C=E%2?c:o,M=E*x+p;b.push(t+C*Math.cos(M),a+C*Math.sin(M))}return this.poly(b,!0,m),this}clone(t=!1){const a=new ur;if(a.checkForHoles=this.checkForHoles,!t)a.instructions=this.instructions.slice();else for(let l=0;l<this.instructions.length;l++){const o=this.instructions[l];a.instructions.push({action:o.action,data:o.data.slice()})}return a}clear(){return this.instructions.length=0,this._dirty=!0,this}transform(t){if(t.isIdentity())return this;const a=t.a,l=t.b,o=t.c,c=t.d,d=t.tx,m=t.ty;let p=0,g=0,x=0,b=0,E=0,C=0,M=0,z=0;for(let R=0;R<this.instructions.length;R++){const w=this.instructions[R],O=w.data;switch(w.action){case"moveTo":case"lineTo":p=O[0],g=O[1],O[0]=a*p+o*g+d,O[1]=l*p+c*g+m;break;case"bezierCurveTo":x=O[0],b=O[1],E=O[2],C=O[3],p=O[4],g=O[5],O[0]=a*x+o*b+d,O[1]=l*x+c*b+m,O[2]=a*E+o*C+d,O[3]=l*E+c*C+m,O[4]=a*p+o*g+d,O[5]=l*p+c*g+m;break;case"quadraticCurveTo":x=O[0],b=O[1],p=O[2],g=O[3],O[0]=a*x+o*b+d,O[1]=l*x+c*b+m,O[2]=a*p+o*g+d,O[3]=l*p+c*g+m;break;case"arcToSvg":p=O[5],g=O[6],M=O[0],z=O[1],O[0]=a*M+o*z,O[1]=l*M+c*z,O[5]=a*p+o*g+d,O[6]=l*p+c*g+m;break;case"circle":O[4]=Ih(O[3],t);break;case"rect":O[4]=Ih(O[4],t);break;case"ellipse":O[8]=Ih(O[8],t);break;case"roundRect":O[5]=Ih(O[5],t);break;case"addPath":O[0].transform(t);break;case"poly":O[2]=Ih(O[2],t);break;default:Ya("unknown transform action",w.action);break}}return this._dirty=!0,this}get bounds(){return this.shapePath.bounds}getLastPoint(t){let a=this.instructions.length-1,l=this.instructions[a];if(!l)return t.x=0,t.y=0,t;for(;l.action==="closePath";){if(a--,a<0)return t.x=0,t.y=0,t;l=this.instructions[a]}switch(l.action){case"moveTo":case"lineTo":t.x=l.data[0],t.y=l.data[1];break;case"quadraticCurveTo":t.x=l.data[2],t.y=l.data[3];break;case"bezierCurveTo":t.x=l.data[4],t.y=l.data[5];break;case"arc":case"arcToSvg":t.x=l.data[5],t.y=l.data[6];break;case"addPath":l.data[0].getLastPoint(t);break}return t}}function Ih(n,t){return n?n.prepend(t):t.clone()}function rn(n,t,a){const l=n.getAttribute(t);return l?Number(l):a}function XC(n,t){const a=n.querySelectorAll("defs");for(let l=0;l<a.length;l++){const o=a[l];for(let c=0;c<o.children.length;c++){const d=o.children[c];switch(d.nodeName.toLowerCase()){case"lineargradient":t.defs[d.id]=VC(d);break;case"radialgradient":t.defs[d.id]=kC();break}}}}function VC(n){const t=rn(n,"x1",0),a=rn(n,"y1",0),l=rn(n,"x2",1),o=rn(n,"y2",0),c=n.getAttribute("gradientUnits")||"objectBoundingBox",d=new cr(t,a,l,o,c==="objectBoundingBox"?"local":"global");for(let m=0;m<n.children.length;m++){const p=n.children[m],g=rn(p,"offset",0),x=zn.shared.setValue(p.getAttribute("stop-color")).toNumber();d.addColorStop(g,x)}return d}function kC(n){return Ya("[SVG Parser] Radial gradients are not yet supported"),new cr(0,0,1,0)}function Z1(n){const t=n.match(/url\s*\(\s*['"]?\s*#([^'"\s)]+)\s*['"]?\s*\)/i);return t?t[1]:""}const J1={fill:{type:"paint",default:0},"fill-opacity":{type:"number",default:1},stroke:{type:"paint",default:0},"stroke-width":{type:"number",default:1},"stroke-opacity":{type:"number",default:1},"stroke-linecap":{type:"string",default:"butt"},"stroke-linejoin":{type:"string",default:"miter"},"stroke-miterlimit":{type:"number",default:10},"stroke-dasharray":{type:"string",default:"none"},"stroke-dashoffset":{type:"number",default:0},opacity:{type:"number",default:1}};function x2(n,t){const a=n.getAttribute("style"),l={},o={},c={strokeStyle:l,fillStyle:o,useFill:!1,useStroke:!1};for(const d in J1){const m=n.getAttribute(d);m&&F1(t,c,d,m.trim())}if(a){const d=a.split(";");for(let m=0;m<d.length;m++){const p=d[m].trim(),[g,x]=p.split(":");J1[g]&&F1(t,c,g,x.trim())}}return{strokeStyle:c.useStroke?l:null,fillStyle:c.useFill?o:null,useFill:c.useFill,useStroke:c.useStroke}}function F1(n,t,a,l){switch(a){case"stroke":if(l!=="none"){if(l.startsWith("url(")){const o=Z1(l);t.strokeStyle.fill=n.defs[o]}else t.strokeStyle.color=zn.shared.setValue(l).toNumber();t.useStroke=!0}break;case"stroke-width":t.strokeStyle.width=Number(l);break;case"fill":if(l!=="none"){if(l.startsWith("url(")){const o=Z1(l);t.fillStyle.fill=n.defs[o]}else t.fillStyle.color=zn.shared.setValue(l).toNumber();t.useFill=!0}break;case"fill-opacity":t.fillStyle.alpha=Number(l);break;case"stroke-opacity":t.strokeStyle.alpha=Number(l);break;case"opacity":t.fillStyle.alpha=Number(l),t.strokeStyle.alpha=Number(l);break}}function QC(n){if(n.length<=2)return!0;const t=n.map(m=>m.area).sort((m,p)=>p-m),[a,l]=t,o=t[t.length-1],c=a/l,d=l/o;return!(c>3&&d<2)}function KC(n){return n.split(/(?=[Mm])/).filter(l=>l.trim().length>0)}function ZC(n){const t=n.match(/[-+]?[0-9]*\.?[0-9]+/g);if(!t||t.length<4)return 0;const a=t.map(Number),l=[],o=[];for(let x=0;x<a.length;x+=2)x+1<a.length&&(l.push(a[x]),o.push(a[x+1]));if(l.length===0||o.length===0)return 0;const c=Math.min(...l),d=Math.max(...l),m=Math.min(...o),p=Math.max(...o);return(d-c)*(p-m)}function W1(n,t){const a=new ur(n,!1);for(const l of a.instructions)t.instructions.push(l)}function JC(n,t){if(typeof n=="string"){const d=document.createElement("div");d.innerHTML=n.trim(),n=d.querySelector("svg")}const a={context:t,defs:{},path:new ur};XC(n,a);const l=n.children,{fillStyle:o,strokeStyle:c}=x2(n,a);for(let d=0;d<l.length;d++){const m=l[d];m.nodeName.toLowerCase()!=="defs"&&_2(m,a,o,c)}return t}function _2(n,t,a,l){const o=n.children,{fillStyle:c,strokeStyle:d}=x2(n,t);c&&a?a={...a,...c}:c&&(a=c),d&&l?l={...l,...d}:d&&(l=d);const m=!a&&!l;m&&(a={color:0});let p,g,x,b,E,C,M,z,R,w,O,U,Y,k,V,Z,F;switch(n.nodeName.toLowerCase()){case"path":{k=n.getAttribute("d");const q=n.getAttribute("fill-rule"),$=KC(k),et=q==="evenodd",ct=$.length>1;if(et&&ct){const dt=$.map(j=>({path:j,area:ZC(j)}));if(dt.sort((j,Q)=>Q.area-j.area),$.length>3||!QC(dt))for(let j=0;j<dt.length;j++){const Q=dt[j],ot=j===0;t.context.beginPath();const rt=new ur(void 0,!0);W1(Q.path,rt),t.context.path(rt),ot?(a&&t.context.fill(a),l&&t.context.stroke(l)):t.context.cut()}else for(let j=0;j<dt.length;j++){const Q=dt[j],ot=j%2===1;t.context.beginPath();const rt=new ur(void 0,!0);W1(Q.path,rt),t.context.path(rt),ot?t.context.cut():(a&&t.context.fill(a),l&&t.context.stroke(l))}}else{const dt=q?q==="evenodd":!0;V=new ur(k,dt),t.context.path(V),a&&t.context.fill(a),l&&t.context.stroke(l)}break}case"circle":M=rn(n,"cx",0),z=rn(n,"cy",0),R=rn(n,"r",0),t.context.ellipse(M,z,R,R),a&&t.context.fill(a),l&&t.context.stroke(l);break;case"rect":p=rn(n,"x",0),g=rn(n,"y",0),Z=rn(n,"width",0),F=rn(n,"height",0),w=rn(n,"rx",0),O=rn(n,"ry",0),w||O?t.context.roundRect(p,g,Z,F,w||O):t.context.rect(p,g,Z,F),a&&t.context.fill(a),l&&t.context.stroke(l);break;case"ellipse":M=rn(n,"cx",0),z=rn(n,"cy",0),w=rn(n,"rx",0),O=rn(n,"ry",0),t.context.beginPath(),t.context.ellipse(M,z,w,O),a&&t.context.fill(a),l&&t.context.stroke(l);break;case"line":x=rn(n,"x1",0),b=rn(n,"y1",0),E=rn(n,"x2",0),C=rn(n,"y2",0),t.context.beginPath(),t.context.moveTo(x,b),t.context.lineTo(E,C),l&&t.context.stroke(l);break;case"polygon":Y=n.getAttribute("points"),U=Y.match(/-?\d+/g).map(q=>parseInt(q,10)),t.context.poly(U,!0),a&&t.context.fill(a),l&&t.context.stroke(l);break;case"polyline":Y=n.getAttribute("points"),U=Y.match(/-?\d+/g).map(q=>parseInt(q,10)),t.context.poly(U,!1),l&&t.context.stroke(l);break;case"g":case"svg":break;default:{Ya(`[SVG parser] <${n.nodeName}> elements unsupported`);break}}m&&(a=null);for(let q=0;q<o.length;q++)_2(o[q],t,a,l)}const P1={repeat:{addressModeU:"repeat",addressModeV:"repeat"},"repeat-x":{addressModeU:"repeat",addressModeV:"clamp-to-edge"},"repeat-y":{addressModeU:"clamp-to-edge",addressModeV:"repeat"},"no-repeat":{addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"}};class Kp{constructor(t,a){this.uid=on("fillPattern"),this._tick=0,this.transform=new le,this.texture=t,this.transform.scale(1/t.frame.width,1/t.frame.height),a&&(t.source.style.addressModeU=P1[a].addressModeU,t.source.style.addressModeV=P1[a].addressModeV)}setTransform(t){const a=this.texture;this.transform.copyFrom(t),this.transform.invert(),this.transform.scale(1/a.frame.width,1/a.frame.height),this._tick++}get texture(){return this._texture}set texture(t){this._texture!==t&&(this._texture=t,this._tick++)}get styleKey(){return`fill-pattern-${this.uid}-${this._tick}`}destroy(){this.texture.destroy(!0),this.texture=null}}function FC(n){return zn.isColorLike(n)}function I1(n){return n instanceof Kp}function $1(n){return n instanceof cr}function WC(n){return n instanceof ze}function PC(n,t,a){const l=zn.shared.setValue(t??0);return n.color=l.toNumber(),n.alpha=l.alpha===1?a.alpha:l.alpha,n.texture=ze.WHITE,{...a,...n}}function IC(n,t,a){return n.texture=t,{...a,...n}}function tx(n,t,a){return n.fill=t,n.color=16777215,n.texture=t.texture,n.matrix=t.transform,{...a,...n}}function ex(n,t,a){return t.buildGradient(),n.fill=t,n.color=16777215,n.texture=t.texture,n.matrix=t.transform,n.textureSpace=t.textureSpace,{...a,...n}}function $C(n,t){const a={...t,...n},l=zn.shared.setValue(a.color);return a.alpha*=l.alpha,a.color=l.toNumber(),a}function xo(n,t){if(n==null)return null;const a={},l=n;return FC(n)?PC(a,n,t):WC(n)?IC(a,n,t):I1(n)?tx(a,n,t):$1(n)?ex(a,n,t):l.fill&&I1(l.fill)?tx(l,l.fill,t):l.fill&&$1(l.fill)?ex(l,l.fill,t):$C(l,t)}function Op(n,t){const{width:a,alignment:l,miterLimit:o,cap:c,join:d,pixelLine:m,...p}=t,g=xo(n,p);return g?{width:a,alignment:l,miterLimit:o,cap:c,join:d,pixelLine:m,...g}:null}function tA(n,t){let a=1;const l=n.shapePath.shapePrimitives;for(let o=0;o<l.length;o++){const c=l[o].shape;if(c.type!=="polygon")continue;const d=c.points,m=d.length;if(m<6)continue;const p=c.closePath;for(let g=0;g<m;g+=2){if(!p&&(g===0||g===m-2))continue;const x=(g-2+m)%m,b=(g+2)%m,E=d[x],C=d[x+1],M=d[g],z=d[g+1],R=d[b],w=d[b+1],O=E-M,U=C-z,Y=R-M,k=w-z,V=O*O+U*U,Z=Y*Y+k*k;if(V<1e-12||Z<1e-12)continue;let $=(O*Y+U*k)/Math.sqrt(V*Z);$<-1?$=-1:$>1&&($=1);const et=Math.sqrt((1-$)*.5);if(et<1e-6)continue;const ct=Math.min(1/et,t);ct>a&&(a=ct)}}return a}const eA=new ya,nx=new le,bg=class gs extends _s{constructor(){super(...arguments),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=on("graphicsContext"),this.dirty=!0,this.batchMode="auto",this.instructions=[],this.destroyed=!1,this._activePath=new ur,this._transform=new le,this._fillStyle={...gs.defaultFillStyle},this._strokeStyle={...gs.defaultStrokeStyle},this._stateStack=[],this._tick=0,this._bounds=new Ii,this._boundsDirty=!0}clone(){const t=new gs;return t.batchMode=this.batchMode,t.instructions=this.instructions.slice(),t._activePath=this._activePath.clone(),t._transform=this._transform.clone(),t._fillStyle={...this._fillStyle},t._strokeStyle={...this._strokeStyle},t._stateStack=this._stateStack.slice(),t._bounds=this._bounds.clone(),t._boundsDirty=!0,t}get fillStyle(){return this._fillStyle}set fillStyle(t){this._fillStyle=xo(t,gs.defaultFillStyle)}get strokeStyle(){return this._strokeStyle}set strokeStyle(t){this._strokeStyle=Op(t,gs.defaultStrokeStyle)}setFillStyle(t){return this._fillStyle=xo(t,gs.defaultFillStyle),this}setStrokeStyle(t){return this._strokeStyle=xo(t,gs.defaultStrokeStyle),this}texture(t,a,l,o,c,d){return this.instructions.push({action:"texture",data:{image:t,dx:l||0,dy:o||0,dw:c||t.frame.width,dh:d||t.frame.height,transform:this._transform.clone(),alpha:this._fillStyle.alpha,style:a||a===0?zn.shared.setValue(a).toNumber():16777215}}),this.onUpdate(),this}beginPath(){return this._activePath=new ur,this}fill(t,a){let l;const o=this.instructions[this.instructions.length-1];return this._tick===0&&(o==null?void 0:o.action)==="stroke"?l=o.data.path:l=this._activePath.clone(),l?(t!=null&&(a!==void 0&&typeof t=="number"&&(de(un,"GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead"),t={color:t,alpha:a}),this._fillStyle=xo(t,gs.defaultFillStyle)),this.instructions.push({action:"fill",data:{style:this.fillStyle,path:l}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}_initNextPathLocation(){const{x:t,y:a}=this._activePath.getLastPoint(ya.shared);this._activePath.clear(),this._activePath.moveTo(t,a)}stroke(t){let a;const l=this.instructions[this.instructions.length-1];return this._tick===0&&(l==null?void 0:l.action)==="fill"?a=l.data.path:a=this._activePath.clone(),a?(t!=null&&(this._strokeStyle=Op(t,gs.defaultStrokeStyle)),this.instructions.push({action:"stroke",data:{style:this.strokeStyle,path:a}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}cut(){for(let t=0;t<2;t++){const a=this.instructions[this.instructions.length-1-t],l=this._activePath.clone();if(a&&(a.action==="stroke"||a.action==="fill"))if(a.data.hole)a.data.hole.addPath(l);else{a.data.hole=l;break}}return this._initNextPathLocation(),this}arc(t,a,l,o,c,d){this._tick++;const m=this._transform;return this._activePath.arc(m.a*t+m.c*a+m.tx,m.b*t+m.d*a+m.ty,l,o,c,d),this}arcTo(t,a,l,o,c){this._tick++;const d=this._transform;return this._activePath.arcTo(d.a*t+d.c*a+d.tx,d.b*t+d.d*a+d.ty,d.a*l+d.c*o+d.tx,d.b*l+d.d*o+d.ty,c),this}arcToSvg(t,a,l,o,c,d,m){this._tick++;const p=this._transform;return this._activePath.arcToSvg(t,a,l,o,c,p.a*d+p.c*m+p.tx,p.b*d+p.d*m+p.ty),this}bezierCurveTo(t,a,l,o,c,d,m){this._tick++;const p=this._transform;return this._activePath.bezierCurveTo(p.a*t+p.c*a+p.tx,p.b*t+p.d*a+p.ty,p.a*l+p.c*o+p.tx,p.b*l+p.d*o+p.ty,p.a*c+p.c*d+p.tx,p.b*c+p.d*d+p.ty,m),this}closePath(){var t;return this._tick++,(t=this._activePath)==null||t.closePath(),this}ellipse(t,a,l,o){return this._tick++,this._activePath.ellipse(t,a,l,o,this._transform.clone()),this}circle(t,a,l){return this._tick++,this._activePath.circle(t,a,l,this._transform.clone()),this}path(t){return this._tick++,this._activePath.addPath(t,this._transform.clone()),this}lineTo(t,a){this._tick++;const l=this._transform;return this._activePath.lineTo(l.a*t+l.c*a+l.tx,l.b*t+l.d*a+l.ty),this}moveTo(t,a){this._tick++;const l=this._transform,o=this._activePath.instructions,c=l.a*t+l.c*a+l.tx,d=l.b*t+l.d*a+l.ty;return o.length===1&&o[0].action==="moveTo"?(o[0].data[0]=c,o[0].data[1]=d,this):(this._activePath.moveTo(c,d),this)}quadraticCurveTo(t,a,l,o,c){this._tick++;const d=this._transform;return this._activePath.quadraticCurveTo(d.a*t+d.c*a+d.tx,d.b*t+d.d*a+d.ty,d.a*l+d.c*o+d.tx,d.b*l+d.d*o+d.ty,c),this}rect(t,a,l,o){return this._tick++,this._activePath.rect(t,a,l,o,this._transform.clone()),this}roundRect(t,a,l,o,c){return this._tick++,this._activePath.roundRect(t,a,l,o,c,this._transform.clone()),this}poly(t,a){return this._tick++,this._activePath.poly(t,a,this._transform.clone()),this}regularPoly(t,a,l,o,c=0,d){return this._tick++,this._activePath.regularPoly(t,a,l,o,c,d),this}roundPoly(t,a,l,o,c,d){return this._tick++,this._activePath.roundPoly(t,a,l,o,c,d),this}roundShape(t,a,l,o){return this._tick++,this._activePath.roundShape(t,a,l,o),this}filletRect(t,a,l,o,c){return this._tick++,this._activePath.filletRect(t,a,l,o,c),this}chamferRect(t,a,l,o,c,d){return this._tick++,this._activePath.chamferRect(t,a,l,o,c,d),this}star(t,a,l,o,c=0,d=0){return this._tick++,this._activePath.star(t,a,l,o,c,d,this._transform.clone()),this}svg(t){return this._tick++,JC(t,this),this}restore(){const t=this._stateStack.pop();return t&&(this._transform=t.transform,this._fillStyle=t.fillStyle,this._strokeStyle=t.strokeStyle),this}save(){return this._stateStack.push({transform:this._transform.clone(),fillStyle:{...this._fillStyle},strokeStyle:{...this._strokeStyle}}),this}getTransform(){return this._transform}resetTransform(){return this._transform.identity(),this}rotate(t){return this._transform.rotate(t),this}scale(t,a=t){return this._transform.scale(t,a),this}setTransform(t,a,l,o,c,d){return t instanceof le?(this._transform.set(t.a,t.b,t.c,t.d,t.tx,t.ty),this):(this._transform.set(t,a,l,o,c,d),this)}transform(t,a,l,o,c,d){return t instanceof le?(this._transform.append(t),this):(nx.set(t,a,l,o,c,d),this._transform.append(nx),this)}translate(t,a=t){return this._transform.translate(t,a),this}clear(){return this._activePath.clear(),this.instructions.length=0,this.resetTransform(),this.onUpdate(),this}onUpdate(){this._boundsDirty=!0,this.dirty=!0,this.emit("update",this,16)}get bounds(){if(!this._boundsDirty)return this._bounds;this._boundsDirty=!1;const t=this._bounds;t.clear();for(let a=0;a<this.instructions.length;a++){const l=this.instructions[a],o=l.action;if(o==="fill"){const c=l.data;t.addBounds(c.path.bounds)}else if(o==="texture"){const c=l.data;t.addFrame(c.dx,c.dy,c.dx+c.dw,c.dy+c.dh,c.transform)}if(o==="stroke"){const c=l.data,d=c.style.alignment;let m=c.style.width*(1-d);c.style.join==="miter"&&(m*=tA(c.path,c.style.miterLimit));const p=c.path.bounds;t.addFrame(p.minX-m,p.minY-m,p.maxX+m,p.maxY+m)}}return t.isValid||t.set(0,0,0,0),t}containsPoint(t){var o;if(!this.bounds.containsPoint(t.x,t.y))return!1;const a=this.instructions;let l=!1;for(let c=0;c<a.length;c++){const d=a[c],m=d.data,p=m.path;if(!d.action||!p)continue;const g=m.style,x=p.shapePath.shapePrimitives;for(let b=0;b<x.length;b++){const E=x[b].shape;if(!g||!E)continue;const C=x[b].transform,M=C?C.applyInverse(t,eA):t;if(d.action==="fill")l=E.contains(M.x,M.y);else{const R=g;l=E.strokeContains(M.x,M.y,R.width,R.alignment)}const z=m.hole;if(z){const R=(o=z.shapePath)==null?void 0:o.shapePrimitives;if(R)for(let w=0;w<R.length;w++)R[w].shape.contains(M.x,M.y)&&(l=!1)}if(l)return!0}}return l}unload(){var t;this.emit("unload",this);for(const a in this._gpuData)(t=this._gpuData[a])==null||t.destroy();this._gpuData=Object.create(null)}destroy(t=!1){if(this.destroyed)return;if(this.destroyed=!0,this._stateStack.length=0,this._transform=null,this.unload(),this.emit("destroy",this),this.removeAllListeners(),typeof t=="boolean"?t:t==null?void 0:t.texture){const l=typeof t=="boolean"?t:t==null?void 0:t.textureSource;this._fillStyle.texture&&(this._fillStyle.fill&&"uid"in this._fillStyle.fill?this._fillStyle.fill.destroy():this._fillStyle.texture.destroy(l)),this._strokeStyle.texture&&(this._strokeStyle.fill&&"uid"in this._strokeStyle.fill?this._strokeStyle.fill.destroy():this._strokeStyle.texture.destroy(l))}this._fillStyle=null,this._strokeStyle=null,this.instructions=null,this._activePath=null,this._bounds=null,this._stateStack=null,this.customShader=null,this._transform=null}};bg.defaultFillStyle={color:16777215,alpha:1,texture:ze.WHITE,matrix:null,fill:null,textureSpace:"local"};bg.defaultStrokeStyle={width:1,color:16777215,alpha:1,alignment:.5,miterLimit:10,cap:"butt",join:"miter",texture:ze.WHITE,matrix:null,fill:null,textureSpace:"local",pixelLine:!1};let Rl=bg;class nA{constructor(){this.isBatchable=!1}reset(){this.isBatchable=!1,this.context=null,this.graphicsData&&(this.graphicsData.destroy(),this.graphicsData=null)}destroy(){this.reset()}}class aA{constructor(){this.instructions=new og}init(){this.instructions.reset()}destroy(){this.instructions.destroy(),this.instructions=null}}const Tg=class Jy{constructor(t){this._renderer=t,this._managedContexts=new Sd({renderer:t,type:"resource",name:"graphicsContext"})}init(t){Jy.defaultOptions.bezierSmoothness=(t==null?void 0:t.bezierSmoothness)??Jy.defaultOptions.bezierSmoothness}getContextRenderData(t){return this.getGpuContext(t).graphicsData||this._initContextRenderData(t)}updateGpuContext(t){const a=t._gpuData,l=!!a[this._renderer.uid],o=a[this._renderer.uid]||this._initContext(t);return(t.dirty||!l)&&(l&&o.reset(),o.isBatchable=!1,t.dirty=!1),o}getGpuContext(t){return t._gpuData[this._renderer.uid]||this._initContext(t)}_initContextRenderData(t){const a=new aA,l=this.getGpuContext(t);return l.graphicsData=a,a.init(),a}_initContext(t){const a=new nA;return a.context=t,t._gpuData[this._renderer.uid]=a,this._managedContexts.add(t),a}destroy(){this._managedContexts.destroy(),this._renderer=null}};Tg.extension={type:[Wt.CanvasSystem],name:"graphicsContext"};Tg.defaultOptions={bezierSmoothness:.5};let iA=Tg;class S2{constructor(t,a){this.state=dg.for2d(),this.renderer=t,this._adaptor=a,this.renderer.runners.contextChange.add(this),this._managedGraphics=new Sd({renderer:t,type:"renderable",priority:-1,name:"graphics"})}contextChange(){this._adaptor.contextChange(this.renderer)}validateRenderable(t){return!1}addRenderable(t,a){this._managedGraphics.add(t),this.renderer.renderPipes.batch.break(a),a.add(t)}updateRenderable(t){}execute(t){t.isRenderable&&this._adaptor.execute(this,t)}destroy(){this._managedGraphics.destroy(),this.renderer=null,this._adaptor.destroy(),this._adaptor=null}}S2.extension={type:[Wt.CanvasPipes],name:"graphics"};function lA(n,t,a){const l=(n>>24&255)/255;t[a++]=(n&255)/255*l,t[a++]=(n>>8&255)/255*l,t[a++]=(n>>16&255)/255*l,t[a++]=l}class sA{constructor(){this.batches=[],this.batched=!1}destroy(){this.batches.forEach(t=>{ai.return(t)}),this.batches.length=0}}class b2{constructor(t,a){this.state=dg.for2d(),this.renderer=t,this._adaptor=a,this.renderer.runners.contextChange.add(this),this._managedGraphics=new Sd({renderer:t,type:"renderable",priority:-1,name:"graphics"})}contextChange(){this._adaptor.contextChange(this.renderer)}validateRenderable(t){const a=t.context,l=!!t._gpuData,c=this.renderer.graphicsContext.updateGpuContext(a);return!!(c.isBatchable||l!==c.isBatchable)}addRenderable(t,a){const o=this.renderer.graphicsContext.updateGpuContext(t.context);t.didViewUpdate&&this._rebuild(t),o.isBatchable?this._addToBatcher(t,a):(this.renderer.renderPipes.batch.break(a),a.add(t))}updateRenderable(t){const l=this._getGpuDataForRenderable(t).batches;for(let o=0;o<l.length;o++){const c=l[o];c._batcher.updateElement(c)}}execute(t){if(!t.isRenderable)return;const a=this.renderer,l=t.context;if(!a.graphicsContext.getGpuContext(l).batches.length)return;const c=l.customShader||this._adaptor.shader;this.state.blendMode=t.groupBlendMode;const d=c.resources.localUniforms.uniforms;d.uTransformMatrix=t.groupTransform,d.uRound=a._roundPixels|t._roundPixels,lA(t.groupColorAlpha,d.uColor,0),this._adaptor.execute(this,t)}_rebuild(t){const a=this._getGpuDataForRenderable(t),o=this.renderer.graphicsContext.updateGpuContext(t.context);a.destroy(),o.isBatchable&&this._updateBatchesForRenderable(t,a)}_addToBatcher(t,a){const l=this.renderer.renderPipes.batch,o=this._getGpuDataForRenderable(t).batches;for(let c=0;c<o.length;c++){const d=o[c];l.addToBatch(d,a)}}_getGpuDataForRenderable(t){return t._gpuData[this.renderer.uid]||this._initGpuDataForRenderable(t)}_initGpuDataForRenderable(t){const a=new sA;return t._gpuData[this.renderer.uid]=a,this._managedGraphics.add(t),a}_updateBatchesForRenderable(t,a){const l=t.context,c=this.renderer.graphicsContext.getGpuContext(l),d=this.renderer._roundPixels|t._roundPixels;a.batches=c.batches.map(m=>{const p=ai.get(vg);return m.copyTo(p),p.renderable=t,p.roundPixels=d,p})}destroy(){this._managedGraphics.destroy(),this.renderer=null,this._adaptor.destroy(),this._adaptor=null,this.state=null}}b2.extension={type:[Wt.WebGLPipes,Wt.WebGPUPipes],name:"graphics"};Ie.add(S2);Ie.add(b2);Ie.add(iA);Ie.add(Sg);class ni extends cg{constructor(t){t instanceof Rl&&(t={context:t});const{context:a,roundPixels:l,...o}=t||{};super({label:"Graphics",...o}),this.renderPipeId="graphics",a?this.context=a:(this.context=this._ownedContext=new Rl,this.context.autoGarbageCollect=this.autoGarbageCollect),this.didViewUpdate=!0,this.allowChildren=!1,this.roundPixels=l??!1}set context(t){t!==this._context&&(this._context&&(this._context.off("update",this.onViewUpdate,this),this._context.off("unload",this.unload,this)),this._context=t,this._context.on("update",this.onViewUpdate,this),this._context.on("unload",this.unload,this),this.onViewUpdate())}get context(){return this._context}get bounds(){return this._context.bounds}updateBounds(){}containsPoint(t){return this._context.containsPoint(t)}destroy(t){this._ownedContext&&!t?this._ownedContext.destroy(t):(t===!0||(t==null?void 0:t.context)===!0)&&this._context.destroy(t),this._ownedContext=null,this._context=null,super.destroy(t)}_onTouch(t){this._gcLastUsed=t,this._context._gcLastUsed=t}_callContextMethod(t,a){return this.context[t](...a),this}setFillStyle(...t){return this._callContextMethod("setFillStyle",t)}setStrokeStyle(...t){return this._callContextMethod("setStrokeStyle",t)}fill(...t){return this._callContextMethod("fill",t)}stroke(...t){return this._callContextMethod("stroke",t)}texture(...t){return this._callContextMethod("texture",t)}beginPath(){return this._callContextMethod("beginPath",[])}cut(){return this._callContextMethod("cut",[])}arc(...t){return this._callContextMethod("arc",t)}arcTo(...t){return this._callContextMethod("arcTo",t)}arcToSvg(...t){return this._callContextMethod("arcToSvg",t)}bezierCurveTo(...t){return this._callContextMethod("bezierCurveTo",t)}closePath(){return this._callContextMethod("closePath",[])}ellipse(...t){return this._callContextMethod("ellipse",t)}circle(...t){return this._callContextMethod("circle",t)}path(...t){return this._callContextMethod("path",t)}lineTo(...t){return this._callContextMethod("lineTo",t)}moveTo(...t){return this._callContextMethod("moveTo",t)}quadraticCurveTo(...t){return this._callContextMethod("quadraticCurveTo",t)}rect(...t){return this._callContextMethod("rect",t)}roundRect(...t){return this._callContextMethod("roundRect",t)}poly(...t){return this._callContextMethod("poly",t)}regularPoly(...t){return this._callContextMethod("regularPoly",t)}roundPoly(...t){return this._callContextMethod("roundPoly",t)}roundShape(...t){return this._callContextMethod("roundShape",t)}filletRect(...t){return this._callContextMethod("filletRect",t)}chamferRect(...t){return this._callContextMethod("chamferRect",t)}star(...t){return this._callContextMethod("star",t)}svg(...t){return this._callContextMethod("svg",t)}restore(...t){return this._callContextMethod("restore",t)}save(){return this._callContextMethod("save",[])}getTransform(){return this.context.getTransform()}resetTransform(){return this._callContextMethod("resetTransform",[])}rotateTransform(...t){return this._callContextMethod("rotate",t)}scaleTransform(...t){return this._callContextMethod("scale",t)}setTransform(...t){return this._callContextMethod("setTransform",t)}transform(...t){return this._callContextMethod("transform",t)}translateTransform(...t){return this._callContextMethod("translate",t)}clear(){return this._callContextMethod("clear",[])}get fillStyle(){return this._context.fillStyle}set fillStyle(t){this._context.fillStyle=t}get strokeStyle(){return this._context.strokeStyle}set strokeStyle(t){this._context.strokeStyle=t}clone(t=!1){return t?new ni(this._context.clone()):(this._ownedContext=null,new ni(this._context))}lineStyle(t,a,l){de(un,"Graphics#lineStyle is no longer needed. Use Graphics#setStrokeStyle to set the stroke style.");const o={};return t&&(o.width=t),a&&(o.color=a),l&&(o.alpha=l),this.context.strokeStyle=o,this}beginFill(t,a){de(un,"Graphics#beginFill is no longer needed. Use Graphics#fill to fill the shape with the desired style.");const l={};return t!==void 0&&(l.color=t),a!==void 0&&(l.alpha=a),this.context.fillStyle=l,this}endFill(){de(un,"Graphics#endFill is no longer needed. Use Graphics#fill to fill the shape with the desired style."),this.context.fill();const t=this.context.strokeStyle;return(t.width!==Rl.defaultStrokeStyle.width||t.color!==Rl.defaultStrokeStyle.color||t.alpha!==Rl.defaultStrokeStyle.alpha)&&this.context.stroke(),this}drawCircle(...t){return de(un,"Graphics#drawCircle has been renamed to Graphics#circle"),this._callContextMethod("circle",t)}drawEllipse(...t){return de(un,"Graphics#drawEllipse has been renamed to Graphics#ellipse"),this._callContextMethod("ellipse",t)}drawPolygon(...t){return de(un,"Graphics#drawPolygon has been renamed to Graphics#poly"),this._callContextMethod("poly",t)}drawRect(...t){return de(un,"Graphics#drawRect has been renamed to Graphics#rect"),this._callContextMethod("rect",t)}drawRoundedRect(...t){return de(un,"Graphics#drawRoundedRect has been renamed to Graphics#roundRect"),this._callContextMethod("roundRect",t)}drawStar(...t){return de(un,"Graphics#drawStar has been renamed to Graphics#star"),this._callContextMethod("star",t)}}class rA extends cg{constructor(t,a){const{text:l,resolution:o,style:c,anchor:d,width:m,height:p,roundPixels:g,...x}=t;super({...x}),this.batched=!0,this._resolution=null,this._autoResolution=!0,this._didTextUpdate=!0,this._styleClass=a,this.text=l??"",this.style=c,this.resolution=o??null,this.allowChildren=!1,this._anchor=new In({_onUpdate:()=>{this.onViewUpdate()}}),d&&(this.anchor=d),this.roundPixels=g??!1,m!==void 0&&(this.width=m),p!==void 0&&(this.height=p)}get anchor(){return this._anchor}set anchor(t){typeof t=="number"?this._anchor.set(t):this._anchor.copyFrom(t)}set text(t){t=t.toString(),this._text!==t&&(this._text=t,this.onViewUpdate())}get text(){return this._text}set resolution(t){this._autoResolution=t===null,this._resolution=t,this.onViewUpdate()}get resolution(){return this._resolution}get style(){return this._style}set style(t){var a;t||(t={}),(a=this._style)==null||a.off("update",this.onViewUpdate,this),t instanceof this._styleClass?this._style=t:this._style=new this._styleClass(t),this._style.on("update",this.onViewUpdate,this),this.onViewUpdate()}get width(){return Math.abs(this.scale.x)*this.bounds.width}set width(t){this._setWidth(t,this.bounds.width)}get height(){return Math.abs(this.scale.y)*this.bounds.height}set height(t){this._setHeight(t,this.bounds.height)}getSize(t){return t||(t={}),t.width=Math.abs(this.scale.x)*this.bounds.width,t.height=Math.abs(this.scale.y)*this.bounds.height,t}setSize(t,a){typeof t=="object"?(a=t.height??t.width,t=t.width):a??(a=t),t!==void 0&&this._setWidth(t,this.bounds.width),a!==void 0&&this._setHeight(a,this.bounds.height)}containsPoint(t){const a=this.bounds.width,l=this.bounds.height,o=-a*this.anchor.x;let c=0;return t.x>=o&&t.x<=o+a&&(c=-l*this.anchor.y,t.y>=c&&t.y<=c+l)}onViewUpdate(){this.didViewUpdate||(this._didTextUpdate=!0),super.onViewUpdate()}destroy(t=!1){super.destroy(t),this.owner=null,this._bounds=null,this._anchor=null,(typeof t=="boolean"?t:t!=null&&t.style)&&this._style.destroy(t),this._style=null,this._text=null}get styleKey(){return`${this._text}:${this._style.styleKey}:${this._resolution}`}}function uA(n,t){let a=n[0]??{};return(typeof a=="string"||n[1])&&(de(un,`use new ${t}({ text: "hi!", style }) instead`),a={text:a,style:n[1]}),a}class oA{constructor(t){this._canvasPool=Object.create(null),this.canvasOptions=t||{},this.enableFullScreen=!1}_createCanvasAndContext(t,a){const l=bi.get().createCanvas();l.width=t,l.height=a;const o=l.getContext("2d");return{canvas:l,context:o}}getOptimalCanvasAndContext(t,a,l=1){t=Math.ceil(t*l-1e-6),a=Math.ceil(a*l-1e-6),t=tf(t),a=tf(a);const o=(t<<17)+(a<<1);this._canvasPool[o]||(this._canvasPool[o]=[]);let c=this._canvasPool[o].pop();return c||(c=this._createCanvasAndContext(t,a)),c}returnCanvasAndContext(t){const a=t.canvas,{width:l,height:o}=a,c=(l<<17)+(o<<1);t.context.resetTransform(),t.context.clearRect(0,0,l,o),this._canvasPool[c].push(t)}clear(){this._canvasPool={}}}const Fy=new oA;xd.register(Fy);let co=null,sr=null;function cA(n,t){co||(co=bi.get().createCanvas(256,128),sr=co.getContext("2d",{willReadFrequently:!0}),sr.globalCompositeOperation="copy",sr.globalAlpha=1),(co.width<n||co.height<t)&&(co.width=tf(n),co.height=tf(t))}function ax(n,t,a){for(let l=0,o=4*a*t;l<t;++l,o+=4)if(n[o+3]!==0)return!1;return!0}function ix(n,t,a,l,o){const c=4*t;for(let d=l,m=l*c+4*a;d<=o;++d,m+=c)if(n[m+3]!==0)return!1;return!0}function fA(...n){let t=n[0];t.canvas||(t={canvas:n[0],resolution:n[1]});const{canvas:a}=t,l=Math.min(t.resolution??1,1),o=t.width??a.width,c=t.height??a.height;let d=t.output;if(cA(o,c),!sr)throw new TypeError("Failed to get canvas 2D context");sr.drawImage(a,0,0,o,c,0,0,o*l,c*l);const p=sr.getImageData(0,0,o,c).data;let g=0,x=0,b=o-1,E=c-1;for(;x<c&&ax(p,o,x);)++x;if(x===c)return mn.EMPTY;for(;ax(p,o,E);)--E;for(;ix(p,o,g,x,E);)++g;for(;ix(p,o,b,x,E);)--b;return++b,++E,sr.globalCompositeOperation="source-over",sr.strokeRect(g,x,b-g,E-x),sr.globalCompositeOperation="copy",d??(d=new mn),d.set(g/l,x/l,(b-g)/l,(E-x)/l),d}/**
299
- * tiny-lru
300
- *
301
- * @copyright 2026 Jason Mulligan <jason.mulligan@avoidwork.com>
302
- * @license BSD-3-Clause
303
- * @version 11.4.7
304
- */class hA{constructor(t=0,a=0,l=!1){this.first=null,this.items=Object.create(null),this.last=null,this.max=t,this.resetTtl=l,this.size=0,this.ttl=a}clear(){return this.first=null,this.items=Object.create(null),this.last=null,this.size=0,this}delete(t){if(this.has(t)){const a=this.items[t];delete this.items[t],this.size--,a.prev!==null&&(a.prev.next=a.next),a.next!==null&&(a.next.prev=a.prev),this.first===a&&(this.first=a.next),this.last===a&&(this.last=a.prev)}return this}entries(t=this.keys()){const a=new Array(t.length);for(let l=0;l<t.length;l++){const o=t[l];a[l]=[o,this.get(o)]}return a}evict(t=!1){if(t||this.size>0){const a=this.first;delete this.items[a.key],--this.size===0?(this.first=null,this.last=null):(this.first=a.next,this.first.prev=null)}return this}expiresAt(t){let a;return this.has(t)&&(a=this.items[t].expiry),a}get(t){const a=this.items[t];if(a!==void 0){if(this.ttl>0&&a.expiry<=Date.now()){this.delete(t);return}return this.moveToEnd(a),a.value}}has(t){return t in this.items}moveToEnd(t){this.last!==t&&(t.prev!==null&&(t.prev.next=t.next),t.next!==null&&(t.next.prev=t.prev),this.first===t&&(this.first=t.next),t.prev=this.last,t.next=null,this.last!==null&&(this.last.next=t),this.last=t,this.first===null&&(this.first=t))}keys(){const t=new Array(this.size);let a=this.first,l=0;for(;a!==null;)t[l++]=a.key,a=a.next;return t}setWithEvicted(t,a,l=this.resetTtl){let o=null;if(this.has(t))this.set(t,a,!0,l);else{this.max>0&&this.size===this.max&&(o={...this.first},this.evict(!0));let c=this.items[t]={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:a};++this.size===1?this.first=c:this.last.next=c,this.last=c}return o}set(t,a,l=!1,o=this.resetTtl){let c=this.items[t];return l||c!==void 0?(c.value=a,l===!1&&o&&(c.expiry=this.ttl>0?Date.now()+this.ttl:this.ttl),this.moveToEnd(c)):(this.max>0&&this.size===this.max&&this.evict(!0),c=this.items[t]={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:a},++this.size===1?this.first=c:this.last.next=c,this.last=c),this}values(t=this.keys()){const a=new Array(t.length);for(let l=0;l<t.length;l++)a[l]=this.get(t[l]);return a}}function dA(n=1e3,t=0,a=!1){if(isNaN(n)||n<0)throw new TypeError("Invalid max value");if(isNaN(t)||t<0)throw new TypeError("Invalid ttl value");if(typeof a!="boolean")throw new TypeError("Invalid resetTtl value");return new hA(n,t,a)}function T2(n){return!!n.tagStyles&&Object.keys(n.tagStyles).length>0}function E2(n){return n.includes("<")}function mA(n,t){return n.clone().assign(t)}function pA(n,t){const a=[],l=t.tagStyles;if(!T2(t)||!E2(n))return a.push({text:n,style:t}),a;const o=[t],c=[];let d="",m=0;for(;m<n.length;){const p=n[m];if(p==="<"){const g=n.indexOf(">",m);if(g===-1){d+=p,m++;continue}const x=n.slice(m+1,g);if(x.startsWith("/")){const b=x.slice(1).trim();if(c.length>0&&c[c.length-1]===b){d.length>0&&(a.push({text:d,style:o[o.length-1]}),d=""),o.pop(),c.pop(),m=g+1;continue}else{d+=n.slice(m,g+1),m=g+1;continue}}else{const b=x.trim();if(l[b]){d.length>0&&(a.push({text:d,style:o[o.length-1]}),d="");const E=o[o.length-1],C=mA(E,l[b]);o.push(C),c.push(b),m=g+1;continue}else{d+=n.slice(m,g+1),m=g+1;continue}}}else d+=p,m++}return d.length>0&&a.push({text:d,style:o[o.length-1]}),a}const yA=[10,13],gA=new Set(yA),vA=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288],xA=new Set(vA),_A=[9,32];new Set(_A);const SA=[45,8208,8211,8212,173],bA=new Set(SA),TA=/(\r\n|\r|\n)/,EA=/(?:\r\n|\r|\n)/;function Np(n){return typeof n!="string"?!1:gA.has(n.charCodeAt(0))}function Pi(n,t){return typeof n!="string"?!1:xA.has(n.charCodeAt(0))}function CA(n){return typeof n!="string"?!1:bA.has(n.charCodeAt(0))}function C2(n){return n==="normal"||n==="pre-line"}function A2(n){return n==="normal"}function lr(n){if(typeof n!="string")return"";let t=n.length-1;for(;t>=0&&Pi(n[t]);)t--;return t<n.length-1?n.slice(0,t+1):n}function M2(n){const t=[],a=[];if(typeof n!="string")return t;for(let l=0;l<n.length;l++){const o=n[l],c=n[l+1];if(Pi(o)||Np(o)){a.length>0&&(t.push(a.join("")),a.length=0),o==="\r"&&c===`
305
- `?(t.push(`\r
306
- `),l++):t.push(o);continue}a.push(o),CA(o)&&c&&!Pi(c)&&!Np(c)&&(t.push(a.join("")),a.length=0)}return a.length>0&&t.push(a.join("")),t}function R2(n,t,a,l){const o=a(n),c=[];for(let d=0;d<o.length;d++){let m=o[d],p=m,g=1;for(;o[d+g];){const x=o[d+g];if(!l(p,x,n,d,t))m+=x,p=x,g++;else break}d+=g-1,c.push(m)}return c}const AA=/\r\n|\r|\n/g;function MA(n,t,a,l,o,c,d,m){var St,j;const p=pA(n,t);if(A2(t.whiteSpace))for(let Q=0;Q<p.length;Q++){const ot=p[Q];p[Q]={text:ot.text.replace(AA," "),style:ot.style}}const x=[];let b=[];for(const Q of p){const ot=Q.text.split(TA);for(let rt=0;rt<ot.length;rt++){const gt=ot[rt];gt===`\r
307
- `||gt==="\r"||gt===`
308
- `?(x.push(b),b=[]):gt.length>0&&b.push({text:gt,style:Q.style})}}(b.length>0||x.length===0)&&x.push(b);const E=a?RA(x,t,l,o,d,m):x,C=[],M=[],z=[],R=[],w=[];let O=0;const U=t._fontString,Y=c(U);Y.fontSize===0&&(Y.fontSize=t.fontSize,Y.ascent=t.fontSize);let k="",V=!!t.dropShadow,Z=((St=t._stroke)==null?void 0:St.width)||0;for(const Q of E){let ot=0,rt=Y.ascent,gt=Y.descent,B="";for(const tt of Q){const pt=tt.style._fontString,bt=c(pt);pt!==k&&(l.font=pt,k=pt);const At=o(tt.text,tt.style.letterSpacing,l);ot+=At,rt=Math.max(rt,bt.ascent),gt=Math.max(gt,bt.descent),B+=tt.text;const Ot=((j=tt.style._stroke)==null?void 0:j.width)||0;Ot>Z&&(Z=Ot),!V&&tt.style.dropShadow&&(V=!0)}Q.length===0&&(rt=Y.ascent,gt=Y.descent),C.push(ot),M.push(rt),z.push(gt),w.push(B);const J=t.lineHeight||rt+gt;R.push(J+t.leading),O=Math.max(O,ot)}const F=Z,et=(a&&t.align!=="left"?Math.max(O,t.wordWrapWidth):O)+F+(t.dropShadow?t.dropShadow.distance:0);let ct=0;for(let Q=0;Q<R.length;Q++)ct+=R[Q];ct=Math.max(ct,R[0]+F);const vt=ct+(t.dropShadow?t.dropShadow.distance:0),dt=t.lineHeight||Y.fontSize;return{width:et,height:vt,lines:w,lineWidths:C,lineHeight:dt+t.leading,maxLineWidth:O,fontProperties:Y,runsByLine:E,lineAscents:M,lineDescents:z,lineHeights:R,hasDropShadow:V}}function RA(n,t,a,l,o,c){var R;const{letterSpacing:d,whiteSpace:m,wordWrapWidth:p,breakWords:g}=t,x=C2(m),b=p+d,E={};let C="";const M=(w,O)=>{const U=`${w}|${O.styleKey}`;let Y=E[U];if(Y===void 0){const k=O._fontString;k!==C&&(a.font=k,C=k),Y=l(w,O.letterSpacing,a)+O.letterSpacing,E[U]=Y}return Y},z=[];for(const w of n){const O=zA(w),U=z.length,Y=ct=>{let vt=0,dt=ct;do{const{token:St,style:j}=O[dt];vt+=M(St,j),dt++}while(dt<O.length&&O[dt].continuesFromPrevious);return vt},k=ct=>{const vt=[];let dt=ct;do vt.push({token:O[dt].token,style:O[dt].style}),dt++;while(dt<O.length&&O[dt].continuesFromPrevious);return vt};let V=[],Z=0,F=!x,q=null;const $=()=>{q&&q.text.length>0&&V.push(q),q=null},et=()=>{if($(),V.length>0){const ct=V[V.length-1];ct.text=lr(ct.text),ct.text.length===0&&V.pop()}z.push(V),V=[],Z=0,F=!1};for(let ct=0;ct<O.length;ct++){const{token:vt,style:dt,continuesFromPrevious:St}=O[ct],j=M(vt,dt);if(x){const rt=Pi(vt),gt=(q==null?void 0:q.text[q.text.length-1])??((R=V[V.length-1])==null?void 0:R.text.slice(-1))??"",B=gt?Pi(gt):!1;if(rt&&B)continue}const Q=!St,ot=Q?Y(ct):j;if(ot>b&&Q)if(Z>0&&et(),g){const rt=k(ct);for(let gt=0;gt<rt.length;gt++){const B=rt[gt].token,J=rt[gt].style,tt=R2(B,g,c,o);for(const pt of tt){const bt=M(pt,J);bt+Z>b&&et(),!q||q.style!==J?($(),q={text:pt,style:J}):q.text+=pt,Z+=bt}}ct+=rt.length-1}else{const rt=k(ct);$(),z.push(rt.map(gt=>({text:gt.token,style:gt.style}))),F=!1,ct+=rt.length-1}else if(ot+Z>b&&Q){if(Pi(vt)){F=!1;continue}et(),q={text:vt,style:dt},Z=j}else if(St&&!g)!q||q.style!==dt?($(),q={text:vt,style:dt}):q.text+=vt,Z+=j;else{const rt=Pi(vt);if(Z===0&&rt&&!F)continue;!q||q.style!==dt?($(),q={text:vt,style:dt}):q.text+=vt,Z+=j}}if($(),V.length>0){const ct=V[V.length-1];ct.text=lr(ct.text),ct.text.length===0&&V.pop()}(V.length>0||z.length===U)&&z.push(V)}return z}function zA(n){const t=[];let a=!1;for(const l of n){const o=M2(l.text);let c=!0;for(const d of o){const m=Pi(d)||Np(d),p=c&&a&&!m;t.push({token:d,style:l.style,continuesFromPrevious:p}),a=!m,c=!1}}return t}const wA={willReadFrequently:!0};function lx(n,t,a,l,o){let c=a[n];return typeof c!="number"&&(c=o(n,t,l)+t,a[n]=c),c}function DA(n,t,a,l,o,c,d){const m=a.getContext("2d",wA);m.font=t._fontString;let p=0,g="";const x=[],b=Object.create(null),{letterSpacing:E,whiteSpace:C}=t,M=C2(C),z=A2(C);let R=!M;const w=t.wordWrapWidth+E,O=M2(n);for(let Y=0;Y<O.length;Y++){let k=O[Y];if(Np(k)){if(!z){x.push(lr(g)),R=!M,g="",p=0;continue}k=" "}if(M){const Z=Pi(k),F=Pi(g[g.length-1]);if(Z&&F)continue}const V=lx(k,E,b,m,l);if(V>w)if(g!==""&&(x.push(lr(g)),g="",p=0),o(k,t.breakWords)){const Z=R2(k,t.breakWords,d,c);for(const F of Z){const q=lx(F,E,b,m,l);q+p>w&&(x.push(lr(g)),R=!1,g="",p=0),g+=F,p+=q}}else g.length>0&&(x.push(lr(g)),g="",p=0),x.push(lr(k)),R=!1,g="",p=0;else V+p>w&&(R=!1,x.push(lr(g)),g="",p=0),(g.length>0||!Pi(k)||R)&&(g+=k,p+=V)}const U=lr(g);return U.length>0&&x.push(U),x.join(`
309
- `)}const sx={willReadFrequently:!0},fr=class Lt{static get experimentalLetterSpacingSupported(){let t=Lt._experimentalLetterSpacingSupported;if(t===void 0){const a=bi.get().getCanvasRenderingContext2D().prototype;t=Lt._experimentalLetterSpacingSupported="letterSpacing"in a||"textLetterSpacing"in a}return t}constructor(t,a,l,o,c,d,m,p,g,x){this.text=t,this.style=a,this.width=l,this.height=o,this.lines=c,this.lineWidths=d,this.lineHeight=m,this.maxLineWidth=p,this.fontProperties=g,x&&(this.runsByLine=x.runsByLine,this.lineAscents=x.lineAscents,this.lineDescents=x.lineDescents,this.lineHeights=x.lineHeights,this.hasDropShadow=x.hasDropShadow)}static measureText(t=" ",a,l=Lt._canvas,o=a.wordWrap){var k;const c=`${t}-${a.styleKey}-wordWrap-${o}`;if(Lt._measurementCache.has(c))return Lt._measurementCache.get(c);if(T2(a)&&E2(t)){const V=MA(t,a,o,Lt._context,Lt._measureText,Lt.measureFont,Lt.canBreakChars,Lt.wordWrapSplit),Z=new Lt(t,a,V.width,V.height,V.lines,V.lineWidths,V.lineHeight,V.maxLineWidth,V.fontProperties,{runsByLine:V.runsByLine,lineAscents:V.lineAscents,lineDescents:V.lineDescents,lineHeights:V.lineHeights,hasDropShadow:V.hasDropShadow});return Lt._measurementCache.set(c,Z),Z}const m=a._fontString,p=Lt.measureFont(m);p.fontSize===0&&(p.fontSize=a.fontSize,p.ascent=a.fontSize,p.descent=0);const g=Lt._context;g.font=m;const b=(o?Lt._wordWrap(t,a,l):t).split(EA),E=new Array(b.length);let C=0;for(let V=0;V<b.length;V++){const Z=Lt._measureText(b[V],a.letterSpacing,g);E[V]=Z,C=Math.max(C,Z)}const M=((k=a._stroke)==null?void 0:k.width)??0,z=a.lineHeight||p.fontSize,R=Lt._getAlignWidth(C,a,o),w=Lt._adjustWidthForStyle(R,a),O=Math.max(z,p.fontSize+M)+(b.length-1)*(z+a.leading),U=Lt._adjustHeightForStyle(O,a),Y=new Lt(t,a,w,U,b,E,z+a.leading,C,p);return Lt._measurementCache.set(c,Y),Y}static _adjustWidthForStyle(t,a){var c;const l=((c=a._stroke)==null?void 0:c.width)||0;let o=t+l;return a.dropShadow&&(o+=a.dropShadow.distance),o}static _adjustHeightForStyle(t,a){let l=t;return a.dropShadow&&(l+=a.dropShadow.distance),l}static _getAlignWidth(t,a,l){return l&&a.align!=="left"?Math.max(t,a.wordWrapWidth):t}static _measureText(t,a,l){let o=!1;Lt.experimentalLetterSpacingSupported&&(Lt.experimentalLetterSpacing?(l.letterSpacing=`${a}px`,l.textLetterSpacing=`${a}px`,o=!0):(l.letterSpacing="0px",l.textLetterSpacing="0px"));const c=l.measureText(t);let d=c.width;const m=-(c.actualBoundingBoxLeft??0);let g=(c.actualBoundingBoxRight??0)-m;if(d>0)if(o)d-=a,g-=a;else{const x=(Lt.graphemeSegmenter(t).length-1)*a;d+=x,g+=x}return Math.max(d,g)}static _wordWrap(t,a,l=Lt._canvas){return DA(t,a,l,Lt._measureText,Lt.canBreakWords,Lt.canBreakChars,Lt.wordWrapSplit)}static isBreakingSpace(t,a){return Pi(t)}static canBreakWords(t,a){return a}static canBreakChars(t,a,l,o,c){return!0}static wordWrapSplit(t){return Lt.graphemeSegmenter(t)}static measureFont(t){if(Lt._fonts[t])return Lt._fonts[t];const a=Lt._context;a.font=t;const l=a.measureText(Lt.METRICS_STRING+Lt.BASELINE_SYMBOL),o=l.actualBoundingBoxAscent??0,c=l.actualBoundingBoxDescent??0,d={ascent:o,descent:c,fontSize:o+c};return Lt._fonts[t]=d,d}static clearMetrics(t=""){t?delete Lt._fonts[t]:Lt._fonts={}}static get _canvas(){if(!Lt.__canvas){let t;try{const a=new OffscreenCanvas(0,0),l=a.getContext("2d",sx);if(l!=null&&l.measureText)return Lt.__canvas=a,a;t=bi.get().createCanvas()}catch{t=bi.get().createCanvas()}t.width=t.height=10,Lt.__canvas=t}return Lt.__canvas}static get _context(){return Lt.__context||(Lt.__context=Lt._canvas.getContext("2d",sx)),Lt.__context}};fr.METRICS_STRING="|ÉqÅ";fr.BASELINE_SYMBOL="M";fr.BASELINE_MULTIPLIER=1.4;fr.HEIGHT_MULTIPLIER=2;fr.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const n=new Intl.Segmenter;return t=>{const a=n.segment(t),l=[];let o=0;for(const c of a)l[o++]=c.segment;return l}}return n=>[...n]})();fr.experimentalLetterSpacing=!1;fr._fonts={};fr._measurementCache=dA(1e3);let au=fr;const OA=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function Wy(n){const t=typeof n.fontSize=="number"?`${n.fontSize}px`:n.fontSize;let a=n.fontFamily;Array.isArray(n.fontFamily)||(a=n.fontFamily.split(","));for(let l=a.length-1;l>=0;l--){let o=a[l].trim();!/([\"\'])[^\'\"]+\1/.test(o)&&!OA.includes(o)&&(o=`"${o}"`),a[l]=o}return`${n.fontStyle} ${n.fontVariant} ${n.fontWeight} ${t} ${a.join(",")}`}const rx=1e5;function gp(n,t,a,l=0,o=0,c=0){if(n.texture===ze.WHITE&&!n.fill)return zn.shared.setValue(n.color).setAlpha(n.alpha??1).toHexa();if(n.fill){if(n.fill instanceof Kp){const d=n.fill,m=t.createPattern(d.texture.source.resource,"repeat"),p=d.transform.copyTo(le.shared);return p.scale(d.texture.source.pixelWidth,d.texture.source.pixelHeight),m.setTransform(p),m}else if(n.fill instanceof cr){const d=n.fill,m=d.type==="linear",p=d.textureSpace==="local";let g=1,x=1;p&&a&&(g=a.width+l,x=a.height+l);let b,E=!1;if(m){const{start:C,end:M}=d;b=t.createLinearGradient(C.x*g+o,C.y*x+c,M.x*g+o,M.y*x+c),E=Math.abs(M.x-C.x)<Math.abs((M.y-C.y)*.1)}else{const{center:C,innerRadius:M,outerCenter:z,outerRadius:R}=d;b=t.createRadialGradient(C.x*g+o,C.y*x+c,M*g,z.x*g+o,z.y*x+c,R*g)}if(E&&p&&a){const C=a.lineHeight/x;for(let M=0;M<a.lines.length;M++){const z=(M*a.lineHeight+l/2)/x;d.colorStops.forEach(R=>{let w=z+R.offset*C;w=Math.max(0,Math.min(1,w)),b.addColorStop(Math.floor(w*rx)/rx,zn.shared.setValue(R.color).toHex())})}}else d.colorStops.forEach(C=>{b.addColorStop(C.offset,zn.shared.setValue(C.color).toHex())});return b}}else{const d=t.createPattern(n.texture.source.resource,"repeat"),m=n.matrix.copyTo(le.shared);return m.scale(n.texture.source.pixelWidth,n.texture.source.pixelHeight),d.setTransform(m),d}return Ya("FillStyle not recognised",n),"red"}const ux=new mn;function Xc(n){let t=0;for(let a=0;a<n.length;a++)n.charCodeAt(a)===32&&t++;return t}class NA{getCanvasAndContext(t){const{text:a,style:l,resolution:o=1}=t,c=l._getFinalPadding(),d=au.measureText(a||" ",l),m=Math.ceil(Math.ceil(Math.max(1,d.width)+c*2)*o),p=Math.ceil(Math.ceil(Math.max(1,d.height)+c*2)*o),g=Fy.getOptimalCanvasAndContext(m,p);this._renderTextToCanvas(l,c,o,g,d);const x=l.trim?fA({canvas:g.canvas,width:m,height:p,resolution:1,output:ux}):ux.set(0,0,m,p);return{canvasAndContext:g,frame:x}}returnCanvasAndContext(t){Fy.returnCanvasAndContext(t)}_renderTextToCanvas(t,a,l,o,c){var V,Z,F;if(c.runsByLine&&c.runsByLine.length>0){this._renderTaggedTextToCanvas(c,t,a,l,o);return}const{canvas:d,context:m}=o,p=Wy(t),g=c.lines,x=c.lineHeight,b=c.lineWidths,E=c.maxLineWidth,C=c.fontProperties,M=d.height;if(m.resetTransform(),m.scale(l,l),m.textBaseline=t.textBaseline,(V=t._stroke)!=null&&V.width){const q=t._stroke;m.lineWidth=q.width,m.miterLimit=q.miterLimit,m.lineJoin=q.join,m.lineCap=q.cap}m.font=p;let z,R;const w=t.dropShadow?2:1,O=t.wordWrap?t.wordWrapWidth:E,Y=(((Z=t._stroke)==null?void 0:Z.width)??0)/2;let k=(x-C.fontSize)/2;x-C.fontSize<0&&(k=0);for(let q=0;q<w;++q){const $=t.dropShadow&&q===0,et=$?Math.ceil(Math.max(1,M)+a*2):0,ct=et*l;if($)this._setupDropShadow(m,t,l,ct);else{const vt=t._gradientBounds,dt=t._gradientOffset;if(vt){const St={width:vt.width,height:vt.height,lineHeight:vt.height,lines:c.lines};this._setFillAndStrokeStyles(m,t,St,a,Y,(dt==null?void 0:dt.x)??0,(dt==null?void 0:dt.y)??0)}else dt?this._setFillAndStrokeStyles(m,t,c,a,Y,dt.x,dt.y):this._setFillAndStrokeStyles(m,t,c,a,Y);m.shadowColor="rgba(0,0,0,0)"}for(let vt=0;vt<g.length;vt++){z=Y,R=Y+vt*x+C.ascent+k,z+=this._getAlignmentOffset(b[vt],O,t.align);let dt=0;if(t.align==="justify"&&t.wordWrap&&vt<g.length-1){const St=Xc(g[vt]);St>0&&(dt=(O-b[vt])/St)}(F=t._stroke)!=null&&F.width&&this._drawLetterSpacing(g[vt],t,o,z+a,R+a-et,!0,dt),t._fill!==void 0&&this._drawLetterSpacing(g[vt],t,o,z+a,R+a-et,!1,dt)}}}_renderTaggedTextToCanvas(t,a,l,o,c){var Y,k,V;const{canvas:d,context:m}=c,{runsByLine:p,lineWidths:g,maxLineWidth:x,lineAscents:b,lineHeights:E,hasDropShadow:C}=t,M=d.height;m.resetTransform(),m.scale(o,o),m.textBaseline=a.textBaseline;const z=C?2:1,R=a.wordWrap?a.wordWrapWidth:x;let w=((Y=a._stroke)==null?void 0:Y.width)??0;for(const Z of p)for(const F of Z){const q=((k=F.style._stroke)==null?void 0:k.width)??0;q>w&&(w=q)}const O=w/2,U=[];for(let Z=0;Z<p.length;Z++){const F=p[Z],q=[];for(const $ of F){const et=Wy($.style);m.font=et,q.push({width:au._measureText($.text,$.style.letterSpacing,m),font:et})}U.push(q)}for(let Z=0;Z<z;++Z){const F=C&&Z===0,q=F?Math.ceil(Math.max(1,M)+l*2):0,$=q*o;F||(m.shadowColor="rgba(0,0,0,0)");let et=O;for(let ct=0;ct<p.length;ct++){const vt=p[ct],dt=g[ct],St=b[ct],j=E[ct],Q=U[ct];let ot=O;ot+=this._getAlignmentOffset(dt,R,a.align);let rt=0;if(a.align==="justify"&&a.wordWrap&&ct<p.length-1){let J=0;for(const tt of vt)J+=Xc(tt.text);J>0&&(rt=(R-dt)/J)}const gt=et+St;let B=ot+l;for(let J=0;J<vt.length;J++){const tt=vt[J],{width:pt,font:bt}=Q[J];if(m.font=bt,m.textBaseline=tt.style.textBaseline,(V=tt.style._stroke)!=null&&V.width){const Ot=tt.style._stroke;if(m.lineWidth=Ot.width,m.miterLimit=Ot.miterLimit,m.lineJoin=Ot.join,m.lineCap=Ot.cap,F)if(tt.style.dropShadow)this._setupDropShadow(m,tt.style,o,$);else{const fe=Xc(tt.text);B+=pt+fe*rt;continue}else{const fe=au.measureFont(bt),ce=tt.style.lineHeight||fe.fontSize,ga={width:pt,height:ce,lineHeight:ce,lines:[tt.text]};m.strokeStyle=gp(Ot,m,ga,l*2,B-l,et)}this._drawLetterSpacing(tt.text,tt.style,c,B,gt+l-q,!0,rt)}const At=Xc(tt.text);B+=pt+At*rt}B=ot+l;for(let J=0;J<vt.length;J++){const tt=vt[J],{width:pt,font:bt}=Q[J];if(m.font=bt,m.textBaseline=tt.style.textBaseline,tt.style._fill!==void 0){if(F)if(tt.style.dropShadow)this._setupDropShadow(m,tt.style,o,$);else{const Ot=Xc(tt.text);B+=pt+Ot*rt;continue}else{const Ot=au.measureFont(bt),fe=tt.style.lineHeight||Ot.fontSize,ce={width:pt,height:fe,lineHeight:fe,lines:[tt.text]};m.fillStyle=gp(tt.style._fill,m,ce,l*2,B-l,et)}this._drawLetterSpacing(tt.text,tt.style,c,B,gt+l-q,!1,rt)}const At=Xc(tt.text);B+=pt+At*rt}et+=j}}}_setFillAndStrokeStyles(t,a,l,o,c,d=0,m=0){var p;if(t.fillStyle=a._fill?gp(a._fill,t,l,o*2,d,m):null,(p=a._stroke)!=null&&p.width){const g=c+o*2;t.strokeStyle=gp(a._stroke,t,l,g,d,m)}}_setupDropShadow(t,a,l,o){t.fillStyle="black",t.strokeStyle="black";const c=a.dropShadow,d=c.color,m=c.alpha;t.shadowColor=zn.shared.setValue(d).setAlpha(m).toRgbaString();const p=c.blur*l,g=c.distance*l;t.shadowBlur=p,t.shadowOffsetX=Math.cos(c.angle)*g,t.shadowOffsetY=Math.sin(c.angle)*g+o}_getAlignmentOffset(t,a,l){return l==="right"?a-t:l==="center"?(a-t)/2:0}_drawLetterSpacing(t,a,l,o,c,d=!1,m=0){const{context:p}=l,g=a.letterSpacing;let x=!1;if(au.experimentalLetterSpacingSupported&&(au.experimentalLetterSpacing?(p.letterSpacing=`${g}px`,p.textLetterSpacing=`${g}px`,x=!0):(p.letterSpacing="0px",p.textLetterSpacing="0px")),(g===0||x)&&m===0){d?p.strokeText(t,o,c):p.fillText(t,o,c);return}if(m!==0&&(g===0||x)){const z=t.split(" ");let R=o;const w=p.measureText(" ").width;for(let O=0;O<z.length;O++)d?p.strokeText(z[O],R,c):p.fillText(z[O],R,c),R+=p.measureText(z[O]).width+w+m;return}let b=o;const E=au.graphemeSegmenter(t);let C=p.measureText(t).width,M=0;for(let z=0;z<E.length;++z){const R=E[z];d?p.strokeText(R,b,c):p.fillText(R,b,c);let w="";for(let O=z+1;O<E.length;++O)w+=E[O];M=p.measureText(w).width,b+=C-M+g,R===" "&&(b+=m),C=M}}}const Fc=new NA,Eg=class go extends _s{constructor(t={}){super(),this.uid=on("textStyle"),this._tick=0,this._cachedFontString=null,BA(t),t instanceof go&&(t=t._toObject());const o={...go.defaultTextStyle,...t};for(const c in o){const d=c;this[d]=o[c]}this._tagStyles=t.tagStyles??void 0,this.update(),this._tick=0}get align(){return this._align}set align(t){this._align!==t&&(this._align=t,this.update())}get breakWords(){return this._breakWords}set breakWords(t){this._breakWords!==t&&(this._breakWords=t,this.update())}get dropShadow(){return this._dropShadow}set dropShadow(t){this._dropShadow!==t&&(t!==null&&typeof t=="object"?this._dropShadow=this._createProxy({...go.defaultDropShadow,...t}):this._dropShadow=t?this._createProxy({...go.defaultDropShadow}):null,this.update())}get fontFamily(){return this._fontFamily}set fontFamily(t){this._fontFamily!==t&&(this._fontFamily=t,this.update())}get fontSize(){return this._fontSize}set fontSize(t){this._fontSize!==t&&(typeof t=="string"?this._fontSize=parseInt(t,10):this._fontSize=t,this.update())}get fontStyle(){return this._fontStyle}set fontStyle(t){this._fontStyle!==t&&(this._fontStyle=t.toLowerCase(),this.update())}get fontVariant(){return this._fontVariant}set fontVariant(t){this._fontVariant!==t&&(this._fontVariant=t,this.update())}get fontWeight(){return this._fontWeight}set fontWeight(t){this._fontWeight!==t&&(this._fontWeight=t,this.update())}get leading(){return this._leading}set leading(t){this._leading!==t&&(this._leading=t,this.update())}get letterSpacing(){return this._letterSpacing}set letterSpacing(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.update())}get lineHeight(){return this._lineHeight}set lineHeight(t){this._lineHeight!==t&&(this._lineHeight=t,this.update())}get padding(){return this._padding}set padding(t){this._padding!==t&&(this._padding=t,this.update())}get filters(){return this._filters}set filters(t){this._filters!==t&&(this._filters=Object.freeze(t),this.update())}get trim(){return this._trim}set trim(t){this._trim!==t&&(this._trim=t,this.update())}get textBaseline(){return this._textBaseline}set textBaseline(t){this._textBaseline!==t&&(this._textBaseline=t,this.update())}get whiteSpace(){return this._whiteSpace}set whiteSpace(t){this._whiteSpace!==t&&(this._whiteSpace=t,this.update())}get wordWrap(){return this._wordWrap}set wordWrap(t){this._wordWrap!==t&&(this._wordWrap=t,this.update())}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.update())}get fill(){return this._originalFill}set fill(t){t!==this._originalFill&&(this._originalFill=t,this._isFillStyle(t)&&(this._originalFill=this._createProxy({...Rl.defaultFillStyle,...t},()=>{this._fill=xo({...this._originalFill},Rl.defaultFillStyle)})),this._fill=xo(t===0?"black":t,Rl.defaultFillStyle),this.update())}get stroke(){return this._originalStroke}set stroke(t){t!==this._originalStroke&&(this._originalStroke=t,this._isFillStyle(t)&&(this._originalStroke=this._createProxy({...Rl.defaultStrokeStyle,...t},()=>{this._stroke=Op({...this._originalStroke},Rl.defaultStrokeStyle)})),this._stroke=Op(t,Rl.defaultStrokeStyle),this.update())}get tagStyles(){return this._tagStyles}set tagStyles(t){this._tagStyles!==t&&(this._tagStyles=t??void 0,this.update())}update(){this._tick++,this._cachedFontString=null,this.emit("update",this)}reset(){const t=go.defaultTextStyle;for(const a in t)this[a]=t[a]}assign(t){for(const a in t){const l=a;this[l]=t[a]}return this}get styleKey(){return`${this.uid}-${this._tick}`}get _fontString(){return this._cachedFontString===null&&(this._cachedFontString=Wy(this)),this._cachedFontString}_toObject(){return{align:this.align,breakWords:this.breakWords,dropShadow:this._dropShadow?{...this._dropShadow}:null,fill:this._fill?{...this._fill}:void 0,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontVariant:this.fontVariant,fontWeight:this.fontWeight,leading:this.leading,letterSpacing:this.letterSpacing,lineHeight:this.lineHeight,padding:this.padding,stroke:this._stroke?{...this._stroke}:void 0,textBaseline:this.textBaseline,trim:this.trim,whiteSpace:this.whiteSpace,wordWrap:this.wordWrap,wordWrapWidth:this.wordWrapWidth,filters:this._filters?[...this._filters]:void 0,tagStyles:this._tagStyles?{...this._tagStyles}:void 0}}clone(){return new go(this._toObject())}_getFinalPadding(){let t=0;if(this._filters)for(let a=0;a<this._filters.length;a++)t+=this._filters[a].padding;return Math.max(this._padding,t)}destroy(t=!1){var l,o,c,d;if(this.removeAllListeners(),typeof t=="boolean"?t:t==null?void 0:t.texture){const m=typeof t=="boolean"?t:t==null?void 0:t.textureSource;(l=this._fill)!=null&&l.texture&&this._fill.texture.destroy(m),(o=this._originalFill)!=null&&o.texture&&this._originalFill.texture.destroy(m),(c=this._stroke)!=null&&c.texture&&this._stroke.texture.destroy(m),(d=this._originalStroke)!=null&&d.texture&&this._originalStroke.texture.destroy(m)}this._fill=null,this._stroke=null,this.dropShadow=null,this._originalStroke=null,this._originalFill=null}_createProxy(t,a){return new Proxy(t,{set:(l,o,c)=>(l[o]===c||(l[o]=c,a==null||a(o,c),this.update()),!0)})}_isFillStyle(t){return(t??null)!==null&&!(zn.isColorLike(t)||t instanceof cr||t instanceof Kp)}};Eg.defaultDropShadow={alpha:1,angle:Math.PI/6,blur:0,color:"black",distance:5};Eg.defaultTextStyle={align:"left",breakWords:!1,dropShadow:null,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,padding:0,stroke:null,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};let So=Eg;function BA(n){const t=n;if(typeof t.dropShadow=="boolean"&&t.dropShadow){const a=So.defaultDropShadow;n.dropShadow={alpha:t.dropShadowAlpha??a.alpha,angle:t.dropShadowAngle??a.angle,blur:t.dropShadowBlur??a.blur,color:t.dropShadowColor??a.color,distance:t.dropShadowDistance??a.distance}}if(t.strokeThickness!==void 0){de(un,"strokeThickness is now a part of stroke");const a=t.stroke;let l={};if(zn.isColorLike(a))l.color=a;else if(a instanceof cr||a instanceof Kp)l.fill=a;else if(Object.hasOwnProperty.call(a,"color")||Object.hasOwnProperty.call(a,"fill"))l=a;else throw new Error("Invalid stroke value.");n.stroke={...l,width:t.strokeThickness}}if(Array.isArray(t.fillGradientStops)){if(de(un,"gradient fill is now a fill pattern: `new FillGradient(...)`"),!Array.isArray(t.fill)||t.fill.length===0)throw new Error("Invalid fill value. Expected an array of colors for gradient fill.");t.fill.length!==t.fillGradientStops.length&&Ya("The number of fill colors must match the number of fill gradient stops.");const a=new cr({start:{x:0,y:0},end:{x:0,y:1},textureSpace:"local"}),l=t.fillGradientStops.slice(),o=t.fill.map(c=>zn.shared.setValue(c).toNumber());l.forEach((c,d)=>{a.addColorStop(c,o[d])}),n.fill={fill:a}}}function UA(n,t){const{texture:a,bounds:l}=n,o=t._style._getFinalPadding();m_(l,t._anchor,a);const c=t._anchor._x*o*2,d=t._anchor._y*o*2;l.minX-=o-c,l.minY-=o-d,l.maxX-=o-c,l.maxY-=o-d}class HA{constructor(){this.batcherName="default",this.topology="triangle-list",this.attributeSize=4,this.indexSize=6,this.packAsQuad=!0,this.roundPixels=0,this._attributeStart=0,this._batcher=null,this._batch=null}get blendMode(){return this.renderable.groupBlendMode}get color(){return this.renderable.groupColorAlpha}reset(){this.renderable=null,this.texture=null,this._batcher=null,this._batch=null,this.bounds=null}destroy(){this.reset()}}class jA extends HA{}class z2{constructor(t){this._renderer=t,t.runners.resolutionChange.add(this),this._managedTexts=new Sd({renderer:t,type:"renderable",onUnload:this.onTextUnload.bind(this),name:"canvasText"})}resolutionChange(){for(const t in this._managedTexts.items){const a=this._managedTexts.items[t];a!=null&&a._autoResolution&&a.onViewUpdate()}}validateRenderable(t){const a=this._getGpuText(t),l=t.styleKey;return a.currentKey!==l?!0:t._didTextUpdate}addRenderable(t,a){const l=this._getGpuText(t);if(t._didTextUpdate){const o=t._autoResolution?this._renderer.resolution:t.resolution;(l.currentKey!==t.styleKey||t._resolution!==o)&&this._updateGpuText(t),t._didTextUpdate=!1,UA(l,t)}this._renderer.renderPipes.batch.addToBatch(l,a)}updateRenderable(t){const a=this._getGpuText(t);a._batcher.updateElement(a)}_updateGpuText(t){const a=this._getGpuText(t);a.texture&&this._renderer.canvasText.decreaseReferenceCount(a.currentKey),t._resolution=t._autoResolution?this._renderer.resolution:t.resolution,a.texture=this._renderer.canvasText.getManagedTexture(t),a.currentKey=t.styleKey}_getGpuText(t){return t._gpuData[this._renderer.uid]||this.initGpuText(t)}initGpuText(t){const a=new jA;return a.currentKey="--",a.renderable=t,a.transform=t.groupTransform,a.bounds={minX:0,maxX:1,minY:0,maxY:0},a.roundPixels=this._renderer._roundPixels|t._roundPixels,t._gpuData[this._renderer.uid]=a,this._managedTexts.add(t),a}onTextUnload(t){const a=t._gpuData[this._renderer.uid];if(!a)return;const{canvasText:l}=this._renderer;l.getReferenceCount(a.currentKey)>0?l.decreaseReferenceCount(a.currentKey):a.texture&&l.returnTexture(a.texture)}destroy(){this._managedTexts.destroy(),this._renderer=null}}z2.extension={type:[Wt.WebGLPipes,Wt.WebGPUPipes,Wt.CanvasPipes],name:"text"};const GA=new Ii;function YA(n,t,a,l,o=!1){const c=GA;c.minX=0,c.minY=0,c.maxX=n.width/l|0,c.maxY=n.height/l|0;const d=Xp.getOptimalTexture(c.width,c.height,l,!1,o);return d.source.uploadMethodId="image",d.source.resource=n,d.source.alphaMode="premultiply-alpha-on-upload",d.frame.width=t/l,d.frame.height=a/l,d.source.emit("update",d.source),d.updateUvs(),d}class w2{constructor(t,a){this._activeTextures={},this._renderer=t,this._retainCanvasContext=a}getTexture(t,a,l,o){typeof t=="string"&&(de("8.0.0","CanvasTextSystem.getTexture: Use object TextOptions instead of separate arguments"),t={text:t,style:l,resolution:a}),t.style instanceof So||(t.style=new So(t.style)),t.textureStyle instanceof ef||(t.textureStyle=new ef(t.textureStyle)),typeof t.text!="string"&&(t.text=t.text.toString());const{text:c,style:d,textureStyle:m,autoGenerateMipmaps:p}=t,g=t.resolution??this._renderer.resolution,{frame:x,canvasAndContext:b}=Fc.getCanvasAndContext({text:c,style:d,resolution:g}),E=YA(b.canvas,x.width,x.height,g,p);if(m&&(E.source.style=m),d.trim&&(x.pad(d.padding),E.frame.copyFrom(x),E.frame.scale(1/g),E.updateUvs()),d.filters){const C=this._applyFilters(E,d.filters);return this.returnTexture(E),Fc.returnCanvasAndContext(b),C}return this._renderer.texture.initSource(E._source),this._retainCanvasContext||Fc.returnCanvasAndContext(b),E}returnTexture(t){const a=t.source,l=a.resource;if(this._retainCanvasContext&&(l!=null&&l.getContext)){const o=l.getContext("2d");o&&Fc.returnCanvasAndContext({canvas:l,context:o})}a.resource=null,a.uploadMethodId="unknown",a.alphaMode="no-premultiply-alpha",Xp.returnTexture(t,!0)}renderTextToCanvas(){de("8.10.0","CanvasTextSystem.renderTextToCanvas: no longer supported, use CanvasTextSystem.getTexture instead")}getManagedTexture(t){t._resolution=t._autoResolution?this._renderer.resolution:t.resolution;const a=t.styleKey;if(this._activeTextures[a])return this._increaseReferenceCount(a),this._activeTextures[a].texture;const l=this.getTexture({text:t.text,style:t.style,resolution:t._resolution,textureStyle:t.textureStyle,autoGenerateMipmaps:t.autoGenerateMipmaps});return this._activeTextures[a]={texture:l,usageCount:1},l}decreaseReferenceCount(t){const a=this._activeTextures[t];a&&(a.usageCount--,a.usageCount===0&&(this.returnTexture(a.texture),this._activeTextures[t]=null))}getReferenceCount(t){var a;return((a=this._activeTextures[t])==null?void 0:a.usageCount)??0}_increaseReferenceCount(t){this._activeTextures[t].usageCount++}_applyFilters(t,a){const l=this._renderer.renderTarget.renderTarget,o=this._renderer.filter.generateFilteredTexture({texture:t,filters:a});return this._renderer.renderTarget.bind(l,!1),o}destroy(){this._renderer=null;for(const t in this._activeTextures)this._activeTextures[t]&&this.returnTexture(this._activeTextures[t].texture);this._activeTextures=null}}class D2 extends w2{constructor(t){super(t,!0)}}D2.extension={type:[Wt.CanvasSystem],name:"canvasText"};class O2 extends w2{constructor(t){super(t,!1)}}O2.extension={type:[Wt.WebGLSystem,Wt.WebGPUSystem],name:"canvasText"};Ie.add(D2);Ie.add(O2);Ie.add(z2);class Zp extends rA{constructor(...t){const a=uA(t,"Text");super(a,So),this.renderPipeId="text",a.textureStyle&&(this.textureStyle=a.textureStyle instanceof ef?a.textureStyle:new ef(a.textureStyle)),this.autoGenerateMipmaps=a.autoGenerateMipmaps??$i.defaultOptions.autoGenerateMipmaps}updateBounds(){const t=this._bounds,a=this._anchor;let l=0,o=0;if(this._style.trim){const{frame:c,canvasAndContext:d}=Fc.getCanvasAndContext({text:this.text,style:this._style,resolution:1});Fc.returnCanvasAndContext(d),l=c.width,o=c.height}else{const c=au.measureText(this._text,this._style);l=c.width,o=c.height}t.minX=-a._x*l,t.maxX=t.minX+l,t.minY=-a._y*o,t.maxY=t.minY+o}}Ie.add(f3,h3);var yy={exports:{}},ar={};/**
310
- * @license React
311
- * react-reconciler-constants.production.js
312
- *
313
- * Copyright (c) Meta Platforms, Inc. and affiliates.
314
- *
315
- * This source code is licensed under the MIT license found in the
316
- * LICENSE file in the root directory of this source tree.
317
- */var ox;function qA(){return ox||(ox=1,ar.ConcurrentRoot=1,ar.ContinuousEventPriority=8,ar.DefaultEventPriority=32,ar.DiscreteEventPriority=2,ar.IdleEventPriority=268435456,ar.LegacyRoot=0,ar.NoEventPriority=0),ar}var cx;function LA(){return cx||(cx=1,yy.exports=qA()),yy.exports}var Wc=LA();const Cg=G.createContext({}),XA=Cg.Provider;Cg.Consumer;function N2(n,t){const a=Object.getPrototypeOf(n),l=Object.getOwnPropertyDescriptor(a,t);return!(typeof l>"u"||l.writable||l.set)}const su={currentUpdatePriority:Wc.DefaultEventPriority,unmountQueue:new Set};function fx(n,...t){}function B2(n,t={}){const a=n;return a.__pixireact=Object.assign({filters:[],parent:null,root:null,type:""},t),a}var VA="0.0.0-development",kA={version:VA};function QA(){}function U2(n,t,a){t instanceof bo&&(t.__pixireact.parent=n,typeof a=="number"?n.__pixireact.filters.splice(a,0,t):n.__pixireact.filters.push(t),n.filters=n.__pixireact.filters)}function gy(n,t){t&&(t instanceof $n?n.addChild(t):t instanceof bo&&U2(n,t))}function KA(){}function ZA(){return!1}const Py=Object.freeze({onclick:"onClick",onglobalmousemove:"onGlobalMouseMove",onglobalpointermove:"onGlobalPointerMove",onglobaltouchmove:"onGlobalTouchMove",onmousedown:"onMouseDown",onmouseenter:"onMouseEnter",onmouseleave:"onMouseLeave",onmousemove:"onMouseMove",onmouseout:"onMouseOut",onmouseover:"onMouseOver",onmouseup:"onMouseUp",onmouseupoutside:"onMouseUpOutside",onpointercancel:"onPointerCancel",onpointerdown:"onPointerDown",onpointerenter:"onPointerEnter",onpointerleave:"onPointerLeave",onpointermove:"onPointerMove",onpointerout:"onPointerOut",onpointerover:"onPointerOver",onpointertap:"onPointerTap",onpointerup:"onPointerUp",onpointerupoutside:"onPointerUpOutside",onrightclick:"onRightClick",onrightdown:"onRightDown",onrightup:"onRightUp",onrightupoutside:"onRightUpOutside",ontap:"onTap",ontouchcancel:"onTouchCancel",ontouchend:"onTouchEnd",ontouchendoutside:"onTouchEndOutside",ontouchmove:"onTouchMove",ontouchstart:"onTouchStart",onwheel:"onWheel"}),Bp=Object.freeze({onClick:"onclick",onGlobalMouseMove:"onglobalmousemove",onGlobalPointerMove:"onglobalpointermove",onGlobalTouchMove:"onglobaltouchmove",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseUpOutside:"onmouseupoutside",onPointerCancel:"onpointercancel",onPointerDown:"onpointerdown",onPointerEnter:"onpointerenter",onPointerLeave:"onpointerleave",onPointerMove:"onpointermove",onPointerOut:"onpointerout",onPointerOver:"onpointerover",onPointerTap:"onpointertap",onPointerUp:"onpointerup",onPointerUpOutside:"onpointerupoutside",onRightClick:"onrightclick",onRightDown:"onrightdown",onRightUp:"onrightup",onRightUpOutside:"onrightupoutside",onTap:"ontap",onTouchCancel:"ontouchcancel",onTouchEnd:"ontouchend",onTouchEndOutside:"ontouchendoutside",onTouchMove:"ontouchmove",onTouchStart:"ontouchstart",onWheel:"onwheel"});function H2(n){return Array.isArray(n)}function j2(n,t,a={arrays:"reference",objects:"reference",strict:!0}){const{arrays:l,objects:o,strict:c}=a;if(typeof n!=typeof t||!!n!=!!t)return!1;if(PA(n)||FA(n))return n===t;const d=WA(n);if(d&&o==="reference")return n===t;const m=H2(n);if(m&&l==="reference")return n===t;if((m||d)&&n===t)return!0;let p;for(p in n)if(!(p in t))return!1;let g=n;if(c&&(g=t),d&&l==="shallow"&&o==="shallow"){for(p in g)if(!j2(n[p],t[p],{strict:c,objects:"reference"}))return!1}else for(p in g)if(n[p]!==t[p])return!1;if(G2(p)){if(m&&n.length===0&&t.length===0||d&&Object.keys(n).length===0&&Object.keys(t).length===0)return!0;if(n!==t)return!1}return!0}function JA(n){return n===null}function FA(n){return typeof n=="number"}function WA(n){return!(n!==Object(n)||H2(n)||typeof n=="function")}function PA(n){return typeof n=="string"}function G2(n){return n===void 0}const IA=Object.freeze(["children","key","ref"]);function $A(n,t=[]){const a={};return Object.entries(n).reduce((l,[o,c])=>(t.includes(o)||(l[o]=c),l),a)}function Iy(n,t=[]){return $A(n,IA.concat(t))}const t5="__default";function Y2(n,t={},a=!1){const l=Iy(n),o=Iy(t),c=Object.entries(l),d=[];if(a){const m=Object.keys(o);let p=0;for(;p<m.length;){const g=m[p];!(g in l)&&c.unshift([g,`${t5}remove`]),p+=1}}return c.forEach(([m,p])=>{if(j2(p,o[m]))return;if(m in Bp){d.push([m,p,!0,[]]);return}let g=[];m.includes("-")&&(g=m.split("-")),d.push([m,p,!1,g]);for(const x in l){const b=l[x];x.startsWith(`${m}-`)&&d.push([x,b,!1,x.split("-")])}}),{changes:d}}function e5(n){const t=n;return!(!t||!t.changes)}const n5="__default",hx=new Map,dx={};function mx(n,t){if(n){const a=n[t];if(!G2(a)&&!JA(a))return a}return n}function q2(n,t){const{__pixireact:a={},...l}=n;let o;e5(t)?o=t:o=Y2(t,l);const{changes:c}=o;let d=0;for(;d<c.length;){const m=c[d];let p=!1,g=m[0],x=m[1];const b=m[2],E=m[3];let C=n,M=C[g];if(g==="draw"&&typeof x=="function"&&(n instanceof ni?x(n):(p=!0,fx("warn",`The \`draw\` prop was used on a \`${a.type}\` component, but it's only valid on \`graphics\` components.`))),g in Py){const z=g;p=!0,dx[g]||(dx[g]=!0,fx("warn",`Event names must be pascal case; instead of \`${g}\`, you probably want \`${Py[z]}\`.`))}if(!p){if(E.length&&(M=E.reduce(mx,C),!(M&&M.set))){const[z,...R]=E.reverse();C=R.reverse().reduce(mx,C),g=z}if(x===`${n5}remove`)if(C instanceof $n){let z=hx.get(C.constructor);z||(z=C.constructor,z=new z,hx.set(C.constructor,z)),x=z[g]}else x=0;if(b&&a){const R=Bp[g];x?C[R]=x:delete C[R]}else N2(C,g)||(C[g]=x)}d+=1}return n}function a5(n,t,a,l){const{children:o,...c}=l,{children:d,...m}=a,p=Y2(c,m,!0);return p.changes.length?p:null}function i5(n,t,a,l){const o=a5(n,t,a,l);o&&q2(n,o)}const l5=Object.freeze([...Object.keys(Py),"draw"]),$y={};function s5(n){const t=n.charAt(0),a=n.substring(1);return`${t.toUpperCase()}${a}`}function r5(n,t){return t.toLowerCase()}function u5(n){let t=n;return n.startsWith("pixi")&&(t=n.replace(/^pixi([A-Z])/,r5)),t}function o5(n,t,a){const l=u5(n),o=s5(l);if(!(o in $y))throw new Error(`${o} is not part of the PIXI namespace! Did you forget to extend?`);const c=$y[o],d=Iy(t,l5);Object.entries(t).forEach(([p,g])=>{if(p in Bp){const x=Bp[p];d[x]=g}});const m=B2(new c(d),{root:a,type:l});return q2(m,t),m}var vy={exports:{}},xy={exports:{}},_y={exports:{}},Sy={};/**
318
- * @license React
319
- * scheduler.production.js
320
- *
321
- * Copyright (c) Meta Platforms, Inc. and affiliates.
322
- *
323
- * This source code is licensed under the MIT license found in the
324
- * LICENSE file in the root directory of this source tree.
325
- */var px;function c5(){return px||(px=1,(function(n){function t(j,Q){var ot=j.length;j.push(Q);t:for(;0<ot;){var rt=ot-1>>>1,gt=j[rt];if(0<o(gt,Q))j[rt]=Q,j[ot]=gt,ot=rt;else break t}}function a(j){return j.length===0?null:j[0]}function l(j){if(j.length===0)return null;var Q=j[0],ot=j.pop();if(ot!==Q){j[0]=ot;t:for(var rt=0,gt=j.length,B=gt>>>1;rt<B;){var J=2*(rt+1)-1,tt=j[J],pt=J+1,bt=j[pt];if(0>o(tt,ot))pt<gt&&0>o(bt,tt)?(j[rt]=bt,j[pt]=ot,rt=pt):(j[rt]=tt,j[J]=ot,rt=J);else if(pt<gt&&0>o(bt,ot))j[rt]=bt,j[pt]=ot,rt=pt;else break t}}return Q}function o(j,Q){var ot=j.sortIndex-Q.sortIndex;return ot!==0?ot:j.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var p=[],g=[],x=1,b=null,E=3,C=!1,M=!1,z=!1,R=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function U(j){for(var Q=a(g);Q!==null;){if(Q.callback===null)l(g);else if(Q.startTime<=j)l(g),Q.sortIndex=Q.expirationTime,t(p,Q);else break;Q=a(g)}}function Y(j){if(z=!1,U(j),!M)if(a(p)!==null)M=!0,dt();else{var Q=a(g);Q!==null&&St(Y,Q.startTime-j)}}var k=!1,V=-1,Z=5,F=-1;function q(){return!(n.unstable_now()-F<Z)}function $(){if(k){var j=n.unstable_now();F=j;var Q=!0;try{t:{M=!1,z&&(z=!1,w(V),V=-1),C=!0;var ot=E;try{e:{for(U(j),b=a(p);b!==null&&!(b.expirationTime>j&&q());){var rt=b.callback;if(typeof rt=="function"){b.callback=null,E=b.priorityLevel;var gt=rt(b.expirationTime<=j);if(j=n.unstable_now(),typeof gt=="function"){b.callback=gt,U(j),Q=!0;break e}b===a(p)&&l(p),U(j)}else l(p);b=a(p)}if(b!==null)Q=!0;else{var B=a(g);B!==null&&St(Y,B.startTime-j),Q=!1}}break t}finally{b=null,E=ot,C=!1}Q=void 0}}finally{Q?et():k=!1}}}var et;if(typeof O=="function")et=function(){O($)};else if(typeof MessageChannel<"u"){var ct=new MessageChannel,vt=ct.port2;ct.port1.onmessage=$,et=function(){vt.postMessage(null)}}else et=function(){R($,0)};function dt(){k||(k=!0,et())}function St(j,Q){V=R(function(){j(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(j){j.callback=null},n.unstable_continueExecution=function(){M||C||(M=!0,dt())},n.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<j?Math.floor(1e3/j):5},n.unstable_getCurrentPriorityLevel=function(){return E},n.unstable_getFirstCallbackNode=function(){return a(p)},n.unstable_next=function(j){switch(E){case 1:case 2:case 3:var Q=3;break;default:Q=E}var ot=E;E=Q;try{return j()}finally{E=ot}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(j,Q){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var ot=E;E=j;try{return Q()}finally{E=ot}},n.unstable_scheduleCallback=function(j,Q,ot){var rt=n.unstable_now();switch(typeof ot=="object"&&ot!==null?(ot=ot.delay,ot=typeof ot=="number"&&0<ot?rt+ot:rt):ot=rt,j){case 1:var gt=-1;break;case 2:gt=250;break;case 5:gt=1073741823;break;case 4:gt=1e4;break;default:gt=5e3}return gt=ot+gt,j={id:x++,callback:Q,priorityLevel:j,startTime:ot,expirationTime:gt,sortIndex:-1},ot>rt?(j.sortIndex=ot,t(g,j),a(p)===null&&j===a(g)&&(z?(w(V),V=-1):z=!0,St(Y,ot-rt))):(j.sortIndex=gt,t(p,j),M||C||(M=!0,dt())),j},n.unstable_shouldYield=q,n.unstable_wrapCallback=function(j){var Q=E;return function(){var ot=E;E=Q;try{return j.apply(this,arguments)}finally{E=ot}}}})(Sy)),Sy}var yx;function f5(){return yx||(yx=1,_y.exports=c5()),_y.exports}/**
326
- * @license React
327
- * react-reconciler.production.js
328
- *
329
- * Copyright (c) Meta Platforms, Inc. and affiliates.
330
- *
331
- * This source code is licensed under the MIT license found in the
332
- * LICENSE file in the root directory of this source tree.
333
- */var gx;function h5(){return gx||(gx=1,(function(n){n.exports=function(t){function a(s,r,h,v){return new kf(s,r,h,v)}function l(){}function o(s){var r="https://react.dev/errors/"+s;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)r+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+s+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(s){return s===null||typeof s!="object"?null:(s=Pf&&s[Pf]||s["@@iterator"],typeof s=="function"?s:null)}function d(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===qs?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case Nr:return"Fragment";case ci:return"Portal";case Wf:return"Profiler";case Ff:return"StrictMode";case sc:return"Suspense";case ts:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case Ui:return(s.displayName||"Context")+".Provider";case $l:return(s._context.displayName||"Context")+".Consumer";case Br:var r=s.render;return s=s.displayName,s||(s=r.displayName||r.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case Gu:return r=s.displayName||null,r!==null?r:d(s.type)||"Memo";case fi:r=s._payload,s=s._init;try{return d(s(r))}catch{}}return null}function m(s){if(rc===void 0)try{throw Error()}catch(h){var r=h.stack.trim().match(/\n( *(at )?)/);rc=r&&r[1]||"",If=-1<h.stack.indexOf(`
334
- at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
335
- `+rc+s+If}function p(s,r){if(!s||es)return"";es=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var v={DetermineComponentFrameRoot:function(){try{if(r){var Tt=function(){throw Error()};if(Object.defineProperty(Tt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Tt,[])}catch(qt){var Et=qt}Reflect.construct(s,[],Tt)}else{try{Tt.call()}catch(qt){Et=qt}s.call(Tt.prototype)}}else{try{throw Error()}catch(qt){Et=qt}(Tt=s())&&typeof Tt.catch=="function"&&Tt.catch(function(){})}}catch(qt){if(qt&&Et&&typeof qt.stack=="string")return[qt.stack,Et.stack]}return[null,null]}};v.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var S=Object.getOwnPropertyDescriptor(v.DetermineComponentFrameRoot,"name");S&&S.configurable&&Object.defineProperty(v.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var T=v.DetermineComponentFrameRoot(),N=T[0],L=T[1];if(N&&L){var I=N.split(`
336
- `),ht=L.split(`
337
- `);for(S=v=0;v<I.length&&!I[v].includes("DetermineComponentFrameRoot");)v++;for(;S<ht.length&&!ht[S].includes("DetermineComponentFrameRoot");)S++;if(v===I.length||S===ht.length)for(v=I.length-1,S=ht.length-1;1<=v&&0<=S&&I[v]!==ht[S];)S--;for(;1<=v&&0<=S;v--,S--)if(I[v]!==ht[S]){if(v!==1||S!==1)do if(v--,S--,0>S||I[v]!==ht[S]){var _t=`
338
- `+I[v].replace(" at new "," at ");return s.displayName&&_t.includes("<anonymous>")&&(_t=_t.replace("<anonymous>",s.displayName)),_t}while(1<=v&&0<=S);break}}}finally{es=!1,Error.prepareStackTrace=h}return(h=s?s.displayName||s.name:"")?m(h):""}function g(s){switch(s.tag){case 26:case 27:case 5:return m(s.type);case 16:return m("Lazy");case 13:return m("Suspense");case 19:return m("SuspenseList");case 0:case 15:return s=p(s.type,!1),s;case 11:return s=p(s.type.render,!1),s;case 1:return s=p(s.type,!0),s;default:return""}}function x(s){try{var r="";do r+=g(s),s=s.return;while(s);return r}catch(h){return`
339
- Error generating stack: `+h.message+`
340
- `+h.stack}}function b(s){var r=s,h=s;if(s.alternate)for(;r.return;)r=r.return;else{s=r;do r=s,(r.flags&4098)!==0&&(h=r.return),s=r.return;while(s)}return r.tag===3?h:null}function E(s){if(b(s)!==s)throw Error(o(188))}function C(s){var r=s.alternate;if(!r){if(r=b(s),r===null)throw Error(o(188));return r!==s?null:s}for(var h=s,v=r;;){var S=h.return;if(S===null)break;var T=S.alternate;if(T===null){if(v=S.return,v!==null){h=v;continue}break}if(S.child===T.child){for(T=S.child;T;){if(T===h)return E(S),s;if(T===v)return E(S),r;T=T.sibling}throw Error(o(188))}if(h.return!==v.return)h=S,v=T;else{for(var N=!1,L=S.child;L;){if(L===h){N=!0,h=S,v=T;break}if(L===v){N=!0,v=S,h=T;break}L=L.sibling}if(!N){for(L=T.child;L;){if(L===h){N=!0,h=T,v=S;break}if(L===v){N=!0,v=T,h=S;break}L=L.sibling}if(!N)throw Error(o(189))}}if(h.alternate!==v)throw Error(o(190))}if(h.tag!==3)throw Error(o(188));return h.stateNode.current===h?s:r}function M(s){var r=s.tag;if(r===5||r===26||r===27||r===6)return s;for(s=s.child;s!==null;){if(r=M(s),r!==null)return r;s=s.sibling}return null}function z(s){var r=s.tag;if(r===5||r===26||r===27||r===6)return s;for(s=s.child;s!==null;){if(s.tag!==4&&(r=z(s),r!==null))return r;s=s.sibling}return null}function R(s){return{current:s}}function w(s){0>gl||(s.current=Zu[gl],Zu[gl]=null,gl--)}function O(s,r){gl++,Zu[gl]=s.current,s.current=r}function U(s){return s>>>=0,s===0?32:31-(Ju(s)/Rm|0)|0}function Y(s){var r=s&42;if(r!==0)return r;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function k(s,r){var h=s.pendingLanes;if(h===0)return 0;var v=0,S=s.suspendedLanes,T=s.pingedLanes,N=s.warmLanes;s=s.finishedLanes!==0;var L=h&134217727;return L!==0?(h=L&~S,h!==0?v=Y(h):(T&=L,T!==0?v=Y(T):s||(N=L&~N,N!==0&&(v=Y(N))))):(L=h&~S,L!==0?v=Y(L):T!==0?v=Y(T):s||(N=h&~N,N!==0&&(v=Y(N)))),v===0?0:r!==0&&r!==v&&(r&S)===0&&(S=v&-v,N=r&-r,S>=N||S===32&&(N&4194176)!==0)?r:v}function V(s,r){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&r)===0}function Z(s,r){switch(s){case 1:case 2:case 4:case 8:return r+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function F(){var s=Gr;return Gr<<=1,(Gr&4194176)===0&&(Gr=128),s}function q(){var s=Fu;return Fu<<=1,(Fu&62914560)===0&&(Fu=4194304),s}function $(s){for(var r=[],h=0;31>h;h++)r.push(s);return r}function et(s,r){s.pendingLanes|=r,r!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function ct(s,r,h,v,S,T){var N=s.pendingLanes;s.pendingLanes=h,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=h,s.entangledLanes&=h,s.errorRecoveryDisabledLanes&=h,s.shellSuspendCounter=0;var L=s.entanglements,I=s.expirationTimes,ht=s.hiddenUpdates;for(h=N&~h;0<h;){var _t=31-ra(h),Tt=1<<_t;L[_t]=0,I[_t]=-1;var Et=ht[_t];if(Et!==null)for(ht[_t]=null,_t=0;_t<Et.length;_t++){var qt=Et[_t];qt!==null&&(qt.lane&=-536870913)}h&=~Tt}v!==0&&vt(s,v,0),T!==0&&S===0&&s.tag!==0&&(s.suspendedLanes|=T&~(N&~r))}function vt(s,r,h){s.pendingLanes|=r,s.suspendedLanes&=~r;var v=31-ra(r);s.entangledLanes|=r,s.entanglements[v]=s.entanglements[v]|1073741824|h&4194218}function dt(s,r){var h=s.entangledLanes|=r;for(s=s.entanglements;h;){var v=31-ra(h),S=1<<v;S&r|s[v]&r&&(s[v]|=r),h&=~S}}function St(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function j(s){if(ua&&typeof ua.onCommitFiberRoot=="function")try{ua.onCommitFiberRoot(qr,s,void 0,(s.current.flags&128)===128)}catch{}}function Q(s){if(typeof Om=="function"&&zh(s),ua&&typeof ua.setStrictMode=="function")try{ua.setStrictMode(qr,s)}catch{}}function ot(s,r){return s===r&&(s!==0||1/s===1/r)||s!==s&&r!==r}function rt(s,r){if(typeof s=="object"&&s!==null){var h=Ec.get(s);return h!==void 0?h:(r={value:s,source:r,stack:x(r)},Ec.set(s,r),r)}return{value:s,source:r,stack:x(r)}}function gt(s,r){Ne[qe++]=Iu,Ne[qe++]=Pu,Pu=s,Iu=r}function B(s,r,h){Ma[Ra++]=qi,Ma[Ra++]=Ka,Ma[Ra++]=hi,hi=s;var v=qi;s=Ka;var S=32-ra(v)-1;v&=~(1<<S),h+=1;var T=32-ra(r)+S;if(30<T){var N=S-S%5;T=(v&(1<<N)-1).toString(32),v>>=N,S-=N,qi=1<<32-ra(r)+S|h<<S|v,Ka=T+s}else qi=1<<T|h<<S|v,Ka=s}function J(s){s.return!==null&&(gt(s,1),B(s,1,0))}function tt(s){for(;s===Pu;)Pu=Ne[--qe],Ne[qe]=null,Iu=Ne[--qe],Ne[qe]=null;for(;s===hi;)hi=Ma[--Ra],Ma[Ra]=null,Ka=Ma[--Ra],Ma[Ra]=null,qi=Ma[--Ra],Ma[Ra]=null}function pt(s,r){O(di,r),O($u,s),O(_n,null),s=Ls(r),w(_n),O(_n,s)}function bt(){w(_n),w($u),w(di)}function At(s){s.memoizedState!==null&&O(Lr,s);var r=_n.current,h=rm(r,s.type);r!==h&&(O($u,s),O(_n,h))}function Ot(s){$u.current===s&&(w(_n),w($u)),Lr.current===s&&(w(Lr),ji?Ht._currentValue=sa:Ht._currentValue2=sa)}function fe(s){var r=Error(o(418,""));throw ta(rt(r,s)),to}function ce(s,r){if(!Zn)throw Error(o(175));e0(s.stateNode,s.type,s.memoizedProps,r,s)||fe(s)}function ga(s){for(Hn=s.return;Hn;)switch(Hn.tag){case 3:case 27:Za=!0;return;case 5:case 13:Za=!1;return;default:Hn=Hn.return}}function qa(s){if(!Zn||s!==Hn)return!1;if(!se)return ga(s),se=!0,!1;var r=!1;if(Cn?s.tag!==3&&s.tag!==27&&(s.tag!==5||Tm(s.type)&&!is(s.type,s.memoizedProps))&&(r=!0):s.tag!==3&&(s.tag!==5||Tm(s.type)&&!is(s.type,s.memoizedProps))&&(r=!0),r&&Mn&&fe(s),ga(s),s.tag===13){if(!Zn)throw Error(o(316));if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(o(317));Mn=Sm(s)}else Mn=Hn?yh(s.stateNode):null;return!0}function Xn(){Zn&&(Mn=Hn=null,se=!1)}function ta(s){za===null?za=[s]:za.push(s)}function pn(){for(var s=ss,r=Xr=ss=0;r<s;){var h=wa[r];wa[r++]=null;var v=wa[r];wa[r++]=null;var S=wa[r];wa[r++]=null;var T=wa[r];if(wa[r++]=null,v!==null&&S!==null){var N=v.pending;N===null?S.next=S:(S.next=N.next,N.next=S),v.pending=S}T!==0&&ru(h,S,T)}}function ea(s,r,h,v){wa[ss++]=s,wa[ss++]=r,wa[ss++]=h,wa[ss++]=v,Xr|=v,s.lanes|=v,s=s.alternate,s!==null&&(s.lanes|=v)}function Ss(s,r,h,v){return ea(s,r,h,v),bs(s)}function ii(s,r){return ea(s,null,null,r),bs(s)}function ru(s,r,h){s.lanes|=h;var v=s.alternate;v!==null&&(v.lanes|=h);for(var S=!1,T=s.return;T!==null;)T.childLanes|=h,v=T.alternate,v!==null&&(v.childLanes|=h),T.tag===22&&(s=T.stateNode,s===null||s._visibility&1||(S=!0)),s=T,T=T.return;S&&r!==null&&s.tag===3&&(T=s.stateNode,S=31-ra(h),T=T.hiddenUpdates,s=T[S],s===null?T[S]=[r]:s.push(r),r.lane=h|536870912)}function bs(s){if(50<Is)throw Is=0,Wn=null,Error(o(185));for(var r=s.return;r!==null;)s=r,r=s.return;return s.tag===3?s.stateNode:null}function La(s){s!==Qs&&s.next===null&&(Qs===null?Vr=Qs=s:Qs=Qs.next=s),no=!0,eo||(eo=!0,Ed(Fp))}function Nl(s,r){if(!mi&&no){mi=!0;do for(var h=!1,v=Vr;v!==null;){if(s!==0){var S=v.pendingLanes;if(S===0)var T=0;else{var N=v.suspendedLanes,L=v.pingedLanes;T=(1<<31-ra(42|s)+1)-1,T&=S&~(N&~L),T=T&201326677?T&201326677|1:T?T|2:0}T!==0&&(h=!0,Td(v,T))}else T=Kt,T=k(v,v===Ft?T:0),(T&3)===0||V(v,T)||(h=!0,Td(v,T));v=v.next}while(h);mi=!1}}function Fp(){no=eo=!1;var s=0;rs!==0&&(ls()&&(s=rs),rs=0);for(var r=An(),h=null,v=Vr;v!==null;){var S=v.next,T=bd(v,r);T===0?(v.next=null,h===null?Vr=S:h.next=S,S===null&&(Qs=h)):(h=v,(s!==0||(T&3)!==0)&&(no=!0)),v=S}Nl(s)}function bd(s,r){for(var h=s.suspendedLanes,v=s.pingedLanes,S=s.expirationTimes,T=s.pendingLanes&-62914561;0<T;){var N=31-ra(T),L=1<<N,I=S[N];I===-1?((L&h)===0||(L&v)!==0)&&(S[N]=Z(L,r)):I<=r&&(s.expiredLanes|=L),T&=~L}if(r=Ft,h=Kt,h=k(s,s===r?h:0),v=s.callbackNode,h===0||s===r&&be===2||s.cancelPendingCommit!==null)return v!==null&&v!==null&&Wu(v),s.callbackNode=null,s.callbackPriority=0;if((h&3)===0||V(s,h)){if(r=h&-h,r===s.callbackPriority)return r;switch(v!==null&&Wu(v),St(h)){case 2:case 8:h=Dm;break;case 32:h=bc;break;case 268435456:h=Tc;break;default:h=bc}return v=na.bind(null,s),h=Yr(h,v),s.callbackPriority=r,s.callbackNode=h,r}return v!==null&&v!==null&&Wu(v),s.callbackPriority=2,s.callbackNode=null,2}function na(s,r){var h=s.callbackNode;if(vn()&&s.callbackNode!==h)return null;var v=Kt;return v=k(s,s===Ft?v:0),v===0?null:(Nu(s,v,r),bd(s,An()),s.callbackNode!=null&&s.callbackNode===h?na.bind(null,s):null)}function Td(s,r){if(vn())return null;Nu(s,r,!0)}function Ed(s){en?fc(function(){(wt&6)!==0?Yr(Rh,s):s()}):Yr(Rh,s)}function To(){return rs===0&&(rs=F()),rs}function Eo(s,r){if(ao===null){var h=ao=[];Cc=0,oa=To(),us={status:"pending",value:void 0,then:function(v){h.push(v)}}}return Cc++,r.then(Cd,Cd),r}function Cd(){if(--Cc===0&&ao!==null){us!==null&&(us.status="fulfilled");var s=ao;ao=null,oa=0,us=null;for(var r=0;r<s.length;r++)(0,s[r])()}}function Ad(s,r){var h=[],v={status:"pending",value:null,reason:null,then:function(S){h.push(S)}};return s.then(function(){v.status="fulfilled",v.value=r;for(var S=0;S<h.length;S++)(0,h[S])(r)},function(S){for(v.status="rejected",v.reason=S,S=0;S<h.length;S++)(0,h[S])(void 0)}),v}function ff(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function hf(s,r){s=s.updateQueue,r.updateQueue===s&&(r.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Xa(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function $e(s,r,h){var v=s.updateQueue;if(v===null)return null;if(v=v.shared,(wt&2)!==0){var S=v.pending;return S===null?r.next=r:(r.next=S.next,S.next=r),v.pending=r,r=bs(s),ru(s,null,h),r}return ea(s,v,r,h),bs(s)}function Va(s,r,h){if(r=r.updateQueue,r!==null&&(r=r.shared,(h&4194176)!==0)){var v=r.lanes;v&=s.pendingLanes,h|=v,r.lanes=h,dt(s,h)}}function Vn(s,r){var h=s.updateQueue,v=s.alternate;if(v!==null&&(v=v.updateQueue,h===v)){var S=null,T=null;if(h=h.firstBaseUpdate,h!==null){do{var N={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};T===null?S=T=N:T=T.next=N,h=h.next}while(h!==null);T===null?S=T=r:T=T.next=r}else S=T=r;h={baseState:v.baseState,firstBaseUpdate:S,lastBaseUpdate:T,shared:v.shared,callbacks:v.callbacks},s.updateQueue=h;return}s=h.lastBaseUpdate,s===null?h.firstBaseUpdate=r:s.next=r,h.lastBaseUpdate=r}function uu(){if(kr){var s=us;if(s!==null)throw s}}function ou(s,r,h,v){kr=!1;var S=s.updateQueue;vl=!1;var T=S.firstBaseUpdate,N=S.lastBaseUpdate,L=S.shared.pending;if(L!==null){S.shared.pending=null;var I=L,ht=I.next;I.next=null,N===null?T=ht:N.next=ht,N=I;var _t=s.alternate;_t!==null&&(_t=_t.updateQueue,L=_t.lastBaseUpdate,L!==N&&(L===null?_t.firstBaseUpdate=ht:L.next=ht,_t.lastBaseUpdate=I))}if(T!==null){var Tt=S.baseState;N=0,_t=ht=I=null,L=T;do{var Et=L.lane&-536870913,qt=Et!==L.lane;if(qt?(Kt&Et)===Et:(v&Et)===Et){Et!==0&&Et===oa&&(kr=!0),_t!==null&&(_t=_t.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});t:{var da=s,ro=L;Et=r;var $s=h;switch(ro.tag){case 1:if(da=ro.payload,typeof da=="function"){Tt=da.call($s,Tt,Et);break t}Tt=da;break t;case 3:da.flags=da.flags&-65537|128;case 0:if(da=ro.payload,Et=typeof da=="function"?da.call($s,Tt,Et):da,Et==null)break t;Tt=Ys({},Tt,Et);break t;case 2:vl=!0}}Et=L.callback,Et!==null&&(s.flags|=64,qt&&(s.flags|=8192),qt=S.callbacks,qt===null?S.callbacks=[Et]:qt.push(Et))}else qt={lane:Et,tag:L.tag,payload:L.payload,callback:L.callback,next:null},_t===null?(ht=_t=qt,I=Tt):_t=_t.next=qt,N|=Et;if(L=L.next,L===null){if(L=S.shared.pending,L===null)break;qt=L,L=qt.next,qt.next=null,S.lastBaseUpdate=qt,S.shared.pending=null}}while(!0);_t===null&&(I=Tt),S.baseState=I,S.firstBaseUpdate=ht,S.lastBaseUpdate=_t,T===null&&(S.shared.lanes=0),Ba|=N,s.lanes=N,s.memoizedState=Tt}}function Md(s,r){if(typeof s!="function")throw Error(o(191,s));s.call(r)}function cu(s,r){var h=s.callbacks;if(h!==null)for(s.callbacks=null,s=0;s<h.length;s++)Md(h[s],r)}function Ts(s,r){if(Aa(s,r))return!0;if(typeof s!="object"||s===null||typeof r!="object"||r===null)return!1;var h=Object.keys(s),v=Object.keys(r);if(h.length!==v.length)return!1;for(v=0;v<h.length;v++){var S=h[v];if(!io.call(r,S)||!Aa(s[S],r[S]))return!1}return!0}function fu(s){return s=s.status,s==="fulfilled"||s==="rejected"}function Ei(){}function hu(s,r,h){switch(h=s[h],h===void 0?s.push(r):h!==r&&(r.then(Ei,Ei),r=h),r.status){case"fulfilled":return r.value;case"rejected":throw s=r.reason,s===xe?Error(o(483)):s;default:if(typeof r.status=="string")r.then(Ei,Ei);else{if(s=Ft,s!==null&&100<s.shellSuspendCounter)throw Error(o(482));s=r,s.status="pending",s.then(function(v){if(r.status==="pending"){var S=r;S.status="fulfilled",S.value=v}},function(v){if(r.status==="pending"){var S=r;S.status="rejected",S.reason=v}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw s=r.reason,s===xe?Error(o(483)):s}throw Ks=r,xe}}function hr(){if(Ks===null)throw Error(o(459));var s=Ks;return Ks=null,s}function Co(s){var r=Ja;return Ja+=1,Li===null&&(Li=[]),hu(Li,s,r)}function dr(s,r){r=r.props.ref,s.ref=r!==void 0?r:null}function mr(s,r){throw r.$$typeof===Jf?Error(o(525)):(s=Object.prototype.toString.call(r),Error(o(31,s==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":s)))}function pr(s){var r=s._init;return r(s._payload)}function Rd(s){function r(it,W){if(s){var st=it.deletions;st===null?(it.deletions=[W],it.flags|=16):st.push(W)}}function h(it,W){if(!s)return null;for(;W!==null;)r(it,W),W=W.sibling;return null}function v(it){for(var W=new Map;it!==null;)it.key!==null?W.set(it.key,it):W.set(it.index,it),it=it.sibling;return W}function S(it,W){return it=Bn(it,W),it.index=0,it.sibling=null,it}function T(it,W,st){return it.index=st,s?(st=it.alternate,st!==null?(st=st.index,st<W?(it.flags|=33554434,W):st):(it.flags|=33554434,W)):(it.flags|=1048576,W)}function N(it){return s&&it.alternate===null&&(it.flags|=33554434),it}function L(it,W,st,xt){return W===null||W.tag!==6?(W=Il(st,it.mode,xt),W.return=it,W):(W=S(W,st),W.return=it,W)}function I(it,W,st,xt){var Rt=st.type;return Rt===Nr?_t(it,W,st.props.children,xt,st.key):W!==null&&(W.elementType===Rt||typeof Rt=="object"&&Rt!==null&&Rt.$$typeof===fi&&pr(Rt)===W.type)?(W=S(W,st.props),dr(W,st),W.return=it,W):(W=ka(st.type,st.key,st.props,null,it.mode,xt),dr(W,st),W.return=it,W)}function ht(it,W,st,xt){return W===null||W.tag!==4||W.stateNode.containerInfo!==st.containerInfo||W.stateNode.implementation!==st.implementation?(W=Or(st,it.mode,xt),W.return=it,W):(W=S(W,st.children||[]),W.return=it,W)}function _t(it,W,st,xt,Rt){return W===null||W.tag!==7?(W=hl(st,it.mode,xt,Rt),W.return=it,W):(W=S(W,st),W.return=it,W)}function Tt(it,W,st){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return W=Il(""+W,it.mode,st),W.return=it,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case dl:return st=ka(W.type,W.key,W.props,null,it.mode,st),dr(st,W),st.return=it,st;case ci:return W=Or(W,it.mode,st),W.return=it,W;case fi:var xt=W._init;return W=xt(W._payload),Tt(it,W,st)}if(ns(W)||c(W))return W=hl(W,it.mode,st,null),W.return=it,W;if(typeof W.then=="function")return Tt(it,Co(W),st);if(W.$$typeof===Ui)return Tt(it,Ru(it,W),st);mr(it,W)}return null}function Et(it,W,st,xt){var Rt=W!==null?W.key:null;if(typeof st=="string"&&st!==""||typeof st=="number"||typeof st=="bigint")return Rt!==null?null:L(it,W,""+st,xt);if(typeof st=="object"&&st!==null){switch(st.$$typeof){case dl:return st.key===Rt?I(it,W,st,xt):null;case ci:return st.key===Rt?ht(it,W,st,xt):null;case fi:return Rt=st._init,st=Rt(st._payload),Et(it,W,st,xt)}if(ns(st)||c(st))return Rt!==null?null:_t(it,W,st,xt,null);if(typeof st.then=="function")return Et(it,W,Co(st),xt);if(st.$$typeof===Ui)return Et(it,W,Ru(it,st),xt);mr(it,st)}return null}function qt(it,W,st,xt,Rt){if(typeof xt=="string"&&xt!==""||typeof xt=="number"||typeof xt=="bigint")return it=it.get(st)||null,L(W,it,""+xt,Rt);if(typeof xt=="object"&&xt!==null){switch(xt.$$typeof){case dl:return it=it.get(xt.key===null?st:xt.key)||null,I(W,it,xt,Rt);case ci:return it=it.get(xt.key===null?st:xt.key)||null,ht(W,it,xt,Rt);case fi:var Ae=xt._init;return xt=Ae(xt._payload),qt(it,W,st,xt,Rt)}if(ns(xt)||c(xt))return it=it.get(st)||null,_t(W,it,xt,Rt,null);if(typeof xt.then=="function")return qt(it,W,st,Co(xt),Rt);if(xt.$$typeof===Ui)return qt(it,W,st,Ru(W,xt),Rt);mr(W,xt)}return null}function da(it,W,st,xt){for(var Rt=null,Ae=null,jt=W,ue=W=0,dn=null;jt!==null&&ue<st.length;ue++){jt.index>ue?(dn=jt,jt=null):dn=jt.sibling;var oe=Et(it,jt,st[ue],xt);if(oe===null){jt===null&&(jt=dn);break}s&&jt&&oe.alternate===null&&r(it,jt),W=T(oe,W,ue),Ae===null?Rt=oe:Ae.sibling=oe,Ae=oe,jt=dn}if(ue===st.length)return h(it,jt),se&&gt(it,ue),Rt;if(jt===null){for(;ue<st.length;ue++)jt=Tt(it,st[ue],xt),jt!==null&&(W=T(jt,W,ue),Ae===null?Rt=jt:Ae.sibling=jt,Ae=jt);return se&&gt(it,ue),Rt}for(jt=v(jt);ue<st.length;ue++)dn=qt(jt,it,ue,st[ue],xt),dn!==null&&(s&&dn.alternate!==null&&jt.delete(dn.key===null?ue:dn.key),W=T(dn,W,ue),Ae===null?Rt=dn:Ae.sibling=dn,Ae=dn);return s&&jt.forEach(function(Cl){return r(it,Cl)}),se&&gt(it,ue),Rt}function ro(it,W,st,xt){if(st==null)throw Error(o(151));for(var Rt=null,Ae=null,jt=W,ue=W=0,dn=null,oe=st.next();jt!==null&&!oe.done;ue++,oe=st.next()){jt.index>ue?(dn=jt,jt=null):dn=jt.sibling;var Cl=Et(it,jt,oe.value,xt);if(Cl===null){jt===null&&(jt=dn);break}s&&jt&&Cl.alternate===null&&r(it,jt),W=T(Cl,W,ue),Ae===null?Rt=Cl:Ae.sibling=Cl,Ae=Cl,jt=dn}if(oe.done)return h(it,jt),se&&gt(it,ue),Rt;if(jt===null){for(;!oe.done;ue++,oe=st.next())oe=Tt(it,oe.value,xt),oe!==null&&(W=T(oe,W,ue),Ae===null?Rt=oe:Ae.sibling=oe,Ae=oe);return se&&gt(it,ue),Rt}for(jt=v(jt);!oe.done;ue++,oe=st.next())oe=qt(jt,it,ue,oe.value,xt),oe!==null&&(s&&oe.alternate!==null&&jt.delete(oe.key===null?ue:oe.key),W=T(oe,W,ue),Ae===null?Rt=oe:Ae.sibling=oe,Ae=oe);return s&&jt.forEach(function(Bc){return r(it,Bc)}),se&&gt(it,ue),Rt}function $s(it,W,st,xt){if(typeof st=="object"&&st!==null&&st.type===Nr&&st.key===null&&(st=st.props.children),typeof st=="object"&&st!==null){switch(st.$$typeof){case dl:t:{for(var Rt=st.key;W!==null;){if(W.key===Rt){if(Rt=st.type,Rt===Nr){if(W.tag===7){h(it,W.sibling),xt=S(W,st.props.children),xt.return=it,it=xt;break t}}else if(W.elementType===Rt||typeof Rt=="object"&&Rt!==null&&Rt.$$typeof===fi&&pr(Rt)===W.type){h(it,W.sibling),xt=S(W,st.props),dr(xt,st),xt.return=it,it=xt;break t}h(it,W);break}else r(it,W);W=W.sibling}st.type===Nr?(xt=hl(st.props.children,it.mode,xt,st.key),xt.return=it,it=xt):(xt=ka(st.type,st.key,st.props,null,it.mode,xt),dr(xt,st),xt.return=it,it=xt)}return N(it);case ci:t:{for(Rt=st.key;W!==null;){if(W.key===Rt)if(W.tag===4&&W.stateNode.containerInfo===st.containerInfo&&W.stateNode.implementation===st.implementation){h(it,W.sibling),xt=S(W,st.children||[]),xt.return=it,it=xt;break t}else{h(it,W);break}else r(it,W);W=W.sibling}xt=Or(st,it.mode,xt),xt.return=it,it=xt}return N(it);case fi:return Rt=st._init,st=Rt(st._payload),$s(it,W,st,xt)}if(ns(st))return da(it,W,st,xt);if(c(st)){if(Rt=c(st),typeof Rt!="function")throw Error(o(150));return st=Rt.call(st),ro(it,W,st,xt)}if(typeof st.then=="function")return $s(it,W,Co(st),xt);if(st.$$typeof===Ui)return $s(it,W,Ru(it,st),xt);mr(it,st)}return typeof st=="string"&&st!==""||typeof st=="number"||typeof st=="bigint"?(st=""+st,W!==null&&W.tag===6?(h(it,W.sibling),xt=S(W,st),xt.return=it,it=xt):(h(it,W),xt=Il(st,it.mode,xt),xt.return=it,it=xt),N(it)):h(it,W)}return function(it,W,st,xt){try{Ja=0;var Rt=$s(it,W,st,xt);return Li=null,Rt}catch(jt){if(jt===xe)throw jt;var Ae=a(29,jt,null,it.mode);return Ae.lanes=xt,Ae.return=it,Ae}finally{}}}function df(s,r){s=pi,O(Da,s),O(Xi,r),pi=s|r.baseLanes}function Ao(){O(Da,pi),O(Xi,Xi.current)}function Mo(){pi=Da.current,w(Xi),w(Da)}function Ci(s){var r=s.alternate;O(nn,nn.current&1),O(Oa,s),Fa===null&&(r===null||Xi.current!==null||r.memoizedState!==null)&&(Fa=s)}function Ro(s){if(s.tag===22){if(O(nn,nn.current),O(Oa,s),Fa===null){var r=s.alternate;r!==null&&r.memoizedState!==null&&(Fa=s)}}else tl()}function tl(){O(nn,nn.current),O(Oa,Oa.current)}function Ai(s){w(Oa),Fa===s&&(Fa=null),w(nn)}function li(s){for(var r=s;r!==null;){if(r.tag===13){var h=r.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||yc(h)||Ku(h)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break;for(;r.sibling===null;){if(r.return===null||r.return===s)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function Pt(){throw Error(o(321))}function wn(s,r){if(r===null)return!1;for(var h=0;h<r.length&&h<s.length;h++)if(!Aa(s[h],r[h]))return!1;return!0}function Bl(s,r,h,v,S,T){return Vi=T,kt=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,Nt.H=s===null||s.memoizedState===null?an:jn,xl=!1,T=h(v,S),xl=!1,Be&&(T=zd(r,h,v,S)),zo(s),T}function zo(s){Nt.H=re;var r=he!==null&&he.next!==null;if(Vi=0,Ke=he=kt=null,Wa=!1,Le=0,Qr=null,r)throw Error(o(300));s===null||Ze||(s=s.dependencies,s!==null&&Ll(s)&&(Ze=!0))}function zd(s,r,h,v){kt=s;var S=0;do{if(Be&&(Qr=null),Le=0,Be=!1,25<=S)throw Error(o(301));if(S+=1,Ke=he=null,s.updateQueue!=null){var T=s.updateQueue;T.lastEffect=null,T.events=null,T.stores=null,T.memoCache!=null&&(T.memoCache.index=0)}Nt.H=cs,T=r(h,v)}while(Be);return T}function Wp(){var s=Nt.H,r=s.useState()[0];return r=typeof r.then=="function"?el(r):r,s=s.useState()[0],(he!==null?he.memoizedState:null)!==s&&(kt.flags|=1024),r}function wo(){var s=lo!==0;return lo=0,s}function Es(s,r,h){r.updateQueue=s.updateQueue,r.flags&=-2053,s.lanes&=~h}function du(s){if(Wa){for(s=s.memoizedState;s!==null;){var r=s.queue;r!==null&&(r.pending=null),s=s.next}Wa=!1}Vi=0,Ke=he=kt=null,Be=!1,Le=lo=0,Qr=null}function cn(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?kt.memoizedState=Ke=s:Ke=Ke.next=s,Ke}function we(){if(he===null){var s=kt.alternate;s=s!==null?s.memoizedState:null}else s=he.next;var r=Ke===null?kt.memoizedState:Ke.next;if(r!==null)Ke=r,he=s;else{if(s===null)throw kt.alternate===null?Error(o(467)):Error(o(310));he=s,s={memoizedState:he.memoizedState,baseState:he.baseState,baseQueue:he.baseQueue,queue:he.queue,next:null},Ke===null?kt.memoizedState=Ke=s:Ke=Ke.next=s}return Ke}function el(s){var r=Le;return Le+=1,Qr===null&&(Qr=[]),s=hu(Qr,s,r),r=kt,(Ke===null?r.memoizedState:Ke.next)===null&&(r=r.alternate,Nt.H=r===null||r.memoizedState===null?an:jn),s}function nl(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return el(s);if(s.$$typeof===Ui)return bn(s)}throw Error(o(438,String(s)))}function tn(s){var r=null,h=kt.updateQueue;if(h!==null&&(r=h.memoCache),r==null){var v=kt.alternate;v!==null&&(v=v.updateQueue,v!==null&&(v=v.memoCache,v!=null&&(r={data:v.data.map(function(S){return S.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),h===null&&(h=Mc(),kt.updateQueue=h),h.memoCache=r,h=r.data[r.index],h===void 0)for(h=r.data[r.index]=Array(s),v=0;v<s;v++)h[v]=sm;return r.index++,h}function Mi(s,r){return typeof r=="function"?r(s):r}function mu(s){var r=we();return al(r,he,s)}function al(s,r,h){var v=s.queue;if(v===null)throw Error(o(311));v.lastRenderedReducer=h;var S=s.baseQueue,T=v.pending;if(T!==null){if(S!==null){var N=S.next;S.next=T.next,T.next=N}r.baseQueue=S=T,v.pending=null}if(T=s.baseState,S===null)s.memoizedState=T;else{r=S.next;var L=N=null,I=null,ht=r,_t=!1;do{var Tt=ht.lane&-536870913;if(Tt!==ht.lane?(Kt&Tt)===Tt:(Vi&Tt)===Tt){var Et=ht.revertLane;if(Et===0)I!==null&&(I=I.next={lane:0,revertLane:0,action:ht.action,hasEagerState:ht.hasEagerState,eagerState:ht.eagerState,next:null}),Tt===oa&&(_t=!0);else if((Vi&Et)===Et){ht=ht.next,Et===oa&&(_t=!0);continue}else Tt={lane:0,revertLane:ht.revertLane,action:ht.action,hasEagerState:ht.hasEagerState,eagerState:ht.eagerState,next:null},I===null?(L=I=Tt,N=T):I=I.next=Tt,kt.lanes|=Et,Ba|=Et;Tt=ht.action,xl&&h(T,Tt),T=ht.hasEagerState?ht.eagerState:h(T,Tt)}else Et={lane:Tt,revertLane:ht.revertLane,action:ht.action,hasEagerState:ht.hasEagerState,eagerState:ht.eagerState,next:null},I===null?(L=I=Et,N=T):I=I.next=Et,kt.lanes|=Tt,Ba|=Tt;ht=ht.next}while(ht!==null&&ht!==r);if(I===null?N=T:I.next=L,!Aa(T,s.memoizedState)&&(Ze=!0,_t&&(h=us,h!==null)))throw h;s.memoizedState=T,s.baseState=N,s.baseQueue=I,v.lastRenderedState=T}return S===null&&(v.lanes=0),[s.memoizedState,v.dispatch]}function Ul(s){var r=we(),h=r.queue;if(h===null)throw Error(o(311));h.lastRenderedReducer=s;var v=h.dispatch,S=h.pending,T=r.memoizedState;if(S!==null){h.pending=null;var N=S=S.next;do T=s(T,N.action),N=N.next;while(N!==S);Aa(T,r.memoizedState)||(Ze=!0),r.memoizedState=T,r.baseQueue===null&&(r.baseState=T),h.lastRenderedState=T}return[T,v]}function wd(s,r,h){var v=kt,S=we(),T=se;if(T){if(h===void 0)throw Error(o(407));h=h()}else h=r();var N=!Aa((he||S).memoizedState,h);if(N&&(S.memoizedState=h,Ze=!0),S=S.queue,vu(Dd.bind(null,v,S,s),[s]),S.getSnapshot!==r||N||Ke!==null&&Ke.memoizedState.tag&1){if(v.flags|=2048,Cs(9,pf.bind(null,v,S,h,r),{destroy:void 0},null),Ft===null)throw Error(o(349));T||(Vi&60)!==0||mf(v,r,h)}return h}function mf(s,r,h){s.flags|=16384,s={getSnapshot:r,value:h},r=kt.updateQueue,r===null?(r=Mc(),kt.updateQueue=r,r.stores=[s]):(h=r.stores,h===null?r.stores=[s]:h.push(s))}function pf(s,r,h,v){r.value=h,r.getSnapshot=v,pu(r)&&yu(s)}function Dd(s,r,h){return h(function(){pu(r)&&yu(s)})}function pu(s){var r=s.getSnapshot;s=s.value;try{var h=r();return!Aa(s,h)}catch{return!0}}function yu(s){var r=ii(s,2);r!==null&&Nn(r,s,2)}function si(s){var r=cn();if(typeof s=="function"){var h=s;if(s=h(),xl){Q(!0);try{h()}finally{Q(!1)}}}return r.memoizedState=r.baseState=s,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mi,lastRenderedState:s},r}function va(s,r,h,v){return s.baseState=h,al(s,he,typeof v=="function"?v:Mi)}function Od(s,r,h,v,S){if(zs(s))throw Error(o(485));if(s=r.action,s!==null){var T={payload:S,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){T.listeners.push(N)}};Nt.T!==null?h(!0):T.isTransition=!1,v(T),h=r.pending,h===null?(T.next=r.pending=T,Nd(r,T)):(T.next=h.next,r.pending=h.next=T)}}function Nd(s,r){var h=r.action,v=r.payload,S=s.state;if(r.isTransition){var T=Nt.T,N={};Nt.T=N;try{var L=h(S,v),I=Nt.S;I!==null&&I(N,L),Do(s,r,L)}catch(ht){yr(s,r,ht)}finally{Nt.T=T}}else try{T=h(S,v),Do(s,r,T)}catch(ht){yr(s,r,ht)}}function Do(s,r,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(v){yf(s,r,v)},function(v){return yr(s,r,v)}):yf(s,r,h)}function yf(s,r,h){r.status="fulfilled",r.value=h,Bd(r),s.state=h,r=s.pending,r!==null&&(h=r.next,h===r?s.pending=null:(h=h.next,r.next=h,Nd(s,h)))}function yr(s,r,h){var v=s.pending;if(s.pending=null,v!==null){v=v.next;do r.status="rejected",r.reason=h,Bd(r),r=r.next;while(r!==v)}s.action=null}function Bd(s){s=s.listeners;for(var r=0;r<s.length;r++)(0,s[r])()}function xa(s,r){return r}function Oo(s,r){if(se){var h=Ft.formState;if(h!==null){t:{var v=kt;if(se){if(Mn){var S=dm(Mn,Za);if(S){Mn=yh(S),v=mm(S);break t}}fe(v)}v=!1}v&&(r=h[0])}}h=cn(),h.memoizedState=h.baseState=r,v={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:r},h.queue=v,h=Go.bind(null,kt,v),v.dispatch=h,v=si(!1);var T=Yo.bind(null,kt,!1,v.queue);return v=cn(),S={state:r,dispatch:null,action:s,pending:null},v.queue=S,h=Od.bind(null,kt,S,T,h),S.dispatch=h,v.memoizedState=s,[r,h,!1]}function gf(s){var r=we();return No(r,he,s)}function No(s,r,h){r=al(s,r,xa)[0],s=mu(Mi)[0],r=typeof r=="object"&&r!==null&&typeof r.then=="function"?el(r):r;var v=we(),S=v.queue,T=S.dispatch;return h!==v.memoizedState&&(kt.flags|=2048,Cs(9,gr.bind(null,S,h),{destroy:void 0},null)),[r,T,s]}function gr(s,r){s.action=r}function vf(s){var r=we(),h=he;if(h!==null)return No(r,h,s);we(),r=r.memoizedState,h=we();var v=h.queue.dispatch;return h.memoizedState=s,[r,v,!1]}function Cs(s,r,h,v){return s={tag:s,create:r,inst:h,deps:v,next:null},r=kt.updateQueue,r===null&&(r=Mc(),kt.updateQueue=r),h=r.lastEffect,h===null?r.lastEffect=s.next=s:(v=h.next,h.next=s,s.next=v,r.lastEffect=s),s}function As(){return we().memoizedState}function Bo(s,r,h,v){var S=cn();kt.flags|=s,S.memoizedState=Cs(1|r,h,{destroy:void 0},v===void 0?null:v)}function gu(s,r,h,v){var S=we();v=v===void 0?null:v;var T=S.memoizedState.inst;he!==null&&v!==null&&wn(v,he.memoizedState.deps)?S.memoizedState=Cs(r,h,T,v):(kt.flags|=s,S.memoizedState=Cs(1|r,h,T,v))}function xf(s,r){Bo(8390656,8,s,r)}function vu(s,r){gu(2048,8,s,r)}function Ud(s,r){return gu(4,2,s,r)}function Hd(s,r){return gu(4,4,s,r)}function xu(s,r){if(typeof r=="function"){s=s();var h=r(s);return function(){typeof h=="function"?h():r(null)}}if(r!=null)return s=s(),r.current=s,function(){r.current=null}}function Ri(s,r,h){h=h!=null?h.concat([s]):null,gu(4,4,xu.bind(null,r,s),h)}function _u(){}function Uo(s,r){var h=we();r=r===void 0?null:r;var v=h.memoizedState;return r!==null&&wn(r,v[1])?v[0]:(h.memoizedState=[s,r],s)}function Ms(s,r){var h=we();r=r===void 0?null:r;var v=h.memoizedState;if(r!==null&&wn(r,v[1]))return v[0];if(v=s(),xl){Q(!0);try{s()}finally{Q(!1)}}return h.memoizedState=[v,r],v}function Hl(s,r,h){return h===void 0||(Vi&1073741824)!==0?s.memoizedState=r:(s.memoizedState=h,s=Di(),kt.lanes|=s,Ba|=s,h)}function _f(s,r,h,v){return Aa(h,r)?h:Xi.current!==null?(s=Hl(s,h,v),Aa(s,r)||(Ze=!0),s):(Vi&42)===0?(Ze=!0,s.memoizedState=h):(s=Di(),kt.lanes|=s,Ba|=s,r)}function Ho(s,r,h,v,S){var T=fn();Un(T!==0&&8>T?T:8);var N=Nt.T,L={};Nt.T=L,Yo(s,!1,r,h);try{var I=S(),ht=Nt.S;if(ht!==null&&ht(L,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var _t=Ad(I,v);Gl(s,r,_t,Kn(s))}else Gl(s,r,v,Kn(s))}catch(Tt){Gl(s,r,{then:function(){},status:"rejected",reason:Tt},Kn())}finally{Un(T),Nt.T=N}}function Sf(s){var r=s.memoizedState;if(r!==null)return r;r={memoizedState:sa,baseState:sa,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mi,lastRenderedState:sa},next:null};var h={};return r.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mi,lastRenderedState:h},next:null},s.memoizedState=r,s=s.alternate,s!==null&&(s.memoizedState=r),r}function Rs(){return bn(Ht)}function zi(){return we().memoizedState}function jo(){return we().memoizedState}function Su(s){for(var r=s.return;r!==null;){switch(r.tag){case 24:case 3:var h=Kn();s=Xa(h);var v=$e(r,s,h);v!==null&&(Nn(v,r,h),Va(v,r,h)),r={cache:ko()},s.payload=r;return}r=r.return}}function jl(s,r,h){var v=Kn();h={lane:v,revertLane:0,action:h,hasEagerState:!1,eagerState:null,next:null},zs(s)?bu(r,h):(h=Ss(s,r,h,v),h!==null&&(Nn(h,s,v),bf(h,r,v)))}function Go(s,r,h){var v=Kn();Gl(s,r,h,v)}function Gl(s,r,h,v){var S={lane:v,revertLane:0,action:h,hasEagerState:!1,eagerState:null,next:null};if(zs(s))bu(r,S);else{var T=s.alternate;if(s.lanes===0&&(T===null||T.lanes===0)&&(T=r.lastRenderedReducer,T!==null))try{var N=r.lastRenderedState,L=T(N,h);if(S.hasEagerState=!0,S.eagerState=L,Aa(L,N))return ea(s,r,S,0),Ft===null&&pn(),!1}catch{}finally{}if(h=Ss(s,r,S,v),h!==null)return Nn(h,s,v),bf(h,r,v),!0}return!1}function Yo(s,r,h,v){if(v={lane:2,revertLane:To(),action:v,hasEagerState:!1,eagerState:null,next:null},zs(s)){if(r)throw Error(o(479))}else r=Ss(s,h,v,2),r!==null&&Nn(r,s,2)}function zs(s){var r=s.alternate;return s===kt||r!==null&&r===kt}function bu(s,r){Be=Wa=!0;var h=s.pending;h===null?r.next=r:(r.next=h.next,h.next=r),s.pending=r}function bf(s,r,h){if((h&4194176)!==0){var v=r.lanes;v&=s.pendingLanes,h|=v,r.lanes=h,dt(s,h)}}function Dn(s,r,h,v){r=s.memoizedState,h=h(v,r),h=h==null?r:Ys({},r,h),s.memoizedState=h,s.lanes===0&&(s.updateQueue.baseState=h)}function Yl(s,r,h,v,S,T,N){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(v,T,N):r.prototype&&r.prototype.isPureReactComponent?!Ts(h,v)||!Ts(S,T):!0}function Tu(s,r,h,v){s=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(h,v),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(h,v),r.state!==s&&Rc.enqueueReplaceState(r,r.state,null)}function ri(s,r){var h=r;if("ref"in r){h={};for(var v in r)v!=="ref"&&(h[v]=r[v])}if(s=s.defaultProps){h===r&&(h=Ys({},h));for(var S in s)h[S]===void 0&&(h[S]=s[S])}return h}function qo(s,r){try{var h=s.onUncaughtError;h(r.value,{componentStack:r.stack})}catch(v){setTimeout(function(){throw v})}}function Lo(s,r,h){try{var v=s.onCaughtError;v(h.value,{componentStack:h.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(S){setTimeout(function(){throw S})}}function Eu(s,r,h){return h=Xa(h),h.tag=3,h.payload={element:null},h.callback=function(){qo(s,r)},h}function vr(s){return s=Xa(s),s.tag=3,s}function Cu(s,r,h,v){var S=h.type.getDerivedStateFromError;if(typeof S=="function"){var T=v.value;s.payload=function(){return S(T)},s.callback=function(){Lo(r,h,v)}}var N=h.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(s.callback=function(){Lo(r,h,v),typeof S!="function"&&(Ha===null?Ha=new Set([this]):Ha.add(this));var L=v.stack;this.componentDidCatch(v.value,{componentStack:L!==null?L:""})})}function jd(s,r,h,v,S){if(h.flags|=32768,v!==null&&typeof v=="object"&&typeof v.then=="function"){if(r=h.alternate,r!==null&&ws(r,h,S,!0),h=Oa.current,h!==null){switch(h.tag){case 13:return Fa===null?la():h.alternate===null&&ae===0&&(ae=3),h.flags&=-257,h.flags|=65536,h.lanes=S,v===Ac?h.flags|=16384:(r=h.updateQueue,r===null?h.updateQueue=new Set([v]):r.add(v),ic(s,v,S)),!1;case 22:return h.flags|=65536,v===Ac?h.flags|=16384:(r=h.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([v])},h.updateQueue=r):(h=r.retryQueue,h===null?r.retryQueue=new Set([v]):h.add(v)),ic(s,v,S)),!1}throw Error(o(435,h.tag))}return ic(s,v,S),la(),!1}if(se)return r=Oa.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=S,v!==to&&(s=Error(o(422),{cause:v}),ta(rt(s,h)))):(v!==to&&(r=Error(o(423),{cause:v}),ta(rt(r,h))),s=s.current.alternate,s.flags|=65536,S&=-S,s.lanes|=S,v=rt(v,h),S=Eu(s.stateNode,v,S),Vn(s,S),ae!==4&&(ae=2)),!1;var T=Error(o(520),{cause:v});if(T=rt(T,h),Zr===null?Zr=[T]:Zr.push(T),ae!==4&&(ae=2),r===null)return!0;v=rt(v,h),h=r;do{switch(h.tag){case 3:return h.flags|=65536,s=S&-S,h.lanes|=s,s=Eu(h.stateNode,v,s),Vn(h,s),!1;case 1:if(r=h.type,T=h.stateNode,(h.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Ha===null||!Ha.has(T))))return h.flags|=65536,S&=-S,h.lanes|=S,S=vr(S),Cu(S,s,h,v),Vn(h,S),!1}h=h.return}while(h!==null);return!1}function Sn(s,r,h,v){r.child=s===null?Dh(r,null,h,v):os(r,s.child,h,v)}function Gd(s,r,h,v,S){h=h.render;var T=r.ref;if("ref"in v){var N={};for(var L in v)L!=="ref"&&(N[L]=v[L])}else N=v;return Ds(r),v=Bl(s,r,h,N,T,S),L=wo(),s!==null&&!Ze?(Es(s,r,S),il(s,r,S)):(se&&L&&J(r),r.flags|=1,Sn(s,r,v,S),r.child)}function Yd(s,r,h,v,S){if(s===null){var T=h.type;return typeof T=="function"&&!cl(T)&&T.defaultProps===void 0&&h.compare===null?(r.tag=15,r.type=T,Xo(s,r,T,v,S)):(s=ka(h.type,null,v,r,r.mode,S),s.ref=r.ref,s.return=r,r.child=s)}if(T=s.child,!zf(s,S)){var N=T.memoizedProps;if(h=h.compare,h=h!==null?h:Ts,h(N,v)&&s.ref===r.ref)return il(s,r,S)}return r.flags|=1,s=Bn(T,v),s.ref=r.ref,s.return=r,r.child=s}function Xo(s,r,h,v,S){if(s!==null){var T=s.memoizedProps;if(Ts(T,v)&&s.ref===r.ref)if(Ze=!1,r.pendingProps=v=T,zf(s,S))(s.flags&131072)!==0&&(Ze=!0);else return r.lanes=s.lanes,il(s,r,S)}return Tf(s,r,h,v,S)}function qd(s,r,h){var v=r.pendingProps,S=v.children,T=(r.stateNode._pendingVisibility&2)!==0,N=s!==null?s.memoizedState:null;if(Au(s,r),v.mode==="hidden"||T){if((r.flags&128)!==0){if(v=N!==null?N.baseLanes|h:h,s!==null){for(S=r.child=s.child,T=0;S!==null;)T=T|S.lanes|S.childLanes,S=S.sibling;r.childLanes=T&~v}else r.childLanes=0,r.child=null;return Ld(s,r,v,h)}if((h&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},s!==null&&Qo(r,N!==null?N.cachePool:null),N!==null?df(r,N):Ao(),Ro(r);else return r.lanes=r.childLanes=536870912,Ld(s,r,N!==null?N.baseLanes|h:h,h)}else N!==null?(Qo(r,N.cachePool),df(r,N),tl(),r.memoizedState=null):(s!==null&&Qo(r,null),Ao(),tl());return Sn(s,r,S,h),r.child}function Ld(s,r,h,v){var S=Xl();return S=S===null?null:{parent:ji?me._currentValue:me._currentValue2,pool:S},r.memoizedState={baseLanes:h,cachePool:S},s!==null&&Qo(r,null),Ao(),Ro(r),s!==null&&ws(s,r,v,!0),null}function Au(s,r){var h=r.ref;if(h===null)s!==null&&s.ref!==null&&(r.flags|=2097664);else{if(typeof h!="function"&&typeof h!="object")throw Error(o(284));(s===null||s.ref!==h)&&(r.flags|=2097664)}}function Tf(s,r,h,v,S){return Ds(r),h=Bl(s,r,h,v,void 0,S),v=wo(),s!==null&&!Ze?(Es(s,r,S),il(s,r,S)):(se&&v&&J(r),r.flags|=1,Sn(s,r,h,S),r.child)}function Xd(s,r,h,v,S,T){return Ds(r),r.updateQueue=null,h=zd(r,v,h,S),zo(s),v=wo(),s!==null&&!Ze?(Es(s,r,T),il(s,r,T)):(se&&v&&J(r),r.flags|=1,Sn(s,r,h,T),r.child)}function Ef(s,r,h,v,S){if(Ds(r),r.stateNode===null){var T=ks,N=h.contextType;typeof N=="object"&&N!==null&&(T=bn(N)),T=new h(v,T),r.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,T.updater=Rc,r.stateNode=T,T._reactInternals=r,T=r.stateNode,T.props=v,T.state=r.memoizedState,T.refs={},ff(r),N=h.contextType,T.context=typeof N=="object"&&N!==null?bn(N):ks,T.state=r.memoizedState,N=h.getDerivedStateFromProps,typeof N=="function"&&(Dn(r,h,N,v),T.state=r.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(N=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),N!==T.state&&Rc.enqueueReplaceState(T,T.state,null),ou(r,v,T,S),uu(),T.state=r.memoizedState),typeof T.componentDidMount=="function"&&(r.flags|=4194308),v=!0}else if(s===null){T=r.stateNode;var L=r.memoizedProps,I=ri(h,L);T.props=I;var ht=T.context,_t=h.contextType;N=ks,typeof _t=="object"&&_t!==null&&(N=bn(_t));var Tt=h.getDerivedStateFromProps;_t=typeof Tt=="function"||typeof T.getSnapshotBeforeUpdate=="function",L=r.pendingProps!==L,_t||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(L||ht!==N)&&Tu(r,T,v,N),vl=!1;var Et=r.memoizedState;T.state=Et,ou(r,v,T,S),uu(),ht=r.memoizedState,L||Et!==ht||vl?(typeof Tt=="function"&&(Dn(r,h,Tt,v),ht=r.memoizedState),(I=vl||Yl(r,h,I,v,Et,ht,N))?(_t||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(r.flags|=4194308)):(typeof T.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=v,r.memoizedState=ht),T.props=v,T.state=ht,T.context=N,v=I):(typeof T.componentDidMount=="function"&&(r.flags|=4194308),v=!1)}else{T=r.stateNode,hf(s,r),N=r.memoizedProps,_t=ri(h,N),T.props=_t,Tt=r.pendingProps,Et=T.context,ht=h.contextType,I=ks,typeof ht=="object"&&ht!==null&&(I=bn(ht)),L=h.getDerivedStateFromProps,(ht=typeof L=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(N!==Tt||Et!==I)&&Tu(r,T,v,I),vl=!1,Et=r.memoizedState,T.state=Et,ou(r,v,T,S),uu();var qt=r.memoizedState;N!==Tt||Et!==qt||vl||s!==null&&s.dependencies!==null&&Ll(s.dependencies)?(typeof L=="function"&&(Dn(r,h,L,v),qt=r.memoizedState),(_t=vl||Yl(r,h,_t,v,Et,qt,I)||s!==null&&s.dependencies!==null&&Ll(s.dependencies))?(ht||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(v,qt,I),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(v,qt,I)),typeof T.componentDidUpdate=="function"&&(r.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof T.componentDidUpdate!="function"||N===s.memoizedProps&&Et===s.memoizedState||(r.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||N===s.memoizedProps&&Et===s.memoizedState||(r.flags|=1024),r.memoizedProps=v,r.memoizedState=qt),T.props=v,T.state=qt,T.context=I,v=_t):(typeof T.componentDidUpdate!="function"||N===s.memoizedProps&&Et===s.memoizedState||(r.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||N===s.memoizedProps&&Et===s.memoizedState||(r.flags|=1024),v=!1)}return T=v,Au(s,r),v=(r.flags&128)!==0,T||v?(T=r.stateNode,h=v&&typeof h.getDerivedStateFromError!="function"?null:T.render(),r.flags|=1,s!==null&&v?(r.child=os(r,s.child,null,S),r.child=os(r,null,h,S)):Sn(s,r,h,S),r.memoizedState=T.state,s=r.child):s=il(s,r,S),s}function Vd(s,r,h,v){return Xn(),r.flags|=256,Sn(s,r,h,v),r.child}function Cf(s){return{baseLanes:s,cachePool:Jd()}}function Af(s,r,h){return s=s!==null?s.childLanes&~h:0,r&&(s|=ha),s}function kd(s,r,h){var v=r.pendingProps,S=!1,T=(r.flags&128)!==0,N;if((N=T)||(N=s!==null&&s.memoizedState===null?!1:(nn.current&2)!==0),N&&(S=!0,r.flags&=-129),N=(r.flags&32)!==0,r.flags&=-33,s===null){if(se){if(S?Ci(r):tl(),se){var L=Mn,I;(I=L)&&(L=xm(L,Za),L!==null?(r.memoizedState={dehydrated:L,treeContext:hi!==null?{id:qi,overflow:Ka}:null,retryLane:536870912},I=a(18,null,null,0),I.stateNode=L,I.return=r,r.child=I,Hn=r,Mn=null,I=!0):I=!1),I||fe(r)}if(L=r.memoizedState,L!==null&&(L=L.dehydrated,L!==null))return Ku(L)?r.lanes=16:r.lanes=536870912,null;Ai(r)}return L=v.children,v=v.fallback,S?(tl(),S=r.mode,L=Mf({mode:"hidden",children:L},S),v=hl(v,S,h,null),L.return=r,v.return=r,L.sibling=v,r.child=L,S=r.child,S.memoizedState=Cf(h),S.childLanes=Af(s,N,h),r.memoizedState=Gn,v):(Ci(r),Mu(r,L))}if(I=s.memoizedState,I!==null&&(L=I.dehydrated,L!==null)){if(T)r.flags&256?(Ci(r),r.flags&=-257,r=Rf(s,r,h)):r.memoizedState!==null?(tl(),r.child=s.child,r.flags|=128,r=null):(tl(),S=v.fallback,L=r.mode,v=Mf({mode:"visible",children:v.children},L),S=hl(S,L,h,null),S.flags|=2,v.return=r,S.return=r,v.sibling=S,r.child=v,os(r,s.child,null,h),v=r.child,v.memoizedState=Cf(h),v.childLanes=Af(s,N,h),r.memoizedState=Gn,r=S);else if(Ci(r),Ku(L))N=hm(L).digest,v=Error(o(419)),v.stack="",v.digest=N,ta({value:v,source:null,stack:null}),r=Rf(s,r,h);else if(Ze||ws(s,r,h,!1),N=(h&s.childLanes)!==0,Ze||N){if(N=Ft,N!==null){if(v=h&-h,(v&42)!==0)v=1;else switch(v){case 2:v=1;break;case 8:v=4;break;case 32:v=16;break;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:v=64;break;case 268435456:v=134217728;break;default:v=0}if(v=(v&(N.suspendedLanes|h))!==0?0:v,v!==0&&v!==I.retryLane)throw I.retryLane=v,ii(s,v),Nn(N,s,v),Bm}yc(L)||la(),r=Rf(s,r,h)}else yc(L)?(r.flags|=128,r.child=s.child,r=js.bind(null,s),t0(L,r),r=null):(s=I.treeContext,Zn&&(Mn=ym(L),Hn=r,se=!0,za=null,Za=!1,s!==null&&(Ma[Ra++]=qi,Ma[Ra++]=Ka,Ma[Ra++]=hi,qi=s.id,Ka=s.overflow,hi=r)),r=Mu(r,v.children),r.flags|=4096);return r}return S?(tl(),S=v.fallback,L=r.mode,I=s.child,T=I.sibling,v=Bn(I,{mode:"hidden",children:v.children}),v.subtreeFlags=I.subtreeFlags&31457280,T!==null?S=Bn(T,S):(S=hl(S,L,h,null),S.flags|=2),S.return=r,v.return=r,v.sibling=S,r.child=v,v=S,S=r.child,L=s.child.memoizedState,L===null?L=Cf(h):(I=L.cachePool,I!==null?(T=ji?me._currentValue:me._currentValue2,I=I.parent!==T?{parent:T,pool:T}:I):I=Jd(),L={baseLanes:L.baseLanes|h,cachePool:I}),S.memoizedState=L,S.childLanes=Af(s,N,h),r.memoizedState=Gn,v):(Ci(r),h=s.child,s=h.sibling,h=Bn(h,{mode:"visible",children:v.children}),h.return=r,h.sibling=null,s!==null&&(N=r.deletions,N===null?(r.deletions=[s],r.flags|=16):N.push(s)),r.child=h,r.memoizedState=null,h)}function Mu(s,r){return r=Mf({mode:"visible",children:r},s.mode),r.return=s,s.child=r}function Mf(s,r){return lc(s,r,0,null)}function Rf(s,r,h){return os(r,s.child,null,h),s=Mu(r,r.pendingProps.children),s.flags|=2,r.memoizedState=null,s}function Qd(s,r,h){s.lanes|=r;var v=s.alternate;v!==null&&(v.lanes|=r),wf(s.return,r,h)}function Vo(s,r,h,v,S){var T=s.memoizedState;T===null?s.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:v,tail:h,tailMode:S}:(T.isBackwards=r,T.rendering=null,T.renderingStartTime=0,T.last=v,T.tail=h,T.tailMode=S)}function Kd(s,r,h){var v=r.pendingProps,S=v.revealOrder,T=v.tail;if(Sn(s,r,v.children,h),v=nn.current,(v&2)!==0)v=v&1|2,r.flags|=128;else{if(s!==null&&(s.flags&128)!==0)t:for(s=r.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&Qd(s,h,r);else if(s.tag===19)Qd(s,h,r);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break t;for(;s.sibling===null;){if(s.return===null||s.return===r)break t;s=s.return}s.sibling.return=s.return,s=s.sibling}v&=1}switch(O(nn,v),S){case"forwards":for(h=r.child,S=null;h!==null;)s=h.alternate,s!==null&&li(s)===null&&(S=h),h=h.sibling;h=S,h===null?(S=r.child,r.child=null):(S=h.sibling,h.sibling=null),Vo(r,!1,S,h,T);break;case"backwards":for(h=null,S=r.child,r.child=null;S!==null;){if(s=S.alternate,s!==null&&li(s)===null){r.child=S;break}s=S.sibling,S.sibling=h,h=S,S=s}Vo(r,!0,h,null,T);break;case"together":Vo(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function il(s,r,h){if(s!==null&&(r.dependencies=s.dependencies),Ba|=r.lanes,(h&r.childLanes)===0)if(s!==null){if(ws(s,r,h,!1),(h&r.childLanes)===0)return null}else return null;if(s!==null&&r.child!==s.child)throw Error(o(153));if(r.child!==null){for(s=r.child,h=Bn(s,s.pendingProps),r.child=h,h.return=r;s.sibling!==null;)s=s.sibling,h=h.sibling=Bn(s,s.pendingProps),h.return=r;h.sibling=null}return r.child}function zf(s,r){return(s.lanes&r)!==0?!0:(s=s.dependencies,!!(s!==null&&Ll(s)))}function Pp(s,r,h){switch(r.tag){case 3:pt(r,r.stateNode.containerInfo),ql(r,me,s.memoizedState.cache),Xn();break;case 27:case 5:At(r);break;case 4:pt(r,r.stateNode.containerInfo);break;case 10:ql(r,r.type,r.memoizedProps.value);break;case 13:var v=r.memoizedState;if(v!==null)return v.dehydrated!==null?(Ci(r),r.flags|=128,null):(h&r.child.childLanes)!==0?kd(s,r,h):(Ci(r),s=il(s,r,h),s!==null?s.sibling:null);Ci(r);break;case 19:var S=(s.flags&128)!==0;if(v=(h&r.childLanes)!==0,v||(ws(s,r,h,!1),v=(h&r.childLanes)!==0),S){if(v)return Kd(s,r,h);r.flags|=128}if(S=r.memoizedState,S!==null&&(S.rendering=null,S.tail=null,S.lastEffect=null),O(nn,nn.current),v)break;return null;case 22:case 23:return r.lanes=0,qd(s,r,h);case 24:ql(r,me,s.memoizedState.cache)}return il(s,r,h)}function Zd(s,r,h){if(s!==null)if(s.memoizedProps!==r.pendingProps)Ze=!0;else{if(!zf(s,h)&&(r.flags&128)===0)return Ze=!1,Pp(s,r,h);Ze=(s.flags&131072)!==0}else Ze=!1,se&&(r.flags&1048576)!==0&&B(r,Iu,r.index);switch(r.lanes=0,r.tag){case 16:t:{s=r.pendingProps;var v=r.elementType,S=v._init;if(v=S(v._payload),r.type=v,typeof v=="function")cl(v)?(s=ri(v,s),r.tag=1,r=Ef(null,r,v,s,h)):(r.tag=0,r=Tf(null,r,v,s,h));else{if(v!=null){if(S=v.$$typeof,S===Br){r.tag=11,r=Gd(null,r,v,s,h);break t}else if(S===Gu){r.tag=14,r=Yd(null,r,v,s,h);break t}}throw r=d(v)||v,Error(o(306,r,""))}}return r;case 0:return Tf(s,r,r.type,r.pendingProps,h);case 1:return v=r.type,S=ri(v,r.pendingProps),Ef(s,r,v,S,h);case 3:t:{if(pt(r,r.stateNode.containerInfo),s===null)throw Error(o(387));var T=r.pendingProps;S=r.memoizedState,v=S.element,hf(s,r),ou(r,T,null,h);var N=r.memoizedState;if(T=N.cache,ql(r,me,T),T!==S.cache&&Df(r,[me],h,!0),uu(),T=N.element,Zn&&S.isDehydrated)if(S={element:T,isDehydrated:!1,cache:N.cache},r.updateQueue.baseState=S,r.memoizedState=S,r.flags&256){r=Vd(s,r,T,h);break t}else if(T!==v){v=rt(Error(o(424)),r),ta(v),r=Vd(s,r,T,h);break t}else for(Zn&&(Mn=pm(r.stateNode.containerInfo),Hn=r,se=!0,za=null,Za=!0),h=Dh(r,null,T,h),r.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(Xn(),T===v){r=il(s,r,h);break t}Sn(s,r,T,h)}r=r.child}return r;case 26:if(Ca)return Au(s,r),s===null?(h=Sc(r.type,null,r.pendingProps,null))?r.memoizedState=h:se||(r.stateNode=n0(r.type,r.pendingProps,di.current,r)):r.memoizedState=Sc(r.type,s.memoizedProps,r.pendingProps,s.memoizedState),null;case 27:if(Cn)return At(r),s===null&&Cn&&se&&(v=r.stateNode=Mh(r.type,r.pendingProps,di.current,_n.current,!1),Hn=r,Za=!0,Mn=gc(v)),v=r.pendingProps.children,s!==null||se?Sn(s,r,v,h):r.child=os(r,null,v,h),Au(s,r),r.child;case 5:return s===null&&se&&(Em(r.type,r.pendingProps,_n.current),(S=v=Mn)&&(v=gm(v,r.type,r.pendingProps,Za),v!==null?(r.stateNode=v,Hn=r,Mn=gc(v),Za=!1,S=!0):S=!1),S||fe(r)),At(r),S=r.type,T=r.pendingProps,N=s!==null?s.memoizedProps:null,v=T.children,is(S,T)?v=null:N!==null&&is(S,N)&&(r.flags|=32),r.memoizedState!==null&&(S=Bl(s,r,Wp,null,null,h),ji?Ht._currentValue=S:Ht._currentValue2=S),Au(s,r),Sn(s,r,v,h),r.child;case 6:return s===null&&se&&(Cm(r.pendingProps,_n.current),(s=h=Mn)&&(h=vm(h,r.pendingProps,Za),h!==null?(r.stateNode=h,Hn=r,Mn=null,s=!0):s=!1),s||fe(r)),null;case 13:return kd(s,r,h);case 4:return pt(r,r.stateNode.containerInfo),v=r.pendingProps,s===null?r.child=os(r,null,v,h):Sn(s,r,v,h),r.child;case 11:return Gd(s,r,r.type,r.pendingProps,h);case 7:return Sn(s,r,r.pendingProps,h),r.child;case 8:return Sn(s,r,r.pendingProps.children,h),r.child;case 12:return Sn(s,r,r.pendingProps.children,h),r.child;case 10:return v=r.pendingProps,ql(r,r.type,v.value),Sn(s,r,v.children,h),r.child;case 9:return S=r.type._context,v=r.pendingProps.children,Ds(r),S=bn(S),v=v(S),r.flags|=1,Sn(s,r,v,h),r.child;case 14:return Yd(s,r,r.type,r.pendingProps,h);case 15:return Xo(s,r,r.type,r.pendingProps,h);case 19:return Kd(s,r,h);case 22:return qd(s,r,h);case 24:return Ds(r),v=bn(me),s===null?(S=Xl(),S===null&&(S=Ft,T=ko(),S.pooledCache=T,T.refCount++,T!==null&&(S.pooledCacheLanes|=h),S=T),r.memoizedState={parent:v,cache:S},ff(r),ql(r,me,S)):((s.lanes&h)!==0&&(hf(s,r),ou(r,null,null,h),uu()),S=s.memoizedState,T=r.memoizedState,S.parent!==v?(S={parent:v,cache:v},r.memoizedState=S,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=S),ql(r,me,v)):(v=T.cache,ql(r,me,v),v!==S.cache&&Df(r,[me],h,!0))),Sn(s,r,r.pendingProps.children,h),r.child;case 29:throw r.pendingProps}throw Error(o(156,r.tag))}function ql(s,r,h){ji?(O(ca,r._currentValue),r._currentValue=h):(O(ca,r._currentValue2),r._currentValue2=h)}function ll(s){var r=ca.current;ji?s._currentValue=r:s._currentValue2=r,w(ca)}function wf(s,r,h){for(;s!==null;){var v=s.alternate;if((s.childLanes&r)!==r?(s.childLanes|=r,v!==null&&(v.childLanes|=r)):v!==null&&(v.childLanes&r)!==r&&(v.childLanes|=r),s===h)break;s=s.return}}function Df(s,r,h,v){var S=s.child;for(S!==null&&(S.return=s);S!==null;){var T=S.dependencies;if(T!==null){var N=S.child;T=T.firstContext;t:for(;T!==null;){var L=T;T=S;for(var I=0;I<r.length;I++)if(L.context===r[I]){T.lanes|=h,L=T.alternate,L!==null&&(L.lanes|=h),wf(T.return,h,s),v||(N=null);break t}T=L.next}}else if(S.tag===18){if(N=S.return,N===null)throw Error(o(341));N.lanes|=h,T=N.alternate,T!==null&&(T.lanes|=h),wf(N,h,s),N=null}else N=S.child;if(N!==null)N.return=S;else for(N=S;N!==null;){if(N===s){N=null;break}if(S=N.sibling,S!==null){S.return=N.return,N=S;break}N=N.return}S=N}}function ws(s,r,h,v){s=null;for(var S=r,T=!1;S!==null;){if(!T){if((S.flags&524288)!==0)T=!0;else if((S.flags&262144)!==0)break}if(S.tag===10){var N=S.alternate;if(N===null)throw Error(o(387));if(N=N.memoizedProps,N!==null){var L=S.type;Aa(S.pendingProps.value,N.value)||(s!==null?s.push(L):s=[L])}}else if(S===Lr.current){if(N=S.alternate,N===null)throw Error(o(387));N.memoizedState.memoizedState!==S.memoizedState.memoizedState&&(s!==null?s.push(Ht):s=[Ht])}S=S.return}s!==null&&Df(r,s,h,v),r.flags|=262144}function Ll(s){for(s=s.firstContext;s!==null;){var r=s.context;if(!Aa(ji?r._currentValue:r._currentValue2,s.memoizedValue))return!0;s=s.next}return!1}function Ds(s){fs=s,Xe=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function bn(s){return Of(fs,s)}function Ru(s,r){return fs===null&&Ds(s),Of(s,r)}function Of(s,r){var h=ji?r._currentValue:r._currentValue2;if(r={context:r,memoizedValue:h,next:null},Xe===null){if(s===null)throw Error(o(308));Xe=r,s.dependencies={lanes:0,firstContext:r},s.flags|=524288}else Xe=Xe.next=r;return h}function ko(){return{controller:new Um,data:new Map,refCount:0}}function xr(s){s.refCount--,s.refCount===0&&_l(Zs,function(){s.controller.abort()})}function Xl(){var s=Sl.current;return s!==null?s:Ft.pooledCache}function Qo(s,r){r===null?O(Sl,Sl.current):O(Sl,r.pool)}function Jd(){var s=Xl();return s===null?null:{parent:ji?me._currentValue:me._currentValue2,pool:s}}function _a(s){s.flags|=4}function Nf(s,r){if(s!==null&&s.child===r.child)return!1;if((r.flags&16)!==0)return!0;for(s=r.child;s!==null;){if((s.flags&13878)!==0||(s.subtreeFlags&13878)!==0)return!0;s=s.sibling}return!1}function Ko(s,r,h,v){if(En)for(h=r.child;h!==null;){if(h.tag===5||h.tag===6)Hi(s,h.stateNode);else if(!(h.tag===4||Cn&&h.tag===27)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===r)break;for(;h.sibling===null;){if(h.return===null||h.return===r)return;h=h.return}h.sibling.return=h.return,h=h.sibling}else if(Ta)for(var S=r.child;S!==null;){if(S.tag===5){var T=S.stateNode;h&&v&&(T=mh(T,S.type,S.memoizedProps)),Hi(s,T)}else if(S.tag===6)T=S.stateNode,h&&v&&(T=ph(T,S.memoizedProps)),Hi(s,T);else if(S.tag!==4){if(S.tag===22&&S.memoizedState!==null)T=S.child,T!==null&&(T.return=S),Ko(s,S,!0,!0);else if(S.child!==null){S.child.return=S,S=S.child;continue}}if(S===r)break;for(;S.sibling===null;){if(S.return===null||S.return===r)return;S=S.return}S.sibling.return=S.return,S=S.sibling}}function _r(s,r,h,v){if(Ta)for(var S=r.child;S!==null;){if(S.tag===5){var T=S.stateNode;h&&v&&(T=mh(T,S.type,S.memoizedProps)),hh(s,T)}else if(S.tag===6)T=S.stateNode,h&&v&&(T=ph(T,S.memoizedProps)),hh(s,T);else if(S.tag!==4){if(S.tag===22&&S.memoizedState!==null)T=S.child,T!==null&&(T.return=S),_r(s,S,!(S.memoizedProps!==null&&S.memoizedProps.mode==="manual"),!0);else if(S.child!==null){S.child.return=S,S=S.child;continue}}if(S===r)break;for(;S.sibling===null;){if(S.return===null||S.return===r)return;S=S.return}S.sibling.return=S.return,S=S.sibling}}function Sr(s,r){if(Ta&&Nf(s,r)){s=r.stateNode;var h=s.containerInfo,v=pc();_r(v,r,!1,!1),s.pendingChildren=v,_a(r),fm(h,v)}}function Bf(s,r,h,v){if(En)s.memoizedProps!==v&&_a(r);else if(Ta){var S=s.stateNode,T=s.memoizedProps;if((s=Nf(s,r))||T!==v){var N=_n.current;T=fh(S,h,T,v,!s,null),T===S?r.stateNode=S:(ml(T,h,v,N)&&_a(r),r.stateNode=T,s?Ko(T,r,!1,!1):_a(r))}else r.stateNode=S}}function br(s,r,h){if(um(r,h)){if(s.flags|=16777216,!pl(r,h))if(Bu())s.flags|=8192;else throw Ks=Ac,wh}else s.flags&=-16777217}function Uf(s,r){if(Am(r)){if(s.flags|=16777216,!Ch(r))if(Bu())s.flags|=8192;else throw Ks=Ac,wh}else s.flags&=-16777217}function zu(s,r){r!==null&&(s.flags|=4),s.flags&16384&&(r=s.tag!==22?q():536870912,s.lanes|=r,Tl|=r)}function Os(s,r){if(!se)switch(s.tailMode){case"hidden":r=s.tail;for(var h=null;r!==null;)r.alternate!==null&&(h=r),r=r.sibling;h===null?s.tail=null:h.sibling=null;break;case"collapsed":h=s.tail;for(var v=null;h!==null;)h.alternate!==null&&(v=h),h=h.sibling;v===null?r||s.tail===null?s.tail=null:s.tail.sibling=null:v.sibling=null}}function De(s){var r=s.alternate!==null&&s.alternate.child===s.child,h=0,v=0;if(r)for(var S=s.child;S!==null;)h|=S.lanes|S.childLanes,v|=S.subtreeFlags&31457280,v|=S.flags&31457280,S.return=s,S=S.sibling;else for(S=s.child;S!==null;)h|=S.lanes|S.childLanes,v|=S.subtreeFlags,v|=S.flags,S.return=s,S=S.sibling;return s.subtreeFlags|=v,s.childLanes=h,r}function Fd(s,r,h){var v=r.pendingProps;switch(tt(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return De(r),null;case 1:return De(r),null;case 3:return h=r.stateNode,v=null,s!==null&&(v=s.memoizedState.cache),r.memoizedState.cache!==v&&(r.flags|=2048),ll(me),bt(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(s===null||s.child===null)&&(qa(r)?_a(r):s===null||s.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,za!==null&&(rl(za),za=null))),Sr(s,r),De(r),null;case 26:if(Ca){h=r.type;var S=r.memoizedState;return s===null?(_a(r),S!==null?(De(r),Uf(r,S)):(De(r),br(r,h,v))):S?S!==s.memoizedState?(_a(r),De(r),Uf(r,S)):(De(r),r.flags&=-16777217):(En?s.memoizedProps!==v&&_a(r):Bf(s,r,h,v),De(r),br(r,h,v)),null}case 27:if(Cn){if(Ot(r),h=di.current,S=r.type,s!==null&&r.stateNode!=null)En?s.memoizedProps!==v&&_a(r):Bf(s,r,S,v);else{if(!v){if(r.stateNode===null)throw Error(o(166));return De(r),null}s=_n.current,qa(r)?ce(r,s):(s=Mh(S,v,h,s,!0),r.stateNode=s,_a(r))}return De(r),null}case 5:if(Ot(r),h=r.type,s!==null&&r.stateNode!=null)Bf(s,r,h,v);else{if(!v){if(r.stateNode===null)throw Error(o(166));return De(r),null}s=_n.current,qa(r)?ce(r,s):(S=th(h,v,di.current,s,r),Ko(S,r,!1,!1),r.stateNode=S,ml(S,h,v,s)&&_a(r))}return De(r),br(r,r.type,r.pendingProps),null;case 6:if(s&&r.stateNode!=null)h=s.memoizedProps,En?h!==v&&_a(r):Ta&&(h!==v?(r.stateNode=oc(v,di.current,_n.current,r),_a(r)):r.stateNode=s.stateNode);else{if(typeof v!="string"&&r.stateNode===null)throw Error(o(166));if(s=di.current,h=_n.current,qa(r)){if(!Zn)throw Error(o(176));if(s=r.stateNode,h=r.memoizedProps,v=null,S=Hn,S!==null)switch(S.tag){case 27:case 5:v=S.memoizedProps}_m(s,h,r,v)||fe(r)}else r.stateNode=oc(v,s,h,r)}return De(r),null;case 13:if(v=r.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(S=qa(r),v!==null&&v.dehydrated!==null){if(s===null){if(!S)throw Error(o(318));if(!Zn)throw Error(o(344));if(S=r.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(o(317));Hr(S,r)}else Xn(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;De(r),S=!1}else za!==null&&(rl(za),za=null),S=!0;if(!S)return r.flags&256?(Ai(r),r):(Ai(r),null)}if(Ai(r),(r.flags&128)!==0)return r.lanes=h,r;if(h=v!==null,s=s!==null&&s.memoizedState!==null,h){v=r.child,S=null,v.alternate!==null&&v.alternate.memoizedState!==null&&v.alternate.memoizedState.cachePool!==null&&(S=v.alternate.memoizedState.cachePool.pool);var T=null;v.memoizedState!==null&&v.memoizedState.cachePool!==null&&(T=v.memoizedState.cachePool.pool),T!==S&&(v.flags|=2048)}return h!==s&&h&&(r.child.flags|=8192),zu(r,r.updateQueue),De(r),null;case 4:return bt(),Sr(s,r),s===null&&ah(r.stateNode.containerInfo),De(r),null;case 10:return ll(r.type),De(r),null;case 19:if(w(nn),S=r.memoizedState,S===null)return De(r),null;if(v=(r.flags&128)!==0,T=S.rendering,T===null)if(v)Os(S,!1);else{if(ae!==0||s!==null&&(s.flags&128)!==0)for(s=r.child;s!==null;){if(T=li(s),T!==null){for(r.flags|=128,Os(S,!1),s=T.updateQueue,r.updateQueue=s,zu(r,s),r.subtreeFlags=0,s=h,h=r.child;h!==null;)fl(h,s),h=h.sibling;return O(nn,nn.current&1|2),r.child}s=s.sibling}S.tail!==null&&An()>je&&(r.flags|=128,v=!0,Os(S,!1),r.lanes=4194304)}else{if(!v)if(s=li(T),s!==null){if(r.flags|=128,v=!0,s=s.updateQueue,r.updateQueue=s,zu(r,s),Os(S,!0),S.tail===null&&S.tailMode==="hidden"&&!T.alternate&&!se)return De(r),null}else 2*An()-S.renderingStartTime>je&&h!==536870912&&(r.flags|=128,v=!0,Os(S,!1),r.lanes=4194304);S.isBackwards?(T.sibling=r.child,r.child=T):(s=S.last,s!==null?s.sibling=T:r.child=T,S.last=T)}return S.tail!==null?(r=S.tail,S.rendering=r,S.tail=r.sibling,S.renderingStartTime=An(),r.sibling=null,s=nn.current,O(nn,v?s&1|2:s&1),r):(De(r),null);case 22:case 23:return Ai(r),Mo(),v=r.memoizedState!==null,s!==null?s.memoizedState!==null!==v&&(r.flags|=8192):v&&(r.flags|=8192),v?(h&536870912)!==0&&(r.flags&128)===0&&(De(r),r.subtreeFlags&6&&(r.flags|=8192)):De(r),h=r.updateQueue,h!==null&&zu(r,h.retryQueue),h=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),v=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(v=r.memoizedState.cachePool.pool),v!==h&&(r.flags|=2048),s!==null&&w(Sl),null;case 24:return h=null,s!==null&&(h=s.memoizedState.cache),r.memoizedState.cache!==h&&(r.flags|=2048),ll(me),De(r),null;case 25:return null}throw Error(o(156,r.tag))}function Wd(s,r){switch(tt(r),r.tag){case 1:return s=r.flags,s&65536?(r.flags=s&-65537|128,r):null;case 3:return ll(me),bt(),s=r.flags,(s&65536)!==0&&(s&128)===0?(r.flags=s&-65537|128,r):null;case 26:case 27:case 5:return Ot(r),null;case 13:if(Ai(r),s=r.memoizedState,s!==null&&s.dehydrated!==null){if(r.alternate===null)throw Error(o(340));Xn()}return s=r.flags,s&65536?(r.flags=s&-65537|128,r):null;case 19:return w(nn),null;case 4:return bt(),null;case 10:return ll(r.type),null;case 22:case 23:return Ai(r),Mo(),s!==null&&w(Sl),s=r.flags,s&65536?(r.flags=s&-65537|128,r):null;case 24:return ll(me),null;case 25:return null;default:return null}}function Hf(s,r){switch(tt(r),r.tag){case 3:ll(me),bt();break;case 26:case 27:case 5:Ot(r);break;case 4:bt();break;case 13:Ai(r);break;case 19:w(nn);break;case 10:ll(r.type);break;case 22:case 23:Ai(r),Mo(),s!==null&&w(Sl);break;case 24:ll(me)}}function wu(s,r){try{var h=r.updateQueue,v=h!==null?h.lastEffect:null;if(v!==null){var S=v.next;h=S;do{if((h.tag&s)===s){v=void 0;var T=h.create,N=h.inst;v=T(),N.destroy=v}h=h.next}while(h!==S)}}catch(L){It(r,r.return,L)}}function Vl(s,r,h){try{var v=r.updateQueue,S=v!==null?v.lastEffect:null;if(S!==null){var T=S.next;v=T;do{if((v.tag&s)===s){var N=v.inst,L=N.destroy;if(L!==void 0){N.destroy=void 0,S=r;var I=h;try{L()}catch(ht){It(S,I,ht)}}}v=v.next}while(v!==T)}}catch(ht){It(r,r.return,ht)}}function Pd(s){var r=s.updateQueue;if(r!==null){var h=s.stateNode;try{cu(r,h)}catch(v){It(s,s.return,v)}}}function Id(s,r,h){h.props=ri(s.type,s.memoizedProps),h.state=s.memoizedState;try{h.componentWillUnmount()}catch(v){It(s,r,v)}}function Ns(s,r){try{var h=s.ref;if(h!==null){var v=s.stateNode;switch(s.tag){case 26:case 27:case 5:var S=Ur(v);break;default:S=v}typeof h=="function"?s.refCleanup=h(S):h.current=S}}catch(T){It(s,r,T)}}function Oe(s,r){var h=s.ref,v=s.refCleanup;if(h!==null)if(typeof v=="function")try{v()}catch(S){It(s,r,S)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(S){It(s,r,S)}else h.current=null}function Tr(s){var r=s.type,h=s.memoizedProps,v=s.stateNode;try{$p(v,r,h,s)}catch(S){It(s,s.return,S)}}function jf(s,r,h){try{rh(s.stateNode,s.type,h,r,s)}catch(v){It(s,s.return,v)}}function Gf(s){return s.tag===5||s.tag===3||(Ca?s.tag===26:!1)||(Cn?s.tag===27:!1)||s.tag===4}function Zo(s){t:for(;;){for(;s.sibling===null;){if(s.return===null||Gf(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&(!Cn||s.tag!==27)&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue t;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Jo(s,r,h){var v=s.tag;if(v===5||v===6)s=s.stateNode,r?oh(h,s,r):om(h,s);else if(!(v===4||Cn&&v===27)&&(s=s.child,s!==null))for(Jo(s,r,h),s=s.sibling;s!==null;)Jo(s,r,h),s=s.sibling}function Er(s,r,h){var v=s.tag;if(v===5||v===6)s=s.stateNode,r?uh(h,s,r):sh(h,s);else if(!(v===4||Cn&&v===27)&&(s=s.child,s!==null))for(Er(s,r,h),s=s.sibling;s!==null;)Er(s,r,h),s=s.sibling}function $d(s,r,h){s=s.containerInfo;try{dh(s,h)}catch(v){It(r,r.return,v)}}function Cr(s,r){for(as(s.containerInfo),Ve=r;Ve!==null;)if(s=Ve,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,Ve=r;else for(;Ve!==null;){s=Ve;var h=s.alternate;switch(r=s.flags,s.tag){case 0:break;case 11:case 15:break;case 1:if((r&1024)!==0&&h!==null){r=void 0;var v=s,S=h.memoizedProps;h=h.memoizedState;var T=v.stateNode;try{var N=ri(v.type,S,v.elementType===v.type);r=T.getSnapshotBeforeUpdate(N,h),T.__reactInternalSnapshotBeforeUpdate=r}catch(L){It(v,v.return,L)}}break;case 3:(r&1024)!==0&&En&&mc(s.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(o(163))}if(r=s.sibling,r!==null){r.return=s.return,Ve=r;break}Ve=s.return}return N=Js,Js=!1,N}function Fo(s,r,h){var v=h.flags;switch(h.tag){case 0:case 11:case 15:wi(s,h),v&4&&wu(5,h);break;case 1:if(wi(s,h),v&4)if(s=h.stateNode,r===null)try{s.componentDidMount()}catch(L){It(h,h.return,L)}else{var S=ri(h.type,r.memoizedProps);r=r.memoizedState;try{s.componentDidUpdate(S,r,s.__reactInternalSnapshotBeforeUpdate)}catch(L){It(h,h.return,L)}}v&64&&Pd(h),v&512&&Ns(h,h.return);break;case 3:if(wi(s,h),v&64&&(v=h.updateQueue,v!==null)){if(s=null,h.child!==null)switch(h.child.tag){case 27:case 5:s=Ur(h.child.stateNode);break;case 1:s=h.child.stateNode}try{cu(v,s)}catch(L){It(h,h.return,L)}}break;case 26:if(Ca){wi(s,h),v&512&&Ns(h,h.return);break}case 27:case 5:wi(s,h),r===null&&v&4&&Tr(h),v&512&&Ns(h,h.return);break;case 12:wi(s,h);break;case 13:wi(s,h),v&4&&kl(s,h);break;case 22:if(S=h.memoizedState!==null||hn,!S){r=r!==null&&r.memoizedState!==null||He;var T=hn,N=He;hn=S,(He=r)&&!N?Kl(s,h,(h.subtreeFlags&8772)!==0):wi(s,h),hn=T,He=N}v&512&&(h.memoizedProps.mode==="manual"?Ns(h,h.return):Oe(h,h.return));break;default:wi(s,h)}}function Ar(s){var r=s.alternate;r!==null&&(s.alternate=null,Ar(r)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(r=s.stateNode,r!==null&&ih(r)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function Sa(s,r,h){for(h=h.child;h!==null;)Wo(s,r,h),h=h.sibling}function Wo(s,r,h){if(ua&&typeof ua.onCommitFiberUnmount=="function")try{ua.onCommitFiberUnmount(qr,h)}catch{}switch(h.tag){case 26:if(Ca){He||Oe(h,r),Sa(s,r,h),h.memoizedState?_h(h.memoizedState):h.stateNode&&Th(h.stateNode);break}case 27:if(Cn){He||Oe(h,r);var v=Je,S=fa;Je=h.stateNode,Sa(s,r,h),Mm(h.stateNode),Je=v,fa=S;break}case 5:He||Oe(h,r);case 6:if(En){if(v=Je,S=fa,Je=null,Sa(s,r,h),Je=v,fa=S,Je!==null)if(fa)try{Qe(Je,h.stateNode)}catch(T){It(h,r,T)}else try{Jn(Je,h.stateNode)}catch(T){It(h,r,T)}}else Sa(s,r,h);break;case 18:En&&Je!==null&&(fa?gh(Je,h.stateNode):bm(Je,h.stateNode));break;case 4:En?(v=Je,S=fa,Je=h.stateNode.containerInfo,fa=!0,Sa(s,r,h),Je=v,fa=S):(Ta&&$d(h.stateNode,h,pc()),Sa(s,r,h));break;case 0:case 11:case 14:case 15:He||Vl(2,h,r),He||Vl(4,h,r),Sa(s,r,h);break;case 1:He||(Oe(h,r),v=h.stateNode,typeof v.componentWillUnmount=="function"&&Id(h,r,v)),Sa(s,r,h);break;case 21:Sa(s,r,h);break;case 22:He||Oe(h,r),He=(v=He)||h.memoizedState!==null,Sa(s,r,h),He=v;break;default:Sa(s,r,h)}}function kl(s,r){if(Zn&&r.memoizedState===null&&(s=r.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{xc(s)}catch(h){It(r,r.return,h)}}function Mr(s){switch(s.tag){case 13:case 19:var r=s.stateNode;return r===null&&(r=s.stateNode=new Kr),r;case 22:return s=s.stateNode,r=s._retryCache,r===null&&(r=s._retryCache=new Kr),r;default:throw Error(o(435,s.tag))}}function Du(s,r){var h=Mr(s);r.forEach(function(v){var S=Vf.bind(null,s,v);h.has(v)||(h.add(v),v.then(S,S))})}function kn(s,r){var h=r.deletions;if(h!==null)for(var v=0;v<h.length;v++){var S=h[v],T=s,N=r;if(En){var L=N;t:for(;L!==null;){switch(L.tag){case 27:case 5:Je=L.stateNode,fa=!1;break t;case 3:Je=L.stateNode.containerInfo,fa=!0;break t;case 4:Je=L.stateNode.containerInfo,fa=!0;break t}L=L.return}if(Je===null)throw Error(o(160));Wo(T,N,S),Je=null,fa=!1}else Wo(T,N,S);T=S.alternate,T!==null&&(T.return=null),S.return=null}if(r.subtreeFlags&13878)for(r=r.child;r!==null;)Ql(r,s),r=r.sibling}function Ql(s,r){var h=s.alternate,v=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:kn(r,s),aa(s),v&4&&(Vl(3,s,s.return),wu(3,s),Vl(5,s,s.return));break;case 1:kn(r,s),aa(s),v&512&&(He||h===null||Oe(h,h.return)),v&64&&hn&&(s=s.updateQueue,s!==null&&(v=s.callbacks,v!==null&&(h=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=h===null?v:h.concat(v))));break;case 26:if(Ca){var S=Fn;kn(r,s),aa(s),v&512&&(He||h===null||Oe(h,h.return)),v&4&&(v=h!==null?h.memoizedState:null,r=s.memoizedState,h===null?r===null?s.stateNode===null?s.stateNode=Sh(S,s.type,s.memoizedProps,s):bh(S,s.type,s.stateNode):s.stateNode=xh(S,r,s.memoizedProps):v!==r?(v===null?h.stateNode!==null&&Th(h.stateNode):_h(v),r===null?bh(S,s.type,s.stateNode):xh(S,r,s.memoizedProps)):r===null&&s.stateNode!==null&&jf(s,s.memoizedProps,h.memoizedProps));break}case 27:if(Cn&&v&4&&s.alternate===null){S=s.stateNode;var T=s.memoizedProps;try{a0(S),i0(s.type,T,S,s)}catch(_t){It(s,s.return,_t)}}case 5:if(kn(r,s),aa(s),v&512&&(He||h===null||Oe(h,h.return)),En){if(s.flags&32){r=s.stateNode;try{ku(r)}catch(_t){It(s,s.return,_t)}}v&4&&s.stateNode!=null&&(r=s.memoizedProps,jf(s,r,h!==null?h.memoizedProps:r)),v&1024&&(hs=!0)}break;case 6:if(kn(r,s),aa(s),v&4&&En){if(s.stateNode===null)throw Error(o(162));v=s.memoizedProps,h=h!==null?h.memoizedProps:v,r=s.stateNode;try{cm(r,h,v)}catch(_t){It(s,s.return,_t)}}break;case 3:if(Ca?(Eh(),S=Fn,Fn=_c(r.containerInfo),kn(r,s),Fn=S):kn(r,s),aa(s),v&4){if(En&&Zn&&h!==null&&h.memoizedState.isDehydrated)try{vc(r.containerInfo)}catch(_t){It(s,s.return,_t)}if(Ta){v=r.containerInfo,h=r.pendingChildren;try{dh(v,h)}catch(_t){It(s,s.return,_t)}}}hs&&(hs=!1,Yf(s));break;case 4:Ca?(h=Fn,Fn=_c(s.stateNode.containerInfo),kn(r,s),aa(s),Fn=h):(kn(r,s),aa(s)),v&4&&Ta&&$d(s.stateNode,s,s.stateNode.pendingChildren);break;case 12:kn(r,s),aa(s);break;case 13:kn(r,s),aa(s),s.child.flags&8192&&s.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(ki=An()),v&4&&(v=s.updateQueue,v!==null&&(s.updateQueue=null,Du(s,v)));break;case 22:v&512&&(He||h===null||Oe(h,h.return)),S=s.memoizedState!==null;var N=h!==null&&h.memoizedState!==null,L=hn,I=He;if(hn=L||S,He=I||N,kn(r,s),He=I,hn=L,aa(s),r=s.stateNode,r._current=s,r._visibility&=-3,r._visibility|=r._pendingVisibility&2,v&8192&&(r._visibility=S?r._visibility&-2:r._visibility|1,S&&(r=hn||He,h===null||N||r||Rr(s)),En&&(s.memoizedProps===null||s.memoizedProps.mode!=="manual"))){t:if(h=null,En)for(r=s;;){if(r.tag===5||Ca&&r.tag===26||Cn&&r.tag===27){if(h===null){N=h=r;try{T=N.stateNode,S?Qu(T):ch(N.stateNode,N.memoizedProps)}catch(_t){It(N,N.return,_t)}}}else if(r.tag===6){if(h===null){N=r;try{var ht=N.stateNode;S?dc(ht):yl(ht,N.memoizedProps)}catch(_t){It(N,N.return,_t)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===s)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break t;for(;r.sibling===null;){if(r.return===null||r.return===s)break t;h===r&&(h=null),r=r.return}h===r&&(h=null),r.sibling.return=r.return,r=r.sibling}}v&4&&(v=s.updateQueue,v!==null&&(h=v.retryQueue,h!==null&&(v.retryQueue=null,Du(s,h))));break;case 19:kn(r,s),aa(s),v&4&&(v=s.updateQueue,v!==null&&(s.updateQueue=null,Du(s,v)));break;case 21:break;default:kn(r,s),aa(s)}}function aa(s){var r=s.flags;if(r&2){try{if(En&&(!Cn||s.tag!==27)){t:{for(var h=s.return;h!==null;){if(Gf(h)){var v=h;break t}h=h.return}throw Error(o(160))}switch(v.tag){case 27:if(Cn){var S=v.stateNode,T=Zo(s);Er(s,T,S);break}case 5:var N=v.stateNode;v.flags&32&&(ku(N),v.flags&=-33);var L=Zo(s);Er(s,L,N);break;case 3:case 4:var I=v.stateNode.containerInfo,ht=Zo(s);Jo(s,ht,I);break;default:throw Error(o(161))}}}catch(_t){It(s,s.return,_t)}s.flags&=-3}r&4096&&(s.flags&=-4097)}function Yf(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var r=s;Yf(r),r.tag===5&&r.flags&1024&&Se(r.stateNode),s=s.sibling}}function wi(s,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Fo(s,r.alternate,r),r=r.sibling}function Rr(s){for(s=s.child;s!==null;){var r=s;switch(r.tag){case 0:case 11:case 14:case 15:Vl(4,r,r.return),Rr(r);break;case 1:Oe(r,r.return);var h=r.stateNode;typeof h.componentWillUnmount=="function"&&Id(r,r.return,h),Rr(r);break;case 26:case 27:case 5:Oe(r,r.return),Rr(r);break;case 22:Oe(r,r.return),r.memoizedState===null&&Rr(r);break;default:Rr(r)}s=s.sibling}}function Kl(s,r,h){for(h=h&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var v=r.alternate,S=s,T=r,N=T.flags;switch(T.tag){case 0:case 11:case 15:Kl(S,T,h),wu(4,T);break;case 1:if(Kl(S,T,h),v=T,S=v.stateNode,typeof S.componentDidMount=="function")try{S.componentDidMount()}catch(ht){It(v,v.return,ht)}if(v=T,S=v.updateQueue,S!==null){var L=v.stateNode;try{var I=S.shared.hiddenCallbacks;if(I!==null)for(S.shared.hiddenCallbacks=null,S=0;S<I.length;S++)Md(I[S],L)}catch(ht){It(v,v.return,ht)}}h&&N&64&&Pd(T),Ns(T,T.return);break;case 26:case 27:case 5:Kl(S,T,h),h&&v===null&&N&4&&Tr(T),Ns(T,T.return);break;case 12:Kl(S,T,h);break;case 13:Kl(S,T,h),h&&N&4&&kl(S,T);break;case 22:T.memoizedState===null&&Kl(S,T,h),Ns(T,T.return);break;default:Kl(S,T,h)}r=r.sibling}}function qf(s,r){var h=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),s=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),s!==h&&(s!=null&&s.refCount++,h!=null&&xr(h))}function Po(s,r){s=null,r.alternate!==null&&(s=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==s&&(r.refCount++,s!=null&&xr(s))}function sl(s,r,h,v){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Io(s,r,h,v),r=r.sibling}function Io(s,r,h,v){var S=r.flags;switch(r.tag){case 0:case 11:case 15:sl(s,r,h,v),S&2048&&wu(9,r);break;case 3:sl(s,r,h,v),S&2048&&(s=null,r.alternate!==null&&(s=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==s&&(r.refCount++,s!=null&&xr(s)));break;case 12:if(S&2048){sl(s,r,h,v),s=r.stateNode;try{var T=r.memoizedProps,N=T.id,L=T.onPostCommit;typeof L=="function"&&L(N,r.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(I){It(r,r.return,I)}}else sl(s,r,h,v);break;case 23:break;case 22:T=r.stateNode,r.memoizedState!==null?T._visibility&4?sl(s,r,h,v):Zl(s,r):T._visibility&4?sl(s,r,h,v):(T._visibility|=4,On(s,r,h,v,(r.subtreeFlags&10256)!==0)),S&2048&&qf(r.alternate,r);break;case 24:sl(s,r,h,v),S&2048&&Po(r.alternate,r);break;default:sl(s,r,h,v)}}function On(s,r,h,v,S){for(S=S&&(r.subtreeFlags&10256)!==0,r=r.child;r!==null;){var T=s,N=r,L=h,I=v,ht=N.flags;switch(N.tag){case 0:case 11:case 15:On(T,N,L,I,S),wu(8,N);break;case 23:break;case 22:var _t=N.stateNode;N.memoizedState!==null?_t._visibility&4?On(T,N,L,I,S):Zl(T,N):(_t._visibility|=4,On(T,N,L,I,S)),S&&ht&2048&&qf(N.alternate,N);break;case 24:On(T,N,L,I,S),S&&ht&2048&&Po(N.alternate,N);break;default:On(T,N,L,I,S)}r=r.sibling}}function Zl(s,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var h=s,v=r,S=v.flags;switch(v.tag){case 22:Zl(h,v),S&2048&&qf(v.alternate,v);break;case 24:Zl(h,v),S&2048&&Po(v.alternate,v);break;default:Zl(h,v)}r=r.sibling}}function yn(s){if(s.subtreeFlags&Fs)for(s=s.child;s!==null;)Bs(s),s=s.sibling}function Bs(s){switch(s.tag){case 26:yn(s),s.flags&Fs&&(s.memoizedState!==null?Ah(Fn,s.memoizedState,s.memoizedProps):Ge(s.type,s.memoizedProps));break;case 5:yn(s),s.flags&Fs&&Ge(s.type,s.memoizedProps);break;case 3:case 4:if(Ca){var r=Fn;Fn=_c(s.stateNode.containerInfo),yn(s),Fn=r}else yn(s);break;case 22:s.memoizedState===null&&(r=s.alternate,r!==null&&r.memoizedState!==null?(r=Fs,Fs=16777216,yn(s),Fs=r):yn(s));break;default:yn(s)}}function $o(s){var r=s.alternate;if(r!==null&&(s=r.child,s!==null)){r.child=null;do r=s.sibling,s.sibling=null,s=r;while(s!==null)}}function Jl(s){var r=s.deletions;if((s.flags&16)!==0){if(r!==null)for(var h=0;h<r.length;h++){var v=r[h];Ve=v,Fl(v,s)}$o(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Ou(s),s=s.sibling}function Ou(s){switch(s.tag){case 0:case 11:case 15:Jl(s),s.flags&2048&&Vl(9,s,s.return);break;case 3:Jl(s);break;case 12:Jl(s);break;case 22:var r=s.stateNode;s.memoizedState!==null&&r._visibility&4&&(s.return===null||s.return.tag!==13)?(r._visibility&=-5,zr(s)):Jl(s);break;default:Jl(s)}}function zr(s){var r=s.deletions;if((s.flags&16)!==0){if(r!==null)for(var h=0;h<r.length;h++){var v=r[h];Ve=v,Fl(v,s)}$o(s)}for(s=s.child;s!==null;){switch(r=s,r.tag){case 0:case 11:case 15:Vl(8,r,r.return),zr(r);break;case 22:h=r.stateNode,h._visibility&4&&(h._visibility&=-5,zr(r));break;default:zr(r)}s=s.sibling}}function Fl(s,r){for(;Ve!==null;){var h=Ve;switch(h.tag){case 0:case 11:case 15:Vl(8,h,r);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var v=h.memoizedState.cachePool.pool;v!=null&&v.refCount++}break;case 24:xr(h.memoizedState.cache)}if(v=h.child,v!==null)v.return=h,Ve=v;else t:for(h=s;Ve!==null;){v=Ve;var S=v.sibling,T=v.return;if(Ar(v),v===h){Ve=null;break t}if(S!==null){S.return=T,Ve=S;break t}Ve=T}}}function tc(s){var r=nh(s);if(r!=null){if(typeof r.memoizedProps["data-testname"]!="string")throw Error(o(364));return r}if(s=Vs(s),s===null)throw Error(o(362));return s.stateNode.current}function wr(s,r){var h=s.tag;switch(r.$$typeof){case so:if(s.type===r.value)return!0;break;case Dc:t:{for(r=r.value,s=[s,0],h=0;h<s.length;){var v=s[h++],S=v.tag,T=s[h++],N=r[T];if(S!==5&&S!==26&&S!==27||!Yi(v)){for(;N!=null&&wr(v,N);)T++,N=r[T];if(T===r.length){r=!0;break t}else for(v=v.child;v!==null;)s.push(v,T),v=v.sibling}}r=!1}return r;case Oc:if((h===5||h===26||h===27)&&Ip(s.stateNode,r.value))return!0;break;case pe:if((h===5||h===6||h===26||h===27)&&(s=Vu(s),s!==null&&0<=s.indexOf(r.value)))return!0;break;case ne:if((h===5||h===26||h===27)&&(s=s.memoizedProps["data-testname"],typeof s=="string"&&s.toLowerCase()===r.value.toLowerCase()))return!0;break;default:throw Error(o(365))}return!1}function Wl(s){switch(s.$$typeof){case so:return"<"+(d(s.value)||"Unknown")+">";case Dc:return":has("+(Wl(s)||"")+")";case Oc:return'[role="'+s.value+'"]';case pe:return'"'+s.value+'"';case ne:return'[data-testname="'+s.value+'"]';default:throw Error(o(365))}}function tm(s,r){var h=[];s=[s,0];for(var v=0;v<s.length;){var S=s[v++],T=S.tag,N=s[v++],L=r[N];if(T!==5&&T!==26&&T!==27||!Yi(S)){for(;L!=null&&wr(S,L);)N++,L=r[N];if(N===r.length)h.push(S);else for(S=S.child;S!==null;)s.push(S,N),S=S.sibling}}return h}function Qn(s,r){if(!Gi)throw Error(o(363));s=tc(s),s=tm(s,r),r=[],s=Array.from(s);for(var h=0;h<s.length;){var v=s[h++],S=v.tag;if(S===5||S===26||S===27)Yi(v)||r.push(v.stateNode);else for(v=v.child;v!==null;)s.push(v),v=v.sibling}return r}function Kn(){if((wt&2)!==0&&Kt!==0)return Kt&-Kt;if(Nt.T!==null){var s=oa;return s!==0?s:To()}return Qa()}function Di(){ha===0&&(ha=(Kt&536870912)===0||se?F():536870912);var s=Oa.current;return s!==null&&(s.flags|=32),ha}function Nn(s,r,h){(s===Ft&&be===2||s.cancelPendingCommit!==null)&&(oi(s,0),ui(s,Kt,ha,!1)),et(s,h),((wt&2)===0||s!==Ft)&&(s===Ft&&((wt&2)===0&&(yi|=h),ae===4&&ui(s,Kt,ha,!1)),La(s))}function Nu(s,r,h){if((wt&6)!==0)throw Error(o(327));var v=!h&&(r&60)===0&&(r&s.expiredLanes)===0||V(s,r),S=v?Bi(s,r):Oi(s,r,!0),T=v;do{if(S===0){Na&&!v&&ui(s,r,0,!1);break}else if(S===6)ui(s,r,0,!ye);else{if(h=s.current.alternate,T&&!em(h)){S=Oi(s,r,!1),T=!1;continue}if(S===2){if(T=r,s.errorRecoveryDisabledLanes&T)var N=0;else N=s.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){r=N;t:{var L=s;S=Zr;var I=Zn&&L.current.memoizedState.isDehydrated;if(I&&(oi(L,N).flags|=256),N=Oi(L,N,!1),N!==2){if(bl&&!I){L.errorRecoveryDisabledLanes|=T,yi|=T,S=4;break t}T=Ua,Ua=S,T!==null&&rl(T)}S=N}if(T=!1,S!==2)continue}}if(S===1){oi(s,0),ui(s,r,0,!0);break}t:{switch(v=s,S){case 0:case 1:throw Error(o(345));case 4:if((r&4194176)===r){ui(v,r,ha,!ye);break t}break;case 2:Ua=null;break;case 3:case 5:break;default:throw Error(o(329))}if(v.finishedWork=h,v.finishedLanes=r,(r&62914560)===r&&(T=ki+300-An(),10<T)){if(ui(v,r,ha,!ye),k(v,0)!==0)break t;v.timeoutHandle=eh(ec.bind(null,v,h,Ua,gi,Jr,r,ha,yi,Tl,ye,2,-0,0),T);break t}ec(v,h,Ua,gi,Jr,r,ha,yi,Tl,ye,0,-0,0)}}break}while(!0);La(s)}function rl(s){Ua===null?Ua=s:Ua.push.apply(Ua,s)}function ec(s,r,h,v,S,T,N,L,I,ht,_t,Tt,Et){var qt=r.subtreeFlags;if((qt&8192||(qt&16785408)===16785408)&&(Ea(),Bs(r),r=cc(),r!==null)){s.cancelPendingCommit=r(Ce.bind(null,s,h,v,S,N,L,I,1,Tt,Et)),ui(s,T,N,!ht);return}Ce(s,h,v,S,N,L,I,_t,Tt,Et)}function em(s){for(var r=s;;){var h=r.tag;if((h===0||h===11||h===15)&&r.flags&16384&&(h=r.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var v=0;v<h.length;v++){var S=h[v],T=S.getSnapshot;S=S.value;try{if(!Aa(T(),S))return!1}catch{return!1}}if(h=r.child,r.subtreeFlags&16384&&h!==null)h.return=r,r=h;else{if(r===s)break;for(;r.sibling===null;){if(r.return===null||r.return===s)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function ui(s,r,h,v){r&=~Yn,r&=~yi,s.suspendedLanes|=r,s.pingedLanes&=~r,v&&(s.warmLanes|=r),v=s.expirationTimes;for(var S=r;0<S;){var T=31-ra(S),N=1<<T;v[T]=-1,S&=~N}h!==0&&vt(s,h,r)}function Lf(){return(wt&6)===0?(Nl(0),!1):!0}function ia(){if(Xt!==null){if(be===0)var s=Xt.return;else s=Xt,Xe=fs=null,du(s),Li=null,Ja=0,s=Xt;for(;s!==null;)Hf(s.alternate,s),s=s.return;Xt=null}}function oi(s,r){s.finishedWork=null,s.finishedLanes=0;var h=s.timeoutHandle;h!==Xs&&(s.timeoutHandle=Xs,Xu(h)),h=s.cancelPendingCommit,h!==null&&(s.cancelPendingCommit=null,h()),ia(),Ft=s,Xt=h=Bn(s.current,null),Kt=r,be=0,Fe=null,ye=!1,Na=V(s,r),bl=!1,Tl=ha=Yn=yi=Ba=ae=0,Ua=Zr=null,Jr=!1,(r&8)!==0&&(r|=r&32);var v=s.entangledLanes;if(v!==0)for(s=s.entanglements,v&=r;0<v;){var S=31-ra(v),T=1<<S;r|=s[S],v&=~T}return pi=r,pn(),h}function Us(s,r){kt=null,Nt.H=re,r===xe?(r=hr(),be=3):r===wh?(r=hr(),be=4):be=r===Bm?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Fe=r,Xt===null&&(ae=1,qo(s,rt(r,s.current)))}function Bu(){var s=Oa.current;return s===null?!0:(Kt&4194176)===Kt?Fa===null:(Kt&62914560)===Kt||(Kt&536870912)!==0?s===Fa:!1}function Dr(){var s=Nt.H;return Nt.H=re,s===null?re:s}function ba(){var s=Nt.A;return Nt.A=wc,s}function la(){ae=4,ye||(Kt&4194176)!==Kt&&Oa.current!==null||(Na=!0),(Ba&134217727)===0&&(yi&134217727)===0||Ft===null||ui(Ft,Kt,ha,!1)}function Oi(s,r,h){var v=wt;wt|=2;var S=Dr(),T=ba();(Ft!==s||Kt!==r)&&(gi=null,oi(s,r)),r=!1;var N=ae;t:do try{if(be!==0&&Xt!==null){var L=Xt,I=Fe;switch(be){case 8:ia(),N=6;break t;case 3:case 2:case 6:Oa.current===null&&(r=!0);var ht=be;if(be=0,Fe=null,Pl(s,L,I,ht),h&&Na){N=0;break t}break;default:ht=be,be=0,Fe=null,Pl(s,L,I,ht)}}Ni(),N=ae;break}catch(_t){Us(s,_t)}while(!0);return r&&s.shellSuspendCounter++,Xe=fs=null,wt=v,Nt.H=S,Nt.A=T,Xt===null&&(Ft=null,Kt=0,pn()),N}function Ni(){for(;Xt!==null;)Xf(Xt)}function Bi(s,r){var h=wt;wt|=2;var v=Dr(),S=ba();Ft!==s||Kt!==r?(gi=null,je=An()+500,oi(s,r)):Na=V(s,r);t:do try{if(be!==0&&Xt!==null){r=Xt;var T=Fe;e:switch(be){case 1:be=0,Fe=null,Pl(s,r,T,1);break;case 2:if(fu(T)){be=0,Fe=null,nc(r);break}r=function(){be===2&&Ft===s&&(be=7),La(s)},T.then(r,r);break t;case 3:be=7;break t;case 4:be=5;break t;case 7:fu(T)?(be=0,Fe=null,nc(r)):(be=0,Fe=null,Pl(s,r,T,7));break;case 5:var N=null;switch(Xt.tag){case 26:N=Xt.memoizedState;case 5:case 27:var L=Xt,I=L.type,ht=L.pendingProps;if(N?Ch(N):pl(I,ht)){be=0,Fe=null;var _t=L.sibling;if(_t!==null)Xt=_t;else{var Tt=L.return;Tt!==null?(Xt=Tt,Uu(Tt)):Xt=null}break e}}be=0,Fe=null,Pl(s,r,T,5);break;case 6:be=0,Fe=null,Pl(s,r,T,6);break;case 8:ia(),ae=6;break t;default:throw Error(o(462))}}ul();break}catch(Et){Us(s,Et)}while(!0);return Xe=fs=null,Nt.H=v,Nt.A=S,wt=h,Xt!==null?0:(Ft=null,Kt=0,pn(),ae)}function ul(){for(;Xt!==null&&!zm();)Xf(Xt)}function Xf(s){var r=Zd(s.alternate,s,pi);s.memoizedProps=s.pendingProps,r===null?Uu(s):Xt=r}function nc(s){var r=s,h=r.alternate;switch(r.tag){case 15:case 0:r=Xd(h,r,r.pendingProps,r.type,void 0,Kt);break;case 11:r=Xd(h,r,r.pendingProps,r.type.render,r.ref,Kt);break;case 5:du(r);default:Hf(h,r),r=Xt=fl(r,pi),r=Zd(h,r,pi)}s.memoizedProps=s.pendingProps,r===null?Uu(s):Xt=r}function Pl(s,r,h,v){Xe=fs=null,du(r),Li=null,Ja=0;var S=r.return;try{if(jd(s,S,r,h,Kt)){ae=1,qo(s,rt(h,s.current)),Xt=null;return}}catch(T){if(S!==null)throw Xt=S,T;ae=1,qo(s,rt(h,s.current)),Xt=null;return}r.flags&32768?(se||v===1?s=!0:Na||(Kt&536870912)!==0?s=!1:(ye=s=!0,(v===2||v===3||v===6)&&(v=Oa.current,v!==null&&v.tag===13&&(v.flags|=16384))),gn(r,s)):Uu(r)}function Uu(s){var r=s;do{if((r.flags&32768)!==0){gn(r,ye);return}s=r.return;var h=Fd(r.alternate,r,pi);if(h!==null){Xt=h;return}if(r=r.sibling,r!==null){Xt=r;return}Xt=r=s}while(r!==null);ae===0&&(ae=5)}function gn(s,r){do{var h=Wd(s.alternate,s);if(h!==null){h.flags&=32767,Xt=h;return}if(h=s.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!r&&(s=s.sibling,s!==null)){Xt=s;return}Xt=s=h}while(s!==null);ae=6,Xt=null}function Ce(s,r,h,v,S,T,N,L,I,ht){var _t=Nt.T,Tt=fn();try{Un(2),Nt.T=null,te(s,r,h,v,Tt,S,T,N,L,I,ht)}finally{Nt.T=_t,Un(Tt)}}function te(s,r,h,v,S,T,N,L){do vn();while(El!==null);if((wt&6)!==0)throw Error(o(327));var I=s.finishedWork;if(v=s.finishedLanes,I===null)return null;if(s.finishedWork=null,s.finishedLanes=0,I===s.current)throw Error(o(177));s.callbackNode=null,s.callbackPriority=0,s.cancelPendingCommit=null;var ht=I.lanes|I.childLanes;if(ht|=Xr,ct(s,v,ht,T,N,L),s===Ft&&(Xt=Ft=null,Kt=0),(I.subtreeFlags&10256)===0&&(I.flags&10256)===0||Pa||(Pa=!0,Nc=ht,Ps=h,Hu(bc,function(){return vn(),null})),h=(I.flags&15990)!==0,(I.subtreeFlags&15990)!==0||h?(h=Nt.T,Nt.T=null,T=fn(),Un(2),N=wt,wt|=4,Cr(s,I),Ql(I,s),$f(s.containerInfo),s.current=I,Fo(s,I.alternate,I),wm(),wt=N,Un(T),Nt.T=h):s.current=I,Pa?(Pa=!1,El=s,Ws=v):ol(s,ht),ht=s.pendingLanes,ht===0&&(Ha=null),j(I.stateNode),La(s),r!==null)for(S=s.onRecoverableError,I=0;I<r.length;I++)ht=r[I],S(ht.value,{componentStack:ht.stack});return(Ws&3)!==0&&vn(),ht=s.pendingLanes,(v&4194218)!==0&&(ht&42)!==0?s===Wn?Is++:(Is=0,Wn=s):Is=0,Nl(0),null}function ol(s,r){(s.pooledCacheLanes&=r)===0&&(r=s.pooledCache,r!=null&&(s.pooledCache=null,xr(r)))}function vn(){if(El!==null){var s=El,r=Nc;Nc=0;var h=St(Ws),v=32>h?32:h;h=Nt.T;var S=fn();try{if(Un(v),Nt.T=null,El===null)var T=!1;else{v=Ps,Ps=null;var N=El,L=Ws;if(El=null,Ws=0,(wt&6)!==0)throw Error(o(331));var I=wt;if(wt|=4,Ou(N.current),Io(N,N.current,L,v),wt=I,Nl(0,!1),ua&&typeof ua.onPostCommitFiberRoot=="function")try{ua.onPostCommitFiberRoot(qr,N)}catch{}T=!0}return T}finally{Un(S),Nt.T=h,ol(s,r)}}return!1}function ac(s,r,h){r=rt(h,r),r=Eu(s.stateNode,r,2),s=$e(s,r,2),s!==null&&(et(s,2),La(s))}function It(s,r,h){if(s.tag===3)ac(s,s,h);else for(;r!==null;){if(r.tag===3){ac(r,s,h);break}else if(r.tag===1){var v=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(Ha===null||!Ha.has(v))){s=rt(h,s),h=vr(2),v=$e(r,h,2),v!==null&&(Cu(h,v,r,s),et(v,2),La(v));break}}r=r.return}}function ic(s,r,h){var v=s.pingCache;if(v===null){v=s.pingCache=new $t;var S=new Set;v.set(r,S)}else S=v.get(r),S===void 0&&(S=new Set,v.set(r,S));S.has(h)||(bl=!0,S.add(h),s=nm.bind(null,s,r,h),r.then(s,s))}function nm(s,r,h){var v=s.pingCache;v!==null&&v.delete(r),s.pingedLanes|=s.suspendedLanes&h,s.warmLanes&=~h,Ft===s&&(Kt&h)===h&&(ae===4||ae===3&&(Kt&62914560)===Kt&&300>An()-ki?(wt&2)===0&&oi(s,0):Yn|=h,Tl===Kt&&(Tl=0)),La(s)}function Hs(s,r){r===0&&(r=q()),s=ii(s,r),s!==null&&(et(s,r),La(s))}function js(s){var r=s.memoizedState,h=0;r!==null&&(h=r.retryLane),Hs(s,h)}function Vf(s,r){var h=0;switch(s.tag){case 13:var v=s.stateNode,S=s.memoizedState;S!==null&&(h=S.retryLane);break;case 19:v=s.stateNode;break;case 22:v=s.stateNode._retryCache;break;default:throw Error(o(314))}v!==null&&v.delete(r),Hs(s,h)}function Hu(s,r){return Yr(s,r)}function kf(s,r,h,v){this.tag=s,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function cl(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Bn(s,r){var h=s.alternate;return h===null?(h=a(s.tag,r,s.key,s.mode),h.elementType=s.elementType,h.type=s.type,h.stateNode=s.stateNode,h.alternate=s,s.alternate=h):(h.pendingProps=r,h.type=s.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=s.flags&31457280,h.childLanes=s.childLanes,h.lanes=s.lanes,h.child=s.child,h.memoizedProps=s.memoizedProps,h.memoizedState=s.memoizedState,h.updateQueue=s.updateQueue,r=s.dependencies,h.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},h.sibling=s.sibling,h.index=s.index,h.ref=s.ref,h.refCleanup=s.refCleanup,h}function fl(s,r){s.flags&=31457282;var h=s.alternate;return h===null?(s.childLanes=0,s.lanes=r,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=h.childLanes,s.lanes=h.lanes,s.child=h.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=h.memoizedProps,s.memoizedState=h.memoizedState,s.updateQueue=h.updateQueue,s.type=h.type,r=h.dependencies,s.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),s}function ka(s,r,h,v,S,T){var N=0;if(v=s,typeof s=="function")cl(s)&&(N=1);else if(typeof s=="string")N=Ca&&Cn?vh(s,h,_n.current)?26:jr(s)?27:5:Ca?vh(s,h,_n.current)?26:5:Cn&&jr(s)?27:5;else t:switch(s){case Nr:return hl(h.children,S,T,r);case Ff:N=8,S|=24;break;case Wf:return s=a(12,h,r,S|2),s.elementType=Wf,s.lanes=T,s;case sc:return s=a(13,h,r,S),s.elementType=sc,s.lanes=T,s;case ts:return s=a(19,h,r,S),s.elementType=ts,s.lanes=T,s;case Yu:return lc(h,S,T,r);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case lm:case Ui:N=10;break t;case $l:N=9;break t;case Br:N=11;break t;case Gu:N=14;break t;case fi:N=16,v=null;break t}N=29,h=Error(o(130,s===null?"null":typeof s,"")),v=null}return r=a(N,h,r,S),r.elementType=s,r.type=v,r.lanes=T,r}function hl(s,r,h,v){return s=a(7,s,v,r),s.lanes=h,s}function lc(s,r,h,v){s=a(22,s,v,r),s.elementType=Yu,s.lanes=h;var S={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var T=S._current;if(T===null)throw Error(o(456));if((S._pendingVisibility&2)===0){var N=ii(T,2);N!==null&&(S._pendingVisibility|=2,Nn(N,T,2))}},attach:function(){var T=S._current;if(T===null)throw Error(o(456));if((S._pendingVisibility&2)!==0){var N=ii(T,2);N!==null&&(S._pendingVisibility&=-3,Nn(N,T,2))}}};return s.stateNode=S,s}function Il(s,r,h){return s=a(6,s,null,r),s.lanes=h,s}function Or(s,r,h){return r=a(4,s.children!==null?s.children:[],s.key,r),r.lanes=h,r.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},r}function Gs(s,r,h,v,S,T,N,L){this.tag=1,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Xs,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=$(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$(0),this.hiddenUpdates=$(null),this.identifierPrefix=v,this.onUncaughtError=S,this.onCaughtError=T,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.incompleteTransitions=new Map}function xn(s,r,h,v,S,T,N,L,I,ht,_t,Tt){return s=new Gs(s,r,h,N,L,I,ht,Tt),r=1,T===!0&&(r|=24),T=a(3,null,null,r),s.current=T,T.stateNode=s,r=ko(),r.refCount++,s.pooledCache=r,r.refCount++,T.memoizedState={element:v,isDehydrated:h,cache:r},ff(T),s}function ju(s){return s?(s=ks,s):ks}function Qf(s){var r=s._reactInternals;if(r===void 0)throw typeof s.render=="function"?Error(o(188)):(s=Object.keys(s).join(","),Error(o(268,s)));return s=C(r),s=s!==null?M(s):null,s===null?null:Ur(s.stateNode)}function am(s,r,h,v,S,T){S=ju(S),v.context===null?v.context=S:v.pendingContext=S,v=Xa(r),v.payload={element:h},T=T===void 0?null:T,T!==null&&(v.callback=T),h=$e(s,v,r),h!==null&&(Nn(h,s,r),Va(h,s,r))}function im(s,r){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var h=s.retryLane;s.retryLane=h!==0&&h<r?h:r}}function Kf(s,r){im(s,r),(s=s.alternate)&&im(s,r)}var zt={},Zf=jp(),Tn=f5(),Ys=Object.assign,Jf=Symbol.for("react.element"),dl=Symbol.for("react.transitional.element"),ci=Symbol.for("react.portal"),Nr=Symbol.for("react.fragment"),Ff=Symbol.for("react.strict_mode"),Wf=Symbol.for("react.profiler"),lm=Symbol.for("react.provider"),$l=Symbol.for("react.consumer"),Ui=Symbol.for("react.context"),Br=Symbol.for("react.forward_ref"),sc=Symbol.for("react.suspense"),ts=Symbol.for("react.suspense_list"),Gu=Symbol.for("react.memo"),fi=Symbol.for("react.lazy"),Yu=Symbol.for("react.offscreen"),sm=Symbol.for("react.memo_cache_sentinel"),Pf=Symbol.iterator,qs=Symbol.for("react.client.reference"),Nt=Zf.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,rc,If,es=!1,ns=Array.isArray,uc=t.rendererVersion,qu=t.rendererPackageName,Lu=t.extraDevToolsConfig,Ur=t.getPublicInstance,Ls=t.getRootHostContext,rm=t.getChildHostContext,as=t.prepareForCommit,$f=t.resetAfterCommit,th=t.createInstance,Hi=t.appendInitialChild,ml=t.finalizeInitialChildren,is=t.shouldSetTextContent,oc=t.createTextInstance,eh=t.scheduleTimeout,Xu=t.cancelTimeout,Xs=t.noTimeout,ji=t.isPrimaryRenderer;t.warnsIfNotActing;var En=t.supportsMutation,Ta=t.supportsPersistence,Zn=t.supportsHydration,nh=t.getInstanceFromNode;t.beforeActiveInstanceBlur,t.afterActiveInstanceBlur;var ah=t.preparePortalMount;t.prepareScopeUpdate,t.getInstanceFromScope;var Un=t.setCurrentUpdatePriority,fn=t.getCurrentUpdatePriority,Qa=t.resolveUpdatePriority;t.resolveEventType,t.resolveEventTimeStamp;var ls=t.shouldAttemptEagerTransition,ih=t.detachDeletedInstance;t.requestPostPaintCallback;var um=t.maySuspendCommit,pl=t.preloadInstance,Ea=t.startSuspendingCommit,Ge=t.suspendInstance,cc=t.waitForCommitToBeReady,sa=t.NotPendingTransition,Ht=t.HostTransitionContext,Se=t.resetFormInstance;t.bindToConsole;var en=t.supportsMicrotasks,fc=t.scheduleMicrotask,Gi=t.supportsTestSelectors,Vs=t.findFiberRoot,hc=t.getBoundingRect,Vu=t.getTextContent,Yi=t.isHiddenSubtree,Ip=t.matchAccessibilityRole,Ye=t.setFocusIfFocusable,lh=t.setupIntersectionObserver,sh=t.appendChild,om=t.appendChildToContainer,cm=t.commitTextUpdate,$p=t.commitMount,rh=t.commitUpdate,uh=t.insertBefore,oh=t.insertInContainerBefore,Jn=t.removeChild,Qe=t.removeChildFromContainer,ku=t.resetTextContent,Qu=t.hideInstance,dc=t.hideTextInstance,ch=t.unhideInstance,yl=t.unhideTextInstance,mc=t.clearContainer,fh=t.cloneInstance,pc=t.createContainerChildSet,hh=t.appendChildToContainerChildSet,fm=t.finalizeContainerChildren,dh=t.replaceContainerChildren,mh=t.cloneHiddenInstance,ph=t.cloneHiddenTextInstance,yc=t.isSuspenseInstancePending,Ku=t.isSuspenseInstanceFallback,hm=t.getSuspenseInstanceFallbackErrorDetails,t0=t.registerSuspenseInstanceRetry,dm=t.canHydrateFormStateMarker,mm=t.isFormStateMarkerMatching,yh=t.getNextHydratableSibling,gc=t.getFirstHydratableChild,pm=t.getFirstHydratableChildWithinContainer,ym=t.getFirstHydratableChildWithinSuspenseInstance,gm=t.canHydrateInstance,vm=t.canHydrateTextInstance,xm=t.canHydrateSuspenseInstance,e0=t.hydrateInstance,_m=t.hydrateTextInstance,Hr=t.hydrateSuspenseInstance,Sm=t.getNextHydratableInstanceAfterSuspenseInstance,vc=t.commitHydratedContainer,xc=t.commitHydratedSuspenseInstance,bm=t.clearSuspenseBoundary,gh=t.clearSuspenseBoundaryFromContainer,Tm=t.shouldDeleteUnhydratedTailInstances;t.diffHydratedPropsForDevWarnings,t.diffHydratedTextForDevWarnings,t.describeHydratableInstanceForDevWarnings;var Em=t.validateHydratableInstance,Cm=t.validateHydratableTextInstance,Ca=t.supportsResources,vh=t.isHostHoistableType,_c=t.getHoistableRoot,Sc=t.getResource,xh=t.acquireResource,_h=t.releaseResource,Sh=t.hydrateHoistable,bh=t.mountHoistable,Th=t.unmountHoistable,n0=t.createHoistableInstance,Eh=t.prepareToCommitHoistables,Am=t.mayResourceSuspendCommit,Ch=t.preloadResource,Ah=t.suspendResource,Cn=t.supportsSingletons,Mh=t.resolveSingletonInstance,a0=t.clearSingleton,i0=t.acquireSingletonInstance,Mm=t.releaseSingletonInstance,jr=t.isHostSingletonType,Zu=[],gl=-1,ks={},ra=Math.clz32?Math.clz32:U,Ju=Math.log,Rm=Math.LN2,Gr=128,Fu=4194304,Yr=Tn.unstable_scheduleCallback,Wu=Tn.unstable_cancelCallback,zm=Tn.unstable_shouldYield,wm=Tn.unstable_requestPaint,An=Tn.unstable_now,Rh=Tn.unstable_ImmediatePriority,Dm=Tn.unstable_UserBlockingPriority,bc=Tn.unstable_NormalPriority,Tc=Tn.unstable_IdlePriority,Om=Tn.log,zh=Tn.unstable_setDisableYieldValue,qr=null,ua=null,Aa=typeof Object.is=="function"?Object.is:ot,Ec=new WeakMap,Ne=[],qe=0,Pu=null,Iu=0,Ma=[],Ra=0,hi=null,qi=1,Ka="",_n=R(null),$u=R(null),di=R(null),Lr=R(null),Hn=null,Mn=null,se=!1,za=null,Za=!1,to=Error(o(519)),wa=[],ss=0,Xr=0,Vr=null,Qs=null,eo=!1,no=!1,mi=!1,rs=0,ao=null,Cc=0,oa=0,us=null,vl=!1,kr=!1,io=Object.prototype.hasOwnProperty,xe=Error(o(460)),wh=Error(o(474)),Ac={then:function(){}},Ks=null,Li=null,Ja=0,os=Rd(!0),Dh=Rd(!1),Xi=R(null),Da=R(0),Oa=R(null),Fa=null,nn=R(0),Vi=0,kt=null,he=null,Ke=null,Wa=!1,Be=!1,xl=!1,lo=0,Le=0,Qr=null,Nm=0,Mc=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}},re={readContext:bn,use:nl,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useLayoutEffect:Pt,useInsertionEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useSyncExternalStore:Pt,useId:Pt};re.useCacheRefresh=Pt,re.useMemoCache=Pt,re.useHostTransitionStatus=Pt,re.useFormState=Pt,re.useActionState=Pt,re.useOptimistic=Pt;var an={readContext:bn,use:nl,useCallback:function(s,r){return cn().memoizedState=[s,r===void 0?null:r],s},useContext:bn,useEffect:xf,useImperativeHandle:function(s,r,h){h=h!=null?h.concat([s]):null,Bo(4194308,4,xu.bind(null,r,s),h)},useLayoutEffect:function(s,r){return Bo(4194308,4,s,r)},useInsertionEffect:function(s,r){Bo(4,2,s,r)},useMemo:function(s,r){var h=cn();r=r===void 0?null:r;var v=s();if(xl){Q(!0);try{s()}finally{Q(!1)}}return h.memoizedState=[v,r],v},useReducer:function(s,r,h){var v=cn();if(h!==void 0){var S=h(r);if(xl){Q(!0);try{h(r)}finally{Q(!1)}}}else S=r;return v.memoizedState=v.baseState=S,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:S},v.queue=s,s=s.dispatch=jl.bind(null,kt,s),[v.memoizedState,s]},useRef:function(s){var r=cn();return s={current:s},r.memoizedState=s},useState:function(s){s=si(s);var r=s.queue,h=Go.bind(null,kt,r);return r.dispatch=h,[s.memoizedState,h]},useDebugValue:_u,useDeferredValue:function(s,r){var h=cn();return Hl(h,s,r)},useTransition:function(){var s=si(!1);return s=Ho.bind(null,kt,s.queue,!0,!1),cn().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,r,h){var v=kt,S=cn();if(se){if(h===void 0)throw Error(o(407));h=h()}else{if(h=r(),Ft===null)throw Error(o(349));(Kt&60)!==0||mf(v,r,h)}S.memoizedState=h;var T={value:h,getSnapshot:r};return S.queue=T,xf(Dd.bind(null,v,T,s),[s]),v.flags|=2048,Cs(9,pf.bind(null,v,T,h,r),{destroy:void 0},null),h},useId:function(){var s=cn(),r=Ft.identifierPrefix;if(se){var h=Ka,v=qi;h=(v&~(1<<32-ra(v)-1)).toString(32)+h,r=":"+r+"R"+h,h=lo++,0<h&&(r+="H"+h.toString(32)),r+=":"}else h=Nm++,r=":"+r+"r"+h.toString(32)+":";return s.memoizedState=r},useCacheRefresh:function(){return cn().memoizedState=Su.bind(null,kt)}};an.useMemoCache=tn,an.useHostTransitionStatus=Rs,an.useFormState=Oo,an.useActionState=Oo,an.useOptimistic=function(s){var r=cn();r.memoizedState=r.baseState=s;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=h,r=Yo.bind(null,kt,!0,h),h.dispatch=r,[s,r]};var jn={readContext:bn,use:nl,useCallback:Uo,useContext:bn,useEffect:vu,useImperativeHandle:Ri,useInsertionEffect:Ud,useLayoutEffect:Hd,useMemo:Ms,useReducer:mu,useRef:As,useState:function(){return mu(Mi)},useDebugValue:_u,useDeferredValue:function(s,r){var h=we();return _f(h,he.memoizedState,s,r)},useTransition:function(){var s=mu(Mi)[0],r=we().memoizedState;return[typeof s=="boolean"?s:el(s),r]},useSyncExternalStore:wd,useId:zi};jn.useCacheRefresh=jo,jn.useMemoCache=tn,jn.useHostTransitionStatus=Rs,jn.useFormState=gf,jn.useActionState=gf,jn.useOptimistic=function(s,r){var h=we();return va(h,he,s,r)};var cs={readContext:bn,use:nl,useCallback:Uo,useContext:bn,useEffect:vu,useImperativeHandle:Ri,useInsertionEffect:Ud,useLayoutEffect:Hd,useMemo:Ms,useReducer:Ul,useRef:As,useState:function(){return Ul(Mi)},useDebugValue:_u,useDeferredValue:function(s,r){var h=we();return he===null?Hl(h,s,r):_f(h,he.memoizedState,s,r)},useTransition:function(){var s=Ul(Mi)[0],r=we().memoizedState;return[typeof s=="boolean"?s:el(s),r]},useSyncExternalStore:wd,useId:zi};cs.useCacheRefresh=jo,cs.useMemoCache=tn,cs.useHostTransitionStatus=Rs,cs.useFormState=vf,cs.useActionState=vf,cs.useOptimistic=function(s,r){var h=we();return he!==null?va(h,he,s,r):(h.baseState=s,[s,h.queue.dispatch])};var Rc={isMounted:function(s){return(s=s._reactInternals)?b(s)===s:!1},enqueueSetState:function(s,r,h){s=s._reactInternals;var v=Kn(),S=Xa(v);S.payload=r,h!=null&&(S.callback=h),r=$e(s,S,v),r!==null&&(Nn(r,s,v),Va(r,s,v))},enqueueReplaceState:function(s,r,h){s=s._reactInternals;var v=Kn(),S=Xa(v);S.tag=1,S.payload=r,h!=null&&(S.callback=h),r=$e(s,S,v),r!==null&&(Nn(r,s,v),Va(r,s,v))},enqueueForceUpdate:function(s,r){s=s._reactInternals;var h=Kn(),v=Xa(h);v.tag=2,r!=null&&(v.callback=r),r=$e(s,v,h),r!==null&&(Nn(r,s,h),Va(r,s,h))}},Oh=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},Bm=Error(o(461)),Ze=!1,Gn={dehydrated:null,treeContext:null,retryLane:0},ca=R(null),fs=null,Xe=null,Um=typeof AbortController<"u"?AbortController:function(){var s=[],r=this.signal={aborted:!1,addEventListener:function(h,v){s.push(v)}};this.abort=function(){r.aborted=!0,s.forEach(function(h){return h()})}},_l=Tn.unstable_scheduleCallback,Zs=Tn.unstable_NormalPriority,me={$$typeof:Ui,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},zc=Nt.S;Nt.S=function(s,r){typeof r=="object"&&r!==null&&typeof r.then=="function"&&Eo(s,r),zc!==null&&zc(s,r)};var Sl=R(null),hn=!1,He=!1,hs=!1,Kr=typeof WeakSet=="function"?WeakSet:Set,Ve=null,Js=!1,Je=null,fa=!1,Fn=null,Fs=8192,wc={getCacheForType:function(s){var r=bn(me),h=r.data.get(s);return h===void 0&&(h=s(),r.data.set(s,h)),h}},so=0,Dc=1,Oc=2,ne=3,pe=4;if(typeof Symbol=="function"&&Symbol.for){var Qt=Symbol.for;so=Qt("selector.component"),Dc=Qt("selector.has_pseudo_class"),Oc=Qt("selector.role"),ne=Qt("selector.test_id"),pe=Qt("selector.text")}var $t=typeof WeakMap=="function"?WeakMap:Map,wt=0,Ft=null,Xt=null,Kt=0,be=0,Fe=null,ye=!1,Na=!1,bl=!1,pi=0,ae=0,Ba=0,yi=0,Yn=0,ha=0,Tl=0,Zr=null,Ua=null,Jr=!1,ki=0,je=1/0,gi=null,Ha=null,Pa=!1,El=null,Ws=0,Nc=0,Ps=null,Is=0,Wn=null;return zt.attemptContinuousHydration=function(s){if(s.tag===13){var r=ii(s,67108864);r!==null&&Nn(r,s,67108864),Kf(s,67108864)}},zt.attemptHydrationAtCurrentPriority=function(s){if(s.tag===13){var r=Kn(),h=ii(s,r);h!==null&&Nn(h,s,r),Kf(s,r)}},zt.attemptSynchronousHydration=function(s){switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var r=Y(s.pendingLanes);if(r!==0){for(s.pendingLanes|=2,s.entangledLanes|=2;r;){var h=1<<31-ra(r);s.entanglements[1]|=h,r&=~h}La(s),(wt&6)===0&&(je=An()+500,Nl(0))}}break;case 13:r=ii(s,2),r!==null&&Nn(r,s,2),Lf(),Kf(s,2)}},zt.batchedUpdates=function(s,r){return s(r)},zt.createComponentSelector=function(s){return{$$typeof:so,value:s}},zt.createContainer=function(s,r,h,v,S,T,N,L,I,ht){return xn(s,r,!1,null,h,v,T,N,L,I,ht,null)},zt.createHasPseudoClassSelector=function(s){return{$$typeof:Dc,value:s}},zt.createHydrationContainer=function(s,r,h,v,S,T,N,L,I,ht,_t,Tt,Et){return s=xn(h,v,!0,s,S,T,L,I,ht,_t,Tt,Et),s.context=ju(null),h=s.current,v=Kn(),S=Xa(v),S.callback=r??null,$e(h,S,v),s.current.lanes=v,et(s,v),La(s),s},zt.createPortal=function(s,r,h){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ci,key:v==null?null:""+v,children:s,containerInfo:r,implementation:h}},zt.createRoleSelector=function(s){return{$$typeof:Oc,value:s}},zt.createTestNameSelector=function(s){return{$$typeof:ne,value:s}},zt.createTextSelector=function(s){return{$$typeof:pe,value:s}},zt.defaultOnCaughtError=function(s){console.error(s)},zt.defaultOnRecoverableError=function(s){Oh(s)},zt.defaultOnUncaughtError=function(s){Oh(s)},zt.deferredUpdates=function(s){var r=Nt.T,h=fn();try{return Un(32),Nt.T=null,s()}finally{Un(h),Nt.T=r}},zt.discreteUpdates=function(s,r,h,v,S){var T=Nt.T,N=fn();try{return Un(2),Nt.T=null,s(r,h,v,S)}finally{Un(N),Nt.T=T,wt===0&&(je=An()+500)}},zt.findAllNodes=Qn,zt.findBoundingRects=function(s,r){if(!Gi)throw Error(o(363));r=Qn(s,r),s=[];for(var h=0;h<r.length;h++)s.push(hc(r[h]));for(r=s.length-1;0<r;r--){h=s[r];for(var v=h.x,S=v+h.width,T=h.y,N=T+h.height,L=r-1;0<=L;L--)if(r!==L){var I=s[L],ht=I.x,_t=ht+I.width,Tt=I.y,Et=Tt+I.height;if(v>=ht&&T>=Tt&&S<=_t&&N<=Et){s.splice(r,1);break}else if(v!==ht||h.width!==I.width||Et<T||Tt>N){if(!(T!==Tt||h.height!==I.height||_t<v||ht>S)){ht>v&&(I.width+=ht-v,I.x=v),_t<S&&(I.width=S-ht),s.splice(r,1);break}}else{Tt>T&&(I.height+=Tt-T,I.y=T),Et<N&&(I.height=N-Tt),s.splice(r,1);break}}}return s},zt.findHostInstance=Qf,zt.findHostInstanceWithNoPortals=function(s){return s=C(s),s=s!==null?z(s):null,s===null?null:Ur(s.stateNode)},zt.findHostInstanceWithWarning=function(s){return Qf(s)},zt.flushPassiveEffects=vn,zt.flushSyncFromReconciler=function(s){var r=wt;wt|=1;var h=Nt.T,v=fn();try{if(Un(2),Nt.T=null,s)return s()}finally{Un(v),Nt.T=h,wt=r,(wt&6)===0&&Nl(0)}},zt.flushSyncWork=Lf,zt.focusWithin=function(s,r){if(!Gi)throw Error(o(363));for(s=tc(s),r=tm(s,r),r=Array.from(r),s=0;s<r.length;){var h=r[s++],v=h.tag;if(!Yi(h)){if((v===5||v===26||v===27)&&Ye(h.stateNode))return!0;for(h=h.child;h!==null;)r.push(h),h=h.sibling}}return!1},zt.getFindAllNodesFailureDescription=function(s,r){if(!Gi)throw Error(o(363));var h=0,v=[];s=[tc(s),0];for(var S=0;S<s.length;){var T=s[S++],N=T.tag,L=s[S++],I=r[L];if((N!==5&&N!==26&&N!==27||!Yi(T))&&(wr(T,I)&&(v.push(Wl(I)),L++,L>h&&(h=L)),L<r.length))for(T=T.child;T!==null;)s.push(T,L),T=T.sibling}if(h<r.length){for(s=[];h<r.length;h++)s.push(Wl(r[h]));return`findAllNodes was able to match part of the selector:
341
- `+(v.join(" > ")+`
342
-
343
- No matching component was found for:
344
- `)+s.join(" > ")}return null},zt.getPublicRootInstance=function(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 27:case 5:return Ur(s.child.stateNode);default:return s.child.stateNode}},zt.injectIntoDevTools=function(){var s={bundleType:0,version:uc,rendererPackageName:qu,currentDispatcherRef:Nt,findFiberByHostInstance:nh,reconcilerVersion:"19.0.0"};if(Lu!==null&&(s.rendererConfig=Lu),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")s=!1;else{var r=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(r.isDisabled||!r.supportsFiber)s=!0;else{try{qr=r.inject(s),ua=r}catch{}s=!!r.checkDCE}}return s},zt.isAlreadyRendering=function(){return!1},zt.observeVisibleRects=function(s,r,h,v){if(!Gi)throw Error(o(363));s=Qn(s,r);var S=lh(s,h,v).disconnect;return{disconnect:function(){S()}}},zt.shouldError=function(){return null},zt.shouldSuspend=function(){return!1},zt.startHostTransition=function(s,r,h,v){if(s.tag!==5)throw Error(o(476));var S=Sf(s).queue;Ho(s,S,r,sa,h===null?l:function(){var T=Sf(s).next.queue;return Gl(s,T,{},Kn()),h(v)})},zt.updateContainer=function(s,r,h,v){var S=r.current,T=Kn();return am(S,T,s,r,h,v),T},zt.updateContainerSync=function(s,r,h,v){return r.tag===0&&vn(),am(r.current,2,s,r,h,v),2},zt},n.exports.default=n.exports,Object.defineProperty(n.exports,"__esModule",{value:!0})})(xy)),xy.exports}var vx;function d5(){return vx||(vx=1,vy.exports=h5()),vy.exports}var m5=d5();const p5=Hp(m5),y5=p5;function g5(n,t,a,l){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function v5(){}function x5(){return!1}const L2={};function _5(n){return n??L2}function S5(){return su.currentUpdatePriority}function b5(){return null}function T5(n){throw new Error("Not yet implemented.")}function E5(n){return n}function C5(){return L2}function A5(n){n instanceof $n?n.visible=!1:n instanceof bo&&(n.enabled=!1)}function M5(n){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function X2(n){if(n instanceof bo){const t=n.__pixireact.parent;if(t){const a=t.__pixireact.filters.indexOf(n);t.__pixireact.filters.splice(a,1),t.filters=t.__pixireact.filters}n.__pixireact.parent=null}}function V2(n,t,...a){}function xx(n,t,a){if(V2(),t instanceof $n){const l=t,o=t,c=a;l.parent===n&&n.removeChild(o);const d=n.getChildIndex(c);n.addChildAt(o,d)}else if(t instanceof bo){const c=t.__pixireact.filters.indexOf(a);X2(t),U2(n,t,c)}}function R5(){return!1}function z5(){return!0}function w5(){return null}function D5(){}function O5(){}function _x(n,t){t instanceof bo&&X2(t),t.destroy()}function N5(n){}function B5(){}function U5(){}function H5(){return-1.1}function j5(){return null}function G5(){var a;if(su.currentUpdatePriority)return su.currentUpdatePriority;const n=typeof self<"u"&&self||typeof window<"u"&&window;if(!n)return Wc.DefaultEventPriority;switch((a=n.event)==null?void 0:a.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Wc.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Wc.ContinuousEventPriority;default:return Wc.DefaultEventPriority}}function Y5(n){su.currentUpdatePriority=n}function q5(){return!1}function L5(){return!1}function X5(){}function V5(){}function k5(){}function Q5(n){n instanceof $n?n.visible=!0:n instanceof bo&&(n.enabled=!0)}function K5(n){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function Z5(){return null}const J5={isPrimaryRenderer:!1,noTimeout:-1,NotPendingTransition:null,supportsHydration:!1,supportsMutation:!0,supportsPersistence:!1,warnsIfNotActing:!1,afterActiveInstanceBlur:QA,appendChild:gy,appendChildToContainer:gy,appendInitialChild:gy,beforeActiveInstanceBlur:KA,cancelTimeout:clearTimeout,clearContainer:ZA,commitUpdate:i5,createInstance:o5,createTextInstance:g5,hideTextInstance:M5,unhideTextInstance:K5,detachDeletedInstance:v5,finalizeInitialChildren:x5,getChildHostContext:_5,getCurrentUpdatePriority:S5,getInstanceFromNode:b5,getInstanceFromScope:T5,getPublicInstance:E5,getRootHostContext:C5,hideInstance:A5,insertBefore:xx,insertInContainerBefore:xx,maySuspendCommit:R5,preloadInstance:z5,prepareForCommit:w5,preparePortalMount:D5,prepareScopeUpdate:O5,removeChild:_x,removeChildFromContainer:_x,requestPostPaintCallback:N5,resetAfterCommit:B5,resetFormInstance:U5,resolveEventTimeStamp:H5,resolveEventType:j5,resolveUpdatePriority:G5,scheduleTimeout:setTimeout,shouldAttemptEagerTransition:q5,setCurrentUpdatePriority:Y5,shouldSetTextContent:L5,startSuspendingCommit:X5,suspendInstance:V5,trackSchedulerEvent:k5,unhideInstance:Q5,waitForCommitToBeReady:Z5,rendererPackageName:"@pixi/react",rendererVersion:kA.version},Up=y5(J5);Up.injectIntoDevTools();const sf=new Map;function F5(n,t={}){let a=sf.get(n),l=(a==null?void 0:a.applicationState)??{isInitialised:!1,isInitialising:!1};const o=(a==null?void 0:a.internalState)??{};a||(l.app=new mg,o.rootContainer=B2(l.app.stage));const c=(a==null?void 0:a.fiber)??Up.createContainer(o.rootContainer,Wc.ConcurrentRoot,null,!1,null,"",console.error,console.error,console.error,null);if(!a){let d;n instanceof HTMLCanvasElement&&(d=n),d||(d=document.createElement("canvas"),n.innerHTML="",n.appendChild(d)),o.canvas=d,a={applicationState:l,fiber:c,internalState:o,render:async(p,g)=>{var x;return!l.app.renderer&&!l.isInitialised&&!l.isInitialising&&(l.isInitialising=!0,await l.app.init({...g,canvas:d}),l.isInitialising=!1,l.isInitialised=!0,l={...l},(x=t.onInit)==null||x.call(t,l.app)),Object.entries(g).forEach(([b,E])=>{const C=b;N2(g,C)||(l.app[C]=E)}),Up.updateContainer(H.jsx(XA,{value:l,children:p}),c,null,()=>{}),l.app}},sf.set(d,a)}return a}function k2(n){su.unmountQueue.delete(n);const t=n.fiber;t&&Up.updateContainer(null,t,null,()=>{n.applicationState.app&&n.applicationState.app.destroy(),sf.delete(n.internalState.canvas)})}function W5(){for(const n of su.unmountQueue)k2(n)}function P5(n){const t=sf.get(n);t&&(t.applicationState.isInitialised?k2(t):su.unmountQueue.add(t))}function I5(n){const t=sf.get(n);t&&su.unmountQueue.delete(t)}var Bx,Ux;const vp=typeof window<"u"&&((Bx=window.document)!=null&&Bx.createElement||((Ux=window.navigator)==null?void 0:Ux.product)==="ReactNative")?G.useLayoutEffect:G.useEffect,$5={...So.defaultTextStyle},tM=G.forwardRef(function(t,a){const{children:l,className:o,defaultTextStyle:c,extensions:d,onInit:m,resizeTo:p,...g}=t,x=c3(),b=G.useRef(null),E=G.useRef(null),C=G.useRef(new Set);G.useImperativeHandle(a,()=>({getApplication(){return b.current},getCanvas(){return E.current}}));const M=G.useCallback(()=>{const R=b.current;R&&(p?"current"in p?p.current instanceof HTMLElement&&(R.resizeTo=p.current):R.resizeTo=p:R.resizeTo=void 0)},[p]),z=G.useCallback(R=>{W5(),b.current=R,M(),m==null||m(R)},[m]);return vp(()=>{if(d){const R=[...d],w=C.current;for(const O of w.values()){const U=R.indexOf(O);U===-1&&(Ie.remove(O),w.delete(O)),R.splice(U,1)}for(const O of R)Ie.add(O),w.add(O)}},[d]),vp(()=>{const R=E.current;if(R){let w=sf.get(R);w||(w=F5(R,{onInit:z})),w.render(H.jsx(x,{children:l}),g)}},[g,l,z,p]),vp(()=>{M()},[p]),vp(()=>{c?Object.assign(So.defaultTextStyle,c):Object.assign(So.defaultTextStyle,$5)},[c]),G.useEffect(()=>{const R=E.current;if(R)return I5(R),()=>{P5(R)}},[]),H.jsx("canvas",{ref:E,className:o})}),eM=G.forwardRef(function(t,a){return H.jsx(s_,{children:H.jsx(tM,{ref:a,...t})})});function Jp(n){Object.assign($y,n)}function nM(){const n=G.useContext(Cg);return V2(n.app instanceof mg,"No Context found with `%s`. Make sure to wrap component with `%s`","Application","AppProvider"),n}function aM({agentName:n,question:t,onRespond:a}){const[l,o]=G.useState(""),c=()=>{const m=l.trim();m&&(a(m),o(""))},d=m=>{m.key==="Enter"&&c()};return H.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(7, 8, 14, 0.8)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:50,animation:"fadeIn 0.2s var(--ease-out) both"},children:H.jsxs("div",{style:{background:"var(--surface-2)",border:"1px solid var(--status-warning)",borderRadius:"var(--radius-lg)",boxShadow:"0 0 40px var(--status-warning-glow), var(--shadow-lg)",padding:"var(--sp-6)",maxWidth:440,width:"100%",margin:"0 var(--sp-4)",animation:"scaleIn 0.3s var(--ease-spring) both"},children:[H.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",marginBottom:"var(--sp-4)"},children:[H.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:"var(--radius-full)",background:"var(--status-warning-glow)",border:"1px solid var(--status-warning)",color:"var(--status-warning)",fontSize:"0.7rem",fontWeight:700},children:"◆"}),H.jsxs("h2",{style:{fontFamily:"var(--font-mono)",fontSize:"0.78rem",fontWeight:700,color:"var(--status-warning)",textTransform:"uppercase",letterSpacing:"0.08em"},children:["Checkpoint — ",n]})]}),H.jsx("p",{style:{color:"var(--text-primary)",fontSize:"0.85rem",lineHeight:1.6,marginBottom:"var(--sp-5)"},children:t}),H.jsxs("div",{style:{display:"flex",gap:"var(--sp-2)"},children:[H.jsx("input",{type:"text",className:"input",placeholder:"Type your response...",value:l,onChange:m=>o(m.target.value),onKeyPress:d,autoFocus:!0,style:{flex:1}}),H.jsx("button",{onClick:c,className:"btn",style:{background:"var(--status-warning)",color:"var(--text-inverse)",border:"1px solid var(--status-warning)",fontWeight:600,padding:"0 var(--sp-4)"},children:"Send"})]})]})})}const Sx=[16109737,15251594,13935988,13012574,10515018,9133628],bx=[2890510,4861722,9136404,12886874,1710618,9118976],iM=Ep,Bt=iM/2,Gt=7,_e=14,ln=12,sn=5,Zi=10,Te=4,Ji=9,Jt=8;function Vc(n,t,a,l,o){n.circle(t,a-1,Gt+1),n.fill(o),n.circle(t,a,Gt),n.fill(l),n.circle(t-3,a-1,1.5),n.fill(1710618),n.circle(t+3,a-1,1.5),n.fill(1710618),n.circle(t-2.5,a-1.5,.6),n.fill(16777215),n.circle(t+3.5,a-1.5,.6),n.fill(16777215)}function kc(n,t,a,l,o,c){n.roundRect(t-l/2,a,l,o,3),n.fill(c),n.moveTo(t-3,a),n.lineTo(t,a+4),n.lineTo(t+3,a),n.stroke({width:1,color:lM(c,.15)})}function Tx(n,t,a,l,o){n.roundRect(t-l-1,a,l,o,2),n.fill(2899536),n.roundRect(t+1,a,l,o,2),n.fill(2899536)}function Ex(n,t,a,l){n.roundRect(t-l-2,a,l+2,3,1),n.fill(1710618),n.roundRect(t,a,l+2,3,1),n.fill(1710618)}function lM(n,t){const a=Math.max(0,(n>>16&255)*(1-t)),l=Math.max(0,(n>>8&255)*(1-t)),o=Math.max(0,(n&255)*(1-t));return Math.floor(a)<<16|Math.floor(l)<<8|Math.floor(o)}function sM(n){const t=new Map;for(let a=0;a<zy.length;a++){const l=zy[a],o=Sx[a%Sx.length],c=bx[a%bx.length],d=new ni;Vc(d,Bt,Jt,o,c),kc(d,Bt,Jt+Gt,_e,ln,l),d.roundRect(Bt-_e/2-Te,Jt+Gt+1,Te,Ji,2),d.fill(l),d.roundRect(Bt+_e/2,Jt+Gt+1,Te,Ji,2),d.fill(l),d.circle(Bt-_e/2-Te/2,Jt+Gt+Ji+1,2),d.fill(o),d.circle(Bt+_e/2+Te/2,Jt+Gt+Ji+1,2),d.fill(o),Tx(d,Bt,Jt+Gt+ln,sn,Zi),Ex(d,Bt,Jt+Gt+ln+Zi,sn),t.set(`agent-${a}-standing`,n.renderer.generateTexture(d));const m=new ni,p=Jt+4;Vc(m,Bt,p,o,c),kc(m,Bt,p+Gt,_e,ln-2,l),m.roundRect(Bt-_e/2-Te+1,p+Gt+2,Te,Ji-3,2),m.fill(l),m.roundRect(Bt+_e/2-1,p+Gt+2,Te,Ji-3,2),m.fill(l);const g=6;m.roundRect(Bt-sn-1,p+Gt+ln-2,sn+1,g,2),m.fill(2899536),m.roundRect(Bt,p+Gt+ln-2,sn+1,g,2),m.fill(2899536),t.set(`agent-${a}-seated`,n.renderer.generateTexture(m));const x=new ni,b=Jt+4;Vc(x,Bt+2,b,o,c),kc(x,Bt+1,b+Gt,_e,ln-2,l),x.roundRect(Bt+_e/2,b+Gt+2,Te+4,4,2),x.fill(l),x.roundRect(Bt+_e/2-2,b+Gt+2,Te+4,4,2),x.fill(l),x.circle(Bt+_e/2+Te+3,b+Gt+4,2),x.fill(o),x.circle(Bt+_e/2+Te+1,b+Gt+4,2),x.fill(o),m.roundRect(Bt-sn-1,b+Gt+ln-2,sn+1,g,2),m.fill(2899536),x.roundRect(Bt,b+Gt+ln-2,sn+1,g,2),x.fill(2899536),t.set(`agent-${a}-typing`,n.renderer.generateTexture(x));const E=new ni;Vc(E,Bt,Jt,o,c),kc(E,Bt,Jt+Gt,_e,ln,l),E.roundRect(Bt-_e/2-Te,Jt+Gt-1,Te,Ji+2,2),E.fill(l),E.roundRect(Bt+_e/2,Jt+Gt+3,Te,Ji-2,2),E.fill(l),E.roundRect(Bt+1,Jt+Gt+ln,sn,Zi+2,2),E.fill(2899536),E.roundRect(Bt-sn-1,Jt+Gt+ln-2,sn,Zi,2),E.fill(2899536),E.roundRect(Bt,Jt+Gt+ln+Zi+1,sn+2,3,1),E.fill(1710618),E.roundRect(Bt-sn-2,Jt+Gt+ln+Zi-3,sn+1,3,1),E.fill(1710618),t.set(`agent-${a}-walk-right`,n.renderer.generateTexture(E));const C=new ni;Vc(C,Bt,Jt,o,c),kc(C,Bt,Jt+Gt,_e,ln,l),C.roundRect(Bt+_e/2,Jt+Gt-1,Te,Ji+2,2),C.fill(l),C.roundRect(Bt-_e/2-Te,Jt+Gt+3,Te,Ji-2,2),C.fill(l),C.roundRect(Bt-sn-1,Jt+Gt+ln,sn,Zi+2,2),C.fill(2899536),C.roundRect(Bt+1,Jt+Gt+ln-2,sn,Zi,2),C.fill(2899536),C.roundRect(Bt-sn-2,Jt+Gt+ln+Zi+1,sn+2,3,1),C.fill(1710618),C.roundRect(Bt,Jt+Gt+ln+Zi-3,sn+1,3,1),C.fill(1710618),t.set(`agent-${a}-walk-left`,n.renderer.generateTexture(C));const M=new ni;Vc(M,Bt,Jt,o,c),kc(M,Bt,Jt+Gt,_e,ln,l),M.roundRect(Bt-_e/2-Te,Jt+Gt+1,Te,Ji,2),M.fill(l),M.circle(Bt-_e/2-Te/2,Jt+Gt+Ji+1,2),M.fill(o),M.roundRect(Bt+_e/2,Jt+Gt,Te,6,2),M.fill(l),M.circle(Bt+_e/2+Te/2+1,Jt+Gt,2),M.fill(o),M.roundRect(Bt+_e/2+Te/2-1,Jt+Gt-6,6,7,1),M.fill(14142664),M.moveTo(Bt+_e/2+Te/2,Jt+Gt-7),M.quadraticCurveTo(Bt+_e/2+Te/2+2,Jt+Gt-11,Bt+_e/2+Te/2,Jt+Gt-14),M.stroke({width:1,color:16777215,alpha:.4}),M.moveTo(Bt+_e/2+Te/2+3,Jt+Gt-7),M.quadraticCurveTo(Bt+_e/2+Te/2+5,Jt+Gt-10,Bt+_e/2+Te/2+3,Jt+Gt-13),M.stroke({width:1,color:16777215,alpha:.3}),Tx(M,Bt,Jt+Gt+ln,sn,Zi),Ex(M,Bt,Jt+Gt+ln+Zi,sn),t.set(`agent-${a}-coffee`,n.renderer.generateTexture(M))}return t}function rM(n,t){const a=n%zy.length;let l;switch(t){case"working":l="typing";break;case"typing":l="typing";break;case"standing":l="standing";break;case"coffee":l="coffee";break;case"walk-right":l="walk-right";break;case"walk-left":l="walk-left";break;case"delivering":l="walk-right";break;case"idle":l="standing";break;case"seated":l="seated";break;case"checkpoint":case"done":default:l="seated";break}return`agent-${a}-${l}`}function uM(n,t){const a=e_;n.roundRect(0,0,t.totalWidth,t.totalHeight,4),n.fill($c.wall),n.rect(0,0,t.totalWidth,3),n.fill({color:$c.wallHighlight,alpha:.5}),Ax(n,t.corridorH.x,t.corridorH.y,t.corridorH.width,t.corridorH.height,"horizontal"),Ax(n,t.corridorV.x,t.corridorV.y,t.corridorV.width,t.corridorV.height,"vertical");for(const E of t.squadOrigins){const{origin:C,width:M,height:z,doorSide:R}=E;R==="right"?td(n,C.x+M,C.y+z/2-er/2,a,er):R==="left"?td(n,C.x-a,C.y+z/2-er/2,a,er):R==="top"?$h(n,C.x+M/2-er/2,C.y-a,er,a):$h(n,C.x+M/2-er/2,C.y+z,er,a)}const l=t.ceoOffice,o=Math.min(er,60);td(n,l.x+l.width,l.y+l.height/2-o/2,a,o),$h(n,l.x+l.width/2-o/2,l.y+l.height,o,a);const c=t.bathroomMale;$h(n,c.x+c.width/2-30,c.y+c.height,60,a);const d=t.bathroomFemale;$h(n,d.x+d.width/2-30,d.y+d.height,60,a);const m=t.kitchen;td(n,m.x+m.width,m.y+m.height/2-30,a,60);const p=t.restArea;td(n,p.x-a,p.y+p.height/2-30,a,60);const g=t.corridorV;if(g.height>100){const E=g.x+g.width/2;for(let C=g.y+60;C<g.y+g.height-40;C+=200)Cx(n,E,C)}const x=t.corridorH,b=x.y+x.height/2;for(let E=x.x+80;E<x.x+x.width-80;E+=220)Cx(n,E,b);n.roundRect(0,0,t.totalWidth,t.totalHeight,4),n.stroke({width:2,color:5533306,alpha:.6})}function $h(n,t,a,l,o){n.rect(t,a,l,o),n.fill(iu.floor),n.rect(t-2,a,2,o),n.fill($c.doorFrame),n.rect(t+l,a,2,o),n.fill($c.doorFrame)}function td(n,t,a,l,o){n.rect(t,a,l,o),n.fill(iu.floor),n.rect(t,a-2,l,2),n.fill($c.doorFrame),n.rect(t,a+o,l,2),n.fill($c.doorFrame)}function Cx(n,t,a){n.roundRect(t-8,a-12,16,12,2),n.fill(9133628),n.circle(t,a-16,8),n.fill(5025616),n.circle(t-4,a-20,5),n.fill(3706428),n.circle(t+4,a-18,6),n.fill(6732650)}function Ax(n,t,a,l,o,c){n.rect(t,a,l,o),n.fill(iu.floor);const d=40;for(let m=0;m<Math.ceil(o/d);m++){for(let p=0;p<Math.ceil(l/d);p++){const g=t+p*d,x=a+m*d;(m+p)%2===0&&(n.rect(g,x,d,d),n.fill({color:iu.tile,alpha:.5})),n.moveTo(g,a),n.lineTo(g,a+o),n.stroke({width:.5,color:iu.grout,alpha:.3})}n.moveTo(t,a+m*d),n.lineTo(t+l,a+m*d),n.stroke({width:.5,color:iu.grout,alpha:.3})}c==="horizontal"?(n.rect(t+10,a+o/2-2,l-20,4),n.fill({color:iu.stripe,alpha:.3})):(n.rect(t+l/2-2,a+10,4,o-20),n.fill({color:iu.stripe,alpha:.3}))}function Mx(n,t,a,l,o,c){n.rect(t,a,l,o),n.fill(ja.floor);const d=20;for(let R=0;R<Math.ceil(o/d);R++)for(let w=0;w<Math.ceil(l/d);w++)if((R+w)%2===0){const O=t+w*d,U=a+R*d;n.rect(O,U,d,d),n.fill({color:ja.tile,alpha:.4})}for(let R=0;R<=Math.ceil(o/d);R++)n.moveTo(t,a+R*d),n.lineTo(t+l,a+R*d),n.stroke({width:.5,color:ja.tileGrout,alpha:.3});for(let R=0;R<=Math.ceil(l/d);R++)n.moveTo(t+R*d,a),n.lineTo(t+R*d,a+o),n.stroke({width:.5,color:ja.tileGrout,alpha:.3});const m=Math.min(6,Math.max(2,Math.floor((l-20)/70))),p=(l-20)/m,g=80,x=a+o-g-10;for(let R=0;R<m;R++){const w=t+10+R*p;n.rect(w,x,3,g),n.fill(ja.stall),n.rect(w+p-3,x,3,g),n.fill(ja.stall),n.roundRect(w+6,x,p-12,g-4,2),n.fill({color:ja.stallDoor,alpha:.6}),n.circle(w+p-16,x+g/2,2),n.fill({color:7901340,alpha:.8});const O=w+p/2,U=x+g-24;n.roundRect(O-8,U,16,20,4),n.fill(ja.toilet),n.roundRect(O-6,U+2,12,14,3),n.fill(ja.toiletSeat),n.roundRect(O-6,U+2,12,14,3),n.stroke({width:.5,color:12434877,alpha:.5})}const b=Math.min(4,Math.max(2,Math.floor(l/100))),E=l/(b+1),C=a+30;n.rect(t+4,a+4,l-8,60),n.fill({color:ja.wall,alpha:.3});for(let R=0;R<b;R++){const w=t+E*(R+1);n.roundRect(w-12,a+8,24,20,3),n.fill(ja.mirrorFrame),n.roundRect(w-10,a+10,20,16,2),n.fill(ja.mirror),n.roundRect(w-6,a+12,6,10,1),n.fill({color:16777215,alpha:.15}),n.roundRect(w-14,C,28,16,3),n.fill(ja.sink),n.ellipse(w,C+8,8,5),n.fill(ja.sinkBowl),n.ellipse(w,C+8,8,5),n.stroke({width:.5,color:12434877,alpha:.4}),n.roundRect(w-2,C+1,4,6,1),n.fill(ja.pipe)}const M=t+l/2,z=a+o-20;n.roundRect(M-12,z-6,24,14,3),n.fill({color:3622735,alpha:.7}),c==="male"?(n.circle(M,z-2,3),n.fill({color:16777215,alpha:.8}),n.rect(M-3,z+1,6,4),n.fill({color:4367861,alpha:.8})):(n.circle(M,z-2,3),n.fill({color:16777215,alpha:.8}),n.moveTo(M-5,z+5),n.lineTo(M+5,z+5),n.lineTo(M,z+1),n.closePath(),n.fill({color:15684432,alpha:.8})),n.rect(t,a,l,o),n.stroke({width:1,color:0,alpha:.08})}function oM(n,t,a,l,o){n.rect(t,a,l,o),n.fill(qn.floor);const c=24;for(let g=0;g<Math.ceil(o/c);g++)for(let x=0;x<Math.ceil(l/c);x++)(g+x)%2===0&&(n.rect(t+x*c,a+g*c,c,c),n.fill({color:qn.tile,alpha:.4}));for(let g=0;g<=Math.ceil(o/c);g++)n.moveTo(t,a+g*c),n.lineTo(t+l,a+g*c),n.stroke({width:.5,color:qn.tileGrout,alpha:.3});for(let g=0;g<=Math.ceil(l/c);g++)n.moveTo(t+g*c,a),n.lineTo(t+g*c,a+o),n.stroke({width:.5,color:qn.tileGrout,alpha:.3});n.roundRect(t+6,a+10,24,o-20,3),n.fill(qn.counter),n.roundRect(t+7,a+11,22,o-22,2),n.fill(qn.counterTop),n.roundRect(t+6,a+10,24,40,3),n.fill(qn.fridge),n.roundRect(t+8,a+12,20,18,2),n.fill(qn.fridgeDoor),n.roundRect(t+8,a+32,20,16,2),n.fill(qn.fridgeDoor),n.roundRect(t+26,a+20,2,8,1),n.fill(qn.fridgeHandle),n.roundRect(t+26,a+36,2,8,1),n.fill(qn.fridgeHandle),n.roundRect(t+10,a+60,16,20,2),n.fill(qn.coffeeMaker),n.circle(t+18,a+64,2),n.fill({color:qn.coffeeMakerLight,alpha:.9});const d=t+l/2-16,m=a+o/2-12;n.roundRect(d,m,32,24,4),n.fill(qn.table),n.roundRect(d+2,m+2,28,20,3),n.fill(qn.tableTop);const p=[{cx:d-6,cy:m+12},{cx:d+38,cy:m+12},{cx:d+16,cy:m+30}];for(const g of p)n.roundRect(g.cx-5,g.cy-5,10,10,3),n.fill(qn.chair);n.circle(t+l/2,a+8,4),n.fill({color:qn.lamp,alpha:.6}),n.circle(t+l/2,a+8,8),n.fill({color:qn.lamp,alpha:.1}),n.rect(t,a,l,o),n.stroke({width:1,color:0,alpha:.08})}function cM(n,t,a,l,o){n.rect(t,a,l,o),n.fill($a.floor),n.roundRect(t+8,a+8,l-16,o-16,6),n.fill({color:$a.carpet,alpha:.2}),n.roundRect(t+12,a+12,l-24,o-24,4),n.stroke({width:1,color:$a.carpetBorder,alpha:.15});const c=t+10,d=a+10,m=l-20,p=28;n.roundRect(c,d,m,10,3),n.fill($a.sofaArm),n.roundRect(c,d+8,m,p-8,4),n.fill($a.sofa);const g=(m-12)/3;for(let M=0;M<3;M++)n.roundRect(c+4+M*(g+2),d+10,g,p-14,3),n.fill($a.sofaCushion);n.roundRect(c-2,d+6,6,p-4,2),n.fill($a.sofaArm),n.roundRect(c+m-4,d+6,6,p-4,2),n.fill($a.sofaArm);const x=t+l/2,b=a+o-20;n.roundRect(x-12,b+8,24,10,2),n.fill($a.tvStand),n.roundRect(x-20,b-12,40,22,2),n.fill($a.tv),n.roundRect(x-18,b-10,36,18,1),n.fill($a.tvScreen),n.roundRect(x-14,b-8,10,6,1),n.fill({color:16777215,alpha:.05});const E=t+l-30,C=a+o/2-8;n.roundRect(E,C,20,16,3),n.fill($a.sideTable),n.rect(E+3,C+2,8,11),n.fill({color:$a.magazine,alpha:.7}),n.rect(E+8,C+4,8,10),n.fill({color:$a.magazineAlt,alpha:.6}),n.roundRect(t+8,a+o-40,12,10,2),n.fill(9133628),n.circle(t+14,a+o-34,7),n.fill(5025616),n.circle(t+11,a+o-38,4),n.fill(3706428),n.rect(t,a,l,o),n.stroke({width:1,color:0,alpha:.08})}function fM(n,t,a){n.rect(0,0,t,a),n.fill(Yt.floor);const l=20,o=80;for(let b=0;b<Math.ceil(a/l);b++){const E=b%2*(o/2),C=b*l;n.moveTo(0,C),n.lineTo(t,C),n.stroke({width:1,color:Yt.floorGrout,alpha:.4});for(let M=0;M<Math.ceil(t/o)+1;M++){const z=M*o-E;z>0&&z<t&&(n.moveTo(z,C),n.lineTo(z,C+l),n.stroke({width:1,color:Yt.floorGrout,alpha:.25}))}b%3===0&&(n.rect(0,C+2,t,l-4),n.fill({color:Yt.floorHighlight,alpha:.08}))}const c=42;n.rect(0,c,t,4),n.fill({color:0,alpha:.1}),n.rect(0,0,t,c),n.fill({color:Yt.wall,alpha:.2}),n.rect(0,0,t,3),n.fill({color:Yt.wallTrim,alpha:.15}),n.rect(0,c-4,t,4),n.fill({color:Yt.baseboard,alpha:.2});const d=120,m=t-d*2,p=a-200,g=d,x=100;m>100&&p>60&&(n.roundRect(g+3,x+3,m,p,6),n.fill({color:0,alpha:.08}),n.roundRect(g,x,m,p,6),n.fill({color:Yt.rug,alpha:.15}),n.roundRect(g+4,x+4,m-8,p-8,4),n.stroke({width:1.5,color:Yt.rugBorder,alpha:.12}),n.roundRect(g+12,x+12,m-24,p-24,3),n.stroke({width:1,color:Yt.rugPattern,alpha:.1}))}function hM(n,t,a){const l=t+Ml/2,o=a+nu+8;for(let z=0;z<5;z++){const R=z/5*Math.PI*2-Math.PI/2,w=l+Math.cos(R)*10,O=o+14+Math.sin(R)*5;n.circle(w,O,2),n.fill(Yt.chairWheel)}n.rect(l-1.5,o+4,3,12),n.fill(Yt.chairBase),n.roundRect(l-14,o,28,10,4),n.fill(Yt.chairSeat),n.roundRect(l-12,o+1,24,4,3),n.fill({color:Yt.chairBack,alpha:.5}),n.roundRect(l-12,o-16,24,18,5),n.fill(Yt.chairBack),n.roundRect(l-10,o-14,20,8,3),n.fill({color:16777215,alpha:.05}),n.roundRect(t+3,a+3,Ml,nu,4),n.fill({color:0,alpha:.12}),n.roundRect(t,a,Ml,nu,4),n.fill(Yt.desk),n.roundRect(t+2,a+2,Ml-4,nu-4,3),n.fill(Yt.deskTop);for(let z=0;z<3;z++){const R=a+10+z*16;n.moveTo(t+6,R),n.lineTo(t+Ml-6,R),n.stroke({width:.5,color:Yt.deskShadow,alpha:.2})}n.rect(t+2,a+nu-6,Ml-4,4),n.fill(Yt.deskEdge);const c=4,d=8;n.rect(t+4,a+nu,c,d),n.fill(Yt.deskLeg),n.rect(t+Ml-4-c,a+nu,c,d),n.fill(Yt.deskLeg);const m=32,p=22,g=t+(Ml-m)/2,x=a+8;n.roundRect(g+m/2-10,x+p+4,20,4,2),n.fill(Yt.monitorStand),n.rect(g+m/2-2,x+p,4,6),n.fill(Yt.monitorStand),n.roundRect(g,x,m,p,2),n.fill(Yt.monitor),n.roundRect(g+2,x+2,m-4,p-5,1),n.fill(Yt.monitorScreen),n.roundRect(g+3,x+3,m-6,6,1),n.fill({color:Yt.monitorScreenGlow,alpha:.3});const b=24,E=8,C=g+(m-b)/2,M=x+p+10;n.roundRect(C,M,b,E,2),n.fill(Yt.keyboard);for(let z=0;z<3;z++)for(let R=0;R<6;R++)n.rect(C+2+R*3.5,M+1.5+z*2.5,2.5,1.5),n.fill(Yt.keyboardKey);n.roundRect(t+Ml-18,a+14,7,8,2),n.fill(14142664),n.roundRect(t+Ml-11,a+16,3,4,1),n.fill(14142664),n.rect(t+8,a+20,14,18),n.fill(16775620),n.rect(t+8,a+20,14,2),n.fill(16635957),n.rect(t+10,a+24,10,1.5),n.fill(1402304)}function dM(n,t,a){n.roundRect(t+2,a+2,44,64,3),n.fill({color:0,alpha:.1}),n.roundRect(t,a,44,64,3),n.fill(Yt.bookshelf),n.roundRect(t+1,a+1,42,62,2),n.stroke({width:1,color:Yt.bookshelfEdge,alpha:.3}),n.rect(t+3,a+3,38,58),n.fill({color:6048310,alpha:.5});for(let l=0;l<3;l++){const o=a+8+l*20;n.rect(t+3,o+14,38,3),n.fill(Yt.bookshelfEdge),n.rect(t+3,o+17,38,1),n.fill({color:0,alpha:.1});const c=4+l%2;for(let d=0;d<c;d++){const m=t+5+d*(34/c),p=Math.max(4,34/c-2),g=10+(d*3+l*2)%5,x=(d+l*3)%Yt.bookColors.length;n.rect(m,o+14-g,p,g),n.fill(Yt.bookColors[x]),n.rect(m+1,o+14-g+2,.8,g-4),n.fill({color:16777215,alpha:.15})}l===1&&(n.circle(t+38,o+8,4),n.fill({color:4367861,alpha:.6}),n.circle(t+38,o+8,4),n.stroke({width:.5,color:2001125,alpha:.4}))}n.roundRect(t+14,a-4,8,6,1),n.fill(Yt.pot),n.circle(t+18,a-6,5),n.fill(Yt.plantLight),n.circle(t+15,a-8,3),n.fill(Yt.plant)}function Rx(n,t,a){n.ellipse(t+12,a+34,12,3),n.fill({color:0,alpha:.1}),n.moveTo(t+2,a+16),n.lineTo(t+4,a+32),n.lineTo(t+20,a+32),n.lineTo(t+22,a+16),n.closePath(),n.fill(Yt.pot),n.roundRect(t,a+14,24,5,2),n.fill(Yt.potRim),n.roundRect(t+2,a+14,20,2,1),n.fill({color:16777215,alpha:.08}),n.ellipse(t+12,a+16,10,3),n.fill(Yt.soil),n.rect(t+11,a+2,2,14),n.fill(Yt.plantDark),n.ellipse(t+6,a+4,7,5),n.fill(Yt.plantDark),n.ellipse(t+18,a+2,6,5),n.fill(Yt.plantDark),n.ellipse(t+12,a+1,8,6),n.fill(Yt.plant),n.ellipse(t+4,a+8,6,4),n.fill(Yt.plant),n.ellipse(t+20,a+8,6,4),n.fill(Yt.plant),n.ellipse(t+9,a+5,5,4),n.fill(Yt.plantLight),n.ellipse(t+15,a+3,5,4),n.fill(Yt.plantLight),n.moveTo(t+12,a-2),n.lineTo(t+12,a+6),n.stroke({width:.5,color:Yt.plantDark,alpha:.3})}function mM(n,t,a){n.roundRect(t+2,a+2,80,40,4),n.fill({color:0,alpha:.1}),n.roundRect(t,a,80,40,4),n.fill(pa.counter),n.roundRect(t+1,a+1,78,8,3),n.fill(pa.counterTop),n.roundRect(t+2,a+2,76,3,2),n.fill({color:16777215,alpha:.06}),n.roundRect(t+4,a-14,28,38,3),n.fill(pa.machine),n.roundRect(t+5,a-14,26,6,2),n.fill(pa.machineTop),n.roundRect(t+8,a+16,20,4,1),n.fill({color:2503224,alpha:.8}),n.rect(t+13,a+8,3,8),n.fill(pa.machineTop),n.rect(t+20,a+8,3,8),n.fill(pa.machineTop),n.circle(t+18,a-8,2.5),n.fill({color:pa.machineLight,alpha:.9}),n.circle(t+18,a-8,5),n.fill({color:pa.machineLight,alpha:.15}),n.roundRect(t+38,a+8,8,10,2),n.fill(pa.cup),n.roundRect(t+46,a+10,3,5,1),n.fill(pa.cup),n.roundRect(t+48,a+6,8,10,2),n.fill(pa.cupShadow),n.ellipse(t+42,a+20,10,3),n.fill(pa.saucer),n.roundRect(t+60,a+6,16,14,3),n.fill(pa.sink),n.roundRect(t+62,a+8,12,10,2),n.fill({color:5533306,alpha:.8}),n.rect(t+66,a-2,3,10),n.fill(pa.faucet),n.roundRect(t+65,a-4,8,3,1),n.fill(pa.faucet),n.roundRect(t+10,a-30,30,14,2),n.fill(pa.menu),n.rect(t+14,a-27,22,2),n.fill({color:16777215,alpha:.5}),n.rect(t+14,a-23,16,1.5),n.fill({color:16777215,alpha:.3}),n.rect(t+14,a-20,18,1.5),n.fill({color:16777215,alpha:.3})}function pM(n,t,a){n.roundRect(t-16,a-24,128,96,6),n.fill({color:vi.carpet,alpha:.25}),n.roundRect(t-12,a-20,120,88,4),n.stroke({width:1,color:vi.carpetPattern,alpha:.2});const l=t+10,o=a-20;n.roundRect(l+2,o+2,76,16,2),n.fill({color:0,alpha:.1}),n.roundRect(l,o,76,16,2),n.fill(vi.whiteboardFrame),n.roundRect(l+2,o+2,72,12,1),n.fill(vi.whiteboard),n.rect(l+6,o+4,18,8),n.fill({color:16775620,alpha:.6}),n.rect(l+28,o+4,18,8),n.fill({color:12312315,alpha:.6}),n.rect(l+50,o+4,18,8),n.fill({color:13166281,alpha:.6}),n.roundRect(l+20,o+14,36,3,1),n.fill(vi.whiteboardFrame),n.roundRect(t+3,a+3,96,48,6),n.fill({color:0,alpha:.1}),n.roundRect(t,a,96,48,6),n.fill(vi.table),n.roundRect(t+2,a+2,92,44,5),n.fill(vi.tableTop),n.roundRect(t+6,a+4,40,10,3),n.fill({color:16777215,alpha:.04}),n.roundRect(t+1,a+1,94,46,5),n.stroke({width:1,color:vi.tableEdge,alpha:.4});const c=4,d=6;n.rect(t+8,a+48,c,d),n.fill(vi.tableLeg),n.rect(t+84,a+48,c,d),n.fill(vi.tableLeg);const m=[{cx:t+16,cy:a-10},{cx:t+48,cy:a-10},{cx:t+80,cy:a-10},{cx:t+16,cy:a+56},{cx:t+48,cy:a+56},{cx:t+80,cy:a+56}];for(const p of m){const x=p.cy<a?p.cy-6:p.cy+6;n.roundRect(p.cx-8,x-4,16,10,3),n.fill(vi.chairBack),n.roundRect(p.cx-7,p.cy-4,14,8,3),n.fill(vi.chairSeat),n.roundRect(p.cx-5,p.cy-3,10,3,2),n.fill({color:16777215,alpha:.06}),n.circle(p.cx,p.cy+5,2),n.fill(vi.chair)}n.roundRect(t+10,a+8,18,12,2),n.fill(3622735),n.roundRect(t+11,a+9,16,8,1),n.fill(4545124),n.rect(t+60,a+12,12,16),n.fill({color:16777215,alpha:.7}),n.rect(t+62,a+14,8,1),n.fill({color:3355443,alpha:.3}),n.rect(t+62,a+17,6,1),n.fill({color:3355443,alpha:.3}),n.roundRect(t+40,a+10,6,14,2),n.fill({color:4367861,alpha:.6}),n.roundRect(t+41,a+7,4,4,1),n.fill({color:9489145,alpha:.5})}const yM={running:vo.statusRunning,idle:vo.statusIdle,completed:vo.statusCompleted,checkpoint:vo.statusCheckpoint};function gM(n,t,a,l){const o=a*.85,c=t+(a-o)/2,d=6,m=30;n.roundRect(c+2,d+2,o,m,8),n.fill({color:0,alpha:.15}),n.roundRect(c,d,o,m,8),n.fill({color:vo.background,alpha:.85}),n.roundRect(c+2,d+1,o-4,8,6),n.fill({color:vo.backgroundGlow,alpha:.4}),n.roundRect(c,d,o,m,8),n.stroke({width:1,color:16777215,alpha:.08});const p=yM[l]??vo.statusIdle,g=c+o-18,x=d+m/2;n.circle(g,x,7),n.fill({color:p,alpha:.2}),n.circle(g,x,4),n.fill(p),n.circle(g-1,x-1,1.5),n.fill({color:16777215,alpha:.3}),n.circle(c+14,x,2),n.fill({color:16777215,alpha:.1})}Jp({Container:$n,Graphics:ni,Sprite:af,Text:Zp});function Ag({agent:n,textures:t,bubbleText:a,animX:l,animY:o,animPose:c}){const d=rM(n.colorIndex,c),m=t.get(d),p=XT[n.status==="walking"?"idle":n.status]??8947848,g=n.status==="checkpoint",x=G.useCallback(E=>{E.clear(),E.circle(0,0,Ep/2+6),E.fill({color:p,alpha:g?.4:.15})},[p,g]),b=G.useCallback(E=>{if(E.clear(),!a)return;const C=Math.min(a.length*5+16,160);E.roundRect(-C/2,-42,C,22,6),E.fill({color:1710638,alpha:.9}),E.moveTo(-4,-20),E.lineTo(4,-20),E.lineTo(0,-15),E.closePath(),E.fill({color:1710638,alpha:.9})},[a]);return H.jsxs("container",{x:l,y:o,children:[H.jsx("graphics",{draw:x}),m&&H.jsx("sprite",{texture:m,anchor:.5}),H.jsx("text",{text:n.name,y:Ep/2+4,anchor:{x:.5,y:0},style:{fontSize:9,fill:"#cccccc",fontFamily:"sans-serif"}}),g&&H.jsx("text",{text:"⚠",y:-Ep/2-12,anchor:.5,style:{fontSize:14,fill:"#ff9800",fontFamily:"sans-serif"}}),a&&H.jsxs(H.Fragment,{children:[H.jsx("graphics",{draw:b}),H.jsx("text",{text:a.length>80?a.slice(-80)+"…":a,y:-31,anchor:{x:.5,y:.5},style:{fontSize:8,fill:"#ffffff",fontFamily:"sans-serif",wordWrap:!0,wordWrapWidth:140}})]})]})}Jp({Container:$n,Graphics:ni,Text:Zp});function vM({squadName:n,status:t,agents:a,textures:l,bubbles:o,animStates:c,originX:d,originY:m,roomWidth:p,roomHeight:g}){const x={x:0,y:0},b=id(x,p,g),E=n_(x,p,g),C=G.useCallback(M=>{M.clear(),fM(M,p,g),gM(M,0,p,t);for(let z=0;z<a.length;z++){const R=Ic(z,x);hM(M,R.x-48,R.y-32)}mM(M,b.x,b.y),pM(M,E.x,E.y),dM(M,p-60,44),Rx(M,10,g-50),Rx(M,p-40,50)},[a.length,t,p,g]);return H.jsxs("container",{x:d,y:m,children:[H.jsx("graphics",{draw:C}),H.jsx("text",{text:n,x:p/2,y:22,anchor:.5,style:{fontSize:14,fill:"#ffffff",fontFamily:"sans-serif",fontWeight:"bold"}}),a.map(M=>{const z=`${n}:${M.id}`,R=o[z],w=c[M.id];return w!=null&&w.isExternalTransit?null:H.jsx(Ag,{agent:M,textures:l,bubbleText:(R==null?void 0:R.text)??null,animX:(w==null?void 0:w.x)??M.position.x,animY:(w==null?void 0:w.y)??M.position.y,animPose:(w==null?void 0:w.pose)??(M.status==="working"?"typing":"seated")},M.id)})]})}function xM(n,t,a,l,o){n.rect(t,a,l,o),n.fill(Ia.floor);const c=16,d=60;for(let et=0;et<Math.ceil(o/c);et++){const ct=et%2*(d/2),vt=a+et*c;n.moveTo(t,vt),n.lineTo(t+l,vt),n.stroke({width:.5,color:4861984,alpha:.3});for(let dt=0;dt<Math.ceil(l/d)+1;dt++){const St=t+dt*d-ct;St>t&&St<t+l&&(n.moveTo(St,vt),n.lineTo(St,vt+c),n.stroke({width:.5,color:4861984,alpha:.2}))}}const m=30,p=l-m*2,g=o-m*2,x=t+m,b=a+m;n.roundRect(x+2,b+2,p,g,6),n.fill({color:0,alpha:.1}),n.roundRect(x,b,p,g,6),n.fill({color:Ia.carpet,alpha:.6}),n.roundRect(x+6,b+6,p-12,g-12,4),n.stroke({width:1.5,color:Ia.carpetBorder,alpha:.4}),n.roundRect(x+14,b+14,p-28,g-28,3),n.stroke({width:1,color:16766287,alpha:.15});const E=t+8,C=a+40,M=6,z=80;n.roundRect(E-2,C-2,M+4,z+4,2),n.fill(Ia.windowFrame),n.roundRect(E,C,M,z,1),n.fill(Ia.window),n.rect(E+1,C+4,2,z/3),n.fill({color:16777215,alpha:.2}),n.roundRect(E-4,C+z+2,M+8,3,1),n.fill(Ia.windowSill);const R=120,w=60,O=t+l/2-R/2,U=a+o/2-w/2-10;n.roundRect(O+3,U+3,R,w,4),n.fill({color:0,alpha:.12}),n.roundRect(O,U,R,w,4),n.fill(Ia.desk),n.roundRect(O+3,U+3,R-6,w-6,3),n.fill(Ia.deskTop),n.roundRect(O+1,U+1,R-2,w-2,4),n.stroke({width:1,color:Ia.deskEdge,alpha:.3}),n.roundRect(O+20,U+8,32,22,2),n.fill(2236976),n.roundRect(O+22,U+10,28,16,1),n.fill(1981020),n.roundRect(O+18,U+34,36,10,2),n.fill(3355456),n.rect(O+70,U+10,16,22),n.fill({color:16777215,alpha:.7}),n.rect(O+72,U+14,10,1),n.fill({color:3355443,alpha:.3}),n.rect(O+72,U+17,8,1),n.fill({color:3355443,alpha:.3}),n.roundRect(O+90,U+12,10,14,2),n.fill(3622735),n.circle(O+100,U+42,5),n.fill(14142664),n.circle(O+100,U+42,3),n.fill(7951688);const Y=O+R/2,k=U+w+16;n.roundRect(Y-14,k-4,28,16,6),n.fill(Ia.chair),n.roundRect(Y-12,k-8,24,12,4),n.fill(Ia.chairSeat),n.roundRect(Y-8,k-6,16,4,2),n.fill({color:16777215,alpha:.06}),n.circle(Y,k+14,3),n.fill(4473924);for(const et of[-8,0,8])n.circle(Y+et,k+18,1.5),n.fill(3355443);const V=t+l-54,Z=a+20;n.roundRect(V,Z,44,80,3),n.fill(Ia.bookshelf);const F=[15022389,2001125,4431943,16750592,9315498,35195];for(let et=0;et<3;et++){const ct=Z+8+et*26;n.rect(V+3,ct+18,38,3),n.fill(9139029);for(let vt=0;vt<5;vt++){const dt=V+5+vt*7,St=12+(vt*3+et*2)%6;n.rect(dt,ct+18-St,5,St),n.fill(F[(vt+et*2)%F.length])}}const q=t+l-54,$=a+o-60;n.roundRect(q,$+10,24,16,2),n.fill(6111287),n.rect(q+10,$+4,4,8),n.fill(7901340),n.circle(q+12,$,10),n.fill(Ia.globe),n.circle(q+12,$,10),n.stroke({width:.5,color:2001125,alpha:.4}),n.circle(q+9,$-3,3),n.fill({color:16777215,alpha:.15}),n.roundRect(O+44,U+38,36,10,2),n.fill(Ia.nameplate),n.roundRect(O+44,U+38,36,10,2),n.stroke({width:.5,color:13215744,alpha:.5}),n.rect(t,a,l,o),n.stroke({width:1,color:0,alpha:.08})}Jp({Container:$n,Graphics:ni,Text:Zp});const zx=["Precisamos escalar o time de vendas...","O Q4 vai ser decisivo.","Investir mais em marketing digital.","Meta trimestral no caminho certo.","Revisar budget de R&D...","Nova parceria pode mudar tudo.","Churn rate precisa cair 20%.","Hora de expandir para LATAM.","Reunião com investidores amanhã.","NPS subiu 15 pontos!","Cultura da empresa vem primeiro.","Mais dados antes de decidir.","Vamos automatizar esse processo.","Roadmap do próximo quarter...","Reter talentos é prioridade.","Revenue cresceu 30% no trimestre.","Precisamos de mais diversidade no time.","O mercado está mudando rápido.","Foco no cliente sempre.","Inovação é nosso diferencial."],xp=900,wx=2400,_M=6e3,SM={id:"ceo",name:"CEO",colorIndex:3,status:"working",deskIndex:0,position:{x:0,y:0},targetPosition:null};function bM({x:n,y:t,width:a,height:l,textures:o,ticker:c}){const[d,m]=G.useState(null),[p,g]=G.useState("seated"),x=G.useRef(0),b=G.useRef(xp+Math.floor(Math.random()*(wx-xp))),E=G.useRef(null),C=a/2,M=l/2+10,z=G.useCallback(R=>{R.clear(),xM(R,0,0,a,l)},[a,l]);return G.useEffect(()=>{if(!c)return;const R=()=>{x.current++;const w=x.current,O=Math.floor(w/48)%2===0?"typing":"seated";if(g(O),b.current--,b.current<=0){const U=zx[Math.floor(Math.random()*zx.length)];m(U),g("standing"),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{m(null)},_M),b.current=xp+Math.floor(Math.random()*(wx-xp))}};return c.add(R),()=>{c.remove(R),E.current&&clearTimeout(E.current)}},[c]),H.jsxs("container",{x:n,y:t,children:[H.jsx("graphics",{draw:z}),H.jsx("text",{text:"CEO",x:a/2,y:12,anchor:.5,style:{fontSize:13,fill:"#ffd700",fontFamily:"sans-serif",fontWeight:"bold"}}),H.jsx(Ag,{agent:SM,textures:o,bubbleText:d,animX:C,animY:M,animPose:p})]})}const by=150,TM=48,Ty=30,_p=3,EM=4e3,Sp=600,Ey=1800,CM=60,Dx=900,Ox=5e3,Nx=[["Cafe novo?","Sim, colombiano!"],["Viu o deploy?","Passou nos testes!"],["Reuniao as 3?","Vou confirmar."],["Bug no login?","Ja corrigi."],["Almoco onde?","Sushi hoje?"],["PR aprovado?","Mergeei agora."],["Ta ocupado?","Pode falar."],["Deadline?","Sexta-feira."],["Novo feature?","Ficou muito bom!"],["Ajuda aqui?","Claro, mostra."],["Sprint review?","Amanha cedo."],["Stand-up?","Ja comecou!"],["Refatorei aquele modulo.","Ficou mais limpo."],["Testes passando?","Todos verdes!"],["Viu o Figma?","Design top!"],["Pipeline rodou?","Em 2 min."],["Code review?","Ja olhei, aprovo."],["Qual branch?","feature/office."],["Bom dia!","Bom dia! Tudo bem?"],["Feriado proximo?","Semana que vem!"]];function AM(n,t,a,l,o,c){const d={x:0,y:0},m=Math.random();if(m<.2){const p={x:o+n.x,y:c+n.y},g=ld(p,`squad-${l}`,"kitchen",a),x=PT(a);return{x:x.x,y:x.y,destination:"kitchen",waypoints:g,isExternal:!0}}else if(m<.35){const p={x:o+n.x,y:c+n.y},g=ld(p,`squad-${l}`,"rest-area",a),x=IT(a);return{x:x.x,y:x.y,destination:"restArea",waypoints:g,isExternal:!0}}else if(m<.45){const p=Math.random()<.5?"male":"female",g={x:o+n.x,y:c+n.y},x=p==="male"?"bathroom-male":"bathroom-female",b=ld(g,`squad-${l}`,x,a),E=WT(a,p);return{x:E.x,y:E.y,destination:x,waypoints:b,isExternal:!0}}else if(m<.6){const p=n_(d,t.width,t.height);return{x:p.x+(Math.random()-.5)*40,y:p.y+(Math.random()-.5)*30,destination:"meeting"}}else if(m<.75){const p=id(d,t.width,t.height);return{x:p.x+(Math.random()-.5)*30,y:p.y+(Math.random()-.5)*20,destination:"coffee"}}else if(m<.9){const p={x:o+n.x,y:c+n.y},g=$T(a),x=[p,a.doorPoints[`squad-${l}`],g];return{x:g.x,y:g.y,destination:"corridor",waypoints:x,isExternal:!0}}else{const p=Math.floor(Math.random()*4),g=Ic(p,d,t.width,t.height);return{x:g.x+(Math.random()-.5)*40,y:g.y+(Math.random()-.5)*20,destination:"neighbor"}}}function MM(n){const[t,a]=G.useState({}),l=G.useRef({}),o=G.useRef({}),c=G.useRef({}),d=G.useRef({}),m=G.useRef(0),p=G.useRef({}),g=G.useRef({});G.useEffect(()=>{const b=We.subscribe((E,C)=>{var R,w;const M=E.bubbles,z=C.bubbles;for(const O of Object.keys(M))if(((R=M[O])==null?void 0:R.updatedAt)!==((w=z[O])==null?void 0:w.updatedAt)){p.current[O]&&clearTimeout(p.current[O]);const[U,Y]=O.split(":");p.current[O]=setTimeout(()=>{We.getState().clearBubble(U,Y),delete p.current[O]},EM)}});return()=>{b();for(const E of Object.values(p.current))clearTimeout(E);p.current={}}},[]);const x=G.useCallback(()=>{m.current++;const b=m.current,E=We.getState(),C={},M=Rp(E.rooms.length);for(const[z,R]of Object.entries(E.agentVisuals)){l.current[z]||(l.current[z]={}),o.current[z]||(o.current[z]={}),C[z]={};const w=E.rooms.indexOf(z),O=M.squadOrigins[w],U=(O==null?void 0:O.origin)??{x:0,y:0},Y=[];for(const k of R){const V=l.current[z],Z=o.current[z],F=`${z}:${k.id}`;Z[k.id]||(Z[k.id]={x:k.position.x,y:k.position.y,baseY:k.position.y},c.current[F]=Math.floor(Math.random()*Ey));const q=Z[k.id];if(k.targetPosition&&(!V[k.id]||V[k.id].progress>=1)){const et=V[k.id];if(et!=null&&et.isExternalTransit){const ct=et.globalX??q.x+U.x,vt=et.globalY??q.y+U.y,dt={x:ct,y:vt},St={x:k.targetPosition.x+U.x,y:k.targetPosition.y+U.y},j=d.current[F],Q=j==="kitchen"?"kitchen":j==="restArea"?"rest-area":j==="bathroom-male"?"bathroom-male":j==="bathroom-female"?"bathroom-female":`squad-${w}`,ot=ld(dt,Q,`squad-${w}`,M);ot[ot.length-1]=St;const rt=ot.shift(),gt=ot.length>0?ot.shift():rt,B=ap(rt,gt);V[k.id]={startX:rt.x,startY:rt.y,targetX:gt.x,targetY:gt.y,progress:0,duration:Math.max(30,Math.ceil(B/_p)),baseY:k.targetPosition.y,waypointQueue:ot,isExternalTransit:!0,globalX:ct,globalY:vt}}else V[k.id]={startX:q.x,startY:q.baseY,targetX:k.targetPosition.x,targetY:k.targetPosition.y,progress:0,duration:by,baseY:k.targetPosition.y,waypointQueue:[],isExternalTransit:!1}}if(k.status==="idle"&&(!V[k.id]||V[k.id].progress>=1)){const et=V[k.id];if(et!=null&&et.isExternalTransit&&et.waypointQueue.length===0&&et.progress>=1&&(et.globalX!==void 0&&et.globalY!==void 0&&(q.x=et.globalX-U.x,q.y=et.globalY-U.y,q.baseY=q.y),et.isExternalTransit=!1,et.globalX=void 0,et.globalY=void 0),c.current[F]===void 0&&(c.current[F]=Sp+Math.floor(Math.random()*(Ey-Sp))),c.current[F]--,c.current[F]<=0){const ct=V[k.id];if(ct!=null&&ct.isExternalTransit){const vt=ct.globalX??q.x+U.x,dt=ct.globalY??q.y+U.y,St={x:vt,y:dt},j=Ic(k.deskIndex,{x:0,y:0}),Q={x:j.x+U.x,y:j.y+U.y},ot=d.current[F],rt=ot==="kitchen"?"kitchen":ot==="restArea"?"rest-area":ot==="bathroom-male"?"bathroom-male":ot==="bathroom-female"?"bathroom-female":`squad-${w}`,gt=ld(St,rt,`squad-${w}`,M);gt[gt.length-1]=Q;const B=gt.shift(),J=gt.length>0?gt.shift():B,tt=ap(B,J);d.current[F]="neighbor",V[k.id]={startX:B.x,startY:B.y,targetX:J.x,targetY:J.y,progress:0,duration:Math.max(30,Math.ceil(tt/_p)),baseY:j.y,waypointQueue:gt,isExternalTransit:!0,globalX:vt,globalY:dt}}else{const dt=AM(U,O??{width:ir,height:_i},M,w,q.x,q.baseY);if(d.current[F]=dt.destination,dt.isExternal&&dt.waypoints&&dt.waypoints.length>1){const St=[...dt.waypoints],j=St.shift(),Q=St.length>0?St.shift():j,ot=ap(j,Q);V[k.id]={startX:j.x,startY:j.y,targetX:Q.x,targetY:Q.y,progress:0,duration:Math.max(30,Math.ceil(ot/_p)),baseY:dt.y-U.y,waypointQueue:St,isExternalTransit:!0,globalX:j.x,globalY:j.y}}else V[k.id]={startX:q.x,startY:q.baseY,targetX:dt.x,targetY:dt.y,progress:0,duration:by+Math.floor(Math.random()*30),baseY:dt.y,waypointQueue:[],isExternalTransit:!1}}c.current[F]=Sp+Math.floor(Math.random()*(Ey-Sp))}}const $=V[k.id];if($&&$.progress<1){$.progress=Math.min(1,$.progress+1/$.duration);const et=ZT($.progress);if($.isExternalTransit){const ct=np($.startX,$.targetX,et),vt=np($.startY,$.targetY,et);$.globalX=ct,$.globalY=vt,q.x=ct-U.x,q.y=vt-U.y;const dt=Math.floor(b/Ty)%2===0?"walk-right":"walk-left";C[z][k.id]={x:q.x,y:q.y,pose:dt,isExternalTransit:!0,globalX:ct,globalY:vt}}else{q.x=np($.startX,$.targetX,et),q.y=np($.startY,$.targetY,et),q.baseY=$.baseY;const ct=Math.floor(b/Ty)%2===0?"walk-right":"walk-left";C[z][k.id]={x:q.x,y:q.y,pose:ct}}}else if($&&$.progress>=1&&$.waypointQueue.length>0){const et=$.waypointQueue.shift(),ct={x:$.targetX,y:$.targetY},vt=ap(ct,et);$.startX=$.targetX,$.startY=$.targetY,$.targetX=et.x,$.targetY=et.y,$.progress=0,$.duration=$.isExternalTransit?Math.max(30,Math.ceil(vt/_p)):by,$.isExternalTransit&&($.globalX=$.startX,$.globalY=$.startY);const dt=Math.floor(b/Ty)%2===0?"walk-right":"walk-left";$.isExternalTransit?C[z][k.id]={x:q.x,y:q.y,pose:dt,isExternalTransit:!0,globalX:$.startX,globalY:$.startY}:C[z][k.id]={x:q.x,y:q.y,pose:dt}}else if(k.status==="working"){const et=Math.floor(b/TM)%2===0?"typing":"seated";C[z][k.id]={x:q.x,y:q.baseY,pose:et}}else if(k.status==="idle"){const et=d.current[F]??"coffee",ct=V[k.id];if((ct==null?void 0:ct.isExternalTransit)??!1)C[z][k.id]={x:q.x,y:q.y,pose:"standing",isExternalTransit:!0,globalX:(ct==null?void 0:ct.globalX)??q.x+U.x,globalY:(ct==null?void 0:ct.globalY)??q.y+U.y};else{const dt=Math.sin(b*.07+k.deskIndex*1.5)*2;let St;et==="coffee"||et==="kitchen"?St="coffee":et==="meeting"||et==="neighbor"?St=Math.floor(b/90)%2===0?"standing":"coffee":et==="restArea"?St="seated":(et.startsWith("bathroom"),St="standing"),C[z][k.id]={x:q.x,y:q.baseY+dt,pose:St},Y.push({agentKey:F,agentId:k.id,agentName:k.name,x:q.x,y:q.baseY})}}else k.status==="checkpoint"?C[z][k.id]={x:q.x,y:q.baseY,pose:"seated"}:C[z][k.id]={x:q.x,y:q.baseY,pose:"seated"}}if(b%60===0&&Y.length>=2)for(let k=0;k<Y.length;k++){const V=Y[k];if(!(g.current[V.agentKey]&&b-g.current[V.agentKey]<Dx)&&!E.bubbles[V.agentKey])for(let Z=k+1;Z<Y.length;Z++){const F=Y[Z];if(g.current[F.agentKey]&&b-g.current[F.agentKey]<Dx||E.bubbles[F.agentKey])continue;const q=V.x-F.x,$=V.y-F.y;if(Math.sqrt(q*q+$*$)<CM){const[ct,vt]=Nx[Math.floor(Math.random()*Nx.length)];E.appendBubble(z,V.agentId,ct),setTimeout(()=>{We.getState().appendBubble(z,F.agentId,vt)},1500),g.current[V.agentKey]=b,g.current[F.agentKey]=b;const dt=`${z}:${V.agentId}`,St=`${z}:${F.agentId}`;p.current[dt]&&clearTimeout(p.current[dt]),p.current[St]&&clearTimeout(p.current[St]),p.current[dt]=setTimeout(()=>{We.getState().clearBubble(z,V.agentId),delete p.current[dt]},Ox),p.current[St]=setTimeout(()=>{We.getState().clearBubble(z,F.agentId),delete p.current[St]},Ox+1500);break}}}}a(C)},[]);return G.useEffect(()=>{if(n)return n.add(x),()=>{n.remove(x)}},[n,x]),t}Jp({Container:$n,Graphics:ni,Text:Zp});const RM=.3,zM=2;function wM(){const{app:n}=nM(),t=G.useRef(null),[a,l]=G.useState(new Map),o=G.useRef(null),c=We(E=>E.rooms),d=We(E=>E.agentVisuals),m=We(E=>E.bubbles),p=ti(E=>E.activeStates),g=MM((n==null?void 0:n.ticker)??null),x=G.useMemo(()=>Rp(c.length),[c.length]);G.useEffect(()=>{n!=null&&n.renderer&&l(sM(n))},[n]);const b=G.useCallback(E=>{E.clear(),uM(E,x),Mx(E,x.bathroomMale.x,x.bathroomMale.y,x.bathroomMale.width,x.bathroomMale.height,"male"),Mx(E,x.bathroomFemale.x,x.bathroomFemale.y,x.bathroomFemale.width,x.bathroomFemale.height,"female"),oM(E,x.kitchen.x,x.kitchen.y,x.kitchen.width,x.kitchen.height),cM(E,x.restArea.x,x.restArea.y,x.restArea.width,x.restArea.height)},[x]);return G.useEffect(()=>{const E=n==null?void 0:n.canvas;if(!E)return;const C=w=>{const O=t.current;O&&(o.current={startX:w.clientX,startY:w.clientY,pivotX:O.position.x,pivotY:O.position.y},E.setPointerCapture(w.pointerId))},M=w=>{const O=t.current,U=o.current;!O||!U||(O.position.x=U.pivotX+(w.clientX-U.startX),O.position.y=U.pivotY+(w.clientY-U.startY))},z=w=>{o.current=null,E.releasePointerCapture(w.pointerId)},R=w=>{w.preventDefault();const O=t.current;if(!O)return;const U=O.scale.x,Y=w.deltaY>0?.9:1.1,k=Math.max(RM,Math.min(zM,U*Y)),V=E.getBoundingClientRect(),Z=w.clientX-V.left,F=w.clientY-V.top,q=k/U;O.position.x=Z-(Z-O.position.x)*q,O.position.y=F-(F-O.position.y)*q,O.scale.set(k)};return E.addEventListener("pointerdown",C),E.addEventListener("pointermove",M),E.addEventListener("pointerup",z),E.addEventListener("pointerleave",z),E.addEventListener("wheel",R,{passive:!1}),()=>{E.removeEventListener("pointerdown",C),E.removeEventListener("pointermove",M),E.removeEventListener("pointerup",z),E.removeEventListener("pointerleave",z),E.removeEventListener("wheel",R)}},[n]),H.jsxs("container",{ref:t,children:[H.jsx("graphics",{draw:b}),x.corridorV.height>0&&H.jsx("text",{text:"Corredor",x:x.corridorV.x+x.corridorV.width/2,y:x.corridorV.y+8,anchor:{x:.5,y:0},style:{fontSize:11,fill:"#666666",fontFamily:"sans-serif",fontWeight:"bold"}}),H.jsx("text",{text:"Corredor",x:x.corridorH.x+x.corridorH.width/2,y:x.corridorH.y+8,anchor:{x:.5,y:0},style:{fontSize:11,fill:"#666666",fontFamily:"sans-serif",fontWeight:"bold"}}),H.jsx("text",{text:"WC ♂",x:x.bathroomMale.x+x.bathroomMale.width/2,y:x.bathroomMale.y+x.bathroomMale.height-8,anchor:{x:.5,y:1},style:{fontSize:10,fill:"#546e7a",fontFamily:"sans-serif",fontWeight:"bold"}}),H.jsx("text",{text:"WC ♀",x:x.bathroomFemale.x+x.bathroomFemale.width/2,y:x.bathroomFemale.y+x.bathroomFemale.height-8,anchor:{x:.5,y:1},style:{fontSize:10,fill:"#546e7a",fontFamily:"sans-serif",fontWeight:"bold"}}),H.jsx("text",{text:"Cozinha",x:x.kitchen.x+x.kitchen.width/2,y:x.kitchen.y+12,anchor:{x:.5,y:0},style:{fontSize:10,fill:"#795548",fontFamily:"sans-serif",fontWeight:"bold"}}),H.jsx("text",{text:"Descanso",x:x.restArea.x+x.restArea.width/2,y:x.restArea.y+12,anchor:{x:.5,y:0},style:{fontSize:10,fill:"#546e7a",fontFamily:"sans-serif",fontWeight:"bold"}}),c.map((E,C)=>{var O;const M=x.squadOrigins[C];if(!M)return null;const z=d[E]??[],R=((O=p[E])==null?void 0:O.status)??"idle",w=g[E]??{};return H.jsx(vM,{squadName:E,status:R,agents:z,textures:a,bubbles:m,animStates:w,originX:M.origin.x,originY:M.origin.y,roomWidth:M.width,roomHeight:M.height},E)}),c.map((E,C)=>{const M=d[E]??[],z=g[E]??{};return M.filter(R=>{const w=z[R.id];return(w==null?void 0:w.isExternalTransit)&&w.globalX!==void 0&&w.globalY!==void 0}).map(R=>{const w=z[R.id],O=`${E}:${R.id}`,U=m[O];return H.jsx(Ag,{agent:R,textures:a,bubbleText:(U==null?void 0:U.text)??null,animX:w.globalX,animY:w.globalY,animPose:w.pose},`transit-${R.id}`)})}),H.jsx(bM,{x:x.ceoOffice.x,y:x.ceoOffice.y,width:x.ceoOffice.width,height:x.ceoOffice.height,textures:a,ticker:(n==null?void 0:n.ticker)??null})]})}function DM(){const n=We(l=>l.activeRoom),t=We(l=>l.checkpoints),a=n?t[n]:void 0;return H.jsx("div",{style:{display:"flex",height:"100%"},children:H.jsxs("div",{style:{flex:1,position:"relative",overflow:"hidden"},children:[H.jsx(eM,{background:13158600,antialias:!0,resizeTo:window,style:{width:"100%",height:"100%"},children:H.jsx(wM,{})}),a&&H.jsx(aM,{agentName:a.agentName,question:a.question,onRespond:l=>LT(n,l)})]})})}function OM({message:n}){if(n.role==="agent_dm")return H.jsxs("div",{"data-role":"agent_dm",style:{alignSelf:"flex-start",background:"var(--surface-3)",border:"1px solid var(--border-default)",borderRadius:"var(--radius-md)",padding:"10px 14px",maxWidth:"75%",marginBottom:"var(--sp-2)",animation:"fadeInUp 0.3s var(--ease-out) both"},children:[H.jsx("div",{style:{fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--accent)",fontWeight:600,marginBottom:4,letterSpacing:"0.02em"},children:n.agentName}),H.jsx("div",{style:{color:"var(--text-primary)",fontSize:"0.85rem",lineHeight:1.55},children:n.content})]});const t=n.role==="user";return H.jsx("div",{"data-role":n.role,style:{alignSelf:t?"flex-end":"flex-start",background:t?"var(--user-bubble)":"var(--agent-bubble)",border:t?"1px solid rgba(100, 160, 255, 0.15)":"1px solid var(--border-subtle)",borderRadius:"var(--radius-md)",padding:"10px 14px",maxWidth:"75%",marginBottom:"var(--sp-2)",animation:"fadeInUp 0.3s var(--ease-out) both"},children:H.jsx("div",{style:{color:"var(--text-primary)",fontSize:"0.85rem",lineHeight:1.55,whiteSpace:"pre-wrap"},children:n.content})})}function NM(){const[n,t]=G.useState(""),a=G.useRef(null),l=ti(M=>M.selectedSquad),o=Fi(M=>M.messages),c=Fi(M=>M.streaming),d=Fi(M=>M.streamingText),m=Fi(M=>M.error),p=Fi(M=>M.addUserMessage),g=Fi(M=>M.startStreaming),x=Fi(M=>M.loadHistory);if(G.useEffect(()=>{l&&x(l)},[l,x]),G.useEffect(()=>{var M,z;(z=(M=a.current)==null?void 0:M.scrollIntoView)==null||z.call(M,{behavior:"smooth"})},[o,d]),!l)return H.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",gap:"var(--sp-3)",animation:"fadeIn 0.5s var(--ease-out) both"},children:[H.jsx("div",{style:{width:48,height:48,borderRadius:"var(--radius-md)",background:"var(--surface-3)",border:"1px solid var(--border-subtle)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.2rem",color:"var(--text-muted)"},children:"◈"}),H.jsx("span",{style:{color:"var(--text-muted)",fontSize:"0.85rem"},children:"Select a squad to start chatting"})]});const b=()=>{const M=n.trim();!M||c||(p(M),g(),YT(l,M),t(""))},E=M=>{M.key==="Enter"&&!M.shiftKey&&(M.preventDefault(),b())},C=n.trim()&&!c;return H.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:[H.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"var(--sp-4)",display:"flex",flexDirection:"column"},children:[o.map(M=>H.jsx(OM,{message:M},M.id)),c&&d&&H.jsx("div",{"data-role":"assistant",style:{alignSelf:"flex-start",background:"var(--agent-bubble)",border:"1px solid var(--border-subtle)",borderRadius:"var(--radius-md)",padding:"10px 14px",maxWidth:"75%",marginBottom:"var(--sp-2)"},children:H.jsxs("div",{style:{color:"var(--text-primary)",fontSize:"0.85rem",lineHeight:1.55,whiteSpace:"pre-wrap"},children:[d,H.jsx("span",{style:{display:"inline-block",width:6,height:14,background:"var(--accent)",marginLeft:2,animation:"pulse 1s ease-in-out infinite",borderRadius:1,verticalAlign:"text-bottom"}})]})}),m&&H.jsx("div",{style:{alignSelf:"center",background:"var(--status-error-glow)",border:"1px solid rgba(255, 64, 112, 0.25)",borderRadius:"var(--radius-sm)",padding:"8px 14px",color:"var(--status-error)",fontFamily:"var(--font-mono)",fontSize:"0.78rem",marginBottom:"var(--sp-2)"},children:m}),H.jsx("div",{ref:a})]}),H.jsxs("div",{style:{display:"flex",padding:"var(--sp-3) var(--sp-4)",borderTop:"1px solid var(--border-subtle)",gap:"var(--sp-2)",background:"var(--surface-1)"},children:[H.jsx("input",{type:"text",className:"input",value:n,onChange:M=>t(M.target.value),onKeyDown:E,placeholder:"Type a message...",disabled:c,style:{flex:1}}),H.jsx("button",{onClick:b,disabled:!C,"aria-label":"Send",className:C?"btn btn-accent":"btn",style:{padding:"0 var(--sp-5)",cursor:C?"pointer":"not-allowed",opacity:C?1:.4},children:"Send"})]})]})}const BM={idle:"var(--status-idle)",working:"var(--accent)",delivering:"var(--accent-dim)",done:"var(--status-active)",checkpoint:"var(--status-warning)"};function UM({agent:n}){const t=BM[n.status];return H.jsxs("div",{style:{background:"var(--surface-3)",borderRadius:"var(--radius-sm)",padding:"10px 12px",marginBottom:"var(--sp-2)",border:"1px solid var(--border-subtle)",transition:"border-color var(--duration-fast) var(--ease-out)"},children:[H.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[H.jsx("span",{style:{fontWeight:600,fontSize:"0.82rem",color:"var(--text-primary)"},children:n.name}),H.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.62rem",fontWeight:600,color:t,padding:"2px 6px",borderRadius:"var(--radius-full)",border:`1px solid ${t}`,textTransform:"lowercase",letterSpacing:"0.02em"},children:n.status})]}),n.stepLabel&&H.jsx("div",{style:{fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-muted)",lineHeight:1.4},children:n.stepLabel})]})}const HM=[{key:"pending",label:"Pending",color:"var(--status-idle)",glow:"none",filter:n=>n.status==="idle"},{key:"running",label:"Running",color:"var(--accent)",glow:"var(--accent-glow)",filter:n=>n.status==="working"||n.status==="checkpoint"||n.status==="delivering"},{key:"done",label:"Done",color:"var(--status-active)",glow:"var(--status-active-glow)",filter:n=>n.status==="done"}];function jM(){const n=ti(o=>o.selectedSquad),t=ti(o=>o.activeStates),a=n?t[n]:null,l=G.useMemo(()=>a?HM.map(o=>({...o,agents:a.agents.filter(o.filter)})):null,[a]);return n?a?H.jsx("div",{style:{display:"flex",gap:"var(--sp-4)",padding:"var(--sp-5)",height:"100%",overflow:"auto"},children:l.map((o,c)=>H.jsxs("div",{"data-testid":`column-${o.key}`,style:{flex:1,background:"var(--surface-2)",border:"1px solid var(--border-subtle)",borderRadius:"var(--radius-md)",padding:"var(--sp-4)",display:"flex",flexDirection:"column",minWidth:220,animation:`fadeInUp 0.4s var(--ease-out) ${c*80}ms both`},children:[H.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"var(--sp-4)",paddingBottom:"var(--sp-3)",borderBottom:`2px solid ${o.color}`},children:[H.jsx("span",{style:{fontWeight:600,fontSize:"0.82rem",color:"var(--text-primary)"},children:o.label}),H.jsx("span",{"data-testid":`count-${o.key}`,style:{fontFamily:"var(--font-mono)",fontSize:"0.65rem",fontWeight:700,color:o.color,background:o.glow,width:22,height:22,borderRadius:"var(--radius-full)",display:"flex",alignItems:"center",justifyContent:"center",border:`1px solid ${o.color}`},children:o.agents.length})]}),H.jsx("div",{style:{flex:1,overflowY:"auto"},children:o.agents.map(d=>H.jsx(UM,{agent:d},d.id))})]},o.key))}):H.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",gap:"var(--sp-3)",animation:"fadeIn 0.5s var(--ease-out) both"},children:[H.jsx("span",{style:{fontSize:"1.2rem",color:"var(--text-muted)"},children:"▦"}),H.jsx("span",{style:{color:"var(--text-muted)",fontSize:"0.85rem"},children:"No active state for this squad"})]}):H.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",gap:"var(--sp-3)",animation:"fadeIn 0.5s var(--ease-out) both"},children:[H.jsx("span",{style:{fontSize:"1.2rem",color:"var(--text-muted)"},children:"▦"}),H.jsx("span",{style:{color:"var(--text-muted)",fontSize:"0.85rem"},children:"Select a squad to view the kanban board"})]})}function GM(){const n=zl(U=>U.user),[t,a]=G.useState([]),[l,o]=G.useState(!0),[c,d]=G.useState(""),[m,p]=G.useState(""),[g,x]=G.useState("viewer"),[b,E]=G.useState(null),[C,M]=G.useState(null),z=G.useCallback(async()=>{try{const U=await fetch("/api/users",{credentials:"include"});if(U.ok){const Y=await U.json();a(Y.users)}}catch{E("Failed to load users")}finally{o(!1)}},[]);G.useEffect(()=>{z()},[z]);const R=async()=>{if(!(!c.trim()||!m.trim())){E(null);try{const U=await fetch("/api/auth/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:c,password:m,role:g}),credentials:"include"});if(!U.ok){const Y=await U.json();E(Y.error||"Failed to create user");return}d(""),p(""),x("viewer"),await z()}catch{E("Network error")}}},w=async(U,Y)=>{try{(await fetch(`/api/users/${U}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({role:Y}),credentials:"include"})).ok&&await z()}catch{E("Failed to update role")}},O=async U=>{try{(await fetch(`/api/users/${U}`,{method:"DELETE",credentials:"include"})).ok&&(M(null),await z())}catch{E("Failed to delete user")}};return l?H.jsx("div",{style:{color:"var(--text-muted)",padding:"var(--sp-5)",fontFamily:"var(--font-mono)",fontSize:"0.8rem",animation:"pulse 1.5s ease-in-out infinite"},children:"Loading users..."}):H.jsxs("div",{children:[H.jsx("h3",{style:{fontFamily:"var(--font-display)",fontWeight:700,fontSize:"0.95rem",color:"var(--text-primary)",marginBottom:"var(--sp-4)"},children:"User Management"}),b&&H.jsx("div",{style:{background:"var(--status-error-glow)",border:"1px solid rgba(255, 64, 112, 0.2)",color:"var(--status-error)",padding:"var(--sp-2) var(--sp-3)",borderRadius:"var(--radius-sm)",marginBottom:"var(--sp-3)",fontFamily:"var(--font-mono)",fontSize:"0.78rem"},children:b}),H.jsxs("div",{style:{display:"flex",gap:"var(--sp-2)",marginBottom:"var(--sp-5)",flexWrap:"wrap",alignItems:"center"},children:[H.jsx("input",{className:"input",placeholder:"Username",value:c,onChange:U=>d(U.target.value),style:{flex:1,minWidth:120}}),H.jsx("input",{className:"input",placeholder:"Password",type:"password",value:m,onChange:U=>p(U.target.value),style:{flex:1,minWidth:120}}),H.jsxs("select",{className:"input",value:g,onChange:U=>x(U.target.value),style:{minWidth:100},children:[H.jsx("option",{value:"viewer",children:"viewer"}),H.jsx("option",{value:"operator",children:"operator"}),H.jsx("option",{value:"admin",children:"admin"})]}),H.jsx("button",{onClick:R,className:"btn btn-accent",children:"Create User"})]}),H.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},children:[H.jsx("thead",{children:H.jsx("tr",{style:{borderBottom:"1px solid var(--border-default)"},children:["Username","Email","Role","Last Login","Actions"].map((U,Y)=>H.jsx("th",{style:{textAlign:Y===4?"right":"left",padding:"8px 12px",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.08em"},children:U},U))})}),H.jsx("tbody",{children:t.map(U=>H.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[H.jsx("td",{style:{padding:"10px 12px",color:"var(--text-primary)",fontSize:"0.82rem"},children:U.username}),H.jsx("td",{style:{padding:"10px 12px",color:"var(--text-secondary)",fontSize:"0.82rem"},children:U.email||"—"}),H.jsx("td",{style:{padding:"10px 12px"},children:U.id===(n==null?void 0:n.id)?H.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.72rem",color:"var(--text-secondary)"},children:U.role}):H.jsxs("select",{className:"input",value:U.role,onChange:Y=>w(U.id,Y.target.value),style:{padding:"4px 8px",fontSize:"0.75rem"},children:[H.jsx("option",{value:"viewer",children:"viewer"}),H.jsx("option",{value:"operator",children:"operator"}),H.jsx("option",{value:"admin",children:"admin"})]})}),H.jsx("td",{style:{padding:"10px 12px",fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-muted)"},children:U.last_login?new Date(U.last_login).toLocaleDateString():"—"}),H.jsx("td",{style:{padding:"10px 12px",textAlign:"right"},children:U.id!==(n==null?void 0:n.id)&&(C===U.id?H.jsxs("span",{style:{display:"inline-flex",gap:"var(--sp-2)",alignItems:"center"},children:[H.jsx("span",{style:{color:"var(--status-error)",fontFamily:"var(--font-mono)",fontSize:"0.7rem"},children:"Confirm?"}),H.jsx("button",{onClick:()=>O(U.id),className:"btn btn-sm btn-danger",children:"Yes"}),H.jsx("button",{onClick:()=>M(null),className:"btn btn-sm",children:"No"})]}):H.jsx("button",{onClick:()=>M(U.id),className:"btn btn-sm btn-danger",children:"Delete"}))})]},U.id))})]})]})}function YM(){const n=ti(p=>p.selectedSquad),t=ti(p=>p.activeStates),[a,l]=G.useState(null),[o,c]=G.useState(!1),d=n?t[n]:null;if(G.useEffect(()=>{if(!n){l(null);return}c(!0),fetch(`/api/squads/${n}`,{credentials:"include"}).then(p=>p.ok?p.json():null).then(p=>{p&&l(p.data)}).finally(()=>c(!1))},[n]),!n)return H.jsx("div",{style:{color:"var(--text-muted)",padding:"var(--sp-5)",fontSize:"0.85rem"},children:"Select a squad to view details"});if(o)return H.jsx("div",{style:{color:"var(--text-muted)",padding:"var(--sp-5)",fontFamily:"var(--font-mono)",fontSize:"0.8rem",animation:"pulse 1.5s ease-in-out infinite"},children:"Loading squad details..."});const m={fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",fontWeight:600,marginBottom:"var(--sp-2)",textTransform:"uppercase",letterSpacing:"0.08em"};return H.jsxs("div",{children:[H.jsx("h3",{style:{fontFamily:"var(--font-display)",fontWeight:700,fontSize:"0.95rem",color:"var(--text-primary)",marginBottom:"var(--sp-4)"},children:"Squad Info"}),a&&H.jsxs(H.Fragment,{children:[H.jsxs("div",{style:{marginBottom:"var(--sp-5)"},children:[H.jsx("div",{style:m,children:"Name"}),H.jsx("div",{style:{color:"var(--text-primary)",fontSize:"0.9rem",fontWeight:600},children:a.name})]}),H.jsxs("div",{style:{marginBottom:"var(--sp-5)"},children:[H.jsx("div",{style:m,children:"Description"}),H.jsx("div",{style:{color:"var(--text-primary)",fontSize:"0.85rem",lineHeight:1.5},children:a.description})]}),H.jsxs("div",{style:{marginBottom:"var(--sp-5)"},children:[H.jsx("div",{style:m,children:"Agents"}),H.jsx("div",{style:{display:"flex",gap:"var(--sp-2)",flexWrap:"wrap"},children:a.agents.map(p=>H.jsx("span",{style:{background:"var(--surface-3)",border:"1px solid var(--border-subtle)",borderRadius:"var(--radius-sm)",padding:"4px 10px",fontFamily:"var(--font-mono)",fontSize:"0.72rem",color:"var(--text-primary)"},children:p.name},p.id))})]}),H.jsxs("div",{style:{marginBottom:"var(--sp-5)"},children:[H.jsx("div",{style:m,children:"Pipeline Steps"}),H.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-2)"},children:a.pipeline.steps.map((p,g)=>H.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-3)",background:"var(--surface-3)",border:"1px solid var(--border-subtle)",borderRadius:"var(--radius-sm)",padding:"8px 12px",fontSize:"0.82rem"},children:[H.jsx("span",{style:{background:"var(--accent)",color:"var(--text-inverse)",width:22,height:22,borderRadius:"var(--radius-full)",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-mono)",fontSize:"0.65rem",fontWeight:700,flexShrink:0},children:g+1}),H.jsx("span",{style:{color:"var(--text-primary)"},children:p.label}),H.jsx("span",{style:{fontFamily:"var(--font-mono)",color:"var(--text-muted)",fontSize:"0.68rem",marginLeft:"auto"},children:p.agent})]},p.id))})]})]}),d&&H.jsxs("div",{style:{marginBottom:"var(--sp-5)"},children:[H.jsx("div",{style:m,children:"Current State"}),H.jsx("pre",{"data-testid":"state-json",style:{background:"var(--surface-3)",border:"1px solid var(--border-subtle)",borderRadius:"var(--radius-sm)",padding:"var(--sp-4)",fontFamily:"var(--font-mono)",fontSize:"0.72rem",color:"var(--accent)",overflow:"auto",maxHeight:400,lineHeight:1.5},children:JSON.stringify(d,null,2)})]})]})}function qM(){const[n,t]=G.useState(null),[a,l]=G.useState(null),[o,c]=G.useState(!0),[d,m]=G.useState(null),p=G.useCallback(async()=>{c(!0);try{const b=await fetch("/api/health",{credentials:"include"});if(b.ok){const E=await b.json();t(E),l(E.status==="ok")}else l(!1)}catch{l(!1)}finally{c(!1),m(new Date().toLocaleTimeString())}},[]);G.useEffect(()=>{p()},[p]);const g={fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",fontWeight:600,marginBottom:"var(--sp-2)",textTransform:"uppercase",letterSpacing:"0.08em"},x={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"10px 12px",background:"var(--surface-3)",border:"1px solid var(--border-subtle)",borderRadius:"var(--radius-sm)",marginBottom:"var(--sp-2)",fontSize:"0.82rem"};return H.jsxs("div",{children:[H.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"var(--sp-4)"},children:[H.jsx("h3",{style:{fontFamily:"var(--font-display)",fontWeight:700,fontSize:"0.95rem",color:"var(--text-primary)"},children:"Server Info"}),H.jsx("button",{onClick:p,className:"btn btn-sm",children:"Refresh"})]}),H.jsxs("div",{style:{marginBottom:"var(--sp-5)"},children:[H.jsx("div",{style:g,children:"Health Status"}),H.jsxs("div",{style:x,children:[H.jsx("span",{style:{color:"var(--text-primary)"},children:"API Server"}),o?H.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.75rem",color:"var(--text-muted)",animation:"pulse 1.5s ease-in-out infinite"},children:"Checking..."}):H.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"var(--sp-1)",fontFamily:"var(--font-mono)",fontSize:"0.75rem",fontWeight:600,color:a?"var(--status-active)":"var(--status-error)"},children:[H.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:a?"var(--status-active)":"var(--status-error)",display:"inline-block",boxShadow:a?"0 0 8px var(--status-active-glow)":"0 0 8px var(--status-error-glow)"}}),a?"Healthy":"Unhealthy"]})]})]}),H.jsxs("div",{style:{marginBottom:"var(--sp-5)"},children:[H.jsx("div",{style:g,children:"Environment"}),H.jsxs("div",{style:x,children:[H.jsx("span",{style:{color:"var(--text-primary)"},children:"API Port"}),H.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.75rem",color:"var(--text-secondary)"},children:"3001"})]}),H.jsxs("div",{style:x,children:[H.jsx("span",{style:{color:"var(--text-primary)"},children:"Dashboard Port (dev)"}),H.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.75rem",color:"var(--text-secondary)"},children:"5173"})]})]}),d&&H.jsxs("div",{style:{fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",textAlign:"right"},children:["Last checked: ",d]})]})}function LM(){const n=zl(d=>d.user),t=(n==null?void 0:n.role)==="admin",[a,l]=G.useState(t?"users":"squad"),c=[{key:"users",label:"Users",icon:"◉",adminOnly:!0},{key:"squad",label:"Squad",icon:"⬡"},{key:"server",label:"Server",icon:"⚙"}].filter(d=>!d.adminOnly||t);return H.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",padding:"var(--sp-5)",animation:"fadeIn 0.4s var(--ease-out) both"},children:[H.jsxs("div",{style:{marginBottom:"var(--sp-4)"},children:[H.jsx("h2",{style:{fontFamily:"var(--font-display)",fontWeight:700,fontSize:"1.1rem",color:"var(--text-primary)",marginBottom:"var(--sp-1)"},children:"Settings"}),H.jsx("p",{style:{fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-muted)"},children:"Configuration and management"})]}),H.jsx("div",{style:{display:"flex",gap:"var(--sp-1)",marginBottom:"var(--sp-5)",borderBottom:"1px solid var(--border-subtle)"},children:c.map(d=>H.jsxs("button",{onClick:()=>l(d.key),style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"10px 16px",border:"none",borderBottom:a===d.key?"2px solid var(--accent)":"2px solid transparent",background:"transparent",color:a===d.key?"var(--text-primary)":"var(--text-muted)",fontFamily:"var(--font-display)",fontWeight:a===d.key?600:400,fontSize:"0.82rem",cursor:"pointer",transition:"all var(--duration-fast) var(--ease-out)"},children:[H.jsx("span",{style:{fontSize:"0.75rem",opacity:.7},children:d.icon}),d.label]},d.key))}),H.jsxs("div",{style:{flex:1,overflow:"auto"},children:[a==="users"&&t&&H.jsx(GM,{}),a==="squad"&&H.jsx(YM,{}),a==="server"&&H.jsx(qM,{})]})]})}function XM(){const n=vs(p=>p.jobs),t=vs(p=>p.loading),a=vs(p=>p.fetchJobs),l=vs(p=>p.pauseJob),o=vs(p=>p.resumeJob),c=vs(p=>p.triggerJob);G.useEffect(()=>{a()},[a]);const d=p=>p==="active"?"var(--status-active)":p==="paused"?"var(--status-warning)":"var(--status-error)",m=p=>p==="active"?"var(--status-active-glow)":p==="paused"?"var(--status-warning-glow)":"var(--status-error-glow)";return H.jsxs("div",{style:{padding:"var(--sp-6)",animation:"fadeIn 0.4s var(--ease-out) both"},children:[H.jsxs("div",{style:{marginBottom:"var(--sp-5)"},children:[H.jsx("h2",{style:{fontFamily:"var(--font-display)",fontWeight:700,fontSize:"1.1rem",color:"var(--text-primary)",marginBottom:"var(--sp-1)"},children:"Scheduler"}),H.jsx("p",{style:{fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-muted)"},children:"Autonomous job execution and monitoring"})]}),t&&H.jsx("p",{style:{color:"var(--text-muted)",fontFamily:"var(--font-mono)",fontSize:"0.8rem",animation:"pulse 1.5s ease-in-out infinite"},children:"Loading jobs..."}),!t&&n.length===0&&H.jsxs("div",{style:{padding:"var(--sp-8)",textAlign:"center",color:"var(--text-muted)"},children:[H.jsx("div",{style:{fontSize:"1.5rem",marginBottom:"var(--sp-3)"},children:"⏣"}),H.jsx("p",{style:{fontSize:"0.85rem",marginBottom:"var(--sp-2)"},children:"No scheduled jobs"}),H.jsxs("p",{style:{fontFamily:"var(--font-mono)",fontSize:"0.7rem"},children:["Add ",H.jsx("code",{style:{background:"var(--surface-3)",padding:"2px 6px",borderRadius:"var(--radius-xs)"},children:"schedule.enabled: true"})," to a squad.yaml to get started."]})]}),H.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-3)"},children:n.map((p,g)=>H.jsxs("div",{style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)",borderRadius:"var(--radius-md)",padding:"var(--sp-4)",display:"flex",justifyContent:"space-between",alignItems:"center",transition:"border-color var(--duration-fast) var(--ease-out)",animation:`fadeInUp 0.4s var(--ease-out) ${g*60}ms both`},children:[H.jsxs("div",{style:{flex:1,minWidth:0},children:[H.jsx("div",{style:{fontWeight:600,fontSize:"0.9rem",color:"var(--text-primary)",marginBottom:"var(--sp-1)"},children:p.squad_name}),H.jsxs("div",{style:{fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-secondary)",display:"flex",alignItems:"center",gap:"var(--sp-3)",flexWrap:"wrap"},children:[H.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,color:d(p.status)},children:[H.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:d(p.status),boxShadow:`0 0 8px ${m(p.status)}`,display:"inline-block",animation:p.status==="active"?"statusPulse 2s ease-in-out infinite":"none"}}),p.status]}),H.jsx("span",{style:{color:"var(--border-strong)"},children:"│"}),H.jsx("code",{style:{background:"var(--surface-3)",padding:"1px 5px",borderRadius:"var(--radius-xs)",fontSize:"0.65rem"},children:p.cron_expression}),p.last_run_at&&H.jsxs(H.Fragment,{children:[H.jsx("span",{style:{color:"var(--border-strong)"},children:"│"}),H.jsxs("span",{children:["Last: ",new Date(p.last_run_at).toLocaleString()]})]}),p.last_result&&H.jsxs(H.Fragment,{children:[H.jsx("span",{style:{color:"var(--border-strong)"},children:"│"}),H.jsx("span",{children:p.last_result})]})]})]}),H.jsxs("div",{style:{display:"flex",gap:"var(--sp-2)",marginLeft:"var(--sp-3)"},children:[p.status==="active"?H.jsx("button",{onClick:()=>l(p.squad_name),className:"btn btn-sm",children:"Pause"}):H.jsx("button",{onClick:()=>o(p.squad_name),className:"btn btn-sm",children:"Resume"}),H.jsx("button",{onClick:()=>c(p.squad_name),className:"btn btn-sm btn-accent",children:"Trigger"})]})]},p.squad_name))})]})}const VM=G.lazy(()=>Pc(()=>import("./JarvisView-yQv964kf.js"),[]).then(n=>({default:n.JarvisView})));KS.createRoot(document.getElementById("root")).render(H.jsx(G.StrictMode,{children:H.jsx(yT,{children:H.jsxs(Kb,{children:[H.jsx(ps,{path:"/login",element:H.jsx(l3,{})}),H.jsxs(ps,{path:"/",element:H.jsx(i3,{}),children:[H.jsx(ps,{index:!0,element:H.jsx(kb,{to:"/office",replace:!0})}),H.jsx(ps,{path:"office",element:H.jsx(DM,{})}),H.jsx(ps,{path:"chat",element:H.jsx(NM,{})}),H.jsx(ps,{path:"kanban",element:H.jsx(jM,{})}),H.jsx(ps,{path:"settings",element:H.jsx(LM,{})}),H.jsx(ps,{path:"scheduler",element:H.jsx(XM,{})}),H.jsx(ps,{path:"jarvis",element:H.jsx(G.Suspense,{fallback:null,children:H.jsx(VM,{})})})]})]})})}));export{kp as $,t2 as A,pd as B,zn as C,bi as D,_s as E,cr as F,ni as G,dg as H,Sd as I,e3 as J,R1 as K,Ap as L,le as M,fg as N,P_ as O,ya as P,$i as Q,jy as R,y4 as S,ze as T,wp as U,k_ as V,Fy as W,k4 as X,K4 as Y,$4 as Z,W4 as _,kM as a,bo as a0,T3 as a1,_d as a2,hg as a3,nC as a4,ai as a5,v_ as a6,Ii as a7,Xp as a8,f1 as a9,af as aa,HA as ab,tE as ac,d1 as ad,I0 as ae,m1 as af,nE as ag,ef as ah,mn as ai,S_ as aj,lA as ak,e2 as al,de as am,xd as an,un as ao,l4 as ap,t4 as aq,A4 as ar,x4 as as,Q4 as at,Z4 as au,tC as av,I4 as aw,eC as ax,zl as b,ti as c,HE as d,ei as e,on as f,CE as g,Ue as h,Cp as i,H as j,Wt as k,vC as l,__ as m,Qp as n,oC as o,Kp as p,w_ as q,G as r,YT as s,Ie as t,X0 as u,Jc as v,Ya as w,j3 as x,$n as y,d4 as z};